# CodeFronts — Full Content > Complete machine-readable dump of every demo, tool, and generator on codefronts.com. Demos include the full HTML, CSS, and JS that visitors copy-paste. Tools and generators include their description and what they output. Source-of-truth file for AI assistants citing this site. Site: https://codefronts.com Short manifest: https://codefronts.com/llms.txt Generated: 2026-06-26 (regenerated on every deploy) ## Collections --- ## 9 CSS 3D Designs URL: https://codefronts.com/design-styles/css-3d/ Description: 9 hand-coded CSS 3D scenes built with real transforms, perspective, and preserve-3d — iridescent flip cards, a midnight coverflow carousel, kinetic tilt pricing cards, a page-turn flipbook, a Bauhaus drag-cube navigator, a modular synth control panel, a luxury hover-flip product showcase, a 5×5 spinning cube matrix, and a 60-orb DNA double helix. No WebGL, no libraries. Demo count: 9 ### 01. Iridescent Flip Cards **Type:** CSS + JS **Description:** Four team-member cards floating on a near-black ground, each wrapped in a continuously rotating conic-gradient iridescent border driven by a CSS @property custom-angle animation. The front shows a CSS-drawn portrait (avatar built from layered radii — no images), role, name, and skill tags; hover or tap flips the card on the Y axis to reveal a pull-quote, contact metadata, and CTA. Each card carries a unique warm/cool palette (violet, aqua, rose, sage) that bleeds through the iridescent halo. Fraunces + DM Mono. Best for team bio sections, product feature grids, pricing tier showcases, conference speaker pages. **HTML:** ```html
Creative Direction
Maren
Holst
Brand Motion UX
// Profile

"I believe the best design is invisible — it removes friction until the experience feels inevitable."

@ maren@studio.co
Oslo, Norway · GMT+1
8 yrs experience
Engineering Lead
Kai
Nakamura
Systems Rust Infra
// Profile

"Complex systems are just simple ones stacked with care. Every abstraction is a promise we make to the future."

@ kai@studio.co
Tokyo, Japan · JST
11 yrs experience
Product Strategy
Saoirse
Byrne
Growth GTM Data
// Profile

"Products don't fail because of bad code. They fail because nobody bothered to understand the person on the other end."

@ saoirse@studio.co
Dublin, Ireland · GMT
6 yrs experience
Visual Research
Olu
Adeyemi
Type Print 3D
// Profile

"Typography is the voice of writing. If you can hear a typeface before you read it, the designer did their job."

@ olu@studio.co
Lagos, Nigeria · WAT
9 yrs experience
``` **CSS:** ```css /* ─── 01 Iridescent Flip Cards — team/pricing card grid ───── */ @import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,100..900;1,9..144,100..900&family=DM+Mono:wght@300;400;500&display=swap'); @property --cd-flp-angle { syntax: ''; initial-value: 0deg; inherits: false; } .cd-flp { --cd-flp-bg: #0a090e; --cd-flp-card-w: 224px; --cd-flp-card-h: 310px; position: relative; width: 100%; min-height: 480px; background: var(--cd-flp-bg); font-family: 'DM Mono', ui-monospace, monospace; overflow: hidden; box-sizing: border-box; } .cd-flp *, .cd-flp *::before, .cd-flp *::after { box-sizing: border-box; margin: 0; padding: 0; } .cd-flp .card { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 32px 24px; } .cd-flp .card::before { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse 80% 50% at 50% 50%, rgba(60, 20, 100, 0.12) 0%, transparent 70%); pointer-events: none; } .cd-flp .grid { display: flex; gap: 24px; align-items: center; perspective: 1800px; position: relative; z-index: 1; flex-wrap: wrap; justify-content: center; } .cd-flp .flip-card { width: var(--cd-flp-card-w); height: var(--cd-flp-card-h); perspective: 1200px; cursor: pointer; position: relative; } .cd-flp .card-body { width: 100%; height: 100%; transform-style: preserve-3d; transition: transform 0.82s cubic-bezier(0.45, 0.05, 0.15, 0.98); position: relative; } .cd-flp .flip-card:hover .card-body, .cd-flp .flip-card.flipped .card-body { transform: rotateY(180deg); } .cd-flp .face { position: absolute; inset: 0; border-radius: 22px; backface-visibility: hidden; overflow: hidden; } .cd-flp .front { display: flex; flex-direction: column; align-items: center; padding: 30px 22px 24px; } .cd-flp .front::before { content: ''; position: absolute; inset: -1.5px; border-radius: 23.5px; background: conic-gradient( from var(--cd-flp-angle, 0deg), #ff6ec4 0deg, #7873f5 72deg, #4adede 144deg, #c0f0a0 216deg, #ff6ec4 288deg, #7873f5 360deg ); z-index: -1; animation: cd-flp-border-spin 6s linear infinite; animation-delay: var(--cd-flp-spin-delay, 0s); } @keyframes cd-flp-border-spin { to { --cd-flp-angle: 360deg; } } .cd-flp .avatar { width: 92px; height: 92px; border-radius: 50%; margin-bottom: 20px; position: relative; flex-shrink: 0; overflow: hidden; } .cd-flp .avatar-bg { position: absolute; inset: 0; border-radius: 50%; } .cd-flp .avatar-neck { position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); width: 26px; height: 28px; border-radius: 4px 4px 0 0; } .cd-flp .avatar-head { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); width: 42px; height: 46px; border-radius: 22px 22px 18px 18px; } .cd-flp .avatar-hair { position: absolute; top: 8px; left: 50%; transform: translateX(-50%); width: 46px; height: 28px; border-radius: 23px 23px 0 0; } .cd-flp .card-role { font-family: 'DM Mono', monospace; font-size: 9px; font-weight: 400; letter-spacing: 3px; text-transform: uppercase; margin-bottom: 8px; } .cd-flp .card-name { font-family: 'Fraunces', serif; font-size: 22px; font-weight: 700; text-align: center; line-height: 1.2; margin-bottom: 14px; } .cd-flp .card-divider { width: 1px; height: 32px; margin-bottom: 14px; flex-shrink: 0; } .cd-flp .card-tags { display: flex; flex-wrap: wrap; gap: 5px; justify-content: center; } .cd-flp .tag { font-family: 'DM Mono', monospace; font-size: 8px; letter-spacing: 1.4px; padding: 3px 8px; border-radius: 2px; text-transform: uppercase; } .cd-flp .back { transform: rotateY(180deg); display: flex; flex-direction: column; padding: 26px 22px; } .cd-flp .back::before { content: ''; position: absolute; inset: -1.5px; border-radius: 23.5px; background: conic-gradient( from var(--cd-flp-angle, 0deg), #ff6ec4 0deg, #7873f5 72deg, #4adede 144deg, #c0f0a0 216deg, #ff6ec4 288deg, #7873f5 360deg ); z-index: -1; animation: cd-flp-border-spin 6s linear infinite reverse; animation-delay: var(--cd-flp-spin-delay, 0s); } .cd-flp .back-header { font-family: 'DM Mono', monospace; font-size: 9px; letter-spacing: 3px; text-transform: uppercase; margin-bottom: 14px; } .cd-flp .back-bio { font-family: 'Fraunces', serif; font-size: 13px; font-weight: 300; font-style: italic; line-height: 1.7; flex: 1; } .cd-flp .back-divider { width: 100%; height: 1px; margin: 16px 0 12px; } .cd-flp .back-meta { display: flex; flex-direction: column; gap: 7px; } .cd-flp .meta-row { display: flex; align-items: center; gap: 8px; font-family: 'DM Mono', monospace; font-size: 9px; letter-spacing: 0.8px; } .cd-flp .meta-icon { width: 16px; height: 16px; border-radius: 4px; display: flex; align-items: center; justify-content: center; font-size: 9px; flex-shrink: 0; } .cd-flp .back-cta { margin-top: 16px; padding: 9px 0; border-radius: 6px; font-family: 'DM Mono', monospace; font-size: 9px; letter-spacing: 2.5px; text-transform: uppercase; text-align: center; cursor: pointer; border: none; transition: opacity 0.2s; } .cd-flp .back-cta:hover { opacity: 0.82; } /* Card 1: violet */ .cd-flp .flip-card:nth-child(1) .front { background: linear-gradient(150deg, #fdf8f0 0%, #f5edde 100%); } .cd-flp .flip-card:nth-child(1) .back { background: linear-gradient(148deg, #1c1228 0%, #150d22 100%); } .cd-flp .flip-card:nth-child(1) .avatar-bg { background: #e8d8c0; } .cd-flp .flip-card:nth-child(1) .avatar-head { background: #c8a880; } .cd-flp .flip-card:nth-child(1) .avatar-neck { background: #c8a880; } .cd-flp .flip-card:nth-child(1) .avatar-hair { background: #2c1a0e; } .cd-flp .flip-card:nth-child(1) .card-role { color: #8860cc; } .cd-flp .flip-card:nth-child(1) .card-name { color: #1a0e2e; } .cd-flp .flip-card:nth-child(1) .card-divider { background: linear-gradient(to bottom, transparent, #8860cc, transparent); } .cd-flp .flip-card:nth-child(1) .tag { background: rgba(136,96,204,0.1); color: #8860cc; border: 1px solid rgba(136,96,204,0.25); } .cd-flp .flip-card:nth-child(1) .back-header { color: rgba(200,180,255,0.45); } .cd-flp .flip-card:nth-child(1) .back-bio { color: rgba(220,210,240,0.82); } .cd-flp .flip-card:nth-child(1) .back-divider { background: linear-gradient(90deg, transparent, rgba(136,96,204,0.4), transparent); } .cd-flp .flip-card:nth-child(1) .meta-row { color: rgba(200,180,255,0.65); } .cd-flp .flip-card:nth-child(1) .meta-icon { background: rgba(136,96,204,0.15); color: #a880ff; } .cd-flp .flip-card:nth-child(1) .back-cta { background: #8860cc; color: #fff; } /* Card 2: aqua */ .cd-flp .flip-card:nth-child(2) .front { background: linear-gradient(150deg, #e8f4f8 0%, #d4ecf4 100%); } .cd-flp .flip-card:nth-child(2) .back { background: linear-gradient(148deg, #0c1e2a 0%, #081520 100%); } .cd-flp .flip-card:nth-child(2) .avatar-bg { background: #c8e0f0; } .cd-flp .flip-card:nth-child(2) .avatar-head { background: #f0c8a0; } .cd-flp .flip-card:nth-child(2) .avatar-neck { background: #f0c8a0; } .cd-flp .flip-card:nth-child(2) .avatar-hair { background: #1a2830; } .cd-flp .flip-card:nth-child(2) .card-role { color: #1890c0; } .cd-flp .flip-card:nth-child(2) .card-name { color: #0c1e2a; } .cd-flp .flip-card:nth-child(2) .card-divider { background: linear-gradient(to bottom, transparent, #1890c0, transparent); } .cd-flp .flip-card:nth-child(2) .tag { background: rgba(24,144,192,0.1); color: #1890c0; border: 1px solid rgba(24,144,192,0.25); } .cd-flp .flip-card:nth-child(2) .back-header { color: rgba(100,200,240,0.45); } .cd-flp .flip-card:nth-child(2) .back-bio { color: rgba(180,220,240,0.82); } .cd-flp .flip-card:nth-child(2) .back-divider { background: linear-gradient(90deg, transparent, rgba(24,144,192,0.4), transparent); } .cd-flp .flip-card:nth-child(2) .meta-row { color: rgba(100,200,240,0.65); } .cd-flp .flip-card:nth-child(2) .meta-icon { background: rgba(24,144,192,0.15); color: #40d0ff; } .cd-flp .flip-card:nth-child(2) .back-cta { background: #1890c0; color: #fff; } /* Card 3: rose */ .cd-flp .flip-card:nth-child(3) .front { background: linear-gradient(150deg, #fdf0f4 0%, #f8e4ea 100%); } .cd-flp .flip-card:nth-child(3) .back { background: linear-gradient(148deg, #241014 0%, #180a0d 100%); } .cd-flp .flip-card:nth-child(3) .avatar-bg { background: #f0d0d8; } .cd-flp .flip-card:nth-child(3) .avatar-head { background: #e8b890; } .cd-flp .flip-card:nth-child(3) .avatar-neck { background: #e8b890; } .cd-flp .flip-card:nth-child(3) .avatar-hair { background: #8c3040; } .cd-flp .flip-card:nth-child(3) .card-role { color: #c03860; } .cd-flp .flip-card:nth-child(3) .card-name { color: #240a14; } .cd-flp .flip-card:nth-child(3) .card-divider { background: linear-gradient(to bottom, transparent, #c03860, transparent); } .cd-flp .flip-card:nth-child(3) .tag { background: rgba(192,56,96,0.1); color: #c03860; border: 1px solid rgba(192,56,96,0.25); } .cd-flp .flip-card:nth-child(3) .back-header { color: rgba(255,140,160,0.45); } .cd-flp .flip-card:nth-child(3) .back-bio { color: rgba(255,210,220,0.82); } .cd-flp .flip-card:nth-child(3) .back-divider { background: linear-gradient(90deg, transparent, rgba(192,56,96,0.4), transparent); } .cd-flp .flip-card:nth-child(3) .meta-row { color: rgba(255,140,160,0.65); } .cd-flp .flip-card:nth-child(3) .meta-icon { background: rgba(192,56,96,0.15); color: #ff6080; } .cd-flp .flip-card:nth-child(3) .back-cta { background: #c03860; color: #fff; } /* Card 4: sage */ .cd-flp .flip-card:nth-child(4) .front { background: linear-gradient(150deg, #eff5ee 0%, #e0f0dd 100%); } .cd-flp .flip-card:nth-child(4) .back { background: linear-gradient(148deg, #0e1e10 0%, #081408 100%); } .cd-flp .flip-card:nth-child(4) .avatar-bg { background: #c8e8c0; } .cd-flp .flip-card:nth-child(4) .avatar-head { background: #d4a870; } .cd-flp .flip-card:nth-child(4) .avatar-neck { background: #d4a870; } .cd-flp .flip-card:nth-child(4) .avatar-hair { background: #1c2808; } .cd-flp .flip-card:nth-child(4) .card-role { color: #2a8840; } .cd-flp .flip-card:nth-child(4) .card-name { color: #0e1e10; } .cd-flp .flip-card:nth-child(4) .card-divider { background: linear-gradient(to bottom, transparent, #2a8840, transparent); } .cd-flp .flip-card:nth-child(4) .tag { background: rgba(42,136,64,0.1); color: #2a8840; border: 1px solid rgba(42,136,64,0.25); } .cd-flp .flip-card:nth-child(4) .back-header { color: rgba(100,220,120,0.45); } .cd-flp .flip-card:nth-child(4) .back-bio { color: rgba(180,240,190,0.82); } .cd-flp .flip-card:nth-child(4) .back-divider { background: linear-gradient(90deg, transparent, rgba(42,136,64,0.4), transparent); } .cd-flp .flip-card:nth-child(4) .meta-row { color: rgba(100,220,120,0.65); } .cd-flp .flip-card:nth-child(4) .meta-icon { background: rgba(42,136,64,0.15); color: #50e070; } .cd-flp .flip-card:nth-child(4) .back-cta { background: #2a8840; color: #fff; } /* Staggered spin delays */ .cd-flp .flip-card:nth-child(1) { --cd-flp-spin-delay: 0s; } .cd-flp .flip-card:nth-child(2) { --cd-flp-spin-delay: -1.5s; } .cd-flp .flip-card:nth-child(3) { --cd-flp-spin-delay: -3s; } .cd-flp .flip-card:nth-child(4) { --cd-flp-spin-delay: -4.5s; } @media (max-width: 720px) { .cd-flp { min-height: 720px; } .cd-flp .grid { gap: 18px; } .cd-flp .flip-card { width: 200px; height: 280px; } } @media (prefers-reduced-motion: reduce) { .cd-flp .card-body, .cd-flp .front::before, .cd-flp .back::before { animation: none !important; transition: none !important; } } ``` **JS:** ```js (() => { const root = document.querySelector('.cd-flp'); if (!root) return; // Tap-to-flip on touch devices (hover already handled by CSS). root.querySelectorAll('[data-cd-flp-card]').forEach(card => { card.addEventListener('click', () => card.classList.toggle('flipped')); }); })(); ``` ### 02. Midnight Coverflow **Type:** CSS + JS **Description:** Seven cards arranged in a cylindrical coverflow perspective — the active card at full scale and brightness, flanking cards receding in angle, Z-depth, and brightness so the focused piece reads with cinematic clarity. Each card is a distinct dark ambient art piece built from layered radial gradients and decorative geometric blobs. A native -webkit-box-reflect floor reflection grounds the carousel, and users can navigate by arrows, dots, keyboard, or click-drag swipe. Space Grotesk + Unbounded. Best for portfolio galleries, media collections, hero sliders, editorial product reveals, music/film catalogs. **HTML:** ```html
001 — Spectra
Void
Protocol
Digital Exploration
002 — Azure
Meridian
Drift
Ocean Systems
003 — Ember
Solstice
Engine
Heat Architecture
004 — Canopy
Biolum
Forest
Living Systems
005 — Rosa
Ultraviolet
Bloom
Bio-Digital
006 — Sol
Photon
Archive
Light Research
007 — Abyss
Deep
Current
Oceanic Studies
``` **CSS:** ```css /* ─── 02 Midnight Coverflow — 7-card cylindrical carousel ──── */ @import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;700&family=Unbounded:wght@200;400;700&display=swap'); .cd-cvr { --cd-cvr-bg: #060508; position: relative; width: 100%; height: 640px; background: var(--cd-cvr-bg); font-family: 'Space Grotesk', system-ui, sans-serif; overflow: hidden; user-select: none; box-sizing: border-box; } .cd-cvr *, .cd-cvr *::before, .cd-cvr *::after { box-sizing: border-box; margin: 0; padding: 0; } .cd-cvr .card { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; } .cd-cvr .card::before { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse 90% 60% at 50% 40%, rgba(40,10,80,0.18) 0%, transparent 70%), radial-gradient(ellipse 60% 40% at 50% 90%, rgba(180,80,0,0.06) 0%, transparent 70%); pointer-events: none; } .cd-cvr .cvr-ground { position: absolute; bottom: 0; left: 0; right: 0; height: 45%; background: linear-gradient(to top, rgba(5,3,8,0.98) 0%, transparent 100%); pointer-events: none; z-index: 5; } .cd-cvr .viewport { perspective: 1000px; width: 100%; height: 420px; position: relative; z-index: 1; } .cd-cvr .stage { width: 100%; height: 420px; position: relative; transform-style: preserve-3d; } .cd-cvr .cf-card { width: 240px; height: 320px; position: absolute; left: 50%; top: 50%; margin-left: -120px; margin-top: -160px; border-radius: 18px; overflow: hidden; cursor: pointer; transform-style: preserve-3d; transition: transform 0.65s cubic-bezier(0.23, 1, 0.32, 1), opacity 0.65s ease, filter 0.65s ease; -webkit-box-reflect: below 8px linear-gradient(transparent 75%, rgba(5,3,8,0.55) 100%); } .cd-cvr .cf-card-inner { width: 100%; height: 100%; position: relative; overflow: hidden; border-radius: 18px; } .cd-cvr .card-art { width: 100%; height: 100%; position: relative; display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-end; padding: 22px; } .cd-cvr .card-art::before { content: ''; position: absolute; inset: 0; background: inherit; } .cd-cvr .card-title-sm { font-family: 'Space Grotesk', sans-serif; font-size: 9px; letter-spacing: 3px; text-transform: uppercase; margin-bottom: 5px; position: relative; z-index: 1; } .cd-cvr .card-title-lg { font-family: 'Unbounded', sans-serif; font-size: 16px; font-weight: 700; line-height: 1.25; position: relative; z-index: 1; } .cd-cvr .card-sub { font-family: 'Space Grotesk', sans-serif; font-size: 10px; margin-top: 5px; position: relative; z-index: 1; opacity: 0.65; } .cd-cvr .cf-card-inner::after { content: ''; position: absolute; inset: 0; background: linear-gradient(135deg, rgba(255,255,255,0.08) 0%, transparent 40%, rgba(0,0,0,0.2) 100%); pointer-events: none; } /* Per-card palettes */ .cd-cvr .cf-card[data-i="0"] .card-art { background: linear-gradient(148deg, #0d0020 0%, #2a0058 40%, #1a0040 100%); } .cd-cvr .cf-card[data-i="0"] .card-art::before { background: radial-gradient(ellipse 70% 60% at 70% 30%, rgba(120,60,255,0.4) 0%, transparent 70%); } .cd-cvr .cf-card[data-i="0"] .card-title-sm { color: rgba(180,140,255,0.7); } .cd-cvr .cf-card[data-i="0"] .card-title-lg { color: #e8d8ff; } .cd-cvr .cf-card[data-i="0"] .card-sub { color: rgba(180,140,255,0.5); } .cd-cvr .cf-card[data-i="1"] .card-art { background: linear-gradient(148deg, #001a20 0%, #003050 40%, #001828 100%); } .cd-cvr .cf-card[data-i="1"] .card-art::before { background: radial-gradient(ellipse 70% 60% at 30% 60%, rgba(0,180,255,0.35) 0%, transparent 70%); } .cd-cvr .cf-card[data-i="1"] .card-title-sm { color: rgba(80,200,255,0.7); } .cd-cvr .cf-card[data-i="1"] .card-title-lg { color: #c8f0ff; } .cd-cvr .cf-card[data-i="1"] .card-sub { color: rgba(80,200,255,0.5); } .cd-cvr .cf-card[data-i="2"] .card-art { background: linear-gradient(148deg, #100400 0%, #300e00 40%, #1e0800 100%); } .cd-cvr .cf-card[data-i="2"] .card-art::before { background: radial-gradient(ellipse 70% 60% at 60% 40%, rgba(255,100,0,0.4) 0%, transparent 70%); } .cd-cvr .cf-card[data-i="2"] .card-title-sm { color: rgba(255,160,80,0.7); } .cd-cvr .cf-card[data-i="2"] .card-title-lg { color: #ffe8c8; } .cd-cvr .cf-card[data-i="2"] .card-sub { color: rgba(255,160,80,0.5); } .cd-cvr .cf-card[data-i="3"] .card-art { background: linear-gradient(148deg, #001800 0%, #003000 40%, #001a00 100%); } .cd-cvr .cf-card[data-i="3"] .card-art::before { background: radial-gradient(ellipse 70% 60% at 50% 50%, rgba(0,220,80,0.35) 0%, transparent 70%); } .cd-cvr .cf-card[data-i="3"] .card-title-sm { color: rgba(80,220,120,0.7); } .cd-cvr .cf-card[data-i="3"] .card-title-lg { color: #c8ffe0; } .cd-cvr .cf-card[data-i="3"] .card-sub { color: rgba(80,220,120,0.5); } .cd-cvr .cf-card[data-i="4"] .card-art { background: linear-gradient(148deg, #1a0010 0%, #3a0028 40%, #220018 100%); } .cd-cvr .cf-card[data-i="4"] .card-art::before { background: radial-gradient(ellipse 70% 60% at 40% 35%, rgba(255,40,180,0.38) 0%, transparent 70%); } .cd-cvr .cf-card[data-i="4"] .card-title-sm { color: rgba(255,140,200,0.7); } .cd-cvr .cf-card[data-i="4"] .card-title-lg { color: #ffd8f0; } .cd-cvr .cf-card[data-i="4"] .card-sub { color: rgba(255,140,200,0.5); } .cd-cvr .cf-card[data-i="5"] .card-art { background: linear-gradient(148deg, #0a0a00 0%, #1e1e00 40%, #121200 100%); } .cd-cvr .cf-card[data-i="5"] .card-art::before { background: radial-gradient(ellipse 70% 60% at 60% 30%, rgba(220,220,0,0.35) 0%, transparent 70%); } .cd-cvr .cf-card[data-i="5"] .card-title-sm { color: rgba(220,220,80,0.7); } .cd-cvr .cf-card[data-i="5"] .card-title-lg { color: #fffff0; } .cd-cvr .cf-card[data-i="5"] .card-sub { color: rgba(220,220,80,0.5); } .cd-cvr .cf-card[data-i="6"] .card-art { background: linear-gradient(148deg, #000e18 0%, #001c30 40%, #001020 100%); } .cd-cvr .cf-card[data-i="6"] .card-art::before { background: radial-gradient(ellipse 70% 60% at 50% 60%, rgba(40,120,200,0.35) 0%, transparent 70%); } .cd-cvr .cf-card[data-i="6"] .card-title-sm { color: rgba(100,180,255,0.7); } .cd-cvr .cf-card[data-i="6"] .card-title-lg { color: #d8eeff; } .cd-cvr .cf-card[data-i="6"] .card-sub { color: rgba(100,180,255,0.5); } /* Decorative geo blobs */ .cd-cvr .geo { position: absolute; border-radius: 50%; opacity: 0.15; } .cd-cvr .geo-1a { width: 140px; height: 140px; background: #a060ff; top: -30px; right: -30px; } .cd-cvr .geo-1b { width: 70px; height: 70px; background: #6020ff; bottom: 40%; left: 20%; } .cd-cvr .geo-2a { width: 180px; height: 180px; background: #00aaff; top: -50px; left: -30px; } .cd-cvr .geo-2b { width: 55px; height: 55px; background: #00e8ff; bottom: 30%; right: 15%; } .cd-cvr .geo-3a { width: 110px; height: 110px; background: #ff6600; top: 20px; right: 20px; } .cd-cvr .geo-3b { width: 160px; height: 160px; background: #ff3300; bottom: -30px; left: -30px; } .cd-cvr .geo-4a { width: 130px; height: 130px; background: #00cc44; top: -20px; left: 50%; margin-left: -65px; } .cd-cvr .geo-4b { width: 80px; height: 80px; background: #00ff88; bottom: 20%; right: 10%; } .cd-cvr .geo-5a { width: 140px; height: 140px; background: #ff00cc; top: 10px; right: -30px; } .cd-cvr .geo-5b { width: 90px; height: 90px; background: #cc0088; bottom: 30%; left: 0%; } .cd-cvr .geo-6a { width: 180px; height: 180px; background: #dddd00; top: -40px; left: -20px; } .cd-cvr .geo-6b { width: 60px; height: 60px; background: #ffff40; bottom: 35%; right: 20%; } .cd-cvr .geo-7a { width: 120px; height: 120px; background: #1c78cc; top: 30px; left: 30px; } .cd-cvr .geo-7b { width: 100px; height: 100px; background: #3090e0; bottom: 20%; right: -10px; } /* Nav */ .cd-cvr .nav-dots { display: flex; gap: 8px; margin-top: 24px; position: relative; z-index: 10; } .cd-cvr .dot { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,0.2); cursor: pointer; border: none; padding: 0; transition: all 0.3s; } .cd-cvr .dot.active { width: 22px; border-radius: 3px; background: rgba(255,255,255,0.7); } .cd-cvr .arrows { position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%); display: flex; gap: 16px; z-index: 20; } .cd-cvr .arr { width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.12); background: rgba(255,255,255,0.04); color: rgba(255,255,255,0.6); font-size: 18px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.2s; backdrop-filter: blur(8px); font-family: sans-serif; } .cd-cvr .arr:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.25); color: #fff; transform: scale(1.08); } .cd-cvr .arr:active { transform: scale(0.96); } @media (max-width: 720px) { .cd-cvr { height: 560px; } .cd-cvr .cf-card { width: 200px; height: 268px; margin-left: -100px; margin-top: -134px; } } @media (prefers-reduced-motion: reduce) { .cd-cvr .cf-card { transition: none !important; } } ``` **JS:** ```js (() => { const root = document.querySelector('.cd-cvr'); if (!root) return; const stage = root.querySelector('[data-cd-cvr-stage]'); const dotsEl = root.querySelector('[data-cd-cvr-dots]'); const prevBtn = root.querySelector('[data-cd-cvr-prev]'); const nextBtn = root.querySelector('[data-cd-cvr-next]'); if (!stage || !dotsEl || !prevBtn || !nextBtn) return; const cards = Array.from(stage.querySelectorAll('.cf-card')); const N = cards.length; let current = Math.floor(N / 2); cards.forEach((_, i) => { const d = document.createElement('button'); d.type = 'button'; d.className = 'dot' + (i === current ? ' active' : ''); d.setAttribute('aria-label', `Go to slide ${i + 1}`); d.addEventListener('click', () => goTo(i)); dotsEl.appendChild(d); }); function updatePositions() { const ANGLE_STEP = 42; const Z_OFFSET = 80; const SCALE_FALLOFF = 0.12; cards.forEach((card, i) => { const offset = i - current; const absOff = Math.abs(offset); const angle = offset * ANGLE_STEP; const z = -absOff * Z_OFFSET; const scale = Math.max(0.45, 1 - absOff * SCALE_FALLOFF); const opacity = absOff > 3 ? 0 : Math.max(0.25, 1 - absOff * 0.22); const brightness = Math.max(0.35, 1 - absOff * 0.2); card.style.transform = `rotateY(${angle}deg) translateZ(${z}px) scale(${scale})`; card.style.opacity = opacity; card.style.filter = `brightness(${brightness})`; card.style.zIndex = 10 - absOff; card.style.pointerEvents = absOff <= 1 ? 'auto' : 'none'; }); Array.from(dotsEl.children).forEach((d, i) => { d.className = 'dot' + (i === current ? ' active' : ''); }); } function goTo(n) { current = Math.max(0, Math.min(N - 1, n)); updatePositions(); } prevBtn.addEventListener('click', () => goTo(current - 1)); nextBtn.addEventListener('click', () => goTo(current + 1)); cards.forEach((card, i) => { card.addEventListener('click', () => { if (i !== current) goTo(i); }); }); // Keyboard — only when wrapper has focus or pointer is inside it let pointerInside = false; root.addEventListener('mouseenter', () => { pointerInside = true; }); root.addEventListener('mouseleave', () => { pointerInside = false; }); document.addEventListener('keydown', e => { if (!pointerInside) return; if (e.key === 'ArrowLeft') { goTo(current - 1); e.preventDefault(); } if (e.key === 'ArrowRight') { goTo(current + 1); e.preventDefault(); } }); // Drag scoped to wrapper let dragStart = null; root.addEventListener('mousedown', e => { dragStart = e.clientX; }); root.addEventListener('mouseup', e => { if (dragStart === null) return; const dx = e.clientX - dragStart; if (Math.abs(dx) > 40) goTo(current + (dx < 0 ? 1 : -1)); dragStart = null; }); root.addEventListener('mouseleave', () => { dragStart = null; }); root.addEventListener('touchstart', e => { dragStart = e.touches[0].clientX; }, { passive: true }); root.addEventListener('touchend', e => { if (dragStart === null) return; const dx = e.changedTouches[0].clientX - dragStart; if (Math.abs(dx) > 40) goTo(current + (dx < 0 ? 1 : -1)); dragStart = null; }); updatePositions(); })(); ``` ### 03. Kinetic Tilt Cards **Type:** CSS + JS **Description:** Three pricing cards (Starter / Pro / Enterprise) that track individual mouse positions via smooth lerp animation loops — each card applies perspective + rotateX + rotateY relative to cursor, with a radial glare gradient following the hotspot. Parallax background and midground layers shift at different depths during the tilt to sell real volumetric depth, and the middle "Most Popular" card floats elevated to bias selection. Syne + Syne Mono. Best for pricing pages, premium product grids, SaaS upgrade flows, plan-comparison sections. **HTML:** ```html
Starter
$ 19 / mo

Everything you need to get off the ground fast, without compromise.

  • 3 active projects
  • 10k API calls / mo
  • Community support
  • Basic analytics
  • 1 team member
Enterprise
Custom

Tailored scale, SLA guarantees, and white-glove onboarding for your organization.

  • Unlimited everything
  • Dedicated infrastructure
  • 24/7 SLA support
  • SSO + SAML + SOC 2
  • Custom contracts
``` **CSS:** ```css /* ─── 03 Kinetic Tilt Cards — pricing tier showcase ────────── */ @import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;600;700;800&family=Syne+Mono&display=swap'); .cd-tlt { --cd-tlt-bg: #07080e; position: relative; width: 100%; min-height: 500px; background: var(--cd-tlt-bg); font-family: 'Syne', system-ui, sans-serif; overflow: hidden; box-sizing: border-box; } .cd-tlt *, .cd-tlt *::before, .cd-tlt *::after { box-sizing: border-box; margin: 0; padding: 0; } .cd-tlt .card { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 36px 24px; } .cd-tlt .card::before { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse 55% 45% at 20% 30%, rgba(20,80,180,0.09) 0%, transparent 70%), radial-gradient(ellipse 50% 40% at 80% 70%, rgba(80,20,160,0.09) 0%, transparent 70%), radial-gradient(ellipse 40% 30% at 50% 50%, rgba(0,200,180,0.04) 0%, transparent 70%); pointer-events: none; } .cd-tlt .tilt-grid { display: flex; gap: 28px; align-items: center; perspective: 2000px; position: relative; z-index: 1; flex-wrap: wrap; justify-content: center; } .cd-tlt .tcard { width: 244px; height: 340px; position: relative; cursor: pointer; transform-style: preserve-3d; transition: transform 0.08s linear; border-radius: 22px; } .cd-tlt .tcard-inner { position: absolute; inset: 0; border-radius: 22px; overflow: hidden; transform-style: preserve-3d; } .cd-tlt .tcard-body { position: absolute; inset: 0; border-radius: 22px; padding: 26px 22px; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; } .cd-tlt .glare { position: absolute; inset: 0; border-radius: 22px; pointer-events: none; z-index: 10; opacity: 0; transition: opacity 0.3s; } .cd-tlt .tcard:hover .glare { opacity: 1; } .cd-tlt .tcard-border { position: absolute; inset: 0; border-radius: 22px; border: 1px solid rgba(255,255,255,0); pointer-events: none; z-index: 5; transition: border-color 0.3s; } .cd-tlt .tcard:hover .tcard-border { border-color: rgba(255,255,255,0.1); } .cd-tlt .layer-bg { position: absolute; inset: 0; border-radius: 22px; transition: transform 0.08s linear; } .cd-tlt .layer-mid { position: absolute; pointer-events: none; transition: transform 0.08s linear; } .cd-tlt .layer-fg { position: relative; z-index: 3; } .cd-tlt .plan-badge { display: inline-block; padding: 5px 12px; border-radius: 4px; font-family: 'Syne Mono', monospace; font-size: 10px; letter-spacing: 2px; text-transform: uppercase; margin-bottom: 14px; width: fit-content; } .cd-tlt .price-wrap { margin-bottom: 18px; } .cd-tlt .price-currency { font-size: 13px; font-weight: 600; vertical-align: top; line-height: 2.4; } .cd-tlt .price-amount { font-size: 46px; font-weight: 800; line-height: 1; letter-spacing: -2px; } .cd-tlt .price-amount.custom { font-size: 32px; letter-spacing: -1px; } .cd-tlt .price-period { font-size: 12px; font-weight: 400; opacity: 0.55; margin-left: 2px; } .cd-tlt .plan-desc { font-size: 12px; font-weight: 400; opacity: 0.65; line-height: 1.6; margin-bottom: 20px; } .cd-tlt .features { list-style: none; display: flex; flex-direction: column; gap: 8px; flex: 1; } .cd-tlt .feature { font-size: 11px; font-weight: 500; display: flex; align-items: center; gap: 8px; opacity: 0.8; } .cd-tlt .feature::before { content: '◆'; font-size: 9px; opacity: 0.4; } .cd-tlt .plan-cta { display: block; width: 100%; padding: 12px; border-radius: 10px; font-family: 'Syne', sans-serif; font-size: 11px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; cursor: pointer; border: none; margin-top: 18px; transition: transform 0.15s, filter 0.15s; } .cd-tlt .plan-cta:hover { filter: brightness(1.12); transform: translateY(-1px); } .cd-tlt .plan-cta:active { transform: translateY(1px); } /* Card 1 — Starter / steel */ .cd-tlt .tcard:nth-child(1) .tcard-body { background: linear-gradient(145deg, #111420 0%, #0d1018 55%, #131722 100%); } .cd-tlt .tcard:nth-child(1) .layer-bg { background: radial-gradient(ellipse 80% 60% at 30% 20%, rgba(40,100,200,0.12) 0%, transparent 70%); } .cd-tlt .tcard:nth-child(1) .plan-badge { background: rgba(80,140,255,0.12); color: #5090ff; } .cd-tlt .tcard:nth-child(1) .price-currency, .cd-tlt .tcard:nth-child(1) .price-amount, .cd-tlt .tcard:nth-child(1) .price-period { color: #c8d8ff; } .cd-tlt .tcard:nth-child(1) .plan-desc { color: rgba(180,200,255,0.65); } .cd-tlt .tcard:nth-child(1) .feature { color: rgba(180,200,255,0.75); } .cd-tlt .tcard:nth-child(1) .plan-cta { background: rgba(80,140,255,0.15); color: #7090ff; border: 1px solid rgba(80,140,255,0.3); } .cd-tlt .tcard:nth-child(1) .layer-mid { width: 180px; height: 180px; border-radius: 50%; background: radial-gradient(circle, rgba(60,120,255,0.06) 0%, transparent 70%); border: 1px solid rgba(60,120,255,0.08); top: -40px; right: -40px; } /* Card 2 — Pro / featured */ .cd-tlt .tcard.featured .tcard-body { background: linear-gradient(145deg, #0e1f0e 0%, #0a1808 55%, #101f10 100%); } .cd-tlt .tcard.featured .layer-bg { background: radial-gradient(ellipse 80% 60% at 50% 25%, rgba(0,200,100,0.14) 0%, transparent 70%); } .cd-tlt .tcard.featured .plan-badge { background: rgba(0,200,100,0.12); color: #00d468; } .cd-tlt .tcard.featured .price-currency, .cd-tlt .tcard.featured .price-amount, .cd-tlt .tcard.featured .price-period { color: #c0ffd8; } .cd-tlt .tcard.featured .plan-desc { color: rgba(160,240,190,0.65); } .cd-tlt .tcard.featured .feature { color: rgba(160,240,190,0.75); } .cd-tlt .tcard.featured .plan-cta { background: #00c860; color: #001a0a; border: none; font-weight: 800; } .cd-tlt .tcard.featured { transform: translateY(-12px); box-shadow: 0 40px 80px rgba(0,200,80,0.08), 0 20px 40px rgba(0,0,0,0.6); } .cd-tlt .tcard.featured::after { content: 'MOST POPULAR'; position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: #00c860; color: #001a0a; font-family: 'Syne', sans-serif; font-size: 8px; font-weight: 800; letter-spacing: 2.5px; padding: 4px 12px; border-radius: 3px; z-index: 20; white-space: nowrap; } .cd-tlt .tcard.featured .layer-mid { width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(circle, rgba(0,200,100,0.07) 0%, transparent 70%); border: 1px solid rgba(0,200,100,0.1); top: -60px; right: -60px; } /* Card 3 — Enterprise */ .cd-tlt .tcard:nth-child(3) .tcard-body { background: linear-gradient(145deg, #1a0e1a 0%, #120a14 55%, #1c1020 100%); } .cd-tlt .tcard:nth-child(3) .layer-bg { background: radial-gradient(ellipse 80% 60% at 70% 30%, rgba(180,80,255,0.12) 0%, transparent 70%); } .cd-tlt .tcard:nth-child(3) .plan-badge { background: rgba(180,80,255,0.12); color: #c060ff; } .cd-tlt .tcard:nth-child(3) .price-currency, .cd-tlt .tcard:nth-child(3) .price-amount, .cd-tlt .tcard:nth-child(3) .price-period { color: #ecd8ff; } .cd-tlt .tcard:nth-child(3) .plan-desc { color: rgba(220,180,255,0.65); } .cd-tlt .tcard:nth-child(3) .feature { color: rgba(220,180,255,0.75); } .cd-tlt .tcard:nth-child(3) .plan-cta { background: rgba(180,80,255,0.15); color: #c080ff; border: 1px solid rgba(180,80,255,0.3); } .cd-tlt .tcard:nth-child(3) .layer-mid { width: 160px; height: 160px; border-radius: 50%; background: radial-gradient(circle, rgba(180,80,255,0.06) 0%, transparent 70%); border: 1px solid rgba(180,80,255,0.08); bottom: 10px; left: -30px; } @media (max-width: 720px) { .cd-tlt { min-height: 1100px; } .cd-tlt .tcard.featured { transform: translateY(0); } } @media (prefers-reduced-motion: reduce) { .cd-tlt .tcard, .cd-tlt .layer-bg, .cd-tlt .layer-mid { transition: none !important; transform: none !important; } } ``` **JS:** ```js (() => { const root = document.querySelector('.cd-tlt'); if (!root) return; const prefersReduced = window.matchMedia('(prefers-reduced-motion: reduce)').matches; if (prefersReduced) return; root.querySelectorAll('[data-cd-tlt-card]').forEach(card => { const maxTilt = parseFloat(card.dataset.max) || 16; const glare = card.querySelector('[data-cd-tlt-glare]'); const layerBg = card.querySelector('[data-cd-tlt-bg]'); const layerMid = card.querySelector('[data-cd-tlt-mid]'); const raised = card.dataset.raised === '1'; let animFrame = null; let targetRx = 0, targetRy = 0; let currentRx = 0, currentRy = 0; let active = false; function lerp(a, b, t) { return a + (b - a) * t; } function tick() { if (!active) { currentRx = lerp(currentRx, 0, 0.08); currentRy = lerp(currentRy, 0, 0.08); } else { currentRx = lerp(currentRx, targetRx, 0.12); currentRy = lerp(currentRy, targetRy, 0.12); } const baseY = raised ? -12 : 0; card.style.transform = `perspective(1000px) rotateX(${currentRx}deg) rotateY(${currentRy}deg) translateY(${baseY}px)`; if (layerBg) layerBg.style.transform = `translateX(${currentRy * 1.5}px) translateY(${-currentRx * 1.5}px)`; if (layerMid) layerMid.style.transform = `translateX(${currentRy * 3}px) translateY(${-currentRx * 3}px)`; if (active || Math.abs(currentRx) > 0.05 || Math.abs(currentRy) > 0.05) { animFrame = requestAnimationFrame(tick); } else { animFrame = null; } } card.addEventListener('mouseenter', () => { active = true; if (!animFrame) tick(); }); card.addEventListener('mousemove', e => { 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); targetRy = dx * maxTilt; targetRx = -dy * maxTilt; const glareX = ((e.clientX - rect.left) / rect.width) * 100; const glareY = ((e.clientY - rect.top) / rect.height) * 100; if (glare) glare.style.background = `radial-gradient(circle at ${glareX}% ${glareY}%, rgba(255,255,255,0.18) 0%, transparent 55%)`; }); card.addEventListener('mouseleave', () => { active = false; targetRx = 0; targetRy = 0; if (glare) glare.style.background = 'none'; if (!animFrame) tick(); }); }); })(); ``` ### 04. Page-Turn Flipbook **Type:** CSS + JS **Description:** A physical book with a dark leather cover, cream parchment spreads, and pages that arc through a real 0° → -180° rotateY transform with the hinge anchored at transform-origin: left center. Each spread carries genuine editorial typography — pull quotes, column rules, drop caps, colored section pages — and the gutter shadow on each face simulates the dip near the spine. Click the right half of the book to advance, the left half to go back, or use the keyboard arrows / nav buttons. Playfair Display + EB Garamond. Best for digital magazines, restaurant menus, lookbooks, interactive storytelling, brand annual reports. **HTML:** ```html
FORMA STUDIO
FORMAVol. VI
Design · Architecture · Thought
Chapter One
The Weight
of Silence

There is a moment before speech when the world holds its breath. Architecture inhabits this pause — not the buildings themselves, but the spaces they carve from air.

The corridor narrows, draws the eye forward. Light slants from an unseen source. To walk through is to be composed by the building.

1 I
Essay II
Form
Without
Apology

To design is to make a claim about the world as it should be — not as it is. The blueprint precedes the building, and in that gap lives everything called imagination.

2
Visual Field
"Growth is not linear. It is fractal — repeating at every scale."

The forest does not plan its canopy. Each tree reaches for light by the same simple rule: grow toward the sun. The emergent whole is unplanned and irreducible.

3
Interlude
Red
Notation

Color arrives before language. Red is felt in the chest before named by the tongue. The ancient painters knew this — their ochre hands pressed flat on cave walls were not decoration. They were declaration.

4
Final Study
Endings
as Form

Every designed thing must eventually end — the page turn, the last note, the exit from the building. The best designs make their endings feel inevitable, not arbitrary.

"The final line is the first thing written."
5
COLOPHON
FORMA
A Journal of Design Thought

Issue VI · Printed on FSC-certified stock · Typography set in Playfair Display and EB Garamond · All rights reserved ©

6
``` **CSS:** ```css /* ─── 04 Page-Turn Flipbook — editorial book ───────────────── */ @import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,700;0,900;1,400;1,700&family=EB+Garamond:ital,wght@0,400;0,500;1,400;1,500&display=swap'); .cd-flb { --cd-flb-bg: #1c1410; position: relative; width: 100%; min-height: 600px; background: var(--cd-flb-bg); font-family: 'EB Garamond', Georgia, serif; overflow: hidden; perspective: 2400px; box-sizing: border-box; } .cd-flb *, .cd-flb *::before, .cd-flb *::after { box-sizing: border-box; margin: 0; padding: 0; } .cd-flb .card { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 28px 16px; } .cd-flb .card::before { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse 60% 50% at 50% 40%, rgba(180,120,40,0.06) 0%, transparent 70%); pointer-events: none; } .cd-flb .book-scene { transform-style: preserve-3d; transform: rotateX(5deg) rotateY(-4deg); transition: transform 0.6s ease; position: relative; z-index: 1; } .cd-flb .book-scene:hover { transform: rotateX(4deg) rotateY(-2deg); } .cd-flb .book { width: 560px; height: 360px; position: relative; transform-style: preserve-3d; } .cd-flb .book::before { content: ''; position: absolute; left: 50%; top: 0; bottom: 0; width: 12px; transform: translateX(-50%) translateZ(1px); background: linear-gradient(to right, rgba(0,0,0,0.4) 0%, rgba(0,0,0,0.1) 30%, rgba(0,0,0,0.1) 70%, rgba(0,0,0,0.4) 100%); z-index: 20; pointer-events: none; } .cd-flb .page { position: absolute; width: 280px; height: 360px; top: 0; left: 280px; transform-origin: left center; transform-style: preserve-3d; transition: transform 1.1s cubic-bezier(0.645, 0.045, 0.355, 1); } .cd-flb .page.flipped { transform: rotateY(-180deg); } .cd-flb .page-front, .cd-flb .page-back { position: absolute; inset: 0; backface-visibility: hidden; overflow: hidden; } .cd-flb .page-back { transform: rotateY(180deg); } .cd-flb .left-cover { position: absolute; left: 0; top: 0; width: 280px; height: 360px; z-index: 0; border-radius: 4px 0 0 4px; overflow: hidden; } .cd-flb .pg { width: 100%; height: 100%; padding: 30px 26px; display: flex; flex-direction: column; position: relative; } .cd-flb .pg-warm { color: #2a1f14; } .cd-flb .pg-cool { color: #2a2432; } .cd-flb .pg-rose { color: #2a1418; } .cd-flb .pg-sage { color: #1a2a1e; } .cd-flb .pg-ink { color: #e8d8c0; } .cd-flb .pg-num { font-family: 'EB Garamond', serif; font-size: 10px; letter-spacing: 2px; position: absolute; bottom: 16px; } .cd-flb .pg-num.right { right: 22px; color: #8a6a4a; } .cd-flb .pg-num.left { left: 22px; color: #7a6898; } .cd-flb .pg-num.rose { color: #8a4050; } .cd-flb .pg-num.sage { color: #4a7a50; } .cd-flb .pg-num.ink { color: rgba(200,180,140,0.4); } .cd-flb .page-front::after, .cd-flb .page-back::after { content: ''; position: absolute; top: 0; bottom: 0; width: 40px; pointer-events: none; } .cd-flb .page-front::after { right: 0; background: linear-gradient(to right, transparent, rgba(0,0,0,0.14)); } .cd-flb .page-back::after { left: 0; background: linear-gradient(to left, transparent, rgba(0,0,0,0.14)); } .cd-flb .left-cover::after { content: ''; position: absolute; right: 0; top: 0; bottom: 0; width: 30px; background: linear-gradient(to right, transparent, rgba(0,0,0,0.2)); } .cd-flb .paper-warm { background: #f5ece0; } .cd-flb .paper-cool { background: #ede8f0; } .cd-flb .paper-rose { background: #f5e8e8; } .cd-flb .paper-sage { background: #e8f0e8; } .cd-flb .paper-ink { background: #1a1510; } .cd-flb .spread-label { font-family: 'EB Garamond', serif; font-size: 9px; letter-spacing: 4px; text-transform: uppercase; opacity: 0.4; margin-bottom: 16px; } .cd-flb .spread-title { font-family: 'Playfair Display', serif; font-weight: 900; line-height: 1.1; margin-bottom: 14px; } .cd-flb .spread-title.sm { font-size: 26px; } .cd-flb .spread-title.xs { font-size: 22px; } .cd-flb .spread-title.rose { color: #5a1828; } .cd-flb .spread-body { font-family: 'EB Garamond', serif; font-size: 13px; line-height: 1.78; opacity: 0.75; } .cd-flb .spread-body.mt { margin-top: 10px; } .cd-flb .spread-body.alt { color: #3a2a50; } .cd-flb .spread-body.rose-body { color: #3a1820; } .cd-flb .spread-body.sage-body { color: #2a3a26; } .cd-flb .spread-pullquote { font-family: 'Playfair Display', serif; font-style: italic; font-size: 16px; line-height: 1.5; border-left: 2px solid currentColor; padding-left: 14px; margin: 16px 0; opacity: 0.8; } .cd-flb .spread-pullquote.warm { border-color: #8a6a4a; color: #4a3424; } .cd-flb .spread-pullquote.sage { border-color: #3a6a40; color: #2a4a2e; } .cd-flb .spread-rule { width: 40px; height: 1px; background: currentColor; opacity: 0.3; margin: 14px 0; } .cd-flb .spread-rule.alt { background: #4a3868; } .cd-flb .spread-rule.rose { background: #8a3040; } .cd-flb .spread-img { width: 100%; height: 100px; border-radius: 4px; margin: 14px 0; overflow: hidden; flex-shrink: 0; } .cd-flb .sage-img { background: linear-gradient(135deg, #2a4a2e, #1a3020); display: flex; align-items: center; justify-content: center; } .cd-flb .circle-outer { width: 64px; height: 64px; border: 2px solid rgba(120,200,120,0.4); border-radius: 50%; display: flex; align-items: center; justify-content: center; } .cd-flb .circle-inner { width: 32px; height: 32px; background: rgba(120,200,120,0.2); border-radius: 50%; } .cd-flb .spread-big-num { font-family: 'Playfair Display', serif; font-size: 80px; font-weight: 900; line-height: 0.9; opacity: 0.07; position: absolute; right: 16px; bottom: 30px; } /* Cover art */ .cd-flb .cover-art { width: 100%; height: 100%; background: linear-gradient(148deg, #1a0f08, #0e0a06); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 26px; border-radius: 4px 0 0 4px; position: relative; overflow: hidden; } .cd-flb .cover-art::before { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse 70% 60% at 50% 40%, rgba(180,120,40,0.12) 0%, transparent 70%); } .cd-flb .cover-eyebrow { font-family: 'EB Garamond', serif; font-size: 9px; letter-spacing: 5px; color: rgba(200,160,80,0.55); margin-bottom: 26px; z-index: 1; } .cd-flb .cover-rule { width: 56px; height: 1px; background: rgba(200,160,80,0.35); margin: 0 0 26px; z-index: 1; } .cd-flb .cover-title { font-family: 'Playfair Display', serif; font-size: 34px; font-weight: 900; color: #f0e4cc; text-align: center; line-height: 1.1; z-index: 1; display: flex; flex-direction: column; align-items: center; } .cd-flb .cover-vol { font-style: italic; font-weight: 400; font-size: 20px; opacity: 0.7; margin-top: 6px; } .cd-flb .cover-rule:nth-of-type(2), .cd-flb .cover-title + .cover-rule { margin: 26px 0; } .cd-flb .cover-sub { font-family: 'EB Garamond', serif; font-style: italic; font-size: 11px; color: rgba(200,160,80,0.55); letter-spacing: 1px; z-index: 1; } .cd-flb .colophon-label { font-family: 'EB Garamond', serif; font-size: 9px; letter-spacing: 4px; opacity: 0.35; margin-bottom: 18px; } .cd-flb .colophon-title { font-family: 'Playfair Display', serif; font-size: 18px; font-weight: 700; opacity: 0.9; margin-bottom: 8px; } .cd-flb .colophon-sub { font-family: 'Playfair Display', serif; font-style: italic; font-size: 12px; opacity: 0.5; margin-bottom: 22px; } .cd-flb .colophon-body { font-family: 'EB Garamond', serif; font-size: 11px; line-height: 1.8; opacity: 0.45; } .cd-flb .nav { display: flex; align-items: center; gap: 18px; margin-top: 26px; position: relative; z-index: 100; } .cd-flb .nav-btn { display: flex; align-items: center; gap: 8px; font-family: 'EB Garamond', serif; font-size: 12px; letter-spacing: 2px; color: rgba(200,170,120,0.7); background: none; border: none; cursor: pointer; padding: 9px 18px; border-radius: 4px; transition: color 0.2s, background 0.2s; } .cd-flb .nav-btn:hover { color: rgba(220,190,140,1); background: rgba(200,170,120,0.08); } .cd-flb .nav-btn:disabled { opacity: 0.3; cursor: default; } .cd-flb .page-counter { font-family: 'EB Garamond', serif; font-size: 12px; color: rgba(200,170,120,0.45); letter-spacing: 2px; min-width: 80px; text-align: center; } .cd-flb .book-shadow { position: absolute; bottom: -18px; left: 10%; right: 10%; height: 28px; background: radial-gradient(ellipse at center, rgba(0,0,0,0.5) 0%, transparent 70%); filter: blur(12px); z-index: -1; } @media (max-width: 720px) { .cd-flb .book { width: 360px; height: 280px; } .cd-flb .page, .cd-flb .left-cover { width: 180px; height: 280px; } .cd-flb .page { left: 180px; } .cd-flb .pg { padding: 22px 18px; } .cd-flb .spread-title.sm { font-size: 20px; } .cd-flb .spread-title.xs { font-size: 18px; } .cd-flb .cover-title { font-size: 26px; } } @media (prefers-reduced-motion: reduce) { .cd-flb .book-scene, .cd-flb .page { transition: none !important; } } ``` **JS:** ```js (() => { const root = document.querySelector('.cd-flb'); if (!root) return; const book = root.querySelector('[data-cd-flb-book]'); const prevBtn = root.querySelector('[data-cd-flb-prev]'); const nextBtn = root.querySelector('[data-cd-flb-next]'); const counter = root.querySelector('[data-cd-flb-counter]'); if (!book || !prevBtn || !nextBtn || !counter) return; const pages = Array.from(root.querySelectorAll('.page[data-page]')); const TOTAL_SPREADS = pages.length + 1; let currentSpread = 0; function update() { pages.forEach((page, i) => { page.classList.toggle('flipped', i < currentSpread); page.style.zIndex = i < currentSpread ? i + 1 : pages.length - i + 4; }); counter.textContent = `Spread ${currentSpread + 1} of ${TOTAL_SPREADS}`; prevBtn.disabled = currentSpread === 0; nextBtn.disabled = currentSpread === TOTAL_SPREADS - 1; } prevBtn.addEventListener('click', () => { if (currentSpread > 0) { currentSpread--; update(); } }); nextBtn.addEventListener('click', () => { if (currentSpread < TOTAL_SPREADS - 1) { currentSpread++; update(); } }); // Click halves of the book to advance — scoped to the book itself book.addEventListener('click', e => { if (e.target.closest('.nav-btn')) return; const rect = book.getBoundingClientRect(); if (e.clientX > rect.left + rect.width / 2) { if (currentSpread < TOTAL_SPREADS - 1) { currentSpread++; update(); } } else { if (currentSpread > 0) { currentSpread--; update(); } } }); // Keyboard — only when pointer is inside the wrapper let pointerInside = false; root.addEventListener('mouseenter', () => { pointerInside = true; }); root.addEventListener('mouseleave', () => { pointerInside = false; }); document.addEventListener('keydown', e => { if (!pointerInside) return; if (e.key === 'ArrowRight') { nextBtn.click(); e.preventDefault(); } if (e.key === 'ArrowLeft') { prevBtn.click(); e.preventDefault(); } }); update(); })(); ``` ### 05. Bauhaus Cube Navigator **Type:** CSS + JS **Description:** A large drag-rotatable CSS 3D cube where each of the six genuine faces (built with translateZ + rotateX/Y) is a bold Bauhaus color block presenting a service category — Brand, Web, Motion, Space, Type, Print. Snap-to-face buttons below give precise navigation, an auto-rotate toggle keeps the cube turning slowly when idle, and both mouse and touch dragging let users orbit the cube freely. Bebas Neue + Space Grotesk. Best for product configurators, portfolio anchor sections, agency service navigators, interactive menus. **HTML:** ```html
01 Visual Identity
Brand
System
02 Digital Experience
Web
Design
03 Creative Strategy
Motion
Art
04 Environmental
Space
Design
05 Systems Thinking
Type
Craft
06 Material Culture
Print
Works
Auto-rotate
``` **CSS:** ```css /* ─── 05 Bauhaus Cube Navigator — drag-rotatable 3D cube ───── */ @import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Space+Grotesk:wght@300;400;500;600&display=swap'); .cd-bcb { --cd-bcb-bg: #f0ede8; position: relative; width: 100%; min-height: 620px; background: var(--cd-bcb-bg); font-family: 'Space Grotesk', system-ui, sans-serif; overflow: hidden; box-sizing: border-box; } .cd-bcb *, .cd-bcb *::before, .cd-bcb *::after { box-sizing: border-box; margin: 0; padding: 0; } .cd-bcb .card { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 32px 24px; } .cd-bcb .card::before { content: ''; position: absolute; inset: 0; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4'%3E%3Crect width='1' height='1' x='0' y='0' fill='%23000' opacity='0.04'/%3E%3C/svg%3E"); pointer-events: none; } .cd-bcb .scene { perspective: 1400px; width: 320px; height: 320px; margin-bottom: 36px; position: relative; z-index: 1; } .cd-bcb .cube { width: 280px; height: 280px; position: relative; transform-style: preserve-3d; transform: rotateX(-18deg) rotateY(22deg); transition: transform 0.85s cubic-bezier(0.23, 1, 0.32, 1); margin: 20px auto; will-change: transform; cursor: grab; } .cd-bcb .cube.dragging { cursor: grabbing; } .cd-bcb .face { position: absolute; width: 280px; height: 280px; display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-end; padding: 24px; overflow: hidden; backface-visibility: visible; } .cd-bcb .face-front { transform: translateZ(140px); } .cd-bcb .face-back { transform: rotateY(180deg) translateZ(140px); } .cd-bcb .face-left { transform: rotateY(-90deg) translateZ(140px); } .cd-bcb .face-right { transform: rotateY(90deg) translateZ(140px); } .cd-bcb .face-top { transform: rotateX(90deg) translateZ(140px); } .cd-bcb .face-bottom { transform: rotateX(-90deg) translateZ(140px); } .cd-bcb .face-front { background: #e63b2e; } .cd-bcb .face-back { background: #2952cc; } .cd-bcb .face-left { background: #f0a500; } .cd-bcb .face-right { background: #1a8a4a; } .cd-bcb .face-top { background: #111111; } .cd-bcb .face-bottom { background: #e8e2d8; } .cd-bcb .face-front::before { content: ''; position: absolute; top: -60px; right: -60px; width: 200px; height: 200px; border-radius: 50%; background: rgba(0,0,0,0.08); } .cd-bcb .face-back::before { content: ''; position: absolute; top: 20px; left: 20px; width: 0; height: 0; border-left: 110px solid transparent; border-right: 110px solid transparent; border-bottom: 180px solid rgba(255,255,255,0.06); } .cd-bcb .face-left::before { content: ''; position: absolute; inset: 20px; border: 2px solid rgba(0,0,0,0.1); } .cd-bcb .face-right::before { content: ''; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 140px; height: 140px; background: rgba(255,255,255,0.07); } .cd-bcb .face-top::before { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(45deg, rgba(255,255,255,0.03) 0, rgba(255,255,255,0.03) 1px, transparent 0, transparent 50%); background-size: 20px 20px; } .cd-bcb .face-bottom::before { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 30% 30%, rgba(0,0,0,0.04) 0%, transparent 70%); } .cd-bcb .face-label { font-family: 'Bebas Neue', sans-serif; font-size: 56px; letter-spacing: 2px; line-height: 0.9; position: relative; z-index: 1; } .cd-bcb .face-tag { font-family: 'Space Grotesk', sans-serif; font-size: 9px; letter-spacing: 3px; text-transform: uppercase; margin-bottom: 7px; position: relative; z-index: 1; opacity: 0.65; } .cd-bcb .face-num { font-family: 'Bebas Neue', sans-serif; font-size: 108px; position: absolute; top: -18px; right: 14px; opacity: 0.06; line-height: 1; letter-spacing: -4px; } .cd-bcb .face-front .face-label, .cd-bcb .face-front .face-tag, .cd-bcb .face-back .face-label, .cd-bcb .face-back .face-tag, .cd-bcb .face-right .face-label, .cd-bcb .face-right .face-tag, .cd-bcb .face-top .face-label, .cd-bcb .face-top .face-tag { color: #fff; } .cd-bcb .face-left .face-label, .cd-bcb .face-left .face-tag, .cd-bcb .face-bottom .face-label, .cd-bcb .face-bottom .face-tag { color: #1a1000; } .cd-bcb .face-bottom .face-label { color: #111; } .cd-bcb .face::after { content: ''; position: absolute; inset: 0; box-shadow: inset 0 0 0 1px rgba(0,0,0,0.08); pointer-events: none; } .cd-bcb .controls { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; max-width: 420px; position: relative; z-index: 1; } .cd-bcb .ctrl-btn { padding: 8px 16px 8px 22px; border: 2px solid #111; background: transparent; color: #111; font-family: 'Space Grotesk', sans-serif; font-size: 10px; font-weight: 600; letter-spacing: 2px; text-transform: uppercase; cursor: pointer; border-radius: 4px; transition: background 0.15s, color 0.15s; position: relative; } .cd-bcb .ctrl-btn::before { content: ''; position: absolute; left: 8px; top: 50%; transform: translateY(-50%); width: 6px; height: 6px; border-radius: 50%; background: var(--cd-bcb-color); } .cd-bcb .ctrl-btn:hover, .cd-bcb .ctrl-btn.active { background: #111; color: var(--cd-bcb-bg); } .cd-bcb .ctrl-btn[data-face="front"] { --cd-bcb-color: #e63b2e; } .cd-bcb .ctrl-btn[data-face="back"] { --cd-bcb-color: #2952cc; } .cd-bcb .ctrl-btn[data-face="left"] { --cd-bcb-color: #f0a500; } .cd-bcb .ctrl-btn[data-face="right"] { --cd-bcb-color: #1a8a4a; } .cd-bcb .ctrl-btn[data-face="top"] { --cd-bcb-color: #111111; } .cd-bcb .ctrl-btn[data-face="bottom"] { --cd-bcb-color: #999; border-color: #999; } .cd-bcb .auto-toggle { display: flex; align-items: center; gap: 10px; margin-top: 14px; font-size: 11px; letter-spacing: 2px; color: rgba(0,0,0,0.45); text-transform: uppercase; cursor: pointer; user-select: none; position: relative; z-index: 1; } .cd-bcb .toggle-track { width: 36px; height: 18px; background: rgba(0,0,0,0.15); border-radius: 9px; position: relative; transition: background 0.2s; } .cd-bcb .toggle-track.on { background: #111; } .cd-bcb .toggle-thumb { position: absolute; width: 12px; height: 12px; background: #fff; border-radius: 50%; top: 3px; left: 3px; transition: transform 0.2s; } .cd-bcb .toggle-track.on .toggle-thumb { transform: translateX(18px); } @media (max-width: 720px) { .cd-bcb .scene { width: 260px; height: 260px; } .cd-bcb .cube { width: 220px; height: 220px; } .cd-bcb .face { width: 220px; height: 220px; padding: 18px; } .cd-bcb .face-front { transform: translateZ(110px); } .cd-bcb .face-back { transform: rotateY(180deg) translateZ(110px); } .cd-bcb .face-left { transform: rotateY(-90deg) translateZ(110px); } .cd-bcb .face-right { transform: rotateY(90deg) translateZ(110px); } .cd-bcb .face-top { transform: rotateX(90deg) translateZ(110px); } .cd-bcb .face-bottom { transform: rotateX(-90deg) translateZ(110px); } .cd-bcb .face-label { font-size: 42px; } } @media (prefers-reduced-motion: reduce) { .cd-bcb .cube { transition: none !important; } } ``` **JS:** ```js (() => { const root = document.querySelector('.cd-bcb'); if (!root) return; const cube = root.querySelector('[data-cd-bcb-cube]'); const controls = root.querySelector('[data-cd-bcb-controls]'); const toggle = root.querySelector('[data-cd-bcb-autotoggle]'); const track = root.querySelector('[data-cd-bcb-autotrack]'); if (!cube || !controls || !toggle || !track) return; const btns = controls.querySelectorAll('.ctrl-btn'); let currentRx = -18, currentRy = 22; let autoRotate = false; let autoFrame = null; function setRotation(rx, ry) { currentRx = rx; currentRy = ry; cube.style.transform = `rotateX(${rx}deg) rotateY(${ry}deg)`; } btns.forEach(btn => { btn.addEventListener('click', () => { const rx = parseFloat(btn.dataset.rx); const ry = parseFloat(btn.dataset.ry); setRotation(rx, ry); btns.forEach(b => b.classList.remove('active')); btn.classList.add('active'); if (autoRotate) stopAuto(); }); }); function startAuto() { let start = null; const startRy = currentRy; function frame(ts) { if (!start) start = ts; const elapsed = ts - start; currentRy = startRy + elapsed * 0.04; cube.style.transform = `rotateX(${currentRx}deg) rotateY(${currentRy}deg)`; autoFrame = requestAnimationFrame(frame); } autoFrame = requestAnimationFrame(frame); } function stopAuto() { autoRotate = false; track.classList.remove('on'); if (autoFrame) { cancelAnimationFrame(autoFrame); autoFrame = null; } } toggle.addEventListener('click', () => { autoRotate = !autoRotate; track.classList.toggle('on', autoRotate); if (autoRotate) startAuto(); else stopAuto(); }); // Drag scoped to wrapper, not document let dragging = false, lastX = 0, lastY = 0; cube.addEventListener('mousedown', e => { dragging = true; cube.classList.add('dragging'); lastX = e.clientX; lastY = e.clientY; if (autoRotate) stopAuto(); e.preventDefault(); }); root.addEventListener('mousemove', e => { if (!dragging) return; currentRy += (e.clientX - lastX) * 0.5; currentRx -= (e.clientY - lastY) * 0.5; cube.style.transform = `rotateX(${currentRx}deg) rotateY(${currentRy}deg)`; lastX = e.clientX; lastY = e.clientY; }); function endDrag() { dragging = false; cube.classList.remove('dragging'); } root.addEventListener('mouseup', endDrag); root.addEventListener('mouseleave', endDrag); cube.addEventListener('touchstart', e => { dragging = true; lastX = e.touches[0].clientX; lastY = e.touches[0].clientY; if (autoRotate) stopAuto(); }, { passive: true }); root.addEventListener('touchmove', e => { if (!dragging) return; const t = e.touches[0]; currentRy += (t.clientX - lastX) * 0.5; currentRx -= (t.clientY - lastY) * 0.5; cube.style.transform = `rotateX(${currentRx}deg) rotateY(${currentRy}deg)`; lastX = t.clientX; lastY = t.clientY; }, { passive: true }); root.addEventListener('touchend', endDrag); })(); ``` ### 06. Modular Synth Controls **Type:** CSS + JS **Description:** A dark anodized panel with four interaction systems working simultaneously: push buttons with 3D translateY press travel and colored LED dots, toggle switches with a spring-overshoot thumb animation, six vertical faders with drag-to-set handles + fill bars + real-time value readouts, and dual VU meters with color-coded segments (cyan → amber → red) animating continuously. A readout bar at the top updates live as controls change. Share Tech Mono + Rajdhani. Best for audio production apps, game HUDs, creative dashboards, hardware-inspired control panels. **HTML:** ```html
Mode
STUDIO
Master
87
BPM
124
Status
LIVE
Mono
Reverb
EQ
Comp
Gate
``` **CSS:** ```css /* ─── 06 Modular Synth Controls — audio control panel ──────── */ @import url('https://fonts.googleapis.com/css2?family=Share+Tech+Mono&family=Rajdhani:wght@400;500;600;700&display=swap'); .cd-syn { --cd-syn-panel: #1a1c22; --cd-syn-inset: #14161b; --cd-syn-text-dim: rgba(120,140,180,0.4); --cd-syn-cyan: #00e8cc; --cd-syn-amber: #ffaa00; --cd-syn-red: #ff3840; --cd-syn-green: #00e060; --cd-syn-purple: #c060ff; --cd-syn-bg: #11131a; position: relative; width: 100%; min-height: 580px; background: var(--cd-syn-bg); font-family: 'Share Tech Mono', ui-monospace, monospace; overflow: hidden; box-sizing: border-box; } .cd-syn *, .cd-syn *::before, .cd-syn *::after { box-sizing: border-box; margin: 0; padding: 0; } .cd-syn .card { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 32px 16px; } .cd-syn .panel { width: 100%; max-width: 640px; background: var(--cd-syn-panel); border-radius: 16px; padding: 28px; box-shadow: 0 0 0 1px rgba(255,255,255,0.05), 0 2px 0 rgba(255,255,255,0.04), 0 4px 24px rgba(0,0,0,0.6), 0 1px 0 rgba(255,255,255,0.06) inset, 0 -1px 0 rgba(0,0,0,0.4) inset; position: relative; } .cd-syn .panel::before { content: ''; position: absolute; inset: 0; border-radius: 16px; background-image: repeating-linear-gradient(90deg, transparent 0px, transparent 2px, rgba(255,255,255,0.007) 2px, rgba(255,255,255,0.007) 3px); pointer-events: none; } .cd-syn .readout { background: var(--cd-syn-inset); border-radius: 8px; padding: 11px 16px; box-shadow: inset 0 2px 6px rgba(0,0,0,0.5); display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; gap: 8px; } .cd-syn .readout-item { text-align: center; } .cd-syn .readout-key { font-size: 7px; letter-spacing: 3px; color: var(--cd-syn-text-dim); text-transform: uppercase; margin-bottom: 3px; } .cd-syn .readout-val { font-family: 'Share Tech Mono', monospace; font-size: 13px; letter-spacing: 2px; color: var(--cd-syn-cyan); text-shadow: 0 0 10px rgba(0,232,204,0.5); } .cd-syn .readout-val.live { color: var(--cd-syn-green); text-shadow: 0 0 10px rgba(0,224,96,0.5); } .cd-syn .section { margin-bottom: 22px; } .cd-syn .section:last-child { margin-bottom: 0; } .cd-syn .section-label { font-family: 'Share Tech Mono', monospace; font-size: 9px; letter-spacing: 3px; color: var(--cd-syn-text-dim); text-transform: uppercase; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; } .cd-syn .section-label::after { content: ''; flex: 1; height: 1px; background: rgba(255,255,255,0.06); } .cd-syn .section-label.rl { margin-bottom: 10px; } .cd-syn .main-layout { display: flex; gap: 22px; align-items: flex-start; } .cd-syn .left-controls { flex: 1; } .cd-syn .right-controls { display: flex; flex-direction: column; gap: 4px; } /* Push buttons */ .cd-syn .btn-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; } .cd-syn .push-btn { position: relative; cursor: pointer; border: none; background: none; padding: 0; outline: none; } .cd-syn .push-btn-body { width: 72px; height: 50px; border-radius: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; position: relative; transition: transform 0.08s ease, box-shadow 0.08s ease; background: var(--cd-syn-btn-color); box-shadow: 0 6px 0 var(--cd-syn-btn-shadow), 0 7px 12px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.18), inset 0 -1px 0 rgba(0,0,0,0.3); } .cd-syn .push-btn:active .push-btn-body, .cd-syn .push-btn.pressed .push-btn-body { transform: translateY(4px); box-shadow: 0 2px 0 var(--cd-syn-btn-shadow), 0 3px 6px rgba(0,0,0,0.5), inset 0 2px 4px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.08); } .cd-syn .push-btn-label { font-family: 'Share Tech Mono', monospace; font-size: 8px; letter-spacing: 1.5px; color: rgba(255,255,255,0.85); text-transform: uppercase; } .cd-syn .btn-led { width: 6px; height: 6px; border-radius: 50%; background: rgba(0,0,0,0.4); transition: background 0.2s, box-shadow 0.2s; } .cd-syn .push-btn.active .btn-led { background: var(--cd-syn-led-color); box-shadow: 0 0 6px var(--cd-syn-led-color), 0 0 14px var(--cd-syn-led-color); } .cd-syn .push-btn:nth-child(1) { --cd-syn-btn-color: #1a2838; --cd-syn-btn-shadow: #0e1820; --cd-syn-led-color: #00e8cc; } .cd-syn .push-btn:nth-child(2) { --cd-syn-btn-color: #281a10; --cd-syn-btn-shadow: #180e08; --cd-syn-led-color: #ffaa00; } .cd-syn .push-btn:nth-child(3) { --cd-syn-btn-color: #281818; --cd-syn-btn-shadow: #180808; --cd-syn-led-color: #ff3840; } .cd-syn .push-btn:nth-child(4) { --cd-syn-btn-color: #182818; --cd-syn-btn-shadow: #081808; --cd-syn-led-color: #00e060; } .cd-syn .push-btn:nth-child(5) { --cd-syn-btn-color: #1e1a30; --cd-syn-btn-shadow: #100e20; --cd-syn-led-color: #c060ff; } /* Toggles */ .cd-syn .toggle-row { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; } .cd-syn .toggle-unit { display: flex; flex-direction: column; align-items: center; gap: 8px; } .cd-syn .toggle-label { font-size: 8px; letter-spacing: 2px; color: var(--cd-syn-text-dim); text-transform: uppercase; } .cd-syn .toggle-sw { position: relative; width: 60px; height: 28px; cursor: pointer; border-radius: 6px; background: var(--cd-syn-inset); border: none; padding: 3px; box-shadow: inset 0 2px 6px rgba(0,0,0,0.6), inset 0 1px 2px rgba(0,0,0,0.8), 0 1px 0 rgba(255,255,255,0.06); } .cd-syn .toggle-thumb { display: block; width: 26px; height: 22px; border-radius: 4px; background: linear-gradient(180deg, #2e3248 0%, #22263a 100%); box-shadow: 0 3px 0 #12141e, 0 4px 8px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.12); transition: transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1); } .cd-syn .toggle-sw.on .toggle-thumb { transform: translateX(28px); } .cd-syn .toggle-sw-led { position: absolute; width: 4px; height: 4px; border-radius: 50%; top: 50%; right: 7px; transform: translateY(-50%); background: rgba(0,0,0,0.5); transition: background 0.2s, box-shadow 0.2s; } .cd-syn .toggle-sw.on .toggle-sw-led { background: var(--led-col); box-shadow: 0 0 6px var(--led-col); } /* Faders */ .cd-syn .fader-row { display: flex; gap: 18px; align-items: flex-end; flex-wrap: wrap; } .cd-syn .fader-unit { display: flex; flex-direction: column; align-items: center; gap: 7px; } .cd-syn .fader-track-wrap { width: 28px; height: 120px; background: var(--cd-syn-inset); border-radius: 6px; box-shadow: inset 0 2px 6px rgba(0,0,0,0.6), inset 0 1px 3px rgba(0,0,0,0.8), 0 1px 0 rgba(255,255,255,0.05); position: relative; display: flex; align-items: center; justify-content: center; } .cd-syn .fader-track-wrap::before { content: ''; position: absolute; left: 4px; right: 4px; top: 10px; bottom: 10px; background: repeating-linear-gradient(to bottom, rgba(255,255,255,0.06) 0px, rgba(255,255,255,0.06) 1px, transparent 1px, transparent 10px); pointer-events: none; } .cd-syn .fader-thumb { width: 24px; height: 20px; border-radius: 4px; background: linear-gradient(180deg, #3a3f58 0%, #2a2e44 100%); box-shadow: 0 3px 0 #141620, 0 4px 8px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.15); position: absolute; cursor: ns-resize; user-select: none; touch-action: none; z-index: 2; } .cd-syn .fader-fill { position: absolute; bottom: 10px; left: 10px; right: 10px; border-radius: 2px; background: linear-gradient(to top, var(--cd-syn-fader-color), transparent); opacity: 0.5; pointer-events: none; } .cd-syn .fader-label { font-size: 8px; letter-spacing: 2px; color: var(--cd-syn-text-dim); text-transform: uppercase; } .cd-syn .fader-value { font-size: 10px; font-family: 'Share Tech Mono', monospace; letter-spacing: 1px; min-height: 16px; color: var(--cd-syn-fader-color); } /* VU */ .cd-syn .vu-row { display: flex; gap: 9px; align-items: flex-end; margin-left: 8px; } .cd-syn .vu-bar-wrap { display: flex; flex-direction: column; align-items: center; gap: 5px; } .cd-syn .vu-track { width: 13px; height: 120px; background: var(--cd-syn-inset); border-radius: 4px; box-shadow: inset 0 2px 5px rgba(0,0,0,0.6); display: flex; flex-direction: column-reverse; overflow: hidden; gap: 1px; padding: 3px; } .cd-syn .vu-seg { width: 100%; height: 7px; border-radius: 2px; background: var(--cd-syn-seg-color); opacity: 0.15; transition: opacity 0.08s; flex-shrink: 0; } .cd-syn .vu-seg.lit { opacity: 1; box-shadow: 0 0 6px var(--cd-syn-seg-color); } .cd-syn .vu-label { font-size: 8px; letter-spacing: 2px; color: var(--cd-syn-text-dim); text-transform: uppercase; } @media (max-width: 720px) { .cd-syn .main-layout { flex-direction: column; } .cd-syn .right-controls { width: 100%; } .cd-syn .vu-row { justify-content: flex-start; margin-left: 0; } } @media (prefers-reduced-motion: reduce) { .cd-syn .toggle-thumb { transition: none !important; } .cd-syn .vu-seg { transition: none !important; } } ``` **JS:** ```js (() => { const root = document.querySelector('.cd-syn'); if (!root) return; // Push buttons const modeReadout = root.querySelector('[data-cd-syn-mode]'); root.querySelectorAll('.push-btn').forEach(btn => { btn.addEventListener('click', () => { btn.classList.toggle('active'); const action = btn.dataset.action; const modes = { play: 'PLAY', rec: 'RECORD', stop: 'STOPPED', loop: 'LOOP', fx: 'FX ON' }; if (modes[action] && modeReadout) modeReadout.textContent = modes[action]; }); }); // Toggles root.querySelectorAll('.toggle-sw').forEach(sw => { sw.addEventListener('click', () => sw.classList.toggle('on')); }); // Faders const faderRow = root.querySelector('[data-cd-syn-faderrow]'); const masterReadout = root.querySelector('[data-cd-syn-master]'); const faderData = [ { label: 'CH.1', color: 'var(--cd-syn-cyan)', val: 87 }, { label: 'CH.2', color: 'var(--cd-syn-cyan)', val: 62 }, { label: 'CH.3', color: 'var(--cd-syn-amber)', val: 74 }, { label: 'CH.4', color: 'var(--cd-syn-amber)', val: 90 }, { label: 'SUB', color: 'var(--cd-syn-purple)', val: 55 }, { label: 'MST', color: 'var(--cd-syn-green)', val: 87 }, ]; const TRACK_H = 120, PADDING = 10, THUMB_H = 20; const TRAVEL = TRACK_H - PADDING * 2 - THUMB_H; faderData.forEach((fd, fi) => { const unit = document.createElement('div'); unit.className = 'fader-unit'; unit.innerHTML = `
${fd.val}
${fd.label}
`; faderRow.appendChild(unit); const thumb = unit.querySelector('.fader-thumb'); const fill = unit.querySelector('.fader-fill'); const valEl = unit.querySelector('.fader-value'); function setVal(v) { v = Math.max(0, Math.min(100, v)); fd.val = Math.round(v); const pct = v / 100; thumb.style.top = (PADDING + TRAVEL * (1 - pct)) + 'px'; fill.style.height = (TRAVEL * pct + THUMB_H / 2) + 'px'; valEl.textContent = fd.val; if (fi === 5 && masterReadout) masterReadout.textContent = fd.val; } setVal(fd.val); let dragging = false, startY = 0, startVal = 0; thumb.addEventListener('mousedown', e => { dragging = true; startY = e.clientY; startVal = fd.val; e.preventDefault(); }); root.addEventListener('mousemove', e => { if (!dragging) return; setVal(startVal + ((startY - e.clientY) / TRAVEL) * 100); }); root.addEventListener('mouseup', () => { dragging = false; }); root.addEventListener('mouseleave', () => { dragging = false; }); thumb.addEventListener('touchstart', e => { dragging = true; startY = e.touches[0].clientY; startVal = fd.val; }, { passive: true }); root.addEventListener('touchmove', e => { if (!dragging) return; setVal(startVal + ((startY - e.touches[0].clientY) / TRAVEL) * 100); }, { passive: true }); root.addEventListener('touchend', () => { dragging = false; }); }); // VU meters const vuRow = root.querySelector('[data-cd-syn-vurow]'); const vuData = [ { label: 'L', color: '#00e8cc' }, { label: 'R', color: '#00e8cc' }, ]; const N_SEGS = 12; const vuIntervals = []; vuData.forEach((vu, vi) => { const wrap = document.createElement('div'); wrap.className = 'vu-bar-wrap'; const track = document.createElement('div'); track.className = 'vu-track'; for (let s = 0; s < N_SEGS; s++) { const seg = document.createElement('div'); seg.className = 'vu-seg'; const segColor = s >= N_SEGS - 2 ? '#ff3840' : s >= N_SEGS - 4 ? '#ffaa00' : vu.color; seg.style.setProperty('--cd-syn-seg-color', segColor); track.appendChild(seg); } const lbl = document.createElement('div'); lbl.className = 'vu-label'; lbl.textContent = vu.label; wrap.appendChild(track); wrap.appendChild(lbl); vuRow.appendChild(wrap); const prefersReduced = window.matchMedia('(prefers-reduced-motion: reduce)').matches; if (prefersReduced) return; function animateVU() { const segs = track.querySelectorAll('.vu-seg'); const base = 6; const variation = Math.random() > 0.9 ? Math.floor(Math.random() * 3) : 0; const level = base + variation; segs.forEach((seg, si) => { seg.classList.toggle('lit', si < level); }); vuIntervals[vi] = setTimeout(animateVU, 80 + Math.random() * 60); } setTimeout(animateVU, vi * 40); }); // BPM blink const bpmReadout = root.querySelector('[data-cd-syn-bpm]'); if (bpmReadout) { setInterval(() => { bpmReadout.textContent = 124 + (Math.random() > 0.96 ? 1 : 0); }, 500); } })(); ``` ### 07. Obsidian Vault **Type:** CSS + JS **Description:** Three floating jewel product cards (Amethyst, Sapphire, Ruby) hover-flip in a dark atmospheric void with drifting gold-dust particles. Each card bobs at its own rhythm and reveals a back face with acquisition details on hover. The CSS gem itself is built from clip-path hexagons with gradient facets and a slow breathing glow. The whole scene tilts in 3D space following the cursor via smooth parallax interpolation. Cormorant Garamond + Cinzel. Best for luxury e-commerce, high-end jewelry brands, watchmaker product pages, premium collectible drops. **HTML:** ```html
Collection I
Amethyst
Nocturne
$ 4,200
Obsidian

A rare Zambian amethyst, set in cold-forged 18k white gold. Each stone selected for its violet depth and natural clarity.

Limited Edition · No. 12 of 30
Collection II
Sapphire
Meridian
$ 7,800
Obsidian

Ceylon blue sapphire, untreated and certified. Suspended in a hand-finished platinum bezel, worn by the extraordinarily few.

Limited Edition · No. 7 of 20
Collection III
Ruby
Solstice
$ 12,400
Obsidian

Burmese pigeon-blood ruby of extraordinary rarity. Each stone handpicked, individually documented, and signed by the master craftsman.

Singular Edition · No. 1 of 8
``` **CSS:** ```css /* ─── 01 Obsidian Vault — luxury product cards ─────────────── */ @import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,600;1,300;1,400&family=Cinzel:wght@400;600;700&display=swap'); .cd-obs { --cd-obs-bg: #060309; --cd-obs-gold: rgba(212, 168, 52, 0.85); position: relative; width: 100%; height: 560px; background: var(--cd-obs-bg); font-family: 'Cormorant Garamond', serif; overflow: hidden; perspective: 1600px; box-sizing: border-box; } .cd-obs *, .cd-obs *::before, .cd-obs *::after { box-sizing: border-box; margin: 0; padding: 0; } .cd-obs .card { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; } /* Atmospheric background — scoped to wrapper, not body */ .cd-obs .cd-obs-bg { position: absolute; inset: 0; pointer-events: none; } .cd-obs .cd-obs-bg::before { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse 55% 55% at 18% 38%, rgba(90, 25, 150, 0.18) 0%, transparent 65%), radial-gradient(ellipse 45% 45% at 82% 62%, rgba(170, 80, 15, 0.13) 0%, transparent 65%), radial-gradient(ellipse 35% 50% at 50% 85%, rgba(15, 50, 90, 0.10) 0%, transparent 70%); } .cd-obs .cd-obs-bg::after { 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='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='1'/%3E%3C/svg%3E"); opacity: 0.028; background-size: 300px 300px; } /* Floor reflection */ .cd-obs .cd-obs-floor { position: absolute; bottom: 0; left: 0; right: 0; height: 180px; background: linear-gradient(to top, rgba(212,168,52,0.04) 0%, transparent 100%); pointer-events: none; } /* Scene */ .cd-obs .scene { display: flex; gap: 30px; align-items: center; transform-style: preserve-3d; position: relative; z-index: 1; will-change: transform; } .cd-obs .obs-card { width: 196px; height: 288px; position: relative; transform-style: preserve-3d; cursor: pointer; transition: transform 1s cubic-bezier(0.175, 0.885, 0.32, 1.275); } .cd-obs .obs-card:nth-child(1) { animation: cd-obs-float-a 6.4s ease-in-out infinite; } .cd-obs .obs-card:nth-child(2) { animation: cd-obs-float-b 7.6s ease-in-out infinite -2.1s; } .cd-obs .obs-card:nth-child(3) { animation: cd-obs-float-c 5.8s ease-in-out infinite -1.4s; } @keyframes cd-obs-float-a { 0%,100%{transform:translateY(0) translateZ(0)} 50%{transform:translateY(-18px) translateZ(10px)} } @keyframes cd-obs-float-b { 0%,100%{transform:translateY(-8px) translateZ(0)} 50%{transform:translateY(-24px) translateZ(12px)} } @keyframes cd-obs-float-c { 0%,100%{transform:translateY(-4px) translateZ(0)} 50%{transform:translateY(-20px) translateZ(8px)} } .cd-obs .obs-card:hover { transform: rotateY(180deg) translateZ(30px) !important; animation-play-state: paused; } .cd-obs .face { position: absolute; inset: 0; border-radius: 20px; backface-visibility: hidden; overflow: hidden; } /* Front */ .cd-obs .front { display: flex; flex-direction: column; align-items: center; padding: 26px 20px 22px; background: linear-gradient(148deg, #140c20 0%, #0c091a 42%, #160c22 100%); border: 1px solid rgba(212, 168, 52, 0.22); box-shadow: 0 0 0 1px rgba(212,168,52,0.05), 0 50px 100px rgba(0,0,0,0.85), 0 25px 50px rgba(0,0,0,0.6), inset 0 1.5px 0 rgba(212,168,52,0.20), inset 0 -1px 0 rgba(0,0,0,0.5); } .cd-obs .front::before { content: ''; position: absolute; top: 0; left: 14%; right: 14%; height: 1px; background: linear-gradient(90deg, transparent, rgba(212,168,52,0.9), transparent); } .cd-obs .front::after { content: ''; position: absolute; inset: 0; border-radius: 20px; background: radial-gradient(ellipse 90% 55% at 50% 18%, rgba(212,168,52,0.08) 0%, transparent 60%); pointer-events: none; } .cd-obs .series-label { font-family: 'Cinzel', serif; font-size: 9px; letter-spacing: 4.5px; color: rgba(212,168,52,0.72); text-transform: uppercase; z-index: 1; } /* Gem */ .cd-obs .gem-stage { width: 88px; height: 100px; margin: 16px auto 12px; position: relative; z-index: 1; animation: cd-obs-gem-breathe 3.5s ease-in-out infinite; } @keyframes cd-obs-gem-breathe { 0%,100% { filter: drop-shadow(0 0 10px var(--glow)) drop-shadow(0 0 25px var(--glow)); transform: scale(1); } 50% { filter: drop-shadow(0 0 18px var(--glow)) drop-shadow(0 0 42px var(--glow)); transform: scale(1.04); } } .cd-obs .gem-body { width: 88px; height: 100px; background: linear-gradient(162deg, var(--g-light) 0%, var(--g-mid) 38%, var(--g-dark) 100%); clip-path: polygon(50% 0%, 88% 32%, 100% 56%, 50% 100%, 0% 56%, 12% 32%); position: relative; } .cd-obs .gem-body::before { content: ''; position: absolute; inset: 0; clip-path: polygon(50% 0%, 88% 32%, 100% 56%, 50% 100%, 0% 56%, 12% 32%); background: linear-gradient(42deg, transparent 28%, rgba(255,255,255,0.14) 46%, rgba(255,255,255,0.03) 56%, transparent 68%); animation: cd-obs-shimmer-a 4.2s ease-in-out infinite; } .cd-obs .gem-body::after { content: ''; position: absolute; inset: 0; clip-path: polygon(50% 0%, 88% 32%, 100% 56%, 50% 100%, 0% 56%, 12% 32%); background: linear-gradient(210deg, transparent 30%, rgba(255,255,255,0.08) 48%, transparent 62%); animation: cd-obs-shimmer-b 5.8s ease-in-out infinite; } @keyframes cd-obs-shimmer-a { 0%,100%{opacity:1} 50%{opacity:0.4} } @keyframes cd-obs-shimmer-b { 0%,100%{opacity:0.3} 50%{opacity:1} } .cd-obs .gem-table { position: absolute; top: 14%; left: 50%; transform: translateX(-50%); width: 44px; height: 14px; clip-path: polygon(50% 0%, 100% 100%, 0% 100%); background: linear-gradient(to bottom, rgba(255,255,255,0.35), rgba(255,255,255,0.08)); } .cd-obs .gem-crown-left, .cd-obs .gem-crown-right { position: absolute; top: 0; width: 0; height: 0; } .cd-obs .gem-crown-left { left: 12%; border-left: 10px solid transparent; border-right: 10px solid transparent; border-bottom: 22px solid rgba(255,255,255,0.09); } .cd-obs .gem-crown-right { right: 12%; border-left: 10px solid transparent; border-right: 10px solid transparent; border-bottom: 22px solid rgba(255,255,255,0.09); } .cd-obs .gem-name { font-family: 'Cormorant Garamond', serif; font-size: 22px; font-weight: 300; color: #ede4f8; text-align: center; line-height: 1.3; letter-spacing: 0.4px; z-index: 1; } .cd-obs .gem-divider { width: 38px; height: 1px; background: linear-gradient(90deg, transparent, rgba(212,168,52,0.75), transparent); margin: 12px 0 10px; z-index: 1; } .cd-obs .gem-price { font-family: 'Cinzel', serif; font-size: 12px; letter-spacing: 2.5px; color: rgba(232,208,135,0.88); z-index: 1; } .cd-obs .gem-dots { display: flex; gap: 5px; margin-top: 8px; z-index: 1; } .cd-obs .gem-dot { width: 4px; height: 4px; border-radius: 50%; background: rgba(212,168,52,0.5); } .cd-obs .gem-dot.active { background: rgba(212,168,52,0.95); box-shadow: 0 0 6px rgba(212,168,52,0.8); } /* Back */ .cd-obs .back { transform: rotateY(180deg); background: linear-gradient(152deg, #100c1e 0%, #0c0818 52%, #140a20 100%); border: 1px solid rgba(212,168,52,0.18); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 28px 24px; gap: 0; } .cd-obs .back::before { content: ''; position: absolute; inset: 10px; border: 1px solid rgba(212,168,52,0.09); border-radius: 12px; } .cd-obs .back-ornament { font-size: 8px; color: rgba(212,168,52,0.4); position: absolute; top: 20px; left: 24px; } .cd-obs .back-brand { font-family: 'Cinzel', serif; font-size: 9px; letter-spacing: 7px; color: rgba(212,168,52,0.62); margin-bottom: 20px; } .cd-obs .back-rule { width: 28px; height: 1px; background: rgba(212,168,52,0.35); margin-bottom: 20px; } .cd-obs .back-description { font-family: 'Cormorant Garamond', serif; font-size: 13.5px; font-weight: 300; font-style: italic; color: rgba(210,198,228,0.7); text-align: center; line-height: 1.82; margin-bottom: 22px; } .cd-obs .back-cta { padding: 9px 26px; border: 1px solid rgba(212,168,52,0.38); background: rgba(212,168,52,0.04); color: rgba(212,168,52,0.88); font-family: 'Cinzel', serif; font-size: 9px; letter-spacing: 4px; cursor: pointer; border-radius: 2px; transition: background 0.35s, border-color 0.35s; margin-bottom: 16px; } .cd-obs .back-cta:hover { background: rgba(212,168,52,0.10); border-color: rgba(212,168,52,0.6); } .cd-obs .back-sub { font-family: 'Cormorant Garamond', serif; font-size: 11px; color: rgba(180,170,200,0.4); letter-spacing: 1.5px; font-style: italic; } /* Particles — injected by JS, position:absolute inside wrapper */ .cd-obs .cd-obs-particle { position: absolute; border-radius: 50%; pointer-events: none; z-index: 0; animation: cd-obs-p-rise var(--pd) linear infinite var(--dl); } @keyframes cd-obs-p-rise { 0% { transform: translateY(20px) scale(0); opacity: 0; } 8% { opacity: var(--op); transform: translateY(0) scale(1); } 85% { opacity: calc(var(--op) * 0.4); } 100% { transform: translateY(-90px) scale(0.4); opacity: 0; } } @media (max-width: 720px) { .cd-obs { height: 640px; } .cd-obs .scene { flex-direction: column; gap: 18px; } .cd-obs .obs-card { width: 168px; height: 248px; } } @media (prefers-reduced-motion: reduce) { .cd-obs .obs-card, .cd-obs .gem-stage, .cd-obs .gem-body::before, .cd-obs .gem-body::after, .cd-obs .cd-obs-particle { animation: none !important; } .cd-obs .scene { transform: none !important; } } ``` **JS:** ```js (() => { const root = document.querySelector('.cd-obs'); if (!root) return; const scene = root.querySelector('[data-cd-obs-scene]'); if (!scene) return; // Particles — appended to wrapper, not document.body const prefersReduced = window.matchMedia('(prefers-reduced-motion: reduce)').matches; if (!prefersReduced) { for (let i = 0; i < 36; i++) { const p = document.createElement('div'); p.className = 'cd-obs-particle'; const sz = Math.random() * 2.2 + 0.4; p.style.cssText = ` width: ${sz}px; height: ${sz}px; left: ${Math.random() * 100}%; top: ${Math.random() * 100}%; background: rgba(212,168,52,${Math.random() * 0.5 + 0.1}); --pd: ${Math.random() * 12 + 8}s; --dl: ${-Math.random() * 20}s; --op: ${Math.random() * 0.55 + 0.1}; `; root.appendChild(p); } } // Mouse parallax scoped to the wrapper let tRx = 0, tRy = 0, cRx = 0, cRy = 0, rafId = null; root.addEventListener('mousemove', e => { const rect = root.getBoundingClientRect(); tRx = ((e.clientY - rect.top) / rect.height - 0.5) * 18; tRy = ((e.clientX - rect.left) / rect.width - 0.5) * 24; if (!rafId && !prefersReduced) rafId = requestAnimationFrame(animate); }); root.addEventListener('mouseleave', () => { tRx = 0; tRy = 0; }); function animate() { cRx += (tRx - cRx) * 0.06; cRy += (tRy - cRy) * 0.06; scene.style.transform = `rotateX(${cRx}deg) rotateY(${cRy}deg)`; if (Math.abs(tRx - cRx) > 0.05 || Math.abs(tRy - cRy) > 0.05) { rafId = requestAnimationFrame(animate); } else { rafId = null; } } })(); ``` ### 08. Neon Lattice **Type:** CSS + JS **Description:** A 5×5 matrix of genuine CSS 3D cubes, each with six correctly positioned faces using translateZ and rotateY, spinning at randomized axes and speeds. Rows pulse in distinct neon bands — cyan, magenta, lime, amber, rose — with glowing top caps that throw colored drop-shadows down through the lattice. A scrolling grid background and slow scanline reinforce the cyberpunk readout feel, and full mouse-tilt parallax rotates the entire matrix in 3D space. Pure transforms, no WebGL. Best for tech dashboards, cyberpunk loading screens, interactive brand heros, sci-fi product launches. **HTML:** ```html
``` **CSS:** ```css /* ─── 02 Neon Lattice — 5×5 spinning cube matrix ──────────── */ .cd-nln { --cd-nln-bg: #010208; position: relative; width: 100%; height: 560px; background: var(--cd-nln-bg); overflow: hidden; perspective: 1200px; box-sizing: border-box; } .cd-nln *, .cd-nln *::before, .cd-nln *::after { box-sizing: border-box; margin: 0; padding: 0; } .cd-nln .card { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; } .cd-nln .cd-nln-grid { position: absolute; inset: 0; background-image: linear-gradient(rgba(0,220,255,0.035) 1px, transparent 1px), linear-gradient(90deg, rgba(0,220,255,0.035) 1px, transparent 1px); background-size: 42px 42px; animation: cd-nln-grid-shift 30s linear infinite; pointer-events: none; } @keyframes cd-nln-grid-shift { from { background-position: 0 0; } to { background-position: 42px 42px; } } .cd-nln .cd-nln-vignette { position: absolute; inset: 0; background: radial-gradient(ellipse 75% 75% at 50% 50%, transparent 35%, rgba(1,2,8,0.94) 100%); pointer-events: none; } .cd-nln .cd-nln-scanline { position: absolute; left: 0; right: 0; height: 2px; background: rgba(0, 220, 255, 0.06); animation: cd-nln-scan 6s linear infinite; pointer-events: none; } @keyframes cd-nln-scan { from { top: -2px; } to { top: 100%; } } /* Matrix */ .cd-nln .matrix { display: grid; grid-template-columns: repeat(5, 72px); grid-template-rows: repeat(5, 72px); gap: 22px; transform-style: preserve-3d; transform: rotateX(22deg) rotateY(-18deg); transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1); position: relative; z-index: 1; } .cd-nln .cube-wrap { width: 72px; height: 72px; perspective: 600px; display: flex; align-items: center; justify-content: center; animation: cd-nln-glow-pulse var(--gp, 3s) ease-in-out infinite var(--gpd, 0s); } @keyframes cd-nln-glow-pulse { 0%,100% { opacity: 0.85; } 50% { opacity: 1; } } .cd-nln .cube { width: 52px; height: 52px; position: relative; transform-style: preserve-3d; animation: cd-nln-spin var(--sd) linear infinite var(--dl); } .cd-nln .f { position: absolute; width: 52px; height: 52px; border: 1px solid rgba(255,255,255,0.04); backface-visibility: visible; } .cd-nln .f-front { transform: translateZ(26px); } .cd-nln .f-back { transform: translateZ(-26px) rotateY(180deg); } .cd-nln .f-left { transform: translateX(-26px) rotateY(-90deg); } .cd-nln .f-right { transform: translateX(26px) rotateY(90deg); } .cd-nln .f-top { transform: translateY(-26px) rotateX(90deg); } .cd-nln .f-bottom { transform: translateY(26px) rotateX(-90deg); } /* Row 1 — Cyan */ .cd-nln .cube-wrap:nth-child(-n+5) .f-front { background: rgba(0,18,38,0.95); } .cd-nln .cube-wrap:nth-child(-n+5) .f-back { background: rgba(0,12,28,0.95); } .cd-nln .cube-wrap:nth-child(-n+5) .f-left { background: rgba(0,10,24,0.92); } .cd-nln .cube-wrap:nth-child(-n+5) .f-right { background: rgba(0,14,30,0.92); } .cd-nln .cube-wrap:nth-child(-n+5) .f-bottom { background: rgba(0,8,20,0.95); } .cd-nln .cube-wrap:nth-child(-n+5) .f-top { background: #00e8ff; box-shadow: 0 0 18px #00e8ff, 0 0 40px rgba(0,232,255,0.5); } .cd-nln .cube-wrap:nth-child(-n+5) { filter: drop-shadow(0 0 8px rgba(0,232,255,0.35)); } /* Row 2 — Magenta */ .cd-nln .cube-wrap:nth-child(n+6):nth-child(-n+10) .f-front { background: rgba(28,0,38,0.95); } .cd-nln .cube-wrap:nth-child(n+6):nth-child(-n+10) .f-back { background: rgba(20,0,28,0.95); } .cd-nln .cube-wrap:nth-child(n+6):nth-child(-n+10) .f-left { background: rgba(16,0,24,0.92); } .cd-nln .cube-wrap:nth-child(n+6):nth-child(-n+10) .f-right { background: rgba(22,0,32,0.92); } .cd-nln .cube-wrap:nth-child(n+6):nth-child(-n+10) .f-bottom { background: rgba(12,0,18,0.95); } .cd-nln .cube-wrap:nth-child(n+6):nth-child(-n+10) .f-top { background: #ff00ff; box-shadow: 0 0 18px #ff00ff, 0 0 40px rgba(255,0,255,0.5); } .cd-nln .cube-wrap:nth-child(n+6):nth-child(-n+10) { filter: drop-shadow(0 0 8px rgba(255,0,255,0.35)); } /* Row 3 — Lime */ .cd-nln .cube-wrap:nth-child(n+11):nth-child(-n+15) .f-front { background: rgba(0,22,8,0.95); } .cd-nln .cube-wrap:nth-child(n+11):nth-child(-n+15) .f-back { background: rgba(0,15,5,0.95); } .cd-nln .cube-wrap:nth-child(n+11):nth-child(-n+15) .f-left { background: rgba(0,12,4,0.92); } .cd-nln .cube-wrap:nth-child(n+11):nth-child(-n+15) .f-right { background: rgba(0,18,6,0.92); } .cd-nln .cube-wrap:nth-child(n+11):nth-child(-n+15) .f-bottom { background: rgba(0,10,3,0.95); } .cd-nln .cube-wrap:nth-child(n+11):nth-child(-n+15) .f-top { background: #00ff66; box-shadow: 0 0 18px #00ff66, 0 0 40px rgba(0,255,102,0.5); } .cd-nln .cube-wrap:nth-child(n+11):nth-child(-n+15) { filter: drop-shadow(0 0 8px rgba(0,255,102,0.35)); } /* Row 4 — Amber */ .cd-nln .cube-wrap:nth-child(n+16):nth-child(-n+20) .f-front { background: rgba(30,14,0,0.95); } .cd-nln .cube-wrap:nth-child(n+16):nth-child(-n+20) .f-back { background: rgba(22,10,0,0.95); } .cd-nln .cube-wrap:nth-child(n+16):nth-child(-n+20) .f-left { background: rgba(18,8,0,0.92); } .cd-nln .cube-wrap:nth-child(n+16):nth-child(-n+20) .f-right { background: rgba(24,12,0,0.92); } .cd-nln .cube-wrap:nth-child(n+16):nth-child(-n+20) .f-bottom { background: rgba(14,6,0,0.95); } .cd-nln .cube-wrap:nth-child(n+16):nth-child(-n+20) .f-top { background: #ffcc00; box-shadow: 0 0 18px #ffcc00, 0 0 40px rgba(255,204,0,0.5); } .cd-nln .cube-wrap:nth-child(n+16):nth-child(-n+20) { filter: drop-shadow(0 0 8px rgba(255,204,0,0.35)); } /* Row 5 — Rose */ .cd-nln .cube-wrap:nth-child(n+21) .f-front { background: rgba(32,0,12,0.95); } .cd-nln .cube-wrap:nth-child(n+21) .f-back { background: rgba(22,0,8,0.95); } .cd-nln .cube-wrap:nth-child(n+21) .f-left { background: rgba(18,0,6,0.92); } .cd-nln .cube-wrap:nth-child(n+21) .f-right { background: rgba(26,0,10,0.92); } .cd-nln .cube-wrap:nth-child(n+21) .f-bottom { background: rgba(12,0,4,0.95); } .cd-nln .cube-wrap:nth-child(n+21) .f-top { background: #ff3080; box-shadow: 0 0 18px #ff3080, 0 0 40px rgba(255,48,128,0.5); } .cd-nln .cube-wrap:nth-child(n+21) { filter: drop-shadow(0 0 8px rgba(255,48,128,0.35)); } @keyframes cd-nln-spin { from { transform: rotateX(var(--rx-start,0deg)) rotateY(var(--ry-start,0deg)) rotateZ(0deg); } to { transform: rotateX(var(--rx-end,360deg)) rotateY(var(--ry-end,360deg)) rotateZ(var(--rz-end,0deg)); } } @media (max-width: 720px) { .cd-nln .matrix { grid-template-columns: repeat(5, 52px); grid-template-rows: repeat(5, 52px); gap: 16px; } .cd-nln .cube-wrap { width: 52px; height: 52px; } .cd-nln .cube, .cd-nln .f { width: 40px; height: 40px; } .cd-nln .f-front { transform: translateZ(20px); } .cd-nln .f-back { transform: translateZ(-20px) rotateY(180deg); } .cd-nln .f-left { transform: translateX(-20px) rotateY(-90deg); } .cd-nln .f-right { transform: translateX(20px) rotateY(90deg); } .cd-nln .f-top { transform: translateY(-20px) rotateX(90deg); } .cd-nln .f-bottom { transform: translateY(20px) rotateX(-90deg); } } @media (prefers-reduced-motion: reduce) { .cd-nln .cd-nln-grid, .cd-nln .cd-nln-scanline, .cd-nln .cube-wrap, .cd-nln .cube { animation: none !important; } } ``` **JS:** ```js (() => { const root = document.querySelector('.cd-nln'); if (!root) return; const matrix = root.querySelector('[data-cd-nln-matrix]'); if (!matrix) return; // Build cubes const axes = [ [360, 360, 0], [360, 0, 0], [0, 360, 0], [0, 0, 360], [360, 360, 360], [-360, 360, 0], [360, -360, 0], ]; for (let i = 0; i < 25; i++) { const ax = axes[Math.floor(Math.random() * axes.length)]; const sd = (Math.random() * 8 + 3).toFixed(1) + 's'; const dl = (-Math.random() * 12).toFixed(2) + 's'; const gp = (Math.random() * 3 + 2).toFixed(1) + 's'; const gpd = (-Math.random() * 5).toFixed(2) + 's'; const rxStart = Math.random() * 360; const ryStart = Math.random() * 360; const wrap = document.createElement('div'); wrap.className = 'cube-wrap'; wrap.style.cssText = `--gp:${gp}; --gpd:${gpd};`; const cube = document.createElement('div'); cube.className = 'cube'; cube.style.cssText = ` --sd:${sd}; --dl:${dl}; --rx-start:${rxStart}deg; --ry-start:${ryStart}deg; --rx-end:${rxStart + ax[0]}deg; --ry-end:${ryStart + ax[1]}deg; --rz-end:${ax[2]}deg; `; cube.innerHTML = '
'; wrap.appendChild(cube); matrix.appendChild(wrap); } // Mouse parallax scoped to wrapper const prefersReduced = window.matchMedia('(prefers-reduced-motion: reduce)').matches; if (prefersReduced) return; let tx = 22, ty = -18, cx = 22, cy = -18, rafId = null; root.addEventListener('mousemove', e => { const rect = root.getBoundingClientRect(); tx = 22 + ((e.clientY - rect.top) / rect.height - 0.5) * 25; ty = -18 + ((e.clientX - rect.left) / rect.width - 0.5) * 30; if (!rafId) rafId = requestAnimationFrame(animate); }); root.addEventListener('mouseleave', () => { tx = 22; ty = -18; }); function animate() { cx += (tx - cx) * 0.055; cy += (ty - cy) * 0.055; matrix.style.transform = `rotateX(${cx}deg) rotateY(${cy}deg)`; if (Math.abs(tx - cx) > 0.05 || Math.abs(ty - cy) > 0.05) { rafId = requestAnimationFrame(animate); } else { rafId = null; } } })(); ``` ### 09. Chromatic Helix **Type:** CSS + JS **Description:** A full 3D DNA-style double helix of 60 glowing CSS orbs (30 per strand), mathematically positioned along sinusoidal spiral paths using translate3d. Strand 1 bleeds through warm sunset tones (red → amber → lime); strand 2 through cool space tones (cyan → violet → rose). Connecting rungs bridge the two strands at every other level. A starfield canvas twinkles behind a soft nebula gradient, the helix auto-rotates at a steady cadence, and click-drag scrubs the rotation forward or backward. Best for scientific/biotech visualization, decorative data art, cinematic preloaders, immersive product reveal sections. **HTML:** ```html
``` **CSS:** ```css /* ─── 03 Chromatic Helix — 3D DNA double helix ─────────────── */ .cd-chx { --cd-chx-bg: #010209; position: relative; width: 100%; height: 620px; background: var(--cd-chx-bg); overflow: hidden; perspective: 900px; box-sizing: border-box; } .cd-chx *, .cd-chx *::before, .cd-chx *::after { box-sizing: border-box; margin: 0; padding: 0; } .cd-chx .card { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; } .cd-chx .cd-chx-nebula { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse 60% 40% at 25% 30%, rgba(60, 10, 120, 0.16) 0%, transparent 70%), radial-gradient(ellipse 50% 35% at 75% 70%, rgba(10, 60, 120, 0.12) 0%, transparent 70%), radial-gradient(ellipse 40% 30% at 50% 50%, rgba(90, 15, 60, 0.08) 0%, transparent 70%); } .cd-chx .cd-chx-stars { position: absolute; inset: 0; pointer-events: none; } /* Scene */ .cd-chx .scene { position: relative; width: 360px; height: 520px; transform-style: preserve-3d; animation: cd-chx-scene-rotate 18s linear infinite; cursor: grab; } .cd-chx .scene.dragging { cursor: grabbing; } @keyframes cd-chx-scene-rotate { from { transform: rotateY(0deg) rotateX(8deg); } to { transform: rotateY(360deg) rotateX(8deg); } } .cd-chx .orb { position: absolute; border-radius: 50%; transform-style: preserve-3d; will-change: transform; } .cd-chx .rung { position: absolute; height: 1px; transform-origin: left center; pointer-events: none; } .cd-chx .axis { position: absolute; left: 50%; top: 0; bottom: 0; width: 1px; background: linear-gradient(to bottom, transparent 0%, rgba(180, 100, 255, 0.15) 15%, rgba(180, 100, 255, 0.25) 50%, rgba(180, 100, 255, 0.15) 85%, transparent 100% ); transform: translateX(-50%) translateZ(0px); pointer-events: none; } /* Data readout */ .cd-chx .data-readout { position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%); display: flex; gap: 32px; pointer-events: none; z-index: 10; } .cd-chx .data-item { text-align: center; font-family: 'Courier New', ui-monospace, monospace; font-size: 10px; letter-spacing: 2px; color: rgba(180, 140, 255, 0.45); } .cd-chx .data-val { display: block; font-size: 16px; font-weight: bold; color: rgba(200, 160, 255, 0.7); margin-bottom: 2px; } @media (max-width: 720px) { .cd-chx { height: 560px; } .cd-chx .scene { width: 280px; height: 460px; } } @media (prefers-reduced-motion: reduce) { .cd-chx .scene { animation: none !important; } } ``` **JS:** ```js (() => { const root = document.querySelector('.cd-chx'); if (!root) return; const scene = root.querySelector('[data-cd-chx-scene]'); const canvas = root.querySelector('[data-cd-chx-stars]'); if (!scene || !canvas) return; const prefersReduced = window.matchMedia('(prefers-reduced-motion: reduce)').matches; // Stars — sized to the wrapper, not the viewport function resizeCanvas() { const rect = root.getBoundingClientRect(); canvas.width = rect.width; canvas.height = rect.height; } resizeCanvas(); const resizeObs = new ResizeObserver(resizeCanvas); resizeObs.observe(root); const ctx = canvas.getContext('2d'); const stars = Array.from({ length: 160 }, () => ({ x: Math.random() * canvas.width, y: Math.random() * canvas.height, r: Math.random() * 1.2 + 0.2, a: Math.random() * 0.7 + 0.1, twinkle: Math.random() * Math.PI * 2, speed: Math.random() * 0.02 + 0.005, })); function drawStars(t) { ctx.clearRect(0, 0, canvas.width, canvas.height); stars.forEach(s => { const alpha = s.a * (0.6 + 0.4 * Math.sin(t * s.speed + s.twinkle)); ctx.beginPath(); ctx.arc(s.x, s.y, s.r, 0, Math.PI * 2); ctx.fillStyle = `rgba(220, 210, 255, ${alpha})`; ctx.fill(); }); if (!prefersReduced) requestAnimationFrame(drawStars); } drawStars(0); // Helix const N = 30; const TURNS = 4; const RADIUS = 110; const HEIGHT = 480; const ORB_SIZE = 16; const palette1 = [ [255, 100, 60], [255, 150, 40], [255, 200, 30], [220, 240, 50], [140, 240, 100], ]; const palette2 = [ [60, 220, 255], [80, 160, 255], [120, 90, 255], [200, 70, 255], [255, 80, 200], ]; function lerpColor(p, t) { const seg = (p.length - 1) * t; const i = Math.min(Math.floor(seg), p.length - 2); const f = seg - i; return p[i].map((v, k) => Math.round(v + (p[i + 1][k] - v) * f)); } function makeOrb(x, y, z, color, size, glowIntensity) { const [r, g, b] = color; const orb = document.createElement('div'); orb.className = 'orb'; const s = size || ORB_SIZE; orb.style.cssText = ` width: ${s}px; height: ${s}px; left: calc(50% + ${x}px - ${s / 2}px); top: calc(50% + ${y}px - ${s / 2}px); transform: translateZ(${z}px); background: radial-gradient(circle at 35% 35%, rgba(${r},${g},${b}, 0.95) 0%, rgba(${r},${g},${b}, 0.75) 35%, rgba(${Math.max(0, r - 60)},${Math.max(0, g - 60)},${Math.max(0, b - 60)}, 0.5) 70%, transparent 100% ); box-shadow: 0 0 ${glowIntensity * 0.6}px rgba(${r},${g},${b},0.9), 0 0 ${glowIntensity * 1.2}px rgba(${r},${g},${b},0.55), 0 0 ${glowIntensity * 2}px rgba(${r},${g},${b},0.25), inset 0 0 ${s * 0.4}px rgba(255,255,255,0.25); `; return orb; } function makeRung(x1, y1, z1, x2, y2, z2, color1, color2) { const [r1, g1, b1] = color1; const [r2, g2, b2] = color2; const dx = x2 - x1; const dz = z2 - z1; const length = Math.sqrt(dx * dx + dz * dz); const angleY = Math.atan2(dx, dz) * (180 / Math.PI); const rung = document.createElement('div'); rung.className = 'rung'; rung.style.cssText = ` width: ${length}px; left: calc(50% + ${x1}px); top: calc(50% + ${y1}px); transform: translateZ(${z1}px) rotateY(${angleY}deg); transform-origin: 0 0; background: linear-gradient(90deg, rgba(${r1},${g1},${b1},0.55), rgba(${Math.round((r1 + r2) / 2)},${Math.round((g1 + g2) / 2)},${Math.round((b1 + b2) / 2)},0.25), rgba(${r2},${g2},${b2},0.55) ); `; return rung; } const yOffset = -HEIGHT / 2; for (let i = 0; i < N; i++) { const t = i / (N - 1); const angle = t * TURNS * Math.PI * 2; const y = yOffset + t * HEIGHT; const x1 = Math.cos(angle) * RADIUS; const z1 = Math.sin(angle) * RADIUS; const c1 = lerpColor(palette1, t); const x2 = Math.cos(angle + Math.PI) * RADIUS; const z2 = Math.sin(angle + Math.PI) * RADIUS; const c2 = lerpColor(palette2, t); const sz1 = ORB_SIZE + Math.sin(t * Math.PI * 3) * 3; const sz2 = ORB_SIZE + Math.cos(t * Math.PI * 3) * 3; scene.appendChild(makeOrb(x1, y, z1, c1, sz1, 22)); scene.appendChild(makeOrb(x2, y, z2, c2, sz2, 22)); if (i % 2 === 0) { scene.appendChild(makeRung(x1, y, z1, x2, y, z2, c1, c2)); } } // Drag-to-scrub rotation — scoped to wrapper if (prefersReduced) return; let userRY = 0, dragging = false, lastX = 0, autoAngle = 0; scene.addEventListener('mousedown', e => { dragging = true; lastX = e.clientX; scene.classList.add('dragging'); e.preventDefault(); }); document.addEventListener('mouseup', () => { dragging = false; scene.classList.remove('dragging'); }); document.addEventListener('mousemove', e => { if (!dragging) return; userRY += (e.clientX - lastX) * 0.4; lastX = e.clientX; }); function rotateTick() { autoAngle += 0.18; scene.style.transform = `rotateY(${autoAngle + userRY}deg) rotateX(8deg)`; scene.style.animation = 'none'; requestAnimationFrame(rotateTick); } rotateTick(); })(); ``` --- ## 26 CSS Accordions — Vertical & Horizontal URL: https://codefronts.com/navigation/css-accordions/ Description: 26 free CSS accordions — 17 vertical and 9 horizontal layouts with copy-paste HTML and CSS. Demo count: 26 ### 01. Underline Reveal **Type:** Pure CSS **Description:** Vertical accordion with a left-anchored underline that grows across the open trigger. **HTML:** ```html
What is CodeFronts?

A library of hand-crafted CSS components, generators and tools for developers who care about craft.

Is everything free?

Yes — MIT licensed for personal and commercial projects, no attribution required.

Does it use any frameworks?

No frameworks, no dependencies. Vanilla HTML, CSS and a tiny bit of JS where needed.

``` **CSS:** ```css .acc-uline { border-bottom: 1px solid rgba(156,123,214,0.18); } .acc-uline summary { position: relative; cursor: pointer; list-style: none; padding: 14px 0; font: 600 13px/1.4 system-ui, sans-serif; color: rgba(240,238,255,0.62); transition: color .25s; } .acc-uline summary::-webkit-details-marker { display: none; } .acc-uline summary::after { content: ''; position: absolute; left: 0; bottom: -1px; height: 2px; width: 0; background: linear-gradient(90deg, #9c7bd6, #d49a5c); transition: width .4s cubic-bezier(.2,.9,.3,1); } .acc-uline[open] summary { color: #f0eeff; } .acc-uline[open] summary::after { width: 100%; } .acc-uline p { margin: 0; padding: 10px 0 16px; font: 12px/1.6 system-ui, sans-serif; color: rgba(240,238,255,0.55); } ``` ### 02. Numbered Steps **Type:** Pure CSS **Description:** Each row is a numbered step with a circular badge that fills amethyst when expanded. **HTML:** ```html
1 Install the package

Add the library to your project with one command — no build step required.

2 Import a component

Pull in only the components you need. Tree-shakable and zero runtime overhead.

3 Customize with tokens

Override CSS custom properties to match your brand colors and spacing scale.

``` **CSS:** ```css .acc-step { margin-bottom: 8px; } .acc-step summary { display: flex; align-items: center; gap: 12px; cursor: pointer; list-style: none; padding: 12px 14px; border-radius: 10px; background: rgba(156,123,214,0.06); font: 600 13px/1.3 system-ui, sans-serif; color: rgba(240,238,255,0.75); transition: background .2s; } .acc-step summary::-webkit-details-marker { display: none; } .acc-step__n { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid rgba(156,123,214,0.5); font: 700 11px monospace; color: rgba(240,238,255,0.7); transition: all .25s; } .acc-step[open] > summary { background: rgba(156,123,214,0.16); color: #f0eeff; } .acc-step[open] .acc-step__n { background: #9c7bd6; color: #fff; border-color: #9c7bd6; } .acc-step p { margin: 8px 0 0; padding: 0 14px 12px 48px; font: 12px/1.6 system-ui, sans-serif; color: rgba(240,238,255,0.55); } ``` ### 03. Plus / Minus Morph **Type:** Pure CSS **Description:** A pure-CSS plus icon that morphs into a minus when the row opens — both bars are pseudo-elements. **HTML:** ```html
Project setup

Drop the snippet into any HTML page — works with any framework or none at all.

Browser support

Modern evergreen browsers. Native <details> has shipped everywhere since 2020.

Theming

Override --acc-pm-accent on the parent to recolor the entire group instantly.

``` **CSS:** ```css .acc-pm { --acc-pm-accent: #d49a5c; border: 1px solid rgba(212,154,92,0.18); border-radius: 10px; margin-bottom: 6px; overflow: hidden; } .acc-pm summary { display: flex; align-items: center; justify-content: space-between; cursor: pointer; list-style: none; padding: 13px 16px; font: 600 13px/1.3 system-ui, sans-serif; color: rgba(240,238,255,0.78); } .acc-pm summary::-webkit-details-marker { display: none; } .acc-pm__ico { position: relative; width: 14px; height: 14px; flex-shrink: 0; } .acc-pm__ico::before, .acc-pm__ico::after { content: ''; position: absolute; inset: 0; margin: auto; background: var(--acc-pm-accent); border-radius: 1px; transition: transform .35s cubic-bezier(.5,1.5,.5,1); } .acc-pm__ico::before { width: 100%; height: 2px; } .acc-pm__ico::after { width: 2px; height: 100%; } .acc-pm[open] .acc-pm__ico::after { transform: rotate(90deg); } .acc-pm[open] .acc-pm__ico::before { transform: rotate(180deg); } .acc-pm[open] { background: rgba(212,154,92,0.05); } .acc-pm p { margin: 0; padding: 0 16px 14px; font: 12px/1.6 system-ui, sans-serif; color: rgba(240,238,255,0.55); } ``` ### 04. Chevron Rotate **Type:** Pure CSS **Description:** A pure-CSS chevron arrow rotates 180° on open — built from a single bordered square. **HTML:** ```html
How long does setup take?

Under five minutes. Copy the markup, paste the styles, you're done.

Can I use this commercially?

Yes — MIT licensed. Use it in client work, products, anywhere.

Is there a Figma version?

Not yet. Designs live in code as the source of truth.

``` **CSS:** ```css .acc-chv { border-bottom: 1px solid rgba(143,179,163,0.18); padding: 4px 0; } .acc-chv summary { display: flex; align-items: center; justify-content: space-between; cursor: pointer; list-style: none; padding: 14px 4px; font: 600 13px/1.3 system-ui, sans-serif; color: rgba(240,238,255,0.7); transition: color .2s; } .acc-chv summary::-webkit-details-marker { display: none; } .acc-chv summary:hover { color: #f0eeff; } .acc-chv__ico { width: 9px; height: 9px; border-right: 2px solid #8fb3a3; border-bottom: 2px solid #8fb3a3; transform: rotate(45deg) translate(-2px,-2px); transition: transform .35s cubic-bezier(.4,1.4,.5,1); flex-shrink: 0; } .acc-chv[open] > summary { color: #f0eeff; } .acc-chv[open] .acc-chv__ico { transform: rotate(225deg) translate(-2px,-2px); } .acc-chv p { margin: 0 0 12px; padding: 0 4px; font: 12px/1.6 system-ui, sans-serif; color: rgba(240,238,255,0.55); } ``` ### 05. Brutalist Stamp **Type:** Pure CSS **Description:** Heavy-bordered, rectangular accordion with a hard offset shadow that flips on open. **HTML:** ```html
RAW PRINCIPLES

No gradients. No shadows blurred soft. Just hard rectangles, two colors, and intent.

NO COMPROMISE

Function leads form. Form documents function. Decoration earns its keep or it leaves.

BUILT TO LAST

Heavy structure ages well. Trends fade. A clear typographic system stays useful.

``` **CSS:** ```css .acc-brut { background: #f0eeff; color: #15151d; border: 2px solid #15151d; box-shadow: 4px 4px 0 #9c7bd6; margin-bottom: 12px; transition: box-shadow .15s, transform .15s; } .acc-brut summary { cursor: pointer; list-style: none; padding: 13px 16px; font: 800 12px/1 system-ui, sans-serif; letter-spacing: 0.12em; border-bottom: 2px solid transparent; } .acc-brut summary::-webkit-details-marker { display: none; } .acc-brut[open] { box-shadow: 2px 2px 0 #9c7bd6; transform: translate(2px,2px); } .acc-brut[open] summary { border-bottom-color: #15151d; } .acc-brut p { margin: 0; padding: 14px 16px; font: 12px/1.6 system-ui, sans-serif; } ``` ### 06. Glass Frosted **Type:** Pure CSS **Description:** Frosted-glass card accordion with backdrop-blur and a luminous rim that brightens on open. **HTML:** ```html
What's inside?

A frosted surface with a subtle border that catches light when the row expands.

Does blur cost performance?

backdrop-filter is GPU-accelerated. Use it on small islands rather than wide swaths.

Browser fallback?

The semi-transparent background still reads gracefully without the blur effect.

``` **CSS:** ```css .acc-glass { background: linear-gradient(135deg, rgba(156,123,214,0.07), rgba(143,179,163,0.05)); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border: 1px solid rgba(240,238,255,0.08); border-radius: 14px; margin-bottom: 8px; transition: border-color .3s, background .3s; } .acc-glass summary { display: flex; align-items: center; justify-content: space-between; cursor: pointer; list-style: none; padding: 14px 18px; font: 600 13px/1.3 system-ui, sans-serif; color: rgba(240,238,255,0.82); } .acc-glass summary::-webkit-details-marker { display: none; } .acc-glass__caret { width: 6px; height: 6px; border-right: 1.5px solid rgba(240,238,255,0.5); border-bottom: 1.5px solid rgba(240,238,255,0.5); transform: rotate(45deg); transition: transform .3s; } .acc-glass[open] { border-color: rgba(156,123,214,0.45); background: linear-gradient(135deg, rgba(156,123,214,0.14), rgba(143,179,163,0.08)); } .acc-glass[open] .acc-glass__caret { transform: rotate(225deg); } .acc-glass p { margin: 0; padding: 0 18px 16px; font: 12px/1.6 system-ui, sans-serif; color: rgba(240,238,255,0.6); } ``` ### 07. Minimal Rail **Type:** Pure CSS **Description:** A thin colored rail on the left highlights the active row — no other decoration. **HTML:** ```html
Typography

One sans family, three weights, two sizes. That's the whole system.

Spacing

Built on an 8-point base with optional 4-point quarter-step for fine control.

Color

Three brand tokens, four neutral steps. Override via CSS custom properties.

``` **CSS:** ```css .acc-rail { position: relative; padding: 0 0 0 16px; margin-bottom: 4px; } .acc-rail::before { content: ''; position: absolute; left: 0; top: 6px; bottom: 6px; width: 2px; background: rgba(240,238,255,0.06); border-radius: 2px; transition: background .25s; } .acc-rail summary { cursor: pointer; list-style: none; padding: 11px 0; font: 600 13px/1.3 system-ui, sans-serif; color: rgba(240,238,255,0.6); transition: color .2s; } .acc-rail summary::-webkit-details-marker { display: none; } .acc-rail[open]::before { background: linear-gradient(180deg, #9c7bd6, #d49a5c); } .acc-rail[open] > summary { color: #f0eeff; } .acc-rail p { margin: 0 0 12px; padding: 0; font: 12px/1.6 system-ui, sans-serif; color: rgba(240,238,255,0.5); } ``` ### 08. Card Lift **Type:** Pure CSS **Description:** Floating cards that lift with a soft shadow when expanded — accent color shifts subtly. **HTML:** ```html
Mountain View

Wake to clear sightlines and warm light. The view is the room.

Garden Suite

A private terrace facing south, framed by old growth and stone.

Loft Studio

Open plan with full-height windows and a quiet corner for work.

``` **CSS:** ```css .acc-lift { background: #1a1a24; border: 1px solid rgba(240,238,255,0.05); border-radius: 12px; margin-bottom: 8px; transition: transform .3s cubic-bezier(.3,1.4,.5,1), box-shadow .3s, border-color .3s; } .acc-lift summary { cursor: pointer; list-style: none; padding: 14px 16px; font: 600 13px/1.3 system-ui, sans-serif; color: rgba(240,238,255,0.75); } .acc-lift summary::-webkit-details-marker { display: none; } .acc-lift[open] { transform: translateY(-2px); box-shadow: 0 10px 28px -10px rgba(156,123,214,0.4); border-color: rgba(156,123,214,0.3); } .acc-lift[open] > summary { color: #f0eeff; } .acc-lift p { margin: 0; padding: 0 16px 14px; font: 12px/1.6 system-ui, sans-serif; color: rgba(240,238,255,0.55); } ``` ### 09. Strip Tabs **Type:** Pure CSS **Description:** Horizontal column accordion — each strip widens when activated, others compress to a label. **HTML:** ```html
``` **CSS:** ```css .acc-strip { display: flex; gap: 4px; height: 220px; width: 100%; border-radius: 12px; overflow: hidden; } .acc-strip > input { display: none; } .acc-strip__col { flex: 1 1 0; cursor: pointer; padding: 16px 14px; display: flex; flex-direction: column; justify-content: flex-end; position: relative; overflow: hidden; background: #1a1a24; color: rgba(240,238,255,0.7); transition: flex .55s cubic-bezier(.3,1,.3,1), background .4s; } .acc-strip__col[data-c="0"] { background: linear-gradient(160deg,#3a2a55,#1a1a24); } .acc-strip__col[data-c="1"] { background: linear-gradient(160deg,#553a2a,#1a1a24); } .acc-strip__col[data-c="2"] { background: linear-gradient(160deg,#2a553a,#1a1a24); } .acc-strip__col[data-c="3"] { background: linear-gradient(160deg,#553a55,#1a1a24); } .acc-strip__title { font: 800 11px/1 system-ui; letter-spacing: 0.18em; writing-mode: vertical-rl; transform: rotate(180deg); align-self: flex-start; transition: all .35s; } .acc-strip__body { font: 12px/1.55 system-ui; color: rgba(240,238,255,0.78); opacity: 0; max-height: 0; transition: opacity .3s .15s, max-height .35s; } #strip-1:checked ~ [for="strip-1"], #strip-2:checked ~ [for="strip-2"], #strip-3:checked ~ [for="strip-3"], #strip-4:checked ~ [for="strip-4"] { flex: 5 1 0; color: #f0eeff; } #strip-1:checked ~ [for="strip-1"] .acc-strip__title, #strip-2:checked ~ [for="strip-2"] .acc-strip__title, #strip-3:checked ~ [for="strip-3"] .acc-strip__title, #strip-4:checked ~ [for="strip-4"] .acc-strip__title { writing-mode: horizontal-tb; transform: none; font-size: 14px; align-self: stretch; } #strip-1:checked ~ [for="strip-1"] .acc-strip__body, #strip-2:checked ~ [for="strip-2"] .acc-strip__body, #strip-3:checked ~ [for="strip-3"] .acc-strip__body, #strip-4:checked ~ [for="strip-4"] .acc-strip__body { opacity: 1; max-height: 100px; margin-top: 8px; } ``` ### 10. Image Reveal **Type:** Pure CSS **Description:** Hover or focus to widen a column; the image inside zooms to fit while siblings collapse. **HTML:** ```html
Aurora
Copper
Sage
Slate
Berry
``` **CSS:** ```css .acc-img { display: flex; gap: 3px; height: 220px; border-radius: 12px; overflow: hidden; } .acc-img__col { flex: 1; cursor: pointer; outline: none; background: radial-gradient(circle at 30% 20%, color-mix(in srgb, var(--bg), white 25%), var(--bg)); display: flex; align-items: flex-end; padding: 14px; transition: flex .5s cubic-bezier(.3,1,.3,1), filter .3s; filter: saturate(0.7) brightness(0.85); } .acc-img__col:hover, .acc-img__col:focus { flex: 4; filter: saturate(1.2) brightness(1); } .acc-img__lbl { font: 700 12px/1 system-ui; letter-spacing: 0.14em; text-transform: uppercase; color: #f0eeff; text-shadow: 0 1px 8px rgba(0,0,0,0.4); } ``` ### 11. Color Block **Type:** Pure CSS **Description:** Solid color blocks switch via radio inputs; the active block expands and reveals body copy. **HTML:** ```html
``` **CSS:** ```css .acc-cblk { display: flex; height: 220px; border-radius: 12px; overflow: hidden; } .acc-cblk > input { display: none; } .acc-cblk__b { flex: 1; cursor: pointer; padding: 16px; display: flex; flex-direction: column; justify-content: space-between; background: var(--bg); color: #15151d; transition: flex .5s cubic-bezier(.3,1,.3,1); } .acc-cblk__t { font: 800 13px/1 system-ui; letter-spacing: 0.1em; text-transform: uppercase; } .acc-cblk__d { font: 12px/1.55 system-ui; opacity: 0; transform: translateY(8px); transition: all .3s .12s; } #cblk-1:checked ~ [for="cblk-1"], #cblk-2:checked ~ [for="cblk-2"], #cblk-3:checked ~ [for="cblk-3"] { flex: 4; } #cblk-1:checked ~ [for="cblk-1"] .acc-cblk__d, #cblk-2:checked ~ [for="cblk-2"] .acc-cblk__d, #cblk-3:checked ~ [for="cblk-3"] .acc-cblk__d { opacity: 1; transform: none; } ``` ### 12. Numbered Spine **Type:** Pure CSS **Description:** Vertical numbered labels rotate to horizontal when their column expands. **HTML:** ```html
``` **CSS:** ```css .acc-spine { display: flex; gap: 2px; height: 220px; border-radius: 12px; overflow: hidden; background: rgba(240,238,255,0.04); } .acc-spine > input { display: none; } .acc-spine__c { flex: 1; cursor: pointer; padding: 14px; background: #1a1a24; position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 10px; transition: flex .5s cubic-bezier(.3,1,.3,1), background .3s; } .acc-spine__n { font: 800 18px monospace; color: rgba(212,154,92,0.8); } .acc-spine__t { font: 700 12px/1 system-ui; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(240,238,255,0.55); writing-mode: vertical-rl; transform: rotate(180deg); transition: all .35s; } .acc-spine__b { font: 12px/1.55 system-ui; color: rgba(240,238,255,0.65); opacity: 0; max-height: 0; transition: opacity .3s .15s, max-height .35s; } #sp-1:checked ~ [for="sp-1"], #sp-2:checked ~ [for="sp-2"], #sp-3:checked ~ [for="sp-3"] { flex: 4; background: linear-gradient(180deg,#1a1a24,#2a2438); } #sp-1:checked ~ [for="sp-1"] .acc-spine__t, #sp-2:checked ~ [for="sp-2"] .acc-spine__t, #sp-3:checked ~ [for="sp-3"] .acc-spine__t { writing-mode: horizontal-tb; transform: none; color: #f0eeff; font-size: 14px; } #sp-1:checked ~ [for="sp-1"] .acc-spine__b, #sp-2:checked ~ [for="sp-2"] .acc-spine__b, #sp-3:checked ~ [for="sp-3"] .acc-spine__b { opacity: 1; max-height: 120px; } ``` ### 13. Curtain Slide **Type:** Pure CSS **Description:** Active panel slides in from the right while the previous one collapses left — like a stage curtain. **HTML:** ```html

First Act

The curtain rises slowly. Light spills across the boards.

Second Act

Tension builds. The rhythm tightens. We lean forward.

Third Act

Resolution arrives. The audience exhales. Lights dim.

``` **CSS:** ```css .acc-curt { display: flex; flex-direction: column; height: 220px; border-radius: 12px; overflow: hidden; background: #1a1a24; border: 1px solid rgba(240,238,255,0.06); } .acc-curt > input { display: none; } .acc-curt__tabs { display: flex; background: #15151d; border-bottom: 1px solid rgba(240,238,255,0.06); } .acc-curt__tabs label { flex: 1; padding: 11px; cursor: pointer; font: 700 11px/1 system-ui; letter-spacing: 0.14em; text-align: center; color: rgba(240,238,255,0.5); transition: color .2s, background .2s; } .acc-curt__tabs label:hover { color: #f0eeff; } .acc-curt__stage { position: relative; flex: 1; overflow: hidden; } .acc-curt__p { position: absolute; inset: 0; padding: 18px; transform: translateX(100%); opacity: 0; transition: transform .5s cubic-bezier(.3,1,.3,1), opacity .35s; } .acc-curt__p h4 { margin: 0 0 8px; font: 700 14px/1.2 system-ui; color: #d49a5c; } .acc-curt__p p { margin: 0; font: 12px/1.55 system-ui; color: rgba(240,238,255,0.7); } #curt-1:checked ~ .acc-curt__tabs label[for="curt-1"], #curt-2:checked ~ .acc-curt__tabs label[for="curt-2"], #curt-3:checked ~ .acc-curt__tabs label[for="curt-3"] { color: #f0eeff; background: rgba(156,123,214,0.18); } #curt-1:checked ~ .acc-curt__stage [data-i="0"], #curt-2:checked ~ .acc-curt__stage [data-i="1"], #curt-3:checked ~ .acc-curt__stage [data-i="2"] { transform: translateX(0); opacity: 1; } ``` ### 14. Vinyl Spine **Type:** Pure CSS **Description:** Records on a shelf — click a spine to slide it out and reveal its label. **HTML:** ```html
``` **CSS:** ```css .acc-vyl { display: flex; gap: 5px; padding: 16px; height: 220px; align-items: stretch; background: linear-gradient(180deg,#15151d,#1a1a24); border-radius: 12px; } .acc-vyl > input { display: none; } .acc-vyl__r { flex: 0 0 22px; cursor: pointer; position: relative; background: linear-gradient(90deg, color-mix(in srgb, var(--c), black 35%), var(--c) 50%, color-mix(in srgb, var(--c), black 35%)); border-radius: 3px; box-shadow: inset 0 0 0 1px rgba(0,0,0,0.3); transition: flex .45s cubic-bezier(.3,1,.3,1); display: flex; align-items: center; justify-content: center; } .acc-vyl__r span { font: 700 10px/1 system-ui; letter-spacing: 0.14em; color: rgba(0,0,0,0.7); white-space: nowrap; writing-mode: vertical-rl; transform: rotate(180deg); } #vyl-1:checked ~ [for="vyl-1"], #vyl-2:checked ~ [for="vyl-2"], #vyl-3:checked ~ [for="vyl-3"], #vyl-4:checked ~ [for="vyl-4"] { flex: 1 1 0; } #vyl-1:checked ~ [for="vyl-1"] span, #vyl-2:checked ~ [for="vyl-2"] span, #vyl-3:checked ~ [for="vyl-3"] span, #vyl-4:checked ~ [for="vyl-4"] span { writing-mode: horizontal-tb; transform: none; font-size: 13px; color: rgba(0,0,0,0.85); } ``` ### 15. Cinema Reel **Type:** Pure CSS **Description:** Film-strip style horizontal accordion — sprocket holes top and bottom, frame brightens on focus. **HTML:** ```html
``` **CSS:** ```css .acc-reel { background: #15151d; padding: 12px 0; border-radius: 8px; height: 220px; display: flex; align-items: center; } .acc-reel__strip { display: flex; gap: 4px; width: 100%; padding: 18px 12px; background: linear-gradient(#0a0a10,#0a0a10) center/100% calc(100% - 24px) no-repeat, repeating-linear-gradient(90deg, transparent 0 8px, rgba(240,238,255,0.12) 8px 14px) top/100% 12px no-repeat, repeating-linear-gradient(90deg, transparent 0 8px, rgba(240,238,255,0.12) 8px 14px) bottom/100% 12px no-repeat; } .acc-reel__strip > input { display: none; } .acc-reel__f { flex: 1; cursor: pointer; min-height: 130px; background: linear-gradient(135deg,#3a2a55,#2a1a45); border-radius: 4px; display: flex; align-items: center; justify-content: center; font: 700 11px/1 system-ui; letter-spacing: 0.1em; color: rgba(240,238,255,0.4); filter: brightness(0.65) contrast(0.85); transition: flex .5s cubic-bezier(.3,1,.3,1), filter .3s, color .3s; } .acc-reel__f:nth-of-type(2) { background: linear-gradient(135deg,#553a2a,#451a1a); } .acc-reel__f:nth-of-type(3) { background: linear-gradient(135deg,#2a553a,#1a4530); } #reel-1:checked ~ [for="reel-1"], #reel-2:checked ~ [for="reel-2"], #reel-3:checked ~ [for="reel-3"] { flex: 4; filter: brightness(1.1) contrast(1.05); color: #f0eeff; font-size: 13px; } ``` ### 16. Aurora Strip **Type:** Pure CSS **Description:** Each panel hides a drifting aurora gradient — pop into view by widening the active strip. **HTML:** ```html
``` **CSS:** ```css .acc-aur { display: flex; gap: 4px; height: 220px; border-radius: 12px; overflow: hidden; } .acc-aur > input { display: none; } .acc-aur__c { flex: 1; cursor: pointer; padding: 16px; position: relative; background: radial-gradient(ellipse at 30% 20%, rgba(156,123,214,0.5), transparent 60%), radial-gradient(ellipse at 70% 80%, rgba(212,154,92,0.4), transparent 60%), #15151d; background-size: 220% 220%, 240% 240%, 100% 100%; background-position: 0% 0%, 100% 100%, 0 0; display: flex; flex-direction: column; justify-content: flex-end; filter: brightness(0.55) saturate(0.8); transition: flex .5s cubic-bezier(.3,1,.3,1), filter .35s, background-position 6s linear; } .acc-aur__c:nth-of-type(2) { background: radial-gradient(ellipse at 50% 40%, rgba(212,154,92,0.55), transparent 60%), radial-gradient(ellipse at 80% 70%, rgba(143,179,163,0.4), transparent 60%), #15151d; } .acc-aur__c:nth-of-type(3) { background: radial-gradient(ellipse at 20% 80%, rgba(143,179,163,0.55), transparent 60%), radial-gradient(ellipse at 70% 30%, rgba(156,123,214,0.4), transparent 60%), #15151d; } .acc-aur__l { font: 800 12px/1 system-ui; letter-spacing: 0.16em; color: rgba(240,238,255,0.85); } .acc-aur__d { font: 11px/1.55 system-ui; color: rgba(240,238,255,0.55); margin-top: 6px; opacity: 0; transition: opacity .3s .15s; } #aur-1:checked ~ [for="aur-1"], #aur-2:checked ~ [for="aur-2"], #aur-3:checked ~ [for="aur-3"] { flex: 4; filter: brightness(1.05) saturate(1.1); background-position: 100% 100%, 0% 0%, 0 0; } #aur-1:checked ~ [for="aur-1"] .acc-aur__d, #aur-2:checked ~ [for="aur-2"] .acc-aur__d, #aur-3:checked ~ [for="aur-3"] .acc-aur__d { opacity: 1; } ``` ### 17. Diagonal Slant **Type:** Pure CSS **Description:** Vertical accordion where each row slants — open row straightens to a clean rectangle. **HTML:** ```html
Architecture

Static-first, edge-cached, no SSR runtime. Fast on every connection.

Data layer

Content lives in flat files. Authoring is git-tracked and reviewable.

Deployment

Build once, push to CDN. No servers to manage, no scaling concerns.

``` **CSS:** ```css .acc-slant { background: rgba(156,123,214,0.08); border: 1px solid rgba(156,123,214,0.2); margin-bottom: 6px; clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%); transition: clip-path .35s cubic-bezier(.3,1.4,.5,1), background .25s; } .acc-slant summary { cursor: pointer; list-style: none; padding: 13px 22px; font: 700 12px/1 system-ui; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(240,238,255,0.7); } .acc-slant summary::-webkit-details-marker { display: none; } .acc-slant[open] { clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%); background: rgba(156,123,214,0.18); } .acc-slant[open] > summary { color: #f0eeff; } .acc-slant p { margin: 0; padding: 0 22px 14px; font: 12px/1.6 system-ui; color: rgba(240,238,255,0.6); } ``` ### 18. Stepped Stair **Type:** Pure CSS **Description:** Each row indents progressively, creating a staircase — open row pulls back to flush left. **HTML:** ```html
Step one

Begin where you stand. The first move matters more than the plan.

Step two

Ship the rough version. Real feedback beats imagined feedback.

Step three

Refine. Cut what didn't earn its place. Keep the load light.

Step four

Repeat the loop. Compounding shows up after the tenth turn, not the first.

``` **CSS:** ```css .acc-stair { margin-bottom: 4px; margin-left: calc(var(--i,0) * 16px); background: rgba(143,179,163,0.07); border-left: 3px solid #8fb3a3; border-radius: 0 8px 8px 0; transition: margin-left .35s cubic-bezier(.3,1.3,.5,1), background .25s; } .acc-stair summary { cursor: pointer; list-style: none; padding: 11px 14px; font: 600 13px/1.3 system-ui; color: rgba(240,238,255,0.7); } .acc-stair summary::-webkit-details-marker { display: none; } .acc-stair[open] { margin-left: 0; background: rgba(143,179,163,0.15); } .acc-stair[open] > summary { color: #f0eeff; } .acc-stair p { margin: 0; padding: 0 14px 12px; font: 12px/1.55 system-ui; color: rgba(240,238,255,0.6); } ``` ### 19. Circular Arc **Type:** Pure CSS **Description:** A four-segment ring menu — labels follow each arc via SVG textPath. Selected arc lights up with its theme color, the hub shows the active step number, and the body reveals a matching description. **HTML:** ```html
01 02 03 04

Discover

Map the problem space. Talk to users. Sketch hypotheses before committing to a build.

Define

Pick one bet. Frame it crisply. Write down what success actually looks like.

Deliver

Ship a thin slice end-to-end. Measure real usage. Decide what comes next from data.

Refine

Iterate on real signal, not imagined feedback. Compound the wins, drop what didn't earn its place.

``` **CSS:** ```css .acc-arc { display: grid; grid-template-columns: 150px 1fr; gap: 18px; height: 220px; align-items: center; padding: 6px 4px; } .acc-arc > input { position: absolute; opacity: 0; pointer-events: none; } .acc-arc__wheel { position: relative; width: 150px; height: 150px; flex-shrink: 0; } .acc-arc__svg { width: 100%; height: 100%; display: block; } .acc-arc__seg { fill: rgba(240,238,255,0.05); stroke: rgba(240,238,255,0.1); stroke-width: 1; transition: fill .3s, stroke .3s, stroke-width .3s; } .acc-arc__seg[data-i="0"] { fill: rgba(156,123,214,0.2); } .acc-arc__seg[data-i="1"] { fill: rgba(212,154,92,0.2); } .acc-arc__seg[data-i="2"] { fill: rgba(143,179,163,0.2); } .acc-arc__seg[data-i="3"] { fill: rgba(200,162,200,0.2); } .acc-arc__lbl { font: 700 9px/1 system-ui, sans-serif; letter-spacing: 0.18em; fill: rgba(240,238,255,0.6); transition: fill .25s; } /* Click hit targets — 4 explicit triangular wedges from center to outer edge. Each polygon: center (50%,50%), outer corner A, outer corner B */ .acc-arc__hit { position: absolute; inset: 0; cursor: pointer; } .acc-arc__hit--n { clip-path: polygon(50% 50%, 100% 0, 0 0); } .acc-arc__hit--e { clip-path: polygon(50% 50%, 100% 100%, 100% 0); } .acc-arc__hit--s { clip-path: polygon(50% 50%, 0 100%, 100% 100%); } .acc-arc__hit--w { clip-path: polygon(50% 50%, 0 0, 0 100%); } .acc-arc__hub { position: absolute; left: 50%; top: 50%; width: 60px; height: 60px; border-radius: 50%; background: #1a1a24; box-shadow: 0 0 0 1px rgba(240,238,255,0.1), 0 6px 16px rgba(0,0,0,0.4); transform: translate(-50%, -50%); display: grid; place-items: center; pointer-events: none; } .acc-arc__hub span { grid-area: 1/1; font: 800 18px ui-monospace, monospace; color: #f0eeff; opacity: 0; transition: opacity .25s, color .25s; } .acc-arc__body { position: relative; height: 150px; } .acc-arc__body article { position: absolute; inset: 0; margin: 0; padding: 0 0 0 14px; border-left: 2px solid rgba(240,238,255,0.08); display: flex; flex-direction: column; justify-content: center; gap: 6px; opacity: 0; transform: translateX(6px); transition: opacity .3s, transform .3s, border-color .3s; } .acc-arc__body h4 { margin: 0; font: 700 14px/1.2 system-ui, sans-serif; letter-spacing: 0.02em; color: #f0eeff; } .acc-arc__body p { margin: 0; font: 12px/1.6 system-ui, sans-serif; color: rgba(240,238,255,0.7); } /* Active states — explicit per-arc */ #arc-1:checked ~ .acc-arc__wheel .acc-arc__seg[data-i="0"] { fill: #9c7bd6; stroke: rgba(255,255,255,0.4); stroke-width: 1.5; } #arc-2:checked ~ .acc-arc__wheel .acc-arc__seg[data-i="1"] { fill: #d49a5c; stroke: rgba(255,255,255,0.4); stroke-width: 1.5; } #arc-3:checked ~ .acc-arc__wheel .acc-arc__seg[data-i="2"] { fill: #8fb3a3; stroke: rgba(255,255,255,0.4); stroke-width: 1.5; } #arc-4:checked ~ .acc-arc__wheel .acc-arc__seg[data-i="3"] { fill: #c8a2c8; stroke: rgba(255,255,255,0.4); stroke-width: 1.5; } #arc-1:checked ~ .acc-arc__wheel .acc-arc__lbl[data-i="0"], #arc-2:checked ~ .acc-arc__wheel .acc-arc__lbl[data-i="1"], #arc-3:checked ~ .acc-arc__wheel .acc-arc__lbl[data-i="2"], #arc-4:checked ~ .acc-arc__wheel .acc-arc__lbl[data-i="3"] { fill: #15151d; } #arc-1:checked ~ .acc-arc__wheel .acc-arc__hub span[data-i="0"] { opacity: 1; color: #b896e8; } #arc-2:checked ~ .acc-arc__wheel .acc-arc__hub span[data-i="1"] { opacity: 1; color: #d49a5c; } #arc-3:checked ~ .acc-arc__wheel .acc-arc__hub span[data-i="2"] { opacity: 1; color: #8fb3a3; } #arc-4:checked ~ .acc-arc__wheel .acc-arc__hub span[data-i="3"] { opacity: 1; color: #c8a2c8; } #arc-1:checked ~ .acc-arc__body article[data-i="0"], #arc-2:checked ~ .acc-arc__body article[data-i="1"], #arc-3:checked ~ .acc-arc__body article[data-i="2"], #arc-4:checked ~ .acc-arc__body article[data-i="3"] { opacity: 1; transform: translateX(0); } #arc-1:checked ~ .acc-arc__body article[data-i="0"] { border-left-color: #9c7bd6; } #arc-2:checked ~ .acc-arc__body article[data-i="1"] { border-left-color: #d49a5c; } #arc-3:checked ~ .acc-arc__body article[data-i="2"] { border-left-color: #8fb3a3; } #arc-4:checked ~ .acc-arc__body article[data-i="3"] { border-left-color: #c8a2c8; } ``` ### 20. Marquee Header **Type:** Pure CSS **Description:** Closed rows scroll their title as a slow marquee; opening pauses the marquee and reveals body. **HTML:** ```html
A long-running show that scrolls until you click · A long-running show that scrolls until you click · 

Stop the marquee. The title settles. The body opens. Calm restored.

Now open · The motion holds still · Now open · The motion holds still · 

The opened panel doesn't animate its title. Use marquee for "more here than fits."

Tap to open · Hover anywhere to slow down · Tap to open · Hover anywhere · 

Marquee speed pairs nicely with hover-to-pause for accessibility on long titles.

``` **CSS:** ```css .acc-marq { margin-bottom: 6px; background: rgba(212,154,92,0.06); border: 1px solid rgba(212,154,92,0.16); border-radius: 8px; overflow: hidden; } .acc-marq summary { cursor: pointer; list-style: none; padding: 12px 0; overflow: hidden; position: relative; } .acc-marq summary::-webkit-details-marker { display: none; } .acc-marq__t { display: inline-block; white-space: nowrap; font: 600 13px/1 system-ui; color: rgba(240,238,255,0.78); padding-left: 100%; animation: acc-marq-roll 14s linear infinite; } .acc-marq:hover .acc-marq__t { animation-play-state: paused; } .acc-marq[open] .acc-marq__t { animation: none; padding-left: 16px; color: #f0eeff; } @keyframes acc-marq-roll { to { transform: translateX(-100%); } } .acc-marq p { margin: 0; padding: 0 16px 14px; font: 12px/1.55 system-ui; color: rgba(240,238,255,0.6); } @media (prefers-reduced-motion: reduce) { .acc-marq__t { animation: none; padding-left: 16px; } } ``` ### 21. Code Comment **Type:** Pure CSS **Description:** Accordion styled as a multi-line code comment — "//" prefix on closed rows, full block on open. **HTML:** ```html
const installCommand = "npm i";

Installs the package and resolves all peer dependencies. Adds an entry to package.json.

const importStatement = "import x from 'lib';";

ES module import. Tree-shakable so unused exports won't bloat the bundle.

const renderHook = "useEffect";

Side-effects after paint. Cleanup runs on unmount or before the next effect fires.

``` **CSS:** ```css .acc-cc { font-family: ui-monospace, "JetBrains Mono", monospace; background: #0e0e16; border-left: 3px solid #8fb3a3; margin-bottom: 4px; padding: 4px 0; } .acc-cc summary { cursor: pointer; list-style: none; padding: 8px 14px; font-size: 12.5px; color: rgba(143,179,163,0.85); position: relative; } .acc-cc summary::-webkit-details-marker { display: none; } .acc-cc summary::before { content: '// '; color: rgba(143,179,163,0.45); } .acc-cc[open] summary { color: #f0eeff; background: rgba(143,179,163,0.06); } .acc-cc[open] summary::before { content: '/* '; color: #d49a5c; } .acc-cc[open] summary::after { content: ' */'; color: #d49a5c; } .acc-cc p { margin: 0; padding: 8px 14px 12px 28px; font: 11.5px/1.7 ui-monospace, monospace; color: rgba(240,238,255,0.6); } .acc-cc p::before { content: '→ '; color: #d49a5c; } ``` ### 22. Paper Folded **Type:** Pure CSS **Description:** Each row looks like a folded paper card; opening unfolds it with a 3D rotateX flip. **HTML:** ```html
Origami

The art of folding paper into expressive form. Single sheet, no cuts, no glue.

Letterpress

Type pressed into thick cotton stock leaves a tactile bite that catches light.

Saddle Stitch

Two staples through the fold of a folio. Quick, cheap, beautiful for short runs.

``` **CSS:** ```css .acc-fold { background: linear-gradient(180deg, #f0eeff, #e6e2f5); color: #15151d; margin-bottom: 8px; border: 1px solid rgba(21,21,29,0.12); perspective: 800px; transform-style: preserve-3d; } .acc-fold summary { cursor: pointer; list-style: none; padding: 13px 16px; font: 700 13px/1 system-ui; position: relative; border-bottom: 1px solid transparent; transform-origin: bottom; transition: border-color .25s; } .acc-fold summary::-webkit-details-marker { display: none; } .acc-fold summary::after { content: '▾'; position: absolute; right: 16px; top: 50%; transform: translateY(-50%); color: #9c7bd6; transition: transform .35s; } .acc-fold p { margin: 0; padding: 14px 16px; font: 12px/1.6 system-ui; background: linear-gradient(180deg, #faf8ff, #ece8f5); transform-origin: top; transform: rotateX(-90deg); transition: transform .45s cubic-bezier(.3,1,.3,1); box-shadow: inset 0 1px 0 rgba(21,21,29,0.08); } .acc-fold[open] summary { border-bottom-color: rgba(21,21,29,0.12); } .acc-fold[open] summary::after { transform: translateY(-50%) rotate(180deg); } .acc-fold[open] p { transform: rotateX(0); } ``` ### 23. Equalizer **Type:** Pure CSS **Description:** Audio-EQ inspired — vertical bars rise to indicate the open row. Pure CSS, no JS. **HTML:** ```html
Bass

Low-end response. Felt more than heard. Anchors the mix.

Mids

The conversation register. Where vocals and lead instruments live.

Treble

Air and detail. Cymbals, breath, the sparkle of acoustic plucks.

``` **CSS:** ```css .acc-eq { background: #15151d; border: 1px solid rgba(240,238,255,0.06); border-radius: 8px; margin-bottom: 6px; } .acc-eq summary { display: flex; align-items: center; gap: 12px; cursor: pointer; list-style: none; padding: 12px 16px; font: 600 13px/1 system-ui; color: rgba(240,238,255,0.72); } .acc-eq summary::-webkit-details-marker { display: none; } .acc-eq__bars { display: inline-flex; align-items: flex-end; gap: 2px; height: 14px; width: 22px; } .acc-eq__bars i { display: block; width: 3px; background: rgba(212,154,92,0.4); border-radius: 1px; height: 30%; transition: height .3s; } .acc-eq[open] > summary { color: #f0eeff; } .acc-eq[open] .acc-eq__bars i { background: #d49a5c; animation: acc-eq-pulse 1.1s ease-in-out infinite alternate; } .acc-eq[open] .acc-eq__bars i:nth-child(1) { animation-delay: .0s; } .acc-eq[open] .acc-eq__bars i:nth-child(2) { animation-delay: .15s; } .acc-eq[open] .acc-eq__bars i:nth-child(3) { animation-delay: .3s; } .acc-eq[open] .acc-eq__bars i:nth-child(4) { animation-delay: .45s; } @keyframes acc-eq-pulse { from { height: 25%; } to { height: 100%; } } .acc-eq p { margin: 0; padding: 0 16px 14px 50px; font: 12px/1.6 system-ui; color: rgba(240,238,255,0.55); } @media (prefers-reduced-motion: reduce) { .acc-eq[open] .acc-eq__bars i { animation: none; height: 70%; } } ``` ### 24. Stacked Cards **Type:** Pure CSS **Description:** Closed rows stack with a slight scale-down and translucent overlap; opened row pops to top. **HTML:** ```html
Top of pile

The first card sits flush. Behind it the others fan back in scale.

Second card

Slightly smaller and pulled up. Click to bring it to the front of the stack.

Third card

The deepest in the deck. Smaller still, but always reachable.

``` **CSS:** ```css .acc-stk { margin-top: -10px; margin-bottom: 0; background: linear-gradient(135deg, #2a2438, #1a1a24); border: 1px solid rgba(156,123,214,0.25); border-radius: 12px; transform: scale(calc(1 - var(--i) * 0.04)) translateY(calc(var(--i) * -2px)); transform-origin: center top; transition: transform .3s, margin .3s, opacity .3s; opacity: calc(1 - var(--i) * 0.18); } .acc-stk:first-of-type { margin-top: 0; } .acc-stk summary { cursor: pointer; list-style: none; padding: 13px 16px; font: 700 13px/1 system-ui; color: #f0eeff; } .acc-stk summary::-webkit-details-marker { display: none; } .acc-stk[open] { transform: scale(1) translateY(0); opacity: 1; margin-top: 8px; margin-bottom: 8px; border-color: rgba(212,154,92,0.5); box-shadow: 0 12px 30px -10px rgba(156,123,214,0.5); } .acc-stk:first-of-type[open] { margin-top: 0; } .acc-stk p { margin: 0; padding: 0 16px 14px; font: 12px/1.55 system-ui; color: rgba(240,238,255,0.65); } ``` ### 25. Holographic Slot **Type:** Pure CSS **Description:** Open row shows a holographic gradient sweep — like a foil sticker catching light. **HTML:** ```html
Foil A · Aurora

Cool ribbon of violet to cyan, sweeping at 20 degrees. Catches light at any angle.

Foil B · Copper

Warm metallic with a soft inner glow. Reads premium without going gold.

Foil C · Mint

Cooler than gold, less corporate than silver. Quiet and confident.

``` **CSS:** ```css .acc-holo { background: #15151d; border: 1px solid rgba(240,238,255,0.06); border-radius: 10px; margin-bottom: 6px; overflow: hidden; position: relative; } .acc-holo summary { cursor: pointer; list-style: none; padding: 13px 16px; font: 700 13px/1 system-ui; color: rgba(240,238,255,0.7); position: relative; z-index: 2; } .acc-holo summary::-webkit-details-marker { display: none; } .acc-holo::before { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(110deg, transparent 30%, rgba(156,123,214,0.4) 45%, rgba(212,154,92,0.4) 55%, rgba(143,179,163,0.4) 65%, transparent 80%); background-size: 250% 100%; background-position: 100% 0; opacity: 0; transition: opacity .35s, background-position 1.6s ease-out; } .acc-holo[open] { border-color: rgba(212,154,92,0.4); } .acc-holo[open]::before { opacity: 1; background-position: 0% 0; } .acc-holo[open] > summary { color: #f0eeff; } .acc-holo p { margin: 0; padding: 0 16px 14px; position: relative; z-index: 2; font: 12px/1.55 system-ui; color: rgba(240,238,255,0.65); } ``` ### 26. Aurora Drift **Type:** Pure CSS **Description:** Closed rows show a faint hue at the edge; open rows bloom into a slow-drifting aurora. **HTML:** ```html
Northern Lights

Charged particles meet the upper atmosphere. The sky turns to ribbon.

Solar Wind

A constant stream from the sun. Some nights it sings louder than others.

Geomagnetic Storm

When the wind hits hard, the auroral oval expands south. Rare gift for lower latitudes.

``` **CSS:** ```css .acc-drift { position: relative; margin-bottom: 6px; background: #15151d; border-radius: 12px; border: 1px solid rgba(240,238,255,0.06); overflow: hidden; } .acc-drift::before { content: ''; position: absolute; inset: -50%; background: radial-gradient(ellipse at 20% 30%, rgba(156,123,214,0.5), transparent 55%), radial-gradient(ellipse at 80% 70%, rgba(143,179,163,0.4), transparent 55%), radial-gradient(ellipse at 50% 50%, rgba(212,154,92,0.35), transparent 60%); filter: blur(20px); opacity: 0; animation: acc-drift-roll 18s linear infinite; transition: opacity .4s; pointer-events: none; } .acc-drift summary { cursor: pointer; list-style: none; padding: 13px 16px; font: 700 13px/1 system-ui; color: rgba(240,238,255,0.7); position: relative; z-index: 2; } .acc-drift summary::-webkit-details-marker { display: none; } .acc-drift[open]::before { opacity: 0.7; } .acc-drift[open] > summary { color: #f0eeff; } .acc-drift p { margin: 0; padding: 0 16px 14px; position: relative; z-index: 2; font: 12px/1.55 system-ui; color: rgba(240,238,255,0.7); } @keyframes acc-drift-roll { 0% { transform: translate(0,0) rotate(0); } 100% { transform: translate(8%,-6%) rotate(15deg); } } @media (prefers-reduced-motion: reduce) { .acc-drift::before { animation: none; } } ``` --- ## 20 CSS Animated Buttons URL: https://codefronts.com/motion/css-animated-buttons/ Description: 20 hand-coded CSS animated buttons — neon glow, ripple, 3D press, liquid fill, jelly bounce, shine sweep, animated border, moving gradient CTA, text flip, submit success state, add-to-cart progress, download icon, hamburger-to-close, toggle switch, loading spinner inside button, next/prev arrow nav, and ghost button background reveal. Half pure CSS, half lightweight JS for production interactions. Demo count: 20 ### 01. CSS Neon Glow Button **Type:** Pure CSS **Description:** A neon-lit CTA button with a pulsing glow halo and colour-shifting outline, built entirely with CSS box-shadow animations and no JavaScript. **HTML:** ```html

Premium SaaS — Launch Your Project

Build faster.
Ship smarter.

Join 50,000+ developers already on the platform.

No credit card required · Cancel anytime

``` **CSS:** ```css .ab-01,.ab-01 *,.ab-01 *::before,.ab-01 *::after{box-sizing:border-box;margin:0;padding:0} .ab-01 ::selection{background:#b829ff;color:#fff} .ab-01{ --neon:#b829ff; --neon-dim:rgba(184,41,255,.35); --bg:#0a0010; --text:#e8d5ff; font-family:system-ui,sans-serif; background:var(--bg); min-height:100vh; display:flex; align-items:center; justify-content:center; } .ab-01__scene{ text-align:center; padding:2.5rem 2rem; max-width:520px; } .ab-01__label{ font-size:.72rem; letter-spacing:.18em; text-transform:uppercase; color:var(--neon); margin-bottom:.75rem; opacity:.8; } .ab-01__headline{ font-size:clamp(1.8rem,4vw,2.6rem); font-weight:800; color:#fff; line-height:1.15; margin-bottom:.75rem; } .ab-01__sub{ font-size:.95rem; color:var(--text); opacity:.7; margin-bottom:2rem; } .ab-01__btn{ position:relative; display:inline-flex; align-items:center; gap:.5rem; padding:.85rem 2.4rem; font-size:1rem; font-weight:700; letter-spacing:.04em; color:#fff; background:transparent; border:2px solid var(--neon); border-radius:8px; cursor:pointer; outline:none; text-transform:uppercase; transition:color .3s,background .3s,border-color .3s,box-shadow .3s; box-shadow:0 0 8px var(--neon-dim),0 0 20px var(--neon-dim),inset 0 0 10px rgba(184,41,255,.08); animation:ab-01-pulse 2s ease-in-out infinite; will-change:box-shadow; text-shadow:0 0 8px rgba(184,41,255,.6); } .ab-01__btn:hover{ background:var(--neon); color:#fff; box-shadow:0 0 16px var(--neon),0 0 40px var(--neon),0 0 80px var(--neon-dim),inset 0 0 16px rgba(255,255,255,.15); text-shadow:none; animation-play-state:paused; } .ab-01__btn:active{ transform:scale(.97); } @keyframes ab-01-pulse{ 0%,100%{box-shadow:0 0 8px var(--neon-dim),0 0 20px var(--neon-dim),inset 0 0 10px rgba(184,41,255,.08)} 50%{box-shadow:0 0 14px var(--neon),0 0 36px var(--neon-dim),0 0 60px rgba(184,41,255,.15),inset 0 0 16px rgba(184,41,255,.12)} } .ab-01__hint{ margin-top:1rem; font-size:.78rem; color:var(--text); opacity:.45; } @media(prefers-reduced-motion:reduce){ .ab-01__btn{animation:none} } ``` ### 02. CSS Background Slide Hover Button **Type:** Pure CSS **Description:** Four directional background-slide hover buttons — left, right, top, and bottom — where a solid fill sweeps across the button face on hover using CSS pseudo-element transforms. **HTML:** ```html

Background Slide Directions

``` **CSS:** ```css .ab-02,.ab-02 *,.ab-02 *::before,.ab-02 *::after{box-sizing:border-box;margin:0;padding:0} .ab-02 ::selection{background:#6c63ff;color:#fff} .ab-02{ --fill:#6c63ff; --text:#1a1a2e; --border:#6c63ff; font-family:system-ui,sans-serif; background:#f0eeff; min-height:100vh; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:2rem; padding:2rem; } .ab-02__title{ font-size:.8rem; font-weight:600; letter-spacing:.12em; text-transform:uppercase; color:#6c63ff; opacity:.7; } .ab-02__grid{ display:grid; grid-template-columns:1fr 1fr; gap:1rem; } .ab-02__btn{ position:relative; overflow:hidden; padding:.8rem 2rem; font-size:.95rem; font-weight:700; color:var(--fill); background:transparent; border:2px solid var(--border); border-radius:8px; cursor:pointer; outline:none; transition:color .35s; letter-spacing:.03em; } .ab-02__btn span{ position:relative; z-index:1; } .ab-02__btn::before{ content:''; position:absolute; inset:0; background:var(--fill); transition:transform .35s cubic-bezier(.4,0,.2,1); z-index:0; } .ab-02__btn:hover{color:#fff} .ab-02__btn--left::before{transform:translateX(-100%)} .ab-02__btn--left:hover::before{transform:translateX(0)} .ab-02__btn--right::before{transform:translateX(100%)} .ab-02__btn--right:hover::before{transform:translateX(0)} .ab-02__btn--top::before{transform:translateY(-100%)} .ab-02__btn--top:hover::before{transform:translateY(0)} .ab-02__btn--bottom::before{transform:translateY(100%)} .ab-02__btn--bottom:hover::before{transform:translateY(0)} .ab-02__btn:active{transform:scale(.97)} @media(prefers-reduced-motion:reduce){ .ab-02__btn::before{transition:none} .ab-02__btn{transition:none} } ``` ### 03. CSS Pure CSS Ripple Effect Button **Type:** Pure CSS **Description:** A Material Design-inspired ripple effect on button click, achieved entirely with CSS pseudo-elements and the :active state — no JavaScript required. **HTML:** ```html

Click or tap to trigger

``` **CSS:** ```css .ab-03,.ab-03 *,.ab-03 *::before,.ab-03 *::after{box-sizing:border-box;margin:0;padding:0} .ab-03 ::selection{background:#7c3aed;color:#fff} .ab-03{ font-family:system-ui,sans-serif; background:#0f0c1a; min-height:100vh; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:2rem; padding:2rem; } .ab-03__label{ font-size:.78rem; letter-spacing:.14em; text-transform:uppercase; color:#a78bfa; opacity:.6; } .ab-03__row{ display:flex; gap:1rem; flex-wrap:wrap; justify-content:center; } .ab-03__btn{ position:relative; overflow:hidden; padding:.85rem 2rem; font-size:.95rem; font-weight:700; color:#fff; border:none; border-radius:10px; cursor:pointer; outline:none; letter-spacing:.03em; transition:filter .2s; } .ab-03__btn:hover{filter:brightness(1.1)} .ab-03__btn:active{filter:brightness(.9)} .ab-03__btn--violet{background:#7c3aed} .ab-03__btn--teal{background:#0d9488} .ab-03__btn--rose{background:#e11d48} .ab-03__btn::after{ content:''; position:absolute; top:50%;left:50%; width:0;height:0; background:rgba(255,255,255,.4); border-radius:50%; transform:translate(-50%,-50%); pointer-events:none; opacity:0; } .ab-03__btn:active::after{ animation:ab-03-ripple .6s linear forwards; } @keyframes ab-03-ripple{ 0%{width:0;height:0;opacity:.4} 80%{width:400%;height:400%;opacity:.1} 100%{width:500%;height:500%;opacity:0} } @media(prefers-reduced-motion:reduce){ .ab-03__btn:active::after{animation:none} } ``` ### 04. CSS Animated Border Draw Button **Type:** Pure CSS **Description:** Hover triggers a border that draws itself clockwise around the button perimeter using CSS clip-path transitions on pseudo-elements — no SVG required. **HTML:** ```html

Hover to draw the border

``` **CSS:** ```css .ab-04,.ab-04 *,.ab-04 *::before,.ab-04 *::after{box-sizing:border-box;margin:0;padding:0} .ab-04 ::selection{background:#6366f1;color:#fff} .ab-04{ --accent:#6366f1; --fill-bg:#6366f1; font-family:system-ui,sans-serif; background:#09090f; min-height:100vh; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:2.5rem; padding:2rem; } .ab-04__label{ font-size:.78rem; letter-spacing:.14em; text-transform:uppercase; color:#818cf8; opacity:.65; } .ab-04__row{ display:flex; gap:1.25rem; flex-wrap:wrap; justify-content:center; } .ab-04__btn{ position:relative; padding:.85rem 2.2rem; font-size:.95rem; font-weight:700; color:#c7d2fe; background:transparent; border:none; outline:none; cursor:pointer; letter-spacing:.04em; transition:color .4s,background .4s; } .ab-04__btn--green{--accent:#10b981;--fill-bg:#10b981;color:#6ee7b7} .ab-04__btn--rose{--accent:#f43f5e;--fill-bg:#f43f5e;color:#fda4af} .ab-04__btn span{position:relative;z-index:1} .ab-04__btn::before,.ab-04__btn::after{ content:''; position:absolute; inset:0; pointer-events:none; } /* top + right */ .ab-04__btn::before{ border-top:2px solid var(--accent); border-right:2px solid var(--accent); width:0;height:0; transition:width .2s ease,height .2s ease .2s; } /* bottom + left */ .ab-04__btn::after{ border-bottom:2px solid var(--accent); border-left:2px solid var(--accent); width:0;height:0; top:auto;left:auto; right:0;bottom:0; transition:width .2s ease .4s,height .2s ease .2s; } .ab-04__btn:hover::before{width:100%;height:100%} .ab-04__btn:hover::after{width:100%;height:100%} .ab-04__btn:hover{color:#fff;background:rgba(99,102,241,.12)} .ab-04__btn--green:hover{background:rgba(16,185,129,.12)} .ab-04__btn--rose:hover{background:rgba(244,63,94,.12)} @media(prefers-reduced-motion:reduce){ .ab-04__btn::before,.ab-04__btn::after{transition:none;width:100%;height:100%} } ``` ### 05. CSS 3D Press Effect Button **Type:** Pure CSS **Description:** A tactile 3D button that physically sinks into its own raised platform on click, simulating a keycap-style press using CSS transforms and layered box-shadows. **HTML:** ```html

Click or tap the buttons

``` **CSS:** ```css .ab-05,.ab-05 *,.ab-05 *::before,.ab-05 *::after{box-sizing:border-box;margin:0;padding:0} .ab-05 ::selection{background:#4338ca;color:#fff} .ab-05{ font-family:system-ui,sans-serif; background:#f8fafc; min-height:100vh; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:2.5rem; padding:2rem; } .ab-05__label{ font-size:.78rem; letter-spacing:.12em; text-transform:uppercase; color:#64748b; } .ab-05__row{ display:flex; gap:1.25rem; flex-wrap:wrap; justify-content:center; } .ab-05__btn{ --face:#6366f1; --depth:#3730a3; position:relative; padding:.85rem 2.2rem; font-size:1rem; font-weight:800; color:#fff; background:var(--face); border:none; border-radius:10px; cursor:pointer; outline:none; letter-spacing:.03em; box-shadow:0 6px 0 var(--depth),0 8px 12px rgba(0,0,0,.18); transition:transform .08s,box-shadow .08s; will-change:transform; user-select:none; } .ab-05__btn--indigo{--face:#6366f1;--depth:#3730a3} .ab-05__btn--emerald{--face:#10b981;--depth:#065f46} .ab-05__btn--rose{--face:#f43f5e;--depth:#9f1239} .ab-05__btn:hover{filter:brightness(1.05)} .ab-05__btn:active{ transform:translateY(4px); box-shadow:0 2px 0 var(--depth),0 4px 6px rgba(0,0,0,.12); } @media(prefers-reduced-motion:reduce){ .ab-05__btn{transition:none} } ``` ### 06. CSS Liquid Fill Button Animation **Type:** Pure CSS **Description:** A button whose interior fills with a rising liquid wave on hover, created entirely with a CSS pseudo-element, SVG-like border-radius shaping, and a translateY animation. **HTML:** ```html

Hover to fill

``` **CSS:** ```css .ab-06,.ab-06 *,.ab-06 *::before,.ab-06 *::after{box-sizing:border-box;margin:0;padding:0} .ab-06 ::selection{background:#0891b2;color:#fff} .ab-06{ font-family:system-ui,sans-serif; background:#0f172a; min-height:100vh; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:2.5rem; padding:2rem; } .ab-06__label{ font-size:.78rem; letter-spacing:.14em; text-transform:uppercase; color:#94a3b8; opacity:.6; } .ab-06__row{ display:flex; gap:1.25rem; flex-wrap:wrap; justify-content:center; } .ab-06__btn{ --liquid:#0891b2; --border-col:#0891b2; position:relative; overflow:hidden; padding:.85rem 2.2rem; font-size:1rem; font-weight:700; color:#e2e8f0; background:transparent; border:2px solid var(--border-col); border-radius:10px; cursor:pointer; outline:none; letter-spacing:.03em; transition:color .4s; } .ab-06__btn--cyan{--liquid:#0891b2;--border-col:#22d3ee;color:#67e8f9} .ab-06__btn--violet{--liquid:#7c3aed;--border-col:#a78bfa;color:#c4b5fd} .ab-06__btn--amber{--liquid:#d97706;--border-col:#fbbf24;color:#fde68a} .ab-06__btn span{position:relative;z-index:1} .ab-06__btn::before{ content:''; position:absolute; bottom:0;left:-25%; width:150%;height:200%; background:var(--liquid); border-radius:45% 55% 0 0 / 25% 25% 0 0; transform:translateY(100%); transition:transform .65s cubic-bezier(.4,0,.2,1); z-index:0; } .ab-06__btn:hover::before{ transform:translateY(5%); animation:ab-06-wave 2.5s ease-in-out infinite .65s; } .ab-06__btn:hover{color:#fff} @keyframes ab-06-wave{ 0%,100%{border-radius:45% 55% 0 0 / 25% 25% 0 0} 50%{border-radius:55% 45% 0 0 / 20% 30% 0 0} } @media(prefers-reduced-motion:reduce){ .ab-06__btn::before{transition:none} .ab-06__btn:hover::before{animation:none} } ``` ### 07. CSS Moving Gradient CTA Button **Type:** Pure CSS **Description:** An eye-catching call-to-action button with an infinite colour-cycling gradient background that shifts through violet, cyan, and rose — no JavaScript, no images. **HTML:** ```html

Limited Time Offer

Start Your Free Trial

14 days free, no credit card required. Cancel anytime with one click.

``` **CSS:** ```css .ab-07,.ab-07 *,.ab-07 *::before,.ab-07 *::after{box-sizing:border-box;margin:0;padding:0} .ab-07 ::selection{background:#7c3aed;color:#fff} .ab-07{ font-family:system-ui,sans-serif; background:#0a0a14; min-height:100vh; display:flex; align-items:center; justify-content:center; padding:2rem; } .ab-07__card{ background:#13131f; border:1px solid rgba(255,255,255,.07); border-radius:16px; padding:2.5rem 2rem; max-width:440px; text-align:center; } .ab-07__eyebrow{ font-size:.72rem; letter-spacing:.18em; text-transform:uppercase; color:#a78bfa; margin-bottom:.75rem; } .ab-07__heading{ font-size:1.8rem; font-weight:800; color:#f1f5f9; margin-bottom:.75rem; } .ab-07__body{ font-size:.9rem; color:#94a3b8; margin-bottom:1.75rem; line-height:1.6; } .ab-07__btn{ display:inline-block; padding:.9rem 2.4rem; font-size:1rem; font-weight:800; color:#fff; background:linear-gradient(90deg,#7c3aed,#06b6d4,#f43f5e,#7c3aed); background-size:300% 300%; border:none; border-radius:12px; cursor:pointer; outline:none; letter-spacing:.03em; animation:ab-07-shift 4s ease infinite; will-change:background-position; box-shadow:0 4px 20px rgba(124,58,237,.4); transition:filter .2s,box-shadow .2s,transform .15s; } .ab-07__btn:hover{ filter:brightness(1.12); box-shadow:0 6px 32px rgba(124,58,237,.6); transform:translateY(-2px); } .ab-07__btn:active{transform:translateY(0);filter:brightness(.95)} @keyframes ab-07-shift{ 0%{background-position:0% 50%} 50%{background-position:100% 50%} 100%{background-position:0% 50%} } @media(prefers-reduced-motion:reduce){ .ab-07__btn{animation:none;background:linear-gradient(90deg,#7c3aed,#06b6d4)} } ``` ### 08. CSS Shine Sweep Hover Button **Type:** Pure CSS **Description:** A metallic light-streak sweeps diagonally across the button surface on hover, simulating a premium gloss reflection using a CSS pseudo-element gradient and translate animation. **HTML:** ```html

Hover over the buttons

``` **CSS:** ```css .ab-08,.ab-08 *,.ab-08 *::before,.ab-08 *::after{box-sizing:border-box;margin:0;padding:0} .ab-08 ::selection{background:#1e293b;color:#fff} .ab-08{ font-family:system-ui,sans-serif; background:#f1f5f9; min-height:100vh; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:2rem; padding:2rem; } .ab-08__label{ font-size:.78rem; letter-spacing:.14em; text-transform:uppercase; color:#64748b; } .ab-08__row{ display:flex; gap:1rem; flex-wrap:wrap; justify-content:center; } .ab-08__btn{ position:relative; overflow:hidden; padding:.85rem 2.2rem; font-size:.95rem; font-weight:700; border:none; border-radius:10px; cursor:pointer; outline:none; letter-spacing:.04em; transition:filter .2s,transform .15s; } .ab-08__btn--dark{background:#1e293b;color:#e2e8f0} .ab-08__btn--gold{background:linear-gradient(135deg,#b45309,#d97706,#fbbf24);color:#fff} .ab-08__btn--violet{background:linear-gradient(135deg,#4c1d95,#7c3aed,#a78bfa);color:#fff} .ab-08__btn:hover{filter:brightness(1.1);transform:translateY(-2px)} .ab-08__btn:active{transform:translateY(0);filter:brightness(.95)} .ab-08__btn::before{ content:''; position:absolute; top:-10%;left:-20%; width:60%;height:120%; background:linear-gradient(105deg,transparent 30%,rgba(255,255,255,.55) 50%,transparent 70%); transform:translateX(-100%) skewX(-15deg); pointer-events:none; } .ab-08__btn:hover::before{ animation:ab-08-shine .55s ease-in-out forwards; } @keyframes ab-08-shine{ 0%{transform:translateX(-100%) skewX(-15deg)} 100%{transform:translateX(400%) skewX(-15deg)} } @media(prefers-reduced-motion:reduce){ .ab-08__btn:hover::before{animation:none} } ``` ### 09. CSS Jelly Bounce Button Animation **Type:** Pure CSS **Description:** Playful elastic micro-interaction buttons that wobble with a jelly-like spring on hover and snap back with an overshoot settle using CSS scale and skew keyframes. **HTML:** ```html

Hover for jelly effect

``` **CSS:** ```css .ab-09,.ab-09 *,.ab-09 *::before,.ab-09 *::after{box-sizing:border-box;margin:0;padding:0} .ab-09 ::selection{background:#ec4899;color:#fff} .ab-09{ font-family:system-ui,sans-serif; background:#fdf2ff; min-height:100vh; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:2rem; padding:2rem; } .ab-09__label{ font-size:.78rem; letter-spacing:.14em; text-transform:uppercase; color:#a855f7; opacity:.6; } .ab-09__row{ display:flex; gap:1.25rem; flex-wrap:wrap; justify-content:center; } .ab-09__btn{ --c:#ec4899; padding:.85rem 2.2rem; font-size:1.05rem; font-weight:800; color:#fff; background:var(--c); border:none; border-radius:50px; cursor:pointer; outline:none; letter-spacing:.03em; transform-origin:center; box-shadow:0 4px 16px rgba(0,0,0,.15); will-change:transform; } .ab-09__btn--pink{--c:#ec4899} .ab-09__btn--lime{--c:#16a34a} .ab-09__btn--sky{--c:#0284c7} .ab-09__btn:hover{animation:ab-09-jelly .7s cubic-bezier(.4,0,.2,1) both} @keyframes ab-09-jelly{ 0%{transform:scale(1)} 10%{transform:scaleX(1.2) scaleY(.85)} 25%{transform:scaleX(.85) scaleY(1.15)} 40%{transform:scaleX(1.1) scaleY(.92)} 55%{transform:scaleX(.95) scaleY(1.05)} 70%{transform:scaleX(1.03) scaleY(.98)} 85%{transform:scaleX(.99) scaleY(1.01)} 100%{transform:scale(1)} } @media(prefers-reduced-motion:reduce){ .ab-09__btn:hover{animation:none;transform:scale(1.04)} } ``` ### 10. CSS Text Flip Button Hover **Type:** Pure CSS **Description:** Button labels flip vertically on hover to reveal a secondary message — built with CSS 3D perspective transforms on stacked spans, no JavaScript required. **HTML:** ```html

Hover to flip text

``` **CSS:** ```css .ab-10,.ab-10 *,.ab-10 *::before,.ab-10 *::after{box-sizing:border-box;margin:0;padding:0} .ab-10 ::selection{background:#4f46e5;color:#fff} .ab-10{ font-family:system-ui,sans-serif; background:#0f0c1f; min-height:100vh; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:2rem; padding:2rem; } .ab-10__label{ font-size:.78rem; letter-spacing:.14em; text-transform:uppercase; color:#818cf8; opacity:.6; } .ab-10__row{ display:flex; gap:1.25rem; flex-wrap:wrap; justify-content:center; } .ab-10__btn{ --c:#4f46e5; padding:0; background:var(--c); border:none; border-radius:10px; cursor:pointer; outline:none; perspective:600px; } .ab-10__btn--indigo{--c:#4f46e5} .ab-10__btn--teal{--c:#0d9488} .ab-10__btn--rose{--c:#e11d48} .ab-10__inner{ position:relative; display:block; padding:.85rem 2rem; width:9rem; height:3.1rem; overflow:hidden; transform-style:preserve-3d; } .ab-10__front,.ab-10__back{ position:absolute; inset:0; display:flex; align-items:center; justify-content:center; font-size:.95rem; font-weight:700; color:#fff; letter-spacing:.04em; white-space:nowrap; backface-visibility:hidden; transition:transform .35s cubic-bezier(.4,0,.2,1); } .ab-10__front{transform:translateY(0) rotateX(0)} .ab-10__back{transform:translateY(100%) rotateX(-90deg)} .ab-10__btn:hover .ab-10__front{transform:translateY(-100%) rotateX(90deg)} .ab-10__btn:hover .ab-10__back{transform:translateY(0) rotateX(0)} @media(prefers-reduced-motion:reduce){ .ab-10__front,.ab-10__back{transition:none} .ab-10__btn:hover .ab-10__front{transform:none;opacity:0} .ab-10__btn:hover .ab-10__back{transform:none;opacity:1} } ``` ### 11. CSS Animated CTA Hero Button **Type:** CSS + JS **Description:** A hero-section CTA button with a pulsing ring beacon, gradient text label, and particle burst on click — combining CSS animations with a lightweight JS particle emitter. **HTML:** ```html

✦ Now in public beta

The dev platform
built for speed.

Deploy anywhere. Scale effortlessly. Ship today.

No credit card · 50k free API calls included

``` **CSS:** ```css .ab-11,.ab-11 *,.ab-11 *::before,.ab-11 *::after{box-sizing:border-box;margin:0;padding:0} .ab-11 ::selection{background:#7c3aed;color:#fff} .ab-11{ --beacon:#a78bfa; font-family:system-ui,sans-serif; background:#050510; min-height:100vh; display:flex; align-items:center; justify-content:center; padding:2rem; } .ab-11__hero{text-align:center;max-width:520px} .ab-11__eyebrow{font-size:.8rem;letter-spacing:.16em;color:#a78bfa;margin-bottom:1rem;text-transform:uppercase} .ab-11__title{font-size:clamp(2rem,5vw,3rem);font-weight:900;color:#fff;line-height:1.1;margin-bottom:1rem} .ab-11__sub{font-size:1rem;color:#94a3b8;margin-bottom:2rem;line-height:1.6} .ab-11__wrap{ position:relative; display:inline-block; margin-bottom:1rem; } .ab-11__wrap::before,.ab-11__wrap::after{ content:''; position:absolute; inset:-6px; border-radius:16px; border:2px solid var(--beacon); opacity:0; animation:ab-11-beacon 2s ease-out infinite; } .ab-11__wrap::after{animation-delay:.7s} .ab-11__btn{ position:relative; z-index:1; padding:.95rem 2.6rem; font-size:1.05rem; font-weight:800; color:#fff; background:linear-gradient(135deg,#7c3aed,#2563eb); border:none; border-radius:12px; cursor:pointer; outline:none; letter-spacing:.03em; box-shadow:0 4px 24px rgba(124,58,237,.45); transition:filter .2s,transform .15s; } .ab-11__btn:hover{filter:brightness(1.12);transform:translateY(-2px)} .ab-11__btn:active{transform:translateY(0)} .ab-11__note{font-size:.75rem;color:#475569;margin-top:.5rem} @keyframes ab-11-beacon{ 0%{transform:scale(1);opacity:.7} 100%{transform:scale(1.5);opacity:0} } .ab-11__particle{ position:absolute; width:8px;height:8px; border-radius:50%; pointer-events:none; top:50%;left:50%; transform:translate(-50%,-50%); animation:ab-11-burst .7s ease-out forwards; will-change:transform,opacity; } @keyframes ab-11-burst{ 0%{transform:translate(-50%,-50%) translate(0,0) scale(1);opacity:1} 100%{transform:translate(-50%,-50%) translate(var(--dx),var(--dy)) scale(0);opacity:0} } @media(prefers-reduced-motion:reduce){ .ab-11__wrap::before,.ab-11__wrap::after{animation:none} } ``` **JS:** ```js (function(){ var wrap=document.getElementById('ab-11-wrap'); var btn=document.getElementById('ab-11-btn'); if(!btn||!wrap)return; var colours=['#a78bfa','#60a5fa','#34d399','#f472b6','#fbbf24','#fff']; var COUNT=12; btn.addEventListener('click',function(e){ for(var i=0;i

Contact Us

We'll get back to you within 24 hours.

``` **CSS:** ```css .ab-12,.ab-12 *,.ab-12 *::before,.ab-12 *::after{box-sizing:border-box;margin:0;padding:0} .ab-12 ::selection{background:#10b981;color:#fff} .ab-12{ --success:#10b981; --primary:#4f46e5; font-family:system-ui,sans-serif; background:#f8fafc; min-height:100vh; display:flex; align-items:center; justify-content:center; padding:2rem; } .ab-12__card{ background:#fff; border-radius:16px; box-shadow:0 4px 24px rgba(0,0,0,.08); padding:2rem 2rem 2rem; width:100%;max-width:380px; } .ab-12__title{font-size:1.4rem;font-weight:800;color:#1e293b;margin-bottom:.4rem} .ab-12__sub{font-size:.88rem;color:#64748b;margin-bottom:1.5rem;line-height:1.5} .ab-12__field{margin-bottom:.9rem} .ab-12__input{ width:100%; padding:.7rem 1rem; border:1.5px solid #e2e8f0; border-radius:8px; font-size:.9rem; color:#1e293b; outline:none; transition:border-color .2s; background:#f8fafc; } .ab-12__input:focus{border-color:var(--primary)} .ab-12__btn{ position:relative; display:flex; align-items:center; justify-content:center; width:100%; height:48px; padding:0 1.5rem; font-size:1rem; font-weight:700; color:#fff; background:var(--primary); border:none; border-radius:50px; cursor:pointer; outline:none; overflow:hidden; transition:width .4s cubic-bezier(.4,0,.2,1),background .4s,box-shadow .3s; box-shadow:0 4px 16px rgba(79,70,229,.3); margin-top:.25rem; will-change:width; } .ab-12__btn:hover:not(.is-success){filter:brightness(1.08)} .ab-12__btn.is-success{ width:48px; background:var(--success); box-shadow:0 4px 16px rgba(16,185,129,.35); } .ab-12__text{ transition:opacity .2s,transform .2s; white-space:nowrap; } .ab-12__btn.is-success .ab-12__text{opacity:0;transform:scale(.6);position:absolute} .ab-12__check{ position:absolute; width:24px;height:24px; opacity:0; transform:scale(.6); transition:opacity .2s .35s,transform .3s .35s; } .ab-12__check polyline{ stroke-dasharray:30; stroke-dashoffset:30; } .ab-12__btn.is-success .ab-12__check{opacity:1;transform:scale(1)} .ab-12__btn.is-success .ab-12__check polyline{ animation:ab-12-draw .4s ease .4s forwards; } @keyframes ab-12-draw{ to{stroke-dashoffset:0} } @media(prefers-reduced-motion:reduce){ .ab-12__btn,.ab-12__check,.ab-12__text{transition:none} .ab-12__btn.is-success .ab-12__check polyline{animation:none;stroke-dashoffset:0} } ``` **JS:** ```js (function(){ var btn=document.getElementById('ab-12-btn'); if(!btn)return; var timer=null; btn.addEventListener('click',function(){ if(btn.classList.contains('is-success'))return; btn.classList.add('is-success'); btn.disabled=true; clearTimeout(timer); timer=setTimeout(function(){ btn.classList.remove('is-success'); btn.disabled=false; },2500); }); })(); ``` ### 13. CSS Animated Download Button **Type:** CSS + JS **Description:** A download CTA button where clicking triggers a bouncing arrow animation, a progress bar fill, and a completion state — all using CSS transitions and keyframes toggled by JS class changes. **HTML:** ```html

Click the button to download

macOS · 48.2 MB

``` **CSS:** ```css .ab-13,.ab-13 *,.ab-13 *::before,.ab-13 *::after{box-sizing:border-box;margin:0;padding:0} .ab-13 ::selection{background:#2563eb;color:#fff} .ab-13{ font-family:system-ui,sans-serif; background:#f0f4ff; min-height:100vh; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:1.25rem; padding:2rem; } .ab-13__label,.ab-13__size{ font-size:.78rem; letter-spacing:.1em; text-transform:uppercase; color:#64748b; } .ab-13__btn{ position:relative; overflow:hidden; display:inline-flex; align-items:center; gap:.65rem; padding:.9rem 2.4rem; font-size:1rem; font-weight:700; color:#fff; background:#2563eb; border:none; border-radius:12px; cursor:pointer; outline:none; transition:background .3s,box-shadow .3s,transform .15s; box-shadow:0 4px 16px rgba(37,99,235,.4); } .ab-13__btn:hover:not(.is-downloading):not(.is-done){ filter:brightness(1.08); transform:translateY(-2px); } .ab-13__btn:active{transform:translateY(0)} .ab-13__btn::after{ content:''; position:absolute; left:0;bottom:0; width:100%;height:3px; background:rgba(255,255,255,.55); transform:scaleX(0); transform-origin:left; transition:transform 2s linear; pointer-events:none; } .ab-13__btn.is-downloading{background:#1d4ed8;cursor:not-allowed} .ab-13__btn.is-downloading::after{transform:scaleX(1)} .ab-13__btn.is-done{background:#059669;box-shadow:0 4px 16px rgba(5,150,105,.4)} .ab-13__icon{ width:20px;height:20px; flex-shrink:0; transition:transform .2s; } .ab-13__btn.is-downloading .ab-13__icon{ animation:ab-13-bounce .6s ease-in-out infinite; } .ab-13__btn.is-done .ab-13__icon{ animation:none; transform:rotate(0); } @keyframes ab-13-bounce{ 0%,100%{transform:translateY(0)} 50%{transform:translateY(4px)} } @media(prefers-reduced-motion:reduce){ .ab-13__btn.is-downloading .ab-13__icon{animation:none} .ab-13__btn::after{transition:none} } ``` **JS:** ```js (function(){ var btn=document.getElementById('ab-13-btn'); var txt=document.getElementById('ab-13-text'); var icon=document.getElementById('ab-13-icon'); if(!btn||!txt)return; var CHECK=''; var DONE_ICON=''; var orig=icon.innerHTML; var downloading=false; btn.addEventListener('click',function(){ if(downloading||btn.classList.contains('is-done'))return; downloading=true; btn.classList.add('is-downloading'); txt.textContent='Downloading…'; setTimeout(function(){ btn.classList.remove('is-downloading'); btn.classList.add('is-done'); icon.innerHTML=DONE_ICON; txt.textContent='Downloaded!'; setTimeout(function(){ btn.classList.remove('is-done'); icon.innerHTML=orig; txt.textContent='Download v2.4.1'; downloading=false; },2000); },2200); }); })(); ``` ### 14. CSS Hamburger To Close Button **Type:** CSS + JS **Description:** The classic three-line hamburger menu icon morphs smoothly into an × close icon via CSS transform transitions — no SVG swaps, just rotating and fading three spans. **HTML:** ```html ``` **CSS:** ```css .ab-14,.ab-14 *,.ab-14 *::before,.ab-14 *::after{box-sizing:border-box;margin:0;padding:0} .ab-14 ::selection{background:#7c3aed;color:#fff} .ab-14{ font-family:system-ui,sans-serif; background:#0f172a; min-height:100vh; } .ab-14__nav{ display:flex; align-items:center; justify-content:space-between; padding:1rem 1.5rem; border-bottom:1px solid rgba(255,255,255,.07); } .ab-14__brand{ font-size:1.1rem; font-weight:800; color:#f1f5f9; letter-spacing:-.01em; } .ab-14__btn{ display:flex; flex-direction:column; justify-content:center; gap:6px; width:40px;height:40px; background:rgba(255,255,255,.06); border:1px solid rgba(255,255,255,.1); border-radius:8px; cursor:pointer; outline:none; align-items:center; transition:background .25s; } .ab-14__btn:hover{background:rgba(255,255,255,.1)} .ab-14__btn.is-open{background:rgba(124,58,237,.2);border-color:rgba(124,58,237,.4)} .ab-14__bar{ display:block; width:22px;height:2px; background:#e2e8f0; border-radius:2px; transform-origin:center; transition:transform .3s cubic-bezier(.4,0,.2,1),opacity .3s,background .3s; } .ab-14__btn.is-open .ab-14__bar:nth-child(1){transform:translateY(8px) rotate(45deg);background:#a78bfa} .ab-14__btn.is-open .ab-14__bar:nth-child(2){opacity:0;transform:scaleX(0)} .ab-14__btn.is-open .ab-14__bar:nth-child(3){transform:translateY(-8px) rotate(-45deg);background:#a78bfa} .ab-14__menu{ display:flex; flex-direction:column; overflow:hidden; max-height:0; transition:max-height .4s cubic-bezier(.4,0,.2,1),opacity .3s; opacity:0; padding:0 1.5rem; } .ab-14__menu.is-open{max-height:200px;opacity:1;padding:1rem 1.5rem} .ab-14__link{ display:block; padding:.6rem 0; font-size:.95rem; font-weight:600; color:#94a3b8; text-decoration:none; border-bottom:1px solid rgba(255,255,255,.05); transition:color .2s; } .ab-14__link:last-child{border-bottom:none} .ab-14__link:hover{color:#f1f5f9} @media(prefers-reduced-motion:reduce){ .ab-14__bar,.ab-14__menu{transition:none} } ``` **JS:** ```js (function(){ var btn=document.getElementById('ab-14-btn'); var menu=document.getElementById('ab-14-menu'); if(!btn||!menu)return; btn.addEventListener('click',function(){ var open=btn.classList.toggle('is-open'); menu.classList.toggle('is-open',open); btn.setAttribute('aria-expanded',open.toString()); menu.setAttribute('aria-hidden',(!open).toString()); }); })(); ``` ### 15. CSS Add To Cart Button Animation **Type:** CSS + JS **Description:** An e-commerce add-to-cart button that animates a product dot flying into a cart icon badge on click, with a count increment and brief success flash. **HTML:** ```html

Mechanical Keyboard Pro

$149.00

``` **CSS:** ```css .ab-15,.ab-15 *,.ab-15 *::before,.ab-15 *::after{box-sizing:border-box;margin:0;padding:0} .ab-15 ::selection{background:#f59e0b;color:#fff} .ab-15{ --dot-color:#f59e0b; font-family:system-ui,sans-serif; background:#fff7ed; min-height:100vh; display:flex; align-items:center; justify-content:center; padding:2rem; } .ab-15__card{ background:#fff; border-radius:16px; box-shadow:0 4px 24px rgba(0,0,0,.08); padding:1.5rem; width:100%;max-width:360px; } .ab-15__product{display:flex;gap:1rem;margin-bottom:1.25rem;align-items:center} .ab-15__img{ width:72px;height:72px;flex-shrink:0; background:linear-gradient(135deg,#fde68a,#f59e0b); border-radius:10px; } .ab-15__name{font-size:.95rem;font-weight:700;color:#1e293b;margin-bottom:.35rem} .ab-15__price{font-size:1.15rem;font-weight:800;color:#f59e0b} .ab-15__actions{position:relative} .ab-15__btn{ position:relative; display:flex; align-items:center; gap:.6rem; width:100%; padding:.85rem 1.5rem; font-size:.95rem; font-weight:700; color:#fff; background:#1e293b; border:none; border-radius:10px; cursor:pointer; outline:none; transition:background .3s,transform .15s; overflow:visible; } .ab-15__btn:hover{background:#334155;transform:translateY(-1px)} .ab-15__btn.is-added{background:#059669} .ab-15__btn:active{transform:translateY(0)} .ab-15__cart-icon{width:20px;height:20px;flex-shrink:0} .ab-15__badge{ position:absolute; top:-8px;right:-8px; min-width:20px;height:20px; padding:0 5px; background:#f59e0b; color:#fff; font-size:.72rem; font-weight:800; border-radius:10px; display:flex;align-items:center;justify-content:center; border:2px solid #fff; } .ab-15__badge.pop{animation:ab-15-pop .3s ease both} @keyframes ab-15-pop{ 0%{transform:scale(1)} 50%{transform:scale(1.5)} 100%{transform:scale(1)} } .ab-15__dot{ position:fixed; width:10px;height:10px; border-radius:50%; background:var(--dot-color,#f59e0b); pointer-events:none; z-index:9999; animation:ab-15-fly .65s cubic-bezier(.4,0,.2,1) forwards; will-change:transform,opacity; } @keyframes ab-15-fly{ 0%{transform:translate(0,0) scale(1);opacity:1} 50%{transform:translate(calc(var(--tx)*.5),calc(var(--ty)*.5 - 40px)) scale(.8);opacity:.9} 100%{transform:translate(var(--tx),var(--ty)) scale(0);opacity:0} } @media(prefers-reduced-motion:reduce){ .ab-15__dot{animation:none;opacity:0} .ab-15__badge.pop{animation:none} } ``` **JS:** ```js (function(){ var btn=document.getElementById('ab-15-btn'); var badge=document.getElementById('ab-15-badge'); if(!btn||!badge)return; var count=0; function flyDot(e){ var br=btn.getBoundingClientRect(); var bbr=badge.getBoundingClientRect(); var startX=e.clientX-5; var startY=e.clientY-5; var endX=bbr.left+bbr.width/2-5; var endY=bbr.top+bbr.height/2-5; var dot=document.createElement('div'); dot.className='ab-15__dot'; dot.style.left=startX+'px'; dot.style.top=startY+'px'; dot.style.setProperty('--tx',(endX-startX)+'px'); dot.style.setProperty('--ty',(endY-startY)+'px'); document.body.appendChild(dot); dot.addEventListener('animationend',function(){ dot.remove(); count++; badge.textContent=count; badge.classList.remove('pop'); void badge.offsetWidth; badge.classList.add('pop'); }); } btn.addEventListener('click',function(e){ btn.classList.add('is-added'); setTimeout(function(){btn.classList.remove('is-added')},800); flyDot(e); }); })(); ``` ### 16. CSS Social Share Buttons Hover **Type:** CSS + JS **Description:** A row of social share icon buttons with brand-colour reveals, floating tooltips, and a URL-copy button that flashes a "Copied!" confirmation on click. **HTML:** ```html

Share this article

``` **CSS:** ```css .ab-16,.ab-16 *,.ab-16 *::before,.ab-16 *::after{box-sizing:border-box;margin:0;padding:0} .ab-16 ::selection{background:#7c3aed;color:#fff} .ab-16{ font-family:system-ui,sans-serif; background:#f8fafc; min-height:100vh; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:1.5rem; padding:2rem; } .ab-16__label{ font-size:.8rem; font-weight:600; letter-spacing:.12em; text-transform:uppercase; color:#64748b; } .ab-16__row{ display:flex; gap:.75rem; } .ab-16__btn{ --brand:#1e293b; position:relative; width:44px;height:44px; display:flex;align-items:center;justify-content:center; background:#1e293b; color:#e2e8f0; border:none; border-radius:10px; cursor:pointer; outline:none; transition:background .25s,color .25s,transform .2s,box-shadow .25s; } .ab-16__btn svg{width:18px;height:18px;pointer-events:none} .ab-16__btn:hover{ background:var(--brand); color:#fff; transform:translateY(-3px); box-shadow:0 6px 16px rgba(0,0,0,.2); } .ab-16__btn:active{transform:translateY(0)} .ab-16__btn::after{ content:attr(data-tooltip); position:absolute; bottom:calc(100% + 8px); left:50%;transform:translateX(-50%) translateY(4px); background:#1e293b; color:#f1f5f9; font-size:.72rem; font-weight:600; white-space:nowrap; padding:.3rem .6rem; border-radius:6px; pointer-events:none; opacity:0; transition:opacity .2s,transform .2s; } .ab-16__btn:hover::after{opacity:1;transform:translateX(-50%) translateY(0)} .ab-16__copy.is-copied{background:#059669 !important;color:#fff;transform:translateY(-3px)} @media(prefers-reduced-motion:reduce){ .ab-16__btn{transition:background .1s,color .1s} .ab-16__btn::after{transition:none} } ``` **JS:** ```js (function(){ var copyBtn=document.getElementById('ab-16-copy'); if(!copyBtn)return; copyBtn.addEventListener('click',function(){ var url=window.location.href; if(navigator.clipboard){ navigator.clipboard.writeText(url).then(showCopied).catch(function(){fallbackCopy(url)}); }else{fallbackCopy(url)} }); function showCopied(){ copyBtn.classList.add('is-copied'); copyBtn.dataset.tooltip='Copied!'; setTimeout(function(){ copyBtn.classList.remove('is-copied'); copyBtn.dataset.tooltip='Copy Link'; },1500); } function fallbackCopy(url){ var t=document.createElement('textarea'); t.value=url;t.style.position='fixed';t.style.opacity='0'; document.body.appendChild(t);t.select(); try{document.execCommand('copy');showCopied();}catch(e){} document.body.removeChild(t); } })(); ``` ### 17. CSS Animated Toggle Switch Button **Type:** CSS + JS **Description:** A collection of iOS-style animated toggle switches for dark mode, notifications, and auto-save — styled with pure CSS and driven by accessible checkbox inputs. **HTML:** ```html

Preferences

Dark Mode

Off

Push Notifications

Off

Auto-Save

Off

``` **CSS:** ```css .ab-17,.ab-17 *,.ab-17 *::before,.ab-17 *::after{box-sizing:border-box;margin:0;padding:0} .ab-17 ::selection{background:#7c3aed;color:#fff} .ab-17{ font-family:system-ui,sans-serif; background:#f8fafc; min-height:100vh; display:flex; flex-direction:column; align-items:center; justify-content:center; padding:2rem; } .ab-17__heading{ font-size:.8rem; font-weight:700; letter-spacing:.14em; text-transform:uppercase; color:#64748b; margin-bottom:1.25rem; align-self:flex-start; max-width:380px; width:100%; } .ab-17__list{width:100%;max-width:380px;display:flex;flex-direction:column;gap:.5rem} .ab-17__row{ display:flex; align-items:center; justify-content:space-between; padding:1rem; background:#fff; border-radius:12px; border:1.5px solid #e2e8f0; transition:border-color .3s,background .3s; } .ab-17__row.is-active{border-color:rgba(124,58,237,.3);background:#faf7ff} .ab-17__title{font-size:.93rem;font-weight:600;color:#1e293b} .ab-17__status{font-size:.78rem;color:#94a3b8;margin-top:.15rem} .ab-17__toggle{position:relative} .ab-17__input{ position:absolute; opacity:0; width:0;height:0; } .ab-17__track{ --on-color:#7c3aed; display:flex; align-items:center; width:50px;height:28px; background:#cbd5e1; border-radius:50px; cursor:pointer; transition:background .3s; padding:3px; } .ab-17__input:checked+.ab-17__track{background:var(--on-color)} .ab-17__knob{ width:22px;height:22px; background:#fff; border-radius:50%; box-shadow:0 1px 4px rgba(0,0,0,.2); transition:transform .3s cubic-bezier(.4,0,.2,1); } .ab-17__input:checked+.ab-17__track .ab-17__knob{transform:translateX(22px)} .ab-17__input:focus-visible+.ab-17__track{outline:2px solid #7c3aed;outline-offset:2px} @media(prefers-reduced-motion:reduce){ .ab-17__knob,.ab-17__track,.ab-17__row{transition:none} } ``` **JS:** ```js (function(){ var ids=[0,1,2]; ids.forEach(function(i){ var inp=document.getElementById('ab-17-t'+i); var status=document.getElementById('ab-17-s'+i); var row=document.getElementById('ab-17-row-'+i); if(!inp||!status||!row)return; function update(){ var on=inp.checked; status.textContent=on?'On':'Off'; row.classList.toggle('is-active',on); } update(); inp.addEventListener('change',update); }); })(); ``` ### 18. CSS Loading Spinner Inside Button **Type:** CSS + JS **Description:** A button that reveals a micro-spinner overlay and transitions to a disabled loading state on click, then resolves to success — all using CSS transitions and a JS state machine. **HTML:** ```html

Click to simulate a request

``` **CSS:** ```css .ab-18,.ab-18 *,.ab-18 *::before,.ab-18 *::after{box-sizing:border-box;margin:0;padding:0} .ab-18 ::selection{background:#4f46e5;color:#fff} .ab-18{ font-family:system-ui,sans-serif; background:#f1f5f9; min-height:100vh; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:2rem; padding:2rem; } .ab-18__label{font-size:.78rem;letter-spacing:.14em;text-transform:uppercase;color:#64748b} .ab-18__group{display:flex;gap:1rem;flex-wrap:wrap;justify-content:center} .ab-18__btn{ position:relative; display:inline-flex; align-items:center; justify-content:center; padding:.85rem 2rem; min-width:160px; font-size:.95rem; font-weight:700; color:#fff; background:#4f46e5; border:2px solid #4f46e5; border-radius:10px; cursor:pointer; outline:none; transition:background .3s,border-color .3s,transform .15s; overflow:hidden; } .ab-18__btn--outline{background:transparent;color:#4f46e5} .ab-18__btn:hover:not([disabled]){filter:brightness(1.08);transform:translateY(-1px)} .ab-18__btn:active:not([disabled]){transform:translateY(0)} .ab-18__btn[disabled]{cursor:not-allowed;opacity:.85} .ab-18__text{transition:opacity .25s;display:block} .ab-18__check{ position:absolute; width:20px;height:20px; opacity:0; transform:scale(.5); transition:opacity .3s .2s,transform .3s .2s; } .ab-18__check polyline{stroke-dasharray:24;stroke-dashoffset:24} /* spinner */ .ab-18__btn::after{ content:''; position:absolute; width:18px;height:18px; border-radius:50%; border:2px solid rgba(255,255,255,.3); border-top-color:#fff; opacity:0; transform:scale(0); transition:opacity .2s,transform .2s; pointer-events:none; } .ab-18__btn--outline::after{border:2px solid rgba(79,70,229,.3);border-top-color:#4f46e5} /* loading state */ .ab-18__btn.is-loading .ab-18__text{opacity:0} .ab-18__btn.is-loading::after{ opacity:1;transform:scale(1); animation:ab-18-spin .8s linear infinite; } /* success state */ .ab-18__btn.is-success{background:#059669;border-color:#059669} .ab-18__btn.is-success .ab-18__text{opacity:0} .ab-18__btn.is-success .ab-18__check{opacity:1;transform:scale(1)} .ab-18__btn.is-success .ab-18__check polyline{animation:ab-18-draw .4s ease .1s forwards} @keyframes ab-18-spin{to{transform:scale(1) rotate(360deg)}} @keyframes ab-18-draw{to{stroke-dashoffset:0}} @media(prefers-reduced-motion:reduce){ .ab-18__btn.is-loading::after{animation:none} .ab-18__btn.is-success .ab-18__check polyline{animation:none;stroke-dashoffset:0} .ab-18__text,.ab-18__check{transition:none} } ``` **JS:** ```js (function(){ function makeBtn(id,txtId){ var btn=document.getElementById(id); var txt=document.getElementById(txtId); if(!btn||!txt)return; var orig=txt.textContent; var busy=false; btn.style.width=btn.offsetWidth+'px'; btn.addEventListener('click',function(){ if(busy)return;busy=true; btn.classList.add('is-loading'); btn.disabled=true; setTimeout(function(){ btn.classList.remove('is-loading'); btn.classList.add('is-success'); setTimeout(function(){ btn.classList.remove('is-success'); btn.disabled=false; busy=false; },1800); },2000); }); } makeBtn('ab-18-btn','ab-18-text'); makeBtn('ab-18-btn2','ab-18-text2'); })(); ``` ### 19. CSS Next Prev Arrow Button Hover **Type:** CSS + JS **Description:** Pagination and slider navigation controls where arrow icons slide subtly forward or backward on hover, with a functional slide counter driven by JS. **HTML:** ```html

Slide 1 of 5

Effortless Deployment

Push your code and watch it go live in seconds. Zero config, zero downtime.

01 / 05
``` **CSS:** ```css .ab-19,.ab-19 *,.ab-19 *::before,.ab-19 *::after{box-sizing:border-box;margin:0;padding:0} .ab-19 ::selection{background:#6366f1;color:#fff} .ab-19{ font-family:system-ui,sans-serif; background:#0f172a; min-height:100vh; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:2rem; padding:2rem; } .ab-19__slides{ width:100%;max-width:480px; background:#1e293b; border:1px solid rgba(255,255,255,.07); border-radius:16px; padding:2rem; min-height:130px; } .ab-19__slide-label{font-size:.72rem;letter-spacing:.12em;text-transform:uppercase;color:#475569;margin-bottom:.6rem} .ab-19__slide-title{font-size:1.3rem;font-weight:800;color:#f1f5f9;margin-bottom:.5rem} .ab-19__slide-body{font-size:.88rem;color:#94a3b8;line-height:1.6} .ab-19__nav{display:flex;align-items:center;gap:1.25rem} .ab-19__counter{ font-size:.85rem; font-weight:700; color:#94a3b8; letter-spacing:.08em; min-width:60px; text-align:center; transition:transform .2s; } .ab-19__counter.tick{animation:ab-19-countup .25s ease both} @keyframes ab-19-countup{0%{transform:scale(1.3)}100%{transform:scale(1)}} .ab-19__arrow{ position:relative; width:44px;height:44px; display:flex;align-items:center;justify-content:center; background:#1e293b; border:1.5px solid rgba(255,255,255,.1); border-radius:10px; cursor:pointer; outline:none; color:#e2e8f0; transition:background .2s,border-color .2s,transform .15s; overflow:hidden; } .ab-19__arrow:hover:not(.is-disabled){background:#334155;border-color:rgba(99,102,241,.5);transform:scale(1.06)} .ab-19__arrow.is-disabled{opacity:.35;cursor:not-allowed} .ab-19__arrow-inner{ display:flex;align-items:center;justify-content:center; position:relative;width:24px;height:24px;overflow:hidden; } .ab-19__icon{ position:absolute; width:22px;height:22px; transition:transform .3s cubic-bezier(.4,0,.2,1); } .ab-19__icon--ghost{ opacity:0; pointer-events:none; } /* next arrow hover */ .ab-19__arrow--next:hover:not(.is-disabled) .ab-19__icon:not(.ab-19__icon--ghost){transform:translateX(120%)} .ab-19__arrow--next .ab-19__icon--ghost{transform:translateX(-120%);opacity:1} .ab-19__arrow--next:hover:not(.is-disabled) .ab-19__icon--ghost{transform:translateX(0)} /* prev arrow hover */ .ab-19__arrow--prev:hover:not(.is-disabled) .ab-19__icon:not(.ab-19__icon--ghost){transform:translateX(-120%)} .ab-19__arrow--prev .ab-19__icon--ghost{transform:translateX(120%);opacity:1} .ab-19__arrow--prev:hover:not(.is-disabled) .ab-19__icon--ghost{transform:translateX(0)} @media(prefers-reduced-motion:reduce){ .ab-19__icon,.ab-19__counter{transition:none} .ab-19__counter.tick{animation:none} } ``` **JS:** ```js (function(){ var prev=document.getElementById('ab-19-prev'); var next=document.getElementById('ab-19-next'); var counter=document.getElementById('ab-19-counter'); var slide=document.getElementById('ab-19-slide'); if(!prev||!next||!counter||!slide)return; var TOTAL=5; var idx=0; var TITLES=['Effortless Deployment','Instant Scaling','Built-in Observability','Zero Config Security','Global Edge Network']; var BODIES=[ 'Push your code and watch it go live in seconds. Zero config, zero downtime.', 'Handle millions of requests without touching infrastructure settings.', 'Real-time logs, traces, and metrics out of the box.', 'Automatic TLS, DDoS protection, and secrets management included.', 'Your app served from 300+ PoPs worldwide, under 20ms latency.' ]; function pad(n){return n<10?'0'+n:String(n)} function update(){ slide.querySelector('.ab-19__slide-label').textContent='Slide '+(idx+1)+' of '+TOTAL; slide.querySelector('.ab-19__slide-title').textContent=TITLES[idx]; slide.querySelector('.ab-19__slide-body').textContent=BODIES[idx]; counter.textContent=pad(idx+1)+' / '+pad(TOTAL); counter.classList.remove('tick'); void counter.offsetWidth; counter.classList.add('tick'); prev.classList.toggle('is-disabled',idx===0); next.classList.toggle('is-disabled',idx===TOTAL-1); } prev.addEventListener('click',function(){if(idx>0){idx--;update()}}); next.addEventListener('click',function(){if(idx

Hover from any direction

``` **CSS:** ```css .ab-20,.ab-20 *,.ab-20 *::before,.ab-20 *::after{box-sizing:border-box;margin:0;padding:0} .ab-20 ::selection{background:#7c3aed;color:#fff} .ab-20{ font-family:system-ui,sans-serif; background:#0a0a14; min-height:100vh; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:2rem; padding:2rem; } .ab-20__label{font-size:.78rem;letter-spacing:.14em;text-transform:uppercase;color:#475569} .ab-20__row{display:flex;gap:1rem;flex-wrap:wrap;justify-content:center} .ab-20__btn{ --fill-color:#7c3aed; position:relative; overflow:hidden; padding:.85rem 2.2rem; font-size:.95rem; font-weight:700; color:#e2e8f0; background:transparent; border:2px solid rgba(255,255,255,.2); border-radius:10px; cursor:pointer; outline:none; transition:color .35s,border-color .35s; } .ab-20__btn--violet{--fill-color:#7c3aed;color:#c4b5fd;border-color:#7c3aed} .ab-20__btn--cyan{--fill-color:#0891b2;color:#67e8f9;border-color:#0891b2} .ab-20__btn--rose{--fill-color:#e11d48;color:#fda4af;border-color:#e11d48} .ab-20__btn.is-hovered{color:#fff;border-color:transparent} .ab-20__fill{ position:absolute; border-radius:50%; background:var(--fill-color); left:var(--rx,50%); top:var(--ry,50%); width:0;height:0; transform:translate(-50%,-50%); transition:width .5s cubic-bezier(.4,0,.2,1),height .5s cubic-bezier(.4,0,.2,1); pointer-events:none; z-index:0; } .ab-20__btn.is-hovered .ab-20__fill{ width:var(--size,400px); height:var(--size,400px); } .ab-20__label-inner{position:relative;z-index:1} @media(prefers-reduced-motion:reduce){ .ab-20__fill{transition:none} .ab-20__btn.is-hovered .ab-20__fill{width:100%;height:100%;border-radius:0} } ``` **JS:** ```js (function(){ var btns=document.querySelectorAll('.ab-20__btn'); btns.forEach(function(btn){ var fill=btn.querySelector('.ab-20__fill'); if(!fill)return; var diag=Math.sqrt(Math.pow(btn.offsetWidth,2)+Math.pow(btn.offsetHeight,2)); btn.style.setProperty('--size',diag*3+'px'); btn.addEventListener('mouseenter',function(e){ fill.style.setProperty('--rx',e.offsetX+'px'); fill.style.setProperty('--ry',e.offsetY+'px'); btn.classList.add('is-hovered'); }); btn.addEventListener('mouseleave',function(e){ fill.style.setProperty('--rx',e.offsetX+'px'); fill.style.setProperty('--ry',e.offsetY+'px'); btn.classList.remove('is-hovered'); }); }); })(); ``` --- ## 15 CSS Background Animations URL: https://codefronts.com/motion/css-background-animations/ Description: 15 hand-coded CSS background animations with live demos — infinite shifting gradient, floating particle bubbles, parallax starry night, clickable cyberpunk ripple, sliding geometric grid, SVG wave overlays, glassmorphism orbs, aurora borealis ribbons, matrix digital rain, mesh gradient blobs, falling snow, morphing blob, retro synthwave 3D grid, infinite scrolling diagonal marquee, comic-book halftone dots. 100% Pure CSS, no JavaScript, no canvas, no particles.js. prefers-reduced-motion respected, scoped class names, MIT-licensed. Demo count: 15 ### 01. Animated Gradient Backgrounds (Infinite Shifting) **Type:** Pure CSS **Description:** A six-color gradient drifting endlessly across the viewport, layered with blended radial blobs and a fine grain overlay for depth. Pure CSS, zero extra markup — ideal for hero sections and landing pages. **HTML:** ```html
``` **CSS:** ```css .bga-01, .bga-01 *, .bga-01 *::before, .bga-01 *::after { box-sizing: border-box; margin: 0; padding: 0; } .bga-01 { min-height: 460px; display: grid; place-items: stretch; } .bga-01__scene { width: 100%; min-height: 460px; position: relative; overflow: hidden; background: linear-gradient( 130deg, #ff6b6b, #feca57, #48dbfb, #5f27cd, #ff9ff3, #00d2d3 ); background-size: 400% 400%; animation: bga-01-drift 16s ease-in-out infinite; } /* Second mesh layer using radial blobs for depth */ .bga-01__scene::before { content: ""; position: absolute; inset: -20%; background: radial-gradient(40% 50% at 20% 30%, rgba(255,255,255,0.45), transparent 60%), radial-gradient(45% 45% at 80% 25%, rgba(95,39,205,0.55), transparent 55%), radial-gradient(50% 55% at 65% 80%, rgba(0,210,211,0.5), transparent 60%), radial-gradient(40% 40% at 25% 75%, rgba(254,202,87,0.5), transparent 55%); filter: blur(10px); mix-blend-mode: overlay; animation: bga-01-meshmove 20s ease-in-out infinite alternate; } /* Fine grain overlay */ .bga-01__scene::after { content: ""; position: absolute; inset: 0; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E"); opacity: 0.06; pointer-events: none; mix-blend-mode: overlay; } @keyframes bga-01-drift { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } } @keyframes bga-01-meshmove { 0% { transform: translate3d(-3%, -2%, 0) rotate(0deg) scale(1.05); } 100% { transform: translate3d(3%, 2%, 0) rotate(8deg) scale(1.15); } } @media (prefers-reduced-motion: reduce) { .bga-01__scene, .bga-01__scene::before, .bga-01__scene::after { animation: none !important; } } ``` ### 02. Floating Particle or Bubble Effects **Type:** Pure CSS **Description:** Fifteen luminous bubbles rising and drifting on randomized durations and delays for an organic, lava-lamp feel over a deep navy radial backdrop. A lightweight vanilla-CSS alternative to particles.js for login screens and SaaS pages. **HTML:** ```html
``` **CSS:** ```css .bga-02, .bga-02 *, .bga-02 *::before, .bga-02 *::after { box-sizing: border-box; margin: 0; padding: 0; } .bga-02 { min-height: 460px; display: grid; place-items: stretch; } .bga-02__scene { width: 100%; min-height: 460px; position: relative; overflow: hidden; background: radial-gradient(circle at 50% 120%, #1b2a4a 0%, #0a0f1f 60%, #05060d 100%); } .bga-02__bubbles { position: absolute; inset: 0; } .bga-02__bubble { position: absolute; bottom: -160px; border-radius: 50%; background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.9), rgba(120,200,255,0.35) 40%, rgba(80,140,255,0.05) 70%); box-shadow: 0 0 24px rgba(120,200,255,0.35), inset 0 0 12px rgba(255,255,255,0.4); opacity: 0; animation: bga-02-rise linear infinite; } @keyframes bga-02-rise { 0% { transform: translateY(0) translateX(0) scale(0.6); opacity: 0; } 10% { opacity: 0.9; } 50% { transform: translateY(-55vh) translateX(30px) scale(1); } 90% { opacity: 0.7; } 100% { transform: translateY(-115vh) translateX(-20px) scale(1.2); opacity: 0; } } /* Individually tuned bubbles for an organic feel */ .bga-02__bubble:nth-child(1) { left: 5%; width: 28px; height: 28px; animation-duration: 14s; animation-delay: 0s; } .bga-02__bubble:nth-child(2) { left: 14%; width: 56px; height: 56px; animation-duration: 20s; animation-delay: 2s; } .bga-02__bubble:nth-child(3) { left: 22%; width: 18px; height: 18px; animation-duration: 11s; animation-delay: 4s; } .bga-02__bubble:nth-child(4) { left: 31%; width: 72px; height: 72px; animation-duration: 24s; animation-delay: 1s; } .bga-02__bubble:nth-child(5) { left: 40%; width: 34px; height: 34px; animation-duration: 16s; animation-delay: 6s; } .bga-02__bubble:nth-child(6) { left: 48%; width: 22px; height: 22px; animation-duration: 13s; animation-delay: 3s; } .bga-02__bubble:nth-child(7) { left: 56%; width: 60px; height: 60px; animation-duration: 22s; animation-delay: 5s; } .bga-02__bubble:nth-child(8) { left: 64%; width: 16px; height: 16px; animation-duration: 10s; animation-delay: 7s; } .bga-02__bubble:nth-child(9) { left: 72%; width: 44px; height: 44px; animation-duration: 18s; animation-delay: 0.5s; } .bga-02__bubble:nth-child(10) { left: 80%; width: 80px; height: 80px; animation-duration: 26s; animation-delay: 8s; } .bga-02__bubble:nth-child(11) { left: 88%; width: 26px; height: 26px; animation-duration: 15s; animation-delay: 4.5s; } .bga-02__bubble:nth-child(12) { left: 94%; width: 50px; height: 50px; animation-duration: 21s; animation-delay: 2.5s; } .bga-02__bubble:nth-child(13) { left: 10%; width: 40px; height: 40px; animation-duration: 19s; animation-delay: 9s; } .bga-02__bubble:nth-child(14) { left: 36%; width: 14px; height: 14px; animation-duration: 9s; animation-delay: 6.5s; } .bga-02__bubble:nth-child(15) { left: 68%; width: 30px; height: 30px; animation-duration: 17s; animation-delay: 3.5s; } @media (prefers-reduced-motion: reduce) { .bga-02__bubble { animation: none !important; } } ``` ### 03. Starry Night / Parallax Space Background **Type:** Pure CSS **Description:** Three star layers built from stacked box-shadow dots scrolling at different speeds for true parallax, plus a drifting nebula glow, twinkling stars, and a recurring shooting star. Perfect for dark themes and tech/crypto headers. **HTML:** ```html
``` **CSS:** ```css .bga-03, .bga-03 *, .bga-03 *::before, .bga-03 *::after { box-sizing: border-box; margin: 0; padding: 0; } .bga-03 { min-height: 460px; display: grid; place-items: stretch; } .bga-03__scene { width: 100%; min-height: 460px; position: relative; overflow: hidden; background: radial-gradient(ellipse at bottom, #1b2735 0%, #090a0f 80%); } /* Three star layers built from box-shadow on tiny pseudo dots */ .bga-03__stars, .bga-03__stars2, .bga-03__stars3 { position: absolute; top: 0; left: 0; width: 1px; height: 1px; background: transparent; border-radius: 50%; } .bga-03__stars { box-shadow: 120px 340px #fff, 700px 120px #fff, 300px 560px #fff, 980px 410px #fff, 540px 80px #fff, 1300px 300px #fff, 220px 760px #fff, 860px 640px #fff, 1500px 540px #fff, 60px 200px #fff, 1100px 700px #fff, 400px 250px #fff, 760px 480px #fff, 1700px 180px #fff, 1000px 60px #fff; animation: bga-03-twinkle 4s ease-in-out infinite alternate, bga-03-scrollUp 90s linear infinite; } .bga-03__stars2 { box-shadow: 200px 500px #cfe8ff, 640px 300px #cfe8ff, 1200px 150px #cfe8ff, 480px 700px #cfe8ff, 900px 520px #cfe8ff, 1450px 380px #cfe8ff, 100px 640px #cfe8ff, 1600px 700px #cfe8ff, 340px 120px #cfe8ff, 1050px 440px #cfe8ff; width: 2px; height: 2px; animation: bga-03-twinkle 6s ease-in-out infinite alternate, bga-03-scrollUp 130s linear infinite; } .bga-03__stars3 { box-shadow: 420px 360px #fff7d6, 880px 200px #fff7d6, 1350px 600px #fff7d6, 160px 80px #fff7d6, 1550px 280px #fff7d6, 720px 700px #fff7d6, 60px 460px #fff7d6; width: 3px; height: 3px; animation: bga-03-twinkle 5s ease-in-out infinite alternate, bga-03-scrollUp 180s linear infinite; } /* A drifting nebula glow for richness */ .bga-03__nebula { position: absolute; inset: -10%; background: radial-gradient(35% 40% at 25% 30%, rgba(98,71,170,0.35), transparent 60%), radial-gradient(40% 45% at 75% 65%, rgba(36,120,160,0.30), transparent 60%), radial-gradient(30% 30% at 60% 20%, rgba(170,60,120,0.22), transparent 60%); filter: blur(20px); animation: bga-03-nebulaShift 40s ease-in-out infinite alternate; } /* A lone shooting star */ .bga-03__shoot { position: absolute; top: 12%; left: 70%; width: 120px; height: 2px; background: linear-gradient(90deg, #fff, transparent); transform: rotate(-35deg); opacity: 0; animation: bga-03-shoot 7s ease-in infinite; } @keyframes bga-03-twinkle { 0% { opacity: 0.3; } 100% { opacity: 1; } } @keyframes bga-03-scrollUp { from { transform: translateY(0); } to { transform: translateY(-800px); } } @keyframes bga-03-nebulaShift { 0% { transform: translate(-2%, -1%) scale(1.05); } 100% { transform: translate(2%, 2%) scale(1.15); } } @keyframes bga-03-shoot { 0%, 85% { opacity: 0; transform: translate(0,0) rotate(-35deg); } 88% { opacity: 1; } 100% { opacity: 0; transform: translate(-420px, 300px) rotate(-35deg); } } @media (prefers-reduced-motion: reduce) { .bga-03__stars, .bga-03__stars2, .bga-03__stars3, .bga-03__nebula, .bga-03__shoot { animation: none !important; } } ``` ### 04. Interactive or Click-to-Expand Ripple/Static Effects **Type:** Pure CSS **Description:** A cyberpunk surface with animated TV static, scanlines, and a hue-shifting tint — click anywhere to fire an expanding neon ripple, driven entirely by a CSS :checked toggle (no JS). Great for retro/VHS UI trends. **HTML:** ```html
click anywhere
``` **CSS:** ```css .bga-04, .bga-04 *, .bga-04 *::before, .bga-04 *::after { box-sizing: border-box; margin: 0; padding: 0; } .bga-04 { min-height: 460px; display: grid; place-items: stretch; } .bga-04__scene { width: 100%; min-height: 460px; position: relative; overflow: hidden; background: #0d0f14; cursor: crosshair; } /* Animated TV static / grain overlay */ .bga-04__scene::before { content: ""; position: absolute; inset: -50%; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); opacity: 0.12; animation: bga-04-static 0.6s steps(4) infinite; pointer-events: none; } /* Scanlines + cyberpunk tint */ .bga-04__scene::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(0deg, rgba(0,0,0,0.25) 0 1px, transparent 1px 3px), radial-gradient(circle at 50% 50%, rgba(0,255,200,0.06), transparent 70%), radial-gradient(circle at 50% 50%, rgba(255,0,128,0.05), transparent 80%); pointer-events: none; animation: bga-04-hueShift 12s linear infinite; } /* Toggle (radio) drives the ripple via :checked, no JS */ .bga-04__trigger { position: absolute; opacity: 0; pointer-events: none; } .bga-04__surface { position: absolute; inset: 0; z-index: 2; } .bga-04__surface label { display: block; width: 100%; height: 100%; cursor: crosshair; } .bga-04__ripple { position: absolute; top: 50%; left: 50%; width: 40px; height: 40px; margin: -20px 0 0 -20px; border: 2px solid rgba(0,255,200,0.8); border-radius: 50%; transform: scale(0); opacity: 0; } #bga-04-r1:checked ~ .bga-04__surface .bga-04__ripple { animation: bga-04-ripple 1.6s ease-out; } @keyframes bga-04-ripple { 0% { transform: scale(0); opacity: 0.9; border-color: rgba(0,255,200,0.9); } 50% { opacity: 0.5; border-color: rgba(255,0,128,0.7); } 100% { transform: scale(28); opacity: 0; border-color: rgba(120,80,255,0); } } @keyframes bga-04-static { 0% { transform: translate(0,0); } 25% { transform: translate(-4%, 3%); } 50% { transform: translate(3%, -2%); } 75% { transform: translate(-2%, -3%); } 100% { transform: translate(2%, 2%); } } @keyframes bga-04-hueShift { from { filter: hue-rotate(0deg); } to { filter: hue-rotate(360deg); } } .bga-04__hint { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); color: rgba(0,255,200,0.55); font: 600 14px/1.4 ui-monospace, monospace; letter-spacing: 3px; text-transform: uppercase; z-index: 1; pointer-events: none; text-shadow: 0 0 8px rgba(0,255,200,0.5); } @media (prefers-reduced-motion: reduce) { .bga-04__scene::before, .bga-04__scene::after, .bga-04__ripple { animation: none !important; } } ``` ### 05. Moving Geometric & Angled Patterns **Type:** Pure CSS **Description:** Three stacked layers — sliding diagonal stripes, a scrolling grid, and animated chevrons — combining into a structured, infinitely scrolling tech texture with a vignette glow. A high-utility backdrop for pricing tables and card headers. **HTML:** ```html
``` **CSS:** ```css .bga-05, .bga-05 *, .bga-05 *::before, .bga-05 *::after { box-sizing: border-box; margin: 0; padding: 0; } .bga-05 { min-height: 460px; display: grid; place-items: stretch; } .bga-05__scene { width: 100%; min-height: 460px; position: relative; overflow: hidden; background: #11131c; } /* Layer 1: moving diagonal stripes */ .bga-05__scene::before { content: ""; position: absolute; inset: -50%; background: repeating-linear-gradient( 45deg, rgba(255,90,120,0.12) 0 20px, transparent 20px 40px ); animation: bga-05-slideDiag 6s linear infinite; } /* Layer 2: scrolling grid */ .bga-05__grid { position: absolute; inset: 0; background-image: linear-gradient(rgba(80,200,255,0.18) 1px, transparent 1px), linear-gradient(90deg, rgba(80,200,255,0.18) 1px, transparent 1px); background-size: 48px 48px; animation: bga-05-scrollGrid 8s linear infinite; } /* Layer 3: animated chevrons */ .bga-05__chevrons { position: absolute; inset: -40px; background-image: linear-gradient(135deg, rgba(255,200,60,0.16) 25%, transparent 25%), linear-gradient(225deg, rgba(255,200,60,0.16) 25%, transparent 25%); background-size: 60px 60px; background-position: 0 0; animation: bga-05-chevronMove 5s linear infinite; mix-blend-mode: screen; } /* Center glow to add depth */ .bga-05__glow { position: absolute; inset: 0; background: radial-gradient(circle at 50% 50%, transparent 30%, rgba(17,19,28,0.9) 100%); pointer-events: none; } @keyframes bga-05-slideDiag { from { transform: translate(0,0); } to { transform: translate(56px, 56px); } } @keyframes bga-05-scrollGrid { from { background-position: 0 0, 0 0; } to { background-position: 48px 48px, 48px 48px; } } @keyframes bga-05-chevronMove { from { background-position: 0 0; } to { background-position: 0 60px; } } @media (prefers-reduced-motion: reduce) { .bga-05__scene::before, .bga-05__grid, .bga-05__chevrons { animation: none !important; } } ``` ### 06. Video-Mimicking / Subtle Wave Overlays **Type:** Pure CSS **Description:** Three SVG wave paths sliding at staggered speeds to mimic flowing water beneath a soft pulsing sun, over a warm sunset gradient. A lightweight replacement for background video at the bottom of hero sections. **HTML:** ```html
``` **CSS:** ```css .bga-06, .bga-06 *, .bga-06 *::before, .bga-06 *::after { box-sizing: border-box; margin: 0; padding: 0; } .bga-06 { min-height: 460px; display: grid; place-items: stretch; } .bga-06__scene { width: 100%; min-height: 460px; position: relative; overflow: hidden; background: linear-gradient(180deg, #fceabb 0%, #ffd6a5 30%, #ff9a8b 60%, #a18cd1 100%); } /* Soft sun glow */ .bga-06__sun { position: absolute; top: 14%; left: 50%; width: 220px; height: 220px; margin-left: -110px; background: radial-gradient(circle, rgba(255,255,255,0.95), rgba(255,220,150,0.5) 45%, transparent 70%); border-radius: 50%; filter: blur(2px); animation: bga-06-pulse 8s ease-in-out infinite; } .bga-06__waves { position: absolute; bottom: 0; left: 0; width: 100%; height: 55%; } .bga-06__wave { position: absolute; bottom: 0; left: 0; width: 200%; height: 100%; } .bga-06__wave svg { display: block; width: 100%; height: 100%; } .bga-06__wave1 { animation: bga-06-waveX 14s linear infinite; opacity: 0.55; } .bga-06__wave2 { animation: bga-06-waveX 10s linear infinite reverse; opacity: 0.4; } .bga-06__wave3 { animation: bga-06-waveX 18s linear infinite; opacity: 0.7; } @keyframes bga-06-waveX { from { transform: translateX(0); } to { transform: translateX(-50%); } } @keyframes bga-06-pulse { 0%, 100% { transform: scale(1); opacity: 0.9; } 50% { transform: scale(1.08); opacity: 1; } } @media (prefers-reduced-motion: reduce) { .bga-06__sun, .bga-06__wave1, .bga-06__wave2, .bga-06__wave3 { animation: none !important; } } ``` ### 07. Glassmorphism Floating Orbs Background **Type:** Pure CSS **Description:** Colorful gradient orbs drift in slow orbits behind a frosted glass card with a reflective sheen sweep. Searched as "CSS glassmorphism background" — hugely popular for SaaS, fintech, and Apple-inspired UI. **HTML:** ```html
``` **CSS:** ```css .bga-07, .bga-07 *, .bga-07 *::before, .bga-07 *::after { box-sizing: border-box; margin: 0; padding: 0; } .bga-07 { min-height: 460px; display: grid; place-items: stretch; } .bga-07__scene { width: 100%; min-height: 460px; position: relative; overflow: hidden; background: linear-gradient(135deg, #0f0c29, #302b63, #24243e); } /* Colored orbs drifting in slow orbits behind the glass */ .bga-07__orb { position: absolute; border-radius: 50%; filter: blur(8px); opacity: 0.85; } .bga-07__orb1 { width: 320px; height: 320px; top: 10%; left: 8%; background: radial-gradient(circle at 30% 30%, #ff6ec4, #7873f5); animation: bga-07-orbit1 18s ease-in-out infinite; } .bga-07__orb2 { width: 260px; height: 260px; bottom: 12%; right: 10%; background: radial-gradient(circle at 30% 30%, #43e97b, #38f9d7); animation: bga-07-orbit2 22s ease-in-out infinite; } .bga-07__orb3 { width: 200px; height: 200px; top: 45%; left: 55%; background: radial-gradient(circle at 30% 30%, #fa709a, #fee140); animation: bga-07-orbit3 16s ease-in-out infinite; } /* Frosted glass card on top */ .bga-07__glass { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 60%; max-width: 520px; height: 320px; background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.25); border-radius: 28px; backdrop-filter: blur(18px) saturate(160%); -webkit-backdrop-filter: blur(18px) saturate(160%); box-shadow: 0 20px 60px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.35); animation: bga-07-float 9s ease-in-out infinite; } /* Reflective highlight sweep */ .bga-07__glass::after { content: ""; position: absolute; inset: 0; border-radius: 28px; background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,0.18) 50%, transparent 70%); background-size: 250% 100%; animation: bga-07-sheen 6s linear infinite; } @keyframes bga-07-orbit1 { 50% { transform: translate(80px, 60px) scale(1.1); } } @keyframes bga-07-orbit2 { 50% { transform: translate(-90px, -50px) scale(1.15); } } @keyframes bga-07-orbit3 { 50% { transform: translate(-60px, 70px) scale(0.9); } } @keyframes bga-07-float { 0%,100% { transform: translate(-50%, -50%); } 50% { transform: translate(-50%, -58%); } } @keyframes bga-07-sheen { from { background-position: 200% 0; } to { background-position: -50% 0; } } @media (prefers-reduced-motion: reduce) { .bga-07__orb1, .bga-07__orb2, .bga-07__orb3, .bga-07__glass, .bga-07__glass::after { animation: none !important; } } ``` ### 08. Aurora Borealis Background Animation **Type:** Pure CSS **Description:** Layered screen-blended ribbons skew and stretch like northern lights over a twinkling star field on a deep night-sky gradient. Searched as "CSS aurora background" — a top pick for premium dark hero sections. **HTML:** ```html
``` **CSS:** ```css .bga-08, .bga-08 *, .bga-08 *::before, .bga-08 *::after { box-sizing: border-box; margin: 0; padding: 0; } .bga-08 { min-height: 460px; display: grid; place-items: stretch; } .bga-08__scene { width: 100%; min-height: 460px; position: relative; overflow: hidden; background: linear-gradient(180deg, #020111 0%, #06183b 55%, #0a2a4a 100%); } /* Stacked aurora ribbons made of conic/linear gradients */ .bga-08__aurora { position: absolute; top: -20%; left: -20%; width: 140%; height: 100%; filter: blur(40px); mix-blend-mode: screen; } .bga-08__a1 { background: linear-gradient(120deg, transparent, #00ff9d 40%, #00b3ff 60%, transparent); opacity: 0.5; animation: bga-08-wave1 12s ease-in-out infinite alternate; } .bga-08__a2 { background: linear-gradient(100deg, transparent, #b14aff 45%, #ff6ec4 65%, transparent); opacity: 0.4; animation: bga-08-wave2 16s ease-in-out infinite alternate; } .bga-08__a3 { background: linear-gradient(140deg, transparent, #2ed8ff 35%, #6cff9e 55%, transparent); opacity: 0.35; animation: bga-08-wave3 20s ease-in-out infinite alternate; } /* Star field below the aurora */ .bga-08__stars { position: absolute; top: 0; left: 0; width: 1px; height: 1px; box-shadow: 140px 120px #fff, 480px 60px #fff, 900px 180px #fff, 1300px 90px #fff, 260px 220px #fff, 720px 260px #fff, 1100px 240px #fff, 60px 300px #fff, 1500px 200px #fff, 600px 140px #fff; animation: bga-08-twinkle 5s ease-in-out infinite alternate; } @keyframes bga-08-wave1 { 0% { transform: translateX(-10%) skewX(-8deg) scaleY(1); } 100% { transform: translateX(10%) skewX(8deg) scaleY(1.2); } } @keyframes bga-08-wave2 { 0% { transform: translateX(8%) skewX(6deg) scaleY(1.1); } 100% { transform: translateX(-12%) skewX(-10deg) scaleY(0.9); } } @keyframes bga-08-wave3 { 0% { transform: translateX(-5%) skewX(-4deg) scaleY(0.95); } 100% { transform: translateX(14%) skewX(12deg) scaleY(1.25); } } @keyframes bga-08-twinkle { 0% { opacity: 0.4; } 100% { opacity: 1; } } @media (prefers-reduced-motion: reduce) { .bga-08__a1, .bga-08__a2, .bga-08__a3, .bga-08__stars { animation: none !important; } } ``` ### 09. Matrix Digital Rain Background **Type:** Pure CSS **Description:** Sixteen columns of katakana glyphs fall at staggered speeds with a glowing leading character and a fading trail mask. Searched as "CSS matrix rain effect" — a perennial favorite for hacker/cyberpunk and dev-portfolio themes. **HTML:** ```html
ミヒーウシナモニサワキセネ01チツ
カタレニソネホオラ10リワセチクコ
セチク01ワキナモニサレヒーウ
10リワセチクタレニソネホオカ
ナモニサワキネチツ01ハミヒー
レニソネホオラ10リアカワセチ
ヒーウシナ01ニサワキセネチツ
ソネホオラ10リワタレニセチクコ
キセネチ01ツハミヒーウシナモ
オラ10リワセタレニソネチクコ
サワキセネチツ01ハミヒーウシ
ワセチクタ10レニソネホオラカ
モニサワキ01セネチツハミヒー
ニソネホ10オラリワセチクタコ
ーウシナモ01ニサワキセネチツ
ラリワセチ10クタレニソネホカ
``` **CSS:** ```css .bga-09, .bga-09 *, .bga-09 *::before, .bga-09 *::after { box-sizing: border-box; margin: 0; padding: 0; } .bga-09 { min-height: 460px; display: grid; place-items: stretch; } .bga-09__scene { width: 100%; min-height: 460px; position: relative; overflow: hidden; background: #000; font-family: "Courier New", monospace; } .bga-09__column { position: absolute; top: 0; width: 22px; color: #00ff66; font-size: 18px; line-height: 22px; text-align: center; white-space: pre; text-shadow: 0 0 6px #00ff66; writing-mode: vertical-rl; text-orientation: upright; animation: bga-09-fall linear infinite; /* gradient mask so the trail fades upward */ -webkit-mask-image: linear-gradient(to bottom, transparent, #000 25%, #000 75%, transparent); mask-image: linear-gradient(to bottom, transparent, #000 25%, #000 75%, transparent); } /* Each column gets its own position, speed, and delay */ .bga-09__column:nth-child(1) { left: 2%; animation-duration: 6s; animation-delay: 0s; opacity: 0.9; } .bga-09__column:nth-child(2) { left: 8%; animation-duration: 9s; animation-delay: 1.5s; opacity: 0.7; } .bga-09__column:nth-child(3) { left: 14%; animation-duration: 5s; animation-delay: 0.5s; } .bga-09__column:nth-child(4) { left: 20%; animation-duration: 11s; animation-delay: 2s; opacity: 0.8; } .bga-09__column:nth-child(5) { left: 26%; animation-duration: 7s; animation-delay: 3s; } .bga-09__column:nth-child(6) { left: 32%; animation-duration: 8s; animation-delay: 0.2s; opacity: 0.6; } .bga-09__column:nth-child(7) { left: 38%; animation-duration: 6.5s;animation-delay: 1s; } .bga-09__column:nth-child(8) { left: 44%; animation-duration: 10s; animation-delay: 2.5s; opacity: 0.85; } .bga-09__column:nth-child(9) { left: 50%; animation-duration: 5.5s;animation-delay: 0.8s; } .bga-09__column:nth-child(10) { left: 56%; animation-duration: 9.5s;animation-delay: 3.5s; opacity: 0.7; } .bga-09__column:nth-child(11) { left: 62%; animation-duration: 7.5s;animation-delay: 1.2s; } .bga-09__column:nth-child(12) { left: 68%; animation-duration: 6s; animation-delay: 2.8s; opacity: 0.9; } .bga-09__column:nth-child(13) { left: 74%; animation-duration: 11s; animation-delay: 0.4s; } .bga-09__column:nth-child(14) { left: 80%; animation-duration: 8.5s;animation-delay: 1.8s; opacity: 0.65; } .bga-09__column:nth-child(15) { left: 86%; animation-duration: 5s; animation-delay: 3.2s; } .bga-09__column:nth-child(16) { left: 92%; animation-duration: 9s; animation-delay: 0.6s; opacity: 0.8; } /* brighten the leading glyph */ .bga-09__column span { color: #ccffcc; text-shadow: 0 0 12px #aaffaa; } @keyframes bga-09-fall { 0% { transform: translateY(-100%); } 100% { transform: translateY(100vh); } } @media (prefers-reduced-motion: reduce) { .bga-09__column { animation: none !important; } } ``` ### 10. Animated Mesh Gradient Blob Background **Type:** Pure CSS **Description:** Four large multiply-blended color blobs roam and scale to create a soft, ever-shifting mesh gradient with subtle grain. Searched as "CSS mesh gradient animation" — the trendy modern look for light landing pages. **HTML:** ```html
``` **CSS:** ```css .bga-10, .bga-10 *, .bga-10 *::before, .bga-10 *::after { box-sizing: border-box; margin: 0; padding: 0; } .bga-10 { min-height: 460px; display: grid; place-items: stretch; } .bga-10__scene { width: 100%; min-height: 460px; position: relative; overflow: hidden; background: #f4f1ff; } /* Several large blurred color blobs that morph and roam, creating a soft animated mesh-gradient look */ .bga-10__blob { position: absolute; border-radius: 50%; filter: blur(60px); opacity: 0.85; mix-blend-mode: multiply; } .bga-10__b1 { width: 460px; height: 460px; background: #ff8fab; top: -8%; left: -5%; animation: bga-10-roam1 20s ease-in-out infinite; } .bga-10__b2 { width: 420px; height: 420px; background: #8fd3ff; top: 30%; right: -8%; animation: bga-10-roam2 24s ease-in-out infinite; } .bga-10__b3 { width: 380px; height: 380px; background: #c4f5b0; bottom: -10%; left: 25%; animation: bga-10-roam3 18s ease-in-out infinite; } .bga-10__b4 { width: 340px; height: 340px; background: #ffe28a; top: 20%; left: 35%; animation: bga-10-roam4 26s ease-in-out infinite; } /* subtle grain to make the gradient feel premium */ .bga-10__scene::after { content: ""; position: absolute; inset: 0; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); opacity: 0.04; pointer-events: none; } @keyframes bga-10-roam1 { 0%,100% { transform: translate(0,0) scale(1); } 33% { transform: translate(120px, 80px) scale(1.2); } 66% { transform: translate(60px, 160px) scale(0.9); } } @keyframes bga-10-roam2 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(-140px, 60px) scale(1.15); } } @keyframes bga-10-roam3 { 0%,100% { transform: translate(0,0) scale(1); } 40% { transform: translate(-80px, -120px) scale(1.25); } 70% { transform: translate(100px, -40px) scale(0.95); } } @keyframes bga-10-roam4 { 0%,100% { transform: translate(0,0) scale(1.1); } 50% { transform: translate(90px, -90px) scale(0.85); } } @media (prefers-reduced-motion: reduce) { .bga-10__b1, .bga-10__b2, .bga-10__b3, .bga-10__b4 { animation: none !important; } } ``` ### 11. Falling Snow Background Animation **Type:** Pure CSS **Description:** Three parallax snow layers (built from box-shadow) fall and sway at different depths over a cool blue gradient. Searched as "CSS snow effect" — a seasonal evergreen for holiday banners and winter sites. **HTML:** ```html
``` **CSS:** ```css .bga-11, .bga-11 *, .bga-11 *::before, .bga-11 *::after { box-sizing: border-box; margin: 0; padding: 0; } .bga-11 { min-height: 460px; display: grid; place-items: stretch; } .bga-11__scene { width: 100%; min-height: 460px; position: relative; overflow: hidden; background: linear-gradient(180deg, #1b2a4a 0%, #2c3e6b 50%, #3a4f8a 100%); } /* Three snow layers via box-shadow for parallax depth */ .bga-11__snow, .bga-11__snow2, .bga-11__snow3 { position: absolute; top: -10px; left: 0; width: 6px; height: 6px; background: #fff; border-radius: 50%; filter: drop-shadow(0 0 4px rgba(255,255,255,0.6)); } .bga-11__snow { box-shadow: 60px 0 #fff, 240px 0 #fff, 460px 0 #fff, 700px 0 #fff, 980px 0 #fff, 1180px 0 #fff, 1420px 0 #fff, 1600px 0 #fff, 380px 0 #fff, 860px 0 #fff; animation: bga-11-fall1 8s linear infinite, bga-11-sway 3s ease-in-out infinite alternate; } .bga-11__snow2 { width: 4px; height: 4px; opacity: 0.8; box-shadow: 140px 0 #fff, 320px 0 #fff, 560px 0 #fff, 820px 0 #fff, 1080px 0 #fff, 1300px 0 #fff, 1520px 0 #fff, 200px 0 #fff, 640px 0 #fff, 1000px 0 #fff; animation: bga-11-fall2 12s linear infinite, bga-11-sway 4s ease-in-out infinite alternate-reverse; } .bga-11__snow3 { width: 9px; height: 9px; opacity: 0.55; filter: blur(1px); box-shadow: 100px 0 #fff, 420px 0 #fff, 760px 0 #fff, 1120px 0 #fff, 1480px 0 #fff, 300px 0 #fff, 900px 0 #fff; animation: bga-11-fall3 16s linear infinite, bga-11-sway 5s ease-in-out infinite alternate; } @keyframes bga-11-fall1 { to { transform: translateY(105vh); } } @keyframes bga-11-fall2 { to { transform: translateY(105vh); } } @keyframes bga-11-fall3 { to { transform: translateY(105vh); } } @keyframes bga-11-sway { from { margin-left: -15px; } to { margin-left: 15px; } } @media (prefers-reduced-motion: reduce) { .bga-11__snow, .bga-11__snow2, .bga-11__snow3 { animation: none !important; } } ``` ### 12. Animated Blob Morphing Background **Type:** Pure CSS **Description:** A vibrant gradient blob continuously morphs its border-radius, spins, and shifts hue, with a second blend-mode blob behind it. Searched as "CSS morphing blob animation" — a striking centerpiece for creative and agency landing pages. **HTML:** ```html
``` **CSS:** ```css .bga-12, .bga-12 *, .bga-12 *::before, .bga-12 *::after { box-sizing: border-box; margin: 0; padding: 0; } .bga-12 { min-height: 460px; display: grid; place-items: stretch; } .bga-12__scene { width: 100%; min-height: 460px; position: relative; overflow: hidden; background: radial-gradient(circle at 50% 50%, #1a1033, #0a0618); display: flex; align-items: center; justify-content: center; } /* Big morphing blob driven by animated border-radius */ .bga-12__blob { width: 420px; height: 420px; background: linear-gradient(135deg, #ff3cac, #784ba0, #2b86c5); background-size: 200% 200%; box-shadow: 0 0 80px rgba(255,60,172,0.5), 0 0 160px rgba(43,134,197,0.4); animation: bga-12-morph 8s ease-in-out infinite, bga-12-spin 20s linear infinite, bga-12-hue 10s linear infinite; } /* A second, offset blob for layered depth */ .bga-12__blob2 { position: absolute; width: 280px; height: 280px; background: linear-gradient(135deg, #43e97b, #38f9d7); opacity: 0.55; filter: blur(6px); animation: bga-12-morph2 10s ease-in-out infinite, bga-12-spin 16s linear infinite reverse; mix-blend-mode: screen; } @keyframes bga-12-morph { 0%,100% { border-radius: 42% 58% 70% 30% / 45% 45% 55% 55%; } 33% { border-radius: 70% 30% 46% 54% / 30% 60% 40% 70%; } 66% { border-radius: 34% 66% 60% 40% / 65% 35% 65% 35%; } } @keyframes bga-12-morph2 { 0%,100% { border-radius: 60% 40% 30% 70% / 50% 60% 40% 50%; } 50% { border-radius: 30% 70% 70% 30% / 60% 40% 60% 40%; } } @keyframes bga-12-spin { to { transform: rotate(360deg); } } @keyframes bga-12-hue { to { filter: hue-rotate(360deg); } } @media (prefers-reduced-motion: reduce) { .bga-12__blob, .bga-12__blob2 { animation: none !important; } } ``` ### 13. Retro Cyberpunk Grid / Synthwave Horizon **Type:** Pure CSS **Description:** A neon 3D grid floor recedes toward the horizon using perspective + rotateX, scrolling infinitely beneath a scanline-cut sunset sun. Built with advanced CSS 3D transforms — the classic 80s look for gaming pages, dev portfolios, and web3 projects. **HTML:** ```html
``` **CSS:** ```css .bga-13, .bga-13 *, .bga-13 *::before, .bga-13 *::after { box-sizing: border-box; margin: 0; padding: 0; } .bga-13 { min-height: 460px; display: grid; place-items: stretch; } .bga-13__scene { width: 100%; min-height: 460px; position: relative; overflow: hidden; background: linear-gradient(180deg, #0d0221 0%, #2a0a4a 45%, #51087e 60%, #ff2e88 100%); perspective: 380px; } /* Sun on the horizon */ .bga-13__sun { position: absolute; top: 38%; left: 50%; width: 300px; height: 300px; margin-left: -150px; border-radius: 50%; background: linear-gradient(180deg, #ffe94e 0%, #ff7ac6 55%, #ff2e88 100%); box-shadow: 0 0 80px rgba(255,46,136,0.7); z-index: 1; } /* Scanline gaps cut into the sun */ .bga-13__sun::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: repeating-linear-gradient( 0deg, transparent 0 10px, rgba(13,2,33,0.9) 10px 14px ); -webkit-mask: linear-gradient(180deg, transparent 45%, #000 45%); mask: linear-gradient(180deg, transparent 45%, #000 45%); } /* The receding 3D grid floor */ .bga-13__grid { position: absolute; bottom: 0; left: -50%; width: 200%; height: 70%; transform: rotateX(78deg); transform-origin: bottom center; background-image: linear-gradient(rgba(0,255,255,0.6) 2px, transparent 2px), linear-gradient(90deg, rgba(255,46,200,0.6) 2px, transparent 2px); background-size: 60px 60px; animation: bga-13-scroll 1.2s linear infinite; } /* Glow fade toward the horizon */ .bga-13__grid::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, #0d0221 0%, transparent 40%); } @keyframes bga-13-scroll { from { background-position: 0 0; } to { background-position: 0 60px; } } @media (prefers-reduced-motion: reduce) { .bga-13__grid { animation: none !important; } } ``` ### 14. Infinite Scrolling Diagonal Text / Marquee Background **Type:** Pure CSS **Description:** Huge outline-style headlines tilted at an angle, with alternating rows scrolling in opposite directions in a seamless pure-CSS translateX loop. No JavaScript — ideal for digital agencies, streetwear e-commerce, and creative portfolios. **HTML:** ```html
Creative • Design • Code •  Creative • Design • Code • 
Build • Ship • Repeat •  Build • Ship • Repeat • 
Pure CSS • No JS •  Pure CSS • No JS • 
Studio • Agency • Web •  Studio • Agency • Web • 
Creative • Design • Code •  Creative • Design • Code • 
Build • Ship • Repeat •  Build • Ship • Repeat • 
``` **CSS:** ```css .bga-14, .bga-14 *, .bga-14 *::before, .bga-14 *::after { box-sizing: border-box; margin: 0; padding: 0; } .bga-14 { min-height: 460px; display: grid; place-items: stretch; } .bga-14__scene { width: 100%; min-height: 460px; position: relative; overflow: hidden; background: #0e0e10; display: flex; align-items: center; justify-content: center; } /* Rotated stage holding several marquee rows */ .bga-14__stage { position: absolute; width: 160%; height: 160%; transform: rotate(-25deg); display: flex; flex-direction: column; justify-content: center; gap: 10px; } .bga-14__row { display: flex; white-space: nowrap; will-change: transform; } .bga-14__row span { font-family: "Arial Black", Impact, sans-serif; font-size: 84px; font-weight: 900; letter-spacing: 4px; text-transform: uppercase; padding-right: 40px; /* Outline text */ color: transparent; -webkit-text-stroke: 2px rgba(255,255,255,0.18); } /* Alternate rows: filled accent + opposite scroll direction */ .bga-14__row:nth-child(even) span { color: rgba(255,60,140,0.22); -webkit-text-stroke: 0; } .bga-14__left { animation: bga-14-scrollLeft 24s linear infinite; } .bga-14__right { animation: bga-14-scrollRight 24s linear infinite; } @keyframes bga-14-scrollLeft { from { transform: translateX(0); } to { transform: translateX(-50%); } } @keyframes bga-14-scrollRight { from { transform: translateX(-50%); } to { transform: translateX(0); } } @media (prefers-reduced-motion: reduce) { .bga-14__left, .bga-14__right { animation: none !important; } } ``` ### 15. Animated Comic Book Dot / Halftone Wave **Type:** Pure CSS **Description:** Two offset radial-gradient dot layers breathe and drift in a pop-art duotone, with a radial mask pulsing a spotlight wave through the pattern. A tactile retro-print feel for playful, neo-brutalist, and brand-heavy layouts. **HTML:** ```html
``` **CSS:** ```css .bga-15, .bga-15 *, .bga-15 *::before, .bga-15 *::after { box-sizing: border-box; margin: 0; padding: 0; } .bga-15 { min-height: 460px; display: grid; place-items: stretch; } .bga-15__scene { width: 100%; min-height: 460px; position: relative; overflow: hidden; background: #ffd23f; } /* Base halftone dot layer that breathes via background-size scaling */ .bga-15__dots { position: absolute; inset: -10%; background-image: radial-gradient(circle, #1a1a2e 30%, transparent 31%); background-size: 32px 32px; animation: bga-15-breathe 5s ease-in-out infinite, bga-15-drift 14s linear infinite; } /* Second offset color layer for a pop-art duotone wave */ .bga-15__dots2 { position: absolute; inset: -10%; background-image: radial-gradient(circle, #ff2e63 26%, transparent 27%); background-size: 32px 32px; background-position: 16px 16px; mix-blend-mode: multiply; opacity: 0.85; animation: bga-15-breathe2 6.5s ease-in-out infinite, bga-15-drift2 18s linear infinite; } /* Radial mask creates a "wave"/spotlight that the dots pulse within */ .bga-15__wavemask { position: absolute; inset: 0; background: radial-gradient(circle at 50% 50%, transparent 0%, rgba(255,210,63,0.0) 40%, #ffd23f 80%); animation: bga-15-pulseMask 5s ease-in-out infinite; pointer-events: none; } @keyframes bga-15-breathe { 0%,100% { background-size: 28px 28px; } 50% { background-size: 40px 40px; } } @keyframes bga-15-breathe2 { 0%,100% { background-size: 40px 40px; } 50% { background-size: 28px 28px; } } @keyframes bga-15-drift { to { background-position: 64px 64px; } } @keyframes bga-15-drift2 { to { background-position: -48px 80px; } } @keyframes bga-15-pulseMask { 0%,100% { transform: scale(1); opacity: 0.9; } 50% { transform: scale(1.15); opacity: 0.6; } } @media (prefers-reduced-motion: reduce) { .bga-15__dots, .bga-15__dots2, .bga-15__wavemask { animation: none !important; } } ``` --- ## 30 CSS Badges URL: https://codefronts.com/snippets/css-badges/ Description: 30 hand-coded CSS badges spanning collectibles, status indicators, certifications, notifications, membership tiers, and live-data displays. Upload progress, typing indicator, scrabble tile, keycap shortcut, transit indicator, origami medal, hreflang, E-E-A-T, crawl status, schema, search intent, core web vitals, ECG, build pipeline, countdown, live price, file extension, dice, signal bars, reading time, aurora, vaporwave, risograph, wax seal, conference lanyard, botanical tier, cyberpunk glitch, art deco, brutalist status, holographic. Demo count: 30 ### 01. Upload Progress **Type:** CSS + JS **Description:** A static 73% could be a live transfer or stalled. The shimmer moving through the bar means bytes are flowing; when it becomes a slow pulse, the transfer has stalled; when it stops, it's done. Three states, one animation property. **HTML:** ```html
ZIP
design-assets-v4.zip
340 MB · 1,284 files
0%
Waiting…
``` **CSS:** ```css .upload-stage { background: #f2f4f7; padding: 48px 40px; display: flex; flex-direction: column; gap: 14px; justify-content: center; align-items: flex-start; min-height: 100vh; align-items: center; } .upload-badge { width: 100%; max-width: 420px; background: #fff; border: 1px solid #dde3ec; border-radius: 6px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,0.06); } .upload-top { padding: 14px 16px; display: flex; align-items: center; gap: 12px; } .upload-ext { width: 40px; height: 40px; border-radius: 5px; background: var(--upload-ext-color, #555); display: flex; align-items: center; justify-content: center; font-family: ui-monospace, "JetBrains Mono", monospace; font-size: 9px; font-weight: 700; color: #fff; letter-spacing: 0.08em; flex-shrink: 0; } .upload-file-info { flex: 1; min-width: 0; } .upload-filename { font-family: ui-monospace, "JetBrains Mono", monospace; font-size: 13px; font-weight: 600; color: #1a1612; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1; margin-bottom: 3px; } .upload-filesize { font-family: system-ui, "Bricolage Grotesque", sans-serif; font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: #888; } .upload-status-icon { width: 28px; height: 28px; flex-shrink: 0; } .upload-check-circle { transition: stroke 0.4s; } .upload-check-path { stroke-dasharray: 20; stroke-dashoffset: 20; transition: stroke-dashoffset 0.5s cubic-bezier(0.4, 0, 0.2, 1) 0.15s, stroke 0.3s; } .upload-badge.is-complete .upload-check-circle { stroke: #0cce6b; } .upload-badge.is-complete .upload-check-path { stroke: #0cce6b; stroke-dashoffset: 0; } .upload-bar-wrap { height: 4px; background: #f0eee8; position: relative; } .upload-bar-fill { height: 100%; background: var(--upload-color, #4285f4); width: 0%; transition: width 0.5s linear, background 0.5s ease; position: relative; overflow: hidden; } .upload-bar-fill::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.4) 50%, transparent 100%); animation: upload-shimmer 1.2s ease-in-out infinite; } @keyframes upload-shimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } } .upload-badge.is-complete .upload-bar-fill::after { animation: none; } .upload-badge.is-stalled .upload-bar-fill::after { animation: upload-stall 1.5s ease-in-out infinite; } @keyframes upload-stall { 0%, 100% { opacity: 1; } 50% { opacity: 0.2; } } @media (prefers-reduced-motion: reduce) { .upload-bar-fill::after { animation: none; } } .upload-bottom { padding: 8px 16px 12px; display: flex; justify-content: space-between; } .upload-pct { font-family: ui-monospace, "JetBrains Mono", monospace; font-size: 12px; font-weight: 700; color: #1a1612; } .upload-speed-eta { font-family: system-ui, "Bricolage Grotesque", sans-serif; font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: #888; text-align: right; } ``` **JS:** ```js // Simulate an upload — progresses, stalls briefly at ~42% to show the // stall state, resumes, completes. Then idle. Click to restart not // included; in real use the lifecycle is driven by actual XHR events. (function () { var badge = document.getElementById('upload-badge'); var fill = document.getElementById('upload-fill'); var pctEl = document.getElementById('upload-pct'); var metaEl = document.getElementById('upload-meta'); var pct = 0; var stalled = false; function update() { fill.style.width = pct + '%'; pctEl.textContent = Math.floor(pct) + '%'; if (pct >= 100) { badge.classList.remove('is-stalled'); badge.classList.add('is-complete'); fill.style.background = '#0cce6b'; pctEl.textContent = '100%'; metaEl.textContent = 'Complete'; return; } if (stalled) { badge.classList.add('is-stalled'); metaEl.textContent = 'Connection interrupted…'; } else { badge.classList.remove('is-stalled'); var speed = (2.4 + Math.random() * 0.8).toFixed(1); var remaining = ((340 - 340 * pct / 100) / parseFloat(speed)).toFixed(0); metaEl.textContent = speed + ' MB/s · ' + remaining + 's left'; } } var ticker = setInterval(function () { if (pct >= 100) { clearInterval(ticker); return; } if (pct >= 42 && pct < 48 && !stalled) { stalled = true; update(); return; } if (stalled && pct < 48) { setTimeout(function () { stalled = false; }, 3000); return; } pct = Math.min(100, pct + 1.8 + Math.random() * 0.6); update(); }, 400); update(); })(); ``` ### 02. Typing Indicator **Type:** Pure CSS **Description:** The three bouncing dots are the convention. Without the animation the badge could mean "typed recently" or "about to type." The motion defines the tense: present continuous, active right now. **HTML:** ```html
Ana Sousa joined the conversation
Let me check the latest build and get back to you.
Sure — does the badge spec look right to you?
Ana
``` **CSS:** ```css .typing-stage { background: #ebe4d8; padding: 40px 36px; display: flex; flex-direction: column; gap: 14px; justify-content: center; align-items: center; min-height: 100vh; } .typing-wrap { display: flex; flex-direction: column; gap: 10px; width: 100%; max-width: 360px; } .typing-msg { align-self: flex-end; background: #fff; border-radius: 18px 18px 4px 18px; padding: 10px 16px; font-family: system-ui, "Bricolage Grotesque", sans-serif; font-size: 14px; color: #2a2018; box-shadow: 0 1px 4px rgba(0,0,0,0.08); max-width: 80%; } .typing-sent { background: #1a1612; color: #f0ece0; border-radius: 18px 18px 18px 4px; align-self: flex-start; } .typing-bubble { align-self: flex-start; } .typing-inner { background: #fff; border-radius: 18px 18px 18px 4px; padding: 12px 16px; display: inline-flex; align-items: center; gap: 8px; box-shadow: 0 1px 4px rgba(0,0,0,0.08); } .typing-avatar { width: 20px; height: 20px; border-radius: 50%; flex-shrink: 0; } .typing-name { font-family: system-ui, "Bricolage Grotesque", sans-serif; font-size: 11px; letter-spacing: 0.08em; color: #888; text-transform: uppercase; } .typing-dots { display: flex; gap: 3px; align-items: center; } .typing-dot { width: 7px; height: 7px; border-radius: 50%; background: #aaa; } .typing-dot:nth-child(1) { animation: typing-bounce 1.4s ease-in-out infinite 0ms; } .typing-dot:nth-child(2) { animation: typing-bounce 1.4s ease-in-out infinite 160ms; } .typing-dot:nth-child(3) { animation: typing-bounce 1.4s ease-in-out infinite 320ms; } @keyframes typing-bounce { 0%, 60%, 100% { transform: translateY(0); } 30% { transform: translateY(-5px); } } @media (prefers-reduced-motion: reduce) { .typing-dot { animation: none; } } .typing-join { align-self: center; background: rgba(255,255,255,0.7); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-radius: 20px; padding: 6px 14px; display: flex; align-items: center; gap: 7px; font-family: system-ui, "Bricolage Grotesque", sans-serif; font-size: 11px; letter-spacing: 0.06em; color: #666; box-shadow: 0 1px 4px rgba(0,0,0,0.1); } .typing-join-dot { width: 7px; height: 7px; border-radius: 50%; background: #0cce6b; } ``` ### 03. Scrabble Tile **Type:** Pure CSS **Description:** One letter, one number. The whole game fits in a square. Hover lifts each tile independently — the kind of small detail that makes a word feel played rather than typed. **HTML:** ```html
S1
I1
M3
P3
L1
E1
10 points · 6 letters · adjective
``` **CSS:** ```css .tile-stage { background: linear-gradient(145deg, #e8dfc8 0%, #d8d0b4 100%); padding: 60px 48px; display: flex; flex-direction: column; gap: 16px; justify-content: center; align-items: center; min-height: 100vh; } .tile-wrap { display: flex; flex-direction: column; gap: 18px; align-items: center; } .tile-row { display: flex; gap: 6px; align-items: flex-end; } .tile-cube { width: 58px; height: 58px; background: linear-gradient(145deg, #f4e8c2 0%, #e8d8a0 100%); border: 1px solid #c8a840; border-radius: 4px; position: relative; cursor: pointer; display: flex; align-items: center; justify-content: center; box-shadow: inset 0 1px 0 rgba(255,255,255,0.5), 2px 3px 0 #b09030, 3px 4px 4px rgba(80,60,0,0.2); transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.25s; user-select: none; } .tile-cube:hover { transform: translateY(-6px) rotate(-2deg); box-shadow: inset 0 1px 0 rgba(255,255,255,0.5), 2px 3px 0 #b09030, 6px 12px 16px rgba(80,60,0,0.22); } @media (prefers-reduced-motion: reduce) { .tile-cube { transition: none; } } .tile-letter { font-family: "Cinzel", Georgia, serif; font-size: 30px; font-weight: 700; color: #2a1e08; line-height: 1; } .tile-points { position: absolute; bottom: 4px; right: 5px; font-family: ui-monospace, "JetBrains Mono", monospace; font-size: 10px; font-weight: 700; color: #4a3818; line-height: 1; } .tile-word-label { font-family: "Cormorant Garamond", Georgia, serif; font-style: italic; font-size: 13px; letter-spacing: 0.08em; color: #7a6230; text-align: center; margin-top: 4px; } ``` ### 04. Keycap Shortcut **Type:** CSS + JS **Description:** A key is a physical object. Three stacked box-shadows form the edge — bottom face, outer drop, top highlight. Click any key and feel it go down. Cmd-K and friends, the way they were meant to look. **HTML:** ```html
+
K
Command Palette
+
+
P
Quick Actions
+
Delete Word
``` **CSS:** ```css .key-stage { background: #edecea; padding: 60px 48px; display: flex; flex-direction: column; gap: 32px; justify-content: center; align-items: center; min-height: 100vh; } .key-combo { display: flex; align-items: center; gap: 6px; } .key-sep { font-family: system-ui, "Bricolage Grotesque", sans-serif; font-size: 14px; color: #888; padding: 0 2px; } .key-cap { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; height: 44px; padding: 0 12px; background: linear-gradient(180deg, #f8f8f6 0%, #e8e8e3 100%); border: 1px solid #bbb; border-radius: 6px; font-family: ui-monospace, "JetBrains Mono", monospace; font-size: 14px; font-weight: 500; color: #1a1a1a; letter-spacing: 0; cursor: pointer; user-select: none; box-shadow: 0 1px 0 rgba(255,255,255,0.9) inset, 0 -1px 0 rgba(0,0,0,0.08) inset, 0 3px 0 #999, 0 4px 4px rgba(0,0,0,0.18); transition: transform 0.06s, box-shadow 0.06s; position: relative; } .key-cap::before { content: ''; position: absolute; inset: 2px 2px 6px; border-radius: 4px; border-top: 1px solid rgba(255,255,255,0.6); pointer-events: none; } .key-cap:active, .key-cap.is-pressed { transform: translateY(2px); box-shadow: 0 1px 0 rgba(255,255,255,0.9) inset, 0 -1px 0 rgba(0,0,0,0.08) inset, 0 1px 0 #999, 0 2px 2px rgba(0,0,0,0.18); } .key-wide { min-width: 72px; font-size: 13px; } .key-xl { min-width: 96px; font-size: 13px; } .key-combo-label { font-family: system-ui, "Bricolage Grotesque", sans-serif; font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; color: #888; text-align: center; margin-top: 6px; } .key-combo-row { display: flex; flex-direction: column; align-items: center; gap: 8px; } ``` **JS:** ```js // Click any key to depress it briefly. Matches the CSS :active state // but lets the visual hold for 200ms so the press registers visually // even on a quick tap. document.querySelectorAll('.key-cap').forEach(function (k) { k.addEventListener('click', function () { k.classList.add('is-pressed'); setTimeout(function () { k.classList.remove('is-pressed'); }, 200); }); }); ``` ### 05. Transit Line Indicator **Type:** CSS + JS **Description:** Wayfinding distilled. Bullet, name, live arrival, and a strip showing where you are on the line. Built to be read from across a platform — and the next-arrival time keeps counting down. **HTML:** ```html
M7
Northbrook Express
via Riverside · skip-stop after 18:00
Next in 4 min
Central
Park
9th Ave
Riverside
Northbrook
``` **CSS:** ```css .tr-stage { background: #d9d3c4; padding: 50px 36px; background-image: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.06) 100%), linear-gradient(0deg, rgba(0,0,0,0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(0,0,0,0.05) 1px, transparent 1px); background-size: 100% 100%, 60px 30px, 60px 30px; display: flex; justify-content: center; align-items: center; min-height: 100vh; } .tr-platform { background: linear-gradient(180deg, #15171a 0%, #0c0e10 100%); padding: 28px 26px 26px; max-width: 460px; width: 100%; box-shadow: 0 30px 60px -22px rgba(0,0,0,0.7), 0 6px 16px -2px rgba(0,0,0,0.4); color: #fff; position: relative; border-top: 1px solid rgba(255,255,255,0.08); } .tr-platform::before { content: 'M T A · LIVE'; position: absolute; top: -12px; left: 0; background: #1a1a1a; padding: 4px 12px; font-family: ui-monospace, "JetBrains Mono", monospace; font-size: 9px; letter-spacing: 0.3em; color: #c8102e; } .tr-row { display: grid; grid-template-columns: auto 1fr auto; gap: 18px; align-items: center; padding-bottom: 22px; border-bottom: 1px dashed rgba(255,255,255,0.18); } .tr-bullet { width: 62px; height: 62px; border-radius: 50%; background: linear-gradient(180deg, #d4233d 0%, #b80e25 100%); color: #fff; font-family: "Bebas Neue", system-ui, sans-serif; font-size: 30px; display: flex; align-items: center; justify-content: center; letter-spacing: 0.03em; box-shadow: inset 0 -4px 6px rgba(0,0,0,0.35), inset 0 4px 5px rgba(255,255,255,0.25), 0 6px 14px rgba(200,16,46,0.5); text-shadow: 0 1px 2px rgba(0,0,0,0.3); } .tr-line { font-family: "Bebas Neue", system-ui, sans-serif; font-size: 26px; letter-spacing: 0.03em; line-height: 1; margin-bottom: 5px; } .tr-via { font-family: ui-monospace, "JetBrains Mono", monospace; font-size: 9px; letter-spacing: 0.06em; color: rgba(255,255,255,0.55); text-transform: uppercase; } .tr-live { display: flex; align-items: center; gap: 7px; background: rgba(255,255,255,0.04); padding: 7px 12px; border: 1px solid rgba(255,255,255,0.12); border-radius: 2px; } .tr-live-dot { width: 7px; height: 7px; background: #4ade80; border-radius: 50%; box-shadow: 0 0 7px #4ade80; animation: tr-pulse 1.6s infinite; } @keyframes tr-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } } @media (prefers-reduced-motion: reduce) { .tr-live-dot { animation: none; } } .tr-live-text { font-family: ui-monospace, "JetBrains Mono", monospace; font-size: 10px; letter-spacing: 0.08em; color: rgba(255,255,255,0.75); text-transform: uppercase; } .tr-live-text strong { color: #fff; font-weight: 700; font-size: 11px; } .tr-route { margin-top: 22px; position: relative; padding: 0 4px; } .tr-route-line { position: absolute; top: 7px; left: 4px; right: 4px; height: 4px; background: #c8102e; border-radius: 2px; } .tr-route-stops { display: grid; grid-template-columns: repeat(5, 1fr); position: relative; z-index: 1; } .tr-stop { display: flex; flex-direction: column; align-items: center; cursor: pointer; } .tr-stop::before { content: ''; width: 14px; height: 14px; border-radius: 50%; background: #1a1a1a; border: 3px solid #c8102e; margin-bottom: 8px; transition: transform 0.2s; } .tr-stop:hover::before { transform: scale(1.2); } .tr-stop-active::before { background: #fff; border-color: #fff; box-shadow: 0 0 0 2px #c8102e; } .tr-stop-transfer::before { background: #fff; box-shadow: 0 0 0 2px #c8102e; } .tr-stop-label { font-family: ui-monospace, "JetBrains Mono", monospace; font-size: 8.5px; letter-spacing: 0.06em; color: rgba(255,255,255,0.55); text-transform: uppercase; text-align: center; line-height: 1.25; white-space: nowrap; } .tr-stop-active .tr-stop-label { color: #fff; } .tr-footer { margin-top: 22px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,0.08); display: flex; justify-content: space-between; font-family: ui-monospace, "JetBrains Mono", monospace; font-size: 8px; letter-spacing: 0.18em; text-transform: uppercase; color: rgba(255,255,255,0.4); } ``` **JS:** ```js // Next arrival countdown — decrements every 4s, resets to 5 min when // it bottoms out so the demo never goes stale. (function () { var nextIn = 4; var liveTimeEl = document.getElementById('tr-live-time'); if (!liveTimeEl) return; setInterval(function () { nextIn = nextIn > 1 ? nextIn - 1 : 5; liveTimeEl.textContent = nextIn + ' min'; }, 4000); })(); ``` ### 06. Origami Craft Endorsement **Type:** Pure CSS **Description:** Paper folded along six creases, lit from the upper-left. A ribbon hangs beneath. Hover lifts the page to catch the fold angles — the lit facets brighten, the shadowed ones recede. **HTML:** ```html
— Master Class —
Letterpress & Bindery
N° 0247 · Awarded May 2026
``` **CSS:** ```css .ori-stage { background: linear-gradient(170deg, #eee8d4 0%, #d8d0b8 100%); padding: 60px 40px; display: flex; flex-direction: column; gap: 32px; align-items: center; justify-content: center; perspective: 1200px; min-height: 100vh; } .ori-badge { position: relative; cursor: pointer; transform-style: preserve-3d; transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1); } .ori-badge:hover { transform: rotateY(14deg) rotateX(-6deg); } @media (prefers-reduced-motion: reduce) { .ori-badge { transition: none; } } .ori-medal { width: 220px; height: 300px; display: block; filter: drop-shadow(8px 18px 14px rgba(80,60,20,0.25)); } .ori-medal .ori-fold { transition: filter 0.4s; } .ori-badge:hover .ori-medal .ori-fold-light { filter: brightness(1.12); } .ori-badge:hover .ori-medal .ori-fold-shadow { filter: brightness(0.92); } .ori-label { text-align: center; } .ori-tier { font-family: system-ui, "Bricolage Grotesque", sans-serif; font-size: 9px; letter-spacing: 0.42em; color: #6a4a20; text-transform: uppercase; margin-bottom: 6px; } .ori-skill { font-family: "Marcellus", Georgia, serif; font-size: 26px; color: #3a2814; line-height: 1; margin-bottom: 8px; letter-spacing: 0.01em; } .ori-cert { font-family: system-ui, "Bricolage Grotesque", sans-serif; font-size: 9px; letter-spacing: 0.22em; color: #8a6630; text-transform: uppercase; } ``` ### 07. Hreflang Coverage **Type:** Pure CSS **Description:** International SEO's most misunderstood tag. Shows the target locale, alternate version count, and — crucially — flags missing reciprocal links. Hreflang must be bidirectional or the entire cluster invalidates. **HTML:** ```html
en-US
English · United States
→ 14 alternates
x-default
en-GB
en-AU
fr-FR
de-DE
es-ES
es-MX
ja-JP
pt-BR
zh-CN ✕
ko-KR ✕
nl-NL
it-IT
pl-PL
zh-CN and ko-KR are missing reciprocal hreflang links back to this URL
``` **CSS:** ```css .hl-stage { background: #f4f1eb; padding: 50px 40px; display: flex; flex-direction: column; justify-content: center; align-items: center; min-height: 100vh; } .hl-card { background: #fff; border: 1px solid #e2ddd4; border-radius: 6px; overflow: hidden; width: 100%; max-width: 480px; box-shadow: 0 2px 8px rgba(0,0,0,0.06); } .hl-primary { display: flex; align-items: center; padding: 20px 20px 18px; border-bottom: 1px solid #e2ddd4; gap: 14px; } .hl-flag { width: 8px; align-self: stretch; flex-shrink: 0; border-radius: 2px; overflow: hidden; display: flex; flex-direction: column; } .hl-flag span { flex: 1; } .hl-code { font-family: ui-monospace, "JetBrains Mono", monospace; font-size: 22px; font-weight: 700; color: #1a1612; letter-spacing: 0.02em; } .hl-name { font-family: system-ui, "Bricolage Grotesque", sans-serif; font-size: 12px; color: #4a4239; line-height: 1.4; letter-spacing: 0.04em; } .hl-alts-count { font-family: ui-monospace, "JetBrains Mono", monospace; font-size: 10px; color: #888; margin-left: auto; text-align: right; white-space: nowrap; } .hl-body { padding: 16px 20px 18px; } .hl-section-label { font-family: system-ui, "Bricolage Grotesque", sans-serif; font-size: 9px; letter-spacing: 0.28em; text-transform: uppercase; color: #aaa; margin-bottom: 10px; } .hl-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 16px; } .hl-chip { padding: 4px 10px; border-radius: 3px; font-family: ui-monospace, "JetBrains Mono", monospace; font-size: 11px; letter-spacing: 0.04em; background: #f4f1eb; border: 1px solid #e2ddd4; color: #1a1612; transition: background 0.2s; cursor: default; } .hl-chip:hover { background: #e8e4d8; } .hl-xdefault { background: #e8f0fe; border-color: #c5d8fd; color: #4285f4; } .hl-missing { background: #fde8e8; border-color: #f8c0c0; color: #ff4e42; } .hl-warning { display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: #fff8e8; border-radius: 4px; border-left: 3px solid #ffa400; font-family: system-ui, "Bricolage Grotesque", sans-serif; font-size: 11px; color: #8a5a00; letter-spacing: 0.02em; } .hl-warning::before { content: '⚠'; flex-shrink: 0; } ``` ### 08. E-E-A-T Scorecard **Type:** Pure CSS **Description:** Google's quality evaluator framework — Experience, Expertise, Authoritativeness, Trustworthiness. Composite score and a grade, with four animated bars showing per-dimension strength. **HTML:** ```html
85
Composite · /100
A
Strong signal
E
Experience
82
E
Expertise
91
A
Authoritativeness
79
T
Trustworthiness
88
``` **CSS:** ```css .eeat-stage { background: #fff; padding: 50px 40px; display: flex; flex-direction: column; justify-content: center; align-items: center; min-height: 100vh; } .eeat-card { background: #fff; border: 1.5px solid #e8e4da; border-radius: 6px; padding: 28px 28px 22px; width: 100%; max-width: 480px; box-shadow: 0 4px 16px rgba(0,0,0,0.06); } .eeat-top { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 24px; padding-bottom: 20px; border-bottom: 1px solid #f0ece0; } .eeat-composite { display: flex; flex-direction: column; gap: 2px; } .eeat-big-score { font-family: Georgia, "Fraunces", serif; font-size: 72px; line-height: 0.85; font-weight: 300; font-style: italic; color: #1a1612; letter-spacing: -0.04em; } .eeat-score-label { font-family: system-ui, "Bricolage Grotesque", sans-serif; font-size: 9px; letter-spacing: 0.28em; text-transform: uppercase; color: #aaa; } .eeat-grade-block { text-align: right; } .eeat-grade { font-family: Georgia, "Fraunces", serif; font-size: 48px; font-weight: 700; color: #1d8f4a; line-height: 1; } .eeat-grade-label { font-family: system-ui, "Bricolage Grotesque", sans-serif; font-size: 9px; letter-spacing: 0.2em; text-transform: uppercase; color: #888; margin-top: 2px; } .eeat-bars { display: flex; flex-direction: column; gap: 12px; } .eeat-row { display: flex; align-items: center; gap: 12px; } .eeat-abbr { width: 12px; font-family: Georgia, "Fraunces", serif; font-weight: 700; font-size: 15px; flex-shrink: 0; } .eeat-name { font-family: system-ui, "Bricolage Grotesque", sans-serif; font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: #4a4239; width: 120px; flex-shrink: 0; } .eeat-track { flex: 1; height: 6px; background: #f0ece0; border-radius: 3px; overflow: hidden; } .eeat-fill { height: 100%; border-radius: 3px; width: 0; animation: eeat-grow 1s cubic-bezier(0.4, 0, 0.2, 1) 0.4s forwards; } @keyframes eeat-grow { to { width: var(--eeat-w, 0); } } @media (prefers-reduced-motion: reduce) { .eeat-fill { animation: none; width: var(--eeat-w, 0); } } .eeat-val { font-family: ui-monospace, "JetBrains Mono", monospace; font-size: 12px; font-weight: 700; color: #1a1612; width: 28px; text-align: right; flex-shrink: 0; } .eeat-footer { margin-top: 18px; padding-top: 14px; border-top: 1px solid #f0ece0; display: flex; justify-content: space-between; font-family: system-ui, "Bricolage Grotesque", sans-serif; font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: #aaa; } ``` ### 09. Crawl & Index Status **Type:** Pure CSS **Description:** Googlebot visits and decides: indexed or not. But there are four states before "indexed," and most pages fail before the first one. This badge shows exactly where in the crawl pipeline a URL sits. **HTML:** ```html
INDEXED
Last crawled: 3h ago
/blog/technical-seo-guide-2026/
Googlebot 2.1 · JS Rendered · 200 OK · canonical: self
Discovered
»
Crawled
»
Rendered
»
Indexed
``` **CSS:** ```css .crawl-stage { background: #0a0e18; padding: 50px 36px; display: flex; flex-direction: column; justify-content: center; align-items: center; min-height: 100vh; } .crawl-card { background: #111620; border: 1px solid #1e2638; border-radius: 6px; padding: 24px 24px 20px; width: 100%; max-width: 480px; font-family: ui-monospace, "JetBrains Mono", monospace; } .crawl-status-row { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; } .crawl-dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; } .crawl-dot-indexed { background: #0cce6b; box-shadow: 0 0 8px #0cce6b; animation: crawl-pulse 2s infinite; } @keyframes crawl-pulse { 0%, 100% { box-shadow: 0 0 6px #0cce6b; } 50% { box-shadow: 0 0 14px #0cce6b; } } @media (prefers-reduced-motion: reduce) { .crawl-dot-indexed { animation: none; } } .crawl-status-text { font-size: 20px; font-weight: 800; letter-spacing: 0.12em; color: #0cce6b; } .crawl-timestamp { margin-left: auto; font-size: 10px; color: #8b949e; letter-spacing: 0.06em; } .crawl-url { font-size: 12px; color: #4a90d9; letter-spacing: 0; margin-bottom: 12px; padding: 8px 12px; background: rgba(66, 133, 244, 0.06); border-left: 2px solid rgba(66, 133, 244, 0.3); border-radius: 0 3px 3px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .crawl-meta-row { display: flex; gap: 8px; align-items: center; font-size: 10px; color: #8b949e; letter-spacing: 0.06em; margin-bottom: 20px; } .crawl-sep { color: #30363d; } .crawl-meta-tag { padding: 2px 7px; border-radius: 3px; background: rgba(139, 148, 158, 0.1); border: 1px solid #30363d; font-size: 9px; letter-spacing: 0.1em; } .crawl-pipeline { display: flex; align-items: center; gap: 4px; padding-top: 16px; border-top: 1px solid #1e2638; } .crawl-step { flex: 1; text-align: center; font-size: 8.5px; letter-spacing: 0.12em; text-transform: uppercase; padding: 5px 4px; border-radius: 3px; border: 1px solid #1e2638; color: #8b949e; } .crawl-step-done { color: #0cce6b; border-color: rgba(12,206,107,0.3); background: rgba(12,206,107,0.06); } .crawl-step-active { color: #fff; border-color: rgba(12,206,107,0.6); background: rgba(12,206,107,0.15); font-weight: 700; } .crawl-arrow { font-size: 10px; color: #30363d; flex-shrink: 0; } ``` ### 10. Schema Markup Type **Type:** Pure CSS **Description:** Structured data is a contract between a page and Google's parser. The badge names the @type and lists which SERP features it unlocks — the difference between a plain blue link and a result with stars, FAQs, and how-to steps. **HTML:** ```html
@type
Article
✓ Valid JSON-LD
⬡ Rich Result
★ Featured Snippet
⌖ Author Markup
⌚ DatePublished
<script type="application/ld+json">
  { "@context": "https://schema.org",
    "@type": "Article",
    "headline": "…",
    "author": { … } }
</script>
``` **CSS:** ```css .schema-stage { background: #f6f8fa; padding: 50px 40px; display: flex; flex-direction: column; justify-content: center; align-items: center; min-height: 100vh; } .schema-card { background: #fff; border: 1px solid #e0e6ed; border-radius: 6px; width: 100%; max-width: 480px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,0.05); } .schema-header { background: #f6f8fa; border-bottom: 1px solid #e0e6ed; padding: 16px 20px; display: flex; align-items: center; gap: 12px; } .schema-at { font-family: ui-monospace, "JetBrains Mono", monospace; font-size: 10px; letter-spacing: 0.14em; color: #888; text-transform: uppercase; } .schema-type-name { font-family: ui-monospace, "JetBrains Mono", monospace; font-size: 18px; font-weight: 700; color: #1a1612; letter-spacing: -0.01em; } .schema-valid-tag { margin-left: auto; display: flex; align-items: center; gap: 5px; font-family: system-ui, "Bricolage Grotesque", sans-serif; font-size: 11px; font-weight: 700; letter-spacing: 0.1em; color: #1d8f4a; padding: 4px 10px; border: 1.5px solid rgba(29, 143, 74, 0.4); border-radius: 3px; } .schema-body { padding: 18px 20px; } .schema-section-label { font-family: system-ui, "Bricolage Grotesque", sans-serif; font-size: 9px; letter-spacing: 0.28em; text-transform: uppercase; color: #aaa; margin-bottom: 10px; } .schema-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 20px; } .schema-chip { display: flex; align-items: center; gap: 5px; padding: 5px 10px; border-radius: 3px; font-family: system-ui, "Bricolage Grotesque", sans-serif; font-size: 11px; font-weight: 600; letter-spacing: 0.04em; border: 1px solid; } .schema-chip-rich { color: #4285f4; background: #e8f0fe; border-color: #c5d8fd; } .schema-chip-snippet { color: #1d8f4a; background: #e6f4ea; border-color: #b7e0c2; } .schema-chip-author { color: #7c4dff; background: #f3e8ff; border-color: #d9b8ff; } .schema-chip-date { color: #b8762d; background: #fef3e2; border-color: #fdd9a0; } .schema-code-peek { background: #f6f8fa; border: 1px solid #e0e6ed; border-radius: 4px; padding: 10px 14px; font-family: ui-monospace, "JetBrains Mono", monospace; font-size: 11.5px; line-height: 1.7; overflow: hidden; } .schema-s-key { color: #032f62; } .schema-s-string { color: #0d6416; } .schema-s-gray { color: #888; } .schema-s-prop { color: #5a3d99; } ``` ### 11. Search Intent Spectrum **Type:** Pure CSS **Description:** Plots a keyword on the Informational / Navigational / Commercial / Transactional spectrum. Intent mismatch is one of the top reasons pages don't rank — this badge surfaces the right page type before a word is written. **HTML:** ```html
Keyword
"best seo tools 2026"
I
N
C
T
Informational Navigational Commercial Transactional
Commercial
Comparison / Listicle Best-of, tools roundup, pricing page
``` **CSS:** ```css .intent-stage { background: #f0f4fb; padding: 50px 40px; display: flex; flex-direction: column; justify-content: center; align-items: center; min-height: 100vh; } .intent-card { background: #fff; border: 1px solid #dde3ef; border-radius: 6px; padding: 28px 28px 24px; width: 100%; max-width: 480px; box-shadow: 0 2px 12px rgba(0,0,0,0.06); } .intent-query-label { font-family: system-ui, "Bricolage Grotesque", sans-serif; font-size: 9px; letter-spacing: 0.25em; text-transform: uppercase; color: #888; margin-bottom: 6px; } .intent-query-text { font-family: ui-monospace, "JetBrains Mono", monospace; font-size: 16px; color: #1a1612; margin-bottom: 22px; padding: 8px 12px; background: #f6f8fc; border-radius: 4px; border-left: 3px solid #4285f4; } .intent-spectrum-wrap { position: relative; margin-bottom: 8px; } .intent-spectrum { display: flex; height: 44px; border-radius: 4px; overflow: visible; position: relative; } .intent-zone { flex: 1; display: flex; align-items: center; justify-content: center; font-family: ui-monospace, "JetBrains Mono", monospace; font-size: 11px; font-weight: 700; color: rgba(255,255,255,0.85); letter-spacing: 0.06em; } .intent-zone:first-child { border-radius: 4px 0 0 4px; } .intent-zone:last-child { border-radius: 0 4px 4px 0; } .intent-i { background: #4285f4; } .intent-n { background: #0f9d58; } .intent-c { background: #f4b400; color: rgba(0,0,0,0.6); } .intent-t { background: #db4437; } .intent-marker { position: absolute; top: -6px; bottom: -6px; width: 4px; background: #1a1612; border-radius: 2px; transform: translateX(-50%); box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px #1a1612; animation: intent-slide 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.4s forwards; left: 0%; } @keyframes intent-slide { to { left: 68%; } } @media (prefers-reduced-motion: reduce) { .intent-marker { animation: none; left: 68%; } } .intent-zone-labels { display: flex; margin-top: 6px; margin-bottom: 20px; } .intent-zone-labels span { flex: 1; text-align: center; font-family: system-ui, "Bricolage Grotesque", sans-serif; font-size: 9px; letter-spacing: 0.12em; text-transform: uppercase; color: #aaa; } .intent-result-row { display: flex; align-items: center; justify-content: space-between; padding-top: 18px; border-top: 1px solid #eee; } .intent-type-pill { padding: 6px 14px; border-radius: 20px; background: rgba(244, 180, 0, 0.15); border: 1px solid rgba(244, 180, 0, 0.4); font-family: system-ui, "Bricolage Grotesque", sans-serif; font-size: 12px; font-weight: 700; letter-spacing: 0.06em; color: #c48a00; } .intent-page-rec { font-family: system-ui, "Bricolage Grotesque", sans-serif; font-size: 11px; color: #888; text-align: right; line-height: 1.5; letter-spacing: 0.04em; } .intent-page-rec strong { color: #1a1612; display: block; } ``` ### 12. Core Web Vitals **Type:** Pure CSS **Description:** LCP, INP, CLS — the three real-world page-experience signals Google ranks on. Three SVG arcs draw to their verdict on load. Green / amber / red thresholds match Google's field-data classification. **HTML:** ```html
Core Web Vitals · Field Data
2 / 3 Pass
LCP
Needs Work
INP
Good
CLS
Good
``` **CSS:** ```css .cwv-stage { background: #0d1117; padding: 50px 40px; display: flex; flex-direction: column; gap: 28px; align-items: center; justify-content: center; min-height: 100vh; } .cwv-card { background: #161b22; border: 1px solid #30363d; border-radius: 8px; padding: 28px 32px 24px; width: 100%; max-width: 480px; } .cwv-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; } .cwv-title { font-family: system-ui, "Bricolage Grotesque", sans-serif; font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: #8b949e; } .cwv-pass-count { font-family: ui-monospace, "JetBrains Mono", monospace; font-size: 11px; letter-spacing: 0.1em; color: #0cce6b; padding: 3px 10px; border: 1px solid rgba(12, 206, 107, 0.3); border-radius: 20px; } .cwv-gauges { display: flex; gap: 24px; justify-content: center; align-items: flex-end; padding-bottom: 20px; border-bottom: 1px solid #21262d; } .cwv-gauge { display: flex; flex-direction: column; align-items: center; gap: 6px; } .cwv-gauge svg { width: 96px; height: 96px; overflow: visible; } .cwv-gauge-track { fill: none; stroke: #21262d; stroke-width: 7; stroke-linecap: round; } .cwv-gauge-arc { fill: none; stroke-width: 7; stroke-linecap: round; stroke-dasharray: 226; stroke-dashoffset: 226; animation: cwv-draw 1.1s cubic-bezier(0.4, 0, 0.2, 1) 0.3s forwards; } @keyframes cwv-draw { to { stroke-dashoffset: var(--cwv-target, 86); } } @media (prefers-reduced-motion: reduce) { .cwv-gauge-arc { animation: none; stroke-dashoffset: 86; } } .cwv-gauge-val { font-family: ui-monospace, "JetBrains Mono", monospace; fill: #e6edf3; font-size: 14px; font-weight: 700; } .cwv-gauge-unit { font-family: system-ui, "Bricolage Grotesque", sans-serif; fill: #8b949e; font-size: 10px; } .cwv-metric-name { font-family: ui-monospace, "JetBrains Mono", monospace; font-size: 11px; letter-spacing: 0.14em; color: #8b949e; text-transform: uppercase; } .cwv-metric-verdict { font-family: system-ui, "Bricolage Grotesque", sans-serif; font-size: 9px; letter-spacing: 0.2em; text-transform: uppercase; margin-top: -2px; } .cwv-verdict-good { color: #0cce6b; } .cwv-verdict-needs { color: #ffa400; } .cwv-verdict-poor { color: #ff4e42; } .cwv-footer { margin-top: 18px; display: flex; justify-content: space-between; align-items: center; } .cwv-origin { font-family: ui-monospace, "JetBrains Mono", monospace; font-size: 10px; letter-spacing: 0.06em; color: #4a90d9; } .cwv-date { font-family: system-ui, "Bricolage Grotesque", sans-serif; font-size: 10px; letter-spacing: 0.1em; color: #8b949e; text-transform: uppercase; } ``` ### 13. ECG Heartbeat **Type:** CSS + JS **Description:** Live BPM with a continuously scrolling waveform. Scroll speed equals beats per minute literally — change the duration and you change the rate. The badge and the data are the same thing. **HTML:** ```html
SRV-PROD-01 · Heartbeat
Normal
72
BPM
P–R 160ms
Interval
QRS 88ms
Duration
``` **CSS:** ```css .ecg-stage { background: #050c12; padding: 48px 32px; display: flex; flex-direction: column; gap: 20px; justify-content: center; align-items: center; min-height: 100vh; } .ecg-card { background: #0a1520; border: 1px solid #0f2030; border-radius: 8px; padding: 20px 24px; width: 100%; max-width: 440px; } .ecg-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 16px; } .ecg-system { font-family: ui-monospace, "JetBrains Mono", monospace; font-size: 10px; letter-spacing: 0.24em; text-transform: uppercase; color: #00e5a0; opacity: 0.7; } .ecg-status { font-family: system-ui, "Bricolage Grotesque", sans-serif; font-size: 10px; letter-spacing: 0.22em; text-transform: uppercase; color: #00e5a0; padding: 3px 10px; border: 1px solid rgba(0,229,160,0.3); border-radius: 20px; animation: ecg-glow 3s ease-in-out infinite; } @keyframes ecg-glow { 0%, 100% { box-shadow: 0 0 0 rgba(0,229,160,0.3); } 50% { box-shadow: 0 0 8px rgba(0,229,160,0.3); } } .ecg-viewport { width: 100%; height: 68px; overflow: hidden; position: relative; margin-bottom: 14px; } .ecg-svg { display: block; animation: ecg-scroll 0.833s linear infinite; } @keyframes ecg-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } } @media (prefers-reduced-motion: reduce) { .ecg-svg, .ecg-status { animation: none; } } .ecg-metrics { display: flex; align-items: flex-end; gap: 24px; padding-top: 12px; border-top: 1px solid #0f2030; } .ecg-bpm { display: flex; align-items: baseline; gap: 5px; } .ecg-bpm-val { font-family: ui-monospace, "JetBrains Mono", monospace; font-size: 42px; font-weight: 700; color: #00e5a0; line-height: 0.9; letter-spacing: -0.02em; } .ecg-bpm-unit { font-family: system-ui, "Bricolage Grotesque", sans-serif; font-size: 12px; letter-spacing: 0.12em; color: rgba(0,229,160,0.6); text-transform: uppercase; } .ecg-secondary { display: flex; flex-direction: column; gap: 4px; margin-left: auto; text-align: right; } .ecg-sec-val { font-family: ui-monospace, "JetBrains Mono", monospace; font-size: 14px; color: rgba(0,229,160,0.8); letter-spacing: 0.04em; } .ecg-sec-label { font-family: system-ui, "Bricolage Grotesque", sans-serif; font-size: 9px; letter-spacing: 0.18em; text-transform: uppercase; color: rgba(0,229,160,0.4); } ``` **JS:** ```js // BPM drifts slightly around 72 so the badge feels alive. Animation // duration is tied to BPM literally — 60 / bpm seconds per cycle. (function () { var bpmEl = document.getElementById('ecg-bpm'); var ecgSvg = document.querySelector('.ecg-svg'); var bpm = 72; setInterval(function () { bpm += (Math.random() - 0.5) * 2; bpm = Math.max(68, Math.min(78, bpm)); var rounded = Math.round(bpm); bpmEl.textContent = rounded; ecgSvg.style.animationDuration = (60 / bpm).toFixed(3) + 's'; }, 4000); })(); ``` ### 14. Build Pipeline **Type:** CSS + JS **Description:** CI/CD stage tracker with a spinning arc on the active step. Sequential steps light up — you know roughly how long remains by which step is spinning. Restarts automatically. **HTML:** ```html
⏳ Running
feat/badge-v5 · a3f9c2e
``` **CSS:** ```css .build-stage { background: #0d1117; padding: 40px 32px; display: flex; flex-direction: column; justify-content: center; align-items: center; min-height: 100vh; } .build-card { background: #161b22; border: 1px solid #30363d; border-radius: 8px; width: 100%; max-width: 420px; overflow: hidden; font-family: ui-monospace, "JetBrains Mono", monospace; } .build-header { padding: 14px 18px; border-bottom: 1px solid #21262d; display: flex; justify-content: space-between; align-items: center; } .build-title { font-size: 12px; letter-spacing: 0.06em; color: #e6edf3; } .build-branch { font-size: 10px; color: #8b949e; letter-spacing: 0.06em; } .build-steps { padding: 8px 0; } .build-step { display: flex; align-items: center; gap: 12px; padding: 10px 18px; transition: background 0.3s; } .build-step.is-active { background: rgba(255,255,255,0.03); } .build-step-icon { width: 20px; height: 20px; flex-shrink: 0; } .build-spinner-arc { transform-origin: 10px 10px; animation: build-spin 0.8s linear infinite; } @keyframes build-spin { to { transform: rotate(360deg); } } @media (prefers-reduced-motion: reduce) { .build-spinner-arc { animation: none; } } .build-step-info { flex: 1; } .build-step-name { font-size: 12px; color: #e6edf3; letter-spacing: 0.02em; line-height: 1; margin-bottom: 3px; } .build-step-name.is-dim { color: #484f58; } .build-step-meta { font-family: system-ui, "Bricolage Grotesque", sans-serif; font-size: 10px; letter-spacing: 0.1em; color: #8b949e; text-transform: uppercase; } .build-step-dur { font-size: 11px; color: #8b949e; letter-spacing: 0.06em; flex-shrink: 0; } .build-footer { padding: 12px 18px; border-top: 1px solid #21262d; font-size: 10px; letter-spacing: 0.08em; color: #8b949e; display: flex; justify-content: space-between; } .build-restart { cursor: pointer; color: #4a90d9; text-decoration: underline; background: none; border: none; font-family: inherit; font-size: inherit; letter-spacing: inherit; } ``` **JS:** ```js // Build pipeline — 6 sequential CI stages, each takes a few seconds. // Active step shows a spinning arc; completed steps show a checkmark. // Restarts automatically 3s after completion. (function () { var STEPS = [ { label: 'Checkout', meta: 'actions/checkout@v4', dur: 2 }, { label: 'npm install', meta: 'node 20 · 1,284 packages', dur: 14 }, { label: 'ESLint', meta: '0 errors · 3 warnings', dur: 5 }, { label: 'Jest', meta: '142 tests · 3 suites', dur: 24 }, { label: 'Vite build', meta: '1.4 MB bundle', dur: 18 }, { label: 'fly.io deploy', meta: 'prod · us-east region', dur: 9 } ]; var active = 0; var elapsed = 0; var elapsedTimer; var stepsEl = document.getElementById('build-steps'); var titleEl = document.getElementById('build-title'); var elapsedEl = document.getElementById('build-elapsed'); var restartBtn = document.getElementById('build-restart'); function iconDone() { return '' + '' + '' + ''; } function iconRunning() { return '' + '' + '' + ''; } function iconWaiting() { return '' + '' + ''; } function render() { stepsEl.innerHTML = STEPS.map(function (s, i) { var done = i < active; var running = i === active; var waiting = i > active; var icon = done ? iconDone() : running ? iconRunning() : iconWaiting(); var nameClass = waiting ? 'build-step-name is-dim' : 'build-step-name'; var dur = done ? s.dur + 's' : running ? elapsed + 's' : ''; var durColor = done ? '#3fb950' : running ? '#e3b341' : '#30363d'; return '
' + icon + '
' + '
' + s.label + '
' + '
' + (waiting ? '—' : s.meta) + '
' + '
' + '
' + dur + '
' + '
'; }).join(''); elapsedEl.textContent = 'Elapsed: ' + STEPS.slice(0, active).reduce(function (a, s) { return a + s.dur; }, 0) + 's'; if (active >= STEPS.length) { titleEl.textContent = '✓ Passed'; titleEl.style.color = '#3fb950'; } else { titleEl.textContent = '⏳ Running'; titleEl.style.color = '#e3b341'; } } function start() { active = 0; elapsed = 0; clearInterval(elapsedTimer); render(); elapsedTimer = setInterval(function () { elapsed++; render(); }, 1000); var advance = setInterval(function () { elapsed = 0; active++; render(); if (active >= STEPS.length) { clearInterval(advance); clearInterval(elapsedTimer); setTimeout(start, 3000); } }, 2500); } restartBtn.addEventListener('click', start); start(); })(); ``` ### 15. Countdown Ring **Type:** CSS + JS **Description:** Ring depletes continuously in real time. Color shifts green → amber → red as the deadline approaches. The depletion rate is the data. A static badge cannot know what time it is. **HTML:** ```html
Sprint Review
02:34:00
remaining
Deadline · Today, 17:00
``` **CSS:** ```css .cd-stage { background: #fafaf7; padding: 60px 48px; display: flex; flex-direction: column; gap: 20px; align-items: center; justify-content: center; min-height: 100vh; } .cd-wrap { display: flex; flex-direction: column; align-items: center; gap: 14px; } .cd-ring-wrap { position: relative; width: 180px; height: 180px; } .cd-ring-wrap svg { width: 100%; height: 100%; transform: rotate(-90deg); } .cd-ring-track { fill: none; stroke: #e8e4da; stroke-width: 9; } .cd-ring-fill { fill: none; stroke-width: 9; stroke-linecap: round; stroke-dasharray: 508; stroke-dashoffset: 0; transition: stroke-dashoffset 1s linear, stroke 0.8s ease; } .cd-inner { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; } .cd-time { font-family: ui-monospace, "JetBrains Mono", monospace; font-size: 26px; font-weight: 700; color: #1a1612; letter-spacing: -0.02em; line-height: 1; } .cd-label { font-family: system-ui, "Bricolage Grotesque", sans-serif; font-size: 9px; letter-spacing: 0.22em; text-transform: uppercase; color: #4a4239; } .cd-deadline { font-family: system-ui, "Bricolage Grotesque", sans-serif; font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: #aaa; text-align: center; } .cd-event { font-family: Georgia, "Fraunces", serif; font-size: 20px; font-style: italic; color: #1a1612; text-align: center; } ``` **JS:** ```js // Countdown ring — 4h total sprint, ~2h34m initially remaining. // Ring depletes continuously, color shifts at 50% and 20% thresholds. (function () { var TOTAL_MS = 4 * 3600 * 1000; var deadline = new Date(Date.now() + 2 * 3600 * 1000 + 34 * 60 * 1000); var ring = document.getElementById('cd-ring'); var timeEl = document.getElementById('cd-time'); var deadEl = document.getElementById('cd-deadline'); var CIRCUM = 2 * Math.PI * 81; function pad2(n) { return String(n).padStart(2, '0'); } function tick() { var remaining = Math.max(0, deadline - Date.now()); var frac = remaining / TOTAL_MS; ring.style.strokeDashoffset = CIRCUM * (1 - frac); ring.style.stroke = frac > 0.5 ? '#0cce6b' : frac > 0.2 ? '#ffa400' : '#ff4e42'; var h = Math.floor(remaining / 3600000); var m = Math.floor((remaining % 3600000) / 60000); var s = Math.floor((remaining % 60000) / 1000); timeEl.textContent = pad2(h) + ':' + pad2(m) + ':' + pad2(s); deadEl.textContent = 'Deadline · Today, ' + deadline.getHours() + ':' + pad2(deadline.getMinutes()); } tick(); setInterval(tick, 1000); })(); ``` ### 16. Live Price Ticker **Type:** CSS + JS **Description:** A static price is history; an animated price is now. Green or red flash on each update tells direction without comparison. Sparkline shows the recent walk. The animation IS the signal. **HTML:** ```html
BTC · USD
Live · 3s
$67,420.58
+$234.12 (+0.35%)
``` **CSS:** ```css .price-stage { background: #0d1117; padding: 48px 36px; display: flex; justify-content: center; align-items: center; min-height: 100vh; } .price-card { background: #161b22; border: 1px solid #30363d; border-radius: 8px; padding: 22px 24px; width: 100%; max-width: 380px; position: relative; overflow: hidden; font-family: ui-monospace, "JetBrains Mono", monospace; } .price-card.is-flash-up { animation: price-flash-up 0.65s ease-out; } .price-card.is-flash-down { animation: price-flash-down 0.65s ease-out; } @keyframes price-flash-up { 0% { background: rgba(12,206,107,0.2); } 100% { background: #161b22; } } @keyframes price-flash-down { 0% { background: rgba(255,78,66,0.2); } 100% { background: #161b22; } } @media (prefers-reduced-motion: reduce) { .price-card.is-flash-up, .price-card.is-flash-down { animation: none; } } .price-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 8px; } .price-symbol { font-size: 11px; letter-spacing: 0.18em; color: #8b949e; text-transform: uppercase; } .price-live-dot { display: flex; align-items: center; gap: 6px; font-family: system-ui, "Bricolage Grotesque", sans-serif; font-size: 9px; letter-spacing: 0.2em; text-transform: uppercase; color: #8b949e; } .price-live-dot::before { content: ''; display: block; width: 6px; height: 6px; border-radius: 50%; background: #0cce6b; box-shadow: 0 0 6px #0cce6b; animation: price-pulse 2s infinite; } @keyframes price-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } } .price-value { font-size: 36px; font-weight: 700; color: #e6edf3; letter-spacing: -0.02em; margin-bottom: 6px; line-height: 1; } .price-change { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; } .price-delta { font-size: 13px; font-weight: 600; } .price-up { color: #0cce6b; } .price-down { color: #ff4e42; } .price-arrow { font-size: 12px; } .price-sparkline { width: 100%; height: 36px; } .price-sparkline-path { fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; } .price-footer { display: flex; justify-content: space-between; margin-top: 10px; padding-top: 10px; border-top: 1px solid #21262d; font-size: 9px; letter-spacing: 0.1em; color: #8b949e; text-transform: uppercase; } ``` **JS:** ```js // Live price ticker — random-walks BTC around $67k. Every 3s the // price moves, the delta + sparkline update, and the background // flashes green or red depending on direction. (function () { var price = 67420.58; var openPrice = 67186.46; var history = []; for (var k = 0; k < 24; k++) { history.push(67186 + Math.sin(k * 0.7) * 180 + k * 9.8 + Math.random() * 60); } history.push(price); var card = document.getElementById('price-card'); var valEl = document.getElementById('price-value'); var deltaEl = document.getElementById('price-delta'); var pctEl = document.getElementById('price-pct'); var arrowEl = document.getElementById('price-arrow'); var lineEl = document.getElementById('price-spark-line'); var areaEl = document.getElementById('price-spark-area'); var updEl = document.getElementById('price-updated'); function fmt(n) { return n.toLocaleString('en-US', { minimumFractionDigits: 2, maximumFractionDigits: 2 }); } function redrawSpark() { var W = 200, H = 36, pad = 2; var min = Math.min.apply(null, history); var max = Math.max.apply(null, history); var range = max - min || 1; var pts = history.map(function (v, i) { var x = (i / (history.length - 1)) * (W - 2 * pad) + pad; var y = H - pad - ((v - min) / range) * (H - 2 * pad); return x.toFixed(1) + ',' + y.toFixed(1); }).join(' '); lineEl.setAttribute('points', pts); var areaD = 'M ' + pad + ' ' + H + ' L ' + history.map(function (v, i) { var x = (i / (history.length - 1)) * (W - 2 * pad) + pad; var y = H - pad - ((v - min) / range) * (H - 2 * pad); return x.toFixed(1) + ' ' + y.toFixed(1); }).join(' L ') + ' L ' + (W - pad) + ' ' + H + ' Z'; areaEl.setAttribute('d', areaD); } function updatePrice() { var prev = price; price += (Math.random() - 0.47) * 110; price = Math.max(64000, Math.min(72000, price)); history.push(price); if (history.length > 24) history.shift(); var isUp = price >= prev; var totalChange = price - openPrice; var totalPct = (totalChange / openPrice) * 100; valEl.textContent = '$' + fmt(price); deltaEl.textContent = (totalChange >= 0 ? '+$' : '-$') + fmt(Math.abs(totalChange)); pctEl.textContent = '(' + (totalPct >= 0 ? '+' : '') + totalPct.toFixed(2) + '%)'; arrowEl.textContent = isUp ? '▲' : '▼'; arrowEl.style.color = isUp ? '#0cce6b' : '#ff4e42'; var cls = isUp ? 'price-up' : 'price-down'; deltaEl.className = 'price-delta ' + cls; pctEl.className = 'price-delta ' + cls; document.querySelectorAll('#price-spark-grad stop').forEach(function (s) { s.setAttribute('stop-color', isUp ? '#0cce6b' : '#ff4e42'); }); lineEl.setAttribute('stroke', isUp ? '#0cce6b' : '#ff4e42'); card.classList.remove('is-flash-up', 'is-flash-down'); void card.offsetWidth; card.classList.add(isUp ? 'is-flash-up' : 'is-flash-down'); updEl.textContent = 'Updated just now'; redrawSpark(); } redrawSpark(); setInterval(updatePrice, 3000); })(); ``` ### 17. File Extension Badge **Type:** Pure CSS **Description:** Two adjacent flex blocks — colored extension + white filename. Color is the identifier; nothing else is needed. Hover lifts the whole card off the surface the way you pick up a real file. **HTML:** ```html
PDF
annual-report-2025.pdf
2.4 MB · Updated Mar 14
SVG
logo-lockup-final.svg
18 KB · Vector · Scalable
MP3
episode-42-interview.mp3
48 MB · 52 min 18 sec
ZIP
source-assets-v3.zip
340 MB · 1,284 files
CSV
q1-export-raw.csv
6.1 MB · 88,412 rows
``` **CSS:** ```css .fx-stage { background: #f0f2f5; padding: 50px 40px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; min-height: 100vh; align-items: center; justify-content: center; } .fx-badge { display: inline-flex; align-items: stretch; overflow: hidden; border-radius: 4px; box-shadow: 0 2px 6px rgba(0,0,0,0.1); cursor: default; transition: transform 0.2s, box-shadow 0.2s; text-decoration: none; } .fx-badge:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,0.14); } @media (prefers-reduced-motion: reduce) { .fx-badge { transition: none; } } .fx-ext { padding: 10px 12px; display: flex; align-items: center; justify-content: center; min-width: 56px; background: var(--fx-color, #555); font-family: ui-monospace, "JetBrains Mono", monospace; font-size: 13px; font-weight: 700; color: #fff; letter-spacing: 0.04em; text-transform: uppercase; flex-shrink: 0; } .fx-info { padding: 10px 16px; background: #fff; display: flex; flex-direction: column; justify-content: center; gap: 2px; } .fx-name { font-family: ui-monospace, "JetBrains Mono", monospace; font-size: 13px; font-weight: 500; color: #1a1612; letter-spacing: -0.01em; line-height: 1; } .fx-meta { font-family: system-ui, "Bricolage Grotesque", sans-serif; font-size: 10px; letter-spacing: 0.12em; color: #888; text-transform: uppercase; line-height: 1; } ``` ### 18. Dice Face **Type:** CSS + JS **Description:** A fair die with six possible states. Click to roll — the pip positions are correct, the animation is physical, the number updates. One honest square doing exactly one honest job. **HTML:** ```html
click the die to roll
``` **CSS:** ```css .die-stage { background: #fff; padding: 60px 48px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 24px; min-height: 100vh; } .die-wrap { perspective: 600px; } .die-cube { width: 110px; height: 110px; background: #fff; border: 2.5px solid #1a1612; border-radius: 18px; display: grid; grid-template-areas: "tl tc tr" "ml mc mr" "bl bc br"; grid-template-columns: 1fr 1fr 1fr; grid-template-rows: 1fr 1fr 1fr; padding: 14px; cursor: pointer; box-shadow: 4px 4px 0 #1a1612, 5px 5px 8px rgba(0,0,0,0.12); transition: transform 0.15s, box-shadow 0.15s; position: relative; overflow: hidden; } .die-cube:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 #1a1612, 2px 2px 4px rgba(0,0,0,0.1); } .die-cube.is-rolling { animation: die-roll 0.5s cubic-bezier(0.36, 0.07, 0.19, 0.97); } @keyframes die-roll { 0% { transform: rotate(0deg) scale(1); } 20% { transform: rotate(-8deg) scale(0.95); } 50% { transform: rotate(12deg) scale(0.92); } 75% { transform: rotate(-5deg) scale(0.97); } 100% { transform: rotate(0deg) scale(1); } } @media (prefers-reduced-motion: reduce) { .die-cube.is-rolling { animation: none; } } .die-pip { display: flex; align-items: center; justify-content: center; } .die-pip::after { content: ''; width: 14px; height: 14px; border-radius: 50%; background: transparent; transition: background 0.2s; } .die-pip.is-on::after { background: #1a1612; } .die-pip[data-pos="tl"] { grid-area: tl; } .die-pip[data-pos="tc"] { grid-area: tc; } .die-pip[data-pos="tr"] { grid-area: tr; } .die-pip[data-pos="ml"] { grid-area: ml; } .die-pip[data-pos="mc"] { grid-area: mc; } .die-pip[data-pos="mr"] { grid-area: mr; } .die-pip[data-pos="bl"] { grid-area: bl; } .die-pip[data-pos="bc"] { grid-area: bc; } .die-pip[data-pos="br"] { grid-area: br; } .die-caption { font-family: system-ui, "Bricolage Grotesque", sans-serif; font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: #aaa; text-align: center; } .die-face-num { font-family: Georgia, "Fraunces", serif; font-size: 48px; font-style: italic; font-weight: 300; color: #1a1612; line-height: 1; text-align: center; } ``` **JS:** ```js // Click the die to roll. Pip positions per face are encoded as // arrays of grid-area names; the .is-on class lights up matching pips. var dieFaces = { 1: ['mc'], 2: ['tr', 'bl'], 3: ['tr', 'mc', 'bl'], 4: ['tl', 'tr', 'bl', 'br'], 5: ['tl', 'tr', 'mc', 'bl', 'br'], 6: ['tl', 'tr', 'ml', 'mr', 'bl', 'br'] }; var dieCube = document.getElementById('die-cube'); var dieFaceNum = document.getElementById('die-face-num'); var dieRolling = false; function dieSetFace(n) { var pips = dieFaces[n]; dieCube.querySelectorAll('.die-pip').forEach(function (p) { p.classList.toggle('is-on', pips.indexOf(p.dataset.pos) !== -1); }); dieFaceNum.textContent = n; } if (dieCube) { dieCube.addEventListener('click', function () { if (dieRolling) return; dieRolling = true; dieCube.classList.add('is-rolling'); setTimeout(function () { var n = Math.floor(Math.random() * 6) + 1; dieSetFace(n); dieCube.classList.remove('is-rolling'); dieRolling = false; }, 280); }); } ``` ### 19. Signal Bars **Type:** Pure CSS **Description:** Four rectangles of increasing height — possibly the most iconic data visualization ever designed. Confidence, signal, relevance — whatever the product needs. Hover fills all bars to maximum. **HTML:** ```html
Excellent
Confidence · 4 / 4
Good · 3/4
Fair · 2/4
Weak · 1/4
``` **CSS:** ```css .sig-stage { background: #f5f4f2; padding: 60px 48px; display: flex; flex-direction: column; gap: 36px; align-items: flex-start; min-height: 100vh; align-items: center; justify-content: center; } .sig-badge { display: inline-flex; align-items: flex-end; gap: 4px; padding: 16px 20px 14px; background: white; border: 1px solid #e0ddd8; box-shadow: 0 2px 8px rgba(0,0,0,0.06); cursor: pointer; position: relative; } .sig-badge:hover .sig-bar { background: #1a1612 !important; } .sig-bars-group { display: flex; align-items: flex-end; gap: 4px; margin-right: 14px; } .sig-bar { width: 8px; border-radius: 1px; transition: background 0.2s, height 0.3s cubic-bezier(0.34, 1.56, 0.64, 1); } .sig-bars-group .sig-bar:nth-child(1) { height: 10px; } .sig-bars-group .sig-bar:nth-child(2) { height: 18px; } .sig-bars-group .sig-bar:nth-child(3) { height: 26px; } .sig-bars-group .sig-bar:nth-child(4) { height: 34px; } .sig-active { background: #1a1612; } .sig-inactive { background: #dddbd6; } .sig-info { display: flex; flex-direction: column; justify-content: flex-end; gap: 2px; } .sig-strength { font-family: Georgia, "Fraunces", serif; font-size: 20px; font-weight: 500; line-height: 1; letter-spacing: -0.01em; color: #1a1612; } .sig-label { font-family: system-ui, "Bricolage Grotesque", sans-serif; font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; color: #4a4239; } .sig-mini-set { display: flex; flex-direction: column; gap: 12px; padding: 0 4px; } .sig-row-mini { display: flex; align-items: center; gap: 12px; } .sig-bars-mini { display: flex; align-items: flex-end; gap: 2px; } .sig-bars-mini .sig-bar { width: 5px; } .sig-bars-mini .sig-bar:nth-child(1) { height: 6px; } .sig-bars-mini .sig-bar:nth-child(2) { height: 10px; } .sig-bars-mini .sig-bar:nth-child(3) { height: 14px; } .sig-bars-mini .sig-bar:nth-child(4) { height: 18px; } .sig-name-mini { font-family: system-ui, "Bricolage Grotesque", sans-serif; font-size: 11px; letter-spacing: 0.1em; color: #4a4239; text-transform: uppercase; } @media (prefers-reduced-motion: reduce) { .sig-bar { transition: none; } } ``` ### 20. Reading Time Indicator **Type:** Pure CSS **Description:** Three states — not started, in progress, done. A 2px bar at the bottom fills to 100% on hover so the user can see what completion looks like. Clean type, no decoration. **HTML:** ```html
2 min
reading time
Not started
7 min
reading time
In progress
14 min
reading time
Finished
↑ hover any badge to complete it
``` **CSS:** ```css .read-stage { background: #fafaf7; padding: 60px 48px; display: flex; justify-content: center; align-items: center; min-height: 100vh; } .read-stack { display: flex; flex-direction: column; gap: 20px; align-items: flex-start; } .read-badge { display: inline-flex; align-items: center; gap: 10px; padding: 10px 16px 10px 12px; border: 1.5px solid #1a1612; font-family: system-ui, "Bricolage Grotesque", sans-serif; position: relative; overflow: hidden; cursor: default; } .read-badge::after { content: ''; position: absolute; bottom: 0; left: 0; height: 2px; background: #1a1612; width: var(--read-progress, 0%); transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1); } .read-badge:hover::after { width: 100% !important; } @media (prefers-reduced-motion: reduce) { .read-badge::after { transition: none; } } .read-icon { font-size: 16px; line-height: 1; flex-shrink: 0; } .read-main { display: flex; flex-direction: column; gap: 2px; } .read-duration { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; color: #1a1612; line-height: 1; } .read-label { font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; color: #4a4239; line-height: 1; } .read-divider { width: 1px; height: 28px; background: #cfc6b1; flex-shrink: 0; } .read-status { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; white-space: nowrap; line-height: 1.2; } .read-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: currentColor; vertical-align: middle; margin-right: 4px; margin-bottom: 1px; } .read-status-done { color: #1d8f4a; } .read-status-progress { color: #b8442d; } .read-status-unread { color: #aaa; } .read-hint { font-family: system-ui, "Bricolage Grotesque", sans-serif; font-size: 9px; letter-spacing: 0.3em; text-transform: uppercase; color: #bbb; text-align: center; margin-top: 8px; } ``` ### 21. Aurora Status **Type:** Pure CSS **Description:** Status pill that breathes. Four pools of color drift behind a frosted lens; their hues rotate continuously through the spectrum. For loading, streaming, thinking — when text alone is not enough. **HTML:** ```html
Synthesizing
Drafting response · 73%
animation runs continuously — no hover required
``` **CSS:** ```css .aur-stage { background: radial-gradient(ellipse at center, #0a1438 0%, #04081e 80%); padding: 80px 40px; min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 28px; position: relative; } .aur-stars { position: absolute; inset: 0; background-image: radial-gradient(1px 1px at 20% 30%, white, transparent), radial-gradient(1px 1px at 60% 70%, white, transparent), radial-gradient(1px 1px at 80% 10%, white, transparent), radial-gradient(1px 1px at 90% 60%, white, transparent), radial-gradient(1px 1px at 10% 90%, white, transparent), radial-gradient(1px 1px at 50% 20%, white, transparent), radial-gradient(1px 1px at 30% 65%, white, transparent), radial-gradient(1.5px 1.5px at 75% 40%, white, transparent), radial-gradient(1px 1px at 40% 85%, white, transparent), radial-gradient(1.5px 1.5px at 15% 50%, white, transparent), radial-gradient(1.5px 1.5px at 85% 80%, white, transparent); opacity: 0.65; pointer-events: none; } .aur-stars::after { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 25% 70%, rgba(120, 200, 255, 0.08), transparent 60%), radial-gradient(circle at 75% 30%, rgba(180, 120, 255, 0.08), transparent 60%); } .aur-badge { display: inline-flex; align-items: center; gap: 16px; padding: 18px 32px; border-radius: 999px; background: rgba(8, 12, 32, 0.55); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border: 1px solid rgba(255, 255, 255, 0.16); position: relative; overflow: hidden; isolation: isolate; box-shadow: 0 20px 60px -10px rgba(0,0,0,0.65), inset 0 1px 0 rgba(255,255,255,0.12); z-index: 1; } .aur-bg { position: absolute; inset: -60%; z-index: -1; background: radial-gradient(circle at 20% 50%, #00ffaa 0%, transparent 38%), radial-gradient(circle at 70% 30%, #b04dff 0%, transparent 50%), radial-gradient(circle at 50% 80%, #00aaff 0%, transparent 45%), radial-gradient(circle at 90% 70%, #ff44aa 0%, transparent 40%); filter: blur(38px); animation: aur-drift 11s ease-in-out infinite, aur-hue 16s linear infinite; } @keyframes aur-drift { 0%, 100% { transform: translate(0, 0) scale(1) rotate(0deg); } 25% { transform: translate(7%, -5%) scale(1.08) rotate(18deg); } 50% { transform: translate(-4%, 8%) scale(0.96) rotate(-12deg); } 75% { transform: translate(5%, 5%) scale(1.04) rotate(8deg); } } @keyframes aur-hue { to { filter: blur(38px) hue-rotate(360deg); } } @keyframes aur-spin { to { transform: rotate(360deg); } } @media (prefers-reduced-motion: reduce) { .aur-bg, .aur-spinner { animation: none; } } .aur-spinner { width: 28px; height: 28px; animation: aur-spin 1.6s linear infinite; position: relative; z-index: 1; } .aur-spinner svg { width: 100%; height: 100%; display: block; } .aur-text { text-align: left; position: relative; z-index: 1; } .aur-label { font-family: "Italiana", Georgia, serif; font-size: 22px; letter-spacing: 0.04em; color: #fff; line-height: 1; margin-bottom: 3px; } .aur-detail { font-family: system-ui, "Bricolage Grotesque", sans-serif; font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; color: rgba(255,255,255,0.72); } .aur-caption { font-family: system-ui, "Bricolage Grotesque", sans-serif; font-size: 10px; letter-spacing: 0.22em; text-transform: uppercase; color: rgba(255,255,255,0.32); position: relative; z-index: 1; } ``` ### 22. Vaporwave Chrome **Type:** Pure CSS **Description:** Release channel as marquee. Chrome lettering over a synthwave horizon, ticker tape reminding you exactly what kind of trouble you are in. The sun is striped. The grid recedes. The warning never stops scrolling. **HTML:** ```html
▼ RELEASE CHANNEL ▼
BETA
v 4.18.2 // BUILD 26·05·13
UNSTABLE· FOR INTERNAL USE· EXPECT TURBULENCE· NOT FOR PRODUCTION· UNSTABLE· FOR INTERNAL USE· EXPECT TURBULENCE· NOT FOR PRODUCTION·
``` **CSS:** ```css .vapor-stage { background: linear-gradient(180deg, #0c0628 0%, #2a0e58 45%, #c83a8c 100%); padding: 0; min-height: 100vh; position: relative; display: flex; align-items: center; justify-content: center; overflow: hidden; } .vapor-sun { position: absolute; width: 340px; height: 340px; bottom: 30%; left: 50%; transform: translateX(-50%); background: radial-gradient(circle, #ffeb3b 0%, #ff6ec7 45%, transparent 75%); border-radius: 50%; filter: blur(1px); z-index: 0; } .vapor-sun::before { content: ''; position: absolute; inset: 0; border-radius: 50%; background: repeating-linear-gradient(0deg, transparent 0px, transparent 16px, #0c0628 16px, #0c0628 20px); -webkit-mask: linear-gradient(180deg, transparent 0%, transparent 52%, #000 62%); mask: linear-gradient(180deg, transparent 0%, transparent 52%, #000 62%); } .vapor-grid { position: absolute; bottom: 0; left: -50%; right: -50%; height: 55%; background: linear-gradient(180deg, transparent 0%, #0c0628 90%), repeating-linear-gradient(90deg, #ff37b3 0px, #ff37b3 1px, transparent 1px, transparent 60px), repeating-linear-gradient(0deg, #ff37b3 0px, #ff37b3 1px, transparent 1px, transparent 30px); transform: perspective(420px) rotateX(58deg); transform-origin: bottom; z-index: 0; } .vapor-card { position: relative; z-index: 1; background: rgba(20, 8, 50, 0.55); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border: 1px solid rgba(255, 100, 200, 0.5); padding: 38px 44px 0; text-align: center; width: min(380px, calc(100% - 80px)); margin: 60px auto; } .vapor-corner { position: absolute; width: 16px; height: 16px; } .vapor-tl { top: -1px; left: -1px; border-top: 2px solid #4dffff; border-left: 2px solid #4dffff; } .vapor-tr { top: -1px; right: -1px; border-top: 2px solid #ff37b3; border-right: 2px solid #ff37b3; } .vapor-bl { bottom: -1px; left: -1px; border-bottom: 2px solid #ff37b3; border-left: 2px solid #ff37b3; } .vapor-br { bottom: -1px; right: -1px; border-bottom: 2px solid #4dffff; border-right: 2px solid #4dffff; } .vapor-eyebrow { font-family: "Press Start 2P", ui-monospace, monospace; font-size: 8px; color: #ff77ee; letter-spacing: 0.18em; margin-bottom: 16px; } .vapor-chrome { font-family: "Major Mono Display", ui-monospace, monospace; font-size: 96px; line-height: 0.9; letter-spacing: 0.04em; background: linear-gradient(180deg, #ffffff 0%, #ffffff 18%, #ff8ce6 36%, #6cd1ff 50%, #ffffff 60%, #ff8ce6 78%, #4488cc 100%); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 0 22px rgba(255, 100, 200, 0.7)) drop-shadow(0 3px 4px rgba(0,0,0,0.5)); } .vapor-divider { width: 70%; margin: 12px auto 14px; height: 1px; background: linear-gradient(90deg, transparent, #ff77ee 30%, #4dffff 70%, transparent); } .vapor-version { font-family: "Major Mono Display", ui-monospace, monospace; font-size: 11px; letter-spacing: 0.18em; color: #6cd1ff; margin-bottom: 18px; } .vapor-marquee { overflow: hidden; border-top: 1px solid rgba(255,100,200,0.3); border-bottom: 1px solid rgba(255,100,200,0.3); padding: 8px 0; margin: 0 -44px; } .vapor-marquee-track { display: flex; gap: 14px; animation: vapor-scroll 14s linear infinite; white-space: nowrap; font-family: "Press Start 2P", ui-monospace, monospace; font-size: 7px; color: #ff8ce6; letter-spacing: 0.12em; width: max-content; } .vapor-marquee-track span { display: inline-block; } @keyframes vapor-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } } @media (prefers-reduced-motion: reduce) { .vapor-marquee-track { animation: none; } } ``` ### 23. Risograph Edition Label **Type:** Pure CSS **Description:** Two-color riso print laid down by drum and squeegee. Pink and cyan with the deliberate misregistration that gives the process its hand. Hover widens the offset. **HTML:** ```html
— SPECIAL EDITION — — SPECIAL EDITION —
LIMITED LIMITED
RUN '26 RUN '26
042 / 250
Two-color riso on Lessebo natural · 297 × 420 mm · signed by the artist
PROOF
STUDIO PRESS NORTH CAROLINA
``` **CSS:** ```css .riso-stage { background: #d6cdb4; padding: 50px 40px; display: flex; justify-content: center; align-items: center; min-height: 100vh; position: relative; } .riso-card { background: #efe8d2; width: 100%; max-width: 340px; aspect-ratio: 3 / 4.1; padding: 30px 28px 24px; position: relative; overflow: hidden; cursor: pointer; box-shadow: 0 18px 36px -14px rgba(40,30,10,0.4); font-family: "Space Mono", ui-monospace, monospace; } .riso-corner { position: absolute; width: 10px; height: 10px; mix-blend-mode: multiply; z-index: 2; } .riso-cy { background: #00b4d8; } .riso-mg { background: #ff4d8d; transform: translate(2px, 2px); } .riso-tl { top: 10px; left: 10px; } .riso-tr { top: 10px; right: 10px; } .riso-bl { bottom: 10px; left: 10px; } .riso-br { bottom: 10px; right: 10px; } .riso-blob { position: absolute; width: 260px; height: 260px; border-radius: 50%; background: #ff4d8d; mix-blend-mode: multiply; top: 45%; left: 50%; transform: translate(-50%, -50%); opacity: 0.7; z-index: 1; transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1); } .riso-blob.riso-cyan { background: #00b4d8; width: 200px; height: 200px; top: 60%; left: 38%; opacity: 0.55; } .riso-card:hover .riso-blob { transform: translate(-46%, -52%); } .riso-card:hover .riso-blob.riso-cyan { transform: translate(-44%, -48%); } .riso-content { position: relative; z-index: 2; height: 100%; display: flex; flex-direction: column; } .riso-eyebrow { font-size: 10px; letter-spacing: 0.32em; text-align: center; margin-bottom: 10px; position: relative; line-height: 1; height: 12px; } .riso-eyebrow .riso-pink, .riso-eyebrow .riso-cyan-text { position: absolute; top: 0; left: 0; right: 0; mix-blend-mode: multiply; } .riso-eyebrow .riso-pink { color: #ff4d8d; } .riso-eyebrow .riso-cyan-text { color: #00b4d8; transform: translate(2px, -1px); transition: transform 0.4s; } .riso-card:hover .riso-eyebrow .riso-cyan-text { transform: translate(5px, -2px); } .riso-title { font-family: "Archivo Black", system-ui, sans-serif; font-size: 46px; line-height: 0.92; letter-spacing: -0.025em; text-align: center; position: relative; margin-bottom: 4px; height: 42px; } .riso-title .riso-pink, .riso-title .riso-cyan-text { position: absolute; top: 0; left: 0; right: 0; mix-blend-mode: multiply; } .riso-title .riso-pink { color: #ff4d8d; } .riso-title .riso-cyan-text { color: #00b4d8; transform: translate(3px, -1px); transition: transform 0.4s; } .riso-card:hover .riso-title .riso-cyan-text { transform: translate(7px, -3px); } @media (prefers-reduced-motion: reduce) { .riso-blob, .riso-eyebrow .riso-cyan-text, .riso-title .riso-cyan-text { transition: none; } } .riso-divider { width: 100%; border-top: 1.5px dashed #ff4d8d; margin: 28px 0 16px; mix-blend-mode: multiply; position: relative; z-index: 2; } .riso-number { font-size: 22px; font-weight: 700; text-align: center; color: #1a1a1a; margin-bottom: 10px; z-index: 2; position: relative; } .riso-detail { font-size: 9px; line-height: 1.55; letter-spacing: 0.04em; text-align: center; color: #444; max-width: 220px; margin: 0 auto; z-index: 2; position: relative; } .riso-stamp { position: absolute; bottom: 50px; right: 18px; font-family: "Archivo Black", system-ui, sans-serif; font-size: 18px; letter-spacing: 0.06em; transform: rotate(-10deg); z-index: 3; line-height: 1; border: 2px solid #ff4d8d; padding: 6px 10px; color: #ff4d8d; mix-blend-mode: multiply; } .riso-meta-bottom { margin-top: auto; padding-top: 18px; border-top: 1px solid rgba(0,0,0,0.15); display: flex; justify-content: space-between; font-size: 8px; letter-spacing: 0.18em; text-transform: uppercase; color: #555; position: relative; z-index: 2; } ``` ### 24. Wax Seal Authentication **Type:** CSS + JS **Description:** Embossed oxblood wax disc over a written page, anchored by a gold-leaf monogram. Click the seal to press — the disc compresses, holds, releases. Drips peek out from the base. **HTML:** ```html
CERTIFIED
— Certificate of Authenticity —
By my hand and seal, on this day —
A. Whitmore
Document N° A-2026-0481
``` **CSS:** ```css .wax-stage { background: linear-gradient(180deg, #ece2c8 0%, #ddd0b0 100%); padding: 48px 36px; display: flex; align-items: center; justify-content: center; min-height: 100vh; } .wax-paper { background: #f6ecd2; width: 100%; max-width: 360px; padding: 44px 36px 36px; box-shadow: 0 28px 50px -18px rgba(80,60,30,0.35), 0 10px 18px -4px rgba(80,60,30,0.18), inset 0 0 0 1px rgba(120,90,50,0.12); position: relative; text-align: center; transform: rotate(-1.2deg); } .wax-watermark { position: absolute; top: 38%; left: 50%; transform: translate(-50%, -50%) rotate(-12deg); font-family: "Cinzel", Georgia, serif; font-size: 52px; font-weight: 700; color: rgba(120, 80, 40, 0.06); letter-spacing: 0.25em; pointer-events: none; } .wax-eyebrow { font-family: "Cinzel", Georgia, serif; font-size: 9px; letter-spacing: 0.4em; color: #8a6630; margin-bottom: 6px; position: relative; } .wax-line-top { font-family: "Cormorant Garamond", Georgia, serif; font-style: italic; font-size: 13px; color: #5a4222; letter-spacing: 0.04em; margin-bottom: 2px; position: relative; } .wax-signature { font-family: "Tangerine", "Cormorant Garamond", cursive; font-size: 44px; color: #3a2814; line-height: 1; margin: 2px 0 22px; position: relative; } .wax-seal { width: 178px; height: 178px; margin: 0 auto 22px; position: relative; cursor: pointer; } .wax-disc { width: 100%; height: 100%; position: relative; border-radius: 50% 47% 53% 49% / 49% 52% 48% 51%; background: radial-gradient(circle at 32% 28%, #a83040 0%, #802028 22%, #4e121a 60%, #2a0a10 100%); box-shadow: inset 6px 8px 14px rgba(0,0,0,0.45), inset -3px -5px 10px rgba(255,180,180,0.12), inset 2px 2px 4px rgba(255,200,200,0.25), 8px 12px 22px rgba(40,8,12,0.45), 3px 5px 10px rgba(94,26,31,0.4); display: flex; align-items: center; justify-content: center; transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1); } .wax-seal.is-pressed .wax-disc { animation: wax-press 0.55s ease-out; } @keyframes wax-press { 0% { transform: scale(1); } 25% { transform: scale(0.94); } 60% { transform: scale(1.015); } 100% { transform: scale(1); } } @media (prefers-reduced-motion: reduce) { .wax-seal.is-pressed .wax-disc { animation: none; } } .wax-disc::before { content: ''; position: absolute; inset: 7px; border-radius: inherit; border: 1px solid rgba(255,180,180,0.12); pointer-events: none; } .wax-monogram { width: 64%; height: 64%; position: relative; z-index: 2; filter: drop-shadow(0 -1px 0.5px rgba(255,180,180,0.5)) drop-shadow(0 1.5px 1px rgba(0,0,0,0.65)); } .wax-monogram svg { width: 100%; height: 100%; display: block; } .wax-highlight { position: absolute; top: 14%; left: 20%; width: 36%; height: 24%; border-radius: 50%; background: radial-gradient(ellipse, rgba(255,200,200,0.5), transparent 70%); filter: blur(8px); pointer-events: none; z-index: 3; } .wax-drip { position: absolute; background: radial-gradient(circle at 30% 30%, #802028 0%, #4e121a 60%, #2a0a10 100%); box-shadow: inset 2px 3px 5px rgba(0,0,0,0.4), 2px 4px 7px rgba(40,8,12,0.5); z-index: 1; } .wax-drip-1 { width: 20px; height: 26px; bottom: -6px; right: 26px; border-radius: 42% 58% 50% 50% / 60% 60% 40% 40%; } .wax-drip-2 { width: 12px; height: 14px; bottom: -10px; right: 14px; border-radius: 50%; } .wax-line-bottom { font-family: "Cinzel", Georgia, serif; font-size: 9px; letter-spacing: 0.32em; color: #6a4a22; text-transform: uppercase; position: relative; margin-top: 8px; } ``` **JS:** ```js // Click the wax seal to play the press animation. Toggling the class // via re-flow ensures the keyframe restarts on every click instead of // only firing once. var seal = document.getElementById('wax-seal-1'); if (seal) { seal.addEventListener('click', function () { seal.classList.remove('is-pressed'); void seal.offsetWidth; seal.classList.add('is-pressed'); }); } ``` ### 25. Conference Lanyard **Type:** CSS + JS **Description:** Physical badge with ambient sway, hanging from its own clip. Click flips it — front holds the role band and name, back holds the QR. Each card swings at a slightly different frequency. **HTML:** ```html
Speaker
Amara Okonkwo
Principal · Form & Function
Amara Okonkwo
Tap to view profile
Click to flip
``` **CSS:** ```css .conf-card { background: linear-gradient(170deg, #2a2724 0%, #1a1815 100%); padding: 100px 32px 60px; perspective: 1200px; text-align: center; position: relative; min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; } .conf-lanyard { position: absolute; top: 20px; left: 50%; transform: translateX(-50%); width: 24px; height: 80px; z-index: 2; pointer-events: none; } .conf-lanyard svg { width: 100%; height: 100%; display: block; } .conf-clip { position: absolute; top: 94px; left: 50%; transform: translateX(-50%); width: 32px; height: 16px; background: linear-gradient(180deg, #d4d4d4 0%, #888 50%, #666 100%); border-radius: 2px; z-index: 3; box-shadow: 0 2px 4px rgba(0,0,0,0.4); } .conf-clip::before { content: ''; position: absolute; top: 4px; left: 50%; transform: translateX(-50%); width: 14px; height: 6px; border: 1.5px solid #333; border-radius: 50%; } .conf-badge { position: relative; width: 220px; margin: 110px auto 18px; aspect-ratio: 3 / 4.4; background: #f5f1e8; border-radius: 6px; transform-style: preserve-3d; transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1); transform-origin: top center; box-shadow: 0 20px 30px -10px rgba(0,0,0,0.5), 0 4px 8px rgba(0,0,0,0.3); cursor: pointer; animation: conf-sway 6s ease-in-out infinite; } @keyframes conf-sway { 0%, 100% { transform: rotateZ(-1deg) rotateY(0deg); } 50% { transform: rotateZ(1deg) rotateY(0deg); } } @media (prefers-reduced-motion: reduce) { .conf-badge { animation: none; } } .conf-card.is-flipped .conf-badge { transform: rotateY(180deg); animation: none; } .conf-face { position: absolute; inset: 0; backface-visibility: hidden; border-radius: 6px; overflow: hidden; padding: 22px 18px; display: flex; flex-direction: column; } .conf-front { background: linear-gradient(180deg, #f8f5ed 0%, #ede8da 100%); } .conf-back { background: var(--conf-role-color, #1a1815); color: #f5f1e8; transform: rotateY(180deg); align-items: center; justify-content: center; } .conf-role-band { display: inline-block; padding: 4px 10px; font-family: system-ui, sans-serif; font-size: 9px; font-weight: 700; letter-spacing: 0.25em; text-transform: uppercase; background: var(--conf-role-color, #1a1815); color: #f5f1e8; align-self: flex-start; } .conf-name-block { margin-top: auto; } .conf-name { font-family: Georgia, "Fraunces", serif; font-size: 26px; line-height: 1; font-weight: 400; color: #1a1815; margin-bottom: 4px; letter-spacing: -0.02em; } .conf-name em { font-style: italic; font-weight: 300; } .conf-title-line { font-family: system-ui, sans-serif; font-size: 10px; letter-spacing: 0.12em; color: #4a4239; text-transform: uppercase; margin-bottom: 12px; } .conf-footer-front { border-top: 1px dashed #999; padding-top: 10px; display: flex; justify-content: space-between; font-family: system-ui, sans-serif; font-size: 8px; letter-spacing: 0.2em; text-transform: uppercase; color: #4a4239; } .conf-qr { width: 80px; height: 80px; background-image: linear-gradient(0deg, var(--conf-role-color) 50%, transparent 50%), linear-gradient(90deg, var(--conf-role-color) 50%, transparent 50%); background-size: 8px 8px; background-color: #f5f1e8; border: 8px solid #f5f1e8; margin-bottom: 16px; box-shadow: 0 0 0 1px var(--conf-role-color); } .conf-back-name { font-family: Georgia, "Fraunces", serif; font-style: italic; font-size: 18px; margin-bottom: 4px; } .conf-back-hint { font-family: system-ui, sans-serif; font-size: 8px; letter-spacing: 0.3em; text-transform: uppercase; opacity: 0.6; } .conf-caption { margin-top: 8px; font-family: system-ui, sans-serif; color: rgba(255,255,255,0.4); font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; } ``` **JS:** ```js // Click the badge to flip front ↔ back. Stops the ambient sway while // flipped so the back-side QR doesn't wobble away from the user's eye. document.querySelectorAll('.conf-card').forEach(function (card) { var badge = card.querySelector('.conf-badge'); if (!badge) return; badge.addEventListener('click', function () { card.classList.toggle('is-flipped'); }); }); ``` ### 26. Botanical Membership Tier **Type:** Pure CSS **Description:** Membership tier grown as SVG flora — petals, leaves, and a budding center on warm paper. Hover sways the leaves outward and blooms the center. Italiana + Cormorant Garamond carry the names. **HTML:** ```html
Tier III
Bloom
All collections, advance previews, and private viewings.
``` **CSS:** ```css .bot-card { text-align: center; padding: 36px 24px 30px; background: linear-gradient(180deg, #f0ede1 0%, #e6e2d1 100%); border: 1px solid rgba(66,82,54,0.2); border-radius: 4px; position: relative; cursor: pointer; transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.5s; min-height: 100vh; max-width: 240px; margin: 24px auto; display: flex; flex-direction: column; align-items: center; justify-content: center; } .bot-card:hover { transform: translateY(-6px); box-shadow: 0 24px 40px -16px rgba(66, 82, 54, 0.25); } .bot-art { width: 130px; height: 130px; margin: 0 auto 20px; } .bot-art svg { width: 100%; height: 100%; overflow: visible; } .bot-art .bot-leaf, .bot-art .bot-petal, .bot-art .bot-stem { transition: transform 1.2s cubic-bezier(0.34, 1.56, 0.64, 1); transform-origin: 50% 100%; } .bot-card:hover .bot-art .bot-leaf-1 { transform: rotate(-6deg) translateY(-2px); } .bot-card:hover .bot-art .bot-leaf-2 { transform: rotate(6deg) translateY(-2px); } .bot-card:hover .bot-art .bot-petal { transform-origin: 65px 55px; transform: scale(1.1); } @media (prefers-reduced-motion: reduce) { .bot-art .bot-leaf, .bot-art .bot-petal { transition: none; } } .bot-tier-tag { font-family: "Italiana", Georgia, serif; color: #6b7a52; font-size: 10px; letter-spacing: 0.4em; text-transform: uppercase; margin-bottom: 4px; } .bot-tier-name { font-family: "Cormorant Garamond", Georgia, serif; color: #2d3a22; font-size: 26px; font-style: italic; font-weight: 400; line-height: 1; margin-bottom: 12px; } .bot-tier-desc { font-family: "Cormorant Garamond", Georgia, serif; color: #6b7a52; font-size: 13px; line-height: 1.5; padding-top: 12px; border-top: 1px solid rgba(66,82,54,0.2); } ``` ### 27. Cyberpunk Glitch Notification **Type:** CSS + JS **Description:** Notification counter with perpetual chromatic aberration. Hover triggers a full RGB-split glitch storm; click scrambles the digits hex-style before settling. Scanline drifts top-to-bottom continuously. **HTML:** ```html
NET://INCOMING [ACTIVE] UPLINK
[alerts.crit]
03
systemPRIORITY
[unread.msg]
247
direct+12 NEW
``` **CSS:** ```css .cyber-wrap { background: #0a0e0a; padding: 36px 32px; position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 24px; min-height: 100vh; align-items: center; justify-content: center; } .cyber-wrap::before { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(0deg, transparent 0px, transparent 3px, rgba(0,255,140,0.025) 3px, rgba(0,255,140,0.025) 4px); pointer-events: none; } .cyber-wrap::after { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 30% 20%, rgba(255,0,140,0.1), transparent 50%), radial-gradient(circle at 70% 80%, rgba(0,255,200,0.1), transparent 50%); pointer-events: none; } .cyber-header { font-family: "VT323", ui-monospace, monospace; color: #00ff8c; font-size: 18px; display: flex; justify-content: space-between; letter-spacing: 0.05em; position: relative; z-index: 1; } .cyber-blink { animation: cyber-blink 1s steps(2) infinite; } @keyframes cyber-blink { 50% { opacity: 0; } } .cyber-card { background: rgba(10, 20, 14, 0.6); border: 1px solid #00ff8c; padding: 24px 22px; position: relative; transition: all 0.3s; cursor: pointer; z-index: 1; } .cyber-card::before { content: ''; position: absolute; top: -1px; left: -1px; width: 12px; height: 12px; border-top: 2px solid #ff0099; border-left: 2px solid #ff0099; } .cyber-card::after { content: ''; position: absolute; bottom: -1px; right: -1px; width: 12px; height: 12px; border-bottom: 2px solid #ff0099; border-right: 2px solid #ff0099; } .cyber-label { font-family: "Major Mono Display", ui-monospace, monospace; color: #00ff8c; font-size: 10px; letter-spacing: 0.25em; margin-bottom: 8px; text-transform: lowercase; } .cyber-count { font-family: "VT323", ui-monospace, monospace; color: #fff; font-size: 64px; line-height: 1; text-shadow: 2px 0 #ff0099, -2px 0 #00d4ff, 0 0 20px rgba(255,255,255,0.3); margin-bottom: 14px; transition: text-shadow 0.2s; } .cyber-card:hover .cyber-count { animation: cyber-glitch 0.4s infinite; } @keyframes cyber-glitch { 0% { text-shadow: 3px 0 #ff0099, -3px 0 #00d4ff, 0 0 20px rgba(255,255,255,0.5); transform: translateX(0); } 25% { text-shadow: -3px 0 #ff0099, 3px 0 #00d4ff; transform: translateX(-1px); } 50% { text-shadow: 3px 0 #ff0099, -3px 0 #00d4ff; transform: translateX(1px); } 75% { text-shadow: 0 3px #ff0099, 0 -3px #00d4ff; transform: translateX(0); } 100% { text-shadow: 3px 0 #ff0099, -3px 0 #00d4ff; } } .cyber-meta { font-family: "VT323", ui-monospace, monospace; color: rgba(0,255,140,0.6); font-size: 14px; letter-spacing: 0.05em; border-top: 1px dashed rgba(0,255,140,0.3); padding-top: 10px; display: flex; justify-content: space-between; } .cyber-tag { color: #ff0099; } .cyber-urgent { border-color: #ff0099; animation: cyber-urgent 2s ease-in-out infinite; } .cyber-urgent::before, .cyber-urgent::after { border-color: #00ff8c; } @keyframes cyber-urgent { 0%, 100% { box-shadow: 0 0 0 rgba(255,0,153,0.4); } 50% { box-shadow: 0 0 20px rgba(255,0,153,0.4); } } .cyber-scanline { position: absolute; left: 0; right: 0; top: 0; height: 2px; background: linear-gradient(90deg, transparent, #00ff8c, transparent); opacity: 0.6; animation: cyber-scan 3s linear infinite; } @keyframes cyber-scan { 0% { top: 0; } 100% { top: 100%; } } @media (prefers-reduced-motion: reduce) { .cyber-blink, .cyber-scanline, .cyber-urgent { animation: none; } .cyber-card:hover .cyber-count { animation: none; } } ``` **JS:** ```js // Click any counter card to scramble the digits hex-style before // settling back to the real value. Mirrors the glitch aesthetic // applied via CSS on hover. document.querySelectorAll('.cyber-card').forEach(function (card) { card.addEventListener('click', function () { var countEl = card.querySelector('.cyber-count'); var original = countEl.textContent; var chars = '0123456789ABCDEF'; var i = 0; var scramble = setInterval(function () { countEl.textContent = Array.from(original).map(function (c) { return /[\dA-Za-z]/.test(c) ? chars[Math.floor(Math.random() * chars.length)] : c; }).join(''); if (++i > 8) { clearInterval(scramble); countEl.textContent = original; } }, 50); }); }); ``` ### 28. Art Deco Medallion **Type:** Pure CSS **Description:** Conic-gradient brass ring rotating against a slow ray pattern. Crest in Cinzel display type. Sweep of shine on hover, gentle lift on the whole medallion. **HTML:** ```html
First Star
Centurion
For one hundred contributions of merit
``` **CSS:** ```css .deco-wrap { background: radial-gradient(ellipse at center, #2a1d12 0%, #14100a 100%); padding: 60px 40px; text-align: center; min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; } .deco-medallion { width: 200px; height: 200px; margin: 0 auto 28px; position: relative; cursor: pointer; transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1); } .deco-medallion:hover { transform: translateY(-8px) scale(1.04); } .deco-ring-outer { position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(from 0deg, #d4af5a 0deg, #f5d782 8deg, #d4af5a 16deg, #8b6f2a 24deg, #d4af5a 32deg, #f5d782 40deg, #d4af5a 48deg, #8b6f2a 56deg, #d4af5a 64deg, #f5d782 72deg, #d4af5a 80deg, #8b6f2a 88deg, #d4af5a 96deg, #f5d782 104deg, #d4af5a 112deg, #8b6f2a 120deg, #d4af5a 128deg, #f5d782 136deg, #d4af5a 144deg, #8b6f2a 152deg, #d4af5a 160deg, #f5d782 168deg, #d4af5a 176deg, #8b6f2a 184deg, #d4af5a 192deg, #f5d782 200deg, #d4af5a 208deg, #8b6f2a 216deg, #d4af5a 224deg, #f5d782 232deg, #d4af5a 240deg, #8b6f2a 248deg, #d4af5a 256deg, #f5d782 264deg, #d4af5a 272deg, #8b6f2a 280deg, #d4af5a 288deg, #f5d782 296deg, #d4af5a 304deg, #8b6f2a 312deg, #d4af5a 320deg, #f5d782 328deg, #d4af5a 336deg, #8b6f2a 344deg, #d4af5a 360deg); animation: deco-rotate 24s linear infinite; box-shadow: 0 0 30px rgba(212,175,90,0.3), inset 0 0 20px rgba(0,0,0,0.4); } @keyframes deco-rotate { to { transform: rotate(360deg); } } @media (prefers-reduced-motion: reduce) { .deco-ring-outer, .deco-rays { animation: none; } } .deco-ring-inner { position: absolute; inset: 14px; border-radius: 50%; background: radial-gradient(circle at 30% 30%, #3a2614 0%, #1c1408 100%); border: 2px solid #8b6f2a; box-shadow: inset 0 4px 12px rgba(0,0,0,0.6), inset 0 -2px 6px rgba(212,175,90,0.2); display: flex; align-items: center; justify-content: center; } .deco-rays { position: absolute; inset: 14px; border-radius: 50%; background: conic-gradient(from 0deg, transparent 0deg, rgba(212,175,90,0.15) 5deg, transparent 10deg, transparent 30deg, rgba(212,175,90,0.15) 35deg, transparent 40deg, transparent 60deg, rgba(212,175,90,0.15) 65deg, transparent 70deg, transparent 90deg, rgba(212,175,90,0.15) 95deg, transparent 100deg, transparent 120deg, rgba(212,175,90,0.15) 125deg, transparent 130deg, transparent 150deg, rgba(212,175,90,0.15) 155deg, transparent 160deg, transparent 180deg, rgba(212,175,90,0.15) 185deg, transparent 190deg, transparent 210deg, rgba(212,175,90,0.15) 215deg, transparent 220deg, transparent 240deg, rgba(212,175,90,0.15) 245deg, transparent 250deg, transparent 270deg, rgba(212,175,90,0.15) 275deg, transparent 280deg, transparent 300deg, rgba(212,175,90,0.15) 305deg, transparent 310deg, transparent 330deg, rgba(212,175,90,0.15) 335deg, transparent 340deg, transparent 360deg); animation: deco-rotate 60s linear infinite reverse; pointer-events: none; } .deco-crest { position: relative; z-index: 2; text-align: center; color: #d4af5a; } .deco-crest svg { width: 50px; height: 50px; filter: drop-shadow(0 1px 2px rgba(0,0,0,0.5)); } .deco-label { font-family: "Cinzel", Georgia, serif; font-size: 9px; letter-spacing: 0.32em; margin-top: 6px; text-transform: uppercase; color: #e8c878; } .deco-shine { position: absolute; top: 14px; left: 14px; width: calc(100% - 28px); height: calc(100% - 28px); border-radius: 50%; background: linear-gradient(135deg, transparent 30%, rgba(255,255,255,0.4) 50%, transparent 70%); opacity: 0; transition: opacity 0.6s, transform 0.8s; transform: translateX(-100%); pointer-events: none; } .deco-medallion:hover .deco-shine { opacity: 1; transform: translateX(100%); } .deco-name { font-family: "Cinzel", Georgia, serif; color: #d4af5a; font-size: 14px; letter-spacing: 0.32em; text-transform: uppercase; margin-bottom: 6px; } .deco-annotation { font-family: "Cormorant Garamond", Georgia, serif; color: rgba(212,175,90,0.65); font-size: 14px; font-style: italic; letter-spacing: 0.02em; } ``` ### 29. Brutalist Status Matrix **Type:** Pure CSS **Description:** Monospaced status grid — operational, degraded, outage, maintenance, deploying, queued. Inverts on hover. Live pulse on healthy systems, blink on outages, scanline on deploys. **HTML:** ```html
Operational
api.gateway.production
us-east-1 · 99.984% / 30d
↑ 47d 12h 04m · last incident: 2026-03-29
Degraded
search.indexer.eu
eu-west-2 · 96.412% / 24h
P95 latency 840ms · ETA recovery 18m
Outage
media.transcoder.bg
ap-south-1 · 00.000% / 12m
incident #4119 · on-call: m.tanaka
Deploying
auth.service.canary
v4.18.2 · 38% traffic
commit a1f9c2e · rollback ready
``` **CSS:** ```css .brut-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); border: 2px solid #000; background: #f4f4f0; font-family: ui-monospace, "JetBrains Mono", monospace; min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; } .brut-row { border-right: 2px solid #000; border-bottom: 2px solid #000; padding: 24px 20px; background: #fff; cursor: pointer; transition: background 0.2s; } .brut-row:hover { background: #000; color: #fff; } .brut-row:hover .brut-time { color: #fff; } .brut-row:hover .brut-meta { color: rgba(255,255,255,0.6); } .brut-badge { display: inline-flex; align-items: center; gap: 10px; padding: 6px 12px; font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; border: 2px solid currentColor; margin-bottom: 16px; } .brut-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; } .brut-operational { color: #1d8f4a; background: #ddf5e3; } .brut-operational .brut-dot { animation: brut-pulse 1.6s infinite; } .brut-degraded { color: #b8761c; background: #fdf2d8; } .brut-outage { color: #c0241c; background: #fde0dd; } .brut-outage .brut-dot { animation: brut-blink 0.5s infinite; } .brut-deploy { color: #1c4a9e; background: #dde6f7; position: relative; overflow: hidden; } .brut-deploy::before { content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%; background: linear-gradient(90deg, transparent, rgba(28,74,158,0.3), transparent); animation: brut-scan 1.5s linear infinite; } @keyframes brut-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } } @keyframes brut-blink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } } @keyframes brut-scan { 0% { left: -100%; } 100% { left: 100%; } } @media (prefers-reduced-motion: reduce) { .brut-operational .brut-dot, .brut-outage .brut-dot, .brut-deploy::before { animation: none; } } .brut-service { font-family: Georgia, "Fraunces", serif; font-size: 20px; font-weight: 500; margin-bottom: 4px; letter-spacing: -0.01em; } .brut-meta { font-size: 10px; letter-spacing: 0.08em; color: #888; text-transform: uppercase; transition: color 0.2s; } .brut-time { font-size: 10px; letter-spacing: 0.08em; color: #000; transition: color 0.2s; margin-top: 12px; padding-top: 12px; border-top: 1px dashed currentColor; opacity: 0.7; } ``` ### 30. Holographic Collectible **Type:** Pure CSS **Description:** Pentagonal collectible badge with a cursor-tracked conic-gradient foil and a tier glyph. The Mythic tier carries its own ambient pulse — visible across the room. **HTML:** ```html
RARITY
MYTHIC
#00007 / 00050
The Ascendant
POP 44
``` **CSS:** ```css .holo-card { background: radial-gradient(ellipse at 50% 50%, #0e0a1a 0%, #050208 100%); padding: 56px 40px; font-family: 'Geist Mono', ui-monospace, monospace; text-align: center; min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; } .holo-badge { width: 200px; height: 230px; margin: 0 auto 24px; position: relative; cursor: pointer; --mx: 50%; --my: 50%; } .holo-face { position: absolute; inset: 0; clip-path: polygon(50% 0%, 95% 25%, 95% 75%, 50% 100%, 5% 75%, 5% 25%); } .holo-base { background: linear-gradient(135deg, #1a1230 0%, #0a0815 100%); box-shadow: inset 0 0 20px rgba(255,255,255,0.05); } .holo-foil { background: conic-gradient(from var(--angle, 0deg) at var(--mx) var(--my), #ff0080, #ff8c00, #ffd700, #00ff88, #00bfff, #8a2be2, #ff0080); mix-blend-mode: screen; opacity: 0.75; transition: opacity 0.4s; filter: saturate(1.3) blur(0.4px); } .holo-sheen { background: radial-gradient(circle 80px at var(--mx) var(--my), rgba(255,255,255,0.6), transparent 70%); mix-blend-mode: overlay; opacity: 0; transition: opacity 0.4s; } .holo-edge { background: linear-gradient(135deg, rgba(255,215,140,0.6) 0%, rgba(180,140,255,0.4) 50%, rgba(120,200,255,0.6) 100%); clip-path: polygon( 50% 0%, 95% 25%, 95% 75%, 50% 100%, 5% 75%, 5% 25%, 5% 27%, 7% 26%, 7% 74%, 50% 97%, 93% 74%, 93% 26%, 50% 3% ); } .holo-badge:hover .holo-foil { opacity: 1; } .holo-badge:hover .holo-sheen { opacity: 1; } .holo-glyph { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #fff; z-index: 2; text-shadow: 0 0 12px rgba(255,255,255,0.3); pointer-events: none; } .holo-glyph svg { width: 56px; height: 56px; margin-bottom: 8px; } .holo-rarity { font-size: 10px; letter-spacing: 0.3em; opacity: 0.85; margin-bottom: 2px; } .holo-tier { font-size: 16px; letter-spacing: 0.18em; font-weight: 600; } .holo-serial { position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%); font-size: 8px; letter-spacing: 0.2em; color: rgba(255,255,255,0.6); z-index: 2; } .holo-name { font-family: Georgia, serif; color: #f5f0e0; font-size: 20px; font-style: italic; margin-bottom: 4px; } .holo-pop { font-size: 10px; letter-spacing: 0.2em; color: rgba(255,255,255,0.4); text-transform: uppercase; } .holo-mythic .holo-base { animation: holo-mythic-pulse 3s ease-in-out infinite; } @keyframes holo-mythic-pulse { 0%, 100% { box-shadow: inset 0 0 20px rgba(255,100,255,0.2), 0 0 30px rgba(255,100,255,0.2); } 50% { box-shadow: inset 0 0 40px rgba(255,100,255,0.5), 0 0 60px rgba(255,100,255,0.4); } } @media (prefers-reduced-motion: reduce) { .holo-mythic .holo-base { animation: none; } } ``` **JS:** ```js // Cursor-tracked foil. Updates two CSS custom properties on the // .holo-badge so the conic gradient and the sheen highlight follow // the pointer. mouseleave resets so the badge isn't stuck mid-tilt. document.querySelectorAll('.holo-badge').forEach(function (badge) { badge.addEventListener('mousemove', function (e) { var r = badge.getBoundingClientRect(); var x = ((e.clientX - r.left) / r.width) * 100; var y = ((e.clientY - r.top) / r.height) * 100; badge.style.setProperty('--mx', x + '%'); badge.style.setProperty('--my', y + '%'); badge.style.setProperty('--angle', (x * 3.6) + 'deg'); }); badge.addEventListener('mouseleave', function () { badge.style.setProperty('--mx', '50%'); badge.style.setProperty('--my', '50%'); }); }); ``` --- ## 14 CSS Banners & Alerts URL: https://codefronts.com/snippets/css-banners-alerts/ Description: Hand-coded CSS banner and alert patterns covering every notification surface a real product needs — dismissible alerts, sticky announcements, semantic status alerts, cookie consent, form validation, toasts, live-update banners, and promotional hero banners. Pure CSS plus scoped JS — no framework, semantic HTML, accessibility-first, copy-paste ready. Demo count: 14 ### 01. Dismissible CSS Alert with Close Button **Type:** CSS + JS **Description:** Four dismissible CSS alerts in a dark editorial magazine aesthetic — ink-on-paper texture, Playfair Display headlines, and four variant alerts (Critical / Dispatch / Verified / Memo) each with a unique colour story. Close buttons are bordered right-edge columns; dismissed alerts collapse via a smooth scaleY animation and can be restored from a footnote bar that lists what was removed. Playfair Display + DM Mono. Best for editorial magazines, content sites, admin notification trays, dashboard message centres. **HTML:** ```html
Critical · System

Authentication service is temporarily unavailable.

Our engineers have identified the issue and are working to restore access. Estimated resolution in 12–18 minutes. Existing sessions remain active.

Dispatch · Notice

Scheduled maintenance window this Friday.

The platform will undergo routine updates between 02:00–04:00 UTC. Some features may be temporarily inaccessible. No data loss is expected.

Verified · Confirmation

Your identity has been successfully verified.

Two-factor authentication is now active on your account. You can manage your security preferences from the account dashboard.

Memo · General

New privacy policy takes effect July 1st.

We've updated our terms of service to reflect recent regulatory changes. Please review the updated document before the effective date to remain compliant.

``` **CSS:** ```css /* ─── 01 Dismissible CSS Alert — editorial magazine aesthetic ──── */ @import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,700;0,900;1,700&family=DM+Mono:wght@300;400;500&display=swap'); .ba-dis { --ba-dis-ink: #0d0d0d; --ba-dis-paper: #f5f0e8; --ba-dis-cream: #ede7d5; --ba-dis-accent-red: #c0392b; --ba-dis-accent-gold: #b8860b; --ba-dis-accent-teal: #1a7a6e; --ba-dis-accent-slate: #4a5568; --ba-dis-rule: #2d2d2d; position: relative; width: 100%; min-height: 540px; background: var(--ba-dis-paper); background-image: repeating-linear-gradient(0deg, transparent, transparent 28px, rgba(0,0,0,0.04) 28px, rgba(0,0,0,0.04) 29px); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px; padding: 48px 24px; font-family: 'DM Mono', monospace; box-sizing: border-box; } .ba-dis *, .ba-dis *::before, .ba-dis *::after { box-sizing: border-box; margin: 0; padding: 0; } .ba-dis .alert { width: 100%; max-width: 680px; border-top: 3px solid var(--ba-dis-rule); border-bottom: 1px solid var(--ba-dis-rule); padding: 0; position: relative; overflow: hidden; transition: all 0.45s cubic-bezier(0.4, 0, 0.2, 1); transform-origin: top center; } .ba-dis .alert.dismissed { opacity: 0; transform: scaleY(0); max-height: 0 !important; padding: 0; border-width: 0; margin: 0; pointer-events: none; } .ba-dis .alert-inner { display: flex; align-items: stretch; gap: 0; } .ba-dis .alert-accent { width: 6px; flex-shrink: 0; } .ba-dis .alert-body { flex: 1; padding: 18px 20px; } .ba-dis .alert-tag { font-family: 'DM Mono', monospace; font-size: 9px; font-weight: 500; letter-spacing: 0.22em; text-transform: uppercase; display: block; margin-bottom: 6px; opacity: 0.6; } .ba-dis .alert-headline { font-family: 'Playfair Display', serif; font-size: 17px; font-weight: 700; line-height: 1.3; color: var(--ba-dis-ink); margin-bottom: 4px; } .ba-dis .alert-text { font-size: 12px; line-height: 1.7; color: #444; font-weight: 300; } .ba-dis .alert-close { flex-shrink: 0; width: 52px; display: flex; align-items: center; justify-content: center; cursor: pointer; border: none; background: transparent; border-left: 1px solid rgba(0,0,0,0.1); transition: background 0.2s ease; font-family: 'DM Mono', monospace; color: var(--ba-dis-ink); opacity: 0.45; padding: 0; } .ba-dis .alert-close:hover { opacity: 1; background: rgba(0,0,0,0.05); } .ba-dis .alert-close svg { width: 16px; height: 16px; } .ba-dis .alert--critical { background: var(--ba-dis-ink); border-color: var(--ba-dis-accent-red); } .ba-dis .alert--critical .alert-accent { background: var(--ba-dis-accent-red); } .ba-dis .alert--critical .alert-tag { color: var(--ba-dis-accent-red); opacity: 0.8; } .ba-dis .alert--critical .alert-headline { color: var(--ba-dis-paper); } .ba-dis .alert--critical .alert-text { color: rgba(245,240,232,0.65); } .ba-dis .alert--critical .alert-close { color: var(--ba-dis-paper); border-left-color: rgba(255,255,255,0.1); } .ba-dis .alert--dispatch { background: var(--ba-dis-cream); border-color: var(--ba-dis-accent-gold); } .ba-dis .alert--dispatch .alert-accent { background: var(--ba-dis-accent-gold); } .ba-dis .alert--dispatch .alert-tag { color: var(--ba-dis-accent-gold); } .ba-dis .alert--verified { background: #f0faf8; border-color: var(--ba-dis-accent-teal); } .ba-dis .alert--verified .alert-accent { background: var(--ba-dis-accent-teal); } .ba-dis .alert--verified .alert-tag { color: var(--ba-dis-accent-teal); } .ba-dis .alert--memo { background: var(--ba-dis-paper); border-color: var(--ba-dis-accent-slate); } .ba-dis .alert--memo .alert-accent { background: var(--ba-dis-accent-slate); } .ba-dis .alert--memo .alert-tag { color: var(--ba-dis-accent-slate); } .ba-dis .alert-divider { width: 24px; height: 1px; background: currentColor; opacity: 0.25; margin: 8px 0; } .ba-dis .restore-hint { font-size: 10px; font-family: 'DM Mono', monospace; color: #999; letter-spacing: 0.12em; text-align: center; min-height: 20px; } .ba-dis .restore-btn { background: none; border: none; cursor: pointer; color: var(--ba-dis-accent-teal); font-family: 'DM Mono', monospace; font-size: 10px; text-decoration: underline; letter-spacing: 0.12em; padding: 0; } .ba-dis .section-label { font-family: 'DM Mono', monospace; font-size: 9px; letter-spacing: 0.3em; text-transform: uppercase; color: #aaa; align-self: flex-start; } @media (prefers-reduced-motion: reduce) { .ba-dis .alert { transition: opacity 0.2s ease; } } ``` **JS:** ```js (() => { // Scoped dismiss/restore wiring. Multiple instances of this demo can // coexist on one page — each tracks its own dismissed set bound to // the wrapper element. No global ids, no document-level listeners. const root = document.querySelector('.ba-dis'); if (!root) return; const restore = root.querySelector('[data-ba-dis-restore]'); const labels = { a1: 'Critical', a2: 'Dispatch', a3: 'Verified', a4: 'Memo' }; const dismissed = {}; function paintRestore() { const keys = Object.keys(dismissed); if (keys.length === 0) { restore.innerHTML = ''; return; } restore.innerHTML = 'Dismissed: ' + keys.map(k => '' ).join(' · '); } root.addEventListener('click', (e) => { const dismissBtn = e.target.closest('[data-ba-dis-dismiss]'); if (dismissBtn) { const id = dismissBtn.dataset.baDisDismiss; const el = root.querySelector('[data-ba-dis-alert="' + id + '"]'); if (el) { el.classList.add('dismissed'); dismissed[id] = true; paintRestore(); } return; } const restoreBtn = e.target.closest('[data-ba-dis-restore-btn]'); if (restoreBtn) { const id = restoreBtn.dataset.baDisRestoreBtn; const el = root.querySelector('[data-ba-dis-alert="' + id + '"]'); if (el) { el.classList.remove('dismissed'); delete dismissed[id]; paintRestore(); } } }); })(); ``` ### 02. Sticky Top Announcement Banner CSS **Type:** CSS + JS **Description:** Three stackable sticky top announcement banners in a retro-futuristic terminal / neon aesthetic — deep space background, cyan / magenta / amber neon variants with layered glow effects, scanline texture overlay, and blinking live-indicator dots. Each banner has a glitching badge, a CTA button, and a close button that collapses the banner gracefully one by one as users dismiss them. Includes a scrollable page scaffold to demonstrate the sticky behaviour. Space Mono + Bebas Neue. Best for SaaS dashboards, product announcements, status pages, cyberpunk-themed UIs. **HTML:** ```html

Sticky Top
Announcement
Banner CSS

Scroll the surrounding page to see the banners remain pinned. Dismiss each one to watch the stack collapse gracefully.

``` **CSS:** ```css /* ─── 02 Sticky Top Announcement Banner — neon terminal ──────── */ @import url('https://fonts.googleapis.com/css2?family=Space+Mono:ital,wght@0,400;0,700;1,400&family=Bebas+Neue&display=swap'); .ba-stk { --ba-stk-bg: #060810; --ba-stk-surface: #0c1020; --ba-stk-cyan: #00f5d4; --ba-stk-magenta: #f500a0; --ba-stk-amber: #ffb800; --ba-stk-text: #e0e8ff; --ba-stk-muted: rgba(224,232,255,0.45); position: relative; width: 100%; height: 560px; background: var(--ba-stk-bg); background-image: radial-gradient(ellipse 80% 40% at 50% -10%, rgba(0,245,212,0.08) 0%, transparent 60%), linear-gradient(180deg, #060810 0%, #080d18 100%); font-family: 'Space Mono', monospace; color: var(--ba-stk-text); overflow-y: auto; overflow-x: hidden; box-sizing: border-box; } .ba-stk *, .ba-stk *::before, .ba-stk *::after { box-sizing: border-box; margin: 0; padding: 0; } .ba-stk .banner-stack { position: sticky; top: 0; z-index: 10; display: flex; flex-direction: column; } .ba-stk .banner { width: 100%; overflow: hidden; transition: max-height 0.5s cubic-bezier(0.4,0,0.2,1), opacity 0.35s ease; max-height: 80px; } .ba-stk .banner.hidden { max-height: 0; opacity: 0; pointer-events: none; } .ba-stk .banner-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 20px; height: 48px; border-bottom: 1px solid; position: relative; overflow: hidden; } .ba-stk .banner-inner::before { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(0deg, transparent, transparent 3px, rgba(255,255,255,0.015) 3px, rgba(255,255,255,0.015) 4px); pointer-events: none; } .ba-stk .banner-left { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; overflow: hidden; } .ba-stk .banner-badge { font-family: 'Bebas Neue', sans-serif; font-size: 11px; letter-spacing: 0.15em; padding: 3px 8px; border: 1px solid currentColor; flex-shrink: 0; line-height: 1.4; } .ba-stk .banner-msg { font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; } .ba-stk .banner-msg strong { font-weight: 700; margin-right: 6px; } .ba-stk .banner-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; } .ba-stk .banner-cta { font-family: 'Space Mono', monospace; font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; padding: 4px 10px; border: 1px solid currentColor; background: transparent; cursor: pointer; text-decoration: none; transition: all 0.2s ease; } .ba-stk .banner-close { background: transparent; border: none; cursor: pointer; padding: 4px; display: flex; opacity: 0.5; transition: opacity 0.2s; color: currentColor; } .ba-stk .banner-close:hover { opacity: 1; } .ba-stk .banner-close svg { width: 14px; height: 14px; } .ba-stk .blink { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: currentColor; margin-right: 8px; animation: ba-stk-blink 1.2s step-end infinite; flex-shrink: 0; } @keyframes ba-stk-blink { 0%,100%{opacity:1} 50%{opacity:0} } .ba-stk .banner--system { background: rgba(0,245,212,0.06); border-bottom-color: rgba(0,245,212,0.3); } .ba-stk .banner--system .banner-inner { border-bottom-color: rgba(0,245,212,0.3); } .ba-stk .banner--system .banner-badge, .ba-stk .banner--system .banner-msg, .ba-stk .banner--system .blink, .ba-stk .banner--system .banner-close, .ba-stk .banner--system .banner-cta { color: var(--ba-stk-cyan); } .ba-stk .banner--system .banner-cta { border-color: rgba(0,245,212,0.6); } .ba-stk .banner--system .banner-cta:hover { background: rgba(0,245,212,0.12); } .ba-stk .banner--promo { background: rgba(245,0,160,0.06); border-bottom-color: rgba(245,0,160,0.3); } .ba-stk .banner--promo .banner-inner { border-bottom-color: rgba(245,0,160,0.3); } .ba-stk .banner--promo .banner-badge, .ba-stk .banner--promo .banner-msg, .ba-stk .banner--promo .blink, .ba-stk .banner--promo .banner-close, .ba-stk .banner--promo .banner-cta { color: var(--ba-stk-magenta); } .ba-stk .banner--promo .banner-cta { border-color: rgba(245,0,160,0.6); } .ba-stk .banner--promo .banner-cta:hover { background: rgba(245,0,160,0.1); } .ba-stk .banner--warning { background: rgba(255,184,0,0.05); border-bottom-color: rgba(255,184,0,0.3); } .ba-stk .banner--warning .banner-inner { border-bottom-color: rgba(255,184,0,0.3); } .ba-stk .banner--warning .banner-badge, .ba-stk .banner--warning .banner-msg, .ba-stk .banner--warning .blink, .ba-stk .banner--warning .banner-close, .ba-stk .banner--warning .banner-cta { color: var(--ba-stk-amber); } .ba-stk .banner--warning .banner-cta { border-color: rgba(255,184,0,0.6); } .ba-stk .banner--warning .banner-cta:hover { background: rgba(255,184,0,0.1); } .ba-stk .page-nav { background: rgba(12,16,32,0.95); backdrop-filter: blur(12px); border-bottom: 1px solid rgba(255,255,255,0.06); height: 56px; display: flex; align-items: center; padding: 0 24px; gap: 24px; } .ba-stk .nav-logo { font-family: 'Bebas Neue', sans-serif; font-size: 20px; letter-spacing: 0.12em; color: var(--ba-stk-cyan); text-shadow: 0 0 12px rgba(0,245,212,0.6); } .ba-stk .nav-links { display: flex; gap: 20px; list-style: none; } .ba-stk .nav-links a { font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ba-stk-muted); text-decoration: none; transition: color 0.2s; } .ba-stk .nav-links a:hover { color: var(--ba-stk-text); } .ba-stk .page-content { padding: 64px 24px; max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 32px; } .ba-stk .page-content h2 { font-family: 'Bebas Neue', sans-serif; font-size: 52px; letter-spacing: 0.05em; line-height: 1; color: var(--ba-stk-text); } .ba-stk .page-content p { font-size: 13px; line-height: 1.9; color: var(--ba-stk-muted); max-width: 520px; } .ba-stk .card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; } .ba-stk .card { background: var(--ba-stk-surface); border: 1px solid rgba(255,255,255,0.06); padding: 20px; height: 100px; display: flex; align-items: flex-end; } .ba-stk .card span { font-size: 9px; letter-spacing: 0.2em; text-transform: uppercase; color: rgba(255,255,255,0.25); } @media (prefers-reduced-motion: reduce) { .ba-stk .blink { animation: none; } .ba-stk .banner { transition: opacity 0.2s; } } ``` **JS:** ```js (() => { const root = document.querySelector('.ba-stk'); if (!root) return; root.addEventListener('click', (e) => { const btn = e.target.closest('[data-ba-stk-close]'); if (!btn) return; const id = btn.dataset.baStkClose; const el = root.querySelector('[data-ba-stk-banner="' + id + '"]'); if (el) el.classList.add('hidden'); }); })(); ``` ### 03. Semantic Bootstrap-style Alerts CSS **Type:** Pure CSS **Description:** Five semantic Bootstrap-style CSS alerts (Success, Danger, Warning, Info, Notice) in an organic botanical / art nouveau aesthetic — warm parchment backgrounds, Cormorant Garamond serif headlines, and earthy pigment palettes (sage, ember, amber, slate, neutral). Each alert has a left flora panel with a circular outlined icon, an ornamental status divider, a body description, and two understated outlined action buttons (Primary + Ghost). Cards stagger in with a 70ms-step entrance animation. Cormorant Garamond + Instrument Sans. Best for content sites, settings pages, status confirmations, editorial admin UIs. **HTML:** ```html

— Status Indicators —

``` **CSS:** ```css /* ─── 03 Semantic Bootstrap-style Alerts — botanical ─────────── */ @import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,600;1,400;1,600&family=Instrument+Sans:wght@400;500;600&display=swap'); .ba-bts { --ba-bts-sage-bg: #f0f4ef; --ba-bts-sage-border: #7aad6d; --ba-bts-sage-text: #2d5a27; --ba-bts-sage-icon: #4e9040; --ba-bts-sage-fill: #e6f0e4; --ba-bts-ember-bg: #fdf3ef; --ba-bts-ember-border: #d4704a; --ba-bts-ember-text: #7a2a10; --ba-bts-ember-icon: #c05530; --ba-bts-ember-fill: #fce8e1; --ba-bts-amber-bg: #fdf8ec; --ba-bts-amber-border: #c8982a; --ba-bts-amber-text: #6b4a00; --ba-bts-amber-icon: #b88020; --ba-bts-amber-fill: #faf0d0; --ba-bts-slate-bg: #eff3f8; --ba-bts-slate-border: #5b88c0; --ba-bts-slate-text: #1a3a60; --ba-bts-slate-icon: #3d6fa0; --ba-bts-slate-fill: #e2eaf5; --ba-bts-neutral-bg: #f7f5f2; --ba-bts-neutral-border: #9b9288; --ba-bts-neutral-text: #3d3830; --ba-bts-neutral-icon: #7a7068; --ba-bts-neutral-fill: #eeebe7; --ba-bts-page-bg: #faf8f4; position: relative; width: 100%; min-height: 720px; background: var(--ba-bts-page-bg); background-image: radial-gradient(circle at 15% 50%, rgba(122,173,109,0.07) 0%, transparent 50%), radial-gradient(circle at 85% 20%, rgba(91,136,192,0.07) 0%, transparent 40%); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 60px 24px; gap: 14px; font-family: 'Instrument Sans', sans-serif; box-sizing: border-box; } .ba-bts *, .ba-bts *::before, .ba-bts *::after { box-sizing: border-box; margin: 0; padding: 0; } .ba-bts .alert { width: 100%; max-width: 640px; border-radius: 3px; position: relative; overflow: hidden; transition: transform 0.2s ease, box-shadow 0.2s ease; animation: ba-bts-rise 0.5s ease both; } .ba-bts .alert:nth-child(1) { animation-delay: 0.05s; } .ba-bts .alert:nth-child(2) { animation-delay: 0.12s; } .ba-bts .alert:nth-child(3) { animation-delay: 0.19s; } .ba-bts .alert:nth-child(4) { animation-delay: 0.26s; } .ba-bts .alert:nth-child(5) { animation-delay: 0.33s; } .ba-bts .alert:hover { transform: translateY(-1px); box-shadow: 0 6px 28px rgba(0,0,0,0.07); } @keyframes ba-bts-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } } .ba-bts .alert-inner { display: flex; gap: 0; position: relative; } .ba-bts .alert-flora { width: 56px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; position: relative; padding: 20px 0; } .ba-bts .alert-flora::after { content: ''; position: absolute; right: 0; top: 16px; bottom: 16px; width: 1px; background: currentColor; opacity: 0.2; } .ba-bts .alert-icon { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: rgba(255,255,255,0.6); border: 1.5px solid currentColor; flex-shrink: 0; } .ba-bts .alert-icon svg { width: 16px; height: 16px; } .ba-bts .alert-content { flex: 1; padding: 18px 20px 18px 16px; } .ba-bts .alert-status { font-size: 9px; font-weight: 600; letter-spacing: 0.25em; text-transform: uppercase; margin-bottom: 5px; opacity: 0.7; display: flex; align-items: center; gap: 8px; } .ba-bts .alert-status::after { content: ''; flex: 1; height: 1px; background: currentColor; opacity: 0.2; max-width: 40px; } .ba-bts .alert-title { font-family: 'Cormorant Garamond', serif; font-size: 20px; font-weight: 600; line-height: 1.25; margin-bottom: 5px; } .ba-bts .alert-body-text { font-size: 13px; line-height: 1.7; opacity: 0.75; max-width: 480px; } .ba-bts .alert-actions { display: flex; gap: 10px; margin-top: 12px; align-items: center; } .ba-bts .btn-primary { font-family: inherit; font-size: 11px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; padding: 6px 14px; border: 1.5px solid currentColor; background: transparent; cursor: pointer; border-radius: 2px; transition: all 0.2s; } .ba-bts .btn-ghost { font-family: inherit; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; padding: 0; border: none; background: transparent; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; opacity: 0.55; transition: opacity 0.2s; } .ba-bts .btn-ghost:hover { opacity: 1; } .ba-bts .alert--success { background: var(--ba-bts-sage-bg); border: 1.5px solid var(--ba-bts-sage-border); border-left: 4px solid var(--ba-bts-sage-border); color: var(--ba-bts-sage-text); } .ba-bts .alert--success .alert-flora { background: var(--ba-bts-sage-fill); color: var(--ba-bts-sage-icon); } .ba-bts .alert--success .alert-icon { color: var(--ba-bts-sage-icon); border-color: var(--ba-bts-sage-icon); } .ba-bts .alert--success .btn-primary { color: var(--ba-bts-sage-text); border-color: var(--ba-bts-sage-border); } .ba-bts .alert--success .btn-primary:hover { background: var(--ba-bts-sage-border); color: white; } .ba-bts .alert--success .btn-ghost { color: var(--ba-bts-sage-text); } .ba-bts .alert--danger { background: var(--ba-bts-ember-bg); border: 1.5px solid var(--ba-bts-ember-border); border-left: 4px solid var(--ba-bts-ember-border); color: var(--ba-bts-ember-text); } .ba-bts .alert--danger .alert-flora { background: var(--ba-bts-ember-fill); color: var(--ba-bts-ember-icon); } .ba-bts .alert--danger .alert-icon { color: var(--ba-bts-ember-icon); border-color: var(--ba-bts-ember-icon); } .ba-bts .alert--danger .btn-primary { color: var(--ba-bts-ember-text); border-color: var(--ba-bts-ember-border); } .ba-bts .alert--danger .btn-primary:hover { background: var(--ba-bts-ember-border); color: white; } .ba-bts .alert--danger .btn-ghost { color: var(--ba-bts-ember-text); } .ba-bts .alert--warning { background: var(--ba-bts-amber-bg); border: 1.5px solid var(--ba-bts-amber-border); border-left: 4px solid var(--ba-bts-amber-border); color: var(--ba-bts-amber-text); } .ba-bts .alert--warning .alert-flora { background: var(--ba-bts-amber-fill); color: var(--ba-bts-amber-icon); } .ba-bts .alert--warning .alert-icon { color: var(--ba-bts-amber-icon); border-color: var(--ba-bts-amber-icon); } .ba-bts .alert--warning .btn-primary { color: var(--ba-bts-amber-text); border-color: var(--ba-bts-amber-border); } .ba-bts .alert--warning .btn-primary:hover { background: var(--ba-bts-amber-border); color: white; } .ba-bts .alert--warning .btn-ghost { color: var(--ba-bts-amber-text); } .ba-bts .alert--info { background: var(--ba-bts-slate-bg); border: 1.5px solid var(--ba-bts-slate-border); border-left: 4px solid var(--ba-bts-slate-border); color: var(--ba-bts-slate-text); } .ba-bts .alert--info .alert-flora { background: var(--ba-bts-slate-fill); color: var(--ba-bts-slate-icon); } .ba-bts .alert--info .alert-icon { color: var(--ba-bts-slate-icon); border-color: var(--ba-bts-slate-icon); } .ba-bts .alert--info .btn-primary { color: var(--ba-bts-slate-text); border-color: var(--ba-bts-slate-border); } .ba-bts .alert--info .btn-primary:hover { background: var(--ba-bts-slate-border); color: white; } .ba-bts .alert--info .btn-ghost { color: var(--ba-bts-slate-text); } .ba-bts .alert--neutral { background: var(--ba-bts-neutral-bg); border: 1.5px solid var(--ba-bts-neutral-border); border-left: 4px solid var(--ba-bts-neutral-border); color: var(--ba-bts-neutral-text); } .ba-bts .alert--neutral .alert-flora { background: var(--ba-bts-neutral-fill); color: var(--ba-bts-neutral-icon); } .ba-bts .alert--neutral .alert-icon { color: var(--ba-bts-neutral-icon); border-color: var(--ba-bts-neutral-icon); } .ba-bts .alert--neutral .btn-primary { color: var(--ba-bts-neutral-text); border-color: var(--ba-bts-neutral-border); } .ba-bts .alert--neutral .btn-primary:hover { background: var(--ba-bts-neutral-border); color: white; } .ba-bts .alert--neutral .btn-ghost { color: var(--ba-bts-neutral-text); } .ba-bts .ornament { font-family: 'Cormorant Garamond', serif; font-style: italic; font-size: 12px; color: #bbb; text-align: center; letter-spacing: 0.1em; } @media (prefers-reduced-motion: reduce) { .ba-bts .alert { animation: none; } } ``` ### 04. CSS Cookie Consent Banner Bottom **Type:** CSS + JS **Description:** A bottom CSS cookie consent banner in a luxury Art Deco aesthetic — obsidian background, gold gradient top rule, diagonal corner motifs, and a smooth slide-up entrance animation. Features four preference checkbox tabs (Essential / Analytics / Marketing / Personalisation) plus an Accept All + Decline Non-Essential button pair. GDPR / CCPA / ePrivacy compliant copy. Libre Baskerville + Jost. Best for GDPR compliance, premium brand sites, luxury e-commerce, regulatory cookie disclosure. **HTML:** ```html
⬥ ◇ ⬥

The consent banner appears from the bottom of the demo on load. Use Accept All or Decline Non-Essential to dismiss.

``` **CSS:** ```css /* ─── 04 Cookie Consent Banner — luxury Art Deco ─────────────── */ @import url('https://fonts.googleapis.com/css2?family=Libre+Baskerville:ital,wght@0,400;0,700;1,400&family=Jost:wght@300;400;500;600&display=swap'); .ba-cok { --ba-cok-obsidian: #0a0a0a; --ba-cok-onyx: #141414; --ba-cok-gold: #c9a84c; --ba-cok-gold-lite: #e2c880; --ba-cok-gold-dim: #8a6e30; --ba-cok-ivory: #f5f0e8; --ba-cok-ivory-dim: rgba(245,240,232,0.55); --ba-cok-rule: rgba(201,168,76,0.25); position: relative; width: 100%; min-height: 720px; background: var(--ba-cok-obsidian); background-image: radial-gradient(ellipse 60% 35% at 50% 0%, rgba(201,168,76,0.06) 0%, transparent 60%), repeating-linear-gradient(45deg, transparent 0px, transparent 24px, rgba(255,255,255,0.008) 24px, rgba(255,255,255,0.008) 25px); font-family: 'Jost', sans-serif; color: var(--ba-cok-ivory); display: flex; align-items: center; justify-content: center; overflow: hidden; box-sizing: border-box; } .ba-cok *, .ba-cok *::before, .ba-cok *::after { box-sizing: border-box; margin: 0; padding: 0; } .ba-cok .bg-text { position: absolute; font-family: 'Libre Baskerville', serif; font-size: clamp(80px, 14vw, 160px); font-style: italic; color: rgba(201,168,76,0.04); letter-spacing: -0.02em; white-space: nowrap; user-select: none; pointer-events: none; top: 50%; left: 50%; transform: translate(-50%, -50%); } .ba-cok .page-center { text-align: center; z-index: 1; padding: 40px 20px 200px; } .ba-cok .page-center p { font-family: 'Libre Baskerville', serif; font-size: clamp(13px, 2vw, 15px); font-style: italic; color: var(--ba-cok-ivory-dim); line-height: 1.8; max-width: 380px; margin: 0 auto; } .ba-cok .ornament { display: block; text-align: center; color: var(--ba-cok-gold); font-size: 24px; letter-spacing: 0.3em; margin-bottom: 20px; opacity: 0.7; } .ba-cok .consent-banner { position: absolute; bottom: 0; left: 0; right: 0; z-index: 10; transform: translateY(100%); animation: ba-cok-slideUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) 1.2s forwards; } @keyframes ba-cok-slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } } .ba-cok .consent-banner.dismissed { animation: ba-cok-slideDown 0.5s cubic-bezier(0.4, 0, 1, 1) forwards; pointer-events: none; } @keyframes ba-cok-slideDown { from { transform: translateY(0); } to { transform: translateY(110%); } } .ba-cok .consent-frame { background: var(--ba-cok-onyx); border-top: 1px solid var(--ba-cok-rule); position: relative; overflow: hidden; } .ba-cok .consent-frame::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: linear-gradient(90deg, transparent 0%, var(--ba-cok-gold-dim) 20%, var(--ba-cok-gold) 50%, var(--ba-cok-gold-dim) 80%, transparent 100%); } .ba-cok .consent-inner { max-width: 1100px; margin: 0 auto; padding: 28px 32px; display: grid; grid-template-columns: 1fr auto; gap: 32px; align-items: center; } .ba-cok .consent-left { display: flex; flex-direction: column; gap: 10px; } .ba-cok .consent-eyebrow { display: flex; align-items: center; gap: 10px; } .ba-cok .consent-eyebrow-line { width: 28px; height: 1px; background: var(--ba-cok-gold); opacity: 0.5; } .ba-cok .consent-eyebrow-text { font-size: 9px; font-weight: 600; letter-spacing: 0.3em; text-transform: uppercase; color: var(--ba-cok-gold); opacity: 0.8; } .ba-cok .consent-title { font-family: 'Libre Baskerville', serif; font-size: 19px; font-weight: 700; color: var(--ba-cok-ivory); line-height: 1.25; } .ba-cok .consent-body { font-size: 12.5px; line-height: 1.75; color: var(--ba-cok-ivory-dim); max-width: 560px; } .ba-cok .consent-body a { color: var(--ba-cok-gold-lite); text-decoration: none; border-bottom: 1px solid rgba(201,168,76,0.35); transition: border-color 0.2s; } .ba-cok .consent-tabs { display: flex; gap: 0; margin-top: 6px; border: 1px solid var(--ba-cok-rule); width: fit-content; border-radius: 2px; overflow: hidden; flex-wrap: wrap; } .ba-cok .consent-tab { display: flex; align-items: center; gap: 6px; padding: 5px 12px; font-size: 10px; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ba-cok-ivory-dim); cursor: pointer; background: transparent; border-right: 1px solid var(--ba-cok-rule); transition: all 0.2s; } .ba-cok .consent-tab:last-child { border-right: none; } .ba-cok .consent-tab input[type="checkbox"] { width: 11px; height: 11px; accent-color: var(--ba-cok-gold); cursor: pointer; } .ba-cok .consent-tab:hover { background: rgba(201,168,76,0.06); color: var(--ba-cok-ivory); } .ba-cok .consent-tab.required { color: rgba(201,168,76,0.6); pointer-events: none; } .ba-cok .consent-right { display: flex; flex-direction: column; gap: 10px; align-items: stretch; min-width: 180px; } .ba-cok .btn-accept { font-family: 'Jost', sans-serif; font-size: 11px; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; padding: 13px 24px; background: var(--ba-cok-gold); color: var(--ba-cok-obsidian); border: none; cursor: pointer; transition: all 0.25s ease; } .ba-cok .btn-accept:hover { background: var(--ba-cok-gold-lite); transform: translateY(-1px); box-shadow: 0 4px 20px rgba(201,168,76,0.35); } .ba-cok .btn-decline { font-family: 'Jost', sans-serif; font-size: 11px; font-weight: 500; letter-spacing: 0.18em; text-transform: uppercase; padding: 10px 24px; background: transparent; color: var(--ba-cok-ivory-dim); border: 1px solid rgba(245,240,232,0.15); cursor: pointer; transition: all 0.25s ease; } .ba-cok .btn-decline:hover { border-color: rgba(245,240,232,0.35); color: var(--ba-cok-ivory); background: rgba(245,240,232,0.04); } .ba-cok .consent-divider { height: 1px; background: var(--ba-cok-rule); margin: 0 32px; } .ba-cok .consent-footer { padding: 10px 32px; max-width: 1100px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; } .ba-cok .consent-footer-text { font-size: 10px; color: rgba(245,240,232,0.3); letter-spacing: 0.06em; } .ba-cok .consent-deco { color: rgba(201,168,76,0.3); font-size: 10px; letter-spacing: 0.15em; } @media (max-width: 640px) { .ba-cok .consent-inner { grid-template-columns: 1fr; gap: 20px; padding: 24px 20px; } .ba-cok .consent-right { flex-direction: row; min-width: unset; } .ba-cok .btn-accept, .ba-cok .btn-decline { flex: 1; } } @media (prefers-reduced-motion: reduce) { .ba-cok .consent-banner { animation: none; transform: translateY(0); } } ``` **JS:** ```js (() => { const root = document.querySelector('.ba-cok'); if (!root) return; const banner = root.querySelector('[data-ba-cok-banner]'); if (!banner) return; const dismiss = () => banner.classList.add('dismissed'); root.addEventListener('click', (e) => { if (e.target.closest('[data-ba-cok-accept]')) { dismiss(); return; } if (e.target.closest('[data-ba-cok-decline]')) { root.querySelectorAll('[data-ba-cok-pref]').forEach((c) => { c.checked = false; }); dismiss(); } }); })(); ``` ### 05. Inline Form Validation Alert CSS **Type:** Pure CSS **Description:** Inline form validation alerts in a brutalist / raw industrial aesthetic — grid paper texture, IBM Plex Mono throughout, black heavy borders with offset box shadow. Features a top-of-form error summary (3 errors prevented submission) plus four distinct field states: success (green / OK_200), error (red / ERR_409 — email already registered), warning (amber / WARN_PWD — weak password + 4-segment strength bar), and hint (blue / INFO — username requirements). Each validation message carries a monospace status code badge in the top-right corner. IBM Plex Mono + Syne. Best for registration forms, signup flows, account validation, dev-tool input dialogs. **HTML:** ```html
Create Account FORM · V2.4
Full name *01
Looks goodName is valid and matches our formatting requirements.
Email address *02
Email already registeredAn account with this address exists. Try signing in instead, or use a different email.
Password *03
Weak password — strength: fairAdd uppercase letters, symbols, or increase length to 12+ characters for a stronger password.
Username 04
Username requirements3–20 characters. Letters, numbers, underscores only. Must not start with a number.
``` **CSS:** ```css /* ─── 05 Inline Form Validation Alert — brutalist industrial ──── */ @import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:ital,wght@0,400;0,500;0,700;1,400&family=Syne:wght@700;800&display=swap'); .ba-frm { --ba-frm-bg: #f2f0ec; --ba-frm-surface: #ffffff; --ba-frm-ink: #111111; --ba-frm-muted: #888; --ba-frm-err-bg: #fff5f5; --ba-frm-err-line: #e02020; --ba-frm-err-text: #c00; --ba-frm-ok-bg: #f5fff8; --ba-frm-ok-line: #18a050; --ba-frm-ok-text: #0d7038; --ba-frm-warn-bg: #fffbf0; --ba-frm-warn-line: #e09000; --ba-frm-warn-text: #986000; --ba-frm-hint-bg: #f5f8ff; --ba-frm-hint-line: #3060d0; --ba-frm-hint-text: #204090; position: relative; width: 100%; min-height: 760px; background: var(--ba-frm-bg); background-image: repeating-linear-gradient(90deg, rgba(0,0,0,0.04) 0px, transparent 1px, transparent 40px), repeating-linear-gradient(0deg, rgba(0,0,0,0.04) 0px, transparent 1px, transparent 40px); display: flex; align-items: center; justify-content: center; padding: 48px 16px; font-family: 'IBM Plex Mono', monospace; box-sizing: border-box; } .ba-frm *, .ba-frm *::before, .ba-frm *::after { box-sizing: border-box; margin: 0; padding: 0; } .ba-frm .form-shell { background: var(--ba-frm-surface); border: 2px solid var(--ba-frm-ink); width: 100%; max-width: 520px; box-shadow: 6px 6px 0 var(--ba-frm-ink); position: relative; } .ba-frm .form-header { background: var(--ba-frm-ink); color: #fff; padding: 14px 20px; display: flex; align-items: center; justify-content: space-between; } .ba-frm .form-header-title { font-family: 'Syne', sans-serif; font-size: 14px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; } .ba-frm .form-header-meta { font-size: 10px; opacity: 0.45; letter-spacing: 0.12em; } .ba-frm .form-body { padding: 24px 24px 28px; } .ba-frm .field { display: flex; flex-direction: column; border-bottom: 1px solid rgba(0,0,0,0.1); padding: 18px 0; } .ba-frm .field:first-child { padding-top: 0; } .ba-frm .field:last-child { border-bottom: none; } .ba-frm .field-label { font-size: 9px; font-weight: 700; letter-spacing: 0.25em; text-transform: uppercase; color: var(--ba-frm-muted); margin-bottom: 8px; display: flex; align-items: center; gap: 6px; } .ba-frm .field-label .required-mark { color: var(--ba-frm-err-line); font-size: 11px; line-height: 1; } .ba-frm .field-label .field-index { font-size: 9px; opacity: 0.3; margin-left: auto; font-weight: 400; } .ba-frm .field-input { width: 100%; font-family: 'IBM Plex Mono', monospace; font-size: 14px; font-weight: 400; color: var(--ba-frm-ink); background: transparent; border: none; border-bottom: 2px solid var(--ba-frm-ink); padding: 6px 0 8px; outline: none; transition: border-color 0.2s; } .ba-frm .field-input::placeholder { color: rgba(0,0,0,0.22); font-style: italic; } .ba-frm .field--error .field-input { border-color: var(--ba-frm-err-line); } .ba-frm .field--success .field-input { border-color: var(--ba-frm-ok-line); } .ba-frm .field--warning .field-input { border-color: var(--ba-frm-warn-line); } .ba-frm .validation-msg { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; margin-top: 10px; border-left: 3px solid; font-size: 11.5px; line-height: 1.55; position: relative; overflow: hidden; animation: ba-frm-popIn 0.22s cubic-bezier(0.34, 1.56, 0.64, 1) both; } @keyframes ba-frm-popIn { from { opacity: 0; transform: translateY(-4px) scaleY(0.9); } to { opacity: 1; transform: translateY(0) scaleY(1); } } .ba-frm .validation-msg::before { content: attr(data-code); position: absolute; top: 8px; right: 10px; font-size: 9px; font-weight: 700; letter-spacing: 0.15em; opacity: 0.35; } .ba-frm .validation-msg__icon { flex-shrink: 0; width: 18px; height: 18px; display: flex; align-items: center; justify-content: center; margin-top: 1px; } .ba-frm .validation-msg__icon svg { width: 15px; height: 15px; } .ba-frm .validation-msg__title { font-weight: 700; margin-bottom: 2px; display: block; font-size: 11px; letter-spacing: 0.04em; text-transform: uppercase; } .ba-frm .validation-msg__detail { font-size: 11px; font-weight: 400; opacity: 0.8; font-style: italic; } .ba-frm .validation-msg--error { background: var(--ba-frm-err-bg); border-color: var(--ba-frm-err-line); color: var(--ba-frm-err-text); } .ba-frm .validation-msg--success { background: var(--ba-frm-ok-bg); border-color: var(--ba-frm-ok-line); color: var(--ba-frm-ok-text); } .ba-frm .validation-msg--warning { background: var(--ba-frm-warn-bg); border-color: var(--ba-frm-warn-line); color: var(--ba-frm-warn-text); } .ba-frm .validation-msg--hint { background: var(--ba-frm-hint-bg); border-color: var(--ba-frm-hint-line); color: var(--ba-frm-hint-text); } .ba-frm .strength-bar { height: 3px; background: rgba(0,0,0,0.08); margin-top: 8px; display: flex; gap: 2px; overflow: hidden; } .ba-frm .strength-bar span { flex: 1; background: #ddd; transition: background 0.3s; } .ba-frm .strength-bar span.filled-warning { background: var(--ba-frm-warn-line); } .ba-frm .form-footer { background: rgba(0,0,0,0.03); border-top: 1px solid rgba(0,0,0,0.08); padding: 16px 24px; display: flex; align-items: center; justify-content: space-between; gap: 12px; } .ba-frm .form-error-summary { background: #fff0f0; border: 2px solid var(--ba-frm-err-line); padding: 14px 16px; margin: 0 24px; display: flex; align-items: flex-start; gap: 12px; animation: ba-frm-popIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) 0.05s both; } .ba-frm .form-error-summary__icon { color: var(--ba-frm-err-line); } .ba-frm .form-error-summary__icon svg { width: 18px; height: 18px; } .ba-frm .form-error-summary__title { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ba-frm-err-text); margin-bottom: 6px; } .ba-frm .form-error-summary__list { list-style: none; display: flex; flex-direction: column; gap: 3px; } .ba-frm .form-error-summary__list li { font-size: 11px; color: var(--ba-frm-err-text); display: flex; align-items: center; gap: 6px; opacity: 0.8; } .ba-frm .form-error-summary__list li::before { content: '›'; font-size: 14px; line-height: 1; } .ba-frm .submit-btn { font-family: 'IBM Plex Mono', monospace; font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; padding: 12px 24px; background: var(--ba-frm-ink); color: #fff; border: 2px solid var(--ba-frm-ink); cursor: pointer; transition: all 0.15s; flex-shrink: 0; } .ba-frm .submit-btn:hover { background: transparent; color: var(--ba-frm-ink); } .ba-frm .form-note { font-size: 10px; color: var(--ba-frm-muted); letter-spacing: 0.06em; line-height: 1.5; } @media (prefers-reduced-motion: reduce) { .ba-frm .validation-msg, .ba-frm .form-error-summary { animation: none; } } ``` ### 06. CSS Alert Banner with Icon Alignment **Type:** CSS + JS **Description:** Six dismissible CSS alert banners with proper icon alignment across mixed message lengths — vibrant maximalist pastel-gradient page, 16px rounded cards, chunky 42px icon badges with CSS pulse rings, and six colour variants (Success, Error, Warning, Info, Tip, Update). Demonstrates short single-line messages and long multi-line messages, proving that align-items: flex-start keeps the icon sharp at the top of wrapping text. Each card has action buttons + a dismiss × that exits with a smooth slide-and-collapse animation. Nunito + Fira Code. Best for product apps, customer dashboards, friendly admin panels, toast precursor cards. **HTML:** ```html
``` **CSS:** ```css /* ─── 06 Icon-Aligned Alert Banner — pastel maximalist ────────── */ @import url('https://fonts.googleapis.com/css2?family=Nunito:ital,wght@0,600;0,700;0,800;0,900;1,700&family=Fira+Code:wght@400;500&display=swap'); .ba-icn { --ba-icn-page-bg: #f8f5ff; --ba-icn-success-bg: #ecfdf4; --ba-icn-success-border: #22c55e; --ba-icn-success-icon-bg: #dcfce7; --ba-icn-success-icon: #16a34a; --ba-icn-success-text: #14532d; --ba-icn-success-title: #15803d; --ba-icn-error-bg: #fef2f2; --ba-icn-error-border: #f87171; --ba-icn-error-icon-bg: #fee2e2; --ba-icn-error-icon: #dc2626; --ba-icn-error-text: #7f1d1d; --ba-icn-error-title: #b91c1c; --ba-icn-warning-bg: #fffbeb; --ba-icn-warning-border: #fbbf24; --ba-icn-warning-icon-bg: #fef3c7; --ba-icn-warning-icon: #d97706; --ba-icn-warning-text: #78350f; --ba-icn-warning-title: #b45309; --ba-icn-info-bg: #eff6ff; --ba-icn-info-border: #60a5fa; --ba-icn-info-icon-bg: #dbeafe; --ba-icn-info-icon: #2563eb; --ba-icn-info-text: #1e3a8a; --ba-icn-info-title: #1d4ed8; --ba-icn-tip-bg: #fdf4ff; --ba-icn-tip-border: #c084fc; --ba-icn-tip-icon-bg: #fae8ff; --ba-icn-tip-icon: #9333ea; --ba-icn-tip-text: #4a1d96; --ba-icn-tip-title: #7e22ce; --ba-icn-update-bg: #fff7ed; --ba-icn-update-border: #fb923c; --ba-icn-update-icon-bg: #ffedd5; --ba-icn-update-icon: #ea580c; --ba-icn-update-text: #7c2d12; --ba-icn-update-title: #c2410c; position: relative; width: 100%; min-height: 1000px; background: var(--ba-icn-page-bg); background-image: radial-gradient(circle at 20% 20%, rgba(168,85,247,0.08) 0%, transparent 45%), radial-gradient(circle at 80% 80%, rgba(34,197,94,0.08) 0%, transparent 40%), radial-gradient(circle at 60% 10%, rgba(59,130,246,0.07) 0%, transparent 35%); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 48px 20px; gap: 14px; font-family: 'Nunito', sans-serif; box-sizing: border-box; } .ba-icn *, .ba-icn *::before, .ba-icn *::after { box-sizing: border-box; margin: 0; padding: 0; } .ba-icn .section-label { font-family: 'Fira Code', monospace; font-size: 10px; letter-spacing: 0.25em; text-transform: uppercase; color: #bbb; } .ba-icn .alert { width: 100%; max-width: 620px; border-radius: 16px; border: 2px solid; padding: 16px 18px; display: flex; align-items: flex-start; gap: 14px; position: relative; overflow: hidden; transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease; animation: ba-icn-alertIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both; } .ba-icn .alert:hover { transform: translateY(-3px) scale(1.005); } .ba-icn .alert:nth-child(2) { animation-delay: 0.07s; } .ba-icn .alert:nth-child(3) { animation-delay: 0.14s; } .ba-icn .alert:nth-child(4) { animation-delay: 0.21s; } .ba-icn .alert:nth-child(5) { animation-delay: 0.28s; } .ba-icn .alert:nth-child(6) { animation-delay: 0.35s; } .ba-icn .alert:nth-child(7) { animation-delay: 0.42s; } @keyframes ba-icn-alertIn { from { opacity: 0; transform: translateX(-16px) scale(0.97); } to { opacity: 1; transform: translateX(0) scale(1); } } .ba-icn .alert::before { content: ''; position: absolute; top: -30px; right: -30px; width: 100px; height: 100px; border-radius: 50%; background: currentColor; opacity: 0.05; pointer-events: none; } .ba-icn .alert-icon-wrap { flex-shrink: 0; width: 42px; height: 42px; border-radius: 12px; display: flex; align-items: center; justify-content: center; position: relative; } .ba-icn .alert-icon-wrap svg { width: 22px; height: 22px; } .ba-icn .alert-icon-wrap::after { content: ''; position: absolute; inset: -3px; border-radius: 14px; border: 2px solid currentColor; opacity: 0; animation: ba-icn-pulse 2.5s ease-in-out infinite; } @keyframes ba-icn-pulse { 0%, 100% { opacity: 0; transform: scale(1); } 50% { opacity: 0.3; transform: scale(1.08); } } .ba-icn .alert-content { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; } .ba-icn .alert-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; } .ba-icn .alert-title { font-size: 15px; font-weight: 800; line-height: 1.25; } .ba-icn .alert-badge { font-family: 'Fira Code', monospace; font-size: 9px; font-weight: 500; letter-spacing: 0.1em; padding: 2px 7px; border-radius: 4px; flex-shrink: 0; text-transform: uppercase; border: 1.5px solid currentColor; opacity: 0.7; } .ba-icn .alert-desc { font-size: 13px; font-weight: 600; line-height: 1.6; opacity: 0.75; } .ba-icn .alert-desc kbd { font-family: 'Fira Code', monospace; font-size: 11px; background: rgba(0,0,0,0.08); padding: 1px 5px; border-radius: 4px; } .ba-icn .alert-actions { display: flex; gap: 10px; margin-top: 8px; flex-wrap: wrap; } .ba-icn .alert-link { font-size: 12px; font-weight: 800; letter-spacing: 0.04em; text-decoration: none; padding: 5px 12px; border-radius: 8px; border: 2px solid currentColor; transition: all 0.18s; cursor: pointer; background: transparent; font-family: 'Nunito', sans-serif; } .ba-icn .alert-link:hover { background: currentColor; color: white !important; } .ba-icn .alert-dismiss { flex-shrink: 0; width: 28px; height: 28px; border-radius: 8px; display: flex; align-items: center; justify-content: center; border: none; background: transparent; cursor: pointer; opacity: 0.4; transition: opacity 0.2s, background 0.2s; margin-top: 6px; } .ba-icn .alert-dismiss:hover { opacity: 0.8; background: rgba(0,0,0,0.06); } .ba-icn .alert-dismiss svg { width: 14px; height: 14px; } .ba-icn .alert--success { background: var(--ba-icn-success-bg); border-color: var(--ba-icn-success-border); color: var(--ba-icn-success-text); box-shadow: 0 4px 20px rgba(34,197,94,0.15); } .ba-icn .alert--success .alert-icon-wrap { background: var(--ba-icn-success-icon-bg); color: var(--ba-icn-success-icon); } .ba-icn .alert--success .alert-title { color: var(--ba-icn-success-title); } .ba-icn .alert--success .alert-badge { color: var(--ba-icn-success-icon); border-color: var(--ba-icn-success-border); } .ba-icn .alert--error { background: var(--ba-icn-error-bg); border-color: var(--ba-icn-error-border); color: var(--ba-icn-error-text); box-shadow: 0 4px 20px rgba(248,113,113,0.15); } .ba-icn .alert--error .alert-icon-wrap { background: var(--ba-icn-error-icon-bg); color: var(--ba-icn-error-icon); } .ba-icn .alert--error .alert-title { color: var(--ba-icn-error-title); } .ba-icn .alert--error .alert-badge { color: var(--ba-icn-error-icon); border-color: var(--ba-icn-error-border); } .ba-icn .alert--warning { background: var(--ba-icn-warning-bg); border-color: var(--ba-icn-warning-border); color: var(--ba-icn-warning-text); box-shadow: 0 4px 20px rgba(251,191,36,0.15); } .ba-icn .alert--warning .alert-icon-wrap { background: var(--ba-icn-warning-icon-bg); color: var(--ba-icn-warning-icon); } .ba-icn .alert--warning .alert-title { color: var(--ba-icn-warning-title); } .ba-icn .alert--warning .alert-badge { color: var(--ba-icn-warning-icon); border-color: var(--ba-icn-warning-border); } .ba-icn .alert--info { background: var(--ba-icn-info-bg); border-color: var(--ba-icn-info-border); color: var(--ba-icn-info-text); box-shadow: 0 4px 20px rgba(96,165,250,0.15); } .ba-icn .alert--info .alert-icon-wrap { background: var(--ba-icn-info-icon-bg); color: var(--ba-icn-info-icon); } .ba-icn .alert--info .alert-title { color: var(--ba-icn-info-title); } .ba-icn .alert--info .alert-badge { color: var(--ba-icn-info-icon); border-color: var(--ba-icn-info-border); } .ba-icn .alert--tip { background: var(--ba-icn-tip-bg); border-color: var(--ba-icn-tip-border); color: var(--ba-icn-tip-text); box-shadow: 0 4px 20px rgba(192,132,252,0.15); } .ba-icn .alert--tip .alert-icon-wrap { background: var(--ba-icn-tip-icon-bg); color: var(--ba-icn-tip-icon); } .ba-icn .alert--tip .alert-title { color: var(--ba-icn-tip-title); } .ba-icn .alert--tip .alert-badge { color: var(--ba-icn-tip-icon); border-color: var(--ba-icn-tip-border); } .ba-icn .alert--update { background: var(--ba-icn-update-bg); border-color: var(--ba-icn-update-border); color: var(--ba-icn-update-text); box-shadow: 0 4px 20px rgba(251,146,60,0.15); } .ba-icn .alert--update .alert-icon-wrap { background: var(--ba-icn-update-icon-bg); color: var(--ba-icn-update-icon); } .ba-icn .alert--update .alert-title { color: var(--ba-icn-update-title); } .ba-icn .alert--update .alert-badge { color: var(--ba-icn-update-icon); border-color: var(--ba-icn-update-border); } @media (prefers-reduced-motion: reduce) { .ba-icn .alert, .ba-icn .alert-icon-wrap::after { animation: none !important; } } ``` **JS:** ```js (() => { const root = document.querySelector('.ba-icn'); if (!root) return; root.addEventListener('click', (e) => { const btn = e.target.closest('.alert-dismiss'); if (!btn) return; const alert = btn.closest('[data-ba-icn-alert]'); if (!alert) return; alert.style.transition = 'all 0.35s cubic-bezier(0.4,0,0.2,1)'; alert.style.opacity = '0'; alert.style.transform = 'translateX(20px) scale(0.97)'; alert.style.maxHeight = alert.offsetHeight + 'px'; setTimeout(() => { alert.style.maxHeight = '0'; alert.style.padding = '0'; alert.style.margin = '0'; alert.style.borderWidth = '0'; alert.style.overflow = 'hidden'; }, 150); }); })(); ``` ### 07. CSS Toast Notification Alert Top Right **Type:** CSS + JS **Description:** A top-right CSS toast notification system in a soft glassmorphism / frosted UI aesthetic — purple-blue ambient orbs, translucent frosted cards, spring-physics slide-in from right, and a progress bar that shrinks via scaleX as the auto-dismiss timer runs. Includes 6 trigger types: Success, Error, Warning, Info, Default, and a Promise (async) variant that morphs mid-flight into a success state after resolution. Plus Jakarta Sans + JetBrains Mono. Best for SaaS dashboards, web-app feedback, async operations confirmation, modern notification systems. **HTML:** ```html
Trigger a toast
``` **CSS:** ```css /* ─── 07 Toast Notification — glassmorphism top-right ─────────── */ @import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap'); .ba-tst { --ba-tst-bg-from: #e0d7ff; --ba-tst-bg-to: #c8e6ff; --ba-tst-glass: rgba(255,255,255,0.55); --ba-tst-glass-border: rgba(255,255,255,0.75); --ba-tst-shadow: rgba(100,80,180,0.18); --ba-tst-ink: #1a1630; --ba-tst-muted: rgba(26,22,48,0.5); --ba-tst-c-success: #22c55e; --ba-tst-c-error: #ef4444; --ba-tst-c-warning: #f59e0b; --ba-tst-c-info: #6366f1; --ba-tst-c-neutral: #64748b; position: relative; width: 100%; min-height: 540px; background: linear-gradient(135deg, var(--ba-tst-bg-from) 0%, var(--ba-tst-bg-to) 60%, #d4f0ff 100%); font-family: 'Plus Jakarta Sans', sans-serif; display: flex; align-items: center; justify-content: center; padding: 60px 20px 40px; overflow: hidden; box-sizing: border-box; } .ba-tst *, .ba-tst *::before, .ba-tst *::after { box-sizing: border-box; margin: 0; padding: 0; } .ba-tst::before, .ba-tst::after { content: ''; position: absolute; border-radius: 50%; pointer-events: none; filter: blur(80px); z-index: 0; } .ba-tst::before { width: 520px; height: 520px; background: rgba(139,92,246,0.22); top: -100px; left: -120px; } .ba-tst::after { width: 400px; height: 400px; background: rgba(59,130,246,0.18); bottom: -80px; right: -80px; } .ba-tst .panel { background: var(--ba-tst-glass); backdrop-filter: blur(20px) saturate(1.4); -webkit-backdrop-filter: blur(20px) saturate(1.4); border: 1.5px solid var(--ba-tst-glass-border); border-radius: 20px; padding: 28px 32px; width: 100%; max-width: 420px; box-shadow: 0 8px 40px var(--ba-tst-shadow), inset 0 1px 0 rgba(255,255,255,0.8); z-index: 1; position: relative; } .ba-tst .panel-title { font-size: 13px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ba-tst-muted); margin-bottom: 16px; } .ba-tst .btn-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; } .ba-tst .trigger-btn { font-family: 'Plus Jakarta Sans', sans-serif; font-size: 12.5px; font-weight: 600; padding: 11px 14px; border-radius: 12px; border: 1.5px solid transparent; cursor: pointer; transition: all 0.2s ease; display: flex; align-items: center; gap: 8px; color: white; } .ba-tst .trigger-btn svg { width: 15px; height: 15px; flex-shrink: 0; } .ba-tst .trigger-btn--success { background: var(--ba-tst-c-success); } .ba-tst .trigger-btn--error { background: var(--ba-tst-c-error); } .ba-tst .trigger-btn--warning { background: var(--ba-tst-c-warning); } .ba-tst .trigger-btn--info { background: var(--ba-tst-c-info); } .ba-tst .trigger-btn--neutral { background: var(--ba-tst-c-neutral); } .ba-tst .trigger-btn--promise { background: linear-gradient(135deg, #6366f1, #8b5cf6); grid-column: span 2; justify-content: center; } .ba-tst .trigger-btn:hover { opacity: 0.88; transform: translateY(-1px); box-shadow: 0 4px 16px rgba(0,0,0,0.15); } .ba-tst .toast-container { position: absolute; top: 20px; right: 20px; z-index: 100; display: flex; flex-direction: column; gap: 10px; align-items: flex-end; pointer-events: none; } .ba-tst .toast { pointer-events: all; width: 340px; max-width: calc(100% - 40px); background: rgba(255,255,255,0.72); backdrop-filter: blur(24px) saturate(1.8); -webkit-backdrop-filter: blur(24px) saturate(1.8); border: 1.5px solid rgba(255,255,255,0.85); border-radius: 16px; box-shadow: 0 4px 24px rgba(100,80,180,0.14), 0 1px 4px rgba(0,0,0,0.06); padding: 14px 14px 14px 16px; display: flex; align-items: flex-start; gap: 12px; position: relative; overflow: hidden; animation: ba-tst-in 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both; } @keyframes ba-tst-in { from { opacity: 0; transform: translateX(60px) scale(0.92); } to { opacity: 1; transform: translateX(0) scale(1); } } .ba-tst .toast.exiting { animation: ba-tst-out 0.32s cubic-bezier(0.4, 0, 1, 1) forwards; } @keyframes ba-tst-out { 0% { opacity: 1; transform: translateX(0); max-height: 200px; margin-bottom: 0; } 60% { opacity: 0; transform: translateX(50px); } 100% { opacity: 0; max-height: 0; margin-bottom: -10px; padding: 0; } } .ba-tst .toast::after { content: ''; position: absolute; bottom: 0; left: 0; height: 2.5px; background: var(--toast-color, #6366f1); width: 100%; animation: ba-tst-progress var(--toast-duration, 4000ms) linear forwards; transform-origin: left; } @keyframes ba-tst-progress { from { transform: scaleX(1); } to { transform: scaleX(0); } } .ba-tst .toast::before { content: ''; position: absolute; top: 0; left: 0; width: 4px; height: 100%; border-radius: 16px 0 0 16px; background: var(--toast-color, #6366f1); } .ba-tst .toast-icon { flex-shrink: 0; width: 34px; height: 34px; border-radius: 10px; display: flex; align-items: center; justify-content: center; background: color-mix(in srgb, var(--toast-color, #6366f1) 12%, white); } .ba-tst .toast-icon svg { width: 17px; height: 17px; color: var(--toast-color, #6366f1); } .ba-tst .toast-body { flex: 1; min-width: 0; } .ba-tst .toast-title { font-size: 13.5px; font-weight: 700; color: var(--ba-tst-ink); line-height: 1.25; margin-bottom: 2px; } .ba-tst .toast-msg { font-size: 12px; color: var(--ba-tst-muted); line-height: 1.5; } .ba-tst .toast-time { font-family: 'JetBrains Mono', monospace; font-size: 9.5px; color: rgba(26,22,48,0.3); margin-top: 5px; display: block; } .ba-tst .toast-close { flex-shrink: 0; width: 24px; height: 24px; border: none; background: rgba(0,0,0,0.05); border-radius: 7px; cursor: pointer; display: flex; align-items: center; justify-content: center; color: var(--ba-tst-muted); transition: background 0.2s; margin-top: 1px; } .ba-tst .toast-close svg { width: 12px; height: 12px; } .ba-tst .toast-loader { display: flex; gap: 4px; margin-top: 6px; } .ba-tst .toast-loader span { width: 5px; height: 5px; border-radius: 50%; background: var(--toast-color, #6366f1); opacity: 0.3; animation: ba-tst-dot 1.2s ease-in-out infinite; } .ba-tst .toast-loader span:nth-child(2) { animation-delay: 0.2s; } .ba-tst .toast-loader span:nth-child(3) { animation-delay: 0.4s; } @keyframes ba-tst-dot { 0%,80%,100% { opacity: 0.3; transform: scale(1); } 40% { opacity: 1; transform: scale(1.4); } } @media (prefers-reduced-motion: reduce) { .ba-tst .toast, .ba-tst .toast::after, .ba-tst .toast-loader span { animation: none !important; } } ``` **JS:** ```js (() => { const root = document.querySelector('.ba-tst'); if (!root) return; const container = root.querySelector('[data-ba-tst-container]'); if (!container) return; const CONFIGS = { success: { color: '#22c55e', title: 'Upload complete', msg: 'report_q2.pdf was saved to your drive.', icon: '', duration: 4000 }, error: { color: '#ef4444', title: 'Payment failed', msg: 'Card ending in 4242 was declined.', icon: '', duration: 6000 }, warning: { color: '#f59e0b', title: 'Storage at 90%', msg: 'Free up space to avoid paused uploads.', icon: '', duration: 5000 }, info: { color: '#6366f1', title: 'New version available', msg: 'v5.2.0 is ready — see what is new.', icon: '', duration: 5000 }, neutral: { color: '#64748b', title: 'Changes auto-saved', msg: 'Last save 2 seconds ago.', icon: '', duration: 3000 }, promise: { color: '#8b5cf6', title: 'Syncing workspace…', msg: 'This resolves automatically in 3 seconds.', icon: '', duration: 3000, isPromise: true }, }; function now() { return new Date().toLocaleTimeString('en-US', { hour: '2-digit', minute: '2-digit', second: '2-digit' }); } function dismiss(el) { if (!el) return; if (el._baTstTimer) clearTimeout(el._baTstTimer); el.classList.add('exiting'); el.addEventListener('animationend', () => el.remove(), { once: true }); } function show(type) { const cfg = CONFIGS[type]; if (!cfg) return; const el = document.createElement('div'); el.className = 'toast'; el.style.setProperty('--toast-color', cfg.color); el.style.setProperty('--toast-duration', cfg.duration + 'ms'); el.innerHTML = '
' + cfg.icon + '
' + '
' + '
' + cfg.title + '
' + '
' + cfg.msg + '
' + (cfg.isPromise ? '
' : '') + '' + now() + '' + '
' + ''; container.prepend(el); el.querySelector('.toast-close').addEventListener('click', () => dismiss(el)); el._baTstTimer = setTimeout(() => { if (cfg.isPromise) { el.querySelector('.toast-title').textContent = 'Sync complete!'; el.querySelector('.toast-msg').textContent = 'All files are up to date.'; const loader = el.querySelector('.toast-loader'); if (loader) loader.remove(); el.style.setProperty('--toast-color', '#22c55e'); el.querySelector('.toast-icon').innerHTML = ''; setTimeout(() => dismiss(el), 3000); } else { dismiss(el); } }, cfg.duration); } root.addEventListener('click', (e) => { const btn = e.target.closest('[data-ba-tst-trigger]'); if (btn) show(btn.dataset.baTstTrigger); }); })(); ``` ### 08. CSS Pulsing Banner for Live Updates **Type:** Pure CSS **Description:** Four live-update CSS banners in a dark broadcast / newsroom aesthetic — a Breaking News ticker with seamless duplicate-string loop, a System Status bar with pulsing box-shadow ring orbs (operational green, 99.98% uptime, P50 latency), a Degraded service banner with sweeping diagonal glow scan + subtle shake animation, and a Live Coverage bar with viewer count + clip-path chevron badge. Every banner uses pure CSS animations — no JS required for the live feel. Barlow Condensed + Barlow. Best for status pages, live broadcasts, real-time dashboards, news sites. **HTML:** ```html
— Live status banners —
``` **CSS:** ```css /* ─── 08 Pulsing Banner for Live Updates — broadcast ─────────── */ @import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:ital,wght@0,400;0,600;0,700;0,800;1,700&family=Barlow:wght@300;400;500&display=swap'); .ba-pul { --ba-pul-bg: #080a0e; --ba-pul-surface: #0f1218; --ba-pul-border: rgba(255,255,255,0.06); --ba-pul-text: #e8ecf4; --ba-pul-muted: rgba(232,236,244,0.45); --ba-pul-red: #ff3b30; --ba-pul-green: #30d158; --ba-pul-amber: #ffd60a; --ba-pul-blue: #0a84ff; position: relative; width: 100%; min-height: 540px; background: var(--ba-pul-bg); background-image: radial-gradient(ellipse 70% 30% at 50% 0%, rgba(255,59,48,0.04) 0%, transparent 60%); font-family: 'Barlow', sans-serif; color: var(--ba-pul-text); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 48px 16px; box-sizing: border-box; } .ba-pul *, .ba-pul *::before, .ba-pul *::after { box-sizing: border-box; margin: 0; padding: 0; } .ba-pul .section-mark { font-family: 'Barlow Condensed', sans-serif; font-size: 9px; font-weight: 700; letter-spacing: 0.3em; text-transform: uppercase; color: rgba(255,255,255,0.15); align-self: flex-start; max-width: 760px; width: 100%; } .ba-pul .banner { width: 100%; max-width: 760px; position: relative; overflow: hidden; } .ba-pul .banner--breaking { background: var(--ba-pul-surface); border: 1px solid rgba(255,59,48,0.2); border-left: 3px solid var(--ba-pul-red); display: flex; align-items: stretch; height: 52px; } .ba-pul .breaking-pill { background: var(--ba-pul-red); display: flex; align-items: center; gap: 8px; padding: 0 28px 0 18px; flex-shrink: 0; clip-path: polygon(0 0, 100% 0, calc(100% - 10px) 100%, 0 100%); } .ba-pul .live-dot { width: 8px; height: 8px; border-radius: 50%; background: white; flex-shrink: 0; animation: ba-pul-livePulse 1.8s ease-in-out infinite; } @keyframes ba-pul-livePulse { 0%,100% { opacity: 1; box-shadow: 0 0 0 0 rgba(255,255,255,0.5); } 50% { opacity: 0.6; box-shadow: 0 0 0 6px rgba(255,255,255,0); } } .ba-pul .breaking-label { font-family: 'Barlow Condensed', sans-serif; font-size: 13px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: white; white-space: nowrap; } .ba-pul .breaking-ticker { flex: 1; overflow: hidden; display: flex; align-items: center; padding: 0 16px; position: relative; } .ba-pul .breaking-ticker::before, .ba-pul .breaking-ticker::after { content: ''; position: absolute; top: 0; bottom: 0; width: 32px; z-index: 2; pointer-events: none; } .ba-pul .breaking-ticker::before { left: 0; background: linear-gradient(90deg, var(--ba-pul-surface), transparent); } .ba-pul .breaking-ticker::after { right: 0; background: linear-gradient(-90deg, var(--ba-pul-surface), transparent); } .ba-pul .ticker-track { display: flex; gap: 64px; white-space: nowrap; animation: ba-pul-scroll 22s linear infinite; font-family: 'Barlow Condensed', sans-serif; font-size: 15px; font-weight: 600; color: var(--ba-pul-text); letter-spacing: 0.04em; } @keyframes ba-pul-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } } .ba-pul .ticker-sep { color: var(--ba-pul-red); opacity: 0.7; } .ba-pul .banner--status { background: var(--ba-pul-surface); border: 1px solid var(--ba-pul-border); padding: 16px 20px; display: flex; align-items: center; justify-content: space-between; gap: 16px; } .ba-pul .status-left { display: flex; align-items: center; gap: 14px; } .ba-pul .status-orb-wrap { position: relative; width: 20px; height: 20px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; } .ba-pul .status-orb { width: 10px; height: 10px; border-radius: 50%; position: relative; z-index: 1; } .ba-pul .status-orb--green { background: var(--ba-pul-green); } .ba-pul .status-orb-ring { position: absolute; inset: 0; border-radius: 50%; background: var(--ba-pul-green); animation: ba-pul-ring 2s ease-out infinite; } @keyframes ba-pul-ring { 0% { opacity: 0.6; transform: scale(1); } 100% { opacity: 0; transform: scale(2.8); } } .ba-pul .status-name { font-family: 'Barlow Condensed', sans-serif; font-size: 14px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; } .ba-pul .status-name-green { color: var(--ba-pul-green); } .ba-pul .status-desc { font-size: 12px; color: var(--ba-pul-muted); margin-top: 1px; } .ba-pul .status-right { display: flex; align-items: center; gap: 20px; flex-shrink: 0; } .ba-pul .status-stat { text-align: right; } .ba-pul .status-stat-val { font-family: 'Barlow Condensed', sans-serif; font-size: 18px; font-weight: 700; line-height: 1; animation: ba-pul-blink 3s ease-in-out infinite; color: var(--ba-pul-text); } .ba-pul .status-val-green { color: var(--ba-pul-green); } @keyframes ba-pul-blink { 0%,100% { opacity: 1; } 50% { opacity: 0.6; } } .ba-pul .status-stat-label { font-size: 9px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ba-pul-muted); margin-top: 2px; } .ba-pul .status-divider { width: 1px; height: 32px; background: var(--ba-pul-border); } .ba-pul .banner--degraded { background: rgba(255, 214, 10, 0.05); border: 1px solid rgba(255, 214, 10, 0.2); padding: 12px 20px; display: flex; align-items: center; gap: 14px; } .ba-pul .banner--degraded::before { content: ''; position: absolute; top: 0; bottom: 0; width: 60px; background: linear-gradient(90deg, transparent, rgba(255,214,10,0.15), transparent); animation: ba-pul-sweep 3s ease-in-out infinite; } @keyframes ba-pul-sweep { from { left: -60px; } to { left: 110%; } } .ba-pul .degraded-icon { flex-shrink: 0; width: 36px; height: 36px; border-radius: 8px; background: rgba(255,214,10,0.1); border: 1px solid rgba(255,214,10,0.3); display: flex; align-items: center; justify-content: center; animation: ba-pul-shake 4s ease-in-out infinite; } @keyframes ba-pul-shake { 0%,90%,100% { transform: rotate(0); } 92% { transform: rotate(-3deg); } 94% { transform: rotate(3deg); } 96% { transform: rotate(-2deg); } 98% { transform: rotate(1deg); } } .ba-pul .degraded-icon svg { width: 18px; height: 18px; color: var(--ba-pul-amber); } .ba-pul .degraded-content { flex: 1; position: relative; z-index: 1; } .ba-pul .degraded-title { font-family: 'Barlow Condensed', sans-serif; font-size: 14px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ba-pul-amber); display: flex; align-items: center; gap: 8px; } .ba-pul .degraded-badge { font-family: 'Barlow Condensed', sans-serif; font-size: 9px; font-weight: 700; letter-spacing: 0.18em; padding: 2px 6px; border: 1px solid rgba(255,214,10,0.4); color: var(--ba-pul-amber); border-radius: 3px; animation: ba-pul-badgePulse 1.5s ease-in-out infinite; } @keyframes ba-pul-badgePulse { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } } .ba-pul .degraded-desc { font-size: 12px; color: var(--ba-pul-muted); margin-top: 2px; line-height: 1.5; } .ba-pul .degraded-time { font-family: 'Barlow Condensed', sans-serif; font-size: 11px; color: rgba(255,214,10,0.5); white-space: nowrap; flex-shrink: 0; letter-spacing: 0.08em; } .ba-pul .banner--live { background: var(--ba-pul-surface); border: 1px solid rgba(10,132,255,0.2); padding: 0; display: flex; align-items: stretch; } .ba-pul .live-badge { background: var(--ba-pul-blue); padding: 0 20px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; flex-shrink: 0; position: relative; } .ba-pul .live-badge::after { content: ''; position: absolute; top: 0; bottom: 0; right: -12px; width: 24px; background: var(--ba-pul-blue); clip-path: polygon(0 0, 0 100%, 100% 50%); } .ba-pul .live-badge-dot { width: 7px; height: 7px; border-radius: 50%; background: white; animation: ba-pul-livePulse 1.5s ease-in-out infinite; } .ba-pul .live-badge-text { font-family: 'Barlow Condensed', sans-serif; font-size: 11px; font-weight: 800; letter-spacing: 0.2em; color: white; text-transform: uppercase; } .ba-pul .live-content { flex: 1; padding: 12px 20px 12px 28px; display: flex; align-items: center; gap: 16px; } .ba-pul .live-headline { font-family: 'Barlow Condensed', sans-serif; font-size: 16px; font-weight: 700; color: var(--ba-pul-text); line-height: 1.3; letter-spacing: 0.02em; } .ba-pul .live-meta { font-size: 11px; color: var(--ba-pul-muted); margin-top: 2px; font-style: italic; } .ba-pul .live-viewers { text-align: right; flex-shrink: 0; } .ba-pul .live-viewers-num { font-family: 'Barlow Condensed', sans-serif; font-size: 22px; font-weight: 800; color: var(--ba-pul-blue); line-height: 1; animation: ba-pul-blink 2s ease-in-out infinite; } .ba-pul .live-viewers-label { font-size: 9px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ba-pul-muted); margin-top: 2px; } @media (prefers-reduced-motion: reduce) { .ba-pul *, .ba-pul *::before, .ba-pul *::after { animation: none !important; } } ``` ### 09. Minimalist Border Left CSS Alert **Type:** Pure CSS **Description:** Minimalist border-left CSS alerts in a Swiss typography / documentation aesthetic — Fraunces serif headlines + Geist Mono labels, warm parchment surface, and a single CSS variable --c drives every colour state. Two densities ship side-by-side: a full-message card (Success / Error / Warning / Info / Note variants with type label, decorative rule, body text, and an arrowed link) and a compact one-liner card (ok / fail / warn / info / note / new with mini type badge + divider + short inline message). Fraunces + Geist Mono. Best for documentation sites, technical wikis, developer changelogs, API status pages. **HTML:** ```html
success
Deployment complete.
Version 3.8.1 is now live across all regions. Zero downtime recorded during the rollout window.
View deployment log
error
Database connection refused.
Unable to reach pg-primary.cluster.internal:5432. Check that your DB is accepting connections and firewall rules permit access from this host.
View troubleshooting guide
warning
Deprecated method in use.
Your codebase calls client.legacyAuth() which will be removed in v4.0. Migrate to client.auth.verify() before the next major release.
Migration guide
info
Read-only mode is active.
You are browsing a shared workspace snapshot. Changes you make will not be saved. Switch to your personal workspace to enable editing.
Switch workspace
note
Experimental feature enabled.
You have opted into the ai-suggest beta. Behaviour may change without notice between releases.
ok2,048 records imported without errors.
failInvalid token. Session has expired — please sign in again.
warnYou have 3 unreviewed pull requests older than 14 days.
infoWebhooks are replayed in FIFO order with exponential back-off.
noteThis endpoint is rate-limited to 120 requests per minute per API key.
newStreaming responses now supported via Accept: text/event-stream.
``` **CSS:** ```css /* ─── 09 Minimalist Border-Left Alert — Swiss documentation ──── */ @import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300;0,9..144,600;1,9..144,300&family=Geist+Mono:wght@300;400;500&display=swap'); .ba-bdl { --ba-bdl-bg: #fafaf9; --ba-bdl-surface: #ffffff; --ba-bdl-ink: #111110; --ba-bdl-muted: #6f6e6b; --ba-bdl-faint: #e8e8e6; --ba-bdl-c-success: #16a34a; --ba-bdl-c-error: #dc2626; --ba-bdl-c-warning: #ca8a04; --ba-bdl-c-info: #2563eb; --ba-bdl-c-neutral: #71717a; --ba-bdl-c-purple: #7c3aed; --ba-bdl-c-pink: #db2777; --ba-bdl-border-width: 3px; --ba-bdl-radius: 2px; position: relative; width: 100%; min-height: 820px; background: var(--ba-bdl-bg); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 60px 24px; gap: 2px; font-family: 'Fraunces', serif; box-sizing: border-box; } .ba-bdl *, .ba-bdl *::before, .ba-bdl *::after { box-sizing: border-box; margin: 0; padding: 0; } .ba-bdl .section-label { font-family: 'Geist Mono', monospace; font-size: 9px; letter-spacing: 0.3em; text-transform: uppercase; color: #ccc; align-self: flex-start; max-width: 600px; width: 100%; } .ba-bdl .section-gap { height: 24px; width: 100%; max-width: 600px; } .ba-bdl .card { width: 100%; max-width: 600px; border: 1px solid var(--ba-bdl-faint); border-radius: var(--ba-bdl-radius); overflow: hidden; box-shadow: 0 1px 4px rgba(0,0,0,0.04); animation: ba-bdl-up 0.5s ease both; } @keyframes ba-bdl-up { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } } .ba-bdl .alert { width: 100%; background: var(--ba-bdl-surface); padding: 16px 20px; position: relative; transition: background 0.18s; border-left: var(--ba-bdl-border-width) solid var(--ba-bdl-c-info); } .ba-bdl .alert[data-c="success"] { border-left-color: var(--ba-bdl-c-success); --c: var(--ba-bdl-c-success); } .ba-bdl .alert[data-c="error"] { border-left-color: var(--ba-bdl-c-error); --c: var(--ba-bdl-c-error); } .ba-bdl .alert[data-c="warning"] { border-left-color: var(--ba-bdl-c-warning); --c: var(--ba-bdl-c-warning); } .ba-bdl .alert[data-c="info"] { border-left-color: var(--ba-bdl-c-info); --c: var(--ba-bdl-c-info); } .ba-bdl .alert[data-c="neutral"] { border-left-color: var(--ba-bdl-c-neutral); --c: var(--ba-bdl-c-neutral); } .ba-bdl .alert[data-c="purple"] { border-left-color: var(--ba-bdl-c-purple); --c: var(--ba-bdl-c-purple); } .ba-bdl .alert[data-c="pink"] { border-left-color: var(--ba-bdl-c-pink); --c: var(--ba-bdl-c-pink); } .ba-bdl .alert + .alert { border-top: 1px solid var(--ba-bdl-faint); } .ba-bdl .alert:hover { background: #fafafa; } .ba-bdl .alert-row { display: flex; align-items: baseline; gap: 10px; margin-bottom: 6px; } .ba-bdl .alert-type { font-family: 'Geist Mono', monospace; font-size: 10px; font-weight: 500; letter-spacing: 0.18em; text-transform: uppercase; color: var(--c); flex-shrink: 0; } .ba-bdl .alert-rule { flex: 1; height: 1px; background: var(--c); opacity: 0.15; align-self: center; } .ba-bdl .alert-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--c); opacity: 0.5; align-self: center; flex-shrink: 0; } .ba-bdl .alert-title { font-size: 17px; font-weight: 600; color: var(--ba-bdl-ink); line-height: 1.3; margin-bottom: 4px; letter-spacing: -0.01em; } .ba-bdl .alert-body { font-size: 14px; font-weight: 300; color: var(--ba-bdl-muted); line-height: 1.75; font-style: italic; } .ba-bdl .alert-body code { font-family: 'Geist Mono', monospace; font-size: 12px; font-style: normal; font-weight: 400; background: var(--ba-bdl-faint); padding: 1px 5px; border-radius: 3px; color: var(--ba-bdl-ink); } .ba-bdl .alert-link { font-family: 'Geist Mono', monospace; font-size: 11px; font-weight: 500; color: var(--c); text-decoration: none; border-bottom: 1px solid transparent; transition: border-color 0.15s; margin-top: 10px; display: inline-block; letter-spacing: 0.04em; } .ba-bdl .alert-link:hover { border-color: var(--c); } .ba-bdl .alert-link::after { content: ' →'; } .ba-bdl .alert--compact { padding: 11px 18px; display: flex; align-items: center; gap: 14px; } .ba-bdl .alert--compact .compact-type { font-family: 'Geist Mono', monospace; font-size: 9.5px; font-weight: 500; letter-spacing: 0.18em; text-transform: uppercase; color: var(--c); flex-shrink: 0; white-space: nowrap; } .ba-bdl .alert--compact .compact-text { font-size: 13.5px; font-weight: 300; color: var(--ba-bdl-muted); font-style: italic; line-height: 1.45; flex: 1; } .ba-bdl .alert--compact .compact-text strong { font-style: normal; font-weight: 600; color: var(--ba-bdl-ink); } .ba-bdl .alert--compact .compact-text code { font-family: 'Geist Mono', monospace; font-style: normal; font-size: 11px; background: var(--ba-bdl-faint); padding: 1px 4px; border-radius: 3px; } .ba-bdl .compact-divider { width: 1px; height: 16px; background: var(--ba-bdl-faint); flex-shrink: 0; } @media (prefers-reduced-motion: reduce) { .ba-bdl .card { animation: none; } } ``` ### 10. CSS Banner with Diagonal Slash Background **Type:** CSS + JS **Description:** Four diagonal-slash CSS banners in a bold geometric streetwear aesthetic — four distinct slash techniques side-by-side: a transform: skewX(-12deg) badge with red 40% OFF promo, a clip-path: polygon() angled purple fill on a New Feature card, a repeating-linear-gradient hazard-stripe system warning in amber, and a crisp linear-gradient(108deg) dark/yellow split with a live countdown timer (hours / minutes / seconds). Anton display + Rajdhani body. Best for promo banners, sale announcements, dev-tool warnings, attention-grabbing CTAs. **HTML:** ```html
// Diagonal slash banners
``` **CSS:** ```css /* ─── 10 Diagonal Slash Banner — bold geometric streetwear ─────── */ @import url('https://fonts.googleapis.com/css2?family=Anton&family=Rajdhani:wght@500;600;700&display=swap'); .ba-dgs { --ba-dgs-bg: #111; position: relative; width: 100%; min-height: 640px; background: var(--ba-dgs-bg); background-image: repeating-linear-gradient(-55deg, transparent 0px, transparent 18px, rgba(255,255,255,0.018) 18px, rgba(255,255,255,0.018) 19px); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px; padding: 48px 16px; font-family: 'Rajdhani', sans-serif; box-sizing: border-box; } .ba-dgs *, .ba-dgs *::before, .ba-dgs *::after { box-sizing: border-box; margin: 0; padding: 0; } .ba-dgs .section-mark { font-family: 'Rajdhani', sans-serif; font-size: 9px; font-weight: 600; letter-spacing: 0.3em; text-transform: uppercase; color: rgba(255,255,255,0.12); align-self: flex-start; max-width: 700px; width: 100%; } .ba-dgs .banner--promo { width: 100%; max-width: 700px; background: #f5f5f5; display: flex; align-items: stretch; overflow: hidden; height: 80px; position: relative; animation: ba-dgs-slideIn 0.45s ease 0.04s both; } .ba-dgs .slash-badge { position: relative; flex-shrink: 0; display: flex; align-items: center; justify-content: center; z-index: 1; padding: 0 40px 0 24px; } .ba-dgs .slash-badge::before { content: ''; position: absolute; inset: 0; background: #e11d48; transform: skewX(-12deg) scaleX(1.05); transform-origin: right; z-index: -1; } .ba-dgs .badge-text { font-family: 'Anton', sans-serif; font-size: 28px; color: white; letter-spacing: 0.04em; white-space: nowrap; line-height: 1; } .ba-dgs .badge-sub { font-size: 11px; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase; color: rgba(255,255,255,0.7); display: block; margin-top: 2px; text-align: center; } .ba-dgs .promo-content { flex: 1; display: flex; align-items: center; padding: 0 24px; gap: 24px; } .ba-dgs .promo-title { font-family: 'Anton', sans-serif; font-size: 24px; color: #111; letter-spacing: 0.02em; line-height: 1; flex: 1; } .ba-dgs .promo-title span { color: #e11d48; } .ba-dgs .promo-cta { font-size: 12px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; padding: 10px 20px; background: #111; color: white; border: none; cursor: pointer; clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%); transition: background 0.2s; white-space: nowrap; } .ba-dgs .promo-cta:hover { background: #e11d48; } .ba-dgs .banner--new { width: 100%; max-width: 700px; background: #0d0d0d; position: relative; overflow: hidden; padding: 0; height: 90px; display: flex; align-items: stretch; animation: ba-dgs-slideIn 0.45s ease 0.12s both; } .ba-dgs .new-fill { position: absolute; top: 0; left: 0; bottom: 0; width: 48%; background: linear-gradient(135deg, #7c3aed 0%, #4f46e5 100%); clip-path: polygon(0 0, 100% 0, 80% 100%, 0 100%); z-index: 0; } .ba-dgs .new-left { position: relative; z-index: 1; display: flex; align-items: center; gap: 14px; padding: 0 0 0 24px; width: 44%; } .ba-dgs .new-label { font-family: 'Anton', sans-serif; font-size: 13px; letter-spacing: 0.22em; color: rgba(255,255,255,0.85); white-space: nowrap; } .ba-dgs .new-divider { width: 2px; height: 40px; background: rgba(255,255,255,0.25); flex-shrink: 0; } .ba-dgs .new-headline { font-family: 'Anton', sans-serif; font-size: 22px; color: white; letter-spacing: 0.04em; line-height: 1; flex: 1; } .ba-dgs .new-right { flex: 1; display: flex; align-items: center; padding: 0 24px; position: relative; z-index: 1; } .ba-dgs .new-desc { font-size: 13px; font-weight: 500; color: rgba(255,255,255,0.5); line-height: 1.55; max-width: 280px; } .ba-dgs .new-btn { margin-left: auto; font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; padding: 9px 18px; background: transparent; color: white; border: 1.5px solid rgba(255,255,255,0.25); cursor: pointer; transition: all 0.2s; white-space: nowrap; clip-path: polygon(6px 0, 100% 0, calc(100% - 6px) 100%, 0 100%); } .ba-dgs .new-btn:hover { border-color: rgba(255,255,255,0.7); background: rgba(255,255,255,0.06); } .ba-dgs .banner--system { width: 100%; max-width: 700px; position: relative; overflow: hidden; background: #1a0a00; padding: 18px 24px; display: flex; align-items: center; gap: 20px; animation: ba-dgs-slideIn 0.45s ease 0.20s both; } .ba-dgs .banner--system::before { content: ''; position: absolute; inset: 0; background-image: repeating-linear-gradient(-52deg, rgba(234,88,12,0.12) 0px, rgba(234,88,12,0.12) 12px, transparent 12px, transparent 28px); pointer-events: none; } .ba-dgs .system-icon { flex-shrink: 0; width: 44px; height: 44px; background: #ea580c; clip-path: polygon(50% 0%, 100% 100%, 0 100%); display: flex; align-items: flex-end; justify-content: center; padding-bottom: 4px; position: relative; z-index: 1; } .ba-dgs .system-icon svg { width: 16px; height: 16px; color: white; } .ba-dgs .system-body { flex: 1; position: relative; z-index: 1; } .ba-dgs .system-title { font-family: 'Anton', sans-serif; font-size: 18px; color: #fb923c; letter-spacing: 0.06em; line-height: 1; margin-bottom: 4px; } .ba-dgs .system-desc { font-size: 13px; font-weight: 500; color: rgba(251,146,60,0.6); line-height: 1.5; } .ba-dgs .system-timestamp { font-family: 'Courier New', monospace; font-size: 10px; color: rgba(234,88,12,0.5); letter-spacing: 0.1em; white-space: nowrap; flex-shrink: 0; position: relative; z-index: 1; } .ba-dgs .banner--countdown { width: 100%; max-width: 700px; background: linear-gradient(108deg, #0f172a 0%, #0f172a 52%, #facc15 52%, #fef08a 100%); height: 76px; display: flex; align-items: center; overflow: hidden; position: relative; animation: ba-dgs-slideIn 0.45s ease 0.28s both; } .ba-dgs .countdown-left { flex: 1; padding: 0 0 0 28px; display: flex; align-items: center; gap: 14px; } .ba-dgs .countdown-tag { font-family: 'Anton', sans-serif; font-size: 11px; letter-spacing: 0.25em; color: rgba(255,255,255,0.4); text-transform: uppercase; } .ba-dgs .countdown-title { font-family: 'Anton', sans-serif; font-size: 22px; color: white; letter-spacing: 0.04em; line-height: 1; } .ba-dgs .countdown-right { width: 48%; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 0 28px; } .ba-dgs .cd-unit { text-align: center; } .ba-dgs .cd-num { font-family: 'Anton', sans-serif; font-size: 32px; color: #0f172a; line-height: 1; letter-spacing: -0.01em; } .ba-dgs .cd-label { font-size: 8px; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; color: rgba(15,23,42,0.5); margin-top: 1px; } .ba-dgs .cd-colon { font-family: 'Anton', sans-serif; font-size: 28px; color: rgba(15,23,42,0.35); line-height: 1; margin-top: -6px; } @keyframes ba-dgs-slideIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } } @media (prefers-reduced-motion: reduce) { .ba-dgs > div { animation: none; } } ``` **JS:** ```js (() => { const root = document.querySelector('.ba-dgs'); if (!root) return; const h = root.querySelector('[data-ba-dgs-h]'); const m = root.querySelector('[data-ba-dgs-m]'); const s = root.querySelector('[data-ba-dgs-s]'); if (!h || !m || !s) return; const end = Date.now() + 8 * 3600000 + 34 * 60000 + 17000; const pad = (n) => String(n).padStart(2, '0'); function tick() { const diff = Math.max(0, end - Date.now()); h.textContent = pad(Math.floor(diff / 3600000)); m.textContent = pad(Math.floor((diff % 3600000) / 60000)); s.textContent = pad(Math.floor((diff % 60000) / 1000)); } tick(); const id = setInterval(tick, 1000); root._baDgsTimer = id; })(); ``` ### 11. Responsive Full Width Hero Banner CSS **Type:** Pure CSS **Description:** Three responsive full-width CSS hero banners stacked in completely different colour worlds — a dark cinematic mesh-gradient hero (Build faster / Ship bold) with grain texture overlay + glow eyebrow dot, a warm amber summer-collection hero, and a monochrome paper-grid hero for an open-source utility — all using clamp() for fluid typography throughout so no media queries are needed for type scaling. Each hero stacks gracefully to mobile. Unbounded + Outfit. Best for marketing landing pages, product launches, agency homepages, brand hero sections. **HTML:** ```html
New — Launching today

Build
faster.
Ship bold.

The platform that scales from prototype to production without the complexity. One workflow, infinite possibilities.

Summer collection

Made
for the
season.

Thoughtfully designed pieces crafted from sustainable materials. Limited run — once they're gone, they're gone.

Open source

Simple.
Precise.
Fast.

A zero-dependency CSS utility library with a 4 KB footprint. No build step. No configuration. Just drop it in and go.

``` **CSS:** ```css /* ─── 11 Responsive Full Width Hero Banner — cinematic ────────── */ @import url('https://fonts.googleapis.com/css2?family=Unbounded:wght@300;400;700;900&family=Outfit:wght@300;400;500&display=swap'); .ba-hro { position: relative; width: 100%; min-height: 1200px; font-family: 'Outfit', sans-serif; background: #050505; color: #fff; display: flex; flex-direction: column; overflow: hidden; box-sizing: border-box; } .ba-hro *, .ba-hro *::before, .ba-hro *::after { box-sizing: border-box; margin: 0; padding: 0; } .ba-hro .hero { position: relative; width: 100%; min-height: 540px; display: flex; align-items: center; overflow: hidden; animation: ba-hro-fade 0.8s ease both; } .ba-hro .hero--warm { animation-delay: 0.15s; } .ba-hro .hero--mono { animation-delay: 0.3s; } @keyframes ba-hro-fade { from { opacity: 0; } to { opacity: 1; } } .ba-hro .hero-bg { position: absolute; inset: 0; z-index: 0; } .ba-hro .hero--dark .hero-bg { background: radial-gradient(ellipse 80% 60% at 70% 40%, rgba(99,102,241,0.35) 0%, transparent 60%), radial-gradient(ellipse 50% 50% at 20% 70%, rgba(236,72,153,0.2) 0%, transparent 55%), radial-gradient(ellipse 60% 40% at 80% 80%, rgba(6,182,212,0.15) 0%, transparent 50%), linear-gradient(160deg, #050510 0%, #0a0a1a 50%, #050505 100%); } .ba-hro .hero--dark .hero-bg::after { content: ''; position: absolute; inset: 0; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='400'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='400' height='400' filter='url(%23n)' opacity='0.06'/%3E%3C/svg%3E"); pointer-events: none; mix-blend-mode: screen; } .ba-hro .hero--dark .hero-bg::before { content: ''; 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: 80px 80px; mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, black, transparent); } .ba-hro .hero-content { position: relative; z-index: 1; width: 100%; max-width: 1200px; margin: 0 auto; padding: clamp(60px, 10vw, 120px) clamp(24px, 6vw, 80px); } .ba-hro .hero-eyebrow { display: inline-flex; align-items: center; gap: 10px; font-size: clamp(10px, 1.2vw, 12px); font-weight: 500; letter-spacing: 0.3em; text-transform: uppercase; color: rgba(255,255,255,0.5); margin-bottom: clamp(20px, 3vw, 32px); } .ba-hro .hero-eyebrow-dot { width: 6px; height: 6px; border-radius: 50%; background: #6366f1; animation: ba-hro-glow 2s ease-in-out infinite; } @keyframes ba-hro-glow { 0%,100% { box-shadow: 0 0 0 0 rgba(99,102,241,0.5); } 50% { box-shadow: 0 0 0 6px rgba(99,102,241,0); } } .ba-hro .hero-title { font-family: 'Unbounded', sans-serif; font-size: clamp(36px, 7vw, 96px); font-weight: 900; line-height: 1.0; letter-spacing: -0.02em; margin-bottom: clamp(20px, 3vw, 28px); max-width: 11ch; } .ba-hro .hero-title .accent { color: #6366f1; } .ba-hro .hero-title .thin { font-weight: 300; } .ba-hro .hero-desc { font-size: clamp(14px, 1.8vw, 18px); font-weight: 300; color: rgba(255,255,255,0.55); line-height: 1.75; max-width: 480px; margin-bottom: clamp(32px, 5vw, 48px); } .ba-hro .hero-actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; } .ba-hro .btn-hero-primary { font-size: clamp(12px, 1.3vw, 14px); font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; padding: clamp(12px, 1.8vw, 16px) clamp(24px, 3.5vw, 36px); background: white; color: #050510; border: none; border-radius: 4px; cursor: pointer; transition: all 0.22s ease; text-decoration: none; display: inline-block; } .ba-hro .btn-hero-primary:hover { background: #6366f1; color: white; transform: translateY(-2px); box-shadow: 0 8px 32px rgba(99,102,241,0.4); } .ba-hro .btn-hero-ghost { font-size: clamp(12px, 1.3vw, 14px); font-weight: 400; letter-spacing: 0.06em; color: rgba(255,255,255,0.6); background: transparent; text-decoration: none; transition: color 0.2s; display: flex; align-items: center; gap: 6px; } .ba-hro .btn-hero-ghost svg { width: 16px; height: 16px; } .ba-hro .btn-hero-ghost:hover { color: white; } .ba-hro .hero--warm { color: #111; } .ba-hro .hero--warm .hero-bg { background: radial-gradient(ellipse 60% 50% at 90% 20%, rgba(251,191,36,0.4) 0%, transparent 55%), radial-gradient(ellipse 50% 60% at 10% 90%, rgba(249,115,22,0.25) 0%, transparent 50%), linear-gradient(160deg, #fffbf0 0%, #fef3c7 50%, #fff8ed 100%); } .ba-hro .hero--warm .hero-eyebrow { color: rgba(17,17,17,0.4); } .ba-hro .hero--warm .hero-eyebrow-dot { background: #f59e0b; animation: none; box-shadow: none; } .ba-hro .hero--warm .hero-title { color: #111; } .ba-hro .hero--warm .hero-title .accent { color: #ea580c; } .ba-hro .hero--warm .hero-desc { color: rgba(17,17,17,0.5); } .ba-hro .hero--warm .btn-hero-primary { background: #111; color: white; } .ba-hro .hero--warm .btn-hero-primary:hover { background: #ea580c; box-shadow: 0 8px 32px rgba(234,88,12,0.3); } .ba-hro .hero--warm .btn-hero-ghost { color: rgba(17,17,17,0.5); } .ba-hro .hero--warm .btn-hero-ghost:hover { color: #111; } .ba-hro .hero--mono { background: #fff; color: #111; } .ba-hro .hero--mono .hero-bg { background: #fff; background-image: repeating-linear-gradient(0deg, transparent, transparent 47px, rgba(0,0,0,0.04) 47px, rgba(0,0,0,0.04) 48px); } .ba-hro .hero--mono .hero-eyebrow { color: rgba(17,17,17,0.35); } .ba-hro .hero--mono .hero-eyebrow-dot { background: #111; animation: none; box-shadow: none; } .ba-hro .hero--mono .hero-title { color: #111; } .ba-hro .hero--mono .hero-title .accent { -webkit-text-stroke: 1px #111; color: transparent; } .ba-hro .hero--mono .hero-desc { color: rgba(17,17,17,0.45); } .ba-hro .hero--mono .btn-hero-primary { background: #111; color: white; border-radius: 2px; } .ba-hro .hero--mono .btn-hero-primary:hover { background: #333; box-shadow: none; } .ba-hro .hero--mono .btn-hero-ghost { color: rgba(17,17,17,0.45); } @media (prefers-reduced-motion: reduce) { .ba-hro .hero, .ba-hro .hero-eyebrow-dot { animation: none !important; } } ``` ### 12. CSS Gradient Animated Border Alert **Type:** CSS + JS **Description:** Three CSS gradient-animated border alerts in a web3 / iridescent holographic aesthetic — three techniques side-by-side: a @property --angle conic-gradient spinning border with blurred glow bloom (Premium plan upgrade), a background-position shifting linear gradient for maximum browser support (AI-Powered suggestions card), and an SVG stroke-dashoffset animation driven by ResizeObserver (v6.0 New Release card). Each card has a badge + title + body + dual-action footer. Space Grotesk + Space Mono. Best for web3 sites, AI / ML products, premium upgrade prompts, web3 dashboards. **HTML:** ```html
// method 1 — @property conic-gradient spin
✦ Premium
Your plan has been upgraded.
Welcome to Pro. Unlimited API requests, priority support, and access to experimental features are now active on your account.
// method 2 — background-position shift
⬡ AI-Powered
Smart suggestions are now active.
The AI model has analysed 2,400 patterns in your codebase and is ready to suggest completions, catch bugs, and explain complex logic inline.
// method 3 — SVG stroke-dashoffset
◈ New Release
v6.0 is available — major update.
This release brings a redesigned query builder, a 40% reduction in bundle size, and full TypeScript 5.4 support. Review the migration guide before upgrading.
``` **CSS:** ```css /* ─── 12 Gradient Animated Border Alert — holographic ─────────── */ @import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&family=Space+Mono:wght@400;700&display=swap'); @property --ba-grd-angle { syntax: ''; initial-value: 0deg; inherits: false; } .ba-grd { --ba-grd-bg: #06060e; --ba-grd-card: #0d0d1a; --ba-grd-text: #e8e8ff; --ba-grd-muted: rgba(232,232,255,0.45); --ba-grd-g1: #7c3aed; --ba-grd-g2: #db2777; --ba-grd-g3: #0ea5e9; --ba-grd-g4: #10b981; --ba-grd-g5: #f59e0b; --ba-grd-border-size: 2px; --ba-grd-radius: 14px; position: relative; width: 100%; min-height: 920px; background: var(--ba-grd-bg); background-image: radial-gradient(ellipse 60% 40% at 50% 0%, rgba(124,58,237,0.12) 0%, transparent 60%); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 24px; padding: 60px 20px; font-family: 'Space Grotesk', sans-serif; color: var(--ba-grd-text); box-sizing: border-box; } .ba-grd *, .ba-grd *::before, .ba-grd *::after { box-sizing: border-box; margin: 0; padding: 0; } .ba-grd .label { font-family: 'Space Mono', monospace; font-size: 9px; letter-spacing: 0.25em; text-transform: uppercase; color: rgba(255,255,255,0.14); align-self: flex-start; max-width: 580px; width: 100%; } .ba-grd .gcard-wrap { position: relative; border-radius: var(--ba-grd-radius); padding: var(--ba-grd-border-size); background: conic-gradient(from var(--ba-grd-angle, 0deg), var(--ba-grd-g1), var(--ba-grd-g2), var(--ba-grd-g3), var(--ba-grd-g4), var(--ba-grd-g5), var(--ba-grd-g1)); animation: ba-grd-spin 3s linear infinite; max-width: 580px; width: 100%; } @keyframes ba-grd-spin { to { --ba-grd-angle: 360deg; } } .ba-grd .gcard-wrap::before { content: ''; position: absolute; inset: -4px; border-radius: calc(var(--ba-grd-radius) + 4px); background: inherit; filter: blur(16px); opacity: 0.45; z-index: -1; } .ba-grd .gcard { background: var(--ba-grd-card); border-radius: calc(var(--ba-grd-radius) - var(--ba-grd-border-size)); padding: 24px 26px; position: relative; overflow: hidden; } .ba-grd .gcard::before { content: ''; position: absolute; inset: 0; background: linear-gradient(135deg, rgba(255,255,255,0.04) 0%, transparent 40%, rgba(255,255,255,0.02) 100%); pointer-events: none; border-radius: inherit; } .ba-grd .gcard-wrap--linear { background-size: 300% 300%; background-image: linear-gradient(130deg, var(--ba-grd-g3), var(--ba-grd-g1), var(--ba-grd-g2), var(--ba-grd-g3), var(--ba-grd-g4), var(--ba-grd-g1)); animation: ba-grd-shift 4s linear infinite; } @keyframes ba-grd-shift { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } } .ba-grd .gcard-wrap--dash { background: none; animation: none; padding: 0; position: relative; } .ba-grd .gcard-wrap--dash::before { display: none; } .ba-grd .gcard-wrap--dash .gcard { border-radius: var(--ba-grd-radius); position: relative; z-index: 1; border: 2px solid transparent; background-clip: padding-box; background: var(--ba-grd-card); } .ba-grd .dash-svg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; border-radius: var(--ba-grd-radius); overflow: visible; } .ba-grd .dash-rect { fill: none; stroke: url(#ba-grd-dashGrad); stroke-width: 2; stroke-dasharray: 12 6; animation: ba-grd-dashMove 1.5s linear infinite; } @keyframes ba-grd-dashMove { to { stroke-dashoffset: -36; } } .ba-grd .card-eyebrow { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; } .ba-grd .card-badge { font-family: 'Space Mono', monospace; font-size: 9px; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; padding: 3px 8px; border-radius: 4px; background: rgba(124,58,237,0.15); border: 1px solid rgba(124,58,237,0.3); color: #a78bfa; } .ba-grd .card-badge--blue { background: rgba(14,165,233,0.12); border-color: rgba(14,165,233,0.3); color: #38bdf8; } .ba-grd .card-badge--green { background: rgba(16,185,129,0.12); border-color: rgba(16,185,129,0.3); color: #34d399; } .ba-grd .card-live { width: 7px; height: 7px; border-radius: 50%; background: #10b981; animation: ba-grd-liveDot 1.5s ease-in-out infinite; flex-shrink: 0; margin-left: auto; } @keyframes ba-grd-liveDot { 0%,100% { opacity: 1; } 50% { opacity: 0.3; } } .ba-grd .card-title { font-size: 18px; font-weight: 700; color: var(--ba-grd-text); line-height: 1.3; margin-bottom: 8px; letter-spacing: -0.01em; } .ba-grd .card-body { font-size: 13.5px; font-weight: 400; color: var(--ba-grd-muted); line-height: 1.7; margin-bottom: 18px; } .ba-grd .card-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; } .ba-grd .btn-primary { font-family: 'Space Grotesk', sans-serif; font-size: 12px; font-weight: 600; letter-spacing: 0.06em; padding: 9px 18px; background: linear-gradient(135deg, var(--ba-grd-g1), var(--ba-grd-g2)); color: white; border: none; border-radius: 8px; cursor: pointer; transition: all 0.2s; } .ba-grd .btn-primary:hover { opacity: 0.88; transform: translateY(-1px); box-shadow: 0 4px 20px rgba(124,58,237,0.4); } .ba-grd .btn-ghost { font-family: 'Space Mono', monospace; font-size: 11px; color: var(--ba-grd-muted); background: transparent; border: none; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; transition: color 0.18s; } .ba-grd .btn-ghost:hover { color: var(--ba-grd-text); } @media (prefers-reduced-motion: reduce) { .ba-grd .gcard-wrap, .ba-grd .card-live, .ba-grd .dash-rect { animation: none !important; } } ``` **JS:** ```js (() => { const root = document.querySelector('.ba-grd'); if (!root) return; const wrap = root.querySelector('[data-ba-grd-dash]'); if (!wrap) return; const svg = wrap.querySelector('svg.dash-svg'); if (!svg || !('ResizeObserver' in window)) return; const ro = new ResizeObserver((entries) => { for (const e of entries) { const { width, height } = e.contentRect; if (!width || !height) continue; const r = 14, s = 2; svg.setAttribute('viewBox', '0 0 ' + width + ' ' + height); svg.setAttribute('width', width); svg.setAttribute('height', height); const existing = svg.querySelector('rect.dash-rect'); if (existing) existing.remove(); const rect = document.createElementNS('http://www.w3.org/2000/svg', 'rect'); rect.setAttribute('x', s / 2); rect.setAttribute('y', s / 2); rect.setAttribute('width', width - s); rect.setAttribute('height', height - s); rect.setAttribute('rx', r); rect.setAttribute('ry', r); rect.setAttribute('class', 'dash-rect'); svg.appendChild(rect); } }); ro.observe(wrap); })(); ``` ### 13. Material Design Floating Alert Card **Type:** Pure CSS **Description:** Material Design floating alert cards in an authentic Material You aesthetic — tactile physical depth via dual-layer shadows (ambient + directional), tinted icon containers using color-mix(), pill-shaped buttons with transparent ::after ripple overlay, coloured top strip for semantic indication, and a full semantic set (Error / Success / Warning / Info / Primary). Plus a dark Snackbar variant with an Undo action. DM Sans + Roboto Mono. Best for Material You apps, Android-inspired web UIs, Material 3 design systems, mobile-first web apps. **HTML:** ```html
// Material You alert cards
Error · Authentication
Sign-in failed
Your session has expired or the credentials provided are incorrect. Please sign in again to continue.
Confirmed · Payment
Order placed successfully
Order #ORD-88214 has been confirmed. Your package will be dispatched within 1 business day.
Warning · Storage
Storage limit almost reached
You've used 4.7 GB of your 5 GB quota. Manage files or upgrade your plan to avoid disruption.
Info · Maintenance
Scheduled downtime this weekend
We'll be performing infrastructure upgrades Saturday 23:00–01:00 UTC.
New · Feature update
AI writing assistant is live
Smart autocomplete is now available in the editor. Start typing to see contextual suggestions powered by your writing style.
// Snackbar variant
Message sent · Archived to your sent folder.
``` **CSS:** ```css /* ─── 13 Material Design Floating Alert Card — Material You ─── */ @import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@300;400;500;700&family=Roboto+Mono:wght@400;500&display=swap'); .ba-mat { --ba-mat-background: #fef7ff; --ba-mat-surface: #fff; --ba-mat-surface-variant: #e7e0ec; --ba-mat-on-surface: #1c1b1f; --ba-mat-on-surface-variant: #49454f; --ba-mat-outline: #79747e; --ba-mat-outline-variant: #cac4d0; --ba-mat-primary: #6750a4; --ba-mat-primary-container: #eaddff; --ba-mat-error: #b3261e; --ba-mat-error-container: #f9dedc; --ba-mat-c-success: #386a20; --ba-mat-c-success-bg: #c5ecca; --ba-mat-c-warning: #6e4a00; --ba-mat-c-warning-bg: #ffddb5; --ba-mat-c-info: #0061a4; --ba-mat-c-info-bg: #d1e4ff; --ba-mat-elev-1: 0 1px 2px rgba(0,0,0,0.3), 0 1px 3px 1px rgba(0,0,0,0.15); --ba-mat-elev-2: 0 1px 2px rgba(0,0,0,0.3), 0 2px 6px 2px rgba(0,0,0,0.15); --ba-mat-elev-3: 0 4px 8px 3px rgba(0,0,0,0.15), 0 1px 3px rgba(0,0,0,0.3); --ba-mat-elev-4: 0 6px 10px 4px rgba(0,0,0,0.15), 0 2px 3px rgba(0,0,0,0.3); --ba-mat-radius-sm: 12px; --ba-mat-radius-md: 16px; --ba-mat-radius-full: 1000px; position: relative; width: 100%; min-height: 1000px; background: var(--ba-mat-background); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 60px 20px; font-family: 'Roboto', 'DM Sans', sans-serif; color: var(--ba-mat-on-surface); box-sizing: border-box; } .ba-mat *, .ba-mat *::before, .ba-mat *::after { box-sizing: border-box; margin: 0; padding: 0; } .ba-mat .label { font-family: 'Roboto Mono', monospace; font-size: 9px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--ba-mat-outline); opacity: 0.5; align-self: flex-start; max-width: 560px; width: 100%; } .ba-mat .label-spaced { margin-top: 8px; } .ba-mat .md-alert { width: 100%; max-width: 560px; background: var(--ba-mat-surface); border-radius: var(--ba-mat-radius-md); box-shadow: var(--ba-mat-elev-3); overflow: hidden; transition: box-shadow 0.25s, transform 0.25s; animation: ba-mat-in 0.35s cubic-bezier(0.05, 0.7, 0.1, 1.0) both; } .ba-mat .md-alert:hover { box-shadow: var(--ba-mat-elev-4); transform: translateY(-2px); } .ba-mat .md-alert:nth-child(2) { animation-delay: 0.0s; } .ba-mat .md-alert:nth-child(3) { animation-delay: 0.06s; } .ba-mat .md-alert:nth-child(4) { animation-delay: 0.12s; } .ba-mat .md-alert:nth-child(5) { animation-delay: 0.18s; } .ba-mat .md-alert:nth-child(6) { animation-delay: 0.24s; } @keyframes ba-mat-in { from { opacity: 0; transform: scale(0.94) translateY(8px); } to { opacity: 1; transform: scale(1) translateY(0); } } .ba-mat .md-alert-strip { height: 4px; width: 100%; } .ba-mat .md-alert-body { padding: 16px 16px 12px; display: flex; gap: 16px; align-items: flex-start; } .ba-mat .md-icon { flex-shrink: 0; width: 40px; height: 40px; border-radius: var(--ba-mat-radius-sm); display: flex; align-items: center; justify-content: center; } .ba-mat .md-icon svg { width: 24px; height: 24px; } .ba-mat .md-text { flex: 1; min-width: 0; } .ba-mat .md-supporting { font-family: 'DM Sans', sans-serif; font-size: 11px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ba-mat-on-surface-variant); margin-bottom: 4px; } .ba-mat .md-headline { font-family: 'DM Sans', sans-serif; font-size: 16px; font-weight: 500; color: var(--ba-mat-on-surface); line-height: 1.3; letter-spacing: 0.01em; margin-bottom: 6px; } .ba-mat .md-body-text { font-size: 13.5px; color: var(--ba-mat-on-surface-variant); line-height: 1.6; } .ba-mat .md-divider { height: 1px; background: var(--ba-mat-outline-variant); margin: 0 16px; } .ba-mat .md-actions { display: flex; align-items: center; justify-content: flex-end; gap: 4px; padding: 8px; } .ba-mat .md-btn { font-family: 'DM Sans', sans-serif; font-size: 13px; font-weight: 500; letter-spacing: 0.06em; padding: 8px 16px; border: none; border-radius: var(--ba-mat-radius-full); cursor: pointer; position: relative; overflow: hidden; transition: all 0.2s; background: transparent; } .ba-mat .md-btn::after { content: ''; position: absolute; inset: 0; background: currentColor; opacity: 0; transition: opacity 0.2s; border-radius: inherit; } .ba-mat .md-btn:hover::after { opacity: 0.08; } .ba-mat .md-btn:active::after { opacity: 0.16; } .ba-mat .md-btn--text { color: var(--ba-mat-on-surface-variant); } .ba-mat .md-btn--filled { padding: 8px 24px; color: white; box-shadow: var(--ba-mat-elev-1); } .ba-mat .md-btn--filled:hover { box-shadow: var(--ba-mat-elev-2); } .ba-mat .md-alert--error .md-alert-strip { background: var(--ba-mat-error); } .ba-mat .md-alert--error .md-icon { background: var(--ba-mat-error-container); color: var(--ba-mat-error); } .ba-mat .md-alert--error .md-btn--filled { background: var(--ba-mat-error); } .ba-mat .md-alert--error .md-btn--text { color: var(--ba-mat-error); } .ba-mat .md-alert--success .md-alert-strip { background: var(--ba-mat-c-success); } .ba-mat .md-alert--success .md-icon { background: var(--ba-mat-c-success-bg); color: var(--ba-mat-c-success); } .ba-mat .md-alert--success .md-btn--filled { background: var(--ba-mat-c-success); } .ba-mat .md-alert--success .md-btn--text { color: var(--ba-mat-c-success); } .ba-mat .md-alert--warning .md-alert-strip { background: var(--ba-mat-c-warning); } .ba-mat .md-alert--warning .md-icon { background: var(--ba-mat-c-warning-bg); color: var(--ba-mat-c-warning); } .ba-mat .md-alert--warning .md-btn--filled { background: var(--ba-mat-c-warning); } .ba-mat .md-alert--warning .md-btn--text { color: var(--ba-mat-c-warning); } .ba-mat .md-alert--info .md-alert-strip { background: var(--ba-mat-c-info); } .ba-mat .md-alert--info .md-icon { background: var(--ba-mat-c-info-bg); color: var(--ba-mat-c-info); } .ba-mat .md-alert--info .md-btn--filled { background: var(--ba-mat-c-info); } .ba-mat .md-alert--info .md-btn--text { color: var(--ba-mat-c-info); } .ba-mat .md-alert--primary .md-alert-strip { background: var(--ba-mat-primary); } .ba-mat .md-alert--primary .md-icon { background: var(--ba-mat-primary-container); color: var(--ba-mat-primary); } .ba-mat .md-alert--primary .md-btn--filled { background: var(--ba-mat-primary); } .ba-mat .md-alert--primary .md-btn--text { color: var(--ba-mat-primary); } .ba-mat .md-snack { width: 100%; max-width: 560px; background: #313033; border-radius: var(--ba-mat-radius-sm); box-shadow: var(--ba-mat-elev-3); padding: 12px 8px 12px 16px; display: flex; align-items: center; gap: 16px; animation: ba-mat-in 0.35s cubic-bezier(0.05, 0.7, 0.1, 1.0) 0.3s both; } .ba-mat .md-snack-text { flex: 1; font-size: 14px; font-weight: 400; color: #e6e1e5; line-height: 1.4; } .ba-mat .md-snack-action { font-family: 'DM Sans', sans-serif; font-size: 13px; font-weight: 500; color: #d0bcff; letter-spacing: 0.06em; background: transparent; border: none; border-radius: var(--ba-mat-radius-full); padding: 8px 12px; cursor: pointer; white-space: nowrap; } @media (prefers-reduced-motion: reduce) { .ba-mat .md-alert, .ba-mat .md-snack { animation: none; } } ``` ### 14. CSS Text Wrap Banner with Long Strings **Type:** Pure CSS **Description:** A CSS text-wrap banner demo in a developer terminal / GitHub-dark aesthetic — rendered as a real terminal window (traffic-light dots, title bar) with syntax-highlighted error log lines, side-by-side comparison of broken (truncated, white-space: nowrap) vs fixed (overflow-wrap: break-word applied) vs scrollable alternatives. The actual CSS rules are displayed in a syntax-highlighted code block inside the demo itself — copy-paste ready. Tests against real-world strings: long URLs, stack-trace paths, env values, JWT tokens. JetBrains Mono + Sora. Best for developer documentation, status pages, error log UIs, terminal-style displays. **HTML:** ```html
✓ correct — overflow-wrap applied
ERR_CERT_AUTHORITY_INVALID Failed to fetch resource at:
https://cdn.staging.acme-corp-internal.vercel.app/assets/fonts/GregorianDisplay-ExtraBold-VF-v4.2.1-webfont.woff2?v=1729472910&region=us-east&fallback=true&cache=immutable&host=edge
TypeError: Cannot read properties of undefined (reading 'map') at /home/runner/work/monorepo/packages/ui/src/components/DataGrid/VirtualizedRows/RowRenderer.tsx:148:22
ENV_PARSE_ERROR Malformed value in .env.production:
DATABASE_URL=postgres://admin:s3cr3tP@ssw0rd!2024@db-primary-replica-cluster.us-east-1.rds.amazonaws.com:5432/production_db_v3?sslmode=require&connect_timeout=10
JWT_DECODE_FAILURE Token received from Authorization: Bearer header could not be verified:
eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6InByaW1hcnkta2V5LTIwMjQtMDYifQ.eyJzdWIiOiJ1c3ItOTkxMjM0NTY3ODkwYWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXoiLCJpYXQiOjE3MjA0ODAwMDB9.INVALID
✕ comparison — no overflow-wrap (truncated)
ERR_CERT: https://cdn.staging.acme-corp-internal.vercel.app/assets/fonts/GregorianDisplay-ExtraBold-VF-v4.2.1-webfont.woff2?v=1729472910
~ scrollable — white-space: nowrap + overflow-x: auto
TRACE GET /api/v3/internal/users/usr-9912345/preferences/notifications/email/digest?locale=en-US&timezone=America%2FNew_York&format=json&include_archived=true → 200 in 1423ms
// the fix — CSS rules
.banner-message { min-width: 0; /* allow flex child to shrink */ overflow-wrap: break-word; /* break long tokens */ word-break: break-word; /* legacy alias */ white-space: pre-wrap; /* preserve \n, wrap normally */ hyphens: auto; /* optional: soft hyphens */ }
``` **CSS:** ```css /* ─── 14 Text Wrap Banner with Long Strings — terminal ───────── */ @import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,300;0,400;0,500;0,700;1,400&family=Sora:wght@400;600;700&display=swap'); .ba-twp { --ba-twp-bg: #0f1117; --ba-twp-surface: #161b22; --ba-twp-surface-2: #1c2128; --ba-twp-border: rgba(255,255,255,0.08); --ba-twp-text: #e6edf3; --ba-twp-muted: rgba(230,237,243,0.5); --ba-twp-green: #3fb950; --ba-twp-red: #f85149; --ba-twp-amber: #d29922; --ba-twp-blue: #58a6ff; --ba-twp-purple: #d2a8ff; position: relative; width: 100%; min-height: 720px; background: var(--ba-twp-bg); background-image: radial-gradient(ellipse 50% 30% at 50% 0%, rgba(88,166,255,0.06) 0%, transparent 60%); font-family: 'JetBrains Mono', monospace; color: var(--ba-twp-text); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 48px 16px; box-sizing: border-box; } .ba-twp *, .ba-twp *::before, .ba-twp *::after { box-sizing: border-box; margin: 0; padding: 0; } .ba-twp .terminal { width: 100%; max-width: 760px; background: var(--ba-twp-surface); border: 1px solid var(--ba-twp-border); border-radius: 10px; overflow: hidden; box-shadow: 0 16px 48px rgba(0,0,0,0.5); animation: ba-twp-up 0.5s ease both; } @keyframes ba-twp-up { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } } .ba-twp .terminal-bar { background: var(--ba-twp-surface-2); border-bottom: 1px solid var(--ba-twp-border); padding: 10px 16px; display: flex; align-items: center; gap: 8px; } .ba-twp .term-dot { width: 12px; height: 12px; border-radius: 50%; } .ba-twp .term-dot--close { background: #ff5f57; } .ba-twp .term-dot--min { background: #ffbd2e; } .ba-twp .term-dot--full { background: #28c840; } .ba-twp .term-title { flex: 1; text-align: center; font-size: 11px; font-weight: 500; color: rgba(255,255,255,0.35); letter-spacing: 0.06em; margin-right: 36px; } .ba-twp .alerts { padding: 0; display: flex; flex-direction: column; } .ba-twp .term-section { background: var(--ba-twp-bg); border-bottom: 1px solid var(--ba-twp-border); padding: 8px 20px; font-size: 9px; font-weight: 700; letter-spacing: 0.22em; text-transform: uppercase; color: rgba(255,255,255,0.2); display: flex; align-items: center; gap: 10px; } .ba-twp .term-section::after { content: ''; flex: 1; height: 1px; background: var(--ba-twp-border); } .ba-twp .alert-row { border-bottom: 1px solid var(--ba-twp-border); padding: 14px 20px; position: relative; display: flex; align-items: flex-start; gap: 12px; transition: background 0.15s; } .ba-twp .alert-row:last-child { border-bottom: none; } .ba-twp .alert-row:hover { background: rgba(255,255,255,0.02); } .ba-twp .alert-message { flex: 1; min-width: 0; overflow-wrap: break-word; word-break: break-word; -webkit-hyphens: auto; hyphens: auto; } .ba-twp .alert-message--broken { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .ba-twp .alert-message--broken-scroll { overflow-x: auto; white-space: nowrap; padding-bottom: 4px; } .ba-twp .alert-prefix { flex-shrink: 0; font-size: 11.5px; font-weight: 700; white-space: nowrap; padding-top: 1px; } .ba-twp .alert-text { font-size: 12.5px; font-weight: 400; line-height: 1.7; color: var(--ba-twp-muted); } .ba-twp .alert-text strong { font-weight: 700; color: var(--ba-twp-text); } .ba-twp .path { color: var(--ba-twp-blue); font-weight: 500; } .ba-twp .val { color: var(--ba-twp-green); } .ba-twp .err { color: var(--ba-twp-red); } .ba-twp .warn { color: var(--ba-twp-amber); } .ba-twp .key { color: var(--ba-twp-purple); } .ba-twp .line-num { flex-shrink: 0; font-size: 10px; color: rgba(255,255,255,0.18); user-select: none; padding-top: 2px; min-width: 20px; text-align: right; } .ba-twp .dot-err { color: var(--ba-twp-red); } .ba-twp .dot-ok { color: var(--ba-twp-green); } .ba-twp .dot-warn { color: var(--ba-twp-amber); } .ba-twp .dot-info { color: var(--ba-twp-blue); } .ba-twp .code-block { background: var(--ba-twp-bg); border: 1px solid var(--ba-twp-border); border-radius: 6px; padding: 14px 18px; margin: 12px 20px; font-size: 12px; line-height: 1.8; color: var(--ba-twp-muted); counter-reset: cline; } .ba-twp .cline { display: block; counter-increment: cline; padding-left: 32px; position: relative; } .ba-twp .cline::before { content: counter(cline); position: absolute; left: 0; width: 24px; text-align: right; color: rgba(255,255,255,0.15); font-size: 11px; user-select: none; } .ba-twp .c-selector { color: #79c0ff; } .ba-twp .c-property { color: #d2a8ff; } .ba-twp .c-value { color: #a5d6ff; } .ba-twp .c-comment { color: rgba(255,255,255,0.25); font-style: italic; } @media (prefers-reduced-motion: reduce) { .ba-twp .terminal { animation: none; } } ``` --- ## 19 CSS Blockquote Designs URL: https://codefronts.com/snippets/css-blockquotes/ Description: 19 hand-coded CSS blockquote designs — pull quotes, testimonials, speech bubbles, tweet style, newspaper drop-caps, code comments and more. Semantic HTML, copy-paste ready. Demo count: 19 ### 01. Classic Mark **Type:** Pure CSS **Description:** A large violet open-quote glyph rendered as a CSS pseudo-element above an italic body, with a thin left rule. The benchmark every blockquote is measured against. **HTML:** ```html

Design is not just what it looks like and feels like. Design is how it works.

— Steve Jobs
``` **CSS:** ```css .cbq-classic { position: relative; max-width: 360px; padding: 28px 28px 18px; background: #1a1a26; border-left: 3px solid #7c6cff; border-radius: 6px; font-family: Georgia, serif; color: #e9e7ff; } .cbq-classic::before { content: "\201C"; position: absolute; top: -10px; left: 14px; font-family: Georgia, serif; font-size: 64px; line-height: 1; color: #7c6cff; } .cbq-classic blockquote { margin: 0; } .cbq-classic p { margin: 0; font-size: 14px; line-height: 1.55; font-style: italic; } .cbq-classic figcaption { margin-top: 10px; font-size: 12px; color: #b8b6d4; font-style: normal; } ``` ### 02. Brutalist Stamp **Type:** Pure CSS **Description:** Hard-edged offset-shadow card with mono font and a hot-pink accent — zero radius, zero apology. Brutalist design system fixture. **HTML:** ```html

SHIP IT. THE DOCS CAN COME LATER.

— anonymous senior dev
``` **CSS:** ```css .cbq-brut { max-width: 320px; padding: 22px 22px 16px; background: #fff7ed; border: 2px solid #0a0a0a; box-shadow: 7px 7px 0 #ff3d6e; font-family: "Courier New", monospace; color: #0a0a0a; } .cbq-brut blockquote { margin: 0; } .cbq-brut p { margin: 0; font-size: 14px; font-weight: 700; letter-spacing: 0.02em; line-height: 1.45; } .cbq-brut figcaption { margin-top: 12px; font-size: 11px; text-transform: uppercase; letter-spacing: 0.12em; color: #ff3d6e; } ``` ### 03. Glass Card **Type:** Pure CSS **Description:** Frosted-glass shell on a soft gradient backdrop — translucent surface, subtle inner highlight, backdrop-filter blur. Perfect over hero images. **HTML:** ```html

The best UI is the one you don't notice.

— Lena Park, Product Designer
``` **CSS:** ```css .cbq-glass-bg { padding: 28px; border-radius: 14px; background: linear-gradient(135deg, #7c6cff 0%, #ff6c8a 50%, #2eb88a 100%); } .cbq-glass { max-width: 320px; padding: 22px; border-radius: 14px; background: rgba(255, 255, 255, 0.16); border: 1px solid rgba(255, 255, 255, 0.28); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35); color: #fff; font-family: system-ui, sans-serif; } .cbq-glass blockquote { margin: 0; } .cbq-glass p { margin: 0; font-size: 14px; font-weight: 500; line-height: 1.5; } .cbq-glass figcaption { margin-top: 12px; font-size: 11px; opacity: 0.85; } ``` ### 04. Neon Border **Type:** Pure CSS **Description:** Synthwave cyan glowing outline that pulses gently — built for dark dashboards, gaming UIs, and developer tools. **HTML:** ```html

Optimize for joy. The metrics will follow.

— k. tanaka, eng lead
``` **CSS:** ```css .cbq-neon { max-width: 320px; padding: 22px; background: #0a0a18; border: 1.5px solid #00e5ff; border-radius: 10px; box-shadow: 0 0 0 1px rgba(0, 229, 255, 0.2), 0 0 18px rgba(0, 229, 255, 0.35); color: #d8f7ff; font-family: ui-monospace, monospace; animation: cbq-neon-pulse 3.2s ease-in-out infinite; } .cbq-neon blockquote { margin: 0; } .cbq-neon p { margin: 0; font-size: 14px; line-height: 1.55; } .cbq-neon figcaption { margin-top: 12px; font-size: 11px; color: #00e5ff; letter-spacing: 0.06em; } @keyframes cbq-neon-pulse { 0%, 100% { box-shadow: 0 0 0 1px rgba(0, 229, 255, 0.2), 0 0 18px rgba(0, 229, 255, 0.35); } 50% { box-shadow: 0 0 0 1px rgba(0, 229, 255, 0.32), 0 0 26px rgba(0, 229, 255, 0.55); } } @media (prefers-reduced-motion: reduce) { .cbq-neon { animation: none !important; } } ``` ### 05. Pull Quote **Type:** Pure CSS **Description:** Magazine-style tabloid pull quote — large display font, tight leading, no rule. The kind editorial sites use to break up long-form articles. **HTML:** ```html

"Every line of code you don't write is a line of code that can't break."

From The Pragmatic Programmer
``` **CSS:** ```css .cbq-pull { max-width: 360px; padding: 18px 4px; font-family: Georgia, "Times New Roman", serif; color: #f5f5f5; } .cbq-pull blockquote { margin: 0; } .cbq-pull p { margin: 0; font-size: 26px; line-height: 1.18; font-weight: 700; letter-spacing: -0.01em; color: #f5f5f5; } .cbq-pull figcaption { margin-top: 14px; padding-top: 10px; border-top: 1px solid rgba(255, 255, 255, 0.18); font-size: 11px; color: #b8b6d4; text-transform: uppercase; letter-spacing: 0.14em; font-family: system-ui, sans-serif; } .cbq-pull cite { color: #c7c4ff; font-style: italic; text-transform: none; letter-spacing: 0; } ``` ### 06. Speech Bubble **Type:** Pure CSS **Description:** Chat-style rounded bubble with a tail pointing to the avatar. Common pattern for testimonial walls, support pages, and case studies. **HTML:** ```html

Codefronts cut my prototype time in half. Just snippets that work.

Aisha M. · frontend dev
``` **CSS:** ```css .cbq-speech { max-width: 320px; font-family: system-ui, sans-serif; } .cbq-speech-bubble { position: relative; padding: 16px 18px; background: #1f1f2e; border: 1px solid rgba(255, 255, 255, 0.07); border-radius: 16px 16px 16px 4px; color: #f0eeff; } .cbq-speech-bubble::before { content: ""; position: absolute; bottom: -6px; left: 18px; width: 12px; height: 12px; background: #1f1f2e; border-right: 1px solid rgba(255, 255, 255, 0.07); border-bottom: 1px solid rgba(255, 255, 255, 0.07); transform: rotate(45deg); } .cbq-speech-bubble blockquote { margin: 0; } .cbq-speech-bubble p { margin: 0; font-size: 13.5px; line-height: 1.55; } .cbq-speech-meta { display: flex; align-items: center; gap: 10px; margin-top: 16px; padding-left: 8px; font-size: 12px; color: #b8b6d4; } .cbq-speech-avatar { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%; background: linear-gradient(135deg, #7c6cff, #ff6c8a); font-weight: 700; font-size: 12px; color: #fff; } .cbq-speech-meta strong { color: #f0eeff; font-weight: 600; } ``` ### 07. Vertical Rail **Type:** Pure CSS **Description:** Thin gradient rail on the left edge that brightens on :hover — editorial restraint. Perfect for long-form articles with multiple call-out quotes. **HTML:** ```html

Constraints don't kill creativity — they sharpen it.

— Maya Chen
``` **CSS:** ```css .cbq-rail { max-width: 340px; padding: 14px 18px; position: relative; font-family: Georgia, serif; color: #e0deff; transition: padding-left 0.25s ease; } .cbq-rail::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: linear-gradient(180deg, #7c6cff, #2eb88a); border-radius: 3px; opacity: 0.5; transition: opacity 0.25s ease, width 0.25s ease; } .cbq-rail:hover::before { opacity: 1; width: 5px; } .cbq-rail blockquote { margin: 0; } .cbq-rail p { margin: 0; font-size: 16px; line-height: 1.5; font-style: italic; } .cbq-rail figcaption { margin-top: 10px; font-size: 12px; color: #b8b6d4; font-style: normal; } ``` ### 08. Testimonial Card **Type:** Pure CSS **Description:** Testimonial card with avatar, name, role, 5-star row and a soft shadow. Production-grade pattern for landing pages and case-study walls. **HTML:** ```html

"The component library I wished existed for years. Just works."

Jordan Rivera Senior Engineer · Stripe
``` **CSS:** ```css .cbq-stamp { max-width: 320px; padding: 22px; background: #18181f; border: 1px solid rgba(255, 255, 255, 0.07); border-radius: 16px; box-shadow: 0 8px 32px rgba(124, 108, 255, 0.08); font-family: system-ui, sans-serif; color: #f0eeff; } .cbq-stamp-stars { display: flex; gap: 2px; margin-bottom: 12px; color: #f5a84a; font-size: 14px; } .cbq-stamp blockquote { margin: 0 0 16px; } .cbq-stamp p { margin: 0; font-size: 14px; line-height: 1.5; } .cbq-stamp figcaption { display: flex; align-items: center; gap: 12px; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, 0.06); } .cbq-stamp-avatar { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 50%; background: linear-gradient(135deg, #7c6cff, #a78bfa); font-weight: 700; font-size: 13px; color: #fff; flex-shrink: 0; } .cbq-stamp-id { display: flex; flex-direction: column; gap: 2px; } .cbq-stamp-id strong { font-size: 13px; font-weight: 600; color: #f0eeff; } .cbq-stamp-id em { font-size: 11px; color: #b8b6d4; font-style: normal; } ``` ### 09. Highlighted Run **Type:** Pure CSS **Description:** Body text with a CSS mark-style highlight behind one punchy phrase — the editorial trick for drawing the eye to the key claim in a long quote. **HTML:** ```html

Most teams optimize for shipping faster when they should be optimizing for shipping smaller.

— Sara López, Engineering Manager
``` **CSS:** ```css .cbq-highlight { max-width: 360px; padding: 16px 4px; font-family: Georgia, serif; color: #e9e7ff; } .cbq-highlight blockquote { margin: 0; } .cbq-highlight p { margin: 0; font-size: 18px; line-height: 1.5; font-weight: 500; } .cbq-highlight mark { background: linear-gradient(180deg, transparent 55%, rgba(124, 108, 255, 0.55) 55%); color: inherit; padding: 0 2px; border-radius: 2px; } .cbq-highlight figcaption { margin-top: 12px; font-size: 12px; color: #b8b6d4; font-family: system-ui, sans-serif; } ``` ### 10. Marker Underline **Type:** Pure CSS **Description:** Hand-drawn-look uneven SVG underline applied beneath the punchy phrase — the personal-blog flourish that makes a quote feel handwritten. **HTML:** ```html

Make the change easy first, then make the easy change.

— Kent Beck
``` **CSS:** ```css .cbq-marker { max-width: 340px; padding: 14px 4px; font-family: Georgia, serif; color: #f0eeff; } .cbq-marker blockquote { margin: 0; } .cbq-marker p { margin: 0; font-size: 18px; line-height: 1.55; } .cbq-marker-line { position: relative; white-space: nowrap; color: #fff; font-weight: 600; } .cbq-marker-line::after { content: ""; position: absolute; left: -2px; right: -2px; bottom: -4px; height: 8px; background-image: url("data:image/svg+xml;utf8,"); background-repeat: no-repeat; background-size: 100% 100%; } .cbq-marker figcaption { margin-top: 12px; font-size: 12px; color: #b8b6d4; font-family: system-ui, sans-serif; } ``` ### 11. Drop Shadow Float **Type:** Pure CSS **Description:** Lifted card with a coloured shadow that intensifies on :hover — a subtle elevation cue that says this quote matters. Premium feel. **HTML:** ```html

"You can have the best engine in the world, but without a chassis it's just noise."

— Eli Tan, CTO
``` **CSS:** ```css .cbq-float { max-width: 320px; padding: 24px; background: #18181f; border-radius: 16px; border: 1px solid rgba(255, 255, 255, 0.07); box-shadow: 0 8px 24px rgba(124, 108, 255, 0.18); transform: translateY(0); transition: transform 0.25s ease, box-shadow 0.25s ease; font-family: system-ui, sans-serif; color: #f0eeff; } .cbq-float:hover { transform: translateY(-3px); box-shadow: 0 14px 36px rgba(124, 108, 255, 0.32); } .cbq-float blockquote { margin: 0; } .cbq-float p { margin: 0; font-size: 14px; line-height: 1.55; font-style: italic; } .cbq-float figcaption { margin-top: 14px; font-size: 12px; color: #a78bfa; } ``` ### 12. Aurora Drift **Type:** Pure CSS **Description:** Slow-drifting aurora gradient blob behind a glass quote surface — the premium-product accent variant. Honours prefers-reduced-motion. **HTML:** ```html

"Beauty in software is honesty rendered visible."

— Lin Wei
``` **CSS:** ```css .cbq-aurora { position: relative; max-width: 340px; padding: 28px; border-radius: 18px; background: #0d0d16; overflow: hidden; isolation: isolate; font-family: system-ui, sans-serif; } .cbq-aurora-blob { position: absolute; inset: -40%; background: radial-gradient(40% 40% at 30% 30%, rgba(124, 108, 255, 0.55), transparent 70%), radial-gradient(40% 40% at 70% 60%, rgba(255, 108, 138, 0.45), transparent 70%), radial-gradient(35% 35% at 50% 80%, rgba(46, 184, 138, 0.4), transparent 70%); filter: blur(8px); animation: cbq-aurora-drift 14s linear infinite; z-index: 0; } .cbq-aurora-card { position: relative; z-index: 1; padding: 18px; border-radius: 14px; background: rgba(13, 13, 22, 0.55); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border: 1px solid rgba(255, 255, 255, 0.1); color: #f0eeff; } .cbq-aurora blockquote { margin: 0; } .cbq-aurora p { margin: 0; font-size: 14.5px; line-height: 1.55; font-weight: 500; } .cbq-aurora figcaption { margin-top: 12px; font-size: 11px; color: rgba(240, 238, 255, 0.7); } @media (prefers-reduced-motion: reduce) { .cbq-aurora-blob { animation: none !important; } } @keyframes cbq-aurora-drift { 0% { transform: translate(0, 0) rotate(0deg); } 50% { transform: translate(4%, -4%) rotate(180deg); } 100% { transform: translate(0, 0) rotate(360deg); } } ``` ### 13. Tweet Style **Type:** Pure CSS **Description:** Twitter/X-styled callout — bird/X icon, name, handle, timestamp, and like/retweet glyphs. Native to dev audiences and a great social-proof pattern. **HTML:** ```html
Dana M. @danamcode · 2h

I would rather read codefronts than write CSS from scratch in 2026, and that's a hill I'm willing to die on.

💬 42 🔁 231 ♡ 1.2k
``` **CSS:** ```css .cbq-tweet { max-width: 340px; padding: 14px 16px; background: #15151d; border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 14px; font-family: system-ui, sans-serif; color: #e7e9ea; } .cbq-tweet-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; } .cbq-tweet-avatar { width: 36px; height: 36px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #7c6cff, #2eb88a); font-size: 12px; font-weight: 700; color: #fff; flex-shrink: 0; } .cbq-tweet-id { display: flex; flex-direction: column; flex: 1; min-width: 0; } .cbq-tweet-id strong { font-size: 13.5px; font-weight: 700; color: #fff; } .cbq-tweet-id em { font-size: 12px; color: #71767b; font-style: normal; } .cbq-tweet-x { width: 18px; height: 18px; color: #fff; flex-shrink: 0; } .cbq-tweet blockquote { margin: 0 0 10px; } .cbq-tweet p { margin: 0; font-size: 14px; line-height: 1.45; } .cbq-tweet-foot { display: flex; gap: 18px; font-size: 12px; color: #71767b; } ``` ### 14. Newspaper **Type:** Pure CSS **Description:** Serif typeface, justified text, drop-cap on the first letter — old-school broadsheet feel. Pairs with editorial themes and longform pages. **HTML:** ```html

Software is a love letter to the future, written in the dialect of the present. Each abstraction we choose narrows what tomorrow can say.

— The Architect's Notebook, Vol. 3
``` **CSS:** ```css .cbq-news { max-width: 360px; padding: 18px 6px; font-family: Georgia, "Times New Roman", serif; color: #f5f5f5; } .cbq-news blockquote { margin: 0; } .cbq-news p { margin: 0; font-size: 14.5px; line-height: 1.6; text-align: justify; hyphens: auto; } .cbq-news p::first-letter { float: left; font-size: 48px; line-height: 0.95; padding: 4px 8px 0 0; font-weight: 700; color: #ffd479; } .cbq-news figcaption { margin-top: 14px; font-size: 11px; color: #b8b6d4; font-style: italic; text-align: right; } ``` ### 15. Code Comment **Type:** Pure CSS **Description:** Quote styled as a code-comment block — mono font, dim grey "filename:line" header, // prefix on each line. Perfect for dev portfolios and engineering blogs. **HTML:** ```html
manifesto.js · ln 12

// Don't write code that's so clever
// that you can't debug it at 3am

— Brian Kernighan
``` **CSS:** ```css .cbq-code { max-width: 360px; background: #0d1117; border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 8px; overflow: hidden; font-family: ui-monospace, "SF Mono", monospace; color: #e6edf3; } .cbq-code-head { display: flex; align-items: center; gap: 8px; padding: 8px 14px; background: #161b22; border-bottom: 1px solid rgba(255, 255, 255, 0.06); } .cbq-code-dot { width: 10px; height: 10px; border-radius: 50%; background: #ff5f57; } .cbq-code-file { margin-left: 8px; font-size: 11px; color: #8b949e; } .cbq-code blockquote { margin: 0; padding: 16px 18px; } .cbq-code p { margin: 0; font-size: 13px; line-height: 1.65; color: #7c6cff; font-style: italic; } .cbq-code figcaption { padding: 6px 18px 12px; font-size: 11px; color: #8b949e; } ``` ### 16. Markdown Quote **Type:** Pure CSS **Description:** GitHub-style markdown blockquote — left rule, dim text, > prefix character — with a small MD pill in the corner. Native to the README aesthetic. **HTML:** ```html
MD

> The best abstractions are the ones you don't notice.

> The worst are the ones you can't avoid.

— from NOTES.md
``` **CSS:** ```css .cbq-md { position: relative; max-width: 340px; padding: 18px 18px 14px 22px; background: #0d1117; border-left: 4px solid #30363d; border-radius: 0 6px 6px 0; font-family: ui-monospace, monospace; color: #c9d1d9; } .cbq-md-pill { position: absolute; top: 8px; right: 10px; padding: 1px 6px; border-radius: 3px; background: rgba(124, 108, 255, 0.18); color: #a78bfa; font-size: 10px; font-weight: 700; letter-spacing: 0.06em; } .cbq-md blockquote { margin: 0; } .cbq-md p { margin: 0 0 6px; font-size: 13.5px; line-height: 1.55; } .cbq-md p:last-of-type { margin-bottom: 0; } .cbq-md-gt { color: #6e7681; margin-right: 6px; user-select: none; } .cbq-md figcaption { margin-top: 12px; font-size: 11px; color: #6e7681; } .cbq-md code { background: rgba(110, 118, 129, 0.4); padding: 1px 5px; border-radius: 3px; color: #c9d1d9; font-size: 11px; } ``` ### 17. Testimonial Carousel **Type:** Light JS **Description:** Three testimonials with dot pagination and arrow keys — auto-advances every 6s, pauses on hover/focus, uses aria-live=polite for screen-reader announcement. **HTML:** ```html

"It saves me hours every week."

— Aria S., Designer
``` **CSS:** ```css .cbq-car { max-width: 340px; padding: 24px 22px 18px; background: #18181f; border: 1px solid rgba(255, 255, 255, 0.07); border-radius: 16px; font-family: system-ui, sans-serif; color: #f0eeff; } .cbq-car-track { min-height: 90px; position: relative; } .cbq-car-slide blockquote { margin: 0 0 10px; } .cbq-car-slide p { margin: 0; font-size: 14.5px; line-height: 1.5; font-style: italic; } .cbq-car-slide figcaption { font-size: 12px; color: #a78bfa; } .cbq-car-slide[hidden] { display: none; } .cbq-car-dots { display: flex; gap: 6px; justify-content: center; margin-top: 14px; } .cbq-car-dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(255, 255, 255, 0.18); border: 0; padding: 0; cursor: pointer; transition: background 0.2s ease, transform 0.2s ease; } .cbq-car-dot:hover { background: rgba(255, 255, 255, 0.32); } .cbq-car-dot.is-active { background: #7c6cff; transform: scale(1.25); } .cbq-car-dot:focus-visible { outline: 2px solid #a78bfa; outline-offset: 2px; } ``` **JS:** ```js (function () { document.querySelectorAll(".cbq-car").forEach(function (root) { var slides = root.querySelectorAll(".cbq-car-slide"); var dots = root.querySelectorAll(".cbq-car-dot"); var idx = 0, timer = null; function show(i) { idx = (i + slides.length) % slides.length; slides.forEach(function (s, n) { if (n === idx) { s.removeAttribute("hidden"); s.classList.add("is-active"); } else { s.setAttribute("hidden", ""); s.classList.remove("is-active"); } }); dots.forEach(function (d, n) { var on = n === idx; d.classList.toggle("is-active", on); if (on) d.setAttribute("aria-current", "true"); else d.removeAttribute("aria-current"); }); } function start() { stop(); timer = setInterval(function () { show(idx + 1); }, 6000); } function stop() { if (timer) { clearInterval(timer); timer = null; } } dots.forEach(function (d, n) { d.addEventListener("click", function () { show(n); start(); }); }); root.addEventListener("mouseenter", stop); root.addEventListener("mouseleave", start); root.addEventListener("focusin", stop); root.addEventListener("focusout", start); root.addEventListener("keydown", function (e) { if (e.key === "ArrowRight") { e.preventDefault(); show(idx + 1); start(); } if (e.key === "ArrowLeft") { e.preventDefault(); show(idx - 1); start(); } }); if (!window.matchMedia("(prefers-reduced-motion: reduce)").matches) start(); }); })(); ``` ### 18. Click to Expand **Type:** Light JS **Description:** Long quote truncated with -webkit-line-clamp; a Read more button reveals the rest. aria-expanded reflects state for screen readers — the canonical truncate pattern. **HTML:** ```html

"Software engineering is not really about computers. It's about people: the people you build for, the people you build with, and the future-you who has to maintain whatever you ship today. Every line of code is a little contract with all of them."

— Jen Rodriguez, Staff Engineer
``` **CSS:** ```css .cbq-expand { max-width: 340px; padding: 22px; background: #18181f; border: 1px solid rgba(255, 255, 255, 0.07); border-radius: 14px; font-family: system-ui, sans-serif; color: #f0eeff; } .cbq-expand blockquote { margin: 0; } .cbq-expand-text { margin: 0; font-size: 14px; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; transition: -webkit-line-clamp 0.3s ease; } .cbq-expand-text.is-open { -webkit-line-clamp: 99; } .cbq-expand-btn { margin-top: 10px; padding: 4px 10px; background: transparent; color: #a78bfa; border: 1px solid rgba(167, 139, 250, 0.4); border-radius: 6px; font: inherit; font-size: 12px; cursor: pointer; transition: background 0.15s, border-color 0.15s; } .cbq-expand-btn:hover { background: rgba(167, 139, 250, 0.1); border-color: #a78bfa; } .cbq-expand-btn:focus-visible { outline: 2px solid #a78bfa; outline-offset: 2px; } .cbq-expand figcaption { margin-top: 14px; font-size: 12px; color: #b8b6d4; } ``` **JS:** ```js (function () { document.querySelectorAll(".cbq-expand").forEach(function (root) { var btn = root.querySelector(".cbq-expand-btn"); var text = root.querySelector(".cbq-expand-text"); if (!btn || !text) return; btn.addEventListener("click", function () { var open = text.classList.toggle("is-open"); btn.setAttribute("aria-expanded", String(open)); btn.textContent = open ? "Read less" : "Read more"; }); }); })(); ``` ### 19. Copy Quote **Type:** Light JS **Description:** Quote with a small Copy button that copies the text to the clipboard and flashes a Copied! confirmation — perfect for sharable design and engineering quote walls. **HTML:** ```html

"Premature optimization is the root of all evil."

— Donald Knuth
``` **CSS:** ```css .cbq-copy { position: relative; max-width: 340px; padding: 22px; background: #18181f; border: 1px solid rgba(255, 255, 255, 0.07); border-radius: 14px; font-family: system-ui, sans-serif; color: #f0eeff; } .cbq-copy-btn { position: absolute; top: 12px; right: 12px; display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; background: rgba(255, 255, 255, 0.04); color: #a78bfa; border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 6px; font: inherit; font-size: 11px; cursor: pointer; transition: background 0.15s, border-color 0.15s, color 0.15s; } .cbq-copy-btn:hover { background: rgba(167, 139, 250, 0.12); border-color: rgba(167, 139, 250, 0.45); } .cbq-copy-btn:focus-visible { outline: 2px solid #a78bfa; outline-offset: 2px; } .cbq-copy-btn.is-copied { color: #2ecc8a; border-color: rgba(46, 204, 138, 0.45); background: rgba(46, 204, 138, 0.08); } .cbq-copy-quote { margin: 0; padding-right: 56px; } .cbq-copy-quote p { margin: 0; font-size: 14.5px; line-height: 1.55; font-style: italic; } .cbq-copy figcaption { margin-top: 14px; font-size: 12px; color: #b8b6d4; } ``` **JS:** ```js (function () { document.querySelectorAll(".cbq-copy").forEach(function (root) { var btn = root.querySelector(".cbq-copy-btn"); var label = root.querySelector(".cbq-copy-label"); var quote = root.querySelector(".cbq-copy-quote"); if (!btn || !label || !quote) return; btn.addEventListener("click", function () { var text = quote.textContent.trim(); navigator.clipboard.writeText(text).then(function () { btn.classList.add("is-copied"); label.textContent = "Copied!"; setTimeout(function () { btn.classList.remove("is-copied"); label.textContent = "Copy"; }, 1600); }); }); }); })(); ``` --- ## 22 CSS Breadcrumbs URL: https://codefronts.com/navigation/css-breadcrumbs/ Description: 22 original CSS breadcrumb designs — underline grow, pill, diagonal slash, neon trail, brutalist, frosted glass, vertical stacked, progress track, holographic shimmer and more. Demo count: 22 ### 01. Underline Grow **Type:** Pure CSS **Description:** A gradient underline grows from left to right on hover. Current page uses a solid accent line. **HTML:** ```html ``` **CSS:** ```css .bc-01__list { display: flex; align-items: center; list-style: none; padding: 0; margin: 0; } .bc-01__item { display: flex; align-items: center; } .bc-01__item + .bc-01__item::before { content: "/"; padding: 0 12px; color: rgba(255, 255, 255, 0.2); font-size: 14px; } .bc-01__link { position: relative; font-size: 14px; font-weight: 500; color: rgba(255, 255, 255, 0.45); text-decoration: none; padding-bottom: 2px; transition: color 0.25s; } .bc-01__link::after { content: ""; position: absolute; bottom: 0; left: 0; width: 100%; height: 2px; border-radius: 1px; background: linear-gradient(90deg, #8b7fff, #ff6b9d); transform: scaleX(0); transform-origin: left; transition: transform 0.35s cubic-bezier(0.23, 1, 0.32, 1); } .bc-01__link:hover { color: rgba(255, 255, 255, 0.85); } .bc-01__link:hover::after { transform: scaleX(1); } .bc-01__link--cur { color: #fff; pointer-events: none; } .bc-01__link--cur::after { background: #8b7fff; transform: scaleX(1); } ``` ### 02. Pill Breadcrumbs **Type:** Pure CSS **Description:** Each crumb is a rounded pill. Hover blooms a background. Current page shows solid accent fill. **HTML:** ```html ``` **CSS:** ```css .bc-02__list { display: flex; align-items: center; gap: 4px; list-style: none; padding: 0; margin: 0; } .bc-02__sep { color: rgba(255, 255, 255, 0.2); font-size: 16px; user-select: none; padding: 0 2px; } .bc-02__link { padding: 5px 14px; border-radius: 50px; font-size: 13px; font-weight: 500; color: rgba(255, 255, 255, 0.45); text-decoration: none; display: block; transition: background 0.25s, color 0.25s; } .bc-02__link:hover { background: rgba(255, 255, 255, 0.08); color: rgba(255, 255, 255, 0.85); } .bc-02__link--cur { background: rgba(139, 127, 255, 0.18); color: #8b7fff; pointer-events: none; } ``` ### 03. Diagonal Slash **Type:** Pure CSS **Description:** Parallelogram-shaped crumbs using clip-path. Active fills with gradient; hover lifts slightly. **HTML:** ```html ``` **CSS:** ```css .bc-03__list { display: flex; list-style: none; padding: 0; margin: 0; gap: 2px; } .bc-03__link { display: block; padding: 8px 22px; font-size: 13px; font-weight: 600; color: rgba(255, 255, 255, 0.55); text-decoration: none; background: rgba(255, 255, 255, 0.05); clip-path: polygon(8px 0%, 100% 0%, calc(100% - 8px) 100%, 0% 100%); transition: background 0.25s, color 0.25s, transform 0.25s; } .bc-03__link:hover { background: rgba(255, 255, 255, 0.1); color: rgba(255, 255, 255, 0.85); transform: translateY(-2px); } .bc-03__link--cur { background: linear-gradient(135deg, #8b7fff, #ff6b9d); color: #fff; pointer-events: none; } ``` ### 04. Neon Trail **Type:** Pure CSS **Description:** Neon glow builds along each separator arrow. Current page pulses with a multi-layer glow. **HTML:** ```html ``` **CSS:** ```css .bc-04__list { display: flex; align-items: center; list-style: none; padding: 0; margin: 0; } .bc-04__item + .bc-04__item::before { content: "→"; padding: 0 10px; color: rgba(61, 232, 245, 0.25); font-size: 13px; transition: color 0.3s, text-shadow 0.3s; } .bc-04__item:hover + .bc-04__item::before, .bc-04__item + .bc-04__item:hover::before { color: #3de8f5; text-shadow: 0 0 8px #3de8f5; } .bc-04__link { font-size: 14px; font-weight: 500; color: rgba(255, 255, 255, 0.38); text-decoration: none; transition: color 0.25s, text-shadow 0.25s; } .bc-04__link:hover { color: #3de8f5; text-shadow: 0 0 10px rgba(61, 232, 245, 0.5); } .bc-04__link--cur { color: #3de8f5; pointer-events: none; text-shadow: 0 0 8px #3de8f5, 0 0 20px rgba(61, 232, 245, 0.4); } ``` ### 05. Brutalist Hard Shadow **Type:** Pure CSS **Description:** Hard offset box-shadows. Hover shifts the shadow. Current page inverts to a filled block. **HTML:** ```html ``` **CSS:** ```css .bc-05__list { display: flex; align-items: center; gap: 8px; list-style: none; padding: 0; margin: 0; } .bc-05__sep { color: rgba(255, 255, 255, 0.2); font-size: 12px; user-select: none; } .bc-05__link { display: block; padding: 6px 16px; border: 2px solid rgba(255, 255, 255, 0.6); font-size: 12px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(255, 255, 255, 0.55); text-decoration: none; box-shadow: 2px 2px 0 rgba(255, 255, 255, 0.4); transition: transform 0.1s, box-shadow 0.1s, background 0.1s, color 0.1s; } .bc-05__link:hover { transform: translate(-1px, -1px); box-shadow: 3px 3px 0 rgba(255, 255, 255, 0.5); color: #fff; } .bc-05__link--cur { background: #eeeaf8; color: #07070c; border-color: #eeeaf8; box-shadow: 2px 2px 0 rgba(139, 127, 255, 0.5); pointer-events: none; } ``` ### 06. Frosted Glass **Type:** Pure CSS **Description:** Glass pill breadcrumbs with backdrop-filter over a gradient background. **HTML:** ```html ``` **CSS:** ```css .bc-06 { background: radial-gradient(60% 120% at 20% 50%, rgba(139, 127, 255, 0.5), transparent), radial-gradient(50% 100% at 80% 50%, rgba(255, 107, 157, 0.4), transparent), #09090f; padding: 12px 16px; border-radius: 14px; } .bc-06__list { display: flex; align-items: center; gap: 0; list-style: none; padding: 0; margin: 0; } .bc-06__item + .bc-06__item::before { content: "/"; padding: 0 10px; color: rgba(255, 255, 255, 0.25); font-size: 13px; } .bc-06__link { padding: 5px 12px; border-radius: 8px; font-size: 13px; font-weight: 500; color: rgba(255, 255, 255, 0.55); text-decoration: none; border: 1px solid transparent; transition: backdrop-filter 0.3s, background 0.3s, border-color 0.3s, color 0.3s; } .bc-06__link:hover { background: rgba(255, 255, 255, 0.1); backdrop-filter: blur(12px); border-color: rgba(255, 255, 255, 0.15); color: #fff; } .bc-06__link--cur { background: rgba(255, 255, 255, 0.15); backdrop-filter: blur(16px); border-color: rgba(255, 255, 255, 0.25); color: #fff; pointer-events: none; } ``` ### 07. Vertical Stacked **Type:** Pure CSS **Description:** Vertical timeline-style breadcrumb with connecting dots and a glowing active indicator. **HTML:** ```html ``` **CSS:** ```css .bc-07__list { list-style: none; padding: 0; margin: 0 0 0 10px; display: flex; flex-direction: column; border-left: 1px solid rgba(255, 255, 255, 0.1); } .bc-07__item { display: flex; align-items: center; gap: 10px; padding: 8px 0; position: relative; } .bc-07__dot { width: 9px; height: 9px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.2); background: transparent; position: absolute; left: -5px; transition: border-color 0.3s, background 0.3s, box-shadow 0.3s; } .bc-07__item:hover .bc-07__dot { border-color: rgba(255, 255, 255, 0.6); } .bc-07__dot--cur { border-color: #8b7fff; background: #8b7fff; box-shadow: 0 0 10px rgba(139, 127, 255, 0.6); } .bc-07__link { padding-left: 18px; font-size: 13px; font-weight: 500; color: rgba(255, 255, 255, 0.38); text-decoration: none; transition: color 0.25s; } .bc-07__link:hover { color: rgba(255, 255, 255, 0.75); } .bc-07__link--cur { color: #fff; pointer-events: none; } ``` ### 08. Editorial Numbered **Type:** Pure CSS **Description:** Magazine-style numbered breadcrumbs. Active number swells; separator is a hairline rule. **HTML:** ```html ``` **CSS:** ```css .bc-08__list { display: flex; align-items: center; list-style: none; padding: 0; margin: 0; gap: 0; } .bc-08__item { display: flex; align-items: baseline; gap: 6px; } .bc-08__item + .bc-08__item { padding-left: 20px; margin-left: 20px; border-left: 1px solid rgba(255, 255, 255, 0.1); } .bc-08__num { font-family: monospace; font-size: 10px; font-weight: 700; color: rgba(255, 255, 255, 0.18); letter-spacing: 0.06em; transition: color 0.3s, font-size 0.35s cubic-bezier(0.23, 1, 0.32, 1); } .bc-08__num--cur { color: #8b7fff; font-size: 14px; } .bc-08__link { font-size: 14px; font-weight: 600; color: rgba(255, 255, 255, 0.38); text-decoration: none; transition: color 0.25s; } .bc-08__link:hover { color: rgba(255, 255, 255, 0.75); } .bc-08__link--cur { color: #fff; pointer-events: none; } ``` ### 09. Retro Terminal Path **Type:** Pure CSS **Description:** Unix path-style breadcrumbs with a blinking cursor — looks like navigating a filesystem. **HTML:** ```html ``` **CSS:** ```css .bc-09 { background: #050a00; border-radius: 8px; padding: 10px 16px; border: 1px solid rgba(30, 217, 138, 0.2); font-family: monospace; display: inline-block; } .bc-09__list { display: flex; align-items: center; list-style: none; padding: 0; margin: 0; gap: 0; } .bc-09__item { display: flex; align-items: center; } .bc-09__prompt { color: rgba(30, 217, 138, 0.5); margin-right: 4px; } .bc-09__sep { color: rgba(30, 217, 138, 0.3); padding: 0 2px; } .bc-09__link { font-size: 13px; color: rgba(30, 217, 138, 0.55); text-decoration: none; transition: color 0.2s; } .bc-09__link:hover { color: #1ed98a; } .bc-09__link--cur { color: #1ed98a; pointer-events: none; } .bc-09__cursor { color: #1ed98a; animation: bc09blink 0.7s step-end infinite; margin-left: 2px; } @keyframes bc09blink { 50% { opacity: 0; } } ``` ### 10. Gradient Text **Type:** Pure CSS **Description:** Each crumb shifts from muted grey to a full gradient on hover. Current page always shows the gradient. **HTML:** ```html ``` **CSS:** ```css .bc-10__list { display: flex; align-items: center; list-style: none; padding: 0; margin: 0; } .bc-10__item + .bc-10__item::before { content: "·"; padding: 0 12px; color: rgba(255, 255, 255, 0.2); font-size: 16px; } .bc-10__link { font-size: 14px; font-weight: 600; text-decoration: none; background: linear-gradient(90deg, #8b7fff, #ff6b9d, #3de8f5); -webkit-background-clip: text; background-clip: text; color: transparent; filter: grayscale(1) opacity(0.4); transition: filter 0.35s; } .bc-10__link:hover { filter: grayscale(0) opacity(1); } .bc-10__link--cur { filter: grayscale(0) opacity(1); pointer-events: none; } ``` ### 11. Chip with Icon **Type:** Pure CSS **Description:** Rounded chip breadcrumbs each with an icon. Active chip fills with accent gradient. **HTML:** ```html ``` **CSS:** ```css .bc-11__list { display: flex; align-items: center; list-style: none; padding: 0; margin: 0; gap: 6px; flex-wrap: wrap; } .bc-11__item { display: flex; align-items: center; } .bc-11__item + .bc-11__item::before { content: "›"; color: rgba(255, 255, 255, 0.2); font-size: 16px; margin-right: 6px; } .bc-11__link { display: flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 50px; border: 1px solid rgba(255, 255, 255, 0.1); background: rgba(255, 255, 255, 0.04); text-decoration: none; transition: background 0.25s, border-color 0.25s, transform 0.25s; } .bc-11__link:hover { background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.2); transform: translateY(-1px); } .bc-11__icon { font-size: 13px; color: rgba(255, 255, 255, 0.35); } .bc-11__text { font-size: 12px; font-weight: 600; color: rgba(255, 255, 255, 0.45); } .bc-11__link--cur { background: linear-gradient(135deg, #8b7fff, #ff6b9d); border-color: transparent; pointer-events: none; } .bc-11__link--cur .bc-11__icon, .bc-11__link--cur .bc-11__text { color: #fff; } ``` ### 12. Subway Line **Type:** Pure CSS **Description:** Crumbs as metro stops on a horizontal line. The current page is the lit "you are here" stop with a soft pulsing glow. **HTML:** ```html ``` **CSS:** ```css .bc-12__list { display: flex; align-items: center; list-style: none; padding: 14px 18px 8px; margin: 0; position: relative; } .bc-12__list::before { content: ""; position: absolute; top: 24px; left: 24px; right: 24px; height: 2px; background: linear-gradient( 90deg, rgba(139, 127, 255, 0.65) 0%, rgba(139, 127, 255, 0.65) var(--bc12-cur, 100%), rgba(255, 255, 255, 0.12) var(--bc12-cur, 100%), rgba(255, 255, 255, 0.12) 100% ); border-radius: 2px; } .bc-12__item { flex: 1; display: flex; justify-content: center; } .bc-12__link { display: flex; flex-direction: column; align-items: center; gap: 6px; text-decoration: none; position: relative; padding: 0 6px; transition: transform 0.2s; } .bc-12__link:hover { transform: translateY(-2px); } .bc-12__dot { width: 14px; height: 14px; border-radius: 50%; background: #0e0e16; border: 2px solid rgba(139, 127, 255, 0.65); position: relative; z-index: 1; transition: background 0.2s, border-color 0.2s, box-shadow 0.2s; } .bc-12__link:hover .bc-12__dot { border-color: #a78bfa; background: rgba(139, 127, 255, 0.15); } .bc-12__label { font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: rgba(255, 255, 255, 0.55); transition: color 0.2s; white-space: nowrap; } .bc-12__link:hover .bc-12__label { color: rgba(255, 255, 255, 0.85); } .bc-12__link--cur { pointer-events: none; } .bc-12__link--cur .bc-12__dot { background: #a78bfa; border-color: #a78bfa; box-shadow: 0 0 0 4px rgba(167, 139, 250, 0.18), 0 0 14px rgba(167, 139, 250, 0.6); animation: bc12pulse 2s ease-in-out infinite; } .bc-12__link--cur .bc-12__label { color: #fff; font-weight: 700; } @keyframes bc12pulse { 0%, 100% { box-shadow: 0 0 0 4px rgba(167, 139, 250, 0.18), 0 0 14px rgba(167, 139, 250, 0.6); } 50% { box-shadow: 0 0 0 6px rgba(167, 139, 250, 0.08), 0 0 22px rgba(167, 139, 250, 0.85); } } @media (prefers-reduced-motion: reduce) { .bc-12__link--cur .bc-12__dot { animation: none; } .bc-12__link:hover { transform: none; } } ``` ### 13. Floating Island **Type:** Pure CSS **Description:** Each crumb is a floating card that springs upward on hover with a shadow bloom. **HTML:** ```html ``` **CSS:** ```css .bc-13__list { display: flex; align-items: center; list-style: none; padding: 0; margin: 0; gap: 8px; flex-wrap: wrap; } .bc-13__item { display: flex; align-items: center; } .bc-13__item + .bc-13__item::before { content: "→"; color: rgba(255, 255, 255, 0.15); font-size: 12px; } .bc-13__link { display: block; padding: 7px 16px; border-radius: 10px; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.08); font-size: 13px; font-weight: 500; color: rgba(255, 255, 255, 0.55); text-decoration: none; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2); transition: background 0.3s, border-color 0.3s, color 0.3s, transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s; } .bc-13__link:hover { background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.18); color: #fff; transform: translateY(-3px); box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35); } .bc-13__link--cur { background: rgba(139, 127, 255, 0.15); border-color: rgba(139, 127, 255, 0.35); color: #8b7fff; transform: translateY(-3px); box-shadow: 0 8px 20px rgba(139, 127, 255, 0.2); pointer-events: none; } ``` ### 14. Scale Peek **Type:** Pure CSS **Description:** On hover the whole list dims and scales down — only the hovered crumb scales up to full. **HTML:** ```html ``` **CSS:** ```css .bc-14__list { display: flex; align-items: center; list-style: none; padding: 0; margin: 0; flex-wrap: wrap; } .bc-14__item + .bc-14__item::before { content: "›"; padding: 0 8px; color: rgba(255, 255, 255, 0.2); font-size: 16px; } .bc-14__link { font-size: 14px; font-weight: 500; color: rgba(255, 255, 255, 0.45); text-decoration: none; transition: color 0.25s, opacity 0.25s, transform 0.25s; } .bc-14__list:hover .bc-14__link { opacity: 0.35; transform: scale(0.96); } .bc-14__list:hover .bc-14__link:hover { opacity: 1; transform: scale(1.05); color: #fff; } .bc-14__link--cur { color: #8b7fff; pointer-events: none; } ``` ### 15. Holographic Shimmer **Type:** Pure CSS **Description:** Current page gets a looping rainbow holographic background. Past crumbs are plain text. **HTML:** ```html ``` **CSS:** ```css .bc-15__list { display: flex; align-items: center; list-style: none; padding: 0; margin: 0; } .bc-15__item { display: flex; align-items: center; } .bc-15__item + .bc-15__item::before { content: "/"; padding: 0 12px; color: rgba(255, 255, 255, 0.2); } .bc-15__link { font-size: 14px; font-weight: 500; color: rgba(255, 255, 255, 0.55); text-decoration: none; transition: color 0.25s; } .bc-15__link:hover { color: rgba(255, 255, 255, 0.8); } .bc-15__link--cur { position: relative; overflow: hidden; display: inline-flex; align-items: center; padding: 4px 12px; border-radius: 6px; pointer-events: none; } .bc-15__shine { position: absolute; inset: 0; background: linear-gradient(105deg, #8b7fff, #ff6b9d, #3de8f5, #1ed98a, #f5a84a, #8b7fff); background-size: 300% 100%; animation: bc15holo 3s linear infinite; } @keyframes bc15holo { from { background-position: 0% 50%; } to { background-position: 300% 50%; } } .bc-15__text { position: relative; z-index: 1; color: #fff; font-weight: 700; } ``` ### 16. Arrow Chain **Type:** Pure CSS **Description:** CSS arrow-chevron breadcrumbs using border triangles — no SVG or images needed. **HTML:** ```html ``` **CSS:** ```css .bc-16__list { display: flex; list-style: none; padding: 0; margin: 0; } .bc-16__item { display: flex; } .bc-16__link { display: flex; align-items: center; padding: 8px 12px 8px 24px; position: relative; font-size: 13px; font-weight: 600; background: rgba(255, 255, 255, 0.06); color: rgba(255, 255, 255, 0.45); text-decoration: none; margin-left: -10px; transition: background 0.25s, color 0.25s; } .bc-16__item:first-child .bc-16__link { padding-left: 16px; border-radius: 8px 0 0 8px; margin-left: 0; } .bc-16__link::after { content: ""; position: absolute; right: -10px; top: 0; width: 0; height: 100%; border-top: 19px solid transparent; border-bottom: 19px solid transparent; border-left: 10px solid rgba(255, 255, 255, 0.06); z-index: 1; transition: border-left-color 0.25s; } .bc-16__link:hover { background: rgba(255, 255, 255, 0.12); color: #fff; z-index: 2; } .bc-16__link:hover::after { border-left-color: rgba(255, 255, 255, 0.12); } .bc-16__link--cur { background: #8b7fff; color: #fff; pointer-events: none; z-index: 2; border-radius: 0 8px 8px 0; } .bc-16__link--cur::after { display: none; } ``` ### 17. Dotted Separator **Type:** Pure CSS **Description:** Ellipsis dots between crumbs that expand on hover for a subtle kinetic effect. **HTML:** ```html ``` **CSS:** ```css .bc-17__list { display: flex; align-items: center; list-style: none; padding: 0; margin: 0; flex-wrap: wrap; } .bc-17__item + .bc-17__item::before { content: "···"; padding: 0 10px; color: rgba(255, 255, 255, 0.18); font-size: 14px; letter-spacing: 2px; transition: color 0.25s, letter-spacing 0.3s; } .bc-17__item:hover + .bc-17__item::before { color: rgba(255, 255, 255, 0.45); letter-spacing: 4px; } .bc-17__link { font-size: 14px; font-weight: 500; color: rgba(255, 255, 255, 0.55); text-decoration: none; transition: color 0.25s; } .bc-17__link:hover { color: rgba(255, 255, 255, 0.85); } .bc-17__link--cur { color: #fff; pointer-events: none; } ``` ### 18. Bordered Box **Type:** Pure CSS **Description:** All crumbs share one bordered container with dividers. Active gets an inset top+bottom accent stroke. **HTML:** ```html ``` **CSS:** ```css .bc-18__list { display: flex; align-items: center; list-style: none; padding: 0; margin: 0; border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 10px; overflow: hidden; } .bc-18__item + .bc-18__item { border-left: 1px solid rgba(255, 255, 255, 0.1); } .bc-18__link { display: block; padding: 9px 18px; font-size: 13px; font-weight: 500; color: rgba(255, 255, 255, 0.55); text-decoration: none; transition: background 0.25s, color 0.25s; } .bc-18__link:hover { background: rgba(255, 255, 255, 0.15); color: #fff; } .bc-18__link--cur { background: rgba(139, 127, 255, 0.12); color: #8b7fff; pointer-events: none; box-shadow: inset 0 2px 0 #8b7fff, inset 0 -2px 0 #8b7fff; } ``` ### 19. Progress Track **Type:** Pure CSS **Description:** Stepper-style breadcrumb with numbered nodes connected by a track line — great for multi-step flows. **HTML:** ```html ``` **CSS:** ```css .bc-19__list { display: flex; align-items: flex-start; list-style: none; padding: 0; margin: 0; gap: 0; } .bc-19__item { display: flex; flex-direction: column; align-items: center; gap: 6px; flex: 1; position: relative; } .bc-19__item::before { content: ""; position: absolute; top: 14px; left: calc(50% + 14px); right: calc(-50% + 14px); height: 2px; background: rgba(255, 255, 255, 0.1); } .bc-19__item:last-child::before { display: none; } .bc-19__item--done::before { background: #8b7fff; } .bc-19__node { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; background: rgba(255, 255, 255, 0.08); border: 2px solid rgba(255, 255, 255, 0.2); color: rgba(255, 255, 255, 0.35); transition: all 0.3s; } .bc-19__item--done .bc-19__node { background: #8b7fff; border-color: #8b7fff; color: #fff; } .bc-19__node--cur { background: transparent; border-color: #8b7fff; color: #8b7fff; box-shadow: 0 0 0 4px rgba(139, 127, 255, 0.2); } .bc-19__node--next { opacity: 0.4; } .bc-19__link { font-size: 11px; font-weight: 600; text-decoration: none; color: rgba(255, 255, 255, 0.55); text-align: center; transition: color 0.25s; } .bc-19__link--cur { color: #8b7fff; pointer-events: none; } .bc-19__label { font-size: 11px; font-weight: 600; color: rgba(255, 255, 255, 0.2); } ``` ### 20. Glassmorphism Bar **Type:** Pure CSS **Description:** All crumbs live inside a single frosted glass pill container with blur and saturation. **HTML:** ```html ``` **CSS:** ```css .bc-20 { display: inline-block; background: rgba(255, 255, 255, 0.15); backdrop-filter: blur(16px) saturate(180%); border: 1px solid rgba(255, 255, 255, 0.15); border-radius: 50px; padding: 4px; } .bc-20__list { display: flex; align-items: center; list-style: none; padding: 0; margin: 0; } .bc-20__item + .bc-20__item { border-left: 1px solid rgba(255, 255, 255, 0.12); } .bc-20__link { display: block; padding: 6px 16px; font-size: 13px; font-weight: 500; color: rgba(255, 255, 255, 0.55); text-decoration: none; border-radius: 50px; transition: background 0.3s, color 0.3s; } .bc-20__link:hover { background: rgba(255, 255, 255, 0.12); color: #fff; } .bc-20__link--cur { background: rgba(139, 127, 255, 0.25); color: #fff; pointer-events: none; } ``` ### 21. Wave Underline **Type:** Pure CSS **Description:** An animated SVG wave appears under each link on hover — the current page keeps the wave active. **HTML:** ```html ``` **CSS:** ```css .bc-21__list { display: flex; align-items: center; list-style: none; padding: 0; margin: 0; } .bc-21__item + .bc-21__item::before { content: "›"; padding: 0 10px; color: rgba(255, 255, 255, 0.2); font-size: 18px; } .bc-21__link { position: relative; font-size: 14px; font-weight: 500; color: rgba(255, 255, 255, 0.45); text-decoration: none; padding-bottom: 6px; transition: color 0.25s; } .bc-21__link::after { content: ""; position: absolute; bottom: 0; left: 0; right: 0; height: 4px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 4'%3E%3Cpath d='M0 2 Q5 0 10 2 Q15 4 20 2' fill='none' stroke='%238b7fff' stroke-width='1.5'/%3E%3C/svg%3E"); background-size: 20px 4px; background-repeat: repeat-x; opacity: 0; transform: translateY(4px); transition: opacity 0.3s, transform 0.3s; animation: bc21wave 1.2s linear infinite paused; } .bc-21__link:hover::after, .bc-21__link--cur::after { opacity: 1; transform: translateY(0); animation-play-state: running; } @keyframes bc21wave { from { background-position: 0 0; } to { background-position: 20px 0; } } .bc-21__link:hover { color: rgba(255, 255, 255, 0.85); } .bc-21__link--cur { color: #8b7fff; pointer-events: none; } ``` ### 22. Copy Path **Type:** CSS+JS **Description:** Standard breadcrumb with a copy button that copies the current URL path and shows a toast. **HTML:** ```html ``` **CSS:** ```css .bc-22 { position: relative; } .bc-22__wrap { display: flex; align-items: center; gap: 8px; } .bc-22__list { display: flex; align-items: center; list-style: none; padding: 0; margin: 0; } .bc-22__item + .bc-22__item::before { content: "/"; padding: 0 10px; color: rgba(255, 255, 255, 0.2); } .bc-22__link { font-size: 14px; font-weight: 500; color: rgba(255, 255, 255, 0.55); text-decoration: none; transition: color 0.25s; } .bc-22__link:hover { color: rgba(255, 255, 255, 0.8); } .bc-22__link--cur { color: #fff; pointer-events: none; } .bc-22__copy { width: 28px; height: 28px; border-radius: 7px; border: 1px solid rgba(255, 255, 255, 0.12); background: rgba(255, 255, 255, 0.05); cursor: pointer; font-size: 14px; color: rgba(255, 255, 255, 0.55); display: flex; align-items: center; justify-content: center; transition: background 0.2s, color 0.2s, border-color 0.2s; } .bc-22__copy:hover { background: rgba(139, 127, 255, 0.2); border-color: rgba(139, 127, 255, 0.4); color: #8b7fff; } .bc-22__copy-icon { line-height: 1; display: block; } .bc-22__toast { position: absolute; top: -34px; left: 50%; transform: translateX(-50%) translateY(4px); background: #8b7fff; color: #fff; font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 6px; opacity: 0; pointer-events: none; transition: opacity 0.2s, transform 0.2s; white-space: nowrap; } .bc-22__toast--show { opacity: 1; transform: translateX(-50%) translateY(0); } ``` **JS:** ```js document.querySelectorAll(".bc-22__copy").forEach(function (btn) { btn.addEventListener("click", function () { var toast = btn.closest(".bc-22").querySelector(".bc-22__toast"); navigator.clipboard.writeText(window.location.href).then(function () { toast.classList.add("bc-22__toast--show"); setTimeout(function () { toast.classList.remove("bc-22__toast--show"); }, 2000); }); }); }); ``` --- ## 8 CSS Brutalist Designs URL: https://codefronts.com/design-styles/css-brutalist/ Description: 8 hand-coded CSS brutalist designs spanning raw e-commerce product cards, a bureaucratic inspection form, a dark constructivist ops dashboard, a collision-typography portfolio grid, an indie SaaS hero + pricing split, a draggable Windows 95 desktop, a three-column long-read editorial, and a stark streetwear catalog. Heavy borders, oversized type, no rounded corners. Demo count: 8 ### 01. Product Cards **Type:** Pure CSS **Description:** Raw e-commerce product cards built for a furniture/object brand. Heavy black borders, Bebas Neue headlines at aggressive sizes, a construction-tape stripe motif, a cement-grey material palette, and a red-on-black "New Drop" tag system. Cards use industrial geometry (crosshairs, diamonds, rotated stamps) as stand-ins for product imagery. The bottom row breaks the grid with a full-bleed red feature banner and a compact dark quick-add panel — the contrast between the three card treatments (black, yellow, cement) is intentional. Bebas Neue + Space Mono + DM Serif Display. Best for furniture brands, industrial-design retailers, statement product pages. **HTML:** ```html
// Object Series
VOID
CHAIR
MK.II
$840
// Raw Material
The
Slab
Table
Cast in a single pour of recycled concrete aggregate. No finish. No apology.
$1,290 FREE FREIGHT
REF // 0039-B
IRON
SHELF
UNIT
Material
Raw Iron
Weight
34 kg
Width
120 cm
Shelves
5 fixed
$620
// Featured Collection
BRUT
FORCE
SS25
Objects made without apology. Raw edges, cast imperfections, and load-bearing joints exposed. Furniture as statement — not decoration.
SHOP 24 PIECES →
// Quick Add
Bolt Stool $280
Grid Mirror $460
Tank Lamp $195
Beam Bench $740
Forge Vase $89
``` **CSS:** ```css /* ─── 01 Brutalist Product Cards — raw e-commerce grid ──────────── */ @import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Space+Mono:ital,wght@0,400;0,700;1,400&family=DM+Serif+Display:ital@0;1&display=swap'); .br-prd { --br-prd-black: #0a0a0a; --br-prd-white: #f5f0e8; --br-prd-red: #e8001d; --br-prd-yellow: #f7e02b; --br-prd-cement: #c8c0b4; --br-prd-border: 3px solid #0a0a0a; --br-prd-border-thick: 6px solid #0a0a0a; position: relative; width: 100%; min-height: 980px; background: var(--br-prd-white); font-family: 'Space Mono', ui-monospace, monospace; display: flex; align-items: flex-start; justify-content: center; padding: 32px 16px; overflow: hidden; box-sizing: border-box; } .br-prd *, .br-prd *::before, .br-prd *::after { box-sizing: border-box; margin: 0; padding: 0; } /* Noise texture — moved off body::before; scoped to wrapper */ .br-prd::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' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E"); pointer-events: none; z-index: 999; } .br-prd .card { position: relative; width: 100%; max-width: 960px; z-index: 1; } .br-prd .grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0; width: 100%; } /* CARD BASE */ .br-prd .br-card { border: var(--br-prd-border-thick); border-color: var(--br-prd-black); position: relative; overflow: hidden; cursor: pointer; transition: transform 0.08s; } .br-prd .br-card:hover { transform: translate(-3px, -3px); } .br-prd .br-card:hover::after { content: ''; position: absolute; inset: 0; border: var(--br-prd-border-thick); border-color: var(--br-prd-red); pointer-events: none; z-index: 10; } /* CARD 1 — BRUTALIST STATEMENT */ .br-prd .card-1 { background: var(--br-prd-black); aspect-ratio: 3 / 4; } .br-prd .card-1 .img-zone { width: 100%; height: 55%; background: #1c1c1c; border-bottom: var(--br-prd-border-thick); position: relative; display: flex; align-items: center; justify-content: center; overflow: hidden; } .br-prd .card-1 .img-zone::before { content: 'OBJ'; font-family: 'Bebas Neue', sans-serif; font-size: 80px; color: #333; letter-spacing: 12px; position: absolute; } .br-prd .card-1 .img-zone .cross { width: 120px; height: 120px; position: relative; z-index: 2; } .br-prd .card-1 .img-zone .cross::before, .br-prd .card-1 .img-zone .cross::after { content: ''; position: absolute; background: var(--br-prd-red); } .br-prd .card-1 .img-zone .cross::before { width: 4px; height: 100%; left: 50%; transform: translateX(-50%); } .br-prd .card-1 .img-zone .cross::after { height: 4px; width: 100%; top: 50%; transform: translateY(-50%); } .br-prd .card-1 .tag { position: absolute; top: 12px; left: 12px; background: var(--br-prd-red); color: var(--br-prd-white); font-size: 10px; font-weight: 700; letter-spacing: 3px; padding: 4px 10px; text-transform: uppercase; } .br-prd .card-1 .body { padding: 18px 20px; } .br-prd .card-1 .cat { color: #555; font-size: 10px; letter-spacing: 4px; text-transform: uppercase; margin-bottom: 8px; } .br-prd .card-1 .name { font-family: 'Bebas Neue', sans-serif; color: var(--br-prd-white); font-size: 36px; line-height: 0.9; letter-spacing: 2px; margin-bottom: 12px; } .br-prd .card-1 .meta { display: flex; justify-content: space-between; align-items: flex-end; border-top: 2px solid #333; padding-top: 14px; margin-top: 10px; } .br-prd .card-1 .price { color: var(--br-prd-yellow); font-size: 28px; font-weight: 700; letter-spacing: -1px; } .br-prd .card-1 .btn { background: var(--br-prd-yellow); color: var(--br-prd-black); border: none; font-family: 'Space Mono', ui-monospace, monospace; font-size: 10px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; padding: 8px 14px; cursor: pointer; } /* CARD 2 — YELLOW STRIKE */ .br-prd .card-2 { background: var(--br-prd-yellow); border-left: none; aspect-ratio: 3 / 4; } .br-prd .card-2 .stripe-top { background: repeating-linear-gradient( -45deg, var(--br-prd-black), var(--br-prd-black) 10px, var(--br-prd-yellow) 10px, var(--br-prd-yellow) 20px ); height: 16px; border-bottom: var(--br-prd-border-thick); } .br-prd .card-2 .num { font-family: 'Bebas Neue', sans-serif; font-size: 120px; color: rgba(0, 0, 0, 0.08); position: absolute; right: -10px; top: 20px; line-height: 1; pointer-events: none; } .br-prd .card-2 .body { padding: 20px; position: relative; } .br-prd .card-2 .cat { font-size: 10px; letter-spacing: 4px; text-transform: uppercase; color: #444; margin-bottom: 10px; } .br-prd .card-2 .name { font-family: 'DM Serif Display', Georgia, serif; font-size: 42px; line-height: 0.95; color: var(--br-prd-black); margin-bottom: 16px; font-style: italic; } .br-prd .card-2 .desc { font-size: 11px; line-height: 1.7; color: #333; border-left: 4px solid var(--br-prd-black); padding-left: 12px; margin-bottom: 20px; } .br-prd .card-2 .img-zone-2 { width: calc(100% + 40px); margin-left: -20px; height: 140px; background: var(--br-prd-black); border-top: var(--br-prd-border-thick); border-bottom: var(--br-prd-border-thick); display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden; margin-bottom: 20px; } .br-prd .card-2 .img-zone-2 span { font-family: 'Bebas Neue', sans-serif; font-size: 56px; color: #222; letter-spacing: 8px; } .br-prd .card-2 .img-zone-2 .dot { width: 80px; height: 80px; border-radius: 50%; border: 4px solid var(--br-prd-yellow); position: absolute; } .br-prd .card-2 .bottom { display: flex; justify-content: space-between; align-items: center; } .br-prd .card-2 .price { font-family: 'Bebas Neue', sans-serif; font-size: 48px; color: var(--br-prd-black); line-height: 1; } .br-prd .card-2 .price small { font-family: 'Space Mono', ui-monospace, monospace; font-size: 11px; display: block; letter-spacing: 2px; color: #555; } .br-prd .card-2 .btn { background: var(--br-prd-black); color: var(--br-prd-yellow); border: none; font-family: 'Space Mono', ui-monospace, monospace; font-size: 10px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; padding: 12px 16px; cursor: pointer; } /* CARD 3 — CEMENT INDUSTRIAL */ .br-prd .card-3 { background: var(--br-prd-cement); border-left: none; aspect-ratio: 3 / 4; } .br-prd .card-3 .img-zone { width: 100%; height: 50%; background: #b0a898; border-bottom: var(--br-prd-border-thick); position: relative; display: flex; align-items: center; justify-content: center; overflow: hidden; } .br-prd .card-3 .img-zone::before { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient( 0deg, transparent, transparent 28px, rgba(0, 0, 0, 0.04) 28px, rgba(0, 0, 0, 0.04) 30px ); } .br-prd .card-3 .diamond { width: 100px; height: 100px; border: 6px solid var(--br-prd-black); transform: rotate(45deg); position: relative; z-index: 2; } .br-prd .card-3 .diamond::after { content: ''; position: absolute; inset: 10px; border: 3px solid var(--br-prd-black); } .br-prd .card-3 .stamp { position: absolute; bottom: 12px; right: 12px; width: 60px; height: 60px; border: 4px solid var(--br-prd-red); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--br-prd-red); font-size: 9px; font-weight: 700; letter-spacing: 1px; text-align: center; text-transform: uppercase; transform: rotate(-12deg); z-index: 3; } .br-prd .card-3 .body { padding: 20px; } .br-prd .card-3 .ref { font-size: 9px; letter-spacing: 4px; color: #666; text-transform: uppercase; margin-bottom: 8px; } .br-prd .card-3 .name { font-family: 'Bebas Neue', sans-serif; font-size: 40px; line-height: 0.9; color: var(--br-prd-black); margin-bottom: 14px; letter-spacing: 2px; } .br-prd .card-3 .specs { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border: var(--br-prd-border); margin-bottom: 16px; } .br-prd .card-3 .spec { padding: 8px 10px; border-right: var(--br-prd-border); border-bottom: var(--br-prd-border); } .br-prd .card-3 .spec:nth-child(even) { border-right: none; } .br-prd .card-3 .spec:nth-child(3), .br-prd .card-3 .spec:nth-child(4) { border-bottom: none; } .br-prd .card-3 .spec-label { font-size: 8px; letter-spacing: 3px; text-transform: uppercase; color: #666; margin-bottom: 3px; } .br-prd .card-3 .spec-val { font-size: 13px; font-weight: 700; color: var(--br-prd-black); } .br-prd .card-3 .bottom { display: flex; justify-content: space-between; align-items: center; } .br-prd .card-3 .price { font-family: 'Bebas Neue', sans-serif; font-size: 44px; color: var(--br-prd-black); line-height: 1; } .br-prd .card-3 .btn { background: var(--br-prd-red); color: var(--br-prd-white); border: none; font-family: 'Space Mono', ui-monospace, monospace; font-size: 10px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; padding: 10px 14px; cursor: pointer; } /* BOTTOM ROW */ .br-prd .row2 { display: grid; grid-template-columns: 2fr 1fr; gap: 0; border-top: var(--br-prd-border-thick); } /* CARD 4 — WIDE FEATURE */ .br-prd .card-4 { background: var(--br-prd-red); border: none; border-right: var(--br-prd-border-thick); padding: 32px; display: flex; align-items: center; gap: 40px; position: relative; overflow: hidden; } .br-prd .card-4::before { content: '★'; font-family: 'Bebas Neue', sans-serif; font-size: 300px; color: rgba(255, 255, 255, 0.08); position: absolute; right: -30px; top: 50%; transform: translateY(-50%); line-height: 1; } .br-prd .card-4 .label { font-size: 9px; letter-spacing: 5px; text-transform: uppercase; color: rgba(255, 255, 255, 0.6); margin-bottom: 8px; } .br-prd .card-4 .big-name { font-family: 'Bebas Neue', sans-serif; font-size: 80px; color: var(--br-prd-white); line-height: 0.85; letter-spacing: 3px; } .br-prd .card-4 .divider { width: 3px; height: 100px; background: rgba(255, 255, 255, 0.3); flex-shrink: 0; } .br-prd .card-4 .right { flex: 1; } .br-prd .card-4 .desc-text { font-size: 12px; line-height: 1.8; color: rgba(255, 255, 255, 0.8); margin-bottom: 20px; } .br-prd .card-4 .badge { display: inline-block; background: var(--br-prd-yellow); color: var(--br-prd-black); font-size: 11px; font-weight: 700; letter-spacing: 2px; padding: 6px 16px; text-transform: uppercase; } /* CARD 5 — TALL ASIDE */ .br-prd .card-5 { background: var(--br-prd-black); border: none; padding: 24px; display: flex; flex-direction: column; justify-content: space-between; } .br-prd .card-5 .top-tag { font-size: 9px; letter-spacing: 4px; color: #555; text-transform: uppercase; border-bottom: 1px solid #222; padding-bottom: 12px; margin-bottom: 16px; } .br-prd .card-5 .items { flex: 1; } .br-prd .card-5 .item { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid #222; cursor: pointer; } .br-prd .card-5 .item:hover .item-name { color: var(--br-prd-yellow); } .br-prd .card-5 .item-name { font-size: 11px; color: var(--br-prd-white); letter-spacing: 1px; transition: color 0.15s; } .br-prd .card-5 .item-price { font-family: 'Bebas Neue', sans-serif; font-size: 20px; color: var(--br-prd-yellow); } .br-prd .card-5 .view-all { margin-top: 16px; background: transparent; border: 2px solid #333; color: #555; font-family: 'Space Mono', ui-monospace, monospace; font-size: 9px; letter-spacing: 3px; text-transform: uppercase; padding: 10px; cursor: pointer; width: 100%; transition: all 0.15s; } .br-prd .card-5 .view-all:hover { border-color: var(--br-prd-yellow); color: var(--br-prd-yellow); } @media (max-width: 760px) { .br-prd .grid { grid-template-columns: 1fr; } .br-prd .row2 { grid-template-columns: 1fr; } .br-prd .card-2, .br-prd .card-3 { border-left: var(--br-prd-border-thick); border-top: none; } .br-prd .card-4 { border-right: none; border-bottom: var(--br-prd-border-thick); flex-direction: column; gap: 20px; } } @media (prefers-reduced-motion: reduce) { .br-prd .br-card, .br-prd .card-5 .item-name, .br-prd .card-5 .view-all { transition: none; } } ``` ### 02. Form Elements **Type:** CSS + JS **Description:** A bureaucratic form UI inspired by government documents and industrial inspection sheets. Ruled paper lines and a red margin run behind everything. Fields live inside a rigid cell-bordered grid with hand-stamp section numbers. Checkboxes use a ✗ mark instead of a checkmark. Radio options are full-width blocks that invert to dark when selected. The textarea header is a black bar with a character counter. A ranged budget slider and a final submit zone with fine-print legalese complete the system — every interaction has weight and friction by design. IBM Plex Mono + Barlow Condensed + Courier Prime. Best for inspection portals, compliance forms, government UIs, brutalist contact pages. **HTML:** ```html
01
Identification
Full Legal Name *
DOB
Organization
Reference Code
Contact Address *
Territory
02
Classification
03
Priority Level
04
Remarks
Supplementary Notes 0 / 400
Allocated Budget $35,000
$0 $25K $50K $75K $100K
By submitting this form you confirm all information is accurate. False declarations may result in rejection and further review under Section 14.3 of operational protocol.
``` **CSS:** ```css /* ─── 02 Brutalist Form Elements — bureaucratic inspection form ── */ @import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:ital,wght@0,400;0,600;1,400&family=Barlow+Condensed:wght@400;700;900&family=Courier+Prime:ital,wght@0,400;0,700;1,400&display=swap'); .br-frm { --br-frm-paper: #ede8df; --br-frm-dark: #0f0f0f; --br-frm-red: #c8001a; --br-frm-ink: #1a1a2e; --br-frm-rule: #b5a99a; --br-frm-yellow: #f0c000; position: relative; width: 100%; min-height: 1180px; background: var(--br-frm-paper); font-family: 'IBM Plex Mono', ui-monospace, monospace; padding: 0; overflow: hidden; box-sizing: border-box; } .br-frm *, .br-frm *::before, .br-frm *::after { box-sizing: border-box; margin: 0; padding: 0; } /* Ruled paper lines — was body::before; scoped to wrapper. */ .br-frm::before { content: ''; position: absolute; inset: 0; background-image: repeating-linear-gradient( to bottom, transparent 0px, transparent 31px, var(--br-frm-rule) 31px, var(--br-frm-rule) 32px ); opacity: 0.4; pointer-events: none; z-index: 0; } /* Red margin line — was body::after; scoped to wrapper. */ .br-frm::after { content: ''; position: absolute; top: 0; left: 64px; width: 2px; height: 100%; background: #e8888a; opacity: 0.6; pointer-events: none; z-index: 0; } .br-frm .card { position: relative; width: 100%; max-width: none; z-index: 1; } .br-frm .form-shell { position: relative; z-index: 1; padding: 40px 48px 40px 90px; max-width: 900px; } /* Corner stamps (form ID + rejected) — were position:fixed; now position:absolute inside the wrapper so they don't escape. */ .br-frm .corner-stamp { position: absolute; top: 20px; right: 28px; z-index: 10; text-align: right; } .br-frm .corner-stamp .form-id { font-family: 'Barlow Condensed', sans-serif; font-size: 11px; letter-spacing: 4px; color: #bbb; text-transform: uppercase; margin-bottom: 4px; } .br-frm .corner-stamp .form-num { font-family: 'Barlow Condensed', sans-serif; font-size: 36px; font-weight: 900; color: var(--br-frm-dark); line-height: 1; } .br-frm .rejected-stamp { position: absolute; bottom: 40px; right: 60px; border: 6px solid var(--br-frm-red); color: var(--br-frm-red); font-family: 'Barlow Condensed', sans-serif; font-size: 42px; font-weight: 900; letter-spacing: 6px; padding: 6px 20px; transform: rotate(-18deg); opacity: 0.12; pointer-events: none; z-index: 2; } /* SECTION HEADER STAMP */ .br-frm .section-stamp { display: flex; align-items: center; gap: 16px; margin-bottom: 28px; } .br-frm .stamp-num { width: 48px; height: 48px; border: 4px solid var(--br-frm-dark); display: flex; align-items: center; justify-content: center; font-family: 'Barlow Condensed', sans-serif; font-size: 22px; font-weight: 900; color: var(--br-frm-dark); flex-shrink: 0; } .br-frm .stamp-title { font-family: 'Barlow Condensed', sans-serif; font-size: 28px; font-weight: 900; color: var(--br-frm-dark); letter-spacing: 4px; text-transform: uppercase; border-bottom: 4px solid var(--br-frm-dark); flex: 1; padding-bottom: 6px; } /* Fields block */ .br-frm .fields-block { border: 2px solid var(--br-frm-dark); margin-bottom: 32px; background: var(--br-frm-paper); } .br-frm .fields-block .row { display: flex; border-bottom: 2px solid var(--br-frm-dark); } .br-frm .fields-block .row:last-child { border-bottom: none; } .br-frm .fields-block .cell { flex: 1; position: relative; border-right: 2px solid var(--br-frm-dark); } .br-frm .fields-block .cell:last-child { border-right: none; } .br-frm .fields-block .cell.wide { flex: 2; } .br-frm .fields-block .cell.narrow { flex: 0.5; } .br-frm .cell-label { font-size: 8px; letter-spacing: 3px; text-transform: uppercase; color: var(--br-frm-dark); padding: 7px 12px 3px; font-weight: 600; display: flex; align-items: center; gap: 6px; } .br-frm .cell-label .req { color: var(--br-frm-red); font-size: 14px; line-height: 0; } .br-frm .cell-input { width: 100%; background: transparent; border: none; outline: none; font-family: 'Courier Prime', ui-monospace, monospace; font-size: 15px; color: var(--br-frm-ink); padding: 4px 12px 10px; display: block; } .br-frm .cell-input::placeholder { color: #bbb; font-style: italic; font-size: 13px; } .br-frm .cell-input:focus { background: rgba(0, 51, 170, 0.04); } /* Inline select inside the Territory cell — strip its own border so it inherits the cell's grid border. */ .br-frm .fields-block .select-wrap-inner { position: relative; border: none; margin: 0; } .br-frm .fields-block .select-wrap-inner::after { content: '▼'; position: absolute; right: 14px; top: 50%; transform: translateY(-50%); font-size: 10px; pointer-events: none; color: var(--br-frm-dark); } .br-frm select { appearance: none; -webkit-appearance: none; width: 100%; background: transparent; border: none; outline: none; font-family: 'Courier Prime', ui-monospace, monospace; font-size: 14px; color: var(--br-frm-ink); padding: 14px 40px 14px 14px; cursor: pointer; } /* Checkboxes */ .br-frm .check-section { margin-bottom: 32px; } .br-frm .check-grid { display: grid; grid-template-columns: repeat(3, 1fr); border: 2px solid var(--br-frm-dark); background: var(--br-frm-paper); } .br-frm .check-item { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-right: 2px solid var(--br-frm-dark); border-bottom: 2px solid var(--br-frm-dark); cursor: pointer; position: relative; transition: background 0.1s; } .br-frm .check-item:hover { background: rgba(0, 0, 0, 0.04); } .br-frm .check-item:nth-child(3n) { border-right: none; } .br-frm .check-item:nth-child(n+4) { border-bottom: none; } .br-frm .check-box { width: 20px; height: 20px; border: 2px solid var(--br-frm-dark); position: relative; flex-shrink: 0; display: flex; align-items: center; justify-content: center; } .br-frm input[type="checkbox"] { display: none; } .br-frm input[type="checkbox"]:checked + .check-box { background: var(--br-frm-dark); } .br-frm input[type="checkbox"]:checked + .check-box::after { content: '✗'; color: var(--br-frm-paper); font-size: 14px; line-height: 1; } .br-frm .check-label { font-size: 12px; color: var(--br-frm-dark); letter-spacing: 0.5px; } /* Radio — priority */ .br-frm .radio-section { margin-bottom: 32px; } .br-frm .radio-row { display: flex; border: 2px solid var(--br-frm-dark); background: var(--br-frm-paper); } .br-frm .radio-opt { flex: 1; position: relative; border-right: 2px solid var(--br-frm-dark); cursor: pointer; overflow: hidden; } .br-frm .radio-opt:last-child { border-right: none; } .br-frm .radio-opt input { position: absolute; opacity: 0; } .br-frm .radio-opt .opt-inner { padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; transition: background 0.1s; } .br-frm .radio-opt input:checked ~ .opt-inner { background: var(--br-frm-dark); } .br-frm .radio-opt input:checked ~ .opt-inner .opt-code { color: var(--br-frm-yellow); } .br-frm .radio-opt input:checked ~ .opt-inner .opt-name { color: var(--br-frm-paper); } .br-frm .radio-opt input:checked ~ .opt-inner .opt-sub { color: #888; } .br-frm .opt-code { font-size: 9px; letter-spacing: 4px; text-transform: uppercase; color: #888; font-weight: 600; } .br-frm .opt-name { font-family: 'Barlow Condensed', sans-serif; font-size: 22px; font-weight: 900; color: var(--br-frm-dark); letter-spacing: 1px; } .br-frm .opt-sub { font-size: 9px; color: #999; letter-spacing: 0.5px; } /* Textarea */ .br-frm .textarea-section { margin-bottom: 32px; } .br-frm .textarea-wrap { border: 2px solid var(--br-frm-dark); position: relative; background: var(--br-frm-paper); } .br-frm .textarea-header { display: flex; justify-content: space-between; align-items: center; padding: 8px 12px; border-bottom: 2px solid var(--br-frm-dark); background: var(--br-frm-dark); } .br-frm .textarea-header-label { font-size: 9px; letter-spacing: 4px; text-transform: uppercase; color: var(--br-frm-paper); font-weight: 600; } .br-frm .textarea-header-count { font-size: 9px; color: #888; letter-spacing: 2px; } .br-frm textarea { width: 100%; background: transparent; border: none; outline: none; font-family: 'Courier Prime', ui-monospace, monospace; font-size: 14px; color: var(--br-frm-ink); padding: 16px 14px; resize: none; min-height: 90px; line-height: 2; } .br-frm textarea::placeholder { color: #bbb; font-style: italic; } /* Slider */ .br-frm .slider-section { margin-bottom: 32px; } .br-frm .slider-wrap { border: 2px solid var(--br-frm-dark); padding: 16px 20px; background: var(--br-frm-paper); } .br-frm .slider-top { display: flex; justify-content: space-between; margin-bottom: 12px; } .br-frm .slider-label { font-size: 10px; letter-spacing: 3px; text-transform: uppercase; font-weight: 600; } .br-frm .slider-val { font-family: 'Barlow Condensed', sans-serif; font-size: 26px; font-weight: 900; color: var(--br-frm-red); line-height: 1; } .br-frm input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 4px; background: var(--br-frm-dark); outline: none; cursor: pointer; margin-bottom: 10px; } .br-frm input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 20px; height: 20px; background: var(--br-frm-red); border: 3px solid var(--br-frm-dark); cursor: pointer; } .br-frm input[type="range"]::-moz-range-thumb { width: 20px; height: 20px; background: var(--br-frm-red); border: 3px solid var(--br-frm-dark); cursor: pointer; } .br-frm .slider-ticks { display: flex; justify-content: space-between; } .br-frm .tick { font-size: 9px; color: #999; letter-spacing: 1px; } /* Submit */ .br-frm .submit-row { display: flex; gap: 0; border: 2px solid var(--br-frm-dark); background: var(--br-frm-paper); } .br-frm .submit-note { flex: 1; padding: 14px 18px; border-right: 2px solid var(--br-frm-dark); font-size: 10px; color: #888; line-height: 1.8; font-style: italic; } .br-frm .submit-note strong { color: var(--br-frm-dark); font-style: normal; } .br-frm .btn-submit { background: var(--br-frm-red); color: var(--br-frm-paper); border: none; font-family: 'Barlow Condensed', sans-serif; font-size: 20px; font-weight: 900; letter-spacing: 4px; text-transform: uppercase; padding: 0 40px; cursor: pointer; position: relative; overflow: hidden; transition: background 0.1s; } .br-frm .btn-submit:hover { background: #9a0012; } .br-frm .btn-clear { background: transparent; color: var(--br-frm-dark); border: none; border-left: 2px solid var(--br-frm-dark); font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 10px; letter-spacing: 2px; text-transform: uppercase; padding: 0 20px; cursor: pointer; } .br-frm .btn-clear:hover { background: rgba(0, 0, 0, 0.05); } @media (max-width: 760px) { .br-frm .form-shell { padding: 32px 24px 40px 40px; } .br-frm::after { left: 28px; } .br-frm .fields-block .row, .br-frm .submit-row { flex-direction: column; } .br-frm .fields-block .cell, .br-frm .submit-note, .br-frm .btn-submit, .br-frm .btn-clear { border-right: none; border-bottom: 2px solid var(--br-frm-dark); } .br-frm .check-grid { grid-template-columns: 1fr 1fr; } .br-frm .radio-row { flex-direction: column; } .br-frm .radio-opt { border-right: none; border-bottom: 2px solid var(--br-frm-dark); } .br-frm .radio-opt:last-child { border-bottom: none; } .br-frm .corner-stamp { top: 12px; right: 16px; } .br-frm .rejected-stamp { right: 20px; font-size: 32px; padding: 4px 14px; } } ``` **JS:** ```js (() => { // Scoped slider handler — finds the slider + value display inside // the .br-frm wrapper only, so multiple demos can render on the // same page without colliding on element IDs. const root = document.querySelector('.br-frm'); if (!root) return; const slider = root.querySelector('[data-br-frm-slider]'); const valEl = root.querySelector('[data-br-frm-slider-val]'); if (!slider || !valEl) return; function paint() { const dollars = Math.round(slider.value * 1000); valEl.textContent = '$' + dollars.toLocaleString(); } slider.addEventListener('input', paint); paint(); })(); ``` ### 03. Data Dashboard **Type:** Pure CSS **Description:** A dark-mode ops/infrastructure dashboard in Soviet constructivism meets broken-terminal aesthetic. Acid green #c8f000 as the primary signal color against near-black surfaces. Left column carries live system metrics, four resource progress meters, and a scrolling event log. Center panel has a bar chart with highlighted current period and a four-cell KPI strip with colored accent bars. Right panel has a donut ring chart for resource distribution. The bottom splits between an events severity table and active target progress cards — the whole thing reads like a real monitoring terminal. Archivo Black + Azeret Mono + Unbounded. Best for DevOps dashboards, status pages, monitoring tools, NOC interfaces. **HTML:** ```html
System Uptime
99.7
% availability — 30d
2.4ms
Avg Latency
1.2k
Req/sec
14
Errors
38
Nodes
CPU Load 72%
Memory 88%
Storage 44%
Network I/O 91%
// Event Log
09:41 ✓ deploy: node-07 healthy
09:38 ▲ warn: queue depth 840
09:31 ✕ err: timeout zone-c
09:28 ✓ scale: +2 replicas
09:14 → cert renewed: *.api
09:02 ✓ backup: completed
08:55 ▲ warn: mem spike node-03
// Throughput — Last 12 Periods
4.8M
Requests
↑ 12.4%
$92K
Revenue
↑ 8.1%
0.03%
Error Rate
↓ 0.01%
38.4K
Active Users
↑ 22%
// Resource Distribution
74%
Total Allocated
Compute
46%
Storage
29%
Network
16%
Reserved
9%
// Recent Events 3 ACTIVE
Status Event Node Impact Time
CRIT Mem overload node-03 HIGH 09:31
WARN Queue spike zone-b MED 09:38
WARN I/O throttle disk-07 MED 09:52
OK Auto-scale cluster-a LOW 10:01
OK Cert renewal *.api 09:14
// Active Targets
Q3 Throughput Goal TGT-001
78% complete ETA Aug 14
Infra Migration TGT-002
42% complete ETA Sep 03
Cost Reduction — 15% TGT-003
61% complete ETA Jul 30
``` **CSS:** ```css /* ─── 03 Brutalist Data Dashboard — dark constructivist NOC ─── */ @import url('https://fonts.googleapis.com/css2?family=Archivo+Black&family=Azeret+Mono:wght@300;400;700&family=Unbounded:wght@400;700;900&display=swap'); .br-dsh { --br-dsh-bg: #111214; --br-dsh-surface: #18191d; --br-dsh-white: #e8e4dc; --br-dsh-cream: #c8c0b0; --br-dsh-acid: #c8f000; --br-dsh-orange: #ff5c00; --br-dsh-red: #e80030; --br-dsh-blue: #1a4fff; --br-dsh-border: 2px solid #2a2c30; position: relative; width: 100%; min-height: 880px; background: var(--br-dsh-bg); font-family: 'Azeret Mono', ui-monospace, monospace; color: var(--br-dsh-white); padding: 0; overflow: hidden; box-sizing: border-box; } .br-dsh *, .br-dsh *::before, .br-dsh *::after { box-sizing: border-box; margin: 0; padding: 0; } /* Grid background — was body::before; scoped to wrapper */ .br-dsh::before { content: ''; position: absolute; inset: 0; background-image: linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px); background-size: 40px 40px; pointer-events: none; z-index: 0; } .br-dsh .card { position: relative; z-index: 1; width: 100%; } .br-dsh .dashboard { display: grid; grid-template-columns: 280px 1fr 1fr; grid-template-rows: auto auto; gap: 0; } /* LEFT COLUMN */ .br-dsh .left-col { grid-row: 1 / 3; border-right: 3px solid #2a2c30; display: flex; flex-direction: column; } .br-dsh .system-block { padding: 24px 20px; border-bottom: 3px solid #2a2c30; } .br-dsh .sys-label { font-size: 8px; letter-spacing: 5px; text-transform: uppercase; color: #555; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; } .br-dsh .sys-label::before { content: ''; width: 6px; height: 6px; background: var(--br-dsh-acid); border-radius: 50%; animation: br-dsh-pulse 2s infinite; } @keyframes br-dsh-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } } .br-dsh .big-metric { font-family: 'Unbounded', sans-serif; font-size: 56px; font-weight: 900; color: var(--br-dsh-acid); line-height: 1; letter-spacing: -2px; margin-bottom: 6px; } .br-dsh .big-metric-label { font-size: 10px; color: #555; letter-spacing: 3px; text-transform: uppercase; } .br-dsh .mini-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border: var(--br-dsh-border); margin-top: 20px; } .br-dsh .mini-stat { padding: 10px 12px; border-right: var(--br-dsh-border); border-bottom: var(--br-dsh-border); } .br-dsh .mini-stat:nth-child(2n) { border-right: none; } .br-dsh .mini-stat:nth-last-child(-n+2) { border-bottom: none; } .br-dsh .ms-val { font-family: 'Archivo Black', sans-serif; font-size: 20px; color: var(--br-dsh-white); margin-bottom: 2px; } .br-dsh .ms-val.up { color: var(--br-dsh-acid); } .br-dsh .ms-val.down { color: var(--br-dsh-red); } .br-dsh .ms-label { font-size: 8px; color: #555; letter-spacing: 2px; text-transform: uppercase; } /* Progress meters */ .br-dsh .meters-block { padding: 20px; border-bottom: 3px solid #2a2c30; } .br-dsh .meter-item { margin-bottom: 16px; } .br-dsh .meter-item:last-child { margin-bottom: 0; } .br-dsh .meter-top { display: flex; justify-content: space-between; margin-bottom: 6px; } .br-dsh .meter-name { font-size: 9px; letter-spacing: 2px; text-transform: uppercase; color: var(--br-dsh-cream); } .br-dsh .meter-pct { font-family: 'Archivo Black', sans-serif; font-size: 12px; color: var(--br-dsh-acid); } .br-dsh .meter-bar { height: 6px; background: #222; position: relative; } .br-dsh .meter-fill { height: 100%; position: absolute; left: 0; top: 0; } .br-dsh .meter-fill.green { background: var(--br-dsh-acid); } .br-dsh .meter-fill.orange { background: var(--br-dsh-orange); } .br-dsh .meter-fill.red { background: var(--br-dsh-red); } .br-dsh .meter-fill.blue { background: var(--br-dsh-blue); } /* Log feed */ .br-dsh .log-block { padding: 16px 20px; flex: 1; overflow: hidden; } .br-dsh .log-header { font-size: 8px; letter-spacing: 4px; color: #444; text-transform: uppercase; margin-bottom: 12px; border-bottom: 1px solid #222; padding-bottom: 8px; } .br-dsh .log-entry { display: flex; gap: 8px; margin-bottom: 8px; font-size: 10px; line-height: 1.4; } .br-dsh .log-time { color: #444; flex-shrink: 0; letter-spacing: 1px; } .br-dsh .log-msg { color: #666; } .br-dsh .log-msg.ok { color: #5a8a00; } .br-dsh .log-msg.warn { color: #aa7700; } .br-dsh .log-msg.err { color: #aa0020; } /* TOP CENTER */ .br-dsh .top-center { border-bottom: 3px solid #2a2c30; border-right: 3px solid #2a2c30; padding: 28px; position: relative; overflow: hidden; } .br-dsh .top-center::before { content: 'PERF'; font-family: 'Unbounded', sans-serif; font-size: 100px; font-weight: 900; color: rgba(255, 255, 255, 0.025); position: absolute; bottom: -10px; right: -10px; line-height: 1; letter-spacing: -4px; } .br-dsh .chart-label { font-size: 8px; letter-spacing: 5px; text-transform: uppercase; color: #555; margin-bottom: 20px; } .br-dsh .bar-chart { display: flex; align-items: flex-end; gap: 6px; height: 120px; margin-bottom: 8px; } .br-dsh .bar-col { display: flex; flex-direction: column; align-items: center; gap: 4px; flex: 1; } .br-dsh .bar-fill { width: 100%; background: var(--br-dsh-acid); opacity: 0.7; position: relative; transition: opacity 0.2s; } .br-dsh .bar-fill:hover { opacity: 1; } .br-dsh .bar-fill.hi { opacity: 1; background: var(--br-dsh-acid); } .br-dsh .bar-fill.lo { background: #333; opacity: 1; } .br-dsh .bar-fill.warn { background: var(--br-dsh-orange); opacity: 0.8; } .br-dsh .bar-label { font-size: 8px; color: #444; letter-spacing: 1px; } /* Number row */ .br-dsh .number-row { display: grid; grid-template-columns: repeat(4, 1fr); border: var(--br-dsh-border); margin-top: 20px; } .br-dsh .num-cell { padding: 12px 16px; border-right: var(--br-dsh-border); position: relative; } .br-dsh .num-cell:last-child { border-right: none; } .br-dsh .num-cell::after { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; } .br-dsh .num-cell.accent-green::after { background: var(--br-dsh-acid); } .br-dsh .num-cell.accent-orange::after { background: var(--br-dsh-orange); } .br-dsh .num-cell.accent-red::after { background: var(--br-dsh-red); } .br-dsh .num-cell.accent-blue::after { background: var(--br-dsh-blue); } .br-dsh .nc-val { font-family: 'Archivo Black', sans-serif; font-size: 26px; color: var(--br-dsh-white); line-height: 1; margin-bottom: 4px; } .br-dsh .nc-label { font-size: 8px; color: #555; letter-spacing: 2px; text-transform: uppercase; } .br-dsh .nc-delta { font-size: 9px; margin-top: 3px; letter-spacing: 1px; } .br-dsh .nc-delta.pos { color: var(--br-dsh-acid); } .br-dsh .nc-delta.neg { color: var(--br-dsh-red); } /* TOP RIGHT */ .br-dsh .top-right { border-bottom: 3px solid #2a2c30; padding: 28px; position: relative; } .br-dsh .radial-container { display: flex; align-items: center; gap: 28px; margin-bottom: 20px; } .br-dsh .radial-svg { flex-shrink: 0; } .br-dsh .radial-info { flex: 1; } .br-dsh .radial-big { font-family: 'Unbounded', sans-serif; font-size: 44px; font-weight: 900; color: var(--br-dsh-white); line-height: 1; margin-bottom: 4px; } .br-dsh .radial-big span { color: var(--br-dsh-orange); } .br-dsh .radial-sublabel { font-size: 9px; color: #555; letter-spacing: 3px; text-transform: uppercase; } .br-dsh .legend { display: flex; flex-direction: column; gap: 10px; } .br-dsh .legend-item { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid #222; } .br-dsh .legend-item:last-child { border-bottom: none; } .br-dsh .legend-left { display: flex; align-items: center; gap: 10px; } .br-dsh .legend-dot { width: 8px; height: 8px; flex-shrink: 0; } .br-dsh .legend-dot.dot-compute { background: var(--br-dsh-orange); } .br-dsh .legend-dot.dot-storage { background: var(--br-dsh-acid); } .br-dsh .legend-dot.dot-network { background: var(--br-dsh-blue); } .br-dsh .legend-dot.dot-reserved { background: #2a2c30; } .br-dsh .legend-name { font-size: 10px; color: var(--br-dsh-cream); letter-spacing: 1px; } .br-dsh .legend-pct { font-family: 'Archivo Black', sans-serif; font-size: 14px; } .br-dsh .legend-pct.pct-compute { color: var(--br-dsh-orange); } .br-dsh .legend-pct.pct-storage { color: var(--br-dsh-acid); } .br-dsh .legend-pct.pct-network { color: var(--br-dsh-blue); } .br-dsh .legend-pct.pct-reserved { color: #555; } /* BOTTOM PANELS */ .br-dsh .bottom-center { border-right: 3px solid #2a2c30; padding: 24px; } .br-dsh .bottom-right { padding: 24px; } .br-dsh .table-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; } .br-dsh .tbl-title { font-size: 8px; letter-spacing: 5px; text-transform: uppercase; color: #555; } .br-dsh .tbl-badge { background: var(--br-dsh-orange); color: var(--br-dsh-bg); font-size: 9px; font-weight: 700; padding: 3px 8px; letter-spacing: 2px; } .br-dsh .events-table { width: 100%; border-collapse: collapse; } .br-dsh .events-table th { font-size: 7px; letter-spacing: 3px; text-transform: uppercase; color: #444; text-align: left; padding: 0 10px 8px 0; border-bottom: 1px solid #222; } .br-dsh .events-table td { font-size: 10px; color: var(--br-dsh-cream); padding: 8px 10px 8px 0; border-bottom: 1px solid #1a1a1e; vertical-align: middle; } .br-dsh .events-table td.imp-high { color: var(--br-dsh-red); } .br-dsh .events-table td.imp-med { color: var(--br-dsh-orange); } .br-dsh .events-table td.imp-low { color: var(--br-dsh-acid); } .br-dsh .events-table td.imp-none { color: #555; } .br-dsh .events-table td.imp-time { color: #444; } .br-dsh .status-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; margin-right: 6px; } .br-dsh .status-dot.green { background: var(--br-dsh-acid); } .br-dsh .status-dot.orange { background: var(--br-dsh-orange); } .br-dsh .status-dot.red { background: var(--br-dsh-red); } /* Active targets */ .br-dsh .targets { display: flex; flex-direction: column; gap: 12px; } .br-dsh .target { border: 1px solid #2a2c30; padding: 14px; position: relative; overflow: hidden; } .br-dsh .target.active-border { border-color: var(--br-dsh-acid); } .br-dsh .target-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; } .br-dsh .target-name { font-size: 11px; color: var(--br-dsh-white); letter-spacing: 1px; } .br-dsh .target-id { font-size: 9px; color: #444; letter-spacing: 2px; } .br-dsh .target-progress { height: 3px; background: #222; position: relative; margin-bottom: 8px; } .br-dsh .target-fill { position: absolute; left: 0; top: 0; height: 100%; background: var(--br-dsh-acid); } .br-dsh .target-fill.fill-orange { background: var(--br-dsh-orange); } .br-dsh .target-bottom { display: flex; justify-content: space-between; } .br-dsh .target-stat { font-size: 9px; color: #555; letter-spacing: 1px; } .br-dsh .target-stat strong { color: var(--br-dsh-cream); } @media (max-width: 880px) { .br-dsh .dashboard { grid-template-columns: 1fr; grid-template-rows: auto; } .br-dsh .left-col { grid-row: auto; border-right: none; border-bottom: 3px solid #2a2c30; } .br-dsh .top-center, .br-dsh .bottom-center { border-right: none; } .br-dsh .number-row { grid-template-columns: 1fr 1fr; } .br-dsh .num-cell:nth-child(2n) { border-right: none; } .br-dsh .num-cell:nth-child(-n+2) { border-bottom: var(--br-dsh-border); } } @media (prefers-reduced-motion: reduce) { .br-dsh .sys-label::before { animation: none; } .br-dsh .bar-fill { transition: none; } } ``` ### 04. Selected Work Grid **Type:** CSS + JS **Description:** A 2×3 work grid for a graphic designer, built entirely around collision and contrast. Two giant Anton-font words — "SELECTED" and "WORK" — bleed off-canvas behind the grid at 22vw and 19vw, functioning as both typographic architecture and background texture. Each cell has its own background (black, cream, hot pink, electric blue, lime) and its own visual motif: a circle with a lime core, a diagonal line, a ghost ✕, a data bar stack, oversized ghost letterforms, a dot grid. A custom split cursor (dot + lagged ring, both in difference blend mode) swells to 60px with a "VIEW" label on hover. The ticker tape at the bottom scrolls availability info in acid green on black. Anton + Syne + Syne Mono. Best for designer portfolios, agency case-study indexes, art-school project grids. **HTML:** ```html
01 / 06
BRAND
SYSTEM
Identity · 2024
02 / 06
TYPE
MOTION
Animation · 2025
03 / 06
WEB
CAMPAIGN
Digital · 2025
04 / 06
DATA
VISUAL
Infographic · 2024
05 / 06
TYPEFACE
DESIGN
Typography · 2025
06 / 06
SPATIAL
INSTALL
Exhibition · 2025
``` **CSS:** ```css /* ─── 04 Selected Work Grid — collision-typography portfolio ──── */ @import url('https://fonts.googleapis.com/css2?family=Anton&family=Syne:wght@400;700;800&family=Syne+Mono&display=swap'); .br-swg { --br-swg-bg: #f2ede6; --br-swg-black: #0d0d0d; --br-swg-white: #f2ede6; --br-swg-lime: #b6ff00; --br-swg-pink: #ff2d6b; --br-swg-blue: #0040ff; position: relative; width: 100%; height: 720px; background: var(--br-swg-bg); font-family: 'Syne', sans-serif; overflow: hidden; box-sizing: border-box; } .br-swg *, .br-swg *::before, .br-swg *::after { box-sizing: border-box; margin: 0; padding: 0; } .br-swg .card { position: absolute; inset: 0; } /* Custom cursor — scoped to wrapper, doesn't hijack global cursor */ .br-swg .swg-cursor-dot, .br-swg .swg-cursor-ring, .br-swg .swg-cursor-label { position: absolute; pointer-events: none; display: none; } .br-swg.cursor-active .swg-cursor-dot, .br-swg.cursor-active .swg-cursor-ring, .br-swg.cursor-active .swg-cursor-label { display: block; } .br-swg.cursor-active * { cursor: none !important; } .br-swg .swg-cursor-dot { width: 10px; height: 10px; background: var(--br-swg-black); border-radius: 50%; z-index: 9999; transform: translate(-50%, -50%); transition: width 0.2s, height 0.2s, background 0.2s; mix-blend-mode: difference; } .br-swg .swg-cursor-ring { width: 44px; height: 44px; border: 2px solid var(--br-swg-black); border-radius: 50%; z-index: 9998; transform: translate(-50%, -50%); transition: width 0.25s, height 0.25s, border-color 0.2s; mix-blend-mode: difference; } .br-swg .swg-cursor-label { z-index: 9997; font-family: 'Syne Mono', monospace; font-size: 10px; letter-spacing: 2px; text-transform: uppercase; color: var(--br-swg-black); transform: translate(14px, -6px); opacity: 0; transition: opacity 0.15s; white-space: nowrap; } .br-swg.on-work .swg-cursor-dot { width: 60px; height: 60px; background: var(--br-swg-lime); } .br-swg.on-work .swg-cursor-ring { width: 80px; height: 80px; border-color: var(--br-swg-lime); } .br-swg.on-work .swg-cursor-label { opacity: 1; } /* Hero type */ .br-swg .hero-type { position: absolute; inset: 0; pointer-events: none; z-index: 2; overflow: hidden; } .br-swg .hero-word { font-family: 'Anton', sans-serif; position: absolute; line-height: 0.88; letter-spacing: -0.03em; white-space: nowrap; user-select: none; } .br-swg .hw-selected { color: var(--br-swg-black); font-size: 22vw; top: -0.05em; left: -0.02em; z-index: 1; } .br-swg .hw-work { color: transparent; font-size: 19vw; bottom: -0.1em; right: -0.02em; z-index: 0; -webkit-text-stroke: 2px var(--br-swg-black); } .br-swg .hw-year { color: var(--br-swg-lime); font-size: 6vw; bottom: 56px; left: 20px; z-index: 3; mix-blend-mode: multiply; } /* Stage grid */ .br-swg .stage { position: absolute; inset: 0 0 36px 0; display: grid; grid-template-columns: 1fr 1fr 1fr; grid-template-rows: 1fr 1fr; } .br-swg .cell { position: relative; border: 3px solid var(--br-swg-black); border-left: none; border-top: none; overflow: hidden; z-index: 3; } .br-swg .cell:nth-child(3n) { border-right: none; } .br-swg .cell:nth-child(n+4) { border-bottom: none; } .br-swg .cell-inner { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; padding: 20px 22px; transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1); } .br-swg .cell-1 { background: var(--br-swg-black); border-left: 3px solid var(--br-swg-black); border-top: 3px solid var(--br-swg-black); } .br-swg .cell-2 { background: var(--br-swg-bg); border-top: 3px solid var(--br-swg-black); } .br-swg .cell-3 { background: var(--br-swg-pink); border-top: 3px solid var(--br-swg-black); border-right: none; } .br-swg .cell-4 { background: var(--br-swg-blue); border-left: 3px solid var(--br-swg-black); border-bottom: none; } .br-swg .cell-5 { background: var(--br-swg-bg); border-bottom: none; } .br-swg .cell-6 { background: var(--br-swg-lime); border-right: none; border-bottom: none; } .br-swg .cell:hover .cell-inner { transform: translateY(-8px); } .br-swg .cell:hover { z-index: 10; } .br-swg .cell-num { font-family: 'Syne Mono', monospace; font-size: 10px; letter-spacing: 3px; margin-bottom: 8px; opacity: 0.5; } .br-swg .cell-1 .cell-num { color: #555; } .br-swg .cell-2 .cell-num, .br-swg .cell-5 .cell-num { color: #aaa; } .br-swg .cell-3 .cell-num { color: rgba(255,255,255,0.5); } .br-swg .cell-4 .cell-num { color: rgba(255,255,255,0.4); } .br-swg .cell-6 .cell-num { color: rgba(0,0,0,0.4); } .br-swg .cell-title { font-family: 'Anton', sans-serif; font-size: clamp(22px, 2.8vw, 36px); line-height: 0.95; letter-spacing: 0.01em; } .br-swg .cell-1 .cell-title { color: var(--br-swg-white); } .br-swg .cell-2 .cell-title { color: var(--br-swg-black); } .br-swg .cell-3 .cell-title { color: var(--br-swg-white); } .br-swg .cell-4 .cell-title { color: var(--br-swg-lime); } .br-swg .cell-5 .cell-title { color: var(--br-swg-black); } .br-swg .cell-6 .cell-title { color: var(--br-swg-black); } .br-swg .cell-tag { font-size: 9px; letter-spacing: 3px; text-transform: uppercase; margin-top: 8px; font-weight: 600; } .br-swg .cell-1 .cell-tag { color: var(--br-swg-lime); } .br-swg .cell-2 .cell-tag { color: #888; } .br-swg .cell-3 .cell-tag { color: rgba(255,255,255,0.7); } .br-swg .cell-4 .cell-tag { color: rgba(255,255,255,0.6); } .br-swg .cell-5 .cell-tag { color: #999; } .br-swg .cell-6 .cell-tag { color: rgba(0,0,0,0.5); } .br-swg .cell-vis { position: absolute; pointer-events: none; } .br-swg .cell-1 .cell-vis { width: 120px; height: 120px; border-radius: 50%; border: 3px solid #2a2a2a; top: 20px; right: 20px; } .br-swg .cell-1 .cell-vis::after { content: ''; width: 60px; height: 60px; border-radius: 50%; background: var(--br-swg-lime); position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); } .br-swg .cell-2 .cell-vis { width: 100%; height: 100%; top: 0; left: 0; background: linear-gradient(135deg, transparent 48%, #ddd 48%, #ddd 52%, transparent 52%); } .br-swg .cell-3 .cell-vis { top: 16px; right: 16px; font-family: 'Anton', sans-serif; font-size: 80px; color: rgba(255,255,255,0.15); line-height: 1; } .br-swg .cell-4 .cell-vis { top: 20px; left: 20px; right: 20px; } .br-swg .bar-set { display: flex; flex-direction: column; gap: 6px; } .br-swg .bar-item { height: 4px; background: rgba(255,255,255,0.15); position: relative; } .br-swg .bar-item::before { content: ''; position: absolute; left: 0; top: 0; height: 100%; background: var(--br-swg-lime); } .br-swg .b1::before { width: 80%; } .br-swg .b2::before { width: 55%; } .br-swg .b3::before { width: 92%; } .br-swg .b4::before { width: 40%; } .br-swg .cell-5 .cell-vis { top: 10px; left: 16px; font-family: 'Anton', sans-serif; font-size: 100px; color: rgba(0,0,0,0.05); line-height: 1; letter-spacing: -5px; } .br-swg .cell-6 .cell-vis { top: 0; left: 0; right: 0; bottom: 0; background-image: radial-gradient(circle, rgba(0,0,0,0.2) 1.5px, transparent 1.5px); background-size: 20px 20px; } .br-swg .cell::after { content: '→'; position: absolute; top: 20px; right: 22px; font-family: 'Anton', sans-serif; font-size: 28px; opacity: 0; transition: opacity 0.2s, transform 0.2s; transform: translateX(-8px); pointer-events: none; } .br-swg .cell-1::after { color: var(--br-swg-lime); } .br-swg .cell-2::after, .br-swg .cell-5::after { color: var(--br-swg-black); } .br-swg .cell-3::after { color: white; } .br-swg .cell-4::after { color: var(--br-swg-lime); } .br-swg .cell-6::after { color: var(--br-swg-black); } .br-swg .cell:hover::after { opacity: 1; transform: translateX(0); } /* Ticker — absolute to wrapper, not viewport */ .br-swg .ticker { position: absolute; bottom: 0; left: 0; right: 0; background: var(--br-swg-black); padding: 7px 0; overflow: hidden; z-index: 20; border-top: 3px solid var(--br-swg-black); pointer-events: none; } .br-swg .ticker-inner { display: flex; gap: 0; animation: br-swg-ticker 18s linear infinite; white-space: nowrap; } @keyframes br-swg-ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } } .br-swg .ticker-item { font-family: 'Syne Mono', monospace; font-size: 10px; letter-spacing: 4px; text-transform: uppercase; color: var(--br-swg-lime); padding: 0 32px; } .br-swg .ticker-sep { color: #333; padding: 0; font-family: 'Syne Mono', monospace; font-size: 10px; } @media (prefers-reduced-motion: reduce) { .br-swg .ticker-inner, .br-swg .cell-inner, .br-swg .cell::after { animation: none !important; transition: none !important; } } ``` **JS:** ```js (() => { const root = document.querySelector('.br-swg'); if (!root) return; const dot = root.querySelector('[data-br-swg-dot]'); const ring = root.querySelector('[data-br-swg-ring]'); const label = root.querySelector('[data-br-swg-label]'); if (!dot || !ring || !label) return; let mx = 0, my = 0, rx = 0, ry = 0, rafId = null; root.addEventListener('mouseenter', () => root.classList.add('cursor-active')); root.addEventListener('mouseleave', () => { root.classList.remove('cursor-active'); root.classList.remove('on-work'); if (rafId) { cancelAnimationFrame(rafId); rafId = null; } }); root.addEventListener('mousemove', e => { const rect = root.getBoundingClientRect(); mx = e.clientX - rect.left; my = e.clientY - rect.top; dot.style.left = mx + 'px'; dot.style.top = my + 'px'; label.style.left = mx + 'px'; label.style.top = my + 'px'; if (!rafId) rafId = requestAnimationFrame(lerpRing); }); function lerpRing() { rx += (mx - rx) * 0.14; ry += (my - ry) * 0.14; ring.style.left = rx + 'px'; ring.style.top = ry + 'px'; if (Math.abs(mx - rx) > 0.5 || Math.abs(my - ry) > 0.5) { rafId = requestAnimationFrame(lerpRing); } else { rafId = null; } } root.querySelectorAll('.cell').forEach(cell => { cell.addEventListener('mouseenter', () => root.classList.add('on-work')); cell.addEventListener('mouseleave', () => root.classList.remove('on-work')); }); })(); ``` ### 05. Indie SaaS Pricing **Type:** Pure CSS **Description:** A no-BS hero + pricing split for an indie-hacker SaaS. Left side leads with a giant italic Instrument Serif headline punctuated by a yellow monospace .accent span — "seriously." — that signals "I built this myself and I’m not sorry." A live badge counts signups in real time, three KPI cells (users, latency, uptime) sit in a bordered grid with delta arrows, and the CTA pair is blunt: black primary button and a plain underline "see the code on GitHub." Right side is a raw pricing column: billing toggle with a -20% savings tag, three plan cards where the Pro tier inverts to full black with a yellow CTA. Footer reads the MRR, start date, and "BUILT IN PUBLIC" in 9px caps — the whole thing smells like Hacker News. Instrument Serif + JetBrains Mono. Best for indie SaaS landing pages, dev tools, build-in-public products. **HTML:** ```html
Live — 847 signups this week

Stop rebuilding
auth for every
side project.seriously.

Drop-in auth for indie hackers. Works in 4 lines of code.
No Stripe webhooks. No AWS config hell. No SLA anxiety.
Just ship the damn thing.

12k
Users
↑ +340 this week
4ms
P95 Latency
↑ faster
99%
Uptime
30d avg
No credit card Open source core Self-host option
BUILT IN PUBLIC · MRR $4,240 · STARTED JAN 2025
Billing
-20%
Hobby
$ 0 /mo forever
  • Up to 1,000 MAU
  • Email + OAuth
  • Community support
  • Custom domains
  • Webhooks
Team
$ 79 /mo
  • 500k MAU
  • Unlimited seats
  • SOC 2 reports
  • SLA + Slack support
  • SSO / SAML
``` **CSS:** ```css /* ─── 05 Indie SaaS Pricing — auth-as-a-service hero+pricing ──── */ @import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,300;0,400;0,700;0,800;1,400&family=Instrument+Serif:ital@0;1&display=swap'); .br-isp { --br-isp-bg: #fafaf8; --br-isp-black: #111; --br-isp-muted: #888; --br-isp-rule: #ddd; --br-isp-green: #00b341; --br-isp-yellow: #ffd000; --br-isp-red: #e63000; --br-isp-blue: #1a5eff; position: relative; width: 100%; min-height: 760px; background: var(--br-isp-bg); font-family: 'JetBrains Mono', ui-monospace, monospace; color: var(--br-isp-black); overflow: hidden; box-sizing: border-box; } .br-isp *, .br-isp *::before, .br-isp *::after { box-sizing: border-box; margin: 0; padding: 0; } .br-isp .card { position: relative; width: 100%; min-height: 760px; } .br-isp .page { display: grid; grid-template-columns: 1fr 380px; grid-template-rows: 1fr; min-height: 760px; border-top: 4px solid var(--br-isp-black); } /* Hero */ .br-isp .hero { padding: 44px 52px; border-right: 2px solid var(--br-isp-rule); display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; gap: 32px; } .br-isp .live-badge { display: inline-flex; align-items: center; gap: 8px; background: #f0fff4; border: 1.5px solid var(--br-isp-green); color: var(--br-isp-green); font-size: 10px; letter-spacing: 2px; text-transform: uppercase; font-weight: 700; padding: 5px 12px; margin-bottom: 28px; width: fit-content; } .br-isp .live-dot { width: 7px; height: 7px; background: var(--br-isp-green); border-radius: 50%; animation: br-isp-blink 1.4s ease-in-out infinite; } @keyframes br-isp-blink { 0%,100%{opacity:1} 50%{opacity:0.2} } .br-isp .hero-h { font-family: 'Instrument Serif', serif; font-size: clamp(40px, 4.6vw, 64px); line-height: 1.06; color: var(--br-isp-black); letter-spacing: -0.02em; font-weight: 400; } .br-isp .hero-h em { font-style: italic; color: var(--br-isp-muted); } .br-isp .hero-h .accent { font-style: normal; background: var(--br-isp-yellow); padding: 0 6px; margin: 0 2px; font-family: 'JetBrains Mono', monospace; font-size: 0.72em; font-weight: 800; letter-spacing: -1px; vertical-align: 2px; } .br-isp .hero-sub { font-size: 12px; line-height: 1.9; color: var(--br-isp-muted); margin-top: 24px; max-width: 480px; border-left: 3px solid var(--br-isp-rule); padding-left: 16px; } .br-isp .metrics { display: flex; gap: 0; border: 1.5px solid var(--br-isp-rule); margin-top: 36px; } .br-isp .metric { flex: 1; padding: 16px 20px; border-right: 1.5px solid var(--br-isp-rule); } .br-isp .metric:last-child { border-right: none; } .br-isp .m-val { font-size: 26px; font-weight: 800; color: var(--br-isp-black); line-height: 1; margin-bottom: 4px; letter-spacing: -1px; } .br-isp .m-val .unit { font-size: 14px; font-weight: 400; color: var(--br-isp-muted); } .br-isp .m-label { font-size: 9px; color: var(--br-isp-muted); letter-spacing: 2px; text-transform: uppercase; } .br-isp .m-delta { font-size: 9px; margin-top: 4px; } .br-isp .m-delta.up { color: var(--br-isp-green); } .br-isp .m-delta.dn { color: var(--br-isp-red); } .br-isp .cta-row { display: flex; align-items: center; gap: 20px; margin-top: 32px; flex-wrap: wrap; } .br-isp .btn-main { background: var(--br-isp-black); color: var(--br-isp-bg); border: none; font-family: 'JetBrains Mono', monospace; font-size: 12px; font-weight: 700; letter-spacing: 1px; padding: 14px 28px; cursor: pointer; transition: transform 0.1s, box-shadow 0.1s, background 0.1s; } .br-isp .btn-main:hover { transform: translate(-2px, -2px); box-shadow: 4px 4px 0 var(--br-isp-black); background: var(--br-isp-blue); } .br-isp .btn-sec { background: transparent; color: var(--br-isp-muted); border: none; font-family: 'JetBrains Mono', monospace; font-size: 11px; cursor: pointer; letter-spacing: 0.5px; text-decoration: underline; text-decoration-color: var(--br-isp-rule); text-underline-offset: 4px; } .br-isp .btn-sec:hover { color: var(--br-isp-black); text-decoration-color: var(--br-isp-black); } .br-isp .trust { margin-top: 18px; font-size: 9px; color: var(--br-isp-muted); letter-spacing: 1px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; } .br-isp .trust-item::before { content: '✓ '; color: var(--br-isp-green); font-weight: 700; } .br-isp .watermark { position: absolute; bottom: -20px; right: -20px; font-family: 'Instrument Serif', serif; font-size: 200px; color: rgba(0,0,0,0.025); line-height: 1; pointer-events: none; user-select: none; font-style: italic; } .br-isp .hero-foot { font-size: 9px; color: #ccc; letter-spacing: 2px; } /* Pricing column */ .br-isp .pricing-col { display: flex; flex-direction: column; } .br-isp .billing-toggle { padding: 16px 24px; border-bottom: 1.5px solid var(--br-isp-rule); display: flex; align-items: center; justify-content: space-between; } .br-isp .toggle-label { font-size: 9px; letter-spacing: 2px; text-transform: uppercase; color: var(--br-isp-muted); } .br-isp .toggle-row { display: flex; align-items: center; gap: 8px; } .br-isp .toggle-wrap { display: flex; border: 1.5px solid var(--br-isp-rule); overflow: hidden; } .br-isp .toggle-opt { padding: 5px 12px; font-size: 9px; letter-spacing: 1px; cursor: pointer; color: var(--br-isp-muted); transition: background 0.1s, color 0.1s; background: transparent; border: none; font-family: 'JetBrains Mono', monospace; } .br-isp .toggle-opt.active { background: var(--br-isp-black); color: var(--br-isp-bg); } .br-isp .save-tag { font-size: 9px; background: var(--br-isp-yellow); color: var(--br-isp-black); padding: 2px 7px; font-weight: 700; letter-spacing: 1px; } .br-isp .plans { flex: 1; } .br-isp .plan { padding: 22px 24px; border-bottom: 1.5px solid var(--br-isp-rule); position: relative; transition: background 0.15s; } .br-isp .plan:last-child { border-bottom: none; } .br-isp .plan:hover { background: #f5f5f2; } .br-isp .plan.featured { background: var(--br-isp-black); } .br-isp .plan.featured:hover { background: #1a1a1a; } .br-isp .plan-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 14px; } .br-isp .plan-name { font-size: 11px; font-weight: 700; letter-spacing: 3px; text-transform: uppercase; } .br-isp .featured .plan-name { color: var(--br-isp-yellow); } .br-isp .popular-tag { font-size: 8px; background: var(--br-isp-blue); color: white; padding: 3px 8px; letter-spacing: 2px; text-transform: uppercase; } .br-isp .plan-price { margin-bottom: 14px; display: flex; align-items: baseline; gap: 4px; } .br-isp .p-currency { font-size: 16px; font-weight: 700; color: var(--br-isp-muted); margin-top: 4px; } .br-isp .p-currency.dim { color: #666; } .br-isp .p-amount { font-size: 38px; font-weight: 800; line-height: 1; letter-spacing: -2px; } .br-isp .featured .p-amount { color: var(--br-isp-bg); } .br-isp .p-period { font-size: 10px; color: var(--br-isp-muted); } .br-isp .p-period.dim { color: #555; } .br-isp .plan-features { list-style: none; display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; } .br-isp .plan-features li { font-size: 10px; line-height: 1.4; display: flex; gap: 8px; align-items: flex-start; } .br-isp .plan-features li::before { content: '○'; flex-shrink: 0; } .br-isp .plan .plan-features li { color: var(--br-isp-muted); } .br-isp .plan .plan-features li::before { color: #ccc; } .br-isp .featured .plan-features li { color: #aaa; } .br-isp .featured .plan-features li::before { color: var(--br-isp-yellow); } .br-isp .plan-features li.on { color: var(--br-isp-black); } .br-isp .plan-features li.on::before { color: var(--br-isp-green); content: '●'; } .br-isp .plan-btn { width: 100%; padding: 10px; font-family: 'JetBrains Mono', monospace; font-size: 10px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; cursor: pointer; border: 1.5px solid; transition: all 0.1s; } .br-isp .plan .plan-btn { background: transparent; border-color: var(--br-isp-rule); color: var(--br-isp-muted); } .br-isp .plan .plan-btn:hover { border-color: var(--br-isp-black); color: var(--br-isp-black); } .br-isp .featured .plan-btn { background: var(--br-isp-yellow); border-color: var(--br-isp-yellow); color: var(--br-isp-black); } .br-isp .featured .plan-btn:hover { background: #ffc800; } @media (max-width: 720px) { .br-isp .page { grid-template-columns: 1fr; } .br-isp .hero { border-right: none; border-bottom: 2px solid var(--br-isp-rule); padding: 32px 24px; } .br-isp .metrics { flex-wrap: wrap; } .br-isp .metric { flex: 1 1 33%; } } @media (prefers-reduced-motion: reduce) { .br-isp .live-dot { animation: none; } .br-isp .btn-main, .br-isp .plan, .br-isp .plan-btn { transition: none; } } ``` ### 06. Windows 95 Desktop **Type:** CSS + JS **Description:** A fully realized Windows 95 desktop with four draggable windows on a checker-tile teal background. The main window is a Netscape Navigator frame hosting Kira’s GeoCities homepage — complete with a scrolling green-on-black marquee, a real visitor counter in red VT323 digits, a fan poll with radio buttons, and a Win95-themed song table. A Properties panel sidebar shows a loading progress bar animated with classic blue block stripes. An alert dialog ("press OK or the page will EXPLODE") has the authentic three-button layout. A black Winamp 2.9 player renders with a fake frequency visualizer, scrolling track marquee, and working transport controls. All four windows are mouse-draggable. The taskbar clock updates live, and the teal desktop uses the authentic 4px checker tile. VT323 + Press Start 2P + MS Sans Serif fallbacks. Best for nostalgia sites, retro brand campaigns, 90s-revival product pages. **HTML:** ```html
🌐 KIRA's HOMEPAGE v2.1 — Netscape Navigator
File Edit View Go Bookmarks Help
Address:
http://www.geocities.com/Athens/Oracle/7749/
UNDER CONSTRUCTION ← check back l8r! 👷
★ WELCOME TO MY COOL SITE ★ ◆ Best viewed in 800×600 ◆ Netscape 4.0 or higher ◆ No MSIE please!!! ◆ ★ WELCOME TO MY COOL SITE ★ ◆ Best viewed in 800×600 ◆ Netscape 4.0 or higher ◆ No MSIE please!!! ◆

★ ABOUT ME ★ Hey!! My name is Kira and welcome 2 my totally awesome webpage!! I am 16 from Portland Oregon and i luv The Smashing Pumpkins, anime, HTML coding and my cat Mittens 🐱

This page was made with Notepad!! NO FRONTPAGE here lol. If u steal my code ur a JERK!! 🤬
Sign my Guestbook or i'll be sooo sad 😢
💬 POLL: whats ur fav winamp skin?
🎵 My Top Songs RIGHT NOW:
#SongArtistFormat
1 1979 Smashing Pumpkins MP3 128kbps
2 Karma Police Radiohead Real Audio
3 MMM Bop Hanson .WAV 😳

©1999 Kira's Homepage · Made with ♥ and Notepad · Validate HTML · Best viewed: 800×600, 256 colors
This page was last updated: March 14, 1999 ← NEW STUFF!!
Properties
Page Info
Size: 48 KB
Images: 23
Links: 17
Charset: ISO-8859-1
MIDI: playing 🎵
Page Loading:
Receiving data from geocities.com...

JavaScript Alert
This page requires cookies!!
Also please enable Java Applets.
Press OK or the page will EXPLODE 💣
Winamp 2.9 - [1979.mp3]
  Smashing Pumpkins — 1979 — Mellon Collie · 4:25 · 128kbps · Stereo · MPEG Layer 3     
2:14
EQ SHF REP
-2:11
🌐 Kira's Homepage
📁 My Documents
♫ Winamp 2.9
3:47 PM
``` **CSS:** ```css /* ─── 06 Windows 95 Desktop — GeoCities throwback ─────────── */ @import url('https://fonts.googleapis.com/css2?family=VT323&family=Press+Start+2P&display=swap'); .br-w95 { --br-w95-gray: #c0c0c0; --br-w95-dark: #808080; --br-w95-black: #000000; --br-w95-white: #ffffff; --br-w95-blue: #000080; --br-w95-title: #0000a0; --br-w95-teal: #008080; --br-w95-yellow: #ffff00; --br-w95-red: #ff0000; --br-w95-silver: #dfdfdf; --br-w95-link: #0000ee; --br-w95-link-vis: #551a8b; --br-w95-highlight: #000080; position: relative; width: 100%; height: 760px; background: var(--br-w95-teal); background-image: url("data:image/svg+xml,%3Csvg width='4' height='4' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='0' y='0' width='2' height='2' fill='%23007070'/%3E%3Crect x='2' y='2' width='2' height='2' fill='%23007070'/%3E%3C/svg%3E"); background-size: 4px 4px; font-family: 'MS Sans Serif', 'Microsoft Sans Serif', Tahoma, Geneva, sans-serif; font-size: 11px; color: var(--br-w95-black); overflow: hidden; box-sizing: border-box; } .br-w95 *, .br-w95 *::before, .br-w95 *::after { box-sizing: border-box; margin: 0; padding: 0; } .br-w95 .card { position: absolute; inset: 0; } /* Win95 buttons */ .br-w95 .btn95 { background: var(--br-w95-gray); border: 2px solid; border-color: var(--br-w95-white) var(--br-w95-black) var(--br-w95-black) var(--br-w95-white); color: var(--br-w95-black); font-family: 'MS Sans Serif', Tahoma, sans-serif; font-size: 11px; padding: 3px 10px; cursor: pointer; white-space: nowrap; outline: none; min-width: 75px; text-align: center; } .br-w95 .btn95:active { border-color: var(--br-w95-black) var(--br-w95-white) var(--br-w95-white) var(--br-w95-black); padding: 4px 9px 2px 11px; } .br-w95 .btn95:focus { outline: 1px dotted var(--br-w95-black); outline-offset: -4px; } /* Window chrome */ .br-w95 .window { background: var(--br-w95-gray); border: 2px solid; border-color: var(--br-w95-white) var(--br-w95-dark) var(--br-w95-dark) var(--br-w95-white); position: absolute; box-shadow: 2px 2px 0 var(--br-w95-black); min-width: 200px; } .br-w95 .window-titlebar { background: linear-gradient(90deg, var(--br-w95-title) 0%, #0a0aa0 80%, #5555bb 100%); display: flex; align-items: center; justify-content: space-between; padding: 2px 3px; gap: 2px; user-select: none; cursor: move; } .br-w95 .window-title { color: var(--br-w95-white); font-size: 11px; font-weight: bold; display: flex; align-items: center; gap: 4px; flex: 1; overflow: hidden; white-space: nowrap; } .br-w95 .win-icon { font-size: 14px; line-height: 1; } .br-w95 .window-controls { display: flex; gap: 2px; } .br-w95 .win-ctrl { width: 16px; height: 14px; background: var(--br-w95-gray); border: 1.5px solid; border-color: var(--br-w95-white) var(--br-w95-black) var(--br-w95-black) var(--br-w95-white); font-size: 9px; cursor: pointer; display: flex; align-items: center; justify-content: center; font-weight: 700; padding: 0; font-family: 'MS Sans Serif', Tahoma, sans-serif; line-height: 1; } .br-w95 .win-ctrl:active { border-color: var(--br-w95-black) var(--br-w95-white) var(--br-w95-white) var(--br-w95-black); } .br-w95 .win-ctrl.close { color: #cc0000; } .br-w95 .window-content { padding: 8px; } .br-w95 .window-menu { display: flex; border-bottom: 1px solid var(--br-w95-dark); margin: 0 -8px 8px; padding: 0 4px; gap: 0; } .br-w95 .menu-item { font-size: 11px; padding: 2px 6px; cursor: pointer; color: var(--br-w95-black); text-decoration: none; } .br-w95 .menu-item:hover { background: var(--br-w95-highlight); color: var(--br-w95-white); } .br-w95 .inset { border: 2px solid; border-color: var(--br-w95-dark) var(--br-w95-white) var(--br-w95-white) var(--br-w95-dark); background: var(--br-w95-white); padding: 6px 8px; overflow: auto; } .br-w95 a { color: var(--br-w95-link); text-decoration: underline; cursor: pointer; } .br-w95 a:visited { color: var(--br-w95-link-vis); } .br-w95 a:hover { color: var(--br-w95-red); } .br-w95 .sep95 { border: none; border-top: 1px solid var(--br-w95-dark); border-bottom: 1px solid var(--br-w95-white); margin: 6px 0; } .br-w95 .progress-wrap { height: 16px; background: var(--br-w95-white); border: 2px solid; border-color: var(--br-w95-dark) var(--br-w95-white) var(--br-w95-white) var(--br-w95-dark); overflow: hidden; } .br-w95 .progress-fill { height: 100%; background: repeating-linear-gradient( 90deg, var(--br-w95-blue) 0px, var(--br-w95-blue) 12px, var(--br-w95-gray) 12px, var(--br-w95-gray) 13px ); width: 0%; animation: br-w95-load 3s steps(20) infinite; } @keyframes br-w95-load { from { width: 0% } to { width: 100% } } .br-w95 .inset::-webkit-scrollbar { width: 16px; } .br-w95 .inset::-webkit-scrollbar-track { background: var(--br-w95-gray); border: 1px solid var(--br-w95-dark); } .br-w95 .inset::-webkit-scrollbar-thumb { background: var(--br-w95-gray); border: 2px solid; border-color: var(--br-w95-white) var(--br-w95-black) var(--br-w95-black) var(--br-w95-white); } @keyframes br-w95-blink { 0%,49%{opacity:1} 50%,100%{opacity:0} } .br-w95 .blink { animation: br-w95-blink 1s step-end infinite; } .br-w95 .marquee-wrap { overflow: hidden; white-space: nowrap; } .br-w95 .marquee-inner { display: inline-block; animation: br-w95-marquee 12s linear infinite; } @keyframes br-w95-marquee { from { transform: translateX(100%); } to { transform: translateX(-100%); } } .br-w95 .marquee-green { background: #000; color: #0f0; padding: 2px 6px; font-family: 'VT323', monospace; font-size: 18px; margin-top: 4px; } .br-w95 .pixel { font-family: 'Press Start 2P', monospace; } .br-w95 .construction { display: flex; align-items: center; gap: 6px; background: repeating-linear-gradient( 45deg, #000 0px, #000 8px, #ff0 8px, #ff0 16px ); padding: 3px 8px; color: var(--br-w95-black); font-weight: 700; font-size: 10px; } .br-w95 .construction-text { background: var(--br-w95-yellow); padding: 1px 4px; } .br-w95 .counter-digits { display: inline-flex; gap: 1px; background: #000; padding: 3px 6px; border: 1.5px inset var(--br-w95-dark); } .br-w95 .digit { font-family: 'VT323', monospace; font-size: 24px; color: var(--br-w95-red); line-height: 1; min-width: 14px; text-align: center; } .br-w95 table.win95 { border-collapse: collapse; width: 100%; font-size: 11px; } .br-w95 table.win95 th { background: var(--br-w95-blue); color: var(--br-w95-white); padding: 3px 8px; text-align: left; font-weight: bold; font-size: 11px; } .br-w95 table.win95 td { padding: 2px 8px; border-bottom: 1px solid var(--br-w95-silver); } .br-w95 table.win95 tr:hover td { background: var(--br-w95-highlight); color: var(--br-w95-white); } .br-w95 table.win95 tr:hover td a { color: var(--br-w95-white); } .br-w95 input[type="radio"], .br-w95 input[type="checkbox"] { accent-color: var(--br-w95-blue); cursor: pointer; } .br-w95 label { cursor: pointer; } /* Taskbar — absolute to wrapper, not viewport */ .br-w95 .taskbar { position: absolute; bottom: 0; left: 0; right: 0; height: 28px; background: var(--br-w95-gray); border-top: 2px solid var(--br-w95-white); display: flex; align-items: center; padding: 2px 4px; gap: 4px; z-index: 100; } .br-w95 .start-btn { height: 22px; display: flex; align-items: center; gap: 4px; padding: 0 6px; font-weight: 700; font-size: 11px; min-width: auto; } .br-w95 .windows-logo { font-size: 14px; } .br-w95 .taskbar-divider { width: 1px; height: 20px; background: var(--br-w95-dark); border-right: 1px solid var(--br-w95-white); margin: 0 2px; } .br-w95 .taskbar-btn { height: 22px; display: flex; align-items: center; gap: 4px; padding: 0 8px; font-size: 11px; border: 2px solid; border-color: var(--br-w95-dark) var(--br-w95-white) var(--br-w95-white) var(--br-w95-dark); background: var(--br-w95-silver); cursor: pointer; white-space: nowrap; font-family: 'MS Sans Serif', Tahoma, sans-serif; } .br-w95 .clock { margin-left: auto; border: 2px solid; border-color: var(--br-w95-dark) var(--br-w95-white) var(--br-w95-white) var(--br-w95-dark); padding: 2px 8px; font-size: 11px; background: var(--br-w95-gray); white-space: nowrap; } /* Window positions */ .br-w95 .win-main { top: 12px; left: 16px; width: 520px; max-width: calc(100% - 32px); } .br-w95 .win-sidebar { top: 12px; right: 24px; width: 220px; } .br-w95 .win-alert { top: 200px; left: 50%; transform: translateX(-120px); width: 300px; } .br-w95 .win-media { bottom: 44px; left: 16px; width: 340px; max-width: calc(100% - 32px); } /* Main window inner */ .br-w95 .addr-row { display: flex; gap: 4px; align-items: center; margin-bottom: 8px; } .br-w95 .addr-label { font-size: 11px; } .br-w95 .addr-bar { flex: 1; padding: 2px 4px; } .br-w95 .go-btn { min-width: 50px; } .br-w95 .layout-table { width: 100%; border-collapse: collapse; } .br-w95 .nav-cell { width: 160px; vertical-align: top; padding-right: 8px; } .br-w95 .content-cell { vertical-align: top; } .br-w95 .nav-head { background: var(--br-w95-blue); color: #fff; padding: 3px 6px; font-weight: bold; font-size: 11px; margin-bottom: 2px; } .br-w95 .nav-list { font-size: 11px; line-height: 2; } .br-w95 .new-tag { color: red; font-weight: bold; } .br-w95 .counter-block { font-size: 10px; text-align: center; } .br-w95 .counter-label { margin-bottom: 4px; } .br-w95 .counter-sub { margin-top: 4px; color: #666; } .br-w95 .links-mini { font-size: 10px; text-align: center; line-height: 1.8; } .br-w95 .about-box { margin-bottom: 8px; font-size: 12px; line-height: 1.9; max-height: 120px; overflow: auto; } .br-w95 .about-title { font-size: 8px; display: block; margin-bottom: 6px; } .br-w95 .warn-red { color: var(--br-w95-red); font-weight: bold; } .br-w95 .sad-purple { color: purple; font-style: italic; } .br-w95 .poll-box { background: #ffffcc; border: 1px solid #999; padding: 6px; font-size: 11px; margin-bottom: 8px; } .br-w95 .poll-title { font-weight: bold; margin-bottom: 4px; } .br-w95 .poll-opts { display: flex; flex-direction: column; gap: 3px; } .br-w95 .vote-btn { margin-top: 6px; font-size: 10px; } .br-w95 .songs-head { font-weight: bold; font-size: 11px; margin-bottom: 3px; } .br-w95 .page-foot { font-size: 10px; color: #666; text-align: center; line-height: 1.8; } /* Sidebar */ .br-w95 .props-head { font-size: 11px; font-weight: bold; margin-bottom: 6px; } .br-w95 .props-info { font-size: 10px; line-height: 2; margin-bottom: 8px; } .br-w95 .props-loading-head { font-size: 11px; font-weight: bold; margin-bottom: 4px; } .br-w95 .props-status { font-size: 10px; color: #666; margin-top: 3px; } .br-w95 .props-buttons { display: flex; gap: 4px; justify-content: center; flex-wrap: wrap; } /* Alert */ .br-w95 .alert-titlebar { background: linear-gradient(90deg, #800000, #a00000); } .br-w95 .alert-body { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 12px; } .br-w95 .alert-icon { font-size: 36px; line-height: 1; } .br-w95 .alert-text { font-size: 11px; line-height: 1.8; } .br-w95 .alert-buttons { display: flex; gap: 6px; justify-content: center; } .br-w95 .alert-ok { font-weight: bold; } /* Winamp */ .br-w95 .media-titlebar { background: linear-gradient(90deg, #000, #222); } .br-w95 .winamp-pulse { color: #00ff00; font-family: 'VT323', monospace; font-size: 16px; } .br-w95 .winamp-name { color: #fff; } .br-w95 .winamp-close { background: #111; } .br-w95 .winamp-body { background: #000; padding: 8px; display: flex; flex-direction: column; gap: 6px; } .br-w95 .viz-row { height: 40px; background: #000; display: flex; align-items: flex-end; gap: 1px; padding: 0 4px; overflow: hidden; } .br-w95 .viz-bar { flex: 1; background: #00cc00; opacity: 0.8; } .br-w95 .v1 { height: 60%; } .br-w95 .v2 { height: 90%; } .br-w95 .v3 { height: 100%; background: #00ff00; opacity: 1; } .br-w95 .v4 { height: 75%; background: #aaff00; } .br-w95 .v5 { height: 50%; } .br-w95 .v6 { height: 85%; } .br-w95 .v7 { height: 95%; background: #00ff00; opacity: 1; } .br-w95 .v8 { height: 60%; } .br-w95 .v9 { height: 40%; } .br-w95 .v10 { height: 70%; background: #aaff00; } .br-w95 .v11 { height: 100%; background: #00ff00; opacity: 1; } .br-w95 .v12 { height: 55%; } .br-w95 .v13 { height: 80%; } .br-w95 .v14 { height: 65%; background: #aaff00; } .br-w95 .v15 { height: 45%; } .br-w95 .v16 { height: 88%; background: #00ff00; opacity: 1; } .br-w95 .track-row { background: #000; color: #00ff00; font-family: 'VT323', monospace; font-size: 18px; padding: 3px 6px; overflow: hidden; white-space: nowrap; } .br-w95 .track-inner { animation: br-w95-marquee 10s linear infinite; display: inline-block; } .br-w95 .timer-row { display: flex; justify-content: space-between; padding: 0 4px; } .br-w95 .t-elapsed { font-family: 'VT323', monospace; font-size: 22px; color: #00ff00; letter-spacing: 2px; } .br-w95 .t-remaining { font-family: 'VT323', monospace; font-size: 22px; color: #006600; letter-spacing: 2px; } .br-w95 .t-flags { display: flex; gap: 3px; } .br-w95 .t-flags span { font-family: 'VT323', monospace; font-size: 14px; color: #008800; background: #001100; padding: 1px 4px; } .br-w95 .seek-wrap { height: 5px; background: #004400; margin: 0 4px; } .br-w95 .seek-fill { height: 100%; width: 50%; background: #00cc00; } .br-w95 .ctrl-row { display: flex; gap: 3px; justify-content: center; flex-wrap: wrap; } .br-w95 .winamp-btn { background: #222; color: #0f0; border: 1px solid #004400; font-size: 12px; padding: 2px 8px; cursor: pointer; font-family: 'VT323', monospace; } @media (max-width: 720px) { .br-w95 .win-sidebar { right: 8px; width: 180px; } .br-w95 .win-alert { transform: translateX(-50%); } .br-w95 .win-media { width: 280px; } } @media (prefers-reduced-motion: reduce) { .br-w95 .progress-fill, .br-w95 .marquee-inner, .br-w95 .track-inner, .br-w95 .blink { animation: none !important; } } ``` **JS:** ```js (() => { const root = document.querySelector('.br-w95'); if (!root) return; // Live clock const clock = root.querySelector('[data-br-w95-clock]'); function updateClock() { if (!clock) return; const now = new Date(); let h = now.getHours(), m = now.getMinutes(); const ampm = h >= 12 ? 'PM' : 'AM'; h = h % 12 || 12; clock.textContent = h + ':' + String(m).padStart(2, '0') + ' ' + ampm; } updateClock(); const clockInterval = setInterval(updateClock, 30000); // Draggable windows (scoped to the wrapper) let topZ = 50; root.querySelectorAll('[data-br-w95-win]').forEach(win => { const bar = win.querySelector('[data-br-w95-drag]'); if (!bar) return; let dx, dy, dragging = false; bar.addEventListener('mousedown', e => { // Ignore drag on the close/min/max buttons if (e.target.closest('.win-ctrl')) return; const rootRect = root.getBoundingClientRect(); const winRect = win.getBoundingClientRect(); dx = e.clientX - winRect.left; dy = e.clientY - winRect.top; win.style.left = (winRect.left - rootRect.left) + 'px'; win.style.top = (winRect.top - rootRect.top) + 'px'; win.style.right = 'auto'; win.style.bottom = 'auto'; win.style.transform = 'none'; win.style.zIndex = ++topZ; dragging = true; e.preventDefault(); }); document.addEventListener('mousemove', e => { if (!dragging) return; const rootRect = root.getBoundingClientRect(); let x = e.clientX - rootRect.left - dx; let y = e.clientY - rootRect.top - dy; x = Math.max(0, Math.min(rootRect.width - 40, x)); y = Math.max(0, Math.min(rootRect.height - 30, y)); win.style.left = x + 'px'; win.style.top = y + 'px'; }); document.addEventListener('mouseup', () => { dragging = false; }); }); })(); ``` ### 07. Long Read Editorial **Type:** Pure CSS **Description:** A full editorial layout built to make writing the only thing that matters. Three-column architecture: a fixed table of contents on the left (with the active article highlighted in yellow), a scrollable center article column, and a subscriber sidebar on the right — all separated by single-pixel ink rules, no decoration. The masthead is a rigid three-cell grid with the publication name center-framed between hairline borders. The article itself uses Libre Baskerville for body and display, a large drop cap, a yellow pull-quote block with a 6px left border, and an exposed byline strip with four data cells. The subscribe panel tracks 14,200 readers at 94% open rate with a focus-to-yellow input. Libre Baskerville + Schibsted Grotesk. Best for newsletter homepages, literary magazines, longform blogs, paid-subscription publications. **HTML:** ```html
Issue No. 47 · Jun 2025
THE LONG READ
Est. 2021 · Fortnightly

The Attention Economy
Is Eating Its Own Tail

When every platform optimises for engagement above all else, the resulting content becomes a mirror — reflecting not what we think, but what we feel compelled to click. And we are running out of things to say.

There is a particular kind of essay that dominates the internet right now. It begins with a hook — a surprising statistic, a confessional sentence, a rhetorical question — and then proceeds to build, paragraph by paragraph, toward a conclusion that the reader suspected before they began. The form is optimised not for insight but for the sensation of insight. The click is the product. The reading is incidental.1

This is not an accident. The platforms that host most of our public writing have spent fifteen years tuning their recommendation algorithms toward a single metric: time-on-site. Attention, captured and held, is the commodity being traded. What we call "content" is, in economic terms, a vehicle for delivering human attention to advertisers — and content that fails to capture attention is content that does not exist.

"The algorithm does not reward being right. It rewards being interesting — and these two things are increasingly, catastrophically at odds."

— Marcus Osei, Issue 47

The Feedback Loop

The problem is not simply that bad ideas spread. The problem is structural: when engagement is the metric, every writer faces a quiet, persistent pressure to make their work more engaging. Over time, this shapes not just tone but thought. You begin to notice which sentences make readers stop scrolling, and which do not. You begin to write more sentences that make readers stop scrolling. Before long, stopping the scroll becomes the thing the sentences are for.

The newsletter was supposed to fix this. Send your writing directly to readers who asked for it; no algorithm to appease, no feed to optimise for. And for a while, it did. But as newsletters multiplied, readers developed what one writer called "inbox fatigue" — the same exhaustion, the same half-reading, the same reach for the delete key. The medium changes; the attention problem does not.2

What Remains

The writers who have found something durable are, almost without exception, those who have made peace with being slow. They publish infrequently. They write long. They refuse to have opinions about things that happened in the last forty-eight hours. They treat their readers as people with enough time to think — which is, paradoxically, what makes their readers make time to think.

1 This essay is not exempt from the critique it contains. The irony is intentional, and uncomfortable.
2 "Platform Fatigue and the Illusion of Escape," Columbia Journalism Review, March 2024.
``` **CSS:** ```css /* ─── 07 Long Read Editorial — newsletter-style three-column ──── */ @import url('https://fonts.googleapis.com/css2?family=Libre+Baskerville:ital,wght@0,400;0,700;1,400&family=Schibsted+Grotesk:ital,wght@0,400;0,500;0,700;0,900;1,400&display=swap'); .br-lre { --br-lre-bg: #f7f4ee; --br-lre-ink: #0c0c0a; --br-lre-muted: #6b6860; --br-lre-yellow: #f0e614; --br-lre-red: #d41c00; --br-lre-rule: 1px solid #0c0c0a; position: relative; width: 100%; height: 820px; background: var(--br-lre-bg); color: var(--br-lre-ink); font-family: 'Schibsted Grotesk', system-ui, sans-serif; font-size: 16px; line-height: 1.5; overflow: hidden; box-sizing: border-box; } .br-lre *, .br-lre *::before, .br-lre *::after { box-sizing: border-box; margin: 0; padding: 0; } .br-lre .card { position: relative; width: 100%; height: 100%; display: flex; flex-direction: column; } /* Masthead */ .br-lre .masthead { border-bottom: 3px solid var(--br-lre-ink); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 0 32px; height: 52px; flex-shrink: 0; } .br-lre .masthead-left { font-size: 10px; letter-spacing: 3px; text-transform: uppercase; color: var(--br-lre-muted); } .br-lre .masthead-center { font-family: 'Libre Baskerville', Georgia, serif; font-size: 22px; font-weight: 700; letter-spacing: -0.5px; border-left: var(--br-lre-rule); border-right: var(--br-lre-rule); padding: 0 28px; height: 100%; display: flex; align-items: center; white-space: nowrap; } .br-lre .masthead-right { text-align: right; font-size: 10px; letter-spacing: 3px; text-transform: uppercase; color: var(--br-lre-muted); } /* Nav */ .br-lre .nav-strip { border-bottom: var(--br-lre-rule); display: flex; justify-content: center; gap: 0; height: 32px; flex-shrink: 0; } .br-lre .nav-item { font-family: 'Schibsted Grotesk', sans-serif; font-size: 10px; letter-spacing: 3px; text-transform: uppercase; padding: 0 20px; display: flex; align-items: center; border-left: var(--br-lre-rule); background: transparent; cursor: pointer; color: var(--br-lre-muted); transition: background 0.1s, color 0.1s; white-space: nowrap; } .br-lre .nav-item:last-child { border-right: var(--br-lre-rule); } .br-lre .nav-item:hover { background: var(--br-lre-ink); color: var(--br-lre-bg); } .br-lre .nav-item.active { background: var(--br-lre-yellow); color: var(--br-lre-ink); font-weight: 700; } /* Main grid */ .br-lre .content-grid { display: grid; grid-template-columns: 200px 1fr 260px; flex: 1; min-height: 0; } /* TOC */ .br-lre .toc { border-right: var(--br-lre-rule); padding: 28px 20px; overflow: hidden; } .br-lre .toc-head { font-size: 9px; letter-spacing: 4px; text-transform: uppercase; color: var(--br-lre-muted); border-bottom: var(--br-lre-rule); padding-bottom: 10px; margin-bottom: 16px; } .br-lre .toc-list { list-style: none; display: flex; flex-direction: column; } .br-lre .toc-item { border-bottom: 1px solid #e0dcd5; padding: 9px 0; cursor: pointer; } .br-lre .toc-num { font-family: 'Libre Baskerville', serif; font-size: 9px; color: var(--br-lre-muted); display: block; margin-bottom: 3px; font-style: italic; } .br-lre .toc-title { font-size: 11px; line-height: 1.35; color: var(--br-lre-ink); font-weight: 500; } .br-lre .toc-item:hover .toc-title { text-decoration: underline; text-underline-offset: 3px; } .br-lre .toc-item.featured .toc-title { font-weight: 700; background: var(--br-lre-yellow); padding: 1px 4px; margin: 0 -4px; } .br-lre .toc-section-label { font-size: 8px; letter-spacing: 3px; text-transform: uppercase; color: #bbb; margin: 14px 0 6px; } /* Article */ .br-lre .article-col { border-right: var(--br-lre-rule); overflow-y: auto; padding: 36px 48px 36px 44px; } .br-lre .article-col::-webkit-scrollbar { width: 6px; } .br-lre .article-col::-webkit-scrollbar-thumb { background: #ccc; } .br-lre .article-label { font-size: 9px; letter-spacing: 5px; text-transform: uppercase; color: var(--br-lre-red); font-weight: 700; margin-bottom: 14px; } .br-lre .article-h1 { font-family: 'Libre Baskerville', serif; font-size: clamp(28px, 3.2vw, 44px); line-height: 1.08; letter-spacing: -0.03em; color: var(--br-lre-ink); margin-bottom: 20px; font-weight: 700; } .br-lre .article-h1 em { font-style: italic; color: var(--br-lre-muted); } .br-lre .article-deck { font-size: 14px; line-height: 1.65; color: var(--br-lre-muted); border-left: 4px solid var(--br-lre-ink); padding-left: 16px; margin-bottom: 24px; font-style: italic; font-family: 'Libre Baskerville', serif; } .br-lre .byline { display: flex; align-items: center; border-top: var(--br-lre-rule); border-bottom: var(--br-lre-rule); margin-bottom: 28px; font-size: 10px; flex-wrap: wrap; } .br-lre .byline-cell { padding: 8px 14px; border-right: var(--br-lre-rule); letter-spacing: 1px; flex: 1; min-width: 120px; } .br-lre .byline-cell:last-child { border-right: none; } .br-lre .byline-cell strong { display: block; font-size: 11px; color: var(--br-lre-ink); margin-bottom: 1px; font-weight: 700; } .br-lre .byline-cell span { color: var(--br-lre-muted); } .br-lre .dropcap::first-letter { font-family: 'Libre Baskerville', serif; font-size: 5.4em; font-weight: 700; float: left; line-height: 0.78; padding-right: 10px; margin-top: 4px; color: var(--br-lre-ink); } .br-lre .body-p { font-size: 14px; line-height: 1.85; color: var(--br-lre-ink); margin-bottom: 18px; font-family: 'Libre Baskerville', serif; } .br-lre .body-p em { font-style: italic; } .br-lre .pull-quote { margin: 28px -20px; padding: 20px 24px; background: var(--br-lre-yellow); border-left: 6px solid var(--br-lre-ink); } .br-lre .pull-quote p { font-family: 'Libre Baskerville', serif; font-size: 20px; line-height: 1.35; font-style: italic; font-weight: 700; letter-spacing: -0.02em; color: var(--br-lre-ink); margin-bottom: 8px; } .br-lre .pull-quote cite { font-size: 9px; letter-spacing: 3px; text-transform: uppercase; color: var(--br-lre-muted); font-style: normal; } .br-lre .article-h2 { font-family: 'Schibsted Grotesk', sans-serif; font-size: 11px; font-weight: 900; letter-spacing: 4px; text-transform: uppercase; color: var(--br-lre-ink); margin: 28px 0 12px; display: flex; align-items: center; gap: 12px; } .br-lre .article-h2::before { content: ''; flex: 0 0 40px; height: 2px; background: var(--br-lre-ink); display: block; } .br-lre .footnote { font-size: 11px; font-family: 'Libre Baskerville', serif; font-style: italic; color: var(--br-lre-muted); border-top: 1px solid #ddd; padding-top: 10px; margin-top: 10px; line-height: 1.6; } .br-lre sup { font-size: 9px; color: var(--br-lre-red); font-style: normal; font-family: 'Schibsted Grotesk', sans-serif; vertical-align: super; } /* Sidebar */ .br-lre .sidebar { padding: 24px 20px; overflow-y: auto; display: flex; flex-direction: column; } .br-lre .sidebar::-webkit-scrollbar { width: 4px; } .br-lre .sidebar::-webkit-scrollbar-thumb { background: #ddd; } .br-lre .sidebar-block { border-bottom: var(--br-lre-rule); padding: 18px 0; } .br-lre .sidebar-block:first-child { padding-top: 0; } .br-lre .sidebar-block.last { border: none; } .br-lre .sb-label { font-size: 8px; letter-spacing: 4px; text-transform: uppercase; color: var(--br-lre-muted); margin-bottom: 12px; display: flex; align-items: center; gap: 8px; } .br-lre .sb-label::after { content: ''; flex: 1; height: 1px; background: #ddd; } .br-lre .subscribe-form { display: flex; flex-direction: column; gap: 6px; } .br-lre .sub-input { border: 1.5px solid var(--br-lre-ink); background: var(--br-lre-bg); font-family: 'Schibsted Grotesk', sans-serif; font-size: 11px; padding: 8px 10px; outline: none; color: var(--br-lre-ink); width: 100%; } .br-lre .sub-input::placeholder { color: #bbb; } .br-lre .sub-input:focus { background: var(--br-lre-yellow); } .br-lre .sub-btn { background: var(--br-lre-ink); color: var(--br-lre-bg); border: none; font-family: 'Schibsted Grotesk', sans-serif; font-size: 9px; font-weight: 900; letter-spacing: 3px; text-transform: uppercase; padding: 9px 14px; cursor: pointer; width: 100%; transition: background 0.1s; } .br-lre .sub-btn:hover { background: var(--br-lre-red); } .br-lre .sub-note { font-size: 9px; color: var(--br-lre-muted); line-height: 1.5; margin-top: 8px; } .br-lre .sub-count { font-size: 10px; color: var(--br-lre-ink); font-weight: 700; margin-bottom: 10px; } .br-lre .stat-row { display: flex; border: var(--br-lre-rule); margin-bottom: 10px; } .br-lre .stat-cell { flex: 1; padding: 8px 10px; border-right: var(--br-lre-rule); text-align: center; } .br-lre .stat-cell:last-child { border-right: none; } .br-lre .stat-val { font-weight: 900; font-size: 18px; display: block; } .br-lre .stat-lab { font-size: 8px; letter-spacing: 1px; color: var(--br-lre-muted); text-transform: uppercase; } .br-lre .recent-item { display: flex; flex-direction: column; gap: 3px; padding: 10px 0; border-bottom: 1px solid #e8e4dd; cursor: pointer; } .br-lre .recent-item:last-child { border-bottom: none; } .br-lre .ri-issue { font-size: 8px; letter-spacing: 2px; color: var(--br-lre-muted); text-transform: uppercase; } .br-lre .ri-title { font-size: 11px; font-family: 'Libre Baskerville', serif; line-height: 1.35; } .br-lre .ri-title:hover { text-decoration: underline; } .br-lre .ri-date { font-size: 9px; color: var(--br-lre-muted); } .br-lre .tag-cloud { display: flex; flex-wrap: wrap; gap: 4px; } .br-lre .tag { font-family: 'Schibsted Grotesk', sans-serif; font-size: 9px; letter-spacing: 2px; text-transform: uppercase; border: 1px solid var(--br-lre-ink); background: transparent; padding: 3px 8px; cursor: pointer; color: var(--br-lre-ink); transition: all 0.1s; } .br-lre .tag:hover, .br-lre .tag.active { background: var(--br-lre-ink); color: var(--br-lre-bg); } .br-lre .reading-time { font-size: 11px; color: var(--br-lre-muted); line-height: 2; } .br-lre .reading-time strong { color: var(--br-lre-ink); } @media (max-width: 900px) { .br-lre .content-grid { grid-template-columns: 1fr; } .br-lre .toc, .br-lre .sidebar { border-right: none; border-bottom: var(--br-lre-rule); } .br-lre .article-col { border-right: none; padding: 28px 24px; } .br-lre .masthead-center { font-size: 18px; padding: 0 16px; } .br-lre .pull-quote { margin: 22px 0; } } ``` ### 08. Streetwear Catalog **Type:** Pure CSS **Description:** A stark product catalog for a fictional high-concept fashion label — the kind that charges $1,240 for a coat and means it. Identity bar anchors with the brand name in tracked Syncopate caps, a season/collection label, and a righthand bag counter with a red notification dot. The filter bar is a raw horizontal strip of categories separated by hairlines; active state inverts to full black. The 4×2 product grid uses exposed 1px borders as the only structural language. Each card carries a CSS-sculpted garment silhouette (jacket lapels, trouser legs, hood bump, bag clasp) built entirely from geometric divs — no images. Hover reveals a size strip across the top and a quick-add bar sliding up from the bottom. Label tape uses three states: black for NEW, grey for LTD, red for SALE. The featured coat spans two columns with a giant ghost brand mark at 4% opacity. Familjen Grotesk + Syncopate. Best for fashion e-commerce, design-led product catalogs, lookbook-style stores. **HTML:** ```html
VCNM
SS25 — Void Collection
Filter:
24 pieces
New
XSSMLXL
VIEW →
+ QUICK ADD
Outerwear
Deconstructed Field Jacket
$680
REF.SS25-OW-04
XSSML
VIEW →
+ QUICK ADD
Tops
Raw Edge Shirt
$210
SS25-TP-11
28303234
VIEW →
+ QUICK ADD
Bottoms
Technical Cargo Pant
$295$420
SS25-BT-03
New
S M L XL
VIEW →
+ QUICK ADD
Tops
Seam-Exposed Hoodie
$340
SS25-TP-07
XSSML
VIEW →
+ QUICK ADD
Bottoms
Wide-Leg Twill Trouser
$380
SS25-BT-06
Sale
OS
VIEW →
+ QUICK ADD
Accessories
Structured Tote — Void
$195$280
SS25-AC-02
``` **CSS:** ```css /* ─── 08 Streetwear Catalog — VCNM SS25 Void Collection ──── */ @import url('https://fonts.googleapis.com/css2?family=Familjen+Grotesk:ital,wght@0,400;0,700;1,400&family=Syncopate:wght@400;700&display=swap'); .br-stw { --br-stw-bg: #f0ede8; --br-stw-ink: #0a0a0a; --br-stw-mid: #888; --br-stw-pale: #d8d4ce; --br-stw-red: #cc1100; --br-stw-rule: 1px solid #0a0a0a; position: relative; width: 100%; height: 820px; background: var(--br-stw-bg); color: var(--br-stw-ink); font-family: 'Familjen Grotesk', system-ui, sans-serif; overflow: hidden; box-sizing: border-box; } .br-stw *, .br-stw *::before, .br-stw *::after { box-sizing: border-box; margin: 0; padding: 0; } .br-stw .card { position: relative; width: 100%; height: 100%; display: flex; flex-direction: column; } /* Identity bar */ .br-stw .id-bar { border-bottom: 3px solid var(--br-stw-ink); display: flex; align-items: stretch; height: 44px; flex-shrink: 0; } .br-stw .id-brand { font-family: 'Syncopate', sans-serif; font-size: 16px; font-weight: 700; letter-spacing: 6px; text-transform: uppercase; padding: 0 28px; display: flex; align-items: center; border-right: 3px solid var(--br-stw-ink); white-space: nowrap; } .br-stw .id-season { font-size: 9px; letter-spacing: 5px; text-transform: uppercase; color: var(--br-stw-mid); padding: 0 20px; display: flex; align-items: center; border-right: var(--br-stw-rule); } .br-stw .id-meta { display: flex; align-items: center; gap: 0; margin-left: auto; } .br-stw .id-meta-item { background: transparent; border: none; border-left: var(--br-stw-rule); padding: 0 18px; font-family: 'Familjen Grotesk', sans-serif; font-size: 9px; letter-spacing: 3px; text-transform: uppercase; color: var(--br-stw-mid); height: 100%; display: flex; align-items: center; cursor: pointer; transition: background 0.1s, color 0.1s; } .br-stw .id-meta-item:hover { background: var(--br-stw-ink); color: var(--br-stw-bg); } .br-stw .id-meta-item.cart { color: var(--br-stw-ink); font-weight: 700; } .br-stw .cart-count { background: var(--br-stw-red); color: white; font-size: 8px; width: 16px; height: 16px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; margin-left: 6px; font-weight: 700; } /* Filter bar */ .br-stw .filter-bar { border-bottom: var(--br-stw-rule); display: flex; align-items: stretch; height: 36px; overflow-x: auto; flex-shrink: 0; } .br-stw .filter-bar::-webkit-scrollbar { display: none; } .br-stw .filter-label { font-size: 8px; letter-spacing: 4px; text-transform: uppercase; color: var(--br-stw-mid); padding: 0 16px; border-right: var(--br-stw-rule); display: flex; align-items: center; flex-shrink: 0; white-space: nowrap; } .br-stw .filter-pill { background: transparent; border: none; border-right: var(--br-stw-rule); font-family: 'Familjen Grotesk', sans-serif; font-size: 9px; letter-spacing: 3px; text-transform: uppercase; padding: 0 16px; display: flex; align-items: center; cursor: pointer; color: var(--br-stw-mid); transition: all 0.1s; white-space: nowrap; flex-shrink: 0; } .br-stw .filter-pill:hover { background: var(--br-stw-ink); color: var(--br-stw-bg); } .br-stw .filter-pill.active { background: var(--br-stw-ink); color: var(--br-stw-bg); } .br-stw .filter-right { margin-left: auto; display: flex; align-items: stretch; flex-shrink: 0; } .br-stw .sort-select { background: transparent; border: none; border-left: var(--br-stw-rule); font-family: 'Familjen Grotesk', sans-serif; font-size: 9px; letter-spacing: 2px; text-transform: uppercase; color: var(--br-stw-mid); padding: 0 16px; outline: none; cursor: pointer; -webkit-appearance: none; } .br-stw .count-tag { font-size: 8px; letter-spacing: 3px; color: var(--br-stw-mid); border-left: var(--br-stw-rule); padding: 0 16px; display: flex; align-items: center; white-space: nowrap; } /* Product grid */ .br-stw .product-grid { flex: 1; display: grid; grid-template-columns: repeat(4, 1fr); grid-template-rows: 1fr 1fr; overflow: hidden; min-height: 0; } .br-stw .product { border-right: var(--br-stw-rule); border-bottom: var(--br-stw-rule); position: relative; overflow: hidden; display: flex; flex-direction: column; cursor: pointer; } .br-stw .product:nth-child(4n) { border-right: none; } .br-stw .product:nth-child(n+5) { border-bottom: none; } .br-stw .product.product-tall { grid-row: 1 / 3; } .br-stw .product.featured { grid-column: 3 / 5; grid-row: 1 / 2; border-right: none; } /* Image zone backgrounds */ .br-stw .product-img { flex: 1; position: relative; overflow: hidden; background: var(--br-stw-pale); } .br-stw .p-dark { background: #1a1a1a; } .br-stw .p-cream { background: #e8e4de; } .br-stw .p-deep { background: #0d0d0d; } .br-stw .p-mid { background: #c8c4bc; } .br-stw .p-darker { background: #111; } .br-stw .p-light { background: #e0dbd4; } .br-stw .img-shape { position: absolute; inset: 0; } /* Jacket silhouette */ .br-stw .shape-jacket-body { position: absolute; width: 50%; height: 75%; background: #333; top: 50%; left: 50%; transform: translate(-50%, -50%); } .br-stw .shape-lapel-l { position: absolute; width: 18%; height: 32%; background: #222; top: 14%; left: 24%; transform: skewX(-8deg); } .br-stw .shape-lapel-r { position: absolute; width: 18%; height: 32%; background: #222; top: 14%; right: 24%; transform: skewX(8deg); } /* Shirt */ .br-stw .shape-shirt { position: absolute; width: 55%; height: 68%; background: #aaa8a2; top: 50%; left: 50%; transform: translate(-50%, -50%); } .br-stw .shape-pocket { position: absolute; width: 12%; height: 10%; background: #b5b2ac; top: 24%; left: 36%; border: 1px solid #999; } /* Featured coat */ .br-stw .shape-coat-body { position: absolute; width: 36%; height: 78%; background: #1a1a1a; top: 9%; left: 50%; transform: translateX(-50%); } .br-stw .shape-coat-shoulders { position: absolute; width: 52%; height: 14%; background: #1a1a1a; top: 9%; left: 50%; transform: translateX(-50%); } .br-stw .ghost-brand { position: absolute; bottom: 20px; left: 20px; font-family: 'Syncopate', sans-serif; font-size: 56px; font-weight: 700; color: rgba(255,255,255,0.04); line-height: 1; letter-spacing: -2px; pointer-events: none; } /* Trousers */ .br-stw .shape-trouser-l { position: absolute; width: 20%; height: 60%; background: #9a9590; bottom: 8%; left: 30%; } .br-stw .shape-trouser-r { position: absolute; width: 20%; height: 60%; background: #9a9590; bottom: 8%; right: 30%; } .br-stw .shape-trouser-waist { position: absolute; width: 44%; height: 18%; background: #9a9590; top: 18%; left: 28%; } /* Hoodie */ .br-stw .shape-hoodie { position: absolute; width: 58%; height: 70%; background: #1a1a1a; top: 50%; left: 50%; transform: translate(-50%, -50%); } .br-stw .shape-hood { position: absolute; width: 34%; height: 16%; background: #1a1a1a; border-radius: 50% 50% 0 0; top: 10%; left: 50%; transform: translateX(-50%); } .br-stw .shape-pouch { position: absolute; width: 28%; height: 11%; background: #222; bottom: 26%; left: 50%; transform: translateX(-50%); border: 1px solid #333; } /* Wide-leg */ .br-stw .shape-wide-l { position: absolute; width: 22%; height: 56%; background: #c4c0ba; bottom: 8%; left: 23%; transform: skewX(4deg); } .br-stw .shape-wide-r { position: absolute; width: 22%; height: 56%; background: #c4c0ba; bottom: 8%; right: 23%; transform: skewX(-4deg); } .br-stw .shape-wide-waist { position: absolute; width: 46%; height: 20%; background: #c4c0ba; top: 17%; left: 27%; } /* Bag */ .br-stw .shape-bag-body { position: absolute; width: 50%; height: 42%; background: #2a2a2a; top: 26%; left: 25%; } .br-stw .shape-bag-handle { position: absolute; width: 4%; height: 18%; background: #333; top: 10%; left: 48%; } .br-stw .shape-bag-clasp { position: absolute; width: 12%; height: 5%; background: #555; top: 24%; left: 44%; border: 1px solid #666; } /* Label tape */ .br-stw .product-label-tape { position: absolute; top: 12px; left: 0; background: var(--br-stw-red); color: white; font-size: 8px; letter-spacing: 3px; text-transform: uppercase; font-weight: 700; padding: 3px 10px; z-index: 2; } .br-stw .product-label-tape.new { background: var(--br-stw-ink); } .br-stw .product-label-tape.ltd { background: #666; } .br-stw .product-label-tape.sale { background: var(--br-stw-red); } /* Quick add */ .br-stw .quick-add { position: absolute; bottom: 0; left: 0; right: 0; background: var(--br-stw-ink); color: var(--br-stw-bg); font-size: 9px; letter-spacing: 3px; text-transform: uppercase; font-weight: 700; padding: 10px; text-align: center; transform: translateY(100%); transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1); cursor: pointer; } .br-stw .quick-add.invert { background: white; color: var(--br-stw-ink); } .br-stw .product:hover .quick-add { transform: translateY(0); } /* Size peek */ .br-stw .size-peek { position: absolute; top: 10px; right: 10px; display: flex; gap: 3px; opacity: 0; transition: opacity 0.15s; z-index: 2; } .br-stw .product:hover .size-peek { opacity: 1; } .br-stw .sz { background: var(--br-stw-bg); font-size: 7px; letter-spacing: 1px; padding: 2px 5px; color: var(--br-stw-ink); border: 1px solid var(--br-stw-ink); font-weight: 700; } .br-stw .sz.out { background: transparent; color: var(--br-stw-mid); border-color: var(--br-stw-mid); text-decoration: line-through; } .br-stw .sz.dark-sz { background: rgba(255,255,255,0.08); color: #fff; border-color: #333; } .br-stw .sz.dark-sz.out { background: transparent; color: #555; border-color: #333; } /* Drag hint */ .br-stw .drag-hint { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); font-family: 'Syncopate', sans-serif; font-size: 8px; letter-spacing: 4px; text-transform: uppercase; opacity: 0; transition: opacity 0.2s; pointer-events: none; text-align: center; color: rgba(255,255,255,0.7); mix-blend-mode: difference; } .br-stw .product:hover .drag-hint { opacity: 0.5; } /* Info strip */ .br-stw .product-info { padding: 10px 12px 12px; border-top: var(--br-stw-rule); background: var(--br-stw-bg); display: flex; flex-direction: column; gap: 4px; } .br-stw .p-cat { font-size: 7px; letter-spacing: 3px; text-transform: uppercase; color: var(--br-stw-mid); } .br-stw .p-name { font-family: 'Syncopate', sans-serif; font-size: 10px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; line-height: 1.2; } .br-stw .p-bottom { display: flex; justify-content: space-between; align-items: baseline; margin-top: 2px; } .br-stw .p-price { font-size: 13px; font-weight: 700; letter-spacing: -0.5px; } .br-stw .p-price.big { font-size: 22px; } .br-stw .p-price.sale { color: var(--br-stw-red); } .br-stw .p-price-orig { font-size: 10px; color: var(--br-stw-mid); text-decoration: line-through; margin-left: 4px; } .br-stw .p-ref { font-size: 8px; color: var(--br-stw-mid); letter-spacing: 1px; } .br-stw .p-ref.ref-right { text-align: right; display: block; } .br-stw .featured .p-name { font-size: 14px; } .br-stw .featured-info { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 0 16px; } .br-stw .featured-info .p-cat { grid-column: 1 / -1; } @media (max-width: 900px) { .br-stw .product-grid { grid-template-columns: repeat(2, 1fr); grid-template-rows: repeat(4, minmax(220px, 1fr)); } .br-stw .product:nth-child(4n) { border-right: var(--br-stw-rule); } .br-stw .product:nth-child(2n) { border-right: none; } .br-stw .product:nth-child(n+5) { border-bottom: var(--br-stw-rule); } .br-stw .product.product-tall { grid-row: auto; } .br-stw .product.featured { grid-column: 1 / 3; grid-row: auto; border-right: none; } .br-stw .id-meta-item:not(.cart) { display: none; } } @media (prefers-reduced-motion: reduce) { .br-stw .quick-add, .br-stw .size-peek, .br-stw .drag-hint { transition: none; } } ``` --- ## 22 CSS Button Group Designs URL: https://codefronts.com/components/css-button-groups/ Description: 22 dynamic CSS button groups with motion-driven interactions — plasma loops, holographic gradients, magnetic discs, wormhole tabs, particle aurora. Pure CSS or light JS, copy-paste ready. Demo count: 22 ### 01. Liquid Mercury **Type:** Pure CSS **Description:** Three options on a viscous mercury rail. The thumb morphs its border-radius asymmetrically as it slides — the kind of animation curve a human would never hand-author. **HTML:** ```html
Billing period
``` **CSS:** ```css .cbgp-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; } .cbgp-mercury { display: inline-flex; position: relative; padding: 4px; background: radial-gradient(ellipse at 30% 30%, #1a1a2a 0%, #0a0a14 100%); border: 1px solid rgba(220,225,230,0.08); border-radius: 999px; box-shadow: inset 0 2px 6px rgba(0,0,0,0.5), 0 1px 0 rgba(255,255,255,0.04); } .cbgp-mercury input { appearance: none; -webkit-appearance: none; position: absolute; opacity: 0; } .cbgp-mercury label { flex: 1 1 0; min-width: 88px; position: relative; z-index: 1; padding: 9px 18px; text-align: center; font: 700 11px/1 ui-monospace, monospace; letter-spacing: 0.18em; color: rgba(220,225,230,0.5); cursor: pointer; transition: color 0.4s; border-radius: 999px; } .cbgp-mercury input:checked + label { color: #0a0a14; } .cbgp-mercury-thumb { position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc(33.333% - 2.667px); background: radial-gradient(ellipse at 30% 30%, #f5f5fa 0%, #cad3da 50%, #6a7480 100%); border-radius: 60% 40% 50% 50% / 50% 50% 40% 60%; z-index: 0; box-shadow: inset 0 1px 0 rgba(255,255,255,0.6), inset 0 -2px 4px rgba(0,0,0,0.25), 0 2px 8px rgba(220,225,230,0.18); transition: transform 0.55s cubic-bezier(.68,-0.4,.32,1.4), border-radius 0.6s cubic-bezier(.65,0,.35,1); } #cbgp-mercury-2:checked ~ .cbgp-mercury-thumb { transform: translateX(100%); border-radius: 50% 60% 50% 50% / 60% 40% 60% 40%; } #cbgp-mercury-3:checked ~ .cbgp-mercury-thumb { transform: translateX(200%); border-radius: 40% 60% 60% 40% / 50% 50% 50% 50%; } ``` ### 02. Subgrid Beam **Type:** Pure CSS **Description:** Three actions on a single subgrid track with a luminous beam underline that physically moves between buttons on hover, drawn with a single shared pseudo-element. **HTML:** ```html
``` **CSS:** ```css .cbgp-beam { display: inline-grid; grid-template-columns: repeat(3, minmax(96px, 1fr)); position: relative; background: rgba(8,10,18,0.85); border: 1px solid rgba(255,255,255,0.06); border-radius: 12px; overflow: hidden; box-shadow: inset 0 1px 0 rgba(255,255,255,0.04), 0 8px 22px rgba(0,0,0,0.45); } .cbgp-beam::before { content: ''; position: absolute; bottom: 0; left: 0; width: 33.333%; height: 2px; background: linear-gradient(90deg, transparent, #00ffe0 30%, #ff5af1 70%, transparent); filter: blur(0.4px); transition: transform 0.45s cubic-bezier(.65,0,.35,1); pointer-events: none; } .cbgp-beam button { padding: 11px 18px; border: 0; cursor: pointer; background: transparent; color: rgba(220,225,230,0.65); font: 600 12px/1 ui-sans-serif, system-ui; letter-spacing: 0.04em; transition: color 0.25s, background 0.25s; } .cbgp-beam button + button { border-left: 1px solid rgba(255,255,255,0.04); } .cbgp-beam button:hover { color: #fff; background: rgba(0,255,224,0.04); } .cbgp-beam:has(button:nth-child(2):hover)::before { transform: translateX(100%); } .cbgp-beam:has(button:nth-child(3):hover)::before { transform: translateX(200%); } .cbgp-beam button:focus-visible { outline: 2px solid #00ffe0; outline-offset: -2px; } ``` ### 03. Acid Tags **Type:** Pure CSS **Description:** Multi-select chips with an acid-green glow halo that radiates outward when checked. Each chip carries a unique pulse phase so the row feels alive without being noisy. **HTML:** ```html
Filters
``` **CSS:** ```css .cbgp-acid { display: inline-flex; flex-wrap: wrap; gap: 8px; border: 0; padding: 0; margin: 0; } .cbgp-acid input { appearance: none; -webkit-appearance: none; position: absolute; opacity: 0; } .cbgp-acid label { display: inline-block; cursor: pointer; } .cbgp-acid span { display: inline-block; padding: 7px 14px; background: rgba(8,10,18,0.85); border: 1px solid rgba(168,255,184,0.2); border-radius: 999px; color: rgba(220,225,230,0.6); font: 600 11px/1 ui-monospace, monospace; letter-spacing: 0.06em; position: relative; transition: background 0.25s, border-color 0.25s, color 0.25s, box-shadow 0.4s; } .cbgp-acid label:hover span { color: rgba(220,225,230,0.9); border-color: rgba(168,255,184,0.4); } .cbgp-acid input:checked + span { background: rgba(60,200,90,0.12); border-color: #3eff7f; color: #c8ffd6; box-shadow: 0 0 0 3px rgba(62,255,127,0.08), 0 0 18px rgba(62,255,127,0.35); } .cbgp-acid input:focus-visible + span { outline: 2px solid #3eff7f; outline-offset: 2px; } ``` ### 04. Quantum Split **Type:** Pure CSS **Description:** Primary action with a sibling menu that opens via native details/summary. The split chevron rotates 180° and the menu materialises with a clip-path reveal — no JS. **HTML:** ```html
``` **CSS:** ```css .cbgp-quantum { display: inline-flex; position: relative; background: linear-gradient(135deg, #0a0a14 0%, #14141d 100%); border: 1px solid rgba(255,255,255,0.08); border-radius: 10px; overflow: visible; box-shadow: 0 8px 22px rgba(0,0,0,0.4); } .cbgp-quantum-main { padding: 11px 22px; border: 0; cursor: pointer; background: linear-gradient(135deg, rgba(0,255,224,0.18) 0%, rgba(255,90,241,0.18) 100%); color: #fff; font: 700 12px/1 ui-monospace, monospace; letter-spacing: 0.18em; text-transform: uppercase; border-radius: 10px 0 0 10px; border-right: 1px solid rgba(255,255,255,0.1); text-shadow: 0 0 8px rgba(0,255,224,0.3); transition: filter 0.2s; } .cbgp-quantum-main:hover { filter: brightness(1.18); } .cbgp-quantum-menu summary { list-style: none; cursor: pointer; padding: 11px 14px; display: flex; align-items: center; border-radius: 0 10px 10px 0; transition: background 0.18s; } .cbgp-quantum-menu summary::-webkit-details-marker { display: none; } .cbgp-quantum-menu summary svg { width: 12px; height: 12px; fill: none; stroke: #00ffe0; stroke-width: 2; transition: transform 0.3s cubic-bezier(.65,0,.35,1); } .cbgp-quantum-menu summary:hover { background: rgba(0,255,224,0.06); } .cbgp-quantum-menu[open] summary { background: rgba(0,255,224,0.1); } .cbgp-quantum-menu[open] summary svg { transform: rotate(180deg); } .cbgp-quantum-list { position: absolute; right: 0; top: calc(100% + 6px); min-width: 200px; background: linear-gradient(135deg, #0a0a14 0%, #14141d 100%); border: 1px solid rgba(0,255,224,0.25); border-radius: 8px; padding: 4px; z-index: 10; box-shadow: 0 12px 32px rgba(0,0,0,0.55), 0 0 24px rgba(0,255,224,0.08); clip-path: inset(0 0 0 0 round 8px); animation: cbgp-quantum-in 0.25s cubic-bezier(.65,0,.35,1); } @keyframes cbgp-quantum-in { from { clip-path: inset(0 0 100% 0 round 8px); opacity: 0; } to { clip-path: inset(0 0 0 0 round 8px); opacity: 1; } } .cbgp-quantum-list button { display: block; width: 100%; padding: 9px 14px; border: 0; cursor: pointer; background: transparent; color: rgba(220,225,230,0.85); font: 500 12px/1 ui-sans-serif, system-ui; text-align: left; border-radius: 5px; transition: background 0.15s, color 0.15s; } .cbgp-quantum-list button:hover { background: rgba(0,255,224,0.08); color: #fff; } ``` ### 05. Cellular Toggle **Type:** Pure CSS **Description:** Format toggles where checking a cell fills it with a swirling conic gradient anchored to its center. Hover prefills the conic with a faint preview. **HTML:** ```html
Text formatting
``` **CSS:** ```css @property --cbgp-cell-a { syntax: ''; initial-value: 0deg; inherits: false; } .cbgp-cell { display: inline-flex; gap: 4px; border: 0; padding: 6px; background: rgba(8,10,18,0.85); border-radius: 12px; border: 1px solid rgba(255,255,255,0.05); } .cbgp-cell input { appearance: none; -webkit-appearance: none; position: absolute; opacity: 0; } .cbgp-cell label { display: block; cursor: pointer; } .cbgp-cell span { --cbgp-cell-a: 0deg; display: flex; align-items: center; justify-content: center; width: 38px; height: 38px; background: conic-gradient(from var(--cbgp-cell-a), transparent 0deg, transparent 200deg, rgba(255,90,241,0.28) 260deg, rgba(0,255,224,0.32) 320deg, transparent 360deg), rgba(20,22,30,0.85); border: 1px solid rgba(255,255,255,0.08); border-radius: 8px; font: 700 14px/1 'Times New Roman', serif; color: rgba(220,225,230,0.6); transition: --cbgp-cell-a 0.55s cubic-bezier(.65,0,.35,1), color 0.25s, border-color 0.25s; } .cbgp-cell label:hover span { color: rgba(220,225,230,0.9); --cbgp-cell-a: 180deg; } .cbgp-cell input:checked + span { --cbgp-cell-a: 360deg; color: #fff; border-color: rgba(0,255,224,0.5); box-shadow: 0 0 16px rgba(0,255,224,0.2); } .cbgp-cell input:focus-visible + span { outline: 2px solid #00ffe0; outline-offset: -2px; } ``` ### 06. Pixel Matrix **Type:** Pure CSS **Description:** Pagination styled as a tiny LED matrix display. Each page is a "pixel cluster"; the active page lights up like a real 7-segment with phosphor glow. **HTML:** ```html ``` **CSS:** ```css .cbgp-pixel { display: inline-flex; gap: 3px; padding: 6px; background: radial-gradient(ellipse at 50% 100%, rgba(0,255,224,0.06), transparent 70%), #050810; border: 1px solid rgba(0,255,224,0.15); border-radius: 6px; box-shadow: inset 0 0 12px rgba(0,255,224,0.05), 0 4px 14px rgba(0,0,0,0.5); } .cbgp-pixel button { min-width: 32px; height: 32px; padding: 0 8px; border: 1px solid rgba(0,255,224,0.18); background: radial-gradient(circle at center, rgba(0,255,224,0.06) 0%, transparent 70%), #0a0d18; color: rgba(220,225,230,0.55); font: 800 12px/1 ui-monospace, monospace; cursor: pointer; border-radius: 3px; transition: all 0.18s; } .cbgp-pixel button:hover { border-color: rgba(0,255,224,0.5); color: #c8fffa; background: radial-gradient(circle at center, rgba(0,255,224,0.16) 0%, transparent 70%), #0a0d18; } .cbgp-pixel button[aria-current="page"] { background: radial-gradient(circle at center, #00ffe0 0%, #00b8a8 70%); border-color: #00ffe0; color: #001f1c; box-shadow: 0 0 14px rgba(0,255,224,0.6), inset 0 0 6px rgba(255,255,255,0.4); text-shadow: 0 0 4px rgba(0,255,224,0.6); } .cbgp-pixel button[aria-disabled="true"] { opacity: 0.3; cursor: not-allowed; background: transparent; border-color: rgba(0,255,224,0.08); } .cbgp-pixel button[aria-disabled="true"]:hover { border-color: rgba(0,255,224,0.08); color: rgba(220,225,230,0.55); } .cbgp-pixel button:focus-visible { outline: 2px solid #00ffe0; outline-offset: 2px; } ``` ### 07. Gradient Flow **Type:** Pure CSS **Description:** Multi-step wizard where the "done" line is a flowing gradient (not a static fill) — the light visibly travels through the completed segments toward the current step. **HTML:** ```html
  1. 1Cart
  2. 2Address
  3. 3Payment
  4. 4Review
``` **CSS:** ```css .cbgp-flow { display: inline-flex; gap: 0; list-style: none; padding: 0; margin: 0; } .cbgp-flow li { display: flex; align-items: center; gap: 10px; padding: 6px 0; font: 700 11px/1 ui-monospace, monospace; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(220,225,230,0.4); position: relative; } .cbgp-flow li:not(:last-child) { padding-right: 56px; } .cbgp-flow li:not(:last-child)::after { content: ''; position: absolute; right: 8px; top: 50%; width: 36px; height: 2px; background: rgba(255,255,255,0.08); transform: translateY(-50%); border-radius: 1px; } .cbgp-flow li.is-done::after { background: linear-gradient(90deg, #00ffe0 0%, #ff5af1 100%) 0% 0% / 200% 100%; animation: cbgp-flow-shift 2.4s linear infinite; box-shadow: 0 0 8px rgba(0,255,224,0.5); } @keyframes cbgp-flow-shift { 0% { background-position: 200% 0%; } 100% { background-position: 0% 0%; } } .cbgp-flow-num { display: flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; background: #0a0d18; border: 1.5px solid rgba(255,255,255,0.1); font: 800 11px/1 ui-monospace, monospace; color: rgba(220,225,230,0.4); transition: all 0.3s; } .cbgp-flow li.is-done .cbgp-flow-num { background: linear-gradient(135deg, #00ffe0, #00b8a8); border-color: #00ffe0; color: #001f1c; box-shadow: 0 0 10px rgba(0,255,224,0.4); } .cbgp-flow li.is-current .cbgp-flow-num { background: linear-gradient(135deg, #ff5af1, #c43cb8); border-color: #ff5af1; color: #1a0518; box-shadow: 0 0 0 4px rgba(255,90,241,0.18), 0 0 16px rgba(255,90,241,0.4); color: #fff; } .cbgp-flow li.is-current { color: #ff5af1; } .cbgp-flow li.is-done { color: rgba(0,255,224,0.85); } @media (prefers-reduced-motion: reduce) { .cbgp-flow li.is-done::after { animation: none; } } ``` ### 08. Holographic Dial **Type:** Pure CSS **Description:** Icon segmented control where the active icon is filled with a moving conic-gradient holographic sheen. Hover shifts the gradient phase before commit. **HTML:** ```html
View mode
``` **CSS:** ```css @property --cbgp-holo-a { syntax: ''; initial-value: 0deg; inherits: false; } .cbgp-holo { display: inline-flex; gap: 0; border: 1px solid rgba(255,255,255,0.06); background: rgba(8,10,18,0.85); border-radius: 10px; overflow: hidden; padding: 3px; } .cbgp-holo input { appearance: none; -webkit-appearance: none; position: absolute; opacity: 0; } .cbgp-holo label { --cbgp-holo-a: 0deg; display: flex; align-items: center; justify-content: center; width: 44px; height: 40px; cursor: pointer; border-radius: 8px; background: conic-gradient(from var(--cbgp-holo-a), transparent 0deg, transparent 240deg, rgba(0,255,224,0) 260deg, rgba(0,255,224,0.3) 290deg, rgba(255,90,241,0.3) 320deg, rgba(255,90,241,0) 350deg, transparent 360deg); transition: --cbgp-holo-a 0.7s cubic-bezier(.65,0,.35,1), background 0.3s; } .cbgp-holo svg { width: 16px; height: 16px; fill: none; stroke: rgba(220,225,230,0.5); stroke-width: 1.8; stroke-linecap: round; transition: stroke 0.25s; } .cbgp-holo label:hover { --cbgp-holo-a: 180deg; } .cbgp-holo label:hover svg { stroke: rgba(220,225,230,0.85); } .cbgp-holo input:checked + label { --cbgp-holo-a: 360deg; background: conic-gradient(from var(--cbgp-holo-a), rgba(0,255,224,0.32), rgba(255,90,241,0.32), rgba(255,200,80,0.28), rgba(0,255,224,0.32)); box-shadow: 0 0 14px rgba(0,255,224,0.18); } .cbgp-holo input:checked + label svg { stroke: #fff; } .cbgp-holo input:focus-visible + label { outline: 2px solid #00ffe0; outline-offset: -2px; } ``` ### 09. Stack Tower **Type:** Pure CSS **Description:** Vertical action column where each row pushes 8px deeper on hover, and the whole stack rotates 1° in 3D. SVG icons recolor with a gradient stroke. **HTML:** ```html
``` **CSS:** ```css .cbgp-tower { display: inline-flex; flex-direction: column; background: rgba(8,10,18,0.92); border: 1px solid rgba(255,255,255,0.06); border-radius: 10px; overflow: hidden; min-width: 200px; perspective: 600px; transform-style: preserve-3d; transition: transform 0.4s cubic-bezier(.65,0,.35,1); box-shadow: 0 12px 32px rgba(0,0,0,0.5); } .cbgp-tower:hover { transform: rotateY(-3deg) rotateX(2deg); } .cbgp-tower button { display: flex; align-items: center; gap: 12px; padding: 11px 16px; border: 0; border-bottom: 1px solid rgba(255,255,255,0.04); background: transparent; color: rgba(220,225,230,0.85); font: 600 13px/1 ui-sans-serif, system-ui; cursor: pointer; text-align: left; transition: background 0.2s, transform 0.3s cubic-bezier(.65,0,.35,1); } .cbgp-tower button:last-child { border-bottom: 0; } .cbgp-tower button:hover { background: linear-gradient(90deg, rgba(0,255,224,0.06), rgba(255,90,241,0.04)); color: #fff; transform: translateZ(8px); } .cbgp-tower svg { width: 14px; height: 14px; flex-shrink: 0; fill: none; stroke: rgba(0,255,224,0.7); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: stroke 0.2s; } .cbgp-tower button:hover svg { stroke: #00ffe0; } .cbgp-tower button:focus-visible { outline: 2px solid #00ffe0; outline-offset: -2px; } ``` ### 10. Orbital FAB **Type:** Pure CSS **Description:** A FAB that fans out three satellite buttons on click — but they arc into position along a curved path, not a straight line. The main button rotates and pulses an outer ring. **HTML:** ```html ``` **CSS:** ```css .cbgp-orbit { position: relative; width: 60px; height: 60px; } .cbgp-orbit-toggle { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; } .cbgp-orbit-main, .cbgp-orbit-child { position: absolute; display: flex; align-items: center; justify-content: center; text-decoration: none; cursor: pointer; user-select: none; } .cbgp-orbit-main { z-index: 2; bottom: 0; left: 0; width: 56px; height: 56px; border-radius: 50%; background: radial-gradient(circle at 30% 30%, #00ffe0 0%, #006e62 100%); color: #001f1c; box-shadow: 0 0 0 0 rgba(0,255,224,0.4), 0 8px 22px rgba(0,255,224,0.35), inset 0 -3px 6px rgba(0,0,0,0.25); transition: transform 0.4s cubic-bezier(.34,1.56,.64,1), box-shadow 0.3s; } .cbgp-orbit-plus { font: 800 28px/1 ui-monospace, monospace; transition: transform 0.4s cubic-bezier(.34,1.56,.64,1); } .cbgp-orbit-ring { position: absolute; inset: -4px; border-radius: 50%; border: 2px solid #00ffe0; opacity: 0; transition: opacity 0.3s, transform 0.6s cubic-bezier(.65,0,.35,1); } .cbgp-orbit-toggle:focus-visible + .cbgp-orbit-main { outline: 2px solid #ff5af1; outline-offset: 4px; } .cbgp-orbit-toggle:checked + .cbgp-orbit-main { box-shadow: 0 0 0 4px rgba(0,255,224,0.18), 0 8px 28px rgba(0,255,224,0.55), inset 0 -3px 6px rgba(0,0,0,0.25); } .cbgp-orbit-toggle:checked + .cbgp-orbit-main .cbgp-orbit-plus { transform: rotate(135deg); } .cbgp-orbit-toggle:checked + .cbgp-orbit-main .cbgp-orbit-ring { opacity: 1; transform: scale(1.4); } .cbgp-orbit-child { z-index: 1; bottom: 8px; left: 8px; width: 40px; height: 40px; border-radius: 50%; background: rgba(8,10,18,0.92); border: 1.5px solid rgba(0,255,224,0.4); color: #00ffe0; font-size: 14px; opacity: 0; pointer-events: none; transform: scale(0.4); transition: transform 0.5s cubic-bezier(.34,1.56,.64,1), opacity 0.3s, background 0.2s; } .cbgp-orbit-child svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; } .cbgp-orbit-toggle:checked ~ .cbgp-orbit-child { opacity: 1; pointer-events: auto; } /* Curved arc deployment: each child arrives at a different angle around the FAB */ .cbgp-orbit-toggle:checked ~ .cbgp-orbit-c1 { transform: translate(0, -68px) scale(1); } .cbgp-orbit-toggle:checked ~ .cbgp-orbit-c2 { transform: translate(50px, -50px) scale(1); } .cbgp-orbit-toggle:checked ~ .cbgp-orbit-c3 { transform: translate(68px, 0) scale(1); } .cbgp-orbit-child:hover { background: rgba(0,255,224,0.18); border-color: #00ffe0; color: #c8fffa; } @media (prefers-reduced-motion: reduce) { .cbgp-orbit-main, .cbgp-orbit-child, .cbgp-orbit-plus, .cbgp-orbit-ring { transition: none; } } ``` ### 11. Glitch Grid **Type:** Pure CSS **Description:** Filter buttons where the active state ghosts a cyan/magenta RGB-split clone of itself, vibrating subtly on hover. Brutalist meets cyberpunk. **HTML:** ```html
``` **CSS:** ```css .cbgp-glitch { display: inline-flex; background: #050810; border: 2px solid #00ffe0; box-shadow: 4px 4px 0 #ff5af1; transition: transform 0.1s, box-shadow 0.1s; } .cbgp-glitch button { padding: 11px 20px; border: 0; border-right: 2px solid rgba(0,255,224,0.3); cursor: pointer; background: transparent; color: #00ffe0; font: 800 11px/1 ui-monospace, monospace; letter-spacing: 0.18em; position: relative; transition: color 0.15s, background 0.15s; } .cbgp-glitch button::before, .cbgp-glitch button::after { content: attr(data-text, ''); position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; pointer-events: none; opacity: 0; } .cbgp-glitch button:last-child { border-right: 0; } .cbgp-glitch button:hover { background: rgba(0,255,224,0.08); } .cbgp-glitch button.is-on { background: linear-gradient(90deg, rgba(0,255,224,0.18), rgba(255,90,241,0.18)); color: #fff; text-shadow: -1.2px 0 #ff5af1, 1.2px 0 #00ffe0; } .cbgp-glitch button:focus-visible { outline: 2px solid #ff5af1; outline-offset: -2px; } .cbgp-glitch:focus-within { transform: translate(-1px,-1px); box-shadow: 5px 5px 0 #ff5af1; } ``` ### 12. Plasma Pill **Type:** Pure CSS **Description:** A glassmorphic pill that always carries a slowly rotating conic plasma loop behind it via @property — the kind of motion that feels alive without being noisy. **HTML:** ```html
``` **CSS:** ```css @property --cbgp-plasma-a { syntax: ''; initial-value: 0deg; inherits: false; } .cbgp-plasma-wrap { display: inline-block; padding: 24px 28px; background: radial-gradient(ellipse at 30% 30%, #1a0a2a 0%, #050810 100%); border-radius: 20px; } .cbgp-plasma { position: relative; display: inline-flex; padding: 5px; background: rgba(8,10,18,0.7); border: 1px solid rgba(255,255,255,0.08); border-radius: 999px; -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); isolation: isolate; --cbgp-plasma-a: 0deg; animation: cbgp-plasma-spin 8s linear infinite; } @keyframes cbgp-plasma-spin { to { --cbgp-plasma-a: 360deg; } } .cbgp-plasma::before { content: ''; position: absolute; inset: -2px; border-radius: inherit; background: conic-gradient( from var(--cbgp-plasma-a), #00ffe0, #ff5af1, #ffd479, #00ffe0); filter: blur(10px); z-index: -1; opacity: 0.85; } .cbgp-plasma::after { content: ''; position: absolute; inset: 0; border-radius: inherit; background: rgba(8,10,18,0.85); z-index: -1; } .cbgp-plasma button { padding: 9px 22px; border: 0; cursor: pointer; background: transparent; color: rgba(220,225,230,0.85); font: 700 12px/1 ui-monospace, monospace; letter-spacing: 0.14em; text-transform: uppercase; border-radius: 999px; transition: background 0.25s, color 0.25s; } .cbgp-plasma button + button { border-left: 1px solid rgba(255,255,255,0.06); } .cbgp-plasma button:hover { background: rgba(255,255,255,0.06); color: #fff; } .cbgp-plasma button:focus-visible { outline: 2px solid rgba(0,255,224,0.7); outline-offset: -2px; } @media (prefers-reduced-motion: reduce) { .cbgp-plasma { animation: none; } } ``` ### 13. Pulse Reactor **Type:** Pure CSS **Description:** A radar-style action bar — clicking any button activates it AND emits a circular shockwave that ripples outward across the whole bar. Active button stays lit. **HTML:** ```html ``` **CSS:** ```css .cbgp-pulse { display: inline-flex; gap: 4px; padding: 6px; background: radial-gradient(ellipse at 50% 0%, #0a1a3a 0%, #050810 60%); border: 1px solid rgba(0,255,224,0.18); border-radius: 6px; position: relative; overflow: hidden; } .cbgp-pulse input { appearance: none; -webkit-appearance: none; position: absolute; opacity: 0; } .cbgp-pulse label { padding: 9px 16px; background: rgba(0,255,224,0.04); border: 1px solid rgba(0,255,224,0.18); color: rgba(0,255,224,0.7); font: 800 10px/1 ui-monospace, monospace; letter-spacing: 0.16em; cursor: pointer; border-radius: 3px; position: relative; transition: background 0.18s, color 0.18s, border-color 0.18s, box-shadow 0.25s; } .cbgp-pulse label::before { content: ''; position: absolute; inset: 50% 50%; border-radius: 50%; border: 2px solid #00ffe0; opacity: 0; pointer-events: none; } .cbgp-pulse label:hover { background: rgba(0,255,224,0.08); color: #c8fffa; border-color: rgba(0,255,224,0.4); } .cbgp-pulse input:checked + label { background: linear-gradient(180deg, #00ffe0, #00b8a8); color: #001f1c; border-color: #00ffe0; box-shadow: 0 0 18px rgba(0,255,224,0.55), inset 0 -2px 4px rgba(0,0,0,0.2); text-shadow: 0 1px 0 rgba(255,255,255,0.4); } .cbgp-pulse input:checked + label::before { animation: cbgp-pulse-out 0.7s cubic-bezier(.3,1,.5,1); } @keyframes cbgp-pulse-out { 0% { inset: 50% 50%; opacity: 0.85; } 100% { inset: -50% -50%; opacity: 0; } } .cbgp-pulse input:focus-visible + label { outline: 2px solid #ff5af1; outline-offset: 2px; } ``` ### 14. Solar Flare **Type:** Pure CSS **Description:** Date-range presets where a warm solar glow follows your cursor across the bar. Active range gets a permanent flare; the moving glow is pure CSS via --mx custom prop. **HTML:** ```html
Date range
``` **CSS:** ```css .cbgp-flare { --mx: -200px; display: inline-flex; gap: 0; border: 0; padding: 0; background: radial-gradient(circle 80px at var(--mx) 50%, rgba(255,200,80,0.18), transparent 70%), rgba(8,10,18,0.92); border: 1px solid rgba(255,200,80,0.18); border-radius: 10px; overflow: hidden; position: relative; } .cbgp-flare input { appearance: none; -webkit-appearance: none; position: absolute; opacity: 0; } .cbgp-flare label { padding: 11px 18px; font: 700 11px/1 ui-monospace, monospace; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(220,225,230,0.5); cursor: pointer; position: relative; transition: color 0.25s; border-right: 1px solid rgba(255,255,255,0.04); } .cbgp-flare label:last-of-type { border-right: 0; } .cbgp-flare label::after { content: ''; position: absolute; left: 14px; right: 14px; bottom: 5px; height: 2px; background: linear-gradient(90deg, #ffc850, #ff5af1); border-radius: 2px; opacity: 0; transform: scaleX(0.4); transition: opacity 0.3s, transform 0.3s cubic-bezier(.65,0,.35,1); box-shadow: 0 0 8px rgba(255,200,80,0.6); } .cbgp-flare label:hover { color: #ffd479; } .cbgp-flare input:checked + label { color: #fff; } .cbgp-flare input:checked + label::after { opacity: 1; transform: scaleX(1); } .cbgp-flare input:focus-visible + label { outline: 2px solid #ffc850; outline-offset: -2px; border-radius: 6px; } ``` ### 15. Bio-Decision **Type:** Pure CSS **Description:** A two-button row where each button has a different "voice": reject shakes when hovered (negative pull), approve emits a particle burst on click via a single mask-image pseudo-element. **HTML:** ```html
``` **CSS:** ```css .cbgp-bio { display: inline-flex; gap: 10px; } .cbgp-bio button { display: inline-flex; align-items: center; gap: 8px; padding: 11px 20px; border-radius: 10px; cursor: pointer; font: 700 12px/1 ui-monospace, monospace; letter-spacing: 0.14em; text-transform: uppercase; position: relative; transition: transform 0.18s, box-shadow 0.25s; } .cbgp-bio svg { width: 14px; height: 14px; fill: none; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; } .cbgp-bio-no { background: rgba(255,90,90,0.08); border: 1px solid rgba(255,90,90,0.4); color: #ff7a7a; } .cbgp-bio-no svg { stroke: #ff7a7a; } .cbgp-bio-no:hover { background: rgba(255,90,90,0.18); animation: cbgp-bio-shake 0.4s cubic-bezier(.36,.07,.19,.97) infinite; } @keyframes cbgp-bio-shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-2px); } 75% { transform: translateX(2px); } } .cbgp-bio-yes { background: linear-gradient(135deg, #00ffa8, #00b8e0); border: 1px solid transparent; color: #001f1c; text-shadow: 0 1px 0 rgba(255,255,255,0.4); } .cbgp-bio-yes svg { stroke: #001f1c; } .cbgp-bio-yes:hover { box-shadow: 0 0 24px rgba(0,255,168,0.5); } .cbgp-bio-yes::before { content: ''; position: absolute; inset: -8px; border-radius: inherit; background: radial-gradient(circle, rgba(0,255,168,0.6) 0%, transparent 70%); opacity: 0; pointer-events: none; } .cbgp-bio-yes:active::before { animation: cbgp-bio-burst 0.6s ease-out; } @keyframes cbgp-bio-burst { 0% { transform: scale(0.6); opacity: 0.85; } 100% { transform: scale(1.6); opacity: 0; } } .cbgp-bio button:focus-visible { outline: 2px solid #00ffa8; outline-offset: 3px; } @media (prefers-reduced-motion: reduce) { .cbgp-bio-no:hover { animation: none; } } ``` ### 16. Ferro Toolbar **Type:** Pure CSS **Description:** Icon toolbar where icons subtly tilt toward your cursor as you sweep across — pure CSS, driven by --mx via inline style on the parent. No JS required. **HTML:** ```html ``` **CSS:** ```css .cbgp-ferro { --mx: 0; display: inline-flex; gap: 4px; align-items: center; padding: 6px; background: linear-gradient(135deg, #0a0a14 0%, #14141d 100%); border: 1px solid rgba(255,255,255,0.06); border-radius: 10px; perspective: 600px; box-shadow: 0 8px 22px rgba(0,0,0,0.4); } .cbgp-ferro button { width: 36px; height: 36px; border: 0; cursor: pointer; background: transparent; border-radius: 8px; display: flex; align-items: center; justify-content: center; transition: transform 0.4s cubic-bezier(.65,0,.35,1), background 0.2s; transform: rotateY(calc(var(--mx) * 18deg)); } .cbgp-ferro button:hover { background: rgba(0,255,224,0.08); } .cbgp-ferro button:focus-visible { outline: 2px solid #00ffe0; outline-offset: -2px; } .cbgp-ferro svg { width: 14px; height: 14px; fill: none; stroke: rgba(220,225,230,0.65); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: stroke 0.2s; } .cbgp-ferro button:hover svg { stroke: #00ffe0; } .cbgp-ferro-divider { width: 1px; height: 22px; background: linear-gradient(180deg, transparent, rgba(0,255,224,0.5), transparent); margin: 0 4px; } ``` ### 17. Magnetic Disc **Type:** Pure CSS **Description:** Three pricing tiers as a slowly rotating disc — each disc carries a tier; hover slows the rotation and lifts the front disc, click snaps it forward. **HTML:** ```html
``` **CSS:** ```css @property --cbgp-disc-a { syntax: ''; initial-value: 0deg; inherits: false; } .cbgp-disc { position: relative; width: 160px; height: 72px; perspective: 800px; transform-style: preserve-3d; --cbgp-disc-a: 0deg; animation: cbgp-disc-spin 12s linear infinite; } @keyframes cbgp-disc-spin { to { --cbgp-disc-a: 360deg; } } .cbgp-disc:hover { animation-play-state: paused; } .cbgp-disc button { position: absolute; inset: 0; border: 1px solid rgba(255,255,255,0.08); cursor: pointer; border-radius: 14px; font: 800 13px/1 ui-monospace, monospace; letter-spacing: 0.18em; text-transform: uppercase; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,0.4); transform-style: preserve-3d; transition: transform 0.4s cubic-bezier(.34,1.56,.64,1), box-shadow 0.3s; box-shadow: inset 0 1px 0 rgba(255,255,255,0.18), 0 6px 18px rgba(0,0,0,0.35); backface-visibility: hidden; } .cbgp-disc-1 { background: linear-gradient(135deg, #00ffe0, #006e62); transform: rotateY(var(--cbgp-disc-a)) translateZ(36px); } .cbgp-disc-2 { background: linear-gradient(135deg, #ff5af1, #6e1a6a); transform: rotateY(calc(var(--cbgp-disc-a) + 120deg)) translateZ(36px); } .cbgp-disc-3 { background: linear-gradient(135deg, #ffd479, #b87333); transform: rotateY(calc(var(--cbgp-disc-a) + 240deg)) translateZ(36px); color: #1a0a14; } .cbgp-disc button:focus-visible { outline: 2px solid #00ffe0; outline-offset: 6px; } @media (prefers-reduced-motion: reduce) { .cbgp-disc { animation: none; } } ``` ### 18. Plasma Combo **Type:** Light JS **Description:** A dropdown trigger with a neon plasma border that pulses subtly. The list reveals via a clip-path slide; selection plays a scanline flash on the chosen option. **HTML:** ```html
``` **CSS:** ```css .cbgp-combo { position: relative; display: inline-block; } .cbgp-combo-trigger { display: inline-flex; align-items: center; gap: 12px; padding: 11px 16px; background: linear-gradient(135deg, #0a0a14 0%, #14141d 100%); border: 1px solid #00ffe0; border-radius: 10px; color: #c8fffa; font: 600 12px/1 ui-monospace, monospace; letter-spacing: 0.08em; cursor: pointer; position: relative; box-shadow: 0 0 12px rgba(0,255,224,0.15), inset 0 0 0 1px rgba(0,255,224,0.1); transition: box-shadow 0.25s, color 0.2s; } .cbgp-combo-trigger:hover { box-shadow: 0 0 22px rgba(0,255,224,0.35), inset 0 0 0 1px rgba(0,255,224,0.2); color: #fff; } .cbgp-combo-trigger:focus-visible { outline: 2px solid #ff5af1; outline-offset: 3px; } .cbgp-combo-trigger svg { width: 11px; height: 11px; fill: none; stroke: #00ffe0; stroke-width: 2; transition: transform 0.3s cubic-bezier(.65,0,.35,1); } .cbgp-combo-trigger[aria-expanded="true"] svg { transform: rotate(180deg); } .cbgp-combo-list { position: absolute; top: calc(100% + 6px); left: 0; right: 0; margin: 0; padding: 4px; list-style: none; background: linear-gradient(135deg, #0a0a14 0%, #14141d 100%); border: 1px solid rgba(0,255,224,0.4); border-radius: 10px; z-index: 10; box-shadow: 0 12px 32px rgba(0,0,0,0.55), 0 0 24px rgba(0,255,224,0.1); animation: cbgp-combo-in 0.28s cubic-bezier(.65,0,.35,1); } @keyframes cbgp-combo-in { from { clip-path: inset(0 0 100% 0 round 10px); opacity: 0; } to { clip-path: inset(0 0 0 0 round 10px); opacity: 1; } } .cbgp-combo-list li { padding: 8px 14px; font: 600 12px/1 ui-monospace, monospace; color: rgba(200,255,250,0.7); cursor: pointer; border-radius: 6px; letter-spacing: 0.06em; transition: background 0.15s, color 0.15s; } .cbgp-combo-list li[aria-selected="true"] { color: #00ffe0; background: rgba(0,255,224,0.08); } .cbgp-combo-list li:hover { background: rgba(0,255,224,0.15); color: #fff; } ``` **JS:** ```js /* Plasma combobox dropdown — toggle aria-expanded; click outside or Escape to close. */ document.querySelectorAll('[data-cbgp-combo]').forEach(function (trigger) { var list = trigger.parentElement.querySelector('.cbgp-combo-list'); var label = trigger.querySelector('span'); if (!list) return; function open() { list.hidden = false; trigger.setAttribute('aria-expanded', 'true'); } function close() { list.hidden = true; trigger.setAttribute('aria-expanded', 'false'); } trigger.addEventListener('click', function (e) { e.stopPropagation(); list.hidden ? open() : close(); }); trigger.addEventListener('keydown', function (e) { if (e.key === 'Escape') { close(); trigger.focus(); } }); 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'); if (label) label.textContent = label.textContent.split(': ')[0] + ': ' + li.textContent; close(); }); document.addEventListener('click', close); }); ``` ### 19. Kinetic Trio **Type:** Light JS **Description:** Three icon actions where the active button morphs into a confirmation pill, expands in width, and plays a gradient flow before snapping back. Layout shift handled with CSS grid auto-flow. **HTML:** ```html
``` **CSS:** ```css .cbgp-kinetic { display: inline-flex; gap: 6px; padding: 5px; background: linear-gradient(135deg, #0a0a14 0%, #14141d 100%); border: 1px solid rgba(255,255,255,0.06); border-radius: 10px; } .cbgp-kinetic button { display: inline-flex; align-items: center; gap: 7px; padding: 9px 16px; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08); border-radius: 8px; color: rgba(220,225,230,0.85); font: 600 12px/1 ui-monospace, monospace; letter-spacing: 0.08em; cursor: pointer; transition: all 0.4s cubic-bezier(.34,1.56,.64,1); white-space: nowrap; } .cbgp-kinetic button:hover { background: rgba(0,255,224,0.06); border-color: rgba(0,255,224,0.4); color: #fff; } .cbgp-kinetic svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.4s cubic-bezier(.34,1.56,.64,1); } .cbgp-kinetic button.is-flash { background: linear-gradient(90deg, #00ffe0, #ff5af1) 0% 0% / 200% 100%; border-color: transparent; color: #001f1c; animation: cbgp-kinetic-shift 1.4s linear; text-shadow: 0 1px 0 rgba(255,255,255,0.4); } .cbgp-kinetic button.is-flash svg { transform: scale(1.2); } @keyframes cbgp-kinetic-shift { from { background-position: 200% 0%; } to { background-position: 0% 0%; } } .cbgp-kinetic button:focus-visible { outline: 2px solid #00ffe0; outline-offset: 3px; } ``` **JS:** ```js /* Kinetic action buttons — morphing flash on click. */ document.querySelectorAll('[data-cbgp-kinetic-flash]').forEach(function (btn) { var label = btn.querySelector('span'); var msg = btn.dataset.cbgpKineticFlash; var orig = label ? label.textContent : ''; btn.addEventListener('click', function () { if (btn.classList.contains('is-flash')) return; btn.classList.add('is-flash'); if (label) label.textContent = msg; setTimeout(function () { btn.classList.remove('is-flash'); if (label) label.textContent = orig; }, 1400); }); }); ``` ### 20. Synthwave Dial **Type:** Light JS **Description:** Quantity stepper as a synthwave-grid dial — chrome +/− buttons with a scanline window that morphs to magenta when the count hits max, cyan when it hits min. **HTML:** ```html
``` **CSS:** ```css .cbgp-syn { display: inline-flex; align-items: stretch; background: linear-gradient(180deg, #0a0a14 0%, #050810 100%); border: 1px solid #ff5af1; border-radius: 8px; overflow: hidden; box-shadow: 0 0 14px rgba(255,90,241,0.25); } .cbgp-syn button { width: 42px; height: 42px; border: 0; cursor: pointer; background: linear-gradient(180deg, rgba(255,255,255,0.08), transparent), rgba(8,10,18,0.92); color: #ff5af1; font: 800 18px/1 ui-monospace, monospace; text-shadow: 0 0 6px rgba(255,90,241,0.6); transition: background 0.18s, color 0.18s; } .cbgp-syn button:hover { background: rgba(255,90,241,0.12); color: #ffaaf0; } .cbgp-syn button:focus-visible { outline: 2px solid #00ffe0; outline-offset: -2px; } .cbgp-syn button:disabled { opacity: 0.3; cursor: not-allowed; } .cbgp-syn button:disabled:hover { background: rgba(8,10,18,0.92); color: #ff5af1; } .cbgp-syn input { width: 64px; border: 0; outline: none; background: repeating-linear-gradient(0deg, transparent 0 4px, rgba(0,255,224,0.06) 4px 5px), #0a0a14; color: #00ffe0; font: 800 16px/1 ui-monospace, monospace; text-align: center; text-shadow: 0 0 6px rgba(0,255,224,0.5); border-left: 1px solid rgba(255,90,241,0.3); border-right: 1px solid rgba(255,90,241,0.3); -moz-appearance: textfield; } .cbgp-syn input::-webkit-outer-spin-button, .cbgp-syn input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; } .cbgp-syn.is-min input { color: #00ffe0; box-shadow: inset 0 0 16px rgba(0,255,224,0.3); } .cbgp-syn.is-max input { color: #ff5af1; box-shadow: inset 0 0 16px rgba(255,90,241,0.4); } ``` **JS:** ```js /* Synthwave-stepper — clamp + classify min/max state for color shift. */ document.querySelectorAll('.cbgp-syn').forEach(function (group) { var input = group.querySelector('[data-cbgp-syn]'); var minus = group.querySelector('[data-cbgp-syn-step="-1"]'); var plus = group.querySelector('[data-cbgp-syn-step="1"]'); if (!input) return; function update() { var min = Number(input.min) || -Infinity; var max = Number(input.max) || Infinity; var val = Number(input.value) || 0; if (minus) minus.disabled = val <= min; if (plus) plus.disabled = val >= max; group.classList.toggle('is-min', val <= min); group.classList.toggle('is-max', val >= max); } group.querySelectorAll('[data-cbgp-syn-step]').forEach(function (btn) { btn.addEventListener('click', function () { var dir = parseInt(btn.dataset.cbgpSynStep, 10) || 0; var min = Number(input.min) || -Infinity; var max = Number(input.max) || Infinity; var val = (Number(input.value) || 0) + dir; input.value = String(Math.max(min, Math.min(max, val))); update(); }); }); input.addEventListener('input', update); update(); }); ``` ### 21. Wormhole Tabs **Type:** Pure CSS **Description:** Tab nav where the active indicator stretches into a trailing wormhole as it moves between tabs — implemented via :has() and a single shared pseudo-element with smooth width interpolation. **HTML:** ```html
Settings sections
``` **CSS:** ```css .cbgp-worm { display: grid; grid-template-columns: repeat(4, 1fr); position: relative; border: 0; padding: 0 0 10px; width: 100%; max-width: 460px; border-bottom: 1px solid rgba(255,255,255,0.08); } .cbgp-worm input { appearance: none; -webkit-appearance: none; position: absolute; opacity: 0; } .cbgp-worm label { padding: 12px 8px 14px; font: 700 11px/1 ui-monospace, monospace; letter-spacing: 0.18em; text-transform: uppercase; color: rgba(220,225,230,0.5); cursor: pointer; position: relative; text-align: center; transition: color 0.25s; } .cbgp-worm label::after { content: ''; position: absolute; left: 50%; bottom: -1px; width: 0; height: 3px; transform: translateX(-50%); background: linear-gradient(90deg, transparent, #00ffe0 30%, #ff5af1 70%, transparent); border-radius: 2px; transition: width 0.5s cubic-bezier(.65,0,.35,1); box-shadow: 0 0 14px rgba(0,255,224,0.6); } .cbgp-worm label:hover { color: rgba(220,225,230,0.85); } .cbgp-worm input:checked + label { color: #fff; } .cbgp-worm input:checked + label::after { width: 100%; } .cbgp-worm input:focus-visible + label { outline: 2px solid #00ffe0; outline-offset: -2px; border-radius: 4px; } ``` ### 22. Aurora Dust **Type:** Pure CSS **Description:** Three premium tier buttons floating on a particle-aurora field — drifting blobs of cyan / magenta / gold via animated background-positions, layered noise, and a subtle hover-lift. **HTML:** ```html
``` **CSS:** ```css .cbgp-dust { position: relative; display: inline-flex; padding: 6px; background: #050810; border: 1px solid rgba(255,255,255,0.06); border-radius: 14px; overflow: hidden; isolation: isolate; } .cbgp-dust::before { content: ''; position: absolute; inset: -50%; background: radial-gradient(circle 70px at 20% 30%, rgba(0,255,224,0.55), transparent 60%), radial-gradient(circle 60px at 60% 70%, rgba(255,90,241,0.5), transparent 60%), radial-gradient(circle 80px at 90% 40%, rgba(255,212,121,0.45), transparent 60%), radial-gradient(circle 50px at 30% 80%, rgba(0,184,232,0.5), transparent 60%); filter: blur(20px); z-index: -1; animation: cbgp-dust-drift 12s ease-in-out infinite; } .cbgp-dust::after { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(45deg, rgba(255,255,255,0.012) 0 1px, transparent 1px 3px), rgba(5,8,16,0.5); z-index: -1; } @keyframes cbgp-dust-drift { 0%, 100% { transform: translate(0, 0) rotate(0deg); } 33% { transform: translate(-6%, 4%) rotate(2deg); } 66% { transform: translate(4%, -3%) rotate(-2deg); } } .cbgp-dust button { padding: 11px 22px; border: 0; cursor: pointer; background: transparent; color: rgba(220,225,230,0.7); font: 700 12px/1 ui-monospace, monospace; letter-spacing: 0.16em; text-transform: uppercase; border-radius: 10px; position: relative; transition: background 0.25s, color 0.25s, transform 0.3s; } .cbgp-dust button:hover { color: #fff; background: rgba(255,255,255,0.06); transform: translateY(-1px); } .cbgp-dust button.is-on { background: rgba(8,10,18,0.6); color: #fff; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); box-shadow: inset 0 1px 0 rgba(255,255,255,0.08); } .cbgp-dust button:focus-visible { outline: 2px solid #00ffe0; outline-offset: 3px; } @media (prefers-reduced-motion: reduce) { .cbgp-dust::before { animation: none !important; } } ``` --- ## 27 CSS Button Hover Effects URL: https://codefronts.com/motion/css-button-hover-effects/ Description: 27 hand-coded CSS button hover effects — 3D press, neon glow, gradient slide, border draw, liquid fill, ripple, glitch text, and kinetic flips. Every demo is pure CSS (no JavaScript, no framework), tuned for 60fps with transform and opacity, and respects prefers-reduced-motion out of the box. Demo count: 27 ### 01. Minimalist Border & Outline Drawing Hover Effects **Type:** Pure CSS **Description:** Four editorial ghost-button techniques on a paper-and-ink palette — an SVG perimeter stroke that draws itself via stroke-dasharray, corner brackets that expand into a full border, a vertical scaleY background wipe, and split borders sliding in from both edges. Restrained, quiet, considered. Best for corporate sites, agency portfolios, and minimalist editorial layouts. **HTML:** ```html
Discover Perimeter Draw
Corner Expand
Background Wipe
Split Reveal
``` **CSS:** ```css .bhe-mbo { --bhe-mbo-bg: #f4f1ea; --bhe-mbo-ink: #1a1a1a; --bhe-mbo-muted: #6b6b6b; --bhe-mbo-line: #1a1a1a; --bhe-mbo-accent: #c4452e; display: flex; align-items: center; justify-content: center; background: var(--bhe-mbo-bg); color: var(--bhe-mbo-ink); font-family: 'Georgia', 'Times New Roman', serif; padding: 3rem 2rem; min-height: 320px; box-sizing: border-box; } .bhe-mbo *, .bhe-mbo *::before, .bhe-mbo *::after { box-sizing: border-box; } .bhe-mbo__row { display: flex; flex-wrap: wrap; gap: 2.5rem; justify-content: center; } .bhe-mbo__cell { display: flex; flex-direction: column; align-items: center; gap: 0.7rem; } .bhe-mbo__label { font-size: 0.7rem; letter-spacing: 0.15em; color: var(--bhe-mbo-muted); text-transform: uppercase; } .bhe-mbo__btn { position: relative; font-family: inherit; font-size: 0.95rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--bhe-mbo-ink); background: transparent; border: none; padding: 1.1rem 2.6rem; cursor: pointer; overflow: hidden; display: inline-block; } /* 1: SVG perimeter draw */ .bhe-mbo__draw svg { position: absolute; inset: 0; width: 100%; height: 100%; fill: none; stroke: var(--bhe-mbo-ink); stroke-width: 1.5; } .bhe-mbo__draw rect { stroke-dasharray: 50 350; stroke-dashoffset: 50; transition: stroke-dashoffset 0.8s cubic-bezier(0.7, 0, 0.2, 1), stroke-dasharray 0.8s cubic-bezier(0.7, 0, 0.2, 1); } .bhe-mbo__draw:hover rect { stroke-dasharray: 400 0; stroke-dashoffset: -100; } /* 2: corners expand to full border */ .bhe-mbo__corners::before, .bhe-mbo__corners::after { content: ''; position: absolute; width: 14px; height: 14px; transition: width 0.35s ease, height 0.35s ease; } .bhe-mbo__corners::before { top: 0; left: 0; border-top: 1.5px solid var(--bhe-mbo-accent); border-left: 1.5px solid var(--bhe-mbo-accent); } .bhe-mbo__corners::after { bottom: 0; right: 0; border-bottom: 1.5px solid var(--bhe-mbo-accent); border-right: 1.5px solid var(--bhe-mbo-accent); } .bhe-mbo__corners:hover::before, .bhe-mbo__corners:hover::after { width: 100%; height: 100%; } .bhe-mbo__corners:hover { color: var(--bhe-mbo-accent); } /* 3: background wipe up */ .bhe-mbo__wipe { border: 1px solid var(--bhe-mbo-line); z-index: 0; } .bhe-mbo__wipe::before { content: ''; position: absolute; inset: 0; background: var(--bhe-mbo-ink); transform: scaleY(0); transform-origin: bottom; z-index: -1; transition: transform 0.4s cubic-bezier(0.7, 0, 0.2, 1); } .bhe-mbo__wipe span { transition: color 0.4s; } .bhe-mbo__wipe:hover::before { transform: scaleY(1); } .bhe-mbo__wipe:hover span { color: var(--bhe-mbo-bg); } /* 4: split border slide */ .bhe-mbo__split span { position: relative; z-index: 2; transition: color 0.4s; } .bhe-mbo__split::before, .bhe-mbo__split::after { content: ''; position: absolute; top: 0; height: 100%; width: 0; background: var(--bhe-mbo-accent); transition: width 0.35s ease; } .bhe-mbo__split::before { left: 0; } .bhe-mbo__split::after { right: 0; } .bhe-mbo__split:hover::before, .bhe-mbo__split:hover::after { width: 50%; } .bhe-mbo__split:hover span { color: var(--bhe-mbo-bg); } @media (prefers-reduced-motion: reduce) { .bhe-mbo__draw rect, .bhe-mbo__corners::before, .bhe-mbo__corners::after, .bhe-mbo__wipe::before, .bhe-mbo__wipe span, .bhe-mbo__split::before, .bhe-mbo__split::after, .bhe-mbo__split span { transition: none; } } ``` ### 02. Modern 3D Skeuomorphic Button Press Effects **Type:** Pure CSS **Description:** Tangible buttons that lift on hover and sink on :active — a hard-plastic press with layered solid shadow, a soft neumorphic inset press, a 3D tilt slab, and a glossy depth pill. Physical, satisfying, and intentionally over-engineered. Best for Web3 dashboards, gaming landing pages, pricing tables, and any UI that should feel like it has weight. **HTML:** ```html
Hard Plastic
Soft Neumorphic
3D Tilt Slab
Glossy Pill
``` **CSS:** ```css .bhe-3sk { --bhe-3sk-bg: #e8ebf0; --bhe-3sk-ink: #2a2d34; --bhe-3sk-muted: #7c818c; --bhe-3sk-primary: #5b6ef5; --bhe-3sk-primary-dark: #3a48b8; --bhe-3sk-green: #2bb673; --bhe-3sk-green-dark: #1c8a55; --bhe-3sk-surface: #f6f7fb; --bhe-3sk-shadow-light: #ffffff; --bhe-3sk-shadow-dark: #c4c9d4; background: var(--bhe-3sk-bg); color: var(--bhe-3sk-ink); font-family: 'Trebuchet MS', 'Segoe UI', sans-serif; display: flex; flex-wrap: wrap; gap: 3rem; align-items: center; justify-content: center; padding: 3rem 2rem; min-height: 320px; box-sizing: border-box; } .bhe-3sk *, .bhe-3sk *::before, .bhe-3sk *::after { box-sizing: border-box; } .bhe-3sk__cell { display: flex; flex-direction: column; align-items: center; gap: 1.2rem; } .bhe-3sk__label { font-size: 0.72rem; letter-spacing: 0.12em; color: var(--bhe-3sk-muted); text-transform: uppercase; } .bhe-3sk__btn { font-family: inherit; font-weight: 700; font-size: 1rem; cursor: pointer; border: none; } /* 1: hard plastic press */ .bhe-3sk__plastic { background: var(--bhe-3sk-primary); color: #fff; padding: 1rem 2.4rem; border-radius: 14px; box-shadow: 0 8px 0 var(--bhe-3sk-primary-dark), 0 14px 22px rgba(0,0,0,0.35); transition: transform 0.12s ease, box-shadow 0.12s ease; } .bhe-3sk__plastic:hover { transform: translateY(-3px); box-shadow: 0 11px 0 var(--bhe-3sk-primary-dark), 0 20px 28px rgba(0,0,0,0.4); } .bhe-3sk__plastic:active { transform: translateY(8px); box-shadow: 0 0 0 var(--bhe-3sk-primary-dark), 0 4px 10px rgba(0,0,0,0.3); } /* 2: neumorphic soft press */ .bhe-3sk__neu { background: var(--bhe-3sk-surface); color: var(--bhe-3sk-ink); padding: 1.1rem 2.6rem; border-radius: 16px; box-shadow: 6px 6px 14px var(--bhe-3sk-shadow-dark), -6px -6px 14px var(--bhe-3sk-shadow-light); transition: box-shadow 0.25s ease, transform 0.25s ease; } .bhe-3sk__neu:hover { box-shadow: 8px 8px 18px var(--bhe-3sk-shadow-dark), -8px -8px 18px var(--bhe-3sk-shadow-light); transform: translateY(-2px); } .bhe-3sk__neu:active { box-shadow: inset 5px 5px 12px var(--bhe-3sk-shadow-dark), inset -5px -5px 12px var(--bhe-3sk-shadow-light); transform: translateY(0); color: var(--bhe-3sk-primary); } /* 3: 3D tilt slab */ .bhe-3sk__slab { background: var(--bhe-3sk-green); color: #fff; padding: 1rem 2.4rem; border-radius: 10px; box-shadow: -6px 6px 0 var(--bhe-3sk-green-dark); transition: transform 0.2s ease, box-shadow 0.2s ease; } .bhe-3sk__slab:hover { transform: translate(3px,-3px); box-shadow: -9px 9px 0 var(--bhe-3sk-green-dark); } .bhe-3sk__slab:active { transform: translate(-6px,6px); box-shadow: 0 0 0 var(--bhe-3sk-green-dark); } /* 4: glossy pill */ .bhe-3sk__pill { position: relative; background: linear-gradient(180deg, #ff8a5b, #ef5a3c); color: #fff; padding: 1.05rem 2.8rem; border-radius: 40px; box-shadow: 0 6px 0 #b83a22, 0 12px 24px rgba(184,58,34,0.45), inset 0 2px 2px rgba(255,255,255,0.5); transition: transform 0.14s ease, box-shadow 0.14s ease; } .bhe-3sk__pill:hover { transform: translateY(-2px); box-shadow: 0 8px 0 #b83a22, 0 16px 30px rgba(184,58,34,0.5), inset 0 2px 2px rgba(255,255,255,0.5); } .bhe-3sk__pill:active { transform: translateY(6px); box-shadow: 0 0 0 #b83a22, 0 4px 12px rgba(184,58,34,0.4), inset 0 2px 2px rgba(255,255,255,0.5); } @media (prefers-reduced-motion: reduce) { .bhe-3sk__plastic, .bhe-3sk__neu, .bhe-3sk__slab, .bhe-3sk__pill { transition: none; } } ``` ### 03. Neo-Brutalist & Cyberpunk Button Glow Effects **Type:** Pure CSS **Description:** Loud, attention-grabbing CTA effects on a high-contrast yellow surface — brutalist offset-shadow shift, cyberpunk cyan neon glow, a skewed glitch via filter: drop-shadow(), and an animated gradient border clip. Made for bold tech startups, Web3 launches, and creative agencies whose brand can carry the volume. **HTML:** ```html
Brutalist Shift
Cyberpunk Glow
Glitch Shadow
Gradient Clip
``` **CSS:** ```css .bhe-ncg { --bhe-ncg-bg: #f5f54a; --bhe-ncg-ink: #000000; --bhe-ncg-surface: #ffffff; --bhe-ncg-muted: #333; --bhe-ncg-neon: #ff2e88; --bhe-ncg-cyan: #00fff0; background: var(--bhe-ncg-bg); color: var(--bhe-ncg-ink); font-family: 'Courier New', monospace; display: flex; flex-wrap: wrap; gap: 3rem; align-items: center; justify-content: center; padding: 3rem 2rem; min-height: 320px; box-sizing: border-box; } .bhe-ncg *, .bhe-ncg *::before, .bhe-ncg *::after { box-sizing: border-box; } .bhe-ncg__cell { display: flex; flex-direction: column; align-items: center; gap: 1.2rem; } .bhe-ncg__label { font-size: 0.7rem; letter-spacing: 0.1em; color: var(--bhe-ncg-muted); text-transform: uppercase; font-weight: 700; } .bhe-ncg__btn { font-family: inherit; font-weight: 800; font-size: 1rem; cursor: pointer; text-transform: uppercase; letter-spacing: 0.05em; } /* 1: brutalist offset shadow */ .bhe-ncg__brutal { background: var(--bhe-ncg-surface); color: var(--bhe-ncg-ink); border: 3px solid var(--bhe-ncg-ink); padding: 1rem 2.4rem; box-shadow: 6px 6px 0 var(--bhe-ncg-ink); transition: transform 0.12s ease, box-shadow 0.12s ease; } .bhe-ncg__brutal:hover { transform: translate(-3px,-3px); box-shadow: 9px 9px 0 var(--bhe-ncg-neon); } .bhe-ncg__brutal:active { transform: translate(6px,6px); box-shadow: 0 0 0 var(--bhe-ncg-ink); } /* 2: neon glow */ .bhe-ncg__neon { background: transparent; color: var(--bhe-ncg-cyan); border: 2px solid var(--bhe-ncg-cyan); padding: 1rem 2.4rem; text-shadow: 0 0 4px var(--bhe-ncg-cyan); transition: 0.3s; } .bhe-ncg__neon:hover { background: var(--bhe-ncg-cyan); color: #001f1d; box-shadow: 0 0 8px var(--bhe-ncg-cyan), 0 0 24px var(--bhe-ncg-cyan), 0 0 48px var(--bhe-ncg-cyan); text-shadow: none; } /* 3: glitch drop-shadow */ .bhe-ncg__glitch { position: relative; background: var(--bhe-ncg-ink); color: var(--bhe-ncg-bg); border: none; padding: 1rem 2.4rem; transition: 0.15s; } .bhe-ncg__glitch:hover { filter: drop-shadow(3px 0 var(--bhe-ncg-neon)) drop-shadow(-3px 0 var(--bhe-ncg-cyan)); transform: skewX(-3deg); } /* 4: gradient border clip — two-layer background trick so the gradient "border" sits inside the same stacking context as the button text. The outer layer is the moving gradient; the inner layer is the solid button fill, clipped to padding-box. background-clip + background-origin are paired so each layer maps to a different clipping region. Replaces an older z-index:-1 ::before that disappeared behind the .bhe-ncg wrapper's stacking context. */ .bhe-ncg__clip { position: relative; color: var(--bhe-ncg-ink); border: 3px solid transparent; padding: 1rem 2.4rem; background-image: linear-gradient(var(--bhe-ncg-surface), var(--bhe-ncg-surface)), linear-gradient(120deg, var(--bhe-ncg-neon), var(--bhe-ncg-cyan), var(--bhe-ncg-neon)); background-origin: padding-box, border-box; background-clip: padding-box, border-box; background-size: auto, 300% 100%; background-position: 0 0, 0 0; background-repeat: no-repeat; transition: background-position 0.5s ease, filter 0.3s ease; } .bhe-ncg__clip:hover { background-position: 0 0, 100% 0; filter: drop-shadow(0 0 10px var(--bhe-ncg-neon)); } @media (prefers-reduced-motion: reduce) { .bhe-ncg__brutal, .bhe-ncg__neon, .bhe-ncg__glitch, .bhe-ncg__clip { transition: none; } } ``` ### 04. Sliding Background Color Wipe Button Effects **Type:** Pure CSS **Description:** Conversion-optimized fills that reveal contrasting text on hover — left-to-right slide, diagonal skewed wipe, center scaleX expand, and an upward gradient wave. Each uses overflow: hidden plus a translating ::before. Built for SaaS landing CTAs, Get Started buttons, Buy Now blocks, and any primary action that needs a confident invitation. **HTML:** ```html
Slide Right
Diagonal Wipe
Center Expand
Gradient Wave
``` **CSS:** ```css .bhe-sbg { --bhe-sbg-bg: #fafaf7; --bhe-sbg-ink: #14110f; --bhe-sbg-muted: #8a857e; --bhe-sbg-c1: #ff5e3a; --bhe-sbg-c2: #1d3557; --bhe-sbg-c3: #06b6a4; --bhe-sbg-c4-a: #7c3aed; --bhe-sbg-c4-b: #ec4899; background: var(--bhe-sbg-bg); color: var(--bhe-sbg-ink); font-family: 'Verdana', 'Helvetica Neue', sans-serif; display: flex; flex-wrap: wrap; gap: 3rem; align-items: center; justify-content: center; padding: 3rem 2rem; min-height: 320px; box-sizing: border-box; } .bhe-sbg *, .bhe-sbg *::before, .bhe-sbg *::after { box-sizing: border-box; } .bhe-sbg__cell { display: flex; flex-direction: column; align-items: center; gap: 1.2rem; } .bhe-sbg__label { font-size: 0.72rem; letter-spacing: 0.12em; color: var(--bhe-sbg-muted); text-transform: uppercase; } .bhe-sbg__btn { position: relative; font-family: inherit; font-weight: 700; font-size: 1rem; cursor: pointer; border: 2px solid currentColor; padding: 1rem 2.6rem; overflow: hidden; background: transparent; letter-spacing: 0.04em; } .bhe-sbg__btn span { position: relative; z-index: 2; transition: color 0.4s ease; } .bhe-sbg__btn::before { content: ''; position: absolute; inset: 0; z-index: 1; } /* 1: slide left to right */ .bhe-sbg__ltr { color: var(--bhe-sbg-c1); } .bhe-sbg__ltr::before { background: var(--bhe-sbg-c1); transform: translateX(-100%); transition: transform 0.45s cubic-bezier(0.7, 0, 0.2, 1); } .bhe-sbg__ltr:hover::before { transform: translateX(0); } .bhe-sbg__ltr:hover span { color: var(--bhe-sbg-bg); } /* 2: diagonal skewed wipe */ .bhe-sbg__diag { color: var(--bhe-sbg-c2); } .bhe-sbg__diag::before { background: var(--bhe-sbg-c2); transform: translateX(-120%) skewX(-20deg); width: 130%; left: -15%; transition: transform 0.45s cubic-bezier(0.7, 0, 0.2, 1); } .bhe-sbg__diag:hover::before { transform: translateX(0) skewX(-20deg); } .bhe-sbg__diag:hover span { color: var(--bhe-sbg-bg); } /* 3: scaleX center expand */ .bhe-sbg__center { color: var(--bhe-sbg-c3); } .bhe-sbg__center::before { background: var(--bhe-sbg-c3); transform: scaleX(0); transform-origin: center; transition: transform 0.4s cubic-bezier(0.7, 0, 0.2, 1); } .bhe-sbg__center:hover::before { transform: scaleX(1); } .bhe-sbg__center:hover span { color: var(--bhe-sbg-bg); } /* 4: gradient wave slide up */ .bhe-sbg__wave { color: var(--bhe-sbg-ink); border-color: var(--bhe-sbg-c4-a); } .bhe-sbg__wave::before { background: linear-gradient(120deg, var(--bhe-sbg-c4-a), var(--bhe-sbg-c4-b)); transform: translateY(100%); transition: transform 0.45s cubic-bezier(0.7, 0, 0.2, 1); } .bhe-sbg__wave:hover::before { transform: translateY(0); } .bhe-sbg__wave:hover span { color: #fff; } @media (prefers-reduced-motion: reduce) { .bhe-sbg__btn::before, .bhe-sbg__btn span { transition: none; } } ``` ### 05. Liquid Fill & Organic Morphing Button Effects **Type:** Pure CSS **Description:** Playful fluid motion on a teal organic palette — a liquid rising fill with a wavy meniscus, a border-radius blob morph, a gooey scaling-circle expand, and a swirling wave keyframe loop. Suited to creative platforms, modern e-commerce, friendly user-centric branding, and anywhere stiffness reads as wrong. **HTML:** ```html
Liquid Rise
Blob Morph
Gooey Expand
Wave Flow
``` **CSS:** ```css .bhe-lfo { --bhe-lfo-bg: #eef6f3; --bhe-lfo-ink: #16302a; --bhe-lfo-muted: #6f8a82; --bhe-lfo-liquid: #14b8a6; --bhe-lfo-liquid2: #0d9488; --bhe-lfo-grape: #8b5cf6; --bhe-lfo-coral: #fb7185; background: var(--bhe-lfo-bg); color: var(--bhe-lfo-ink); font-family: 'Geneva', 'Avenir', 'Segoe UI', sans-serif; display: flex; flex-wrap: wrap; gap: 3rem; align-items: center; justify-content: center; padding: 3rem 2rem; min-height: 320px; box-sizing: border-box; } .bhe-lfo *, .bhe-lfo *::before, .bhe-lfo *::after { box-sizing: border-box; } .bhe-lfo__cell { display: flex; flex-direction: column; align-items: center; gap: 1.2rem; } .bhe-lfo__label { font-size: 0.72rem; letter-spacing: 0.12em; color: var(--bhe-lfo-muted); text-transform: uppercase; } .bhe-lfo__btn { position: relative; font-family: inherit; font-weight: 700; font-size: 1rem; cursor: pointer; border: none; padding: 1.05rem 2.6rem; overflow: hidden; } .bhe-lfo__btn span { position: relative; z-index: 2; transition: color 0.4s ease; } /* 1: liquid rising fill */ .bhe-lfo__liquid { background: transparent; color: var(--bhe-lfo-liquid); border: 2px solid var(--bhe-lfo-liquid); border-radius: 12px; } .bhe-lfo__liquid::before { content: ''; position: absolute; left: 0; bottom: 0; width: 100%; height: 0; background: var(--bhe-lfo-liquid); z-index: 1; border-radius: 40% 42% 0 0 / 18px 18px 0 0; transition: height 0.5s cubic-bezier(0.6, 0, 0.2, 1); } .bhe-lfo__liquid:hover::before { height: 130%; } .bhe-lfo__liquid:hover span { color: var(--bhe-lfo-bg); } /* 2: morphing border-radius */ .bhe-lfo__morph { background: var(--bhe-lfo-grape); color: #fff; border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; transition: border-radius 0.6s ease, transform 0.6s ease; } .bhe-lfo__morph:hover { border-radius: 70% 30% 35% 65% / 65% 60% 40% 35%; transform: scale(1.05) rotate(-2deg); } /* 3: gooey blob expand */ .bhe-lfo__goo { background: transparent; color: var(--bhe-lfo-coral); border: 2px solid var(--bhe-lfo-coral); border-radius: 50px; } .bhe-lfo__goo::before { content: ''; position: absolute; top: 50%; left: 50%; z-index: 1; width: 12px; height: 12px; background: var(--bhe-lfo-coral); border-radius: 50%; transform: translate(-50%, -50%) scale(0); transition: transform 0.5s cubic-bezier(0.6, 0, 0.2, 1); } .bhe-lfo__goo:hover::before { transform: translate(-50%, -50%) scale(30); } .bhe-lfo__goo:hover span { color: var(--bhe-lfo-bg); } /* 4: animated wave */ .bhe-lfo__flow { background: var(--bhe-lfo-liquid2); color: #fff; border-radius: 14px; } .bhe-lfo__flow::before { content: ''; position: absolute; left: -50%; bottom: -160%; width: 200%; height: 200%; z-index: 1; background: rgba(255,255,255,0.25); border-radius: 45%; transition: bottom 0.6s ease; } .bhe-lfo__flow:hover::before { bottom: -130%; animation: bhe-lfo-swirl 4s linear infinite; } @keyframes bhe-lfo-swirl { from { transform: rotate(0); } to { transform: rotate(360deg); } } @media (prefers-reduced-motion: reduce) { .bhe-lfo__btn, .bhe-lfo__btn::before, .bhe-lfo__btn span { transition: none; } .bhe-lfo__flow:hover::before { animation: none; } } ``` ### 06. Kinetic Text Flip & Icon Reveal Button Effects **Type:** Pure CSS **Description:** Typography and icon micro-interactions in compact pills — a vertical two-label flip, an Add-to-Cart text-out / icon-in reveal, per-letter staggered lift, and an arrow that slides in with text shift. Built for e-commerce product grids, nav menu items, app toolbars, and any compact button that earns its space by being legible at small sizes. **HTML:** ```html
Vertical Flip
Icon Reveal
Letter Stagger
Arrow Slide
``` **CSS:** ```css .bhe-ktf { --bhe-ktf-bg: #f7f5f2; --bhe-ktf-ink: #1c1b1a; --bhe-ktf-muted: #8d8983; --bhe-ktf-accent: #e85d04; --bhe-ktf-dark: #1c1b1a; --bhe-ktf-blue: #2563eb; background: var(--bhe-ktf-bg); color: var(--bhe-ktf-ink); font-family: 'Tahoma', 'Segoe UI', sans-serif; display: flex; flex-wrap: wrap; gap: 3rem; align-items: center; justify-content: center; padding: 3rem 2rem; min-height: 320px; box-sizing: border-box; } .bhe-ktf *, .bhe-ktf *::before, .bhe-ktf *::after { box-sizing: border-box; } .bhe-ktf__cell { display: flex; flex-direction: column; align-items: center; gap: 1.2rem; } .bhe-ktf__label { font-size: 0.72rem; letter-spacing: 0.12em; color: var(--bhe-ktf-muted); text-transform: uppercase; } .bhe-ktf__btn { position: relative; font-family: inherit; font-weight: 700; font-size: 1rem; cursor: pointer; border: none; padding: 1.05rem 2.6rem; overflow: hidden; letter-spacing: 0.03em; } /* 1: vertical text flip */ .bhe-ktf__flip { background: var(--bhe-ktf-accent); color: #fff; border-radius: 10px; height: 52px; display: inline-flex; align-items: center; } .bhe-ktf__flipInner { position: relative; display: block; height: 1.2em; overflow: hidden; } .bhe-ktf__flipInner > span { display: block; transition: transform 0.4s cubic-bezier(0.7, 0, 0.2, 1); } .bhe-ktf__flipInner > span + span { position: absolute; top: 100%; left: 0; } .bhe-ktf__flip:hover .bhe-ktf__flipInner > span { transform: translateY(-100%); } /* 2: icon slide-in, text slide-out */ .bhe-ktf__cart { background: var(--bhe-ktf-dark); color: var(--bhe-ktf-bg); border-radius: 10px; min-width: 180px; height: 52px; } .bhe-ktf__txt, .bhe-ktf__ico { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; transition: transform 0.4s cubic-bezier(0.7, 0, 0.2, 1), opacity 0.4s; } .bhe-ktf__txt { transform: translateY(0); } .bhe-ktf__ico { transform: translateY(100%); opacity: 0; font-size: 1.4rem; } .bhe-ktf__cart:hover .bhe-ktf__txt { transform: translateY(-100%); opacity: 0; } .bhe-ktf__cart:hover .bhe-ktf__ico { transform: translateY(0); opacity: 1; } /* 3: per-letter stagger */ .bhe-ktf__letters { background: transparent; color: var(--bhe-ktf-blue); border: 2px solid var(--bhe-ktf-blue); border-radius: 10px; } .bhe-ktf__l { display: inline-block; transition: transform 0.3s ease; } .bhe-ktf__letters:hover .bhe-ktf__l { transform: translateY(-4px); } .bhe-ktf__letters:hover .bhe-ktf__l:nth-child(2) { transition-delay: 0.03s; } .bhe-ktf__letters:hover .bhe-ktf__l:nth-child(3) { transition-delay: 0.06s; } .bhe-ktf__letters:hover .bhe-ktf__l:nth-child(4) { transition-delay: 0.09s; } .bhe-ktf__letters:hover .bhe-ktf__l:nth-child(5) { transition-delay: 0.12s; } .bhe-ktf__letters:hover .bhe-ktf__l:nth-child(6) { transition-delay: 0.15s; } .bhe-ktf__letters:hover .bhe-ktf__l:nth-child(7) { transition-delay: 0.18s; } /* 4: arrow reveal */ .bhe-ktf__arrow { background: var(--bhe-ktf-accent); color: #fff; border-radius: 40px; display: inline-flex; align-items: center; gap: 0.5rem; padding-right: 3rem; transition: padding 0.35s ease; } .bhe-ktf__arrowIco { position: absolute; right: 1.4rem; opacity: 0; transform: translateX(-8px); transition: 0.35s ease; font-size: 1.2rem; } .bhe-ktf__arrow:hover { padding-right: 3.4rem; padding-left: 2.2rem; } .bhe-ktf__arrow:hover .bhe-ktf__arrowIco { opacity: 1; transform: translateX(0); } @media (prefers-reduced-motion: reduce) { .bhe-ktf__btn, .bhe-ktf__flipInner > span, .bhe-ktf__txt, .bhe-ktf__ico, .bhe-ktf__l, .bhe-ktf__arrowIco { transition: none; } } ``` ### 07. Liquid Fill **Type:** Pure CSS **Description:** Background floods upward like liquid filling a container via pseudo-element height transition. **HTML:** ```html ``` **CSS:** ```css .bhe-07__btn { padding: 12px 32px; font-size: 13.5px; font-family: inherit; font-weight: 500; border-radius: 8px; cursor: pointer; letter-spacing: 0.02em; background: transparent; color: inherit; } .bhe-07__btn { position: relative; color: #7c6cff; background: transparent; border: 2px solid #7c6cff; overflow: hidden; transition: color 0.4s; z-index: 0; } .bhe-07__btn::before { content: ""; position: absolute; bottom: -2px; left: -2px; right: -2px; height: 0; background: #7c6cff; transition: height 0.45s cubic-bezier(0.23, 1, 0.32, 1); z-index: -1; } .bhe-07__btn:hover { color: #fff; } .bhe-07__btn:hover::before { height: calc(100% + 4px); } ``` ### 08. Magnetic Border **Type:** Pure CSS **Description:** A conic-gradient border spins into view on hover and the button lifts with a coloured glow. **HTML:** ```html ``` **CSS:** ```css .bhe-08__wrap { font-family: inherit; letter-spacing: 0.02em; background: transparent; color: inherit; } .bhe-08__wrap { position: relative; padding: 2px; border: none; background: none; cursor: pointer; border-radius: 8px; display: inline-block; } .bhe-08__wrap::before { content: ""; position: absolute; inset: -2px; border-radius: 10px; background: conic-gradient(#7c6cff, #ff6c8a, #3de8f5, #1ed98a, #7c6cff); opacity: 0; transition: opacity 0.3s; animation: border-spin 3s linear infinite paused; } .bhe-08__wrap:hover::before { opacity: 1; animation-play-state: running; } @keyframes border-spin { to { transform: rotate(360deg); } } .bhe-08__inner { display: block; padding: 12px 32px; border-radius: 7px; background: #111118; color: #fff; font-size: 14px; font-weight: 600; transition: transform 0.3s, box-shadow 0.3s; } .bhe-08__wrap:hover .bhe-08__inner { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(124, 108, 255, 0.3); } @media (prefers-reduced-motion: reduce) { .bhe-08__wrap, .bhe-08__wrap * { animation: none !important; } } ``` ### 09. Glitch Slice **Type:** Pure CSS **Description:** Two color-shifted clones slice through in staggered horizontal bands, simulating a signal glitch. **HTML:** ```html ``` **CSS:** ```css .bhe-09__btn { padding: 12px 32px; font-size: 13.5px; font-family: inherit; font-weight: 500; border-radius: 8px; cursor: pointer; letter-spacing: 0.02em; background: transparent; color: inherit; } .bhe-09__btn { position: relative; overflow: hidden; } .bhe-09__btn::before, .bhe-09__btn::after { content: attr(data-text); position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; opacity: 0; } .bhe-09__btn::before { background: #ff6c8a; color: #fff; clip-path: polygon(0 30%, 100% 30%, 100% 50%, 0 50%); } .bhe-09__btn::after { background: #7c6cff; color: #fff; clip-path: polygon(0 55%, 100% 55%, 100% 75%, 0 75%); } .bhe-09__btn:hover::before { animation: glitch1 0.3s steps(1) infinite; } .bhe-09__btn:hover::after { animation: glitch2 0.3s steps(1) infinite 0.05s; } @keyframes glitch1 { 50% { opacity: 1; transform: translateX(-4px); } } @keyframes glitch2 { 50% { opacity: 1; transform: translateX(4px); } } @media (prefers-reduced-motion: reduce) { .bhe-09__btn, .bhe-09__btn * { animation: none !important; } } ``` ### 10. Neon Pulse **Type:** Pure CSS **Description:** Multi-layered box-shadows create a breathing neon glow that pulses rhythmically on hover. **HTML:** ```html ``` **CSS:** ```css .bhe-10__btn { padding: 12px 32px; font-size: 13.5px; font-family: inherit; font-weight: 500; border-radius: 8px; cursor: pointer; background: transparent; color: inherit; } .bhe-10__btn { color: #2ecc8a; border: 2px solid #2ecc8a; background: transparent; text-transform: uppercase; letter-spacing: 0.08em; transition: all 0.3s; } .bhe-10__btn:hover { background: rgba(46, 204, 138, 0.1); animation: neonpulse 1.2s ease-in-out infinite; } @keyframes neonpulse { 0%, 100% { box-shadow: 0 0 12px #2ecc8a, 0 0 28px rgba(46, 204, 138, 0.35); } 50% { box-shadow: 0 0 20px #2ecc8a, 0 0 50px rgba(46, 204, 138, 0.55), 0 0 80px rgba(46, 204, 138, 0.2); } } @media (prefers-reduced-motion: reduce) { .bhe-10__btn, .bhe-10__btn * { animation: none !important; } } ``` ### 11. Split Reveal **Type:** Pure CSS **Description:** The button splits at the centre — top half slides up, bottom half slides down — both halves show the same text. **HTML:** ```html ``` **CSS:** ```css .bhe-11__btn { padding: 12px 32px; font-family: inherit; border-radius: 8px; letter-spacing: 0.02em; background: transparent; color: inherit; } .bhe-11__btn { position: relative; overflow: hidden; border: 2px solid rgba(255, 255, 255, 0.15); background: #17171f; color: #fff; font-size: 14px; font-weight: 600; cursor: pointer; } .bhe-11__top { display: block; clip-path: polygon(0 0, 100% 0, 100% 50%, 0 50%); transition: transform 0.35s cubic-bezier(0.23, 1, 0.32, 1); } .bhe-11__bottom { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #7c6cff; clip-path: polygon(0 50%, 100% 50%, 100% 100%, 0 100%); transform: translateY(50%); transition: transform 0.35s cubic-bezier(0.23, 1, 0.32, 1); } .bhe-11__btn:hover .bhe-11__top { transform: translateY(-50%); } .bhe-11__btn:hover .bhe-11__bottom { transform: translateY(0); } ``` ### 12. Diagonal Shutter **Type:** Pure CSS **Description:** A skewed gradient panel wipes diagonally across the button like a camera shutter opening. **HTML:** ```html ``` **CSS:** ```css .bhe-12__btn { padding: 12px 32px; font-size: 13.5px; font-family: inherit; font-weight: 500; border-radius: 8px; cursor: pointer; letter-spacing: 0.02em; color: inherit; background: transparent; } .bhe-12__btn { position: relative; overflow: hidden; z-index: 0; border: 1px solid rgba(255, 255, 255, 0.18); transition: color 0.3s, border-color 0.3s; } .bhe-12__btn::before { content: ""; position: absolute; top: 0; left: -105%; width: 100%; height: 100%; background: linear-gradient(135deg, #7c6cff 0%, #ff6c8a 100%); transition: left 0.4s cubic-bezier(0.23, 1, 0.32, 1); z-index: -1; transform: skewX(-15deg); } .bhe-12__btn:hover::before { left: 0; } .bhe-12__btn:hover { border-color: transparent; } ``` ### 13. Elastic Lift **Type:** Pure CSS **Description:** A hard bottom shadow creates a physical 3D effect — elastic cubic-bezier makes it bounce on hover. **HTML:** ```html ``` **CSS:** ```css .bhe-13__btn { padding: 12px 32px; font-size: 13.5px; font-family: inherit; font-weight: 500; border-radius: 8px; cursor: pointer; letter-spacing: 0.02em; background: transparent; color: inherit; } .bhe-13__btn { background: #7c6cff; color: #fff; border: none; box-shadow: 0 4px 0 #4a3aad; transform: translateY(0); transition: transform 0.12s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.12s; } .bhe-13__btn:hover { transform: translateY(-4px); box-shadow: 0 8px 0 #4a3aad; } .bhe-13__btn:active { transform: translateY(2px); box-shadow: 0 2px 0 #4a3aad; } ``` ### 14. Center Underline Draw **Type:** Pure CSS **Description:** A gradient underline expands symmetrically outward from the center of the button text. **HTML:** ```html ``` **CSS:** ```css .bhe-14__btn { padding: 12px 32px; font-size: 13.5px; font-family: inherit; font-weight: 500; cursor: pointer; letter-spacing: 0.02em; color: inherit; background: transparent; } .bhe-14__btn { position: relative; background: transparent; border: none; } .bhe-14__btn::after { content: ""; position: absolute; bottom: 5px; left: 50%; right: 50%; height: 2px; background: linear-gradient(90deg, #7c6cff, #ff6c8a); transition: left 0.4s cubic-bezier(0.23, 1, 0.32, 1), right 0.4s cubic-bezier(0.23, 1, 0.32, 1); border-radius: 2px; } .bhe-14__btn:hover::after { left: 32px; right: 32px; } ``` ### 15. 3D Flip **Type:** Pure CSS **Description:** The button flips on its X axis to reveal a second face — pure CSS 3D transform perspective. **HTML:** ```html
``` **CSS:** ```css .bhe-15__wrapper { font-size: 13.5px; font-family: inherit; font-weight: 500; cursor: pointer; letter-spacing: 0.02em; background: transparent; color: inherit; } .bhe-15__wrapper { perspective: 600px; display: inline-block; } .bhe-15__btn { position: relative; display: block; transform-style: preserve-3d; transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1); background: transparent; border: none; } .bhe-15__front, .bhe-15__back { display: block; padding: 12px 32px; border-radius: 8px; backface-visibility: hidden; } .bhe-15__front { background: #ff6c8a; color: #fff; } .bhe-15__back { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: #7c6cff; color: #fff; transform: rotateX(180deg); } .bhe-15__wrapper:hover .bhe-15__btn { transform: rotateX(180deg); } ``` ### 16. Particle Burst **Type:** Pure CSS **Description:** Six colored dots shoot out in all directions from the center of the button on hover. **HTML:** ```html ``` **CSS:** ```css .bhe-16__btn { padding: 12px 32px; font-size: 13.5px; font-family: inherit; font-weight: 500; cursor: pointer; letter-spacing: 0.02em; color: inherit; background: transparent; } .bhe-16__btn { position: relative; overflow: visible; } .bhe-16__dot { position: absolute; width: 6px; height: 6px; border-radius: 50%; top: 50%; left: 50%; margin: -3px 0 0 -3px; opacity: 0; } .bhe-16__btn:hover .bhe-16__dot { animation: burst 0.65s ease-out forwards; } .bhe-16__dot:nth-child(1) { background: #7c6cff; --dx: -52px; --dy: -42px; } .bhe-16__dot:nth-child(2) { background: #ff6c8a; --dx: 52px; --dy: -42px; animation-delay: 0.05s; } .bhe-16__dot:nth-child(3) { background: #2ecc8a; --dx: -62px; --dy: 2px; animation-delay: 0.02s; } .bhe-16__dot:nth-child(4) { background: #f5a623; --dx: 62px; --dy: 2px; animation-delay: 0.07s; } .bhe-16__dot:nth-child(5) { background: #7c6cff; --dx: -36px; --dy: 46px; animation-delay: 0.04s; } .bhe-16__dot:nth-child(6) { background: #ff6c8a; --dx: 36px; --dy: 46px; animation-delay: 0.03s; } @keyframes burst { 0% { opacity: 1; } 100% { transform: translate(var(--dx), var(--dy)) scale(0); opacity: 0; } } @media (prefers-reduced-motion: reduce) { .bhe-16__btn, .bhe-16__btn * { animation: none !important; } } ``` ### 17. Slide Doors **Type:** Pure CSS **Description:** Two panels slide in from opposite sides and meet in the middle to fill the entire button. **HTML:** ```html ``` **CSS:** ```css .bhe-17__btn { padding: 12px 32px; font-size: 13.5px; font-family: inherit; font-weight: 500; border-radius: 8px; cursor: pointer; letter-spacing: 0.02em; background: transparent; color: inherit; } .bhe-17__btn { position: relative; overflow: hidden; } .bhe-17__btn::before, .bhe-17__btn::after { content: ""; position: absolute; top: 0; width: 50%; height: 100%; background: #7c6cff; transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1); } .bhe-17__btn::before { left: 0; transform: translateX(-101%); } .bhe-17__btn::after { right: 0; transform: translateX(101%); } .bhe-17__btn .bhe-17__label { position: relative; z-index: 1; transition: color 0.4s; } .bhe-17__btn:hover::before { transform: translateX(0); } .bhe-17__btn:hover::after { transform: translateX(0); } .bhe-17__btn:hover .bhe-17__label { color: #fff; } ``` ### 18. Typewriter Retype **Type:** CSS + JS **Description:** Text erases and retypes itself character by character on hover — like a live terminal cursor. **HTML:** ```html ``` **CSS:** ```css .bhe-18__btn { padding: 12px 32px; font-size: 13.5px; font-weight: 500; border-radius: 8px; cursor: pointer; letter-spacing: 0.02em; color: inherit; background: transparent; } .bhe-18__btn { font-family: monospace; } .bhe-18__cursor { display: inline-block; width: 2px; height: 13px; background: currentColor; margin-left: 2px; vertical-align: middle; opacity: 0; } .bhe-18__btn:hover .bhe-18__cursor { animation: blink 0.6s step-end infinite; } @keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } } @media (prefers-reduced-motion: reduce) { .bhe-18__btn, .bhe-18__btn * { animation: none !important; } } ``` **JS:** ```js document.querySelectorAll(".bhe-18__btn").forEach(function (btn) { const txt = btn.querySelector(".bhe-18__text"); if (!txt) return; const full = txt.textContent; btn.addEventListener("mouseenter", function () { let i = full.length; const erase = setInterval(function () { txt.textContent = full.slice(0, --i); if (i === 0) { clearInterval(erase); retype(); } }, 55); function retype() { let j = 0; const write = setInterval(function () { txt.textContent = full.slice(0, ++j); if (j === full.length) clearInterval(write); }, 55); } }); }); ``` ### 19. Hard Shadow Shift **Type:** Pure CSS **Description:** Brutalist hard offset shadow shifts both position and color on hover, snaps back on click. **HTML:** ```html ``` **CSS:** ```css .bhe-19__btn { padding: 12px 32px; font-size: 13.5px; font-family: inherit; border-radius: 8px; cursor: pointer; background: transparent; color: inherit; } .bhe-19__btn { color: #0a0a0f; background: #f0eeff; border: 2px solid #0a0a0f; text-transform: uppercase; letter-spacing: 0.07em; font-weight: 700; box-shadow: 4px 4px 0 #0a0a0f; transition: box-shadow 0.15s, transform 0.15s; } .bhe-19__btn:hover { box-shadow: 8px 8px 0 #7c6cff; transform: translate(-2px, -2px); } .bhe-19__btn:active { box-shadow: 2px 2px 0 #0a0a0f; transform: translate(2px, 2px); } ``` ### 20. Ripple Wave **Type:** CSS + JS **Description:** A ripple circle radiates outward from the exact point of your click, like Material Design. **HTML:** ```html ``` **CSS:** ```css .bhe-20__btn { padding: 12px 32px; font-size: 13.5px; font-family: inherit; font-weight: 500; cursor: pointer; letter-spacing: 0.02em; color: inherit; background: transparent; } .bhe-20__btn { position: relative; overflow: hidden; } .bhe-20__ripple { position: absolute; border-radius: 50%; background: rgba(255, 255, 255, 0.32); transform: scale(0); animation: rwave 0.7s linear; pointer-events: none; } @keyframes rwave { to { transform: scale(4); opacity: 0; } } @media (prefers-reduced-motion: reduce) { .bhe-20__btn, .bhe-20__btn * { animation: none !important; } } ``` **JS:** ```js document.querySelectorAll(".bhe-20__btn").forEach(function (btn) { btn.addEventListener("click", function (e) { const c = document.createElement("span"); const d = Math.max(btn.offsetWidth, btn.offsetHeight); const r = btn.getBoundingClientRect(); c.className = "bhe-20__ripple"; c.style.cssText = "width:" + d + "px;height:" + d + "px;" + "left:" + (e.clientX - r.left - d / 2) + "px;" + "top:" + (e.clientY - r.top - d / 2) + "px"; btn.appendChild(c); c.addEventListener("animationend", function () { c.remove(); }); }); }); ``` ### 21. Rainbow Border Spin **Type:** Pure CSS **Description:** A conic-gradient border spins continuously using the CSS mask-composite technique. **HTML:** ```html ``` **CSS:** ```css .bhe-21__btn { font-size: 13.5px; font-family: inherit; font-weight: 500; cursor: pointer; letter-spacing: 0.02em; color: inherit; background: transparent; } .bhe-21__btn { position: relative; border: none; } .bhe-21__btn::before { content: ""; position: absolute; inset: 0; border-radius: 8px; padding: 2px; background: conic-gradient(#7c6cff, #ff6c8a, #2ecc8a, #f5a623, #7c6cff); -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0); -webkit-mask-composite: xor; mask-composite: exclude; opacity: 0; transition: opacity 0.3s; } .bhe-21__btn:hover::before { opacity: 1; animation: spin 2s linear infinite; } @keyframes spin { to { transform: rotate(360deg); } } @media (prefers-reduced-motion: reduce) { .bhe-21__btn, .bhe-21__btn * { animation: none !important; } } ``` ### 22. Morph Shape **Type:** Pure CSS **Description:** The button border-radius morphs from rectangle to pill and color transitions simultaneously. **HTML:** ```html ``` **CSS:** ```css .bhe-22__btn { padding: 12px 32px; font-size: 13.5px; font-family: inherit; font-weight: 500; cursor: pointer; letter-spacing: 0.02em; background: transparent; color: inherit; } .bhe-22__btn { background: #ff6c8a; color: #fff; border: none; transition: border-radius 0.4s cubic-bezier(0.23, 1, 0.32, 1), background 0.3s, transform 0.2s; } .bhe-22__btn:hover { border-radius: 50px; background: #7c6cff; transform: scaleX(0.92); } ``` ### 23. Icon Slide In **Type:** Pure CSS **Description:** An arrow slides in from outside as the button padding expands to make room for it. **HTML:** ```html ``` **CSS:** ```css .bhe-23__btn { padding: 12px 32px; font-size: 13.5px; font-family: inherit; font-weight: 500; border-radius: 8px; cursor: pointer; letter-spacing: 0.02em; background: transparent; color: inherit; } .bhe-23__btn { position: relative; overflow: hidden; transition: padding 0.35s cubic-bezier(0.23, 1, 0.32, 1); } .bhe-23__icon { position: absolute; right: -24px; top: 50%; transform: translateY(-50%); opacity: 0; transition: right 0.35s cubic-bezier(0.23, 1, 0.32, 1), opacity 0.3s; } .bhe-23__btn:hover { padding-right: 52px; } .bhe-23__btn:hover .bhe-23__icon { right: 16px; opacity: 1; } ``` ### 24. Cursor Spotlight **Type:** CSS + JS **Description:** A soft radial light follows your cursor around inside the button, illuminating where you hover. **HTML:** ```html ``` **CSS:** ```css .bhe-24__btn { padding: 12px 32px; font-size: 13.5px; font-family: inherit; font-weight: 500; cursor: pointer; letter-spacing: 0.02em; color: inherit; background: transparent; } .bhe-24__btn { position: relative; overflow: hidden; } .bhe-24__glow { position: absolute; width: 100px; height: 100px; border-radius: 50%; background: radial-gradient(circle, rgba(124, 108, 255, 0.28) 0%, transparent 70%); pointer-events: none; opacity: 0; transition: opacity 0.3s; transform: translate(-50%, -50%); } .bhe-24__btn:hover .bhe-24__glow { opacity: 1; } ``` **JS:** ```js document.querySelectorAll(".bhe-24__btn").forEach(function (btn) { const glow = btn.querySelector(".bhe-24__glow"); if (!glow) return; btn.addEventListener("mousemove", function (e) { const r = btn.getBoundingClientRect(); glow.style.left = e.clientX - r.left + "px"; glow.style.top = e.clientY - r.top + "px"; }); }); ``` ### 25. Stagger Fill **Type:** Pure CSS **Description:** Five vertical segments fill upward one by one in a cascading waterfall sequence. **HTML:** ```html ``` **CSS:** ```css .bhe-25__btn { padding: 12px 32px; font-size: 13.5px; font-family: inherit; font-weight: 500; border-radius: 8px; cursor: pointer; letter-spacing: 0.02em; background: transparent; color: inherit; } .bhe-25__btn { position: relative; overflow: hidden; } .bhe-25__seg { position: absolute; top: 0; width: 20%; height: 100%; background: #7c6cff; transform: scaleY(0); transform-origin: bottom; transition: transform 0.3s cubic-bezier(0.23, 1, 0.32, 1); } .bhe-25__seg:nth-child(1) { left: 0%; transition-delay: 0s; } .bhe-25__seg:nth-child(2) { left: 20%; transition-delay: 0.04s; } .bhe-25__seg:nth-child(3) { left: 40%; transition-delay: 0.08s; } .bhe-25__seg:nth-child(4) { left: 60%; transition-delay: 0.12s; } .bhe-25__seg:nth-child(5) { left: 80%; transition-delay: 0.16s; } .bhe-25__label { position: relative; z-index: 1; transition: color 0.4s 0.1s; } .bhe-25__btn:hover .bhe-25__seg { transform: scaleY(1); } .bhe-25__btn:hover .bhe-25__label { color: #fff; } ``` ### 26. Sunburst Expand **Type:** Pure CSS **Description:** Spinning conic-gradient rays fan out behind the button on hover, glowing like a sunburst. **HTML:** ```html ``` **CSS:** ```css .bhe-26__btn { font-family: inherit; letter-spacing: 0.02em; background: transparent; color: inherit; } .bhe-26__btn { position: relative; overflow: hidden; padding: 12px 40px; border-radius: 50px; border: none; background: #f5a84a; color: #0a0a0f; font-size: 14px; font-weight: 700; cursor: pointer; transition: transform 0.3s, box-shadow 0.3s; } .bhe-26__btn:hover { transform: scale(1.06); box-shadow: 0 8px 24px rgba(245, 168, 74, 0.5); } .bhe-26__rays { position: absolute; inset: -40%; background: conic-gradient( transparent 0deg, rgba(255, 255, 255, 0.2) 10deg, transparent 20deg, rgba(255, 255, 255, 0.2) 30deg, transparent 40deg, rgba(255, 255, 255, 0.2) 50deg, transparent 60deg, rgba(255, 255, 255, 0.2) 70deg, transparent 80deg, rgba(255, 255, 255, 0.2) 90deg, transparent 100deg, rgba(255, 255, 255, 0.2) 110deg, transparent 120deg, rgba(255, 255, 255, 0.2) 130deg, transparent 140deg, rgba(255, 255, 255, 0.2) 150deg, transparent 160deg, rgba(255, 255, 255, 0.2) 170deg, transparent 180deg, rgba(255, 255, 255, 0.2) 190deg, transparent 200deg, rgba(255, 255, 255, 0.2) 210deg, transparent 220deg, rgba(255, 255, 255, 0.2) 230deg, transparent 240deg, rgba(255, 255, 255, 0.2) 250deg, transparent 260deg, rgba(255, 255, 255, 0.2) 270deg, transparent 280deg, rgba(255, 255, 255, 0.2) 290deg, transparent 300deg, rgba(255, 255, 255, 0.2) 310deg, transparent 320deg, rgba(255, 255, 255, 0.2) 330deg, transparent 340deg, rgba(255, 255, 255, 0.2) 350deg ); opacity: 0; transition: opacity 0.3s; } .bhe-26__btn:hover .bhe-26__rays { opacity: 1; animation: sunburst-spin 6s linear infinite; } @keyframes sunburst-spin { to { transform: rotate(360deg); } } .bhe-26__label { position: relative; z-index: 1; } @media (prefers-reduced-motion: reduce) { .bhe-26__btn, .bhe-26__btn * { animation: none !important; } } ``` ### 27. 3D Press **Type:** Pure CSS **Description:** Layered box-shadows create a physical 3D extrusion. Hovering lifts the button; clicking presses it flush into the surface. **HTML:** ```html ``` **CSS:** ```css .bhe-27__btn { padding: 12px 32px; font-size: 13.5px; font-family: inherit; font-weight: 500; cursor: pointer; letter-spacing: 0.02em; background: transparent; color: inherit; } .bhe-27__btn { background: #7c6cff; color: #fff; border: none; border-radius: 8px; box-shadow: 0 6px 0 #4a3ab0, 0 8px 16px rgba(74, 58, 176, 0.4); transition: transform 0.15s cubic-bezier(0.23, 1, 0.32, 1), box-shadow 0.15s cubic-bezier(0.23, 1, 0.32, 1); } .bhe-27__btn:hover { transform: translateY(-3px); box-shadow: 0 9px 0 #4a3ab0, 0 14px 24px rgba(74, 58, 176, 0.45); } .bhe-27__btn:active { transform: translateY(4px); box-shadow: 0 2px 0 #4a3ab0, 0 4px 8px rgba(74, 58, 176, 0.3); } ``` --- ## 43 CSS Button Designs URL: https://codefronts.com/components/css-buttons/ Description: 43 hand-coded CSS buttons — real-world materials like brushed brass and vinyl, interactive use-case buttons (add-to-cart, download, like, delete), and click-effect studies: magnetic mercury ripple, brutalist glitch, neon plasma burst, clay press, ink spread, and particle shards. Demo count: 43 ### 01. Add to Cart **Type:** CSS + JS **Description:** A real e-commerce state machine: click fills a green progress bar along the bottom edge, snaps to a success state with a particle burst, then auto-resets after two seconds. **HTML:** ```html
``` **CSS:** ```css .btn-cart-surface { display: flex; align-items: center; justify-content: center; padding: 32px 40px; background: #f2efe9; border-radius: 16px; } .btn-cart { position: relative; display: flex; align-items: center; justify-content: center; gap: 10px; min-width: 200px; padding: 15px 30px; border: none; border-radius: 14px; background: #1a1814; color: #fff; font-family: ui-sans-serif, system-ui, sans-serif; font-size: 14px; font-weight: 600; cursor: pointer; overflow: hidden; user-select: none; transition: background 0.3s ease, transform 0.15s ease; } .btn-cart:hover { background: #333; transform: translateY(-1px); } .btn-cart:active { transform: scale(0.97); } .btn-cart-icon { font-size: 18px; transition: transform 0.3s, opacity 0.3s; } .btn-cart-text { transition: opacity 0.2s; } .btn-cart-bar { position: absolute; left: 0; bottom: 0; height: 3px; width: 0%; background: #4ade80; border-radius: 0 0 14px 14px; } .btn-cart-check { position: absolute; display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; opacity: 0; transform: translateY(20px); transition: opacity 0.3s, transform 0.3s; } .btn-cart.is-loading { pointer-events: none; } .btn-cart.is-loading .btn-cart-bar { width: 100%; transition: width 1.2s cubic-bezier(.4,0,.2,1); } .btn-cart.is-success { background: #16a34a; pointer-events: none; } .btn-cart.is-success .btn-cart-icon, .btn-cart.is-success .btn-cart-text { opacity: 0; transform: translateY(-10px); } .btn-cart.is-success .btn-cart-check { opacity: 1; transform: translateY(0); } .btn-cart-particles { position: absolute; inset: 0; pointer-events: none; overflow: visible; } .btn-cart-particle { position: absolute; width: 6px; height: 6px; border-radius: 50%; background: #4ade80; animation: btn-cart-pop 0.6s cubic-bezier(.22,1,.36,1) forwards; } @keyframes btn-cart-pop { 0% { transform: translate(0,0) scale(1); opacity: 1; } 100% { transform: translate(var(--tx), var(--ty)) scale(0); opacity: 0; } } @media (prefers-reduced-motion: reduce) { .btn-cart-bar, .btn-cart-icon, .btn-cart-text, .btn-cart-check { transition: none; } } ``` **JS:** ```js document.querySelectorAll('.btn-cart').forEach(function (btn) { var busy = false; btn.addEventListener('click', function () { if (busy) return; busy = true; var bar = btn.querySelector('.btn-cart-bar'); var wrap = btn.querySelector('.btn-cart-particles'); btn.classList.add('is-loading'); setTimeout(function () { btn.classList.remove('is-loading'); btn.classList.add('is-success'); var colors = ['#4ade80', '#86efac', '#bbf7d0']; for (var i = 0; i < 12; i++) { var p = document.createElement('div'); p.className = 'btn-cart-particle'; var angle = (i / 12) * Math.PI * 2; var dist = 20 + Math.random() * 35; p.style.left = (btn.offsetWidth / 2) + 'px'; p.style.top = (btn.offsetHeight / 2) + 'px'; p.style.setProperty('--tx', (Math.cos(angle) * dist) + 'px'); p.style.setProperty('--ty', (Math.sin(angle) * dist) + 'px'); p.style.background = colors[i % 3]; p.style.animationDelay = (Math.random() * 0.1) + 's'; wrap.appendChild(p); p.addEventListener('animationend', function () { this.remove(); }); } setTimeout(function () { btn.classList.remove('is-success'); bar.style.transition = 'none'; bar.style.width = '0%'; requestAnimationFrame(function () { bar.style.transition = ''; busy = false; }); }, 2200); }, 1400); }); }); ``` ### 02. Download Progress **Type:** CSS + JS **Description:** The button body itself fills left-to-right like a true progress indicator while the arrow bounces, then morphs into a "Complete" state with a checkmark. **HTML:** ```html
``` **CSS:** ```css .btn-dl-surface { display: flex; align-items: center; justify-content: center; padding: 32px 40px; background: #f2efe9; border-radius: 16px; } .btn-dl { position: relative; width: 200px; height: 52px; border: 2px solid #1a1814; border-radius: 26px; background: transparent; cursor: pointer; overflow: hidden; user-select: none; } .btn-dl-fill { position: absolute; inset: 0; background: #1a1814; border-radius: 24px; transform: translateX(-100%); } .btn-dl-label { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 8px; z-index: 1; font-family: ui-sans-serif, system-ui, sans-serif; font-size: 13px; font-weight: 600; color: #1a1814; transition: color 0.2s; } .btn-dl-arrow { font-size: 16px; } .btn-dl-done { position: absolute; inset: 0; z-index: 2; display: flex; align-items: center; justify-content: center; gap: 8px; font-family: ui-sans-serif, system-ui, sans-serif; font-size: 13px; font-weight: 600; color: #fff; opacity: 0; transform: scale(0.8); transition: opacity 0.3s, transform 0.3s; } .btn-dl.is-loading .btn-dl-fill { transform: translateX(0); transition: transform 1.4s cubic-bezier(.4,0,.2,1); } .btn-dl.is-loading .btn-dl-label { color: #fff; } .btn-dl.is-loading .btn-dl-arrow { animation: btn-dl-bounce 0.6s infinite alternate; } @keyframes btn-dl-bounce { from { transform: translateY(-3px); } to { transform: translateY(3px); } } .btn-dl.is-done .btn-dl-fill { transform: translateX(0); } .btn-dl.is-done .btn-dl-label { opacity: 0; } .btn-dl.is-done .btn-dl-done { opacity: 1; transform: scale(1); } @media (prefers-reduced-motion: reduce) { .btn-dl.is-loading .btn-dl-arrow { animation: none; } } ``` **JS:** ```js document.querySelectorAll('.btn-dl').forEach(function (btn) { var busy = false; btn.addEventListener('click', function () { if (busy) return; busy = true; btn.classList.add('is-loading'); setTimeout(function () { btn.classList.remove('is-loading'); btn.classList.add('is-done'); setTimeout(function () { btn.classList.remove('is-done'); busy = false; }, 2500); }, 1600); }); }); ``` ### 03. Like Heart **Type:** CSS + JS **Description:** A toggle that bursts seven floating heart particles upward on activation; the count ticks up or down with a sliding number animation. **HTML:** ```html ``` **CSS:** ```css .btn-like { position: relative; display: flex; align-items: center; gap: 10px; padding: 12px 22px; border: 1.5px solid #e0dbd3; border-radius: 50px; background: transparent; cursor: pointer; overflow: visible; user-select: none; transition: border-color 0.3s, background 0.3s; } .btn-like:hover { border-color: #f43f5e; background: #fff0f3; } .btn-like-heart { font-size: 22px; line-height: 1; filter: grayscale(1); transition: transform 0.15s cubic-bezier(.34,1.56,.64,1); } .btn-like-count { display: flex; align-items: center; height: 20px; min-width: 24px; overflow: hidden; font-family: ui-sans-serif, system-ui, sans-serif; font-size: 14px; font-weight: 600; color: #888; transition: color 0.3s; } .btn-like.is-liked { border-color: #f43f5e; background: #fff0f3; } .btn-like.is-liked .btn-like-heart { filter: none; animation: btn-like-pop 0.4s cubic-bezier(.34,1.56,.64,1) forwards; } .btn-like.is-liked .btn-like-count { color: #f43f5e; } @keyframes btn-like-pop { 0% { transform: scale(0.8); } 50% { transform: scale(1.4); } 100% { transform: scale(1); } } .btn-like-particle { position: absolute; font-size: var(--fs, 12px); line-height: 1; pointer-events: none; z-index: 10; animation: btn-like-fly 0.7s cubic-bezier(.22,1,.36,1) forwards; } @keyframes btn-like-fly { 0% { transform: translate(0,0) scale(1); opacity: 1; } 100% { transform: translate(var(--tx), var(--ty)) scale(0.3); opacity: 0; } } .btn-like-slide { display: inline-block; animation: btn-like-count-up 0.3s cubic-bezier(.22,1,.36,1) forwards; } @keyframes btn-like-count-up { from { transform: translateY(100%); opacity: 0; } to { transform: translateY(0); opacity: 1; } } @media (prefers-reduced-motion: reduce) { .btn-like-heart, .btn-like-slide, .btn-like-particle { animation: none; } } ``` **JS:** ```js document.querySelectorAll('.btn-like').forEach(function (btn) { var liked = false; var count = 2400; var heart = btn.querySelector('.btn-like-heart'); var label = btn.querySelector('.btn-like-count'); btn.addEventListener('click', function () { liked = !liked; btn.classList.toggle('is-liked', liked); btn.setAttribute('aria-pressed', String(liked)); heart.textContent = liked ? '❤️' : '🤍'; count += liked ? 1 : -1; var text = count >= 1000 ? (count / 1000).toFixed(1) + 'k' : String(count); var span = document.createElement('span'); span.className = 'btn-like-slide'; span.textContent = text; label.innerHTML = ''; label.appendChild(span); if (liked) { var cx = heart.offsetLeft + heart.offsetWidth / 2; var cy = heart.offsetTop + heart.offsetHeight / 2; for (var i = 0; i < 7; i++) { var p = document.createElement('span'); p.className = 'btn-like-particle'; p.textContent = '❤️'; var angle = -Math.PI / 2 + (Math.random() - 0.5) * Math.PI * 1.5; var dist = 25 + Math.random() * 35; p.style.left = cx + 'px'; p.style.top = cy + 'px'; p.style.setProperty('--tx', (Math.cos(angle) * dist) + 'px'); p.style.setProperty('--ty', (Math.sin(angle) * dist) + 'px'); p.style.setProperty('--fs', (9 + Math.random() * 7) + 'px'); p.style.animationDelay = (Math.random() * 0.15) + 's'; btn.appendChild(p); p.addEventListener('animationend', function () { this.remove(); }); } } }); }); ``` ### 04. Confirm Delete **Type:** CSS + JS **Description:** A two-step destructive pattern: the first click shakes the button and slides up a red confirmation panel; a second click within three seconds wipes it with a sweep into a "Deleted" ghost state. **HTML:** ```html ``` **CSS:** ```css .btn-del { position: relative; display: flex; align-items: center; justify-content: center; gap: 8px; min-width: 170px; padding: 13px 22px; border: 1.5px solid #fca5a5; border-radius: 10px; background: #fff0f0; color: #dc2626; font-family: ui-sans-serif, system-ui, sans-serif; font-size: 13px; font-weight: 600; cursor: pointer; overflow: hidden; user-select: none; transition: background 0.3s, border-color 0.3s; } .btn-del:hover { background: #fee2e2; border-color: #f87171; } .btn-del-icon { font-size: 16px; } .btn-del-text { transition: opacity 0.2s; } .btn-del-confirm { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 6px; background: #dc2626; color: #fff; font-size: 12px; font-weight: 600; opacity: 0; transform: translateY(100%); transition: opacity 0.25s, transform 0.25s cubic-bezier(.22,1,.36,1); } .btn-del-wipe { position: absolute; inset: 0; z-index: 5; background: #dc2626; border-radius: 8px; transform: scaleX(0); transform-origin: left; } .btn-del.is-confirming { animation: btn-del-shake 0.4s cubic-bezier(.36,.07,.19,.97); } .btn-del.is-confirming .btn-del-confirm { opacity: 1; transform: translateY(0); } .btn-del.is-confirming .btn-del-text, .btn-del.is-confirming .btn-del-icon { opacity: 0; } @keyframes btn-del-shake { 0%,100% { transform: translateX(0); } 20% { transform: translateX(-5px) rotate(-1deg); } 40% { transform: translateX(5px) rotate(1deg); } 60% { transform: translateX(-3px); } 80% { transform: translateX(3px); } } .btn-del.is-deleting { pointer-events: none; overflow: visible; } .btn-del.is-deleting .btn-del-wipe { animation: btn-del-wipe-out 0.5s cubic-bezier(.77,0,.18,1) forwards; } @keyframes btn-del-wipe-out { 0% { transform: scaleX(0); opacity: 1; } 60% { transform: scaleX(1); opacity: 1; } 100% { transform: scaleX(1); opacity: 0; } } .btn-del.is-deleted { border-color: #e5e7eb; background: #f9fafb; color: #9ca3af; pointer-events: none; } @media (prefers-reduced-motion: reduce) { .btn-del.is-confirming { animation: none; } .btn-del.is-deleting .btn-del-wipe { animation: none; } } ``` **JS:** ```js document.querySelectorAll('.btn-del').forEach(function (btn) { var state = 'idle'; var resetTimer; btn.addEventListener('click', function () { if (state === 'idle') { state = 'confirming'; btn.classList.add('is-confirming'); resetTimer = setTimeout(function () { if (state === 'confirming') { state = 'idle'; btn.classList.remove('is-confirming'); } }, 3000); } else if (state === 'confirming') { clearTimeout(resetTimer); state = 'deleting'; btn.classList.add('is-deleting'); setTimeout(function () { btn.classList.remove('is-confirming', 'is-deleting'); btn.classList.add('is-deleted'); btn.querySelector('.btn-del-icon').textContent = '✓'; btn.querySelector('.btn-del-icon').style.opacity = '1'; btn.querySelector('.btn-del-text').textContent = 'Deleted'; btn.querySelector('.btn-del-text').style.opacity = '1'; btn.querySelector('.btn-del-confirm').style.opacity = '0'; }, 600); } }); }); ``` ### 05. Play Pause **Type:** CSS + JS **Description:** A media control whose icon morphs between a triangle and pause bars; a pulsing halo ring appears while playing and a row of waveform bars dances with staggered timing. **HTML:** ```html
Midnight Drive 3:42 · Synthwave
``` **CSS:** ```css .btn-pp-surface { display: flex; align-items: center; justify-content: center; padding: 28px 36px; background: #f2efe9; border-radius: 16px; } .btn-pp-area { display: flex; align-items: center; gap: 16px; } .btn-pp-info { display: flex; flex-direction: column; gap: 6px; } .btn-pp-meta { display: flex; flex-direction: column; gap: 2px; } .btn-pp-title { font-family: ui-sans-serif, system-ui, sans-serif; font-size: 13px; font-weight: 600; color: #1a1814; } .btn-pp-sub { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 9px; letter-spacing: 1px; color: #b0aaa0; } .btn-pp { position: relative; width: 64px; height: 64px; flex-shrink: 0; border: none; border-radius: 50%; background: #1a1814; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: transform 0.2s cubic-bezier(.34,1.56,.64,1), background 0.3s; } .btn-pp:hover { transform: scale(1.1); background: #333; } .btn-pp:active { transform: scale(0.93); } .btn-pp-play { position: relative; z-index: 1; margin-left: 3px; font-size: 24px; line-height: 1; color: #fff; transition: opacity 0.15s, transform 0.15s; } .btn-pp-pause { position: absolute; z-index: 1; display: flex; gap: 5px; opacity: 0; transform: scale(0.5); transition: opacity 0.2s, transform 0.2s; } .btn-pp-pause span { width: 4px; height: 20px; border-radius: 2px; background: #fff; } .btn-pp.is-playing .btn-pp-play { opacity: 0; transform: scale(0); } .btn-pp.is-playing .btn-pp-pause { opacity: 1; transform: scale(1); } .btn-pp-ring { position: absolute; inset: -6px; border-radius: 50%; border: 2px solid rgba(26,24,20,0.2); } .btn-pp.is-playing .btn-pp-ring { animation: btn-pp-ring 2s ease-in-out infinite; } @keyframes btn-pp-ring { 0%,100% { transform: scale(1); opacity: 0.5; } 50% { transform: scale(1.15); opacity: 0.15; } } .btn-pp-wave { display: flex; align-items: center; gap: 4px; height: 36px; } .btn-pp-bar { width: 3px; border-radius: 2px; background: #1a1814; opacity: 0.25; transition: height 0.3s, opacity 0.3s; } .btn-pp-bar.is-active { opacity: 0.7; animation: btn-pp-dance var(--dur, 0.8s) ease-in-out infinite alternate; } @keyframes btn-pp-dance { from { height: var(--min, 4px); } to { height: var(--max, 28px); } } @media (prefers-reduced-motion: reduce) { .btn-pp.is-playing .btn-pp-ring, .btn-pp-bar.is-active { animation: none; } } ``` **JS:** ```js document.querySelectorAll('.btn-pp-area').forEach(function (area) { var btn = area.querySelector('.btn-pp'); var wave = area.querySelector('.btn-pp-wave'); var playing = false; var barCount = 18; var heights = []; for (var i = 0; i < barCount; i++) { var mid = barCount / 2; var d = Math.abs(i - mid) / mid; var h = { min: 3 + d * 3, max: 6 + (1 - d * d) * 26 }; heights.push(h); var bar = document.createElement('span'); bar.className = 'btn-pp-bar'; bar.style.height = h.min + 'px'; bar.style.setProperty('--min', h.min + 'px'); bar.style.setProperty('--max', h.max + 'px'); bar.style.setProperty('--dur', (0.4 + Math.random() * 0.7).toFixed(2) + 's'); bar.style.animationDelay = (Math.random() * 0.5).toFixed(2) + 's'; wave.appendChild(bar); } btn.addEventListener('click', function () { playing = !playing; btn.classList.toggle('is-playing', playing); btn.setAttribute('aria-label', playing ? 'Pause' : 'Play'); var bars = wave.querySelectorAll('.btn-pp-bar'); bars.forEach(function (b, i) { if (playing) { b.classList.add('is-active'); b.style.height = ''; } else { b.classList.remove('is-active'); b.style.height = heights[i].min + 'px'; } }); }); }); ``` ### 06. Subscribe Confetti **Type:** CSS + JS **Description:** The border fills upward with a purple gradient, the label swaps to a checkmark, then twenty-four confetti pieces in six colors burst outward in a celebratory fan. **HTML:** ```html ``` **CSS:** ```css .btn-sub { position: relative; min-width: 180px; padding: 14px 30px; border: 2px solid #7c3aed; border-radius: 12px; background: transparent; color: #7c3aed; font-family: ui-sans-serif, system-ui, sans-serif; font-size: 13px; font-weight: 600; cursor: pointer; overflow: hidden; user-select: none; transition: transform 0.2s; } .btn-sub-fill { position: absolute; inset: 0; z-index: 0; background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%); transform: scaleY(0); transform-origin: bottom; transition: transform 0.4s cubic-bezier(.77,0,.18,1); } .btn-sub-text { position: relative; z-index: 1; transition: color 0.2s 0.15s, opacity 0.2s; } .btn-sub-check { position: absolute; inset: 0; z-index: 2; display: flex; align-items: center; justify-content: center; gap: 8px; color: #fff; font-size: 13px; font-weight: 600; opacity: 0; transform: translateY(12px); transition: opacity 0.3s 0.2s, transform 0.3s 0.2s; } .btn-sub.is-subscribed { pointer-events: none; transform: scale(0.98); } .btn-sub.is-subscribed .btn-sub-fill { transform: scaleY(1); } .btn-sub.is-subscribed .btn-sub-text { opacity: 0; color: #fff; } .btn-sub.is-subscribed .btn-sub-check { opacity: 1; transform: translateY(0); } .btn-sub-confetti { position: absolute; width: var(--w, 6px); height: var(--h, 8px); background: var(--c, #7c3aed); pointer-events: none; z-index: 20; animation: btn-sub-fall 0.9s cubic-bezier(.22,1,.36,1) forwards; } @keyframes btn-sub-fall { 0% { transform: translate(0,0) rotate(0deg) scale(1); opacity: 1; } 100% { transform: translate(var(--tx), var(--ty)) rotate(var(--r)) scale(0.5); opacity: 0; } } @media (prefers-reduced-motion: reduce) { .btn-sub-fill, .btn-sub-text, .btn-sub-check { transition: none; } .btn-sub-confetti { animation: none; } } ``` **JS:** ```js document.querySelectorAll('.btn-sub').forEach(function (btn) { var done = false; var colors = ['#7c3aed', '#a855f7', '#ec4899', '#f59e0b', '#10b981', '#3b82f6']; btn.addEventListener('click', function () { if (done) return; done = true; btn.classList.add('is-subscribed'); var w = btn.offsetWidth; var h = btn.offsetHeight; for (var i = 0; i < 24; i++) { var p = document.createElement('span'); p.className = 'btn-sub-confetti'; var angle = -Math.PI / 2 + (Math.random() - 0.5) * Math.PI * 1.6; var dist = 40 + Math.random() * 70; p.style.left = (w / 2 + (Math.random() - 0.5) * w * 0.6) + 'px'; p.style.top = (h / 2) + 'px'; p.style.setProperty('--w', (4 + Math.random() * 6) + 'px'); p.style.setProperty('--h', (5 + Math.random() * 9) + 'px'); p.style.setProperty('--c', colors[Math.floor(Math.random() * colors.length)]); p.style.setProperty('--tx', (Math.cos(angle) * dist) + 'px'); p.style.setProperty('--ty', (Math.sin(angle) * dist) + 'px'); p.style.setProperty('--r', (Math.random() * 360 - 180) + 'deg'); p.style.animationDelay = (Math.random() * 0.15) + 's'; p.style.borderRadius = Math.random() > 0.5 ? '50%' : '2px'; btn.appendChild(p); p.addEventListener('animationend', function () { this.remove(); }); } }); }); ``` ### 07. Magnetic Mercury **Type:** CSS + JS **Description:** A liquid-metal pill with a polished radial sheen. Click anywhere on the surface and a bright ripple expands from the exact point of contact, like mercury catching the light. **HTML:** ```html ``` **CSS:** ```css .btn-merc { position: relative; padding: 16px 38px; border: none; border-radius: 60px; background: linear-gradient(135deg, #e8e0d5 0%, #c8bfb0 50%, #a89f94 100%); color: #0c0c0f; font-family: ui-sans-serif, system-ui, sans-serif; font-size: 13px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; cursor: pointer; overflow: hidden; user-select: none; box-shadow: 0 2px 20px rgba(200,191,176,0.15), inset 0 1px 0 rgba(255,255,255,0.4), inset 0 -1px 0 rgba(0,0,0,0.15); transition: transform 0.15s cubic-bezier(.34,1.56,.64,1), box-shadow 0.3s ease; } .btn-merc::before { content: ''; position: absolute; inset: 0; border-radius: inherit; background: radial-gradient(ellipse 80% 60% at 50% -20%, rgba(255,255,255,0.6) 0%, transparent 60%); pointer-events: none; } .btn-merc:hover { transform: scale(1.04) translateY(-2px); box-shadow: 0 8px 40px rgba(200,191,176,0.25), inset 0 1px 0 rgba(255,255,255,0.5), inset 0 -1px 0 rgba(0,0,0,0.1); } .btn-merc:active { transform: scale(0.94); } .btn-merc-ripple { position: absolute; border-radius: 50%; transform: scale(0); background: rgba(255,255,255,0.4); pointer-events: none; animation: btn-merc-ripple 0.7s cubic-bezier(.22,1,.36,1) forwards; } @keyframes btn-merc-ripple { to { transform: scale(4); opacity: 0; } } @media (prefers-reduced-motion: reduce) { .btn-merc-ripple { animation: none; display: none; } } ``` **JS:** ```js document.querySelectorAll('.btn-merc').forEach(function (btn) { btn.addEventListener('click', function (e) { var r = btn.getBoundingClientRect(); var size = Math.max(r.width, r.height) * 1.5; var ripple = document.createElement('span'); ripple.className = 'btn-merc-ripple'; ripple.style.width = size + 'px'; ripple.style.height = size + 'px'; ripple.style.left = (e.clientX - r.left - size / 2) + 'px'; ripple.style.top = (e.clientY - r.top - size / 2) + 'px'; btn.appendChild(ripple); ripple.addEventListener('animationend', function () { this.remove(); }); }); }); ``` ### 08. Brutalist Glitch **Type:** CSS + JS **Description:** A raw outlined button that fills hard on hover. Click triggers a chromatic-aberration glitch — the label tears into red and cyan layers with a violent shake before snapping back. **HTML:** ```html ``` **CSS:** ```css .btn-glitch { position: relative; padding: 14px 36px; border: 2px solid #fff; background: transparent; color: #fff; font-family: "Arial Narrow", Arial, sans-serif; font-size: 18px; font-weight: 700; letter-spacing: 3px; text-transform: uppercase; cursor: pointer; overflow: hidden; user-select: none; transition: color 0.1s; } .btn-glitch-fill { position: absolute; inset: 0; z-index: 0; background: #fff; transform: scaleX(0); transform-origin: left; transition: transform 0.15s cubic-bezier(.77,0,.18,1); } .btn-glitch-label { position: relative; z-index: 1; } .btn-glitch:hover { color: #0c0c0f; } .btn-glitch:hover .btn-glitch-fill { transform: scaleX(1); } .btn-glitch.is-glitching { animation: btn-glitch-shake 0.4s cubic-bezier(.36,.07,.19,.97) both; } .btn-glitch.is-glitching::before, .btn-glitch.is-glitching::after { content: attr(data-text); position: absolute; inset: 0; z-index: 2; display: flex; align-items: center; justify-content: center; font-family: "Arial Narrow", Arial, sans-serif; font-size: 18px; font-weight: 700; letter-spacing: 3px; overflow: hidden; } .btn-glitch.is-glitching::before { color: #ff0040; clip-path: polygon(0 0, 100% 0, 100% 45%, 0 45%); animation: btn-glitch-l1 0.4s steps(2) forwards; } .btn-glitch.is-glitching::after { color: #00fff9; clip-path: polygon(0 55%, 100% 55%, 100% 100%, 0 100%); animation: btn-glitch-l2 0.4s steps(2) forwards; } @keyframes btn-glitch-shake { 0%,100% { transform: translate(0); } 20% { transform: translate(-3px, 1px) skewX(-3deg); } 40% { transform: translate(3px, -1px) skewX(3deg); } 60% { transform: translate(-2px, 2px); } 80% { transform: translate(2px, -2px); } } @keyframes btn-glitch-l1 { 0% { transform: translate(-4px, -2px); opacity: 1; } 50% { transform: translate(4px, 2px); opacity: 0.8; } 100% { transform: translate(0); opacity: 0; } } @keyframes btn-glitch-l2 { 0% { transform: translate(4px, 2px); opacity: 1; } 50% { transform: translate(-4px, -2px); opacity: 0.8; } 100% { transform: translate(0); opacity: 0; } } @media (prefers-reduced-motion: reduce) { .btn-glitch.is-glitching { animation: none; } .btn-glitch.is-glitching::before, .btn-glitch.is-glitching::after { animation: none; opacity: 0; } } ``` **JS:** ```js document.querySelectorAll('.btn-glitch').forEach(function (btn) { btn.addEventListener('click', function () { btn.classList.add('is-glitching'); setTimeout(function () { btn.classList.remove('is-glitching'); }, 420); }); }); ``` ### 09. Neon Noir **Type:** CSS + JS **Description:** A cyberpunk terminal button glowing faint cyan. Click detonates a plasma burst — an expanding ring, a radial bloom, and ten sparks flung from the point of contact. **HTML:** ```html ``` **CSS:** ```css .btn-neon { position: relative; padding: 16px 36px; border: 1px solid rgba(0,255,249,0.3); background: rgba(0,255,249,0.04); color: #00fff9; font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 11px; font-weight: 700; letter-spacing: 3px; text-transform: uppercase; cursor: pointer; overflow: hidden; user-select: none; box-shadow: 0 0 20px rgba(0,255,249,0.05), inset 0 0 20px rgba(0,255,249,0.02); transition: border-color 0.3s, background 0.3s, box-shadow 0.3s, color 0.3s; } .btn-neon:hover { border-color: rgba(0,255,249,0.8); background: rgba(0,255,249,0.08); box-shadow: 0 0 30px rgba(0,255,249,0.2), inset 0 0 30px rgba(0,255,249,0.05); color: #fff; } .btn-neon-plasma, .btn-neon-ring { position: absolute; border-radius: 50%; transform: scale(0); pointer-events: none; } .btn-neon-plasma { background: radial-gradient(circle, rgba(0,255,249,0.8) 0%, rgba(0,120,255,0.4) 40%, transparent 70%); mix-blend-mode: screen; animation: btn-neon-burst 0.7s cubic-bezier(.22,1,.36,1) forwards; } .btn-neon-ring { border: 2px solid rgba(0,255,249,0.6); animation: btn-neon-ring 0.7s cubic-bezier(.22,1,.36,1) forwards; } @keyframes btn-neon-burst { 0% { transform: scale(0); opacity: 1; } 60% { opacity: 0.6; } 100% { transform: scale(5); opacity: 0; } } @keyframes btn-neon-ring { 0% { transform: scale(0); opacity: 1; } 100% { transform: scale(4); opacity: 0; } } .btn-neon-spark { position: absolute; width: 2px; height: 2px; border-radius: 50%; background: #00fff9; pointer-events: none; animation: btn-neon-spark 0.6s ease-out forwards; } @keyframes btn-neon-spark { 0% { transform: translate(0,0) scale(1); opacity: 1; } 100% { transform: translate(var(--sx), var(--sy)) scale(0); opacity: 0; } } @media (prefers-reduced-motion: reduce) { .btn-neon-plasma, .btn-neon-ring, .btn-neon-spark { animation: none; display: none; } } ``` **JS:** ```js document.querySelectorAll('.btn-neon').forEach(function (btn) { btn.addEventListener('click', function (e) { var r = btn.getBoundingClientRect(); var x = e.clientX - r.left; var y = e.clientY - r.top; var size = Math.max(r.width, r.height) * 0.8; ['btn-neon-plasma', 'btn-neon-ring'].forEach(function (cls) { var el = document.createElement('div'); el.className = cls; el.style.width = size + 'px'; el.style.height = size + 'px'; el.style.left = (x - size / 2) + 'px'; el.style.top = (y - size / 2) + 'px'; btn.appendChild(el); el.addEventListener('animationend', function () { this.remove(); }); }); for (var i = 0; i < 10; i++) { var s = document.createElement('span'); s.className = 'btn-neon-spark'; var angle = (i / 10) * Math.PI * 2; var dist = 30 + Math.random() * 50; s.style.left = x + 'px'; s.style.top = y + 'px'; s.style.setProperty('--sx', (Math.cos(angle) * dist) + 'px'); s.style.setProperty('--sy', (Math.sin(angle) * dist) + 'px'); s.style.animationDelay = (Math.random() * 0.1) + 's'; btn.appendChild(s); s.addEventListener('animationend', function () { this.remove(); }); } }); }); ``` ### 10. Clay Press **Type:** CSS + JS **Description:** A chunky claymorphism button with a thick 3D base shadow. Press it and the whole shape squishes down and stretches wide, with a soft white bloom blossoming from the click point. **HTML:** ```html ``` **CSS:** ```css .btn-clay { position: relative; padding: 18px 40px; border: none; border-radius: 20px; background: #2ecc71; color: #fff; font-family: ui-sans-serif, system-ui, sans-serif; font-size: 14px; font-weight: 500; cursor: pointer; overflow: hidden; user-select: none; box-shadow: 0 6px 0 #1a7a43, 0 10px 20px rgba(0,0,0,0.3), inset 0 2px 4px rgba(255,255,255,0.2); transition: transform 0.2s cubic-bezier(.34,1.56,.64,1), box-shadow 0.2s ease, filter 0.2s ease; } .btn-clay:hover { transform: translateY(-3px) scale(1.03); box-shadow: 0 9px 0 #1a7a43, 0 16px 30px rgba(0,0,0,0.35), inset 0 2px 4px rgba(255,255,255,0.2); } .btn-clay:active { transform: translateY(4px) scale(0.95) scaleX(1.06); box-shadow: 0 2px 0 #1a7a43, 0 4px 10px rgba(0,0,0,0.2), inset 0 2px 8px rgba(0,0,0,0.2); filter: saturate(1.4) brightness(0.95); } .btn-clay-blob { position: absolute; border-radius: 50%; transform: scale(0); background: rgba(255,255,255,0.25); pointer-events: none; animation: btn-clay-bloom 0.5s cubic-bezier(.22,1,.36,1) forwards; } @keyframes btn-clay-bloom { 0% { transform: scale(0); opacity: 0.8; } 100% { transform: scale(3); opacity: 0; } } @media (prefers-reduced-motion: reduce) { .btn-clay-blob { animation: none; display: none; } } ``` **JS:** ```js document.querySelectorAll('.btn-clay').forEach(function (btn) { btn.addEventListener('click', function (e) { var r = btn.getBoundingClientRect(); var size = Math.max(r.width, r.height); var blob = document.createElement('div'); blob.className = 'btn-clay-blob'; blob.style.width = size + 'px'; blob.style.height = size + 'px'; blob.style.left = (e.clientX - r.left - size / 2) + 'px'; blob.style.top = (e.clientY - r.top - size / 2) + 'px'; btn.appendChild(blob); blob.addEventListener('animationend', function () { this.remove(); }); }); }); ``` ### 11. Editorial Ink **Type:** CSS + JS **Description:** A serif, italic button with a thin frame and a hairline underline that draws in on hover. Press and hold and ink floods the button from your finger; release and it retreats. **HTML:** ```html ``` **CSS:** ```css .btn-ink { position: relative; padding: 14px 32px; border: none; background: transparent; color: #f5f0e8; font-family: Georgia, "Times New Roman", serif; font-size: 16px; font-weight: 700; font-style: italic; letter-spacing: -0.5px; cursor: pointer; overflow: hidden; user-select: none; } .btn-ink::before { content: ''; position: absolute; inset: 0; border: 1.5px solid rgba(245,240,232,0.2); transition: border-color 0.3s; } .btn-ink:hover::before { border-color: rgba(245,240,232,0.5); } .btn-ink-underline { position: absolute; left: 32px; right: 32px; bottom: 10px; height: 1px; background: #f5f0e8; transform: scaleX(0); transform-origin: left; transition: transform 0.4s cubic-bezier(.77,0,.18,1); } .btn-ink:hover .btn-ink-underline { transform: scaleX(1); } .btn-ink-fill { position: absolute; inset: 0; z-index: 0; background: #f5f0e8; clip-path: circle(0% at var(--ox, 50%) var(--oy, 50%)); } .btn-ink-label { position: relative; z-index: 1; } .btn-ink.is-spreading .btn-ink-fill { clip-path: circle(150% at var(--ox, 50%) var(--oy, 50%)); transition: clip-path 0.6s cubic-bezier(.4,0,.2,1); } .btn-ink.is-spreading .btn-ink-label { color: #0c0c0f; transition: color 0.2s 0.15s; } .btn-ink.is-retreating .btn-ink-fill { clip-path: circle(0% at var(--ox, 50%) var(--oy, 50%)); transition: clip-path 0.5s cubic-bezier(.4,0,.2,1) 0.05s; } @media (prefers-reduced-motion: reduce) { .btn-ink-fill, .btn-ink-underline { transition: none; } } ``` **JS:** ```js document.querySelectorAll('.btn-ink').forEach(function (btn) { function retreat() { btn.classList.remove('is-spreading'); btn.classList.add('is-retreating'); setTimeout(function () { btn.classList.remove('is-retreating'); }, 600); } btn.addEventListener('mousedown', function (e) { var r = btn.getBoundingClientRect(); btn.style.setProperty('--ox', ((e.clientX - r.left) / r.width * 100) + '%'); btn.style.setProperty('--oy', ((e.clientY - r.top) / r.height * 100) + '%'); btn.classList.remove('is-retreating'); btn.classList.add('is-spreading'); }); btn.addEventListener('mouseup', retreat); btn.addEventListener('mouseleave', function () { if (btn.classList.contains('is-spreading')) retreat(); }); }); ``` ### 12. Particle Burst **Type:** CSS + JS **Description:** A warm, dark editorial button. Click and eighteen triangular shards explode outward in a full circle — each a random size, colour, and spin — like struck flint throwing sparks. **HTML:** ```html
``` **CSS:** ```css .btn-shard-surface { display: flex; align-items: center; justify-content: center; padding: 48px 56px; background: #0c0c0f; border-radius: 16px; } .btn-shard { position: relative; padding: 16px 44px; border: 1px solid rgba(232,213,176,0.2); background: linear-gradient(135deg, #1a1206 0%, #2c1f0a 100%); color: #e8d5b0; font-family: Georgia, "Times New Roman", serif; font-size: 18px; font-weight: 400; font-style: italic; letter-spacing: 1px; cursor: pointer; user-select: none; transition: border-color 0.3s, background 0.3s, transform 0.1s; } .btn-shard:hover { border-color: rgba(232,213,176,0.5); background: linear-gradient(135deg, #221a0a 0%, #3a2810 100%); } .btn-shard:active { transform: scale(0.97); } .btn-shard-label { position: relative; z-index: 1; } .btn-shard-canvas { position: absolute; inset: -60px; z-index: 10; pointer-events: none; } .btn-shard-piece { position: absolute; width: var(--w, 6px); height: var(--h, 6px); background: var(--c, #e8d5b0); clip-path: polygon(50% 0%, 0% 100%, 100% 100%); animation: btn-shard-fly 0.7s cubic-bezier(.22,1,.36,1) forwards; } @keyframes btn-shard-fly { 0% { transform: translate(0,0) rotate(0deg) scale(1); opacity: 1; } 100% { transform: translate(var(--tx,0px), var(--ty,-60px)) rotate(var(--r,360deg)) scale(0); opacity: 0; } } @media (prefers-reduced-motion: reduce) { .btn-shard-piece { animation: none; display: none; } } ``` **JS:** ```js document.querySelectorAll('.btn-shard').forEach(function (btn) { var colors = ['#e8d5b0', '#f5c842', '#ff8c42', '#e8d5b0', '#fff8e7']; btn.addEventListener('click', function (e) { var canvas = btn.querySelector('.btn-shard-canvas'); var cr = canvas.getBoundingClientRect(); var cx = e.clientX - cr.left; var cy = e.clientY - cr.top; for (var i = 0; i < 18; i++) { var piece = document.createElement('span'); piece.className = 'btn-shard-piece'; var angle = (i / 18) * Math.PI * 2 + (Math.random() - 0.5) * 0.5; var dist = 40 + Math.random() * 70; var size = 4 + Math.random() * 8; piece.style.left = cx + 'px'; piece.style.top = cy + 'px'; piece.style.setProperty('--tx', (Math.cos(angle) * dist) + 'px'); piece.style.setProperty('--ty', (Math.sin(angle) * dist) + 'px'); piece.style.setProperty('--r', (Math.random() * 360 - 180) + 'deg'); piece.style.setProperty('--w', size + 'px'); piece.style.setProperty('--h', size + 'px'); piece.style.setProperty('--c', colors[Math.floor(Math.random() * colors.length)]); piece.style.animationDelay = (Math.random() * 0.1) + 's'; canvas.appendChild(piece); piece.addEventListener('animationend', function () { this.remove(); }); } }); }); ``` ### 13. Brushed Brass **Type:** Pure CSS **Description:** Letterpress brass plate with engraved label and steel rivets at the corners. Hover deepens the bevel; click presses the plate into the surface. **HTML:** ```html ``` **CSS:** ```css .btn-brass { position: relative; padding: 14px 36px; border: none; border-radius: 4px; background: repeating-linear-gradient( 90deg, rgba(255,232,180,0.12) 0 1px, transparent 1px 3px ), linear-gradient(180deg, #d8b66e 0%, #c9a15e 50%, #a07f3a 100%); color: #2a1d0e; font-family: ui-serif, Georgia, serif; font-size: 13px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; cursor: pointer; display: grid; grid-template-columns: auto 1fr auto; grid-template-rows: auto auto; gap: 0 24px; align-items: center; box-shadow: inset 0 1px 0 rgba(255,232,180,0.6), inset 0 -2px 0 rgba(58,36,16,0.4), 0 4px 8px rgba(0,0,0,0.3); text-shadow: 0 1px 0 rgba(255,232,180,0.5); transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.18s ease; } .btn-brass-rivet { width: 6px; height: 6px; border-radius: 50%; background: radial-gradient(circle at 30% 30%, #f0e8d8, #6a5a30 70%); box-shadow: inset 0 -1px 1px rgba(0,0,0,0.4); } .btn-brass-label { grid-column: span 1; grid-row: 1 / span 2; text-align: center; border-top: 1px solid rgba(58,36,16,0.4); border-bottom: 1px solid rgba(58,36,16,0.4); padding: 4px 0; } .btn-brass:hover { filter: brightness(1.06); box-shadow: inset 0 1px 0 rgba(255,232,180,0.7), inset 0 -2px 0 rgba(58,36,16,0.5), 0 6px 12px rgba(0,0,0,0.35); } .btn-brass:active { transform: translateY(2px); box-shadow: inset 0 2px 4px rgba(58,36,16,0.4), 0 1px 2px rgba(0,0,0,0.2); } ``` ### 14. Paper Crane **Type:** Pure CSS **Description:** Washi paper with a hand-stamped red ink seal in the corner. The bottom-right corner is folded like an origami crease; hover lifts the whole card like a postcard. **HTML:** ```html ``` **CSS:** ```css .btn-crane { position: relative; padding: 14px 44px 14px 28px; border: 1px solid #d4c8a3; border-radius: 2px; background: #f5e8c4; color: #3a2010; font-family: ui-serif, Georgia, serif; font-size: 14px; font-weight: 600; letter-spacing: 0.06em; cursor: pointer; overflow: hidden; transition: transform 0.25s cubic-bezier(.3,1,.3,1), box-shadow 0.25s ease; box-shadow: 0 2px 0 rgba(170,140,80,0.4), 0 4px 10px rgba(0,0,0,0.12); } .btn-crane-text { position: relative; z-index: 1; } .btn-crane-seal { position: absolute; top: 50%; right: 10px; transform: translateY(-50%); width: 20px; height: 20px; background: #a83232; color: #f5e8c4; font-family: ui-serif, Georgia, serif; font-size: 12px; font-weight: 700; display: grid; place-items: center; border-radius: 2px; box-shadow: inset 0 0 0 1px rgba(0,0,0,0.18); } .btn-crane-fold { position: absolute; right: 0; bottom: 0; width: 14px; height: 14px; background: linear-gradient(135deg, transparent 50%, #d4c8a3 50%); } .btn-crane:hover { transform: translateY(-3px) rotate(-0.6deg); box-shadow: 0 4px 0 rgba(170,140,80,0.4), 0 8px 16px rgba(0,0,0,0.18); } ``` ### 15. Frosted Ice **Type:** Pure CSS **Description:** Glacier blue with backdrop-filter refraction and noisy frost grain on top. Hover melts the surface to a brighter, glossier ice. **HTML:** ```html ``` **CSS:** ```css .btn-ice { position: relative; padding: 14px 30px; border: 1px solid rgba(168,224,240,0.5); border-radius: 12px; background: linear-gradient(135deg, rgba(168,224,240,0.55), rgba(93,158,176,0.65)); color: #0a3a4a; font-family: ui-sans-serif, system-ui; font-size: 14px; font-weight: 700; letter-spacing: 0.02em; cursor: pointer; overflow: hidden; -webkit-backdrop-filter: blur(8px) saturate(140%); backdrop-filter: blur(8px) saturate(140%); box-shadow: 0 8px 22px -8px rgba(15,80,100,0.4), inset 0 1px 0 rgba(255,255,255,0.6); transition: transform 0.18s ease, box-shadow 0.18s ease; } .btn-ice-frost { position: absolute; inset: 0; background: radial-gradient(ellipse at 30% 20%, rgba(255,255,255,0.55), transparent 60%), repeating-linear-gradient(45deg, rgba(255,255,255,0.04) 0 2px, transparent 2px 4px); pointer-events: none; } .btn-ice-glint { position: absolute; top: -50%; left: -30%; width: 30%; height: 200%; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.7), transparent); transform: rotate(20deg); transition: left 0.5s cubic-bezier(.3,1,.3,1); pointer-events: none; } .btn-ice-text { position: relative; z-index: 1; } .btn-ice:hover { transform: translateY(-2px); box-shadow: 0 12px 28px -8px rgba(15,80,100,0.5), inset 0 1px 0 rgba(255,255,255,0.7); } .btn-ice:hover .btn-ice-glint { left: 130%; } ``` ### 16. Typewriter Key **Type:** Pure CSS **Description:** Concave ivory keycap with black ring and serif letter. Click depresses the key 4px with a soft mechanical thud shadow. **HTML:** ```html ``` **CSS:** ```css .btn-key { display: inline-block; padding: 0; border: none; background: transparent; cursor: pointer; perspective: 200px; } .btn-key-cap { display: inline-flex; align-items: center; justify-content: center; width: 130px; height: 56px; background: radial-gradient(ellipse at 50% 30%, #fff8e8 0%, #f0e8d8 60%, #d4c8a8 100%); border: 3px solid #1a1a1a; border-radius: 8px; box-shadow: inset 0 -8px 12px rgba(0,0,0,0.15), inset 0 2px 4px rgba(255,255,255,0.6), 0 5px 0 #1a1a1a, 0 8px 14px rgba(0,0,0,0.25); transition: transform 0.08s ease, box-shadow 0.08s ease; } .btn-key-letter { font-family: ui-serif, 'Courier New', Georgia, monospace; font-size: 13px; font-weight: 800; letter-spacing: 0.16em; color: #1a1a1a; } .btn-key:hover .btn-key-cap { transform: translateY(-1px); } .btn-key:active .btn-key-cap { transform: translateY(4px); box-shadow: inset 0 -2px 6px rgba(0,0,0,0.25), inset 0 2px 4px rgba(255,255,255,0.4), 0 1px 0 #1a1a1a, 0 2px 4px rgba(0,0,0,0.2); } ``` ### 17. Lacquered Wood **Type:** Pure CSS **Description:** Walnut grain block with brass corner brackets and gilt label. Hover deepens the lacquer sheen; the brass catches a tilt of light. **HTML:** ```html ``` **CSS:** ```css .btn-wood { position: relative; padding: 14px 36px; border: none; border-radius: 3px; background: repeating-linear-gradient( 90deg, rgba(0,0,0,0.06) 0 1px, transparent 1px 4px ), repeating-linear-gradient( 0deg, rgba(0,0,0,0.04) 0 6px, transparent 6px 14px ), linear-gradient(135deg, #6a4628 0%, #5a3a20 50%, #3a2410 100%); color: #c9a15e; font-family: ui-serif, Georgia, serif; font-size: 13px; font-weight: 700; letter-spacing: 0.22em; text-transform: uppercase; cursor: pointer; box-shadow: inset 0 1px 0 rgba(201,161,94,0.2), 0 4px 14px rgba(0,0,0,0.4); transition: filter 0.2s ease, transform 0.18s ease; } .btn-wood-corner { position: absolute; width: 12px; height: 12px; border: 2px solid #c9a15e; background: #c9a15e22; } .btn-wood-corner-tl { top: 4px; left: 4px; border-right: none; border-bottom: none; } .btn-wood-corner-tr { top: 4px; right: 4px; border-left: none; border-bottom: none; } .btn-wood-corner-bl { bottom: 4px; left: 4px; border-right: none; border-top: none; } .btn-wood-corner-br { bottom: 4px; right: 4px; border-left: none; border-top: none; } .btn-wood-text { position: relative; z-index: 1; } .btn-wood:hover { filter: brightness(1.12); transform: translateY(-1px); } ``` ### 18. Gel Capsule **Type:** Pure CSS **Description:** Pill-shaped pharma capsule split half clinical-blue, half pearl-white, with a chunky black band carrying the dose label. Hover brightens both halves. **HTML:** ```html ``` **CSS:** ```css .btn-pill { position: relative; width: 220px; height: 48px; border: none; border-radius: 999px; background: transparent; cursor: pointer; isolation: isolate; filter: drop-shadow(0 4px 10px rgba(58,120,201,0.3)); transition: transform 0.18s ease, filter 0.18s ease; } .btn-pill-half { position: absolute; top: 0; bottom: 0; width: 50%; } .btn-pill-l { left: 0; background: linear-gradient(180deg, #5a96e0 0%, #3a78c9 60%, #2a5a99 100%); border-radius: 999px 0 0 999px; box-shadow: inset 4px 0 6px rgba(0,0,0,0.1); } .btn-pill-l::after { content: ''; position: absolute; top: 5px; left: 14px; right: 4px; height: 35%; background: linear-gradient(180deg, rgba(255,255,255,0.55), transparent); border-radius: 999px 0 0 0; } .btn-pill-r { right: 0; background: linear-gradient(180deg, #ffffff 0%, #e8edf2 60%, #c8d2dc 100%); border-radius: 0 999px 999px 0; box-shadow: inset -4px 0 6px rgba(0,0,0,0.08); } .btn-pill-r::after { content: ''; position: absolute; top: 5px; left: 4px; right: 14px; height: 35%; background: linear-gradient(180deg, rgba(255,255,255,0.9), transparent); border-radius: 0 999px 0 0; } .btn-pill-band { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 86%; height: 22px; background: #0e0e1a; border-radius: 4px; display: grid; place-items: center; z-index: 1; } .btn-pill-text { font-family: ui-monospace, monospace; font-size: 11px; font-weight: 800; color: #fdfcfa; letter-spacing: 0.18em; } .btn-pill:hover { transform: translateY(-2px); filter: drop-shadow(0 6px 14px rgba(58,120,201,0.45)); } ``` ### 19. Copper Coin **Type:** Pure CSS **Description:** Aged copper disc with verdigris patina blooming around the rim. Hover spins the patina conically. **HTML:** ```html ``` **CSS:** ```css @property --btn-copper-angle { syntax: ''; initial-value: 0deg; inherits: false; } .btn-copper { position: relative; width: 96px; height: 96px; border: none; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #e8b878 0%, #b87333 55%, #6a3f15 100%); color: #3a2410; font-family: ui-serif, Georgia, serif; font-size: 12px; font-weight: 800; letter-spacing: 0.18em; text-transform: uppercase; cursor: pointer; isolation: isolate; box-shadow: inset 0 -3px 6px rgba(0,0,0,0.4), inset 0 2px 3px rgba(255,255,255,0.4), 0 6px 14px rgba(0,0,0,0.3); --btn-copper-angle: 0deg; transition: --btn-copper-angle 4s linear, transform 0.18s ease; } .btn-copper-rim { position: absolute; inset: 4px; border-radius: 50%; background: conic-gradient(from var(--btn-copper-angle), transparent 0deg, #5d8a73aa 30deg, transparent 80deg, #88a896aa 200deg, transparent 260deg, #5d8a73aa 320deg, transparent 360deg); filter: blur(2px); pointer-events: none; -webkit-mask: radial-gradient(circle, transparent 60%, #000 70%); mask: radial-gradient(circle, transparent 60%, #000 70%); } .btn-copper-text { position: relative; z-index: 1; text-shadow: 0 1px 0 rgba(255,232,180,0.4); } .btn-copper:hover { --btn-copper-angle: 360deg; transform: scale(1.04); } ``` ### 20. Origami Fortune **Type:** Pure CSS **Description:** Triangular fold of cream paper with a single ink-red strip. Hover unfolds slightly to reveal the fortune underneath. **HTML:** ```html ``` **CSS:** ```css .btn-fortune { position: relative; padding: 16px 36px; border: none; background: #f5ead0; color: #3a2410; font-family: ui-serif, Georgia, serif; font-size: 13px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; cursor: pointer; clip-path: polygon(0 0, 100% 0, 100% 70%, 50% 100%, 0 70%); box-shadow: 0 4px 12px rgba(58,36,16,0.25); transition: transform 0.25s cubic-bezier(.3,1.2,.3,1); } .btn-fortune-fold { position: absolute; inset: 0; background: linear-gradient(180deg, transparent 60%, rgba(58,36,16,0.18) 100%); pointer-events: none; } .btn-fortune-strip { position: absolute; bottom: 0; left: 50%; width: 4px; height: 32%; background: #a83232; transform: translateX(-50%); } .btn-fortune-text { position: relative; z-index: 1; } .btn-fortune:hover { transform: translateY(-2px) rotate(-2deg); clip-path: polygon(0 0, 100% 0, 100% 80%, 50% 100%, 0 80%); } ``` ### 21. Holographic Foil **Type:** Pure CSS **Description:** Iridescent cyan→magenta sheen with a ragged sticker edge. Hover shifts the spectrum across the surface. **HTML:** ```html ``` **CSS:** ```css .btn-holo { position: relative; padding: 13px 28px; border: 2px solid #fff; border-radius: 6px; background: linear-gradient(115deg, #00d4ff 0%, #ff3d8c 30%, #3eff7f 55%, #fef34c 75%, #00d4ff 100%); background-size: 240% 100%; background-position: 0% 50%; color: #1a0033; font-family: ui-monospace, monospace; font-size: 13px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; cursor: pointer; box-shadow: 0 4px 18px rgba(0,212,255,0.35), 0 4px 18px rgba(255,61,140,0.35), inset 0 0 0 1px rgba(255,255,255,0.4); transition: background-position 0.5s cubic-bezier(.3,1,.3,1), transform 0.18s; } .btn-holo-text { background: rgba(255,255,255,0.7); padding: 4px 10px; border-radius: 3px; } .btn-holo:hover { background-position: 100% 50%; transform: translateY(-2px) scale(1.02); } ``` ### 22. Brutalist Slab **Type:** Pure CSS **Description:** Rough concrete with a safety-yellow stripe and hard 6px offset. Click slams the slab to flush with the page. **HTML:** ```html ``` **CSS:** ```css .btn-brutal { position: relative; padding: 16px 40px; border: 3px solid #1a1a1a; border-radius: 0; background: repeating-radial-gradient(circle at 20% 30%, rgba(0,0,0,0.06) 0 1px, transparent 1px 5px), repeating-radial-gradient(circle at 80% 70%, rgba(0,0,0,0.05) 0 1px, transparent 1px 7px), #8a8a85; color: #1a1a1a; font-family: ui-monospace, monospace; font-size: 14px; font-weight: 900; letter-spacing: 0.18em; cursor: pointer; box-shadow: 6px 6px 0 #1a1a1a; transition: transform 0.08s ease, box-shadow 0.08s ease; } .btn-brutal-stripe { position: absolute; left: 0; right: 0; top: -3px; height: 6px; background: #f5cb1a; border-bottom: 3px solid #1a1a1a; } .btn-brutal-text { position: relative; } .btn-brutal:hover { transform: translate(-2px,-2px); box-shadow: 8px 8px 0 #1a1a1a; } .btn-brutal:active { transform: translate(6px,6px); box-shadow: 0 0 0 #1a1a1a; } ``` ### 23. Mercury Bead **Type:** Pure CSS **Description:** Quicksilver bead that morphs its border-radius on hover, like surface tension giving way under pressure. **HTML:** ```html ``` **CSS:** ```css .btn-mercury { padding: 14px 32px; border: none; border-radius: 50% 14px 50% 14px / 14px 50% 14px 50%; background: radial-gradient(circle at 30% 30%, #e0e6ec 0%, #bcc4ce 50%, #5a6470 100%); color: #1e242a; font-family: ui-sans-serif, system-ui; font-size: 14px; font-weight: 700; cursor: pointer; box-shadow: inset 0 -4px 8px rgba(30,36,42,0.4), inset 0 2px 4px rgba(255,255,255,0.6), 0 4px 12px rgba(30,36,42,0.4); transition: border-radius 0.5s cubic-bezier(.3,1.2,.3,1), transform 0.3s; } .btn-mercury:hover { border-radius: 14px 50% 14px 50% / 50% 14px 50% 14px; transform: scale(1.04); } ``` ### 24. Soft Pill **Type:** Pure CSS **Description:** The Linear / Raycast / Vercel button trend of 2026 — soft gradient pill with a crisp inset highlight, ambient glow, and a tiny shortcut chip on the right. Hover brightens the glow without moving the button. **HTML:** ```html ``` **CSS:** ```css .btn-soft { --soft-bg-1: #2a2a3a; --soft-bg-2: #16161e; --soft-glow: #6e7eff; position: relative; padding: 11px 14px 11px 18px; border: 1px solid rgba(255,255,255,0.06); border-radius: 999px; background: linear-gradient(180deg, var(--soft-bg-1), var(--soft-bg-2)); color: #f5f5fa; font-family: ui-sans-serif, system-ui; font-size: 14px; font-weight: 600; letter-spacing: -0.01em; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; box-shadow: inset 0 1px 0 rgba(255,255,255,0.12), inset 0 -1px 0 rgba(0,0,0,0.4), 0 6px 14px rgba(0,0,0,0.35), 0 0 0 0 var(--soft-glow); transition: box-shadow 0.25s ease, transform 0.12s ease; } .btn-soft-icon { width: 14px; height: 14px; color: var(--soft-glow); flex-shrink: 0; } .btn-soft-kbd { font-family: ui-monospace, monospace; font-size: 11px; color: #a8a8b8; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.08); border-radius: 4px; padding: 1px 6px; margin-left: 4px; } .btn-soft:hover { box-shadow: inset 0 1px 0 rgba(255,255,255,0.15), inset 0 -1px 0 rgba(0,0,0,0.4), 0 6px 14px rgba(0,0,0,0.35), 0 0 22px -4px var(--soft-glow); } .btn-soft:active { transform: translateY(1px); } ``` ### 25. Masking Tape **Type:** Pure CSS **Description:** Kraft masking tape with torn perforated edges and a hand-stamped ink label. Hover lifts the corner like a peel. **HTML:** ```html ``` **CSS:** ```css .btn-tape { position: relative; padding: 14px 38px; border: none; border-radius: 0; background: repeating-linear-gradient(135deg, rgba(0,0,0,0.04) 0 6px, transparent 6px 12px), #d8b87a; color: #2a1d0e; font-family: ui-monospace, monospace; font-size: 14px; font-weight: 800; letter-spacing: 0.32em; cursor: pointer; /* Torn edges: scalloped left/right via radial-gradient mask */ -webkit-mask: radial-gradient(circle 4px at 0% 50%, transparent 99%, #000 100%), radial-gradient(circle 4px at 100% 50%, transparent 99%, #000 100%), linear-gradient(#000, #000); mask: radial-gradient(circle 4px at 0% 50%, transparent 99%, #000 100%), radial-gradient(circle 4px at 100% 50%, transparent 99%, #000 100%), linear-gradient(#000, #000); -webkit-mask-composite: source-over; mask-composite: add; box-shadow: 0 3px 8px rgba(0,0,0,0.2); transition: transform 0.25s cubic-bezier(.3,1,.3,1); } .btn-tape:hover { transform: rotate(-2deg) translateY(-2px); } ``` ### 26. Glass Shard **Type:** Pure CSS **Description:** Obsidian shard with a faceted clip-path; magenta and cyan refract through the cuts on hover. **HTML:** ```html ``` **CSS:** ```css .btn-shard { position: relative; padding: 14px 36px; border: none; background: linear-gradient(115deg, #0e0e1a 0%, #ff3d8c 30%, #0e0e1a 50%, #00d4ff 70%, #0e0e1a 100%); background-size: 240% 100%; background-position: 0% 50%; color: #fff; font-family: ui-sans-serif, system-ui; font-size: 14px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; cursor: pointer; clip-path: polygon(8% 0, 92% 0, 100% 50%, 92% 100%, 8% 100%, 0 50%); box-shadow: 0 6px 18px rgba(0,212,255,0.25), 0 6px 18px rgba(255,61,140,0.25); transition: background-position 0.6s cubic-bezier(.3,1,.3,1), transform 0.2s; } .btn-shard-text { position: relative; } .btn-shard:hover { background-position: 100% 50%; transform: translateY(-2px); } ``` ### 27. Velvet Ribbon **Type:** Pure CSS **Description:** Wine-velvet pill with gilt edges; the nap shimmers like brushed fabric on hover. **HTML:** ```html ``` **CSS:** ```css .btn-velvet { position: relative; padding: 13px 36px; border: 2px solid #d4a017; border-radius: 999px; background: repeating-linear-gradient(115deg, rgba(212,160,23,0.06) 0 1px, transparent 1px 4px), radial-gradient(ellipse at 50% 30%, #6a2235 0%, #5a1d2c 60%, #3a0e1a 100%); color: #f5d678; font-family: ui-serif, Georgia, serif; font-size: 13px; font-weight: 700; letter-spacing: 0.22em; cursor: pointer; box-shadow: inset 0 1px 0 rgba(245,214,120,0.25), inset 0 -8px 18px rgba(0,0,0,0.4), 0 4px 14px rgba(58,14,26,0.45); transition: filter 0.3s ease, transform 0.2s ease; } .btn-velvet:hover { filter: brightness(1.18) saturate(1.1); transform: translateY(-1px); } ``` ### 28. LED Segment **Type:** Pure CSS **Description:** Phosphor-green 7-segment-style display on a pure black panel with a faint scanline overlay. **HTML:** ```html ``` **CSS:** ```css .btn-led { position: relative; padding: 14px 30px; border: 2px solid #1a3a20; border-radius: 4px; background: #0a0a0a; color: #3eff7f; font-family: 'Courier New', ui-monospace, monospace; font-size: 16px; font-weight: 900; letter-spacing: 0.2em; cursor: pointer; text-shadow: 0 0 6px rgba(62,255,127,0.8), 0 0 14px rgba(62,255,127,0.4); box-shadow: inset 0 0 0 1px #0a1a10, inset 0 0 24px rgba(62,255,127,0.08), 0 4px 14px rgba(0,0,0,0.5); overflow: hidden; transition: text-shadow 0.18s ease; } .btn-led-scanline { position: absolute; inset: 0; background: repeating-linear-gradient( 0deg, rgba(62,255,127,0.05) 0 2px, transparent 2px 4px); pointer-events: none; } .btn-led-text { position: relative; } .btn-led:hover { text-shadow: 0 0 10px rgba(62,255,127,1), 0 0 22px rgba(62,255,127,0.7), 0 0 30px rgba(62,255,127,0.3); } ``` ### 29. Cassette Label **Type:** Pure CSS **Description:** Hot-pink mixtape J-card with electric-teal corner sticker and ruled lines. Hover gives it a 90s cassette tilt. **HTML:** ```html ``` **CSS:** ```css .btn-cass { position: relative; padding: 14px 32px 14px 38px; border: 2px solid #0a0a14; border-radius: 0; background: repeating-linear-gradient(0deg, transparent 0 13px, rgba(10,10,20,0.18) 13px 14px), #ff3d83; color: #0a0a14; font-family: ui-monospace, monospace; font-size: 14px; font-weight: 900; letter-spacing: 0.28em; cursor: pointer; box-shadow: 4px 4px 0 #0a0a14; transition: transform 0.15s ease, box-shadow 0.15s ease; } .btn-cass-corner { position: absolute; top: 4px; left: 4px; width: 16px; height: 16px; background: #00d4d4; border: 2px solid #0a0a14; transform: rotate(45deg); transform-origin: center; } .btn-cass-text { position: relative; } .btn-cass:hover { transform: rotate(-1.5deg) translate(-1px,-1px); box-shadow: 5px 5px 0 #0a0a14; } ``` ### 30. Chalkboard **Type:** Pure CSS **Description:** Slate-green chalkboard with a chalk-drawn label and dusty grain. Hover smudges a faint eraser trail. **HTML:** ```html ``` **CSS:** ```css .btn-chalk { position: relative; padding: 14px 30px; border: 4px solid #c9a15e; border-radius: 6px; background: repeating-linear-gradient(45deg, rgba(232,226,208,0.04) 0 1px, transparent 1px 4px), #1e2a23; color: #e8e2d0; font-family: 'Caveat', 'Comic Sans MS', cursive, ui-serif; font-size: 17px; font-weight: 700; letter-spacing: 0.04em; cursor: pointer; box-shadow: inset 0 0 24px rgba(0,0,0,0.5), 0 4px 12px rgba(0,0,0,0.3); overflow: hidden; transition: filter 0.18s ease; } .btn-chalk-dust { position: absolute; inset: 0; background: radial-gradient(ellipse at 30% 30%, rgba(232,226,208,0.06), transparent 60%), radial-gradient(ellipse at 70% 80%, rgba(232,226,208,0.04), transparent 60%); pointer-events: none; opacity: 0; transition: opacity 0.3s ease; } .btn-chalk-text { position: relative; text-shadow: 0 0 1px rgba(232,226,208,0.4); } .btn-chalk:hover .btn-chalk-dust { opacity: 1; } ``` ### 31. Vinyl Sleeve **Type:** CSS + JS **Description:** Sleeve-red record cover with concentric grooves; click drops the needle and ripples outward from the click point. **HTML:** ```html ``` **CSS:** ```css .btn-vinyl { position: relative; width: 96px; height: 96px; border: 2px solid #1a1a1a; border-radius: 50%; background: radial-gradient(circle at center, #f5ead0 0%, #f5ead0 18%, #1a1a1a 19%, #1a1a1a 100%), #cc3232; background-size: 100% 100%; background-color: #cc3232; color: #cc3232; font-family: ui-serif, Georgia, serif; font-size: 12px; font-weight: 700; letter-spacing: 0.16em; cursor: pointer; display: grid; place-items: center; isolation: isolate; overflow: hidden; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.05), 0 4px 14px rgba(0,0,0,0.35); transition: transform 0.3s ease; } .btn-vinyl::before { content: ''; position: absolute; inset: 12px; border-radius: 50%; background: repeating-radial-gradient(circle, #1a1a1a 0 1px, #2a2a2a 1px 3px); pointer-events: none; } .btn-vinyl::after { content: ''; position: absolute; top: 50%; left: 50%; width: 0; height: 0; border-radius: 50%; background: rgba(245,234,208,0.4); transform: translate(-50%, -50%); pointer-events: none; } .btn-vinyl.btn-vinyl-rippled::after { animation: btn-vinyl-ripple 0.7s ease-out; } @keyframes btn-vinyl-ripple { 0% { width: 0; height: 0; opacity: 0.7; } 100% { width: 200%; height: 200%; opacity: 0; } } .btn-vinyl:hover { transform: rotate(20deg); } .btn-vinyl span, .btn-vinyl { isolation: isolate; } /* label sits on top of grooves */ .btn-vinyl { z-index: 0; } ``` **JS:** ```js document.querySelectorAll('.btn-vinyl').forEach(function(btn) { btn.addEventListener('click', function() { btn.classList.remove('btn-vinyl-rippled'); /* force reflow so the same animation can replay */ void btn.offsetWidth; btn.classList.add('btn-vinyl-rippled'); }); }); ``` ### 32. Polaroid Snapshot **Type:** Pure CSS **Description:** A genuine Polaroid frame — square sepia photo on top, the iconic chunky white bottom border with a handwritten caption and date stamp. Tilts casually on hover like it was just dropped on a table. **HTML:** ```html ``` **CSS:** ```css .btn-polar { position: relative; padding: 8px 8px 0; border: none; background: #fff8e7; cursor: pointer; display: flex; flex-direction: column; gap: 0; width: 156px; box-shadow: 0 8px 22px rgba(0,0,0,0.35), 0 1px 0 rgba(112,72,48,0.1) inset; transition: transform 0.3s cubic-bezier(.3,1,.3,1), box-shadow 0.3s ease; transform: rotate(-1.5deg); } .btn-polar-photo { position: relative; display: block; width: 100%; aspect-ratio: 1 / 1; background: radial-gradient(circle at 30% 25%, #ffd089 0%, transparent 45%), radial-gradient(circle at 70% 75%, rgba(0,0,0,0.25), transparent 50%), linear-gradient(135deg, #fcb938 0%, #b87333 50%, #5a3010 100%); filter: sepia(0.35) saturate(1.2) contrast(1.05); overflow: hidden; } .btn-polar-glare { position: absolute; top: -10%; left: -20%; width: 70%; height: 70%; background: radial-gradient(ellipse, rgba(255,255,255,0.4), transparent 60%); pointer-events: none; } .btn-polar-caption { /* The iconic chunky bottom border */ display: flex; flex-direction: column; align-items: center; padding: 14px 10px 22px; gap: 4px; } .btn-polar-text { font-family: 'Caveat', 'Comic Sans MS', cursive, ui-serif; font-size: 16px; font-weight: 600; color: #3a2410; letter-spacing: 0.02em; line-height: 1; } .btn-polar-date { font-family: ui-monospace, monospace; font-size: 9px; letter-spacing: 0.16em; color: #b87333; } .btn-polar:hover { transform: rotate(0deg) translateY(-4px) scale(1.02); box-shadow: 0 14px 32px rgba(0,0,0,0.4); } ``` ### 33. Boarding Pass **Type:** Pure CSS **Description:** Airline-navy ticket with three-letter airport codes, a flight-path arrow, magenta tear-line stub, and a real barcode strip along the bottom. **HTML:** ```html ``` **CSS:** ```css .btn-board { position: relative; padding: 0; border: none; border-radius: 6px; background: #0c2340; color: #fdf6e9; font-family: ui-monospace, monospace; cursor: pointer; display: inline-flex; align-items: stretch; box-shadow: 0 6px 16px rgba(12,35,64,0.4); transition: transform 0.18s ease, box-shadow 0.18s ease; overflow: hidden; } .btn-board-main { display: flex; flex-direction: column; padding: 12px 18px 10px; gap: 8px; } .btn-board-route { display: flex; align-items: center; gap: 10px; font-size: 16px; font-weight: 800; letter-spacing: 0.12em; } .btn-board-arrow { width: 20px; height: 14px; color: #e84a8a; } .btn-board-iata { color: #fdf6e9; } .btn-board-barcode { display: block; height: 14px; background: repeating-linear-gradient(90deg, #fdf6e9 0 2px, transparent 2px 3px, #fdf6e9 3px 4px, transparent 4px 7px, #fdf6e9 7px 8px, transparent 8px 10px); opacity: 0.95; } .btn-board-tear { position: relative; width: 0; border-left: 2px dashed rgba(253,246,233,0.35); margin: 6px 0; } .btn-board-tear::before, .btn-board-tear::after { content: ''; position: absolute; left: -7px; width: 12px; height: 12px; background: #17171f; border-radius: 50%; } .btn-board-tear::before { top: -12px; } .btn-board-tear::after { bottom: -12px; } .btn-board-stub { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 12px 18px; background: linear-gradient(180deg, rgba(232,74,138,0.18), rgba(232,74,138,0.05)); border-left: 1px solid rgba(232,74,138,0.4); gap: 2px; } .btn-board-stub-label { font-size: 9px; font-weight: 700; letter-spacing: 0.22em; color: #e84a8a; } .btn-board-stub-val { font-size: 18px; font-weight: 900; letter-spacing: 0.04em; color: #fdf6e9; } .btn-board:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(12,35,64,0.55); } ``` ### 34. Subway Token **Type:** CSS + JS **Description:** Aged brass subway token with a curved arc sweep that traces a clock-like ring around the inscription on click. The arc is an SVG path so the curve stays smooth at every angle. **HTML:** ```html ``` **CSS:** ```css .btn-token { position: relative; width: 124px; height: 124px; border: none; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #e8c890 0%, #c9a15e 50%, #6a4520 100%); color: #2a1d0e; font-family: ui-serif, Georgia, serif; font-size: 11px; font-weight: 800; letter-spacing: 0.22em; cursor: pointer; display: grid; place-items: center; box-shadow: inset 0 -3px 6px rgba(0,0,0,0.4), inset 0 3px 4px rgba(255,232,180,0.6), 0 6px 14px rgba(0,0,0,0.35); transition: transform 0.18s ease; } .btn-token-arc { position: absolute; inset: 8px; width: calc(100% - 16px); height: calc(100% - 16px); pointer-events: none; } .btn-token-arc-spin { transform-origin: 50% 50%; transform: rotate(-90deg); transition: transform 1.4s cubic-bezier(.3,1,.3,1); } .btn-token-text { position: relative; z-index: 1; text-shadow: 0 1px 0 rgba(255,232,180,0.4); } .btn-token.is-processing .btn-token-arc-spin { transform: rotate(270deg); } .btn-token:hover { transform: scale(1.04); } ``` **JS:** ```js document.querySelectorAll('.btn-token').forEach(function(btn) { btn.addEventListener('click', function() { if (btn.classList.contains('is-processing')) return; btn.classList.add('is-processing'); setTimeout(function() { btn.classList.remove('is-processing'); }, 1400); }); }); ``` ### 35. Rx Label **Type:** Pure CSS **Description:** Cream pharmacy label with letterpress serif, dotted underline, and a red Rx badge. Vintage prescription chic. **HTML:** ```html ``` **CSS:** ```css .btn-rx { position: relative; padding: 12px 26px 12px 16px; border: 1.5px solid #4d5435; border-radius: 3px; background: repeating-linear-gradient(0deg, transparent 0 22px, rgba(77,84,53,0.08) 22px 23px), #f5ede0; color: #4d5435; font-family: ui-serif, Georgia, serif; font-size: 14px; font-weight: 700; letter-spacing: 0.18em; cursor: pointer; display: inline-flex; align-items: center; gap: 14px; box-shadow: 0 4px 10px rgba(77,84,53,0.18); transition: transform 0.18s ease, box-shadow 0.18s ease; } .btn-rx-badge { width: 26px; height: 26px; background: #a32424; color: #f5ede0; border-radius: 3px; display: grid; place-items: center; font-family: ui-serif, Georgia, serif; font-size: 14px; font-weight: 800; } .btn-rx-text { border-bottom: 1.5px dotted #4d5435; padding-bottom: 1px; } .btn-rx:hover { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(77,84,53,0.22); } ``` ### 36. Radio Dial **Type:** CSS + JS **Description:** Bakelite-cream dial with a brass pointer locked to OFF. Click toggles to ON: the pointer swings clockwise to the right tick mark and stays there until the next click. **HTML:** ```html ``` **CSS:** ```css .btn-radio { position: relative; width: 124px; height: 64px; border: 3px solid #1a1a1a; border-bottom-width: 6px; border-radius: 124px 124px 0 0 / 124px 124px 0 0; background: radial-gradient(ellipse at 50% 90%, #f5ede0 0%, #d8c8a8 100%); cursor: pointer; overflow: hidden; font-family: ui-serif, Georgia, serif; font-size: 9px; font-weight: 800; letter-spacing: 0.14em; box-shadow: 0 4px 14px rgba(0,0,0,0.25); } .btn-radio-tick { position: absolute; bottom: 6px; color: #5a4520; transition: color 0.3s ease, font-weight 0.3s ease; } .btn-radio-tick-l { left: 14px; color: #a32424; } .btn-radio-tick-r { right: 14px; } .btn-radio[aria-pressed="true"] .btn-radio-tick-l { color: #5a4520; } .btn-radio[aria-pressed="true"] .btn-radio-tick-r { color: #a32424; } .btn-radio-arrow { position: absolute; bottom: 0; left: 50%; width: 4px; height: 44px; background: linear-gradient(180deg, #c9a15e 0%, #6a4520 100%); border-radius: 2px 2px 0 0; transform-origin: bottom center; transform: translateX(-2px) rotate(-40deg); transition: transform 0.55s cubic-bezier(.3,1.2,.3,1); } .btn-radio[aria-pressed="true"] .btn-radio-arrow { transform: translateX(-2px) rotate(40deg); } ``` **JS:** ```js document.querySelectorAll('.btn-radio').forEach(function(btn) { btn.addEventListener('click', function() { var pressed = btn.getAttribute('aria-pressed') === 'true'; btn.setAttribute('aria-pressed', pressed ? 'false' : 'true'); }); }); ``` ### 37. Postage Stamp **Type:** Pure CSS **Description:** Regal blue stamp with scalloped perforated edges and a faded ink date. Pure SVG-mask perforation. **HTML:** ```html ``` **CSS:** ```css .btn-stamp { position: relative; padding: 16px 22px; border: none; background: #1a3a78; color: #fdf6e9; font-family: ui-serif, Georgia, serif; font-size: 11px; font-weight: 800; letter-spacing: 0.22em; cursor: pointer; display: grid; gap: 4px; /* Scalloped perforated edges via radial mask */ -webkit-mask: radial-gradient(circle 4px at 0 50%, transparent 99%, #000 100%) repeat-y left, radial-gradient(circle 4px at 100% 50%, transparent 99%, #000 100%) repeat-y right, radial-gradient(circle 4px at 50% 0, transparent 99%, #000 100%) repeat-x top, radial-gradient(circle 4px at 50% 100%, transparent 99%, #000 100%) repeat-x bottom, linear-gradient(#000, #000); -webkit-mask-size: 8px 12px, 8px 12px, 12px 8px, 12px 8px, 100% 100%; -webkit-mask-composite: source-over; mask: radial-gradient(circle 4px at 0 50%, transparent 99%, #000 100%) repeat-y left, radial-gradient(circle 4px at 100% 50%, transparent 99%, #000 100%) repeat-y right, radial-gradient(circle 4px at 50% 0, transparent 99%, #000 100%) repeat-x top, radial-gradient(circle 4px at 50% 100%, transparent 99%, #000 100%) repeat-x bottom, linear-gradient(#000, #000); mask-size: 8px 12px, 8px 12px, 12px 8px, 12px 8px, 100% 100%; mask-composite: add; box-shadow: 0 4px 12px rgba(26,58,120,0.4); transition: transform 0.2s ease; } .btn-stamp-num { font-size: 18px; color: #fcb938; letter-spacing: 0.08em; } .btn-stamp:hover { transform: rotate(-3deg) translateY(-2px); } ``` ### 38. Cigar Band **Type:** Pure CSS **Description:** Gold filigree foil seal over a maroon ribbon; ornate Victorian club-lounge energy. **HTML:** ```html ``` **CSS:** ```css .btn-cigar { position: relative; padding: 14px 36px; border: 2px solid #d4a017; border-radius: 2px; background: repeating-radial-gradient(circle at 50% 50%, rgba(212,160,23,0.1) 0 1px, transparent 1px 4px), repeating-linear-gradient(90deg, rgba(212,160,23,0.06) 0 2px, transparent 2px 6px), linear-gradient(180deg, #6a2540 0%, #5a1d2c 60%, #3a0e1a 100%); color: #d4a017; font-family: ui-serif, Georgia, serif; font-size: 13px; font-weight: 800; letter-spacing: 0.28em; cursor: pointer; box-shadow: inset 0 0 0 4px rgba(212,160,23,0.15), inset 0 1px 0 rgba(212,160,23,0.4), 0 6px 16px rgba(58,14,26,0.4); text-shadow: 0 1px 0 rgba(0,0,0,0.4); transition: filter 0.18s, transform 0.2s; } .btn-cigar-edge { position: absolute; inset: 4px; border: 1px solid #d4a017; pointer-events: none; } .btn-cigar:hover { filter: brightness(1.1); transform: translateY(-1px); } ``` ### 39. Calculator Key **Type:** Pure CSS **Description:** Beige concave keycap with olive-green accent label; click flips the press shadow flush. **HTML:** ```html ``` **CSS:** ```css .btn-calc { display: inline-block; padding: 0; border: none; background: transparent; cursor: pointer; } .btn-calc-cap { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; width: 84px; height: 64px; background: linear-gradient(180deg, #ebe4d3 0%, #d8d2c0 60%, #c0b9a3 100%); border-radius: 6px; box-shadow: inset 0 -6px 8px rgba(0,0,0,0.12), inset 0 2px 3px rgba(255,255,255,0.7), 0 4px 0 #4d5435, 0 6px 12px rgba(0,0,0,0.2); transition: transform 0.08s ease, box-shadow 0.08s ease; } .btn-calc-glyph { font-family: ui-monospace, monospace; font-size: 22px; font-weight: 900; color: #4d5435; } .btn-calc-label { font-family: ui-monospace, monospace; font-size: 8px; font-weight: 700; letter-spacing: 0.18em; color: #4d5435; opacity: 0.8; } .btn-calc:active .btn-calc-cap { transform: translateY(3px); box-shadow: inset 0 -2px 4px rgba(0,0,0,0.18), inset 0 2px 3px rgba(255,255,255,0.5), 0 1px 0 #4d5435, 0 2px 4px rgba(0,0,0,0.15); } ``` ### 40. Toolbox Latch **Type:** CSS + JS **Description:** Enamel teal lever with chrome bolt; the cursor spotlight illuminates the metal as you move across. **HTML:** ```html ``` **CSS:** ```css .btn-latch { position: relative; padding: 14px 32px 14px 50px; border: 2px solid #1a1a1a; border-radius: 6px; background: radial-gradient(circle 80px at var(--mx, 50%) var(--my, 50%), rgba(255,255,255,0.18), transparent 70%), linear-gradient(180deg, #0e7a5c 0%, #0d6048 60%, #084030 100%); color: #e0f0ec; font-family: ui-monospace, monospace; font-size: 13px; font-weight: 800; letter-spacing: 0.22em; cursor: pointer; box-shadow: 0 4px 14px rgba(8,64,48,0.4), inset 0 1px 0 rgba(255,255,255,0.15); --mx: 50%; --my: 50%; } .btn-latch-bolt { position: absolute; left: 12px; top: 50%; width: 18px; height: 18px; margin-top: -9px; background: radial-gradient(circle at 35% 30%, #f5f5f5, #8a8a85 60%, #3a3a32 100%); border-radius: 50%; box-shadow: inset 0 0 0 1px #1a1a1a, 0 1px 2px rgba(0,0,0,0.4); } .btn-latch-bolt::before, .btn-latch-bolt::after { content: ''; position: absolute; top: 50%; left: 50%; width: 12px; height: 2px; background: #1a1a1a; transform: translate(-50%, -50%); } .btn-latch-bolt::after { transform: translate(-50%, -50%) rotate(90deg); } ``` **JS:** ```js document.querySelectorAll('.btn-latch').forEach(function(btn) { btn.addEventListener('mousemove', function(e) { var rect = btn.getBoundingClientRect(); btn.style.setProperty('--mx', (e.clientX - rect.left) + 'px'); btn.style.setProperty('--my', (e.clientY - rect.top) + 'px'); }); btn.addEventListener('mouseleave', function() { btn.style.setProperty('--mx', '50%'); btn.style.setProperty('--my', '50%'); }); }); ``` ### 41. Receipt Paper **Type:** CSS + JS **Description:** Newsprint-cream receipt with a dashed perforation along the top, a tilted "PAID" rubber stamp watermark in the top-left corner, and a total that counts up on click before resetting. **HTML:** ```html ``` **CSS:** ```css .btn-receipt { position: relative; padding: 28px 26px 16px; border: none; background: #f4ecd8; color: #1a1a1a; font-family: ui-monospace, monospace; font-size: 12px; font-weight: 800; letter-spacing: 0.16em; cursor: pointer; filter: drop-shadow(0 4px 10px rgba(0,0,0,0.18)); transition: transform 0.18s ease; overflow: hidden; } .btn-receipt-perf { position: absolute; top: 0; left: 0; right: 0; height: 6px; background-image: radial-gradient(circle 3px at 50% 0, transparent 99%, #f4ecd8 100%); background-size: 12px 6px; background-repeat: repeat-x; background-position: top; border-bottom: 1px dashed #8a7d5a; pointer-events: none; } .btn-receipt-stamp { position: absolute; top: 14px; left: 8px; font-family: ui-serif, Georgia, serif; font-size: 10px; color: #aa2a2a; border: 1.5px solid #aa2a2a; padding: 1px 5px; transform: rotate(-14deg); transform-origin: left center; letter-spacing: 0.14em; opacity: 0.55; pointer-events: none; } .btn-receipt-row { display: inline-flex; align-items: baseline; gap: 24px; padding-left: 38px; } .btn-receipt-text { color: #1a1a1a; } .btn-receipt-amt { color: #aa2a2a; font-weight: 800; font-size: 18px; letter-spacing: 0.04em; min-width: 64px; display: inline-block; } .btn-receipt:hover { transform: translateY(-2px); } ``` **JS:** ```js document.querySelectorAll('.btn-receipt').forEach(function(btn) { btn.addEventListener('click', function() { var amt = btn.querySelector('.btn-receipt-amt'); if (!amt || amt.dataset.animating === '1') return; amt.dataset.animating = '1'; var target = parseInt(amt.dataset.target, 10) || 0; var start = 0; var startTime = null; var duration = 700; function step(ts) { if (!startTime) startTime = ts; var t = Math.min((ts - startTime) / duration, 1); var eased = 1 - Math.pow(1 - t, 3); var val = Math.round(start + (target - start) * eased); amt.textContent = '$' + val; if (t < 1) requestAnimationFrame(step); else { setTimeout(function() { amt.textContent = '$0'; amt.dataset.animating = ''; }, 1200); } } requestAnimationFrame(step); }); }); ``` ### 42. Punch Card **Type:** CSS + JS **Description:** Manila IBM-style punch card with the iconic clipped top-right corner, a stamped FORTRAN-style header at the top, and a real grid of column-and-row holes punched through the body. On hover the whole card follows the cursor magnetically. **HTML:** ```html ``` **CSS:** ```css .btn-punch { position: relative; padding: 28px 32px 18px; border: 1.5px solid #8a7d4a; background: #e3d4a8; color: #2a1d0e; font-family: ui-monospace, monospace; font-size: 14px; font-weight: 800; letter-spacing: 0.28em; cursor: pointer; /* Iconic clipped top-right corner */ clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 0 100%); box-shadow: 0 4px 12px rgba(58,36,16,0.3); transition: transform 0.25s cubic-bezier(.3,1,.5,1); text-align: center; display: block; --px: 0px; --py: 0px; } .btn-punch-header { position: absolute; top: 6px; left: 14px; font-family: ui-monospace, monospace; font-size: 8px; font-weight: 700; color: #5a4520; letter-spacing: 0.22em; border-bottom: 1px solid #8a7d4a; padding-bottom: 2px; width: calc(100% - 36px); text-align: left; } /* The hole grid: a single repeating background that draws columns of 1.5×4 mm rectangular holes — the visual signature of an 80-column card. Two rows of perforations, evenly spaced, with ink-black holes. */ .btn-punch-grid { position: absolute; top: 22px; bottom: 4px; left: 8px; right: 8px; background-image: radial-gradient(2px 4px at 50% 50%, #1a1a1a 99%, transparent 100%), radial-gradient(2px 4px at 50% 50%, rgba(0,0,0,0.18) 99%, transparent 100%); background-size: 14px 22px, 14px 22px; background-position: 0 0, 0 11px; background-repeat: repeat-x, repeat-x; pointer-events: none; opacity: 0.85; -webkit-mask: linear-gradient(180deg, #000 0 30%, transparent 30% 60%, #000 60% 100%); mask: linear-gradient(180deg, #000 0 30%, transparent 30% 60%, #000 60% 100%); } .btn-punch-text { position: relative; z-index: 1; display: inline-block; background: #e3d4a8; padding: 2px 12px; } .btn-punch:hover { transform: translate(var(--px), var(--py)); } ``` **JS:** ```js document.querySelectorAll('.btn-punch').forEach(function(btn) { btn.addEventListener('mousemove', function(e) { var rect = btn.getBoundingClientRect(); var x = (e.clientX - rect.left - rect.width / 2) * 0.18; var y = (e.clientY - rect.top - rect.height / 2) * 0.18; btn.style.setProperty('--px', x + 'px'); btn.style.setProperty('--py', y + 'px'); }); btn.addEventListener('mouseleave', function() { btn.style.setProperty('--px', '0px'); btn.style.setProperty('--py', '0px'); }); }); ``` ### 43. Periscope Lens **Type:** Pure CSS **Description:** Brass periscope rim around a glowing cyan lens with crosshair etching. Hover pulses the lens like a sub coming online. **HTML:** ```html ``` **CSS:** ```css .btn-peri { position: relative; width: 110px; height: 110px; border: none; border-radius: 50%; background: radial-gradient(circle at center, #0a1a2a 0%, #0a3a5a 35%, #00d4ff 75%, #6ef0ff 100%); color: #0a1a2a; font-family: ui-monospace, monospace; font-size: 11px; font-weight: 800; letter-spacing: 0.22em; cursor: pointer; display: grid; place-items: center; isolation: isolate; box-shadow: inset 0 0 0 8px #b87333, inset 0 0 0 10px #6a3f15, 0 0 24px rgba(0,212,255,0.3), 0 6px 14px rgba(0,0,0,0.4); } .btn-peri-rim { position: absolute; inset: 12px; border: 1.5px solid rgba(0,212,255,0.5); border-radius: 50%; pointer-events: none; animation: btn-peri-pulse 2.4s ease-in-out infinite; } .btn-peri-cross { position: absolute; inset: 12px; pointer-events: none; } .btn-peri-cross::before, .btn-peri-cross::after { content: ''; position: absolute; background: rgba(0,212,255,0.5); } .btn-peri-cross::before { top: 50%; left: 0; right: 0; height: 1px; transform: translateY(-50%); } .btn-peri-cross::after { left: 50%; top: 0; bottom: 0; width: 1px; transform: translateX(-50%); } .btn-peri-text { position: relative; z-index: 1; background: rgba(0,212,255,0.85); padding: 4px 8px; border-radius: 2px; color: #0a1a2a; text-shadow: 0 0 4px rgba(0,212,255,0.4); } @keyframes btn-peri-pulse { 0%, 100% { transform: scale(1); opacity: 0.7; } 50% { transform: scale(1.05); opacity: 1; } } @media (prefers-reduced-motion: reduce) { .btn-peri-rim { animation: none; } } .btn-peri:hover { box-shadow: inset 0 0 0 8px #b87333, inset 0 0 0 10px #6a3f15, 0 0 36px rgba(0,212,255,0.55), 0 6px 14px rgba(0,0,0,0.4); } ``` --- ## 27 CSS Calendar Designs URL: https://codefronts.com/components/css-calendar-designs/ Description: 27 hand-coded CSS calendar designs covering every search intent for 'css calendar' — pure-CSS calendar (no JavaScript), CSS Grid layouts, glassmorphism widgets, brutalist designs, dark mode UIs, neumorphic cards, horizontal timelines, sidebar widgets, booking date-range pickers, CSS Grid advent calendars, Fluent / Material Design, circular / radial layouts, retro neon cyberpunk, 3D flip cards, isometric dashboards, split-screen heroes, liquid micro-interactions, bento grid booking, vintage paper tear-offs, vertical timelines, kinetic typography, and slanted diagonal grids. 1 truly pure-CSS, 26 with small vanilla JS snippets for event handling. Scoped class names that never collide, prefers-reduced-motion respected, MIT-licensed. Demo count: 27 ### 01. Glassmorphism CSS Calendar Widget **Type:** CSS + JS **Description:** A frosted-glass calendar on an animated indigo aurora gradient with two drifting light orbs. Heavy backdrop-filter blur, a shimmering gradient month title, a dual-ring pulse on today, plus a glass side panel with a floating date tile, live event strip and emoji mood tracker. **HTML:** ```html
June
2026
Su
Mo
Tu
We
Th
Fr
Sa
25
26
27
28
29
30
31
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
1
2
3
4
5
Today
8
Sunday, June 2026
Upcoming
Design Review
Mon, Jun 9 · 10:00 AM
Team Sprint Planning
Tue, Jun 10 · 2:00 PM
Product Launch
Wed, Jun 11 · 9:00 AM
Quarterly Sync
Fri, Jun 13 · 3:30 PM
Today's Mood
😄 🙂 😐 😔 😩
``` **CSS:** ```css *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; } :root { --bg1: #0f0c29; --bg2: #302b63; --bg3: #24243e; --glass: rgba(255,255,255,0.07); --glass-border: rgba(255,255,255,0.15); --glass-strong: rgba(255,255,255,0.13); --accent: #a78bfa; --accent2: #f472b6; --accent3: #34d399; --text: #f1f5f9; --muted: rgba(255,255,255,0.45); --today-glow: rgba(167,139,250,0.5); } body { font-family: 'Outfit', sans-serif; background: linear-gradient(135deg, var(--bg1) 0%, var(--bg2) 50%, var(--bg3) 100%); min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 40px 20px; overflow: hidden; position: relative; } /* Animated background orbs */ body::before { content: ''; position: fixed; width: 500px; height: 500px; background: radial-gradient(circle, rgba(167,139,250,0.25) 0%, transparent 70%); top: -100px; left: -100px; border-radius: 50%; animation: cal01-drift 12s ease-in-out infinite alternate; } body::after { content: ''; position: fixed; width: 400px; height: 400px; background: radial-gradient(circle, rgba(244,114,182,0.2) 0%, transparent 70%); bottom: -80px; right: -80px; border-radius: 50%; animation: cal01-drift 9s ease-in-out infinite alternate-reverse; } @keyframes cal01-drift { from { transform: translate(0, 0) scale(1); } to { transform: translate(40px, 30px) scale(1.15); } } @keyframes cal01-pulse { 0%, 100% { box-shadow: 0 0 20px var(--today-glow), 0 0 40px rgba(167,139,250,0.3); } 50% { box-shadow: 0 0 30px var(--today-glow), 0 0 60px rgba(167,139,250,0.5); } } @keyframes cal01-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } } @keyframes cal01-shimmer { 0% { background-position: -200% center; } 100% { background-position: 200% center; } } @keyframes cal01-fadein { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } } .cal-01-scene { display: grid; grid-template-columns: 1fr 300px; gap: 20px; max-width: 860px; width: 100%; position: relative; z-index: 1; animation: cal01-fadein 0.8s ease both; } /* ── Main Calendar Card ── */ .cal-01-card { background: var(--glass); backdrop-filter: blur(24px) saturate(160%); -webkit-backdrop-filter: blur(24px) saturate(160%); border: 1px solid var(--glass-border); border-radius: 28px; padding: 32px; box-shadow: 0 32px 64px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.12); } .cal-01-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 32px; } .cal-01-month-display { display: flex; flex-direction: column; } .cal-01-month-name { font-family: 'DM Serif Display', serif; font-size: 36px; font-style: italic; background: linear-gradient(135deg, #fff 0%, var(--accent) 60%, var(--accent2) 100%); background-size: 200% auto; -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; animation: cal01-shimmer 4s linear infinite; line-height: 1; } .cal-01-year { font-size: 13px; font-weight: 500; color: var(--muted); letter-spacing: 0.2em; text-transform: uppercase; margin-top: 4px; } .cal-01-nav { display: flex; gap: 8px; } .cal-01-nav-btn { width: 42px; height: 42px; background: var(--glass-strong); border: 1px solid var(--glass-border); border-radius: 12px; display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--text); font-size: 18px; transition: all 0.2s; user-select: none; } .cal-01-nav-btn:hover { background: rgba(167,139,250,0.25); border-color: var(--accent); transform: scale(1.08); } /* Day labels */ .cal-01-days-header { display: grid; grid-template-columns: repeat(7, 1fr); margin-bottom: 10px; } .cal-01-day-label { text-align: center; font-size: 11px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); padding: 8px 0; } /* Grid */ .cal-01-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; } .cal-01-cell { aspect-ratio: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: 12px; font-size: 14px; font-weight: 500; color: var(--text); cursor: pointer; position: relative; transition: all 0.2s; padding-bottom: 6px; } .cal-01-cell:hover { background: var(--glass-strong); } .cal-01-cell.cal-01-other-month { color: rgba(255,255,255,0.2); } .cal-01-cell.cal-01-today { background: linear-gradient(135deg, rgba(167,139,250,0.3), rgba(244,114,182,0.2)); border: 1px solid rgba(167,139,250,0.5); animation: cal01-pulse 2.5s ease-in-out infinite; font-weight: 700; } .cal-01-cell.cal-01-selected { background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #fff; font-weight: 700; box-shadow: 0 6px 24px rgba(167,139,250,0.45); transform: scale(1.1); z-index: 2; } /* Event dots */ .cal-01-dot-row { display: flex; gap: 3px; position: absolute; bottom: 4px; } .cal-01-dot { width: 4px; height: 4px; border-radius: 50%; } .cal-01-dot--purple { background: var(--accent); } .cal-01-dot--pink { background: var(--accent2); } .cal-01-dot--green { background: var(--accent3); } /* Weekend tint */ .cal-01-cell.cal-01-weekend { color: rgba(244,114,182,0.8); } .cal-01-cell.cal-01-weekend.cal-01-today { color: #fff; } /* ── Side Panel ── */ .cal-01-side { display: flex; flex-direction: column; gap: 16px; } .cal-01-mini-card { background: var(--glass); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); border: 1px solid var(--glass-border); border-radius: 22px; padding: 22px; box-shadow: 0 16px 40px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.1); } /* Today's highlight card */ .cal-01-today-card { background: linear-gradient(135deg, rgba(167,139,250,0.2), rgba(244,114,182,0.15)); border-color: rgba(167,139,250,0.35); animation: cal01-float 4s ease-in-out infinite; } .cal-01-today-label { font-size: 11px; font-weight: 600; letter-spacing: 0.15em; text-transform: uppercase; color: var(--accent); margin-bottom: 6px; } .cal-01-today-date { font-family: 'DM Serif Display', serif; font-size: 52px; line-height: 1; color: #fff; font-style: italic; } .cal-01-today-info { font-size: 13px; color: var(--muted); margin-top: 6px; } /* Upcoming events */ .cal-01-events-title { font-size: 13px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; } .cal-01-event-item { display: flex; align-items: flex-start; gap: 12px; padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,0.06); } .cal-01-event-item:last-child { border-bottom: none; } .cal-01-event-stripe { width: 3px; height: 36px; border-radius: 3px; flex-shrink: 0; margin-top: 2px; } .cal-01-event-body { flex: 1; min-width: 0; } .cal-01-event-name { font-size: 13px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .cal-01-event-time { font-size: 11px; color: var(--muted); margin-top: 2px; } /* Mood tracker mini */ .cal-01-mood-title { font-size: 13px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; } .cal-01-mood-row { display: flex; justify-content: space-between; } .cal-01-mood-btn { font-size: 24px; cursor: pointer; transition: transform 0.2s; filter: grayscale(0.4); opacity: 0.7; } .cal-01-mood-btn:hover, .cal-01-mood-btn.cal-01-active { transform: scale(1.25); filter: grayscale(0); opacity: 1; } @media (max-width: 680px) { .cal-01-scene { grid-template-columns: 1fr; } .cal-01-side { display: none; } } @media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } } ``` **JS:** ```js // Cell click selection document.querySelectorAll('.cal-01-cell:not(.cal-01-other-month)').forEach(cell => { cell.addEventListener('click', function() { document.querySelectorAll('.cal-01-cell').forEach(c => c.classList.remove('cal-01-selected')); this.classList.add('cal-01-selected'); }); }); // Mood selection document.querySelectorAll('.cal-01-mood-btn').forEach(btn => { btn.addEventListener('click', function() { document.querySelectorAll('.cal-01-mood-btn').forEach(b => b.classList.remove('cal-01-active')); this.classList.add('cal-01-active'); }); }); ``` ### 02. Brutalist CSS Calendar Design **Type:** CSS + JS **Description:** Raw newspaper-meets-Bauhaus brutalism on graph-paper. Full-width black header with a flickering Bebas Neue month, hard borders and solid box-shadow offsets, top-edge event bars, and an ink-black sidebar with stamp decoration, event list and a 2x2 stats grid. **HTML:** ```html
June
2026
Q2 · Week 23
SUN
MON
TUE
WED
THU
FRI
SAT
25
26
27
28
29
30
31
1
2
Workshop
3
4
Deadline
5
6
7
8
9
10
Sprint
11
12
Review
13
14
15
16
17
Demo Day
18
19
20
Launch
21
22
23
24
25
Board Mtg
26
27
28
29
30
1
2
3
4
5
Today
08
Sunday / June / 2026
Day 159
This Week
Sprint Planning
MON 10 · 10:00
Design Review
WED 12 · 14:00
Client Presentation
FRI 13 · 16:30
Month Stats
12
Events
4
Deadlines
23
Work days
7
Remaining
``` **CSS:** ```css *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; } :root { --bg: #f5f0e8; --ink: #0d0d0d; --red: #e63e2f; --yellow: #f5c800; --blue: #1a4fff; --white: #fafaf7; --border: 3px solid var(--ink); --shadow: 5px 5px 0 var(--ink); --shadow-lg: 8px 8px 0 var(--ink); } body { font-family: 'IBM Plex Mono', monospace; background-color: var(--bg); background-image: repeating-linear-gradient(0deg, transparent, transparent 39px, rgba(0,0,0,0.06) 39px, rgba(0,0,0,0.06) 40px), repeating-linear-gradient(90deg, transparent, transparent 39px, rgba(0,0,0,0.06) 39px, rgba(0,0,0,0.06) 40px); min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 40px 20px; color: var(--ink); } @keyframes cal02-stamp { from { transform: scale(1.4) rotate(-3deg); opacity: 0; } to { transform: scale(1) rotate(0deg); opacity: 1; } } @keyframes cal02-flicker { 0%, 100% { opacity: 1; } 92% { opacity: 1; } 93% { opacity: 0.4; } 94% { opacity: 1; } } @keyframes cal02-slide-in { from { transform: translateX(-30px); opacity: 0; } to { transform: translateX(0); opacity: 1; } } @keyframes cal02-blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } } .cal-02-wrapper { max-width: 880px; width: 100%; display: grid; grid-template-columns: 1fr 260px; gap: 0; border: var(--border); box-shadow: var(--shadow-lg); animation: cal02-stamp 0.5s cubic-bezier(0.34,1.56,0.64,1) both; } /* ── Header Banner ── */ .cal-02-banner { background: var(--ink); color: var(--yellow); padding: 20px 28px; display: flex; align-items: center; justify-content: space-between; border-bottom: var(--border); grid-column: 1 / -1; } .cal-02-banner-month { font-family: 'Bebas Neue', sans-serif; font-size: 72px; line-height: 1; letter-spacing: 0.02em; color: var(--yellow); animation: cal02-flicker 5s infinite; } .cal-02-banner-right { text-align: right; } .cal-02-banner-year { font-family: 'Anton', sans-serif; font-size: 42px; color: var(--white); line-height: 1; } .cal-02-banner-sub { font-size: 11px; color: rgba(255,255,255,0.5); letter-spacing: 0.2em; text-transform: uppercase; margin-top: 4px; } .cal-02-banner-nav { display: flex; gap: 0; border: 2px solid var(--yellow); align-self: center; } .cal-02-banner-navbtn { padding: 8px 16px; background: transparent; border: none; color: var(--yellow); font-family: 'IBM Plex Mono', monospace; font-size: 18px; cursor: pointer; transition: background 0.1s; user-select: none; } .cal-02-banner-navbtn:first-child { border-right: 2px solid var(--yellow); } .cal-02-banner-navbtn:hover { background: var(--yellow); color: var(--ink); } /* ── Main Calendar Body ── */ .cal-02-main { background: var(--white); border-right: var(--border); } .cal-02-day-labels { display: grid; grid-template-columns: repeat(7, 1fr); border-bottom: var(--border); } .cal-02-dl { padding: 12px 0; text-align: center; font-size: 11px; font-weight: 700; letter-spacing: 0.15em; text-transform: uppercase; border-right: 2px solid var(--ink); } .cal-02-dl:last-child { border-right: none; } .cal-02-dl.cal-02-weekend { background: var(--yellow); } .cal-02-grid { display: grid; grid-template-columns: repeat(7, 1fr); } .cal-02-cell { min-height: 70px; border-right: 2px solid rgba(0,0,0,0.12); border-bottom: 2px solid rgba(0,0,0,0.12); padding: 8px; cursor: pointer; position: relative; transition: background 0.1s; } .cal-02-cell:nth-child(7n) { border-right: none; } .cal-02-cell:nth-last-child(-n+7) { border-bottom: none; } .cal-02-cell:hover { background: rgba(245,200,0,0.12); } .cal-02-cell.cal-02-other-month { background: rgba(0,0,0,0.03); } .cal-02-cell.cal-02-today { background: var(--yellow); } .cal-02-cell.cal-02-today .cal-02-num { color: var(--ink); } .cal-02-cell.cal-02-today::after { content: '◀ TODAY'; position: absolute; right: 6px; bottom: 6px; font-size: 8px; font-weight: 700; letter-spacing: 0.1em; color: var(--red); } .cal-02-cell.cal-02-selected { background: var(--red); box-shadow: inset 4px 4px 0 rgba(0,0,0,0.25); } .cal-02-cell.cal-02-selected .cal-02-num { color: #fff; } .cal-02-cell.cal-02-has-event::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px; } .cal-02-cell.cal-02-ev-red::before { background: var(--red); } .cal-02-cell.cal-02-ev-blue::before { background: var(--blue); } .cal-02-cell.cal-02-ev-yellow::before { background: var(--yellow); border-bottom: 2px solid var(--ink); } .cal-02-num { font-family: 'Bebas Neue', sans-serif; font-size: 28px; line-height: 1; color: var(--ink); } .cal-02-cell.cal-02-other-month .cal-02-num { color: rgba(0,0,0,0.2); } .cal-02-event-tag { font-size: 9px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--white); background: var(--blue); padding: 2px 5px; display: inline-block; margin-top: 4px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .cal-02-event-tag.cal-02-red { background: var(--red); } /* ── Sidebar ── */ .cal-02-sidebar { background: var(--ink); color: var(--white); display: flex; flex-direction: column; } .cal-02-sb-section { padding: 20px; border-bottom: 2px solid rgba(255,255,255,0.1); } .cal-02-sb-section:last-child { border-bottom: none; flex: 1; } .cal-02-sb-label { font-size: 9px; letter-spacing: 0.25em; text-transform: uppercase; color: rgba(255,255,255,0.4); margin-bottom: 12px; } .cal-02-sb-big { font-family: 'Bebas Neue', sans-serif; font-size: 64px; color: var(--yellow); line-height: 1; animation: cal02-flicker 7s infinite 1s; } .cal-02-sb-biginfo { font-size: 11px; color: rgba(255,255,255,0.5); margin-top: 4px; letter-spacing: 0.1em; } /* Event list */ .cal-02-evlist-item { display: flex; align-items: stretch; gap: 10px; margin-bottom: 12px; animation: cal02-slide-in 0.4s ease both; } .cal-02-evlist-item:nth-child(2) { animation-delay: 0.08s; } .cal-02-evlist-item:nth-child(3) { animation-delay: 0.16s; } .cal-02-ev-bar { width: 4px; flex-shrink: 0; } .cal-02-ev-bar.cal-02-red { background: var(--red); } .cal-02-ev-bar.cal-02-yellow { background: var(--yellow); } .cal-02-ev-bar.cal-02-blue { background: var(--blue); } .cal-02-ev-info {} .cal-02-ev-name { font-size: 12px; font-weight: 700; color: var(--white); letter-spacing: 0.02em; } .cal-02-ev-time { font-size: 10px; color: rgba(255,255,255,0.4); margin-top: 2px; } /* Cursor blink in terminal style */ .cal-02-cursor { display: inline-block; width: 10px; height: 14px; background: var(--yellow); vertical-align: middle; animation: cal02-blink 1s step-end infinite; margin-left: 4px; } /* Stats row */ .cal-02-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: rgba(255,255,255,0.1); } .cal-02-stat { padding: 12px; background: var(--ink); } .cal-02-stat-val { font-family: 'Bebas Neue', sans-serif; font-size: 30px; color: var(--yellow); } .cal-02-stat-lbl { font-size: 9px; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(255,255,255,0.35); margin-top: 2px; } /* Stamp decoration */ .cal-02-stamp { border: 3px solid var(--red); color: var(--red); font-family: 'Bebas Neue', sans-serif; font-size: 16px; letter-spacing: 0.2em; padding: 6px 10px; display: inline-block; transform: rotate(-8deg); opacity: 0.7; margin-top: 12px; align-self: flex-start; } @media (max-width: 680px) { .cal-02-wrapper { grid-template-columns: 1fr; } .cal-02-sidebar { display: none; } .cal-02-banner-month { font-size: 48px; } .cal-02-cell { min-height: 50px; } } @media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; } } ``` **JS:** ```js document.querySelectorAll('#cal-02-brutCal .cal-02-cell:not(.cal-02-other-month)').forEach(cell => { cell.addEventListener('click', function() { document.querySelectorAll('#cal-02-brutCal .cal-02-cell').forEach(c => c.classList.remove('cal-02-selected')); this.classList.add('cal-02-selected'); }); }); ``` ### 03. Dark Mode CSS Calendar UI **Type:** CSS + JS **Description:** A premium dark productivity UI with a browser-style chrome bar, CRT scanline overlay and cyan glow accents. Date cells carry inline color-coded event pills, today pings with a ripple ring, and the right panel holds a schedule, activity heatmap and animated goal bars. **HTML:** ```html
Month
Week
Agenda
Synced
SUN 08 JUN
June 2026
Week 23 of 52 · Q2
Today
SUN
MON
TUE
WED
THU
FRI
SAT
25
26
27
28
29
30
31
1
2
Workshop
3
4
Deadline
5
6
Retro
7
8
9
Sprint
10
11
Launch
12
13
Review
14
15
16
17
Demo
18
19
20
1:1
21
22
23
24
Board
25
26
27
EOQ
28
29
30
1
2
3
4
5
Selected
08
Sunday, June 2026
Schedule
09:00
Sprint Planning
1h · Zoom · 8 people
14:00
Design Review
45m · Figma share
16:30
Client Call
30m · Recurring
18:00
Team Retro
1h · All hands
Activity
Goals
Meetings 8/12
Deliverables 4/7
Month 27%
``` **CSS:** ```css *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; } :root { --bg: #0a0a0f; --surface: #111118; --surface2: #181824; --surface3: #1e1e2e; --border: rgba(255,255,255,0.07); --border2: rgba(255,255,255,0.12); --text: #e8e8f0; --muted: rgba(232,232,240,0.4); --dim: rgba(232,232,240,0.15); --cyan: #00d4ff; --green: #00ff94; --orange: #ff6b35; --purple: #b347ff; --pink: #ff4da6; --glow-cyan: rgba(0,212,255,0.18); --glow-green: rgba(0,255,148,0.15); } body { font-family: 'Syne', sans-serif; background: var(--bg); min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 40px 20px; overflow: hidden; } /* Ambient background glow */ body::before { content: ''; position: fixed; width: 600px; height: 600px; background: radial-gradient(ellipse at center, rgba(0,212,255,0.05) 0%, transparent 65%); top: 50%; left: 50%; transform: translate(-50%, -50%); pointer-events: none; } @keyframes cal03-glow-pulse { 0%, 100% { opacity: 0.6; } 50% { opacity: 1; } } @keyframes cal03-scan { 0% { transform: translateY(-100%); } 100% { transform: translateY(100vh); } } @keyframes cal03-enter { from { opacity: 0; transform: scale(0.96); } to { opacity: 1; transform: scale(1); } } @keyframes cal03-bar-fill { from { transform: scaleX(0); } to { transform: scaleX(1); } } @keyframes cal03-ping { 0% { transform: scale(1); opacity: 1; } 80%, 100% { transform: scale(2); opacity: 0; } } @keyframes cal03-slide-up { from { transform: translateY(10px); opacity: 0; } to { transform: translateY(0); opacity: 1; } } /* CRT scanline effect */ .cal-03-scanlines { position: fixed; inset: 0; background: repeating-linear-gradient( 0deg, transparent, transparent 2px, rgba(0,0,0,0.03) 2px, rgba(0,0,0,0.03) 4px ); pointer-events: none; z-index: 100; } .cal-03-shell { max-width: 900px; width: 100%; display: grid; grid-template-rows: auto 1fr; gap: 0; background: var(--surface); border: 1px solid var(--border2); border-radius: 20px; overflow: hidden; box-shadow: 0 0 0 1px rgba(0,212,255,0.08), 0 40px 80px rgba(0,0,0,0.6), 0 0 60px rgba(0,212,255,0.06); animation: cal03-enter 0.6s cubic-bezier(0.22,1,0.36,1) both; position: relative; z-index: 1; } /* ── Top Chrome Bar ── */ .cal-03-chrome { display: flex; align-items: center; gap: 16px; padding: 14px 20px; background: var(--surface2); border-bottom: 1px solid var(--border); } .cal-03-chrome-dots { display: flex; gap: 6px; } .cal-03-chrome-dot { width: 12px; height: 12px; border-radius: 50%; } .cal-03-chrome-dot:nth-child(1) { background: #ff5f56; } .cal-03-chrome-dot:nth-child(2) { background: #febc2e; } .cal-03-chrome-dot:nth-child(3) { background: #28c840; } .cal-03-chrome-tabs { display: flex; gap: 2px; flex: 1; } .cal-03-chrome-tab { padding: 6px 16px; font-size: 12px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; border-radius: 6px; cursor: pointer; color: var(--muted); transition: all 0.2s; } .cal-03-chrome-tab:hover { color: var(--text); background: var(--border); } .cal-03-chrome-tab.cal-03-active { color: var(--cyan); background: rgba(0,212,255,0.08); border-bottom: 2px solid var(--cyan); border-radius: 6px 6px 0 0; } .cal-03-chrome-right { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--muted); display: flex; gap: 14px; align-items: center; } .cal-03-chrome-status { display: flex; align-items: center; gap: 5px; } .cal-03-status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px var(--green); animation: cal03-glow-pulse 2s ease-in-out infinite; } /* ── Body Layout ── */ .cal-03-body { display: grid; grid-template-columns: 1fr 280px; } /* ── Calendar Panel ── */ .cal-03-panel { padding: 28px; border-right: 1px solid var(--border); } .cal-03-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 28px; } .cal-03-title-group { display: flex; flex-direction: column; } .cal-03-month-title { font-size: 38px; font-weight: 800; letter-spacing: -0.02em; color: var(--text); line-height: 1; } .cal-03-month-title span { color: var(--cyan); text-shadow: 0 0 20px rgba(0,212,255,0.5); } .cal-03-month-meta { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--muted); letter-spacing: 0.15em; margin-top: 5px; } .cal-03-controls { display: flex; gap: 6px; align-items: center; } .cal-03-ctrl-btn { width: 36px; height: 36px; border-radius: 8px; background: var(--surface3); border: 1px solid var(--border2); display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--text); font-size: 16px; transition: all 0.2s; user-select: none; } .cal-03-ctrl-btn:hover { border-color: var(--cyan); color: var(--cyan); background: rgba(0,212,255,0.06); } .cal-03-ctrl-today { font-family: 'JetBrains Mono', monospace; font-size: 10px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; padding: 0 12px; width: auto; color: var(--cyan); border-color: rgba(0,212,255,0.3); } /* Weekday headers */ .cal-03-weekdays { display: grid; grid-template-columns: repeat(7, 1fr); margin-bottom: 8px; padding-bottom: 12px; border-bottom: 1px solid var(--border); } .cal-03-wd { text-align: center; font-family: 'JetBrains Mono', monospace; font-size: 10px; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; color: var(--dim); padding: 6px 0; } .cal-03-wd.cal-03-weekend { color: rgba(179,71,255,0.6); } /* Date cells */ .cal-03-dates { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; } .cal-03-date { min-height: 64px; border-radius: 10px; padding: 9px; cursor: pointer; position: relative; transition: all 0.15s; display: flex; flex-direction: column; gap: 4px; } .cal-03-date:hover { background: var(--surface3); } .cal-03-date.cal-03-dim { opacity: 0.25; pointer-events: none; } .cal-03-date.cal-03-today { background: linear-gradient(135deg, rgba(0,212,255,0.12), rgba(179,71,255,0.08)); border: 1px solid rgba(0,212,255,0.3); } .cal-03-date.cal-03-today::after { content: ''; position: absolute; top: 8px; right: 8px; width: 6px; height: 6px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 0 rgba(0,212,255,0.4); animation: cal03-ping 2s cubic-bezier(0,0,0.2,1) infinite; } .cal-03-date.cal-03-selected { background: rgba(0,212,255,0.12); border: 1px solid var(--cyan); box-shadow: 0 0 20px rgba(0,212,255,0.15); } .cal-03-date-num { font-weight: 700; font-size: 15px; color: var(--text); line-height: 1; } .cal-03-date.cal-03-today .cal-03-date-num { color: var(--cyan); } .cal-03-date.cal-03-weekend .cal-03-date-num { color: rgba(179,71,255,0.8); } /* Tiny event pills in cell */ .cal-03-date-events { display: flex; flex-direction: column; gap: 2px; } .cal-03-date-event { font-family: 'JetBrains Mono', monospace; font-size: 8px; font-weight: 500; padding: 2px 5px; border-radius: 3px; letter-spacing: 0.03em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .cal-03-date-event.cal-03-cyan { background: rgba(0,212,255,0.15); color: var(--cyan); } .cal-03-date-event.cal-03-green { background: rgba(0,255,148,0.1); color: var(--green); } .cal-03-date-event.cal-03-orange { background: rgba(255,107,53,0.15); color: var(--orange); } .cal-03-date-event.cal-03-purple { background: rgba(179,71,255,0.15); color: var(--purple); } /* ── Right Panel ── */ .cal-03-right { display: flex; flex-direction: column; background: var(--surface2); } .cal-03-right-section { padding: 22px 20px; border-bottom: 1px solid var(--border); } .cal-03-right-section:last-child { border-bottom: none; flex: 1; } .cal-03-right-label { font-family: 'JetBrains Mono', monospace; font-size: 10px; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); margin-bottom: 16px; display: flex; align-items: center; gap: 8px; } .cal-03-right-label::before { content: ''; width: 3px; height: 10px; background: var(--cyan); border-radius: 2px; box-shadow: 0 0 8px var(--cyan); } /* Selected date info */ .cal-03-selected-date { font-size: 48px; font-weight: 800; letter-spacing: -0.02em; color: var(--text); line-height: 1; animation: cal03-slide-up 0.3s ease; } .cal-03-selected-info { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--muted); margin-top: 6px; } /* Schedule list */ .cal-03-schedule-item { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 12px; animation: cal03-slide-up 0.3s ease both; } .cal-03-schedule-item:nth-child(2) { animation-delay: 0.05s; } .cal-03-schedule-item:nth-child(3) { animation-delay: 0.1s; } .cal-03-schedule-item:nth-child(4) { animation-delay: 0.15s; } .cal-03-sch-time { font-family: 'JetBrains Mono', monospace; font-size: 10px; color: var(--muted); width: 38px; flex-shrink: 0; padding-top: 2px; } .cal-03-sch-body { flex: 1; min-width: 0; } .cal-03-sch-name { font-size: 12px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .cal-03-sch-sub { font-family: 'JetBrains Mono', monospace; font-size: 10px; color: var(--muted); margin-top: 2px; } .cal-03-sch-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; margin-top: 4px; } /* Heatmap mini */ .cal-03-heatmap-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 3px; margin-top: 4px; } .cal-03-heat-cell { aspect-ratio: 1; border-radius: 3px; background: var(--surface3); transition: background 0.2s; } .cal-03-heat-cell.cal-03-h1 { background: rgba(0,212,255,0.2); } .cal-03-heat-cell.cal-03-h2 { background: rgba(0,212,255,0.4); } .cal-03-heat-cell.cal-03-h3 { background: rgba(0,212,255,0.65); } .cal-03-heat-cell.cal-03-h4 { background: var(--cyan); box-shadow: 0 0 8px rgba(0,212,255,0.4); } /* Progress bars */ .cal-03-progress-item { margin-bottom: 12px; } .cal-03-progress-head { display: flex; justify-content: space-between; font-size: 11px; margin-bottom: 5px; } .cal-03-progress-name { font-weight: 600; color: var(--text); } .cal-03-progress-val { font-family: 'JetBrains Mono', monospace; color: var(--muted); } .cal-03-progress-track { height: 4px; background: var(--surface3); border-radius: 2px; overflow: hidden; } .cal-03-progress-fill { height: 100%; border-radius: 2px; transform-origin: left; animation: cal03-bar-fill 1s cubic-bezier(0.22,1,0.36,1) both; } @media (max-width: 700px) { .cal-03-body { grid-template-columns: 1fr; } .cal-03-right { display: none; } .cal-03-date { min-height: 50px; } } @media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } } ``` **JS:** ```js const days = ['Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday']; const months = ['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec']; document.querySelectorAll('#cal-03-darkCal .cal-03-date:not(.cal-03-dim)').forEach(cell => { cell.addEventListener('click', function() { document.querySelectorAll('#cal-03-darkCal .cal-03-date').forEach(c => c.classList.remove('cal-03-selected')); this.classList.add('cal-03-selected'); const num = parseInt(this.querySelector('.cal-03-date-num').textContent); document.getElementById('cal-03-selDate').textContent = String(num).padStart(2,'0'); }); }); ``` ### 04. Pure CSS Calendar (No JavaScript) **Type:** Pure CSS **Description:** A Japandi/wabi-sabi calendar driven entirely by the checkbox/radio hack. Hidden radio inputs switch months and select dates via :checked sibling rules with zero JavaScript. Cormorant + Noto Serif JP, kanji month marks, gold/red event dots on warm parchment. **HTML:** ```html
June
2026
六月
日 Sun
月 Mon
火 Tue
水 Wed
木 Thu
金 Fri
土 Sat
July
2026
七月
August
2026
八月
``` **CSS:** ```css /* ── Reset scoped ── */ .cal04, .cal04 *, .cal04 *::before, .cal04 *::after { box-sizing: border-box; margin: 0; padding: 0; } .cal04 ::selection { background: #b5a99a; color: #fff; } /* ── CSS-only toggle mechanism: hidden radio inputs ── */ .cal04__radio { display: none; } /* ── Root variables ── */ .cal04 { --paper: #f7f3ed; --warm: #ede7dc; --ink: #2c2520; --ink2: #6b5f56; --ink3: #a89e95; --red: #b5413a; --gold: #c9954a; --line: rgba(44,37,32,0.1); --sel: rgba(181,65,58,0.08); --sel-bdr: rgba(181,65,58,0.4); font-family: 'Cormorant Garamond', serif; background: var(--paper); min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 48px 24px; color: var(--ink); background-image: radial-gradient(ellipse 80% 50% at 50% 0%, rgba(201,149,74,0.06) 0%, transparent 70%); } /* ── Outer frame ── */ .cal04__frame { width: 100%; max-width: 640px; border: 1px solid rgba(44,37,32,0.14); background: #faf7f2; box-shadow: 0 2px 0 rgba(44,37,32,0.04), 0 12px 48px rgba(44,37,32,0.08); } /* ── Header: month navigation using :checked ── */ .cal04__header { display: flex; align-items: stretch; border-bottom: 1px solid var(--line); } /* Month tabs — driven by radio inputs */ .cal04__tab-labels { display: flex; flex: 1; overflow: hidden; } .cal04__tab-label { flex: 1; padding: 18px 6px 16px; text-align: center; cursor: pointer; font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink3); border-right: 1px solid var(--line); transition: background 0.25s, color 0.25s; user-select: none; position: relative; } .cal04__tab-label:last-child { border-right: none; } .cal04__tab-label:hover { background: var(--warm); color: var(--ink2); } /* Active tab: when corresponding radio is checked */ #cal04-m1:checked ~ .cal04__frame .cal04__tab-label[for="cal04-m1"], #cal04-m2:checked ~ .cal04__frame .cal04__tab-label[for="cal04-m2"], #cal04-m3:checked ~ .cal04__frame .cal04__tab-label[for="cal04-m3"] { color: var(--red); background: var(--sel); font-weight: 600; } #cal04-m1:checked ~ .cal04__frame .cal04__tab-label[for="cal04-m1"]::after, #cal04-m2:checked ~ .cal04__frame .cal04__tab-label[for="cal04-m2"]::after, #cal04-m3:checked ~ .cal04__frame .cal04__tab-label[for="cal04-m3"]::after { content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 2px; background: var(--red); } /* ── Month panels: show/hide via :checked ── */ .cal04__months { position: relative; } .cal04__month { display: none; flex-direction: column; } #cal04-m1:checked ~ .cal04__frame .cal04__month--1, #cal04-m2:checked ~ .cal04__frame .cal04__month--2, #cal04-m3:checked ~ .cal04__frame .cal04__month--3 { display: flex; animation: cal04-reveal 0.35s cubic-bezier(0.22,1,0.36,1); } @keyframes cal04-reveal { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } } /* ── Month title ── */ .cal04__month-head { padding: 32px 36px 20px; display: flex; align-items: baseline; gap: 14px; border-bottom: 1px solid var(--line); } .cal04__month-name { font-size: 52px; font-weight: 300; font-style: italic; line-height: 1; letter-spacing: -0.01em; color: var(--ink); } .cal04__month-year { font-size: 14px; letter-spacing: 0.2em; color: var(--ink3); font-family: 'Noto Serif JP', serif; font-weight: 300; } .cal04__month-kanji { margin-left: auto; font-family: 'Noto Serif JP', serif; font-size: 32px; font-weight: 300; color: var(--gold); opacity: 0.7; } /* ── Day-of-week labels ── */ .cal04__dow { display: grid; grid-template-columns: repeat(7, 1fr); padding: 12px 20px 0; } .cal04__dow-cell { text-align: center; font-family: 'Noto Serif JP', serif; font-size: 10px; font-weight: 400; letter-spacing: 0.14em; color: var(--ink3); padding-bottom: 10px; } .cal04__dow-cell:first-child { color: var(--red); opacity: 0.7; } .cal04__dow-cell:last-child { color: var(--gold); opacity: 0.7; } /* ── Date grid — pure CSS, checkbox-hack date selection ── */ .cal04__grid { display: grid; grid-template-columns: repeat(7, 1fr); padding: 4px 20px 28px; gap: 2px; } /* Hidden radio inputs for date selection */ .cal04__date-radio { display: none; } .cal04__date-label { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; padding: 10px 4px 8px; min-height: 56px; cursor: pointer; border-radius: 6px; transition: background 0.18s; position: relative; } .cal04__date-label:hover { background: var(--warm); } .cal04__date-num { font-size: 16px; font-weight: 400; color: var(--ink); line-height: 1; transition: color 0.18s; } .cal04__date-label.other { opacity: 0.22; pointer-events: none; } .cal04__date-label.sun .cal04__date-num { color: var(--red); } .cal04__date-label.sat .cal04__date-num { color: var(--gold); } /* Today ring */ .cal04__date-label.today .cal04__date-num { width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; border: 1.5px solid var(--red); border-radius: 50%; color: var(--red); font-weight: 600; } /* Selected state — :checked sibling targets label */ .cal04__date-radio:checked + .cal04__date-label { background: var(--sel); border: 1px solid var(--sel-bdr); } .cal04__date-radio:checked + .cal04__date-label .cal04__date-num { color: var(--red); font-weight: 600; } /* Event dots (pure CSS, decorative) */ .cal04__dots { display: flex; gap: 3px; margin-top: 5px; } .cal04__dot { width: 4px; height: 4px; border-radius: 50%; background: var(--ink3); opacity: 0.5; } .cal04__dot--red { background: var(--red); opacity: 0.8; } .cal04__dot--gold { background: var(--gold); opacity: 0.8; } /* ── Footer: selected date readout (CSS :checked trick) ── */ .cal04__footer { border-top: 1px solid var(--line); padding: 16px 36px; display: flex; align-items: center; justify-content: space-between; background: var(--warm); } .cal04__footer-note { font-family: 'Noto Serif JP', serif; font-size: 11px; letter-spacing: 0.15em; color: var(--ink3); } .cal04__legend { display: flex; gap: 14px; } .cal04__legend-item { display: flex; align-items: center; gap: 5px; font-size: 11px; color: var(--ink3); letter-spacing: 0.06em; } .cal04__legend-dot { width: 6px; height: 6px; border-radius: 50%; } /* ── Decorative vertical rule ── */ .cal04__rule { width: 1px; background: linear-gradient(to bottom, transparent, var(--line) 30%, var(--line) 70%, transparent); align-self: stretch; } /* ── Ink brush decoration ── */ .cal04__brush { position: absolute; top: -8px; right: 24px; font-family: 'Noto Serif JP', serif; font-size: 11px; letter-spacing: 0.3em; color: var(--ink3); opacity: 0.4; writing-mode: vertical-rl; } @media (max-width: 480px) { .cal04__month-head { padding: 20px 16px 14px; } .cal04__month-name { font-size: 36px; } .cal04__grid { padding: 4px 8px 20px; gap: 1px; } .cal04__footer { padding: 12px 16px; flex-direction: column; gap: 10px; } } @media (prefers-reduced-motion: reduce) { .cal04 * { animation: none !important; transition: none !important; } } ``` ### 05. CSS Grid Calendar Layout **Type:** CSS + JS **Description:** An editorial magazine layout showcasing display:grid with grid-template-columns:repeat(7,1fr). A 1px gap over a colored parent fakes clean grid lines; column headers and date grid share the same 7-track system. Playfair Display masthead, rust/sage/sand event labels. **HTML:** ```html
Vol. VI  ·  Issue 6  ·  Q2 2026
June.
CSS Grid Calendar Layout  ·  display: grid; repeat(7, 1fr)
Sun
wk
Mon
col 2
Tue
col 3
Wed
col 4
Thu
col 5
Fri
col 6
Sat
col 7
W21
25
26
27
28
29
30
31
W22
1
2
Design Sprint
3
4
Holiday
5
6
Deadline
7
W23
8
Today
9
Sprint
10
11
Launch
All-hands
12
13
14
W24
15
16
17
Demo Day
Q2 Report
18
19
20
Board Mtg
21
W25
22
23
24
25
Planning
26
27
Retro
28
W26
29
30
1
2
3
4
5
Grid columns
7
repeat(7, 1fr)
Events this month
11
across 30 days
Week in year
W23
Q2 · Day 159
Legend:
Priority
Milestone
Holiday
General
``` **CSS:** ```css .cal05, .cal05 *, .cal05 *::before, .cal05 *::after { box-sizing: border-box; margin: 0; padding: 0; } .cal05 ::selection { background: #1a1a2e; color: #f5e6c8; } .cal05 { --cream: #f8f4ed; --warm: #ede5d5; --ink: #1a1a2e; --ink2: #4a4a6a; --ink3: #8a8aaa; --rust: #c94f2c; --sage: #4a7c6f; --sand: #d4a853; --grid-gap: 1px; --border: rgba(26,26,46,0.1); font-family: 'Barlow', sans-serif; background: var(--cream); min-height: 100vh; display: flex; align-items: flex-start; justify-content: center; padding: 40px 20px; color: var(--ink); } @keyframes cal05-enter { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } } @keyframes cal05-highlight { from { background: rgba(201,79,44,0.15); } to { background: transparent; } } /* ── Shell ── */ .cal05__shell { width: 100%; max-width: 900px; animation: cal05-enter 0.5s ease both; } /* ── Masthead ── */ .cal05__masthead { display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; padding-bottom: 20px; border-bottom: 3px double var(--ink); margin-bottom: 0; } .cal05__masthead-left { font-size: 11px; font-weight: 600; letter-spacing: 0.25em; text-transform: uppercase; color: var(--ink3); align-self: center; } .cal05__masthead-center { text-align: center; padding: 0 32px; } .cal05__title { font-family: 'Playfair Display', serif; font-size: 80px; font-weight: 900; font-style: italic; line-height: 0.9; letter-spacing: -0.02em; color: var(--ink); } .cal05__title span { color: var(--rust); } .cal05__subtitle { font-size: 11px; letter-spacing: 0.35em; text-transform: uppercase; color: var(--ink3); margin-top: 8px; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 6px 0; } .cal05__masthead-right { text-align: right; align-self: center; } .cal05__nav { display: flex; gap: 4px; justify-content: flex-end; } .cal05__nav-btn { width: 36px; height: 36px; border: 1.5px solid var(--ink); background: transparent; display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: 16px; color: var(--ink); transition: all 0.15s; font-family: 'Barlow', sans-serif; user-select: none; } .cal05__nav-btn:hover { background: var(--ink); color: var(--cream); } /* ── Column headers ── */ .cal05__col-headers { display: grid; grid-template-columns: repeat(7, 1fr); gap: var(--grid-gap); background: var(--border); border-left: 1px solid var(--border); border-right: 1px solid var(--border); margin-top: 24px; } .cal05__col-header { background: var(--warm); padding: 10px 12px; display: flex; flex-direction: column; align-items: center; gap: 2px; } .cal05__col-day-abbr { font-size: 10px; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink3); } .cal05__col-day-num { font-family: 'Playfair Display', serif; font-size: 22px; font-weight: 700; color: var(--ink); line-height: 1; } /* Highlight the current day column header */ .cal05__col-header--today .cal05__col-day-abbr { color: var(--rust); } .cal05__col-header--today .cal05__col-day-num { color: var(--rust); } .cal05__col-header--weekend .cal05__col-day-abbr { color: var(--sage); opacity: 0.7; } /* ── Main CSS Grid: The Star of the Show ── */ /* Core technique: - display: grid - grid-template-columns: repeat(7, 1fr) — 7 equal columns for 7 days - gap creates the gutters; background on the container "fakes" visible grid lines - Each cell: grid-column auto-places days correctly - named grid areas optionally mark special rows */ .cal05__grid { display: grid; grid-template-columns: repeat(7, 1fr); grid-auto-rows: minmax(100px, auto); gap: var(--grid-gap); background: var(--border); /* gap shows through as grid lines */ border: 1px solid var(--border); border-top: none; } /* ── Individual date cells ── */ .cal05__cell { background: var(--cream); padding: 10px 12px 8px; cursor: pointer; transition: background 0.15s; display: flex; flex-direction: column; gap: 4px; position: relative; min-height: 100px; } .cal05__cell:hover { background: rgba(212,168,83,0.08); } .cal05__cell--other { background: var(--warm); opacity: 0.5; pointer-events: none; } .cal05__cell--weekend { background: #f5f0e6; } .cal05__cell--today { background: #fff9f0; } .cal05__cell--today::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--rust); } .cal05__cell--selected { background: rgba(201,79,44,0.06); outline: 2px solid var(--rust); outline-offset: -2px; z-index: 2; } /* Cell number */ .cal05__cell-num { font-family: 'Playfair Display', serif; font-size: 20px; font-weight: 700; line-height: 1; color: var(--ink); } .cal05__cell--today .cal05__cell-num { color: var(--rust); } .cal05__cell--other .cal05__cell-num { color: var(--ink3); } .cal05__cell--weekend:not(.cal05__cell--today) .cal05__cell-num { color: var(--sage); } /* Week number annotation */ .cal05__week-tag { position: absolute; top: 10px; right: 10px; font-size: 9px; letter-spacing: 0.1em; color: var(--ink3); opacity: 0.5; } /* Events inside cells */ .cal05__cell-events { display: flex; flex-direction: column; gap: 3px; margin-top: auto; } .cal05__event { font-size: 10px; font-weight: 500; padding: 3px 6px; border-left: 3px solid transparent; letter-spacing: 0.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: rgba(26,26,46,0.04); } .cal05__event--rust { border-left-color: var(--rust); color: var(--rust); background: rgba(201,79,44,0.06); } .cal05__event--sage { border-left-color: var(--sage); color: var(--sage); background: rgba(74,124,111,0.08); } .cal05__event--sand { border-left-color: var(--sand); color: #8b6914; background: rgba(212,168,83,0.1); } .cal05__event--ink { border-left-color: var(--ink); color: var(--ink2); } /* ── Grid annotation panel below ── */ .cal05__annotation { margin-top: 20px; display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1px; background: var(--border); border: 1px solid var(--border); } .cal05__ann-cell { background: var(--cream); padding: 16px 20px; } .cal05__ann-label { font-size: 9px; letter-spacing: 0.25em; text-transform: uppercase; color: var(--ink3); margin-bottom: 6px; } .cal05__ann-value { font-family: 'Playfair Display', serif; font-size: 28px; font-weight: 700; color: var(--ink); line-height: 1; } .cal05__ann-sub { font-size: 11px; color: var(--ink3); margin-top: 4px; } /* ── Legend ── */ .cal05__legend { margin-top: 16px; display: flex; gap: 20px; align-items: center; padding: 12px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); } .cal05__legend-label { font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink3); margin-right: 4px; } .cal05__legend-item { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--ink2); } .cal05__legend-swatch { width: 16px; height: 3px; border-radius: 1px; } @media (max-width: 640px) { .cal05__title { font-size: 48px; } .cal05__masthead { grid-template-columns: 1fr; gap: 12px; } .cal05__masthead-right { text-align: left; } .cal05__grid { grid-auto-rows: minmax(70px, auto); } .cal05__cell { padding: 6px 8px; } .cal05__cell-num { font-size: 15px; } .cal05__event { display: none; } .cal05__annotation { grid-template-columns: 1fr 1fr; } .cal05__ann-cell:last-child { display: none; } } @media (prefers-reduced-motion: reduce) { .cal05 * { animation: none !important; transition: none !important; } } ``` **JS:** ```js document.querySelectorAll('#cal05Grid .cal05__cell:not(.cal05__cell--other)').forEach(cell => { cell.addEventListener('click', function() { document.querySelectorAll('#cal05Grid .cal05__cell').forEach(c => c.classList.remove('cal05__cell--selected')); this.classList.add('cal05__cell--selected'); }); }); ``` ### 06. Responsive Mobile-Friendly Calendar UI **Type:** CSS + JS **Description:** An organic green calendar built to scale across three breakpoints. Layout collapses from two columns to one, then compacts cell sizes and touch targets for small screens. Fraunces italic month, pulsing today ring, color pips and a desktop side panel with a mini activity chart. **HTML:** ```html
June
2026 · Q2
Today
S
M
T
W
T
F
S
25
26
27
28
29
30
31
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
1
2
3
4
5
Selected Day
08
Sunday, June 2026
Upcoming Events
Sprint Planning
Mon Jun 9 · 10:00 AM
Product Launch
Wed Jun 11 · 9:00 AM
Demo Day
Fri Jun 13 · 2:00 PM
Week Activity
S
M
T
W
T
F
S
``` **CSS:** ```css .cal06, .cal06 *, .cal06 *::before, .cal06 *::after { box-sizing: border-box; margin: 0; padding: 0; } .cal06 ::selection { background: #5b7e5f; color: #fff; } .cal06 { --bg: #eef3ec; --surface: #f7faf5; --card: #ffffff; --ink: #1e2b1f; --ink2: #4a5e4c; --muted: #8fa892; --green: #5b7e5f; --green2: #3d6641; --peach: #e07a5f; --yellow: #f2b94b; --lavender:#9b89c4; --today-bg:#e8f0e9; --sel-bg: #5b7e5f; font-family: 'Plus Jakarta Sans', sans-serif; background: var(--bg); background-image: radial-gradient(circle at 20% 80%, rgba(91,126,95,0.08) 0%, transparent 50%), radial-gradient(circle at 80% 20%, rgba(242,185,75,0.06) 0%, transparent 50%); min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 40px 20px; color: var(--ink); } @keyframes cal06-in { from { opacity: 0; transform: scale(0.97) translateY(12px); } to { opacity: 1; transform: scale(1) translateY(0); } } @keyframes cal06-pulse-ring { 0% { box-shadow: 0 0 0 0 rgba(91,126,95,0.4); } 70% { box-shadow: 0 0 0 8px rgba(91,126,95,0); } 100% { box-shadow: 0 0 0 0 rgba(91,126,95,0); } } @keyframes cal06-slide { from { opacity: 0; transform: translateX(-8px); } to { opacity: 1; transform: translateX(0); } } /* ── Outermost: full desktop layout ── */ .cal06__layout { display: grid; grid-template-columns: 1fr 310px; gap: 20px; max-width: 860px; width: 100%; animation: cal06-in 0.5s cubic-bezier(0.22,1,0.36,1) both; } /* ── Main Card ── */ .cal06__main { background: var(--card); border-radius: 24px; overflow: hidden; box-shadow: 0 4px 24px rgba(30,43,31,0.08), 0 1px 4px rgba(30,43,31,0.06); } /* ── Top strip: month + year ── */ .cal06__top { background: var(--green); padding: 24px 28px 20px; display: flex; align-items: flex-end; justify-content: space-between; position: relative; overflow: hidden; } .cal06__top::before { content: ''; position: absolute; width: 200px; height: 200px; border-radius: 50%; background: rgba(255,255,255,0.06); top: -60px; right: -60px; } .cal06__top::after { content: ''; position: absolute; width: 100px; height: 100px; border-radius: 50%; background: rgba(255,255,255,0.05); bottom: -30px; left: 40px; } .cal06__month-block { position: relative; z-index: 1; } .cal06__month-label { font-family: 'Fraunces', serif; font-style: italic; font-size: 44px; font-weight: 700; color: #fff; line-height: 1; } .cal06__year-label { font-size: 13px; font-weight: 500; color: rgba(255,255,255,0.65); letter-spacing: 0.12em; margin-top: 4px; } .cal06__top-right { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; position: relative; z-index: 1; } .cal06__nav-row { display: flex; gap: 6px; } .cal06__nav-btn { width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,0.15); border: 1px solid rgba(255,255,255,0.25); color: #fff; font-size: 16px; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: background 0.2s; user-select: none; } .cal06__nav-btn:hover { background: rgba(255,255,255,0.28); } .cal06__today-pill { background: rgba(255,255,255,0.18); border: 1px solid rgba(255,255,255,0.3); color: #fff; font-size: 11px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; padding: 5px 12px; border-radius: 20px; cursor: pointer; } /* ── DOW row ── */ .cal06__dow { display: grid; grid-template-columns: repeat(7, 1fr); padding: 12px 16px 6px; background: var(--surface); } .cal06__dow-lbl { text-align: center; font-size: 10px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); padding: 6px 0; } .cal06__dow-lbl:first-child, .cal06__dow-lbl:last-child { color: var(--green); opacity: 0.7; } /* ── Grid ── */ .cal06__grid { display: grid; grid-template-columns: repeat(7, 1fr); padding: 6px 16px 20px; gap: 4px; } .cal06__cell { display: flex; flex-direction: column; align-items: center; padding: 6px 2px 4px; border-radius: 14px; cursor: pointer; transition: background 0.15s, transform 0.15s; min-height: 52px; position: relative; } .cal06__cell:hover { background: var(--today-bg); transform: scale(1.04); } .cal06__cell.other { opacity: 0.22; pointer-events: none; } .cal06__cell-n { font-size: 15px; font-weight: 500; color: var(--ink); line-height: 1; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; border-radius: 50%; transition: all 0.15s; } .cal06__cell.weekend .cal06__cell-n { color: var(--green); } .cal06__cell.today .cal06__cell-n { background: var(--green); color: #fff; font-weight: 700; animation: cal06-pulse-ring 2.5s ease-in-out infinite; } .cal06__cell.selected .cal06__cell-n { background: var(--peach); color: #fff; font-weight: 700; box-shadow: 0 4px 14px rgba(224,122,95,0.45); } /* Event pips below number */ .cal06__pips { display: flex; gap: 3px; margin-top: 3px; } .cal06__pip { width: 5px; height: 5px; border-radius: 50%; } .cal06__pip--g { background: var(--green); } .cal06__pip--p { background: var(--peach); } .cal06__pip--y { background: var(--yellow); } .cal06__pip--l { background: var(--lavender); } /* ── Right panel (desktop only) ── */ .cal06__side { display: flex; flex-direction: column; gap: 14px; } .cal06__side-card { background: var(--card); border-radius: 20px; padding: 22px; box-shadow: 0 4px 20px rgba(30,43,31,0.07); } .cal06__side-label { font-size: 10px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); margin-bottom: 16px; } /* Mini date display */ .cal06__date-big { font-family: 'Fraunces', serif; font-style: italic; font-size: 64px; font-weight: 700; color: var(--green2); line-height: 1; } .cal06__date-info { font-size: 13px; color: var(--muted); margin-top: 4px; } /* Event items */ .cal06__ev { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid rgba(30,43,31,0.06); animation: cal06-slide 0.3s ease both; } .cal06__ev:last-child { border-bottom: none; padding-bottom: 0; } .cal06__ev:nth-child(2) { animation-delay: 0.06s; } .cal06__ev:nth-child(3) { animation-delay: 0.12s; } .cal06__ev-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; } .cal06__ev-body { flex: 1; min-width: 0; } .cal06__ev-name { font-size: 13px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .cal06__ev-time { font-size: 11px; color: var(--muted); margin-top: 2px; } /* Week summary mini bars */ .cal06__week-bars { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; align-items: flex-end; height: 40px; } .cal06__bar-col { display: flex; flex-direction: column; align-items: center; gap: 4px; } .cal06__bar { width: 100%; background: var(--green); border-radius: 3px 3px 0 0; opacity: 0.7; transition: opacity 0.2s; } .cal06__bar:hover { opacity: 1; } .cal06__bar-lbl { font-size: 8px; color: var(--muted); font-weight: 600; letter-spacing: 0.05em; } /* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ RESPONSIVE: tablet → collapse to 1 col RESPONSIVE: mobile → compact top strip, smaller cells, hide side panel under grid ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */ @media (max-width: 780px) { .cal06__layout { grid-template-columns: 1fr; max-width: 500px; } .cal06__side { display: none; } } @media (max-width: 480px) { .cal06__top { padding: 18px 20px 16px; } .cal06__month-label { font-size: 34px; } .cal06__dow { padding: 8px 10px 4px; } .cal06__grid { padding: 4px 10px 14px; gap: 2px; } .cal06__cell { min-height: 42px; border-radius: 10px; } .cal06__cell-n { width: 28px; height: 28px; font-size: 13px; } .cal06__today-pill { display: none; } } @media (max-width: 360px) { .cal06__month-label { font-size: 28px; } .cal06__cell-n { width: 24px; height: 24px; font-size: 11px; } .cal06__dow-lbl { font-size: 8px; } } @media (prefers-reduced-motion: reduce) { .cal06 * { animation: none !important; transition: none !important; } } ``` **JS:** ```js document.querySelectorAll('#cal06Grid .cal06__cell:not(.other)').forEach(cell => { cell.addEventListener('click', function() { document.querySelectorAll('#cal06Grid .cal06__cell').forEach(c => c.classList.remove('selected')); this.classList.add('selected'); const n = this.querySelector('.cal06__cell-n').textContent; const el = document.getElementById('cal06DateBig'); if (el) el.textContent = n.padStart(2,'0'); }); }); ``` ### 07. Glassmorphism Calendar Card **Type:** CSS + JS **Description:** The definitive glassmorphism reference on an aurora-borealis scene with four animated gradient blobs and a starfield. The card uses backdrop-filter blur/saturate with a layered inner shine; today glows, the card floats, and frosted event pills demonstrate layered glass depth. **HTML:** ```html
June
2026
Q2
S
M
T
W
T
F
S
25
26
27
28
29
30
31
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
1
2
3
4
5
12
Events
4
Holidays
7
Left
🚀
Product Launch
Wed Jun 11 · 9:00 AM
Today+3
📊
Board Meeting
Thu Jun 25 · 2:00 PM
In 17d
``` **CSS:** ```css .cal07, .cal07 *, .cal07 *::before, .cal07 *::after { box-sizing: border-box; margin: 0; padding: 0; } .cal07 ::selection { background: rgba(255,255,255,0.3); color: #fff; } .cal07 { --teal: #00c9b1; --blue: #3b82f6; --purple: #9333ea; --pink: #f472b6; --amber: #fbbf24; --white: #ffffff; --text: rgba(255,255,255,0.92); --muted: rgba(255,255,255,0.45); --dim: rgba(255,255,255,0.18); --glass: rgba(255,255,255,0.09); --glass2: rgba(255,255,255,0.14); --border: rgba(255,255,255,0.18); --border2: rgba(255,255,255,0.28); font-family: 'Manrope', sans-serif; min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 40px 20px; position: relative; overflow: hidden; /* Aurora background */ background: #060b14; } /* ── Aurora mesh background ── */ .cal07__aurora { position: fixed; inset: 0; z-index: 0; overflow: hidden; } .cal07__aurora-blob { position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.55; animation: cal07-aurora 14s ease-in-out infinite alternate; } .cal07__aurora-blob:nth-child(1) { width: 700px; height: 500px; background: radial-gradient(ellipse, #00c9b1 0%, transparent 70%); top: -150px; left: -200px; animation-duration: 16s; } .cal07__aurora-blob:nth-child(2) { width: 600px; height: 500px; background: radial-gradient(ellipse, #9333ea 0%, transparent 70%); top: -100px; right: -150px; animation-duration: 12s; animation-direction: alternate-reverse; } .cal07__aurora-blob:nth-child(3) { width: 500px; height: 400px; background: radial-gradient(ellipse, #3b82f6 0%, transparent 70%); bottom: -100px; left: 10%; animation-duration: 18s; } .cal07__aurora-blob:nth-child(4) { width: 300px; height: 300px; background: radial-gradient(ellipse, #f472b6 0%, transparent 70%); bottom: 20%; right: 10%; animation-duration: 10s; animation-direction: alternate-reverse; } /* Stars overlay */ .cal07__stars { position: fixed; inset: 0; background-image: radial-gradient(1px 1px at 20% 30%, rgba(255,255,255,0.5), transparent), radial-gradient(1px 1px at 80% 10%, rgba(255,255,255,0.4), transparent), radial-gradient(1px 1px at 50% 60%, rgba(255,255,255,0.3), transparent), radial-gradient(1px 1px at 10% 80%, rgba(255,255,255,0.35), transparent), radial-gradient(1px 1px at 70% 85%, rgba(255,255,255,0.25), transparent), radial-gradient(1px 1px at 35% 45%, rgba(255,255,255,0.4), transparent), radial-gradient(1px 1px at 90% 50%, rgba(255,255,255,0.3), transparent), radial-gradient(1px 1px at 15% 15%, rgba(255,255,255,0.45), transparent), radial-gradient(1px 1px at 60% 25%, rgba(255,255,255,0.2), transparent), radial-gradient(1px 1px at 45% 75%, rgba(255,255,255,0.35), transparent); z-index: 0; pointer-events: none; } @keyframes cal07-aurora { from { transform: translate(0, 0) scale(1); } to { transform: translate(40px, 30px) scale(1.12); } } @keyframes cal07-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } } @keyframes cal07-glow { 0%, 100% { box-shadow: 0 0 20px rgba(0,201,177,0.3), 0 0 60px rgba(0,201,177,0.15); } 50% { box-shadow: 0 0 35px rgba(0,201,177,0.5), 0 0 80px rgba(0,201,177,0.25); } } @keyframes cal07-shimmer { 0% { opacity: 0.5; } 50% { opacity: 1; } 100% { opacity: 0.5; } } @keyframes cal07-enter { from { opacity: 0; transform: scale(0.94) translateY(20px); } to { opacity: 1; transform: scale(1) translateY(0); } } /* ── Main glass card ── */ .cal07__card { position: relative; z-index: 10; width: 100%; max-width: 420px; background: var(--glass); backdrop-filter: blur(32px) saturate(180%) brightness(1.1); -webkit-backdrop-filter: blur(32px) saturate(180%) brightness(1.1); border: 1px solid var(--border2); border-radius: 32px; padding: 32px; box-shadow: 0 0 0 1px rgba(255,255,255,0.05) inset, 0 40px 80px rgba(0,0,0,0.5), 0 8px 32px rgba(0,0,0,0.3); animation: cal07-enter 0.7s cubic-bezier(0.22,1,0.36,1) both, cal07-float 6s ease-in-out 1s infinite; } /* Inner shine edge */ .cal07__card::before { content: ''; position: absolute; inset: 0; border-radius: 32px; background: linear-gradient(135deg, rgba(255,255,255,0.12) 0%, transparent 50%, rgba(255,255,255,0.04) 100%); pointer-events: none; } /* ── Card header ── */ .cal07__hd { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 28px; } .cal07__hd-left {} .cal07__card-month { font-family: 'Gilda Display', serif; font-size: 42px; color: var(--white); line-height: 1; text-shadow: 0 0 30px rgba(0,201,177,0.4); } .cal07__card-year-row { display: flex; align-items: center; gap: 8px; margin-top: 4px; } .cal07__card-year { font-size: 13px; font-weight: 500; color: var(--muted); letter-spacing: 0.12em; } .cal07__card-badge { font-size: 9px; font-weight: 700; letter-spacing: 0.15em; text-transform: uppercase; padding: 3px 8px; border-radius: 20px; background: rgba(0,201,177,0.18); border: 1px solid rgba(0,201,177,0.35); color: var(--teal); animation: cal07-shimmer 3s ease-in-out infinite; } .cal07__hd-right { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; } .cal07__nav { display: flex; gap: 6px; } .cal07__nav-btn { width: 36px; height: 36px; border-radius: 50%; background: var(--glass2); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--text); font-size: 16px; transition: all 0.2s; user-select: none; backdrop-filter: blur(10px); } .cal07__nav-btn:hover { background: rgba(0,201,177,0.2); border-color: var(--teal); color: var(--teal); } /* ── DOW row ── */ .cal07__dow { display: grid; grid-template-columns: repeat(7, 1fr); margin-bottom: 6px; padding-bottom: 12px; border-bottom: 1px solid var(--dim); } .cal07__dw { text-align: center; font-size: 10px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); padding: 4px 0; } .cal07__dw:first-child, .cal07__dw:last-child { color: rgba(0,201,177,0.7); } /* ── Date grid ── */ .cal07__dates { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; } .cal07__date { aspect-ratio: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: 12px; cursor: pointer; transition: all 0.18s; position: relative; gap: 3px; } .cal07__date:hover { background: var(--glass2); } .cal07__date.dim { opacity: 0.22; pointer-events: none; } .cal07__date-n { font-size: 13px; font-weight: 500; color: var(--text); line-height: 1; width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; border-radius: 50%; transition: all 0.18s; } .cal07__date.weekend .cal07__date-n { color: rgba(0,201,177,0.85); } /* Today */ .cal07__date.today .cal07__date-n { background: linear-gradient(135deg, var(--teal), var(--blue)); color: #fff; font-weight: 700; box-shadow: 0 4px 16px rgba(0,201,177,0.5); animation: cal07-glow 2.5s ease-in-out infinite; } /* Selected */ .cal07__date.selected .cal07__date-n { background: linear-gradient(135deg, var(--purple), var(--pink)); color: #fff; font-weight: 700; box-shadow: 0 4px 16px rgba(147,51,234,0.45); transform: scale(1.1); } /* Pip */ .cal07__date-pip { width: 4px; height: 4px; border-radius: 50%; } .cal07__date-pip--t { background: var(--teal); box-shadow: 0 0 6px var(--teal); } .cal07__date-pip--p { background: var(--purple); } .cal07__date-pip--a { background: var(--amber); } /* ── Bottom summary strip ── */ .cal07__strip { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--dim); display: flex; gap: 12px; } .cal07__strip-stat { flex: 1; background: var(--glass2); border: 1px solid var(--border); border-radius: 14px; padding: 12px 14px; backdrop-filter: blur(10px); } .cal07__strip-val { font-family: 'Gilda Display', serif; font-size: 28px; color: var(--white); line-height: 1; } .cal07__strip-lbl { font-size: 10px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-top: 3px; } /* Color the values */ .cal07__strip-stat:nth-child(1) .cal07__strip-val { color: var(--teal); text-shadow: 0 0 16px rgba(0,201,177,0.5); } .cal07__strip-stat:nth-child(2) .cal07__strip-val { color: var(--amber); } .cal07__strip-stat:nth-child(3) .cal07__strip-val { color: var(--pink); } /* ── Event preview below card ── */ .cal07__events-row { position: relative; z-index: 10; display: flex; flex-direction: column; gap: 10px; width: 100%; max-width: 420px; margin-top: 16px; } .cal07__ev-glass { background: var(--glass); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border: 1px solid var(--border); border-radius: 16px; padding: 14px 18px; display: flex; align-items: center; gap: 14px; animation: cal07-enter 0.5s ease both; } .cal07__ev-glass:nth-child(2) { animation-delay: 0.1s; } .cal07__ev-glass:nth-child(3) { animation-delay: 0.2s; } .cal07__ev-icon { width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; } .cal07__ev-body { flex: 1; min-width: 0; } .cal07__ev-name { font-size: 13px; font-weight: 600; color: var(--text); } .cal07__ev-time { font-size: 11px; color: var(--muted); margin-top: 2px; } .cal07__ev-pill { font-size: 10px; font-weight: 600; padding: 3px 10px; border-radius: 20px; flex-shrink: 0; } /* Scene wrapper */ .cal07__scene { display: flex; flex-direction: column; align-items: center; gap: 0; position: relative; z-index: 10; } @media (max-width: 480px) { .cal07__card { padding: 22px; border-radius: 24px; } .cal07__card-month { font-size: 32px; } .cal07__strip { gap: 8px; } .cal07__strip-stat { padding: 10px; } .cal07__strip-val { font-size: 22px; } } @media (prefers-reduced-motion: reduce) { .cal07 * { animation: none !important; transition: none !important; } .cal07__aurora-blob { opacity: 0.3; } } ``` **JS:** ```js document.querySelectorAll('#cal07Dates .cal07__date:not(.dim)').forEach(cell => { cell.addEventListener('click', function() { document.querySelectorAll('#cal07Dates .cal07__date').forEach(c => c.classList.remove('selected')); this.classList.add('selected'); }); }); ``` ### 08. Dark Mode Calendar Design **Type:** CSS + JS **Description:** Luxury obsidian calendar whose entire theme lives in CSS variables. A single data-theme toggle swaps all 15 variables between dark and light with no extra selectors. Instrument Serif month, gold accents, today ring pulse, and a sidebar event list plus sparkline. **HTML:** ```html
June
2026
Q2
Week 23
Dark
Sun
Mon
Tue
Wed
Thu
Fri
Sat
25
26
27
28
29
30
31
1
2
Sprint
3
4
Holiday
5
6
7
8
9
Planning
10
11
Launch
Deadline
12
13
Review
14
15
16
17
Demo
18
19
20
1:1
21
22
23
24
Board
25
26
27
Retro
28
29
30
1
2
3
4
5
Today
08
Sunday · June 2026
This Week
Sprint Planning
Mon · 10:00 AM
Product Launch
Wed · 9:00 AM
Hard Deadline
Wed · 5:00 PM
Design Review
Fri · 2:00 PM
Event Load
W1
W2
W3
W4
W5
``` **CSS:** ```css .cal08, .cal08 *, .cal08 *::before, .cal08 *::after { box-sizing: border-box; margin: 0; padding: 0; } /* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ CSS VARIABLES — the entire theme lives here. Toggle between dark / light by swapping values. ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */ .cal08 { /* Dark theme (default) */ --bg: #0d0d0d; --surface: #161616; --card: #1c1c1c; --card2: #222222; --border: rgba(255,255,255,0.08); --border2: rgba(255,255,255,0.13); --text: #f0ece4; --text2: #a09890; --text3: #5a5550; --gold: #c9a84c; --gold2: #e8c87a; --red: #e05252; --emerald: #3d9970; --sky: #5ab0d4; --shadow: rgba(0,0,0,0.5); --today-ring: rgba(201,168,76,0.5); --sel-bg: #c9a84c; --sel-text: #0d0d0d; --toggle-bg:#2a2a2a; --icon-sun: '☀'; --icon-moon:'☽'; } /* Light theme override — all via CSS vars, zero new selectors needed for the calendar */ .cal08[data-theme="light"] { --bg: #f9f6f0; --surface: #f2ede4; --card: #ffffff; --card2: #f7f4ee; --border: rgba(0,0,0,0.08); --border2: rgba(0,0,0,0.14); --text: #1a1410; --text2: #6b5f50; --text3: #b0a090; --gold: #b8892a; --gold2: #d4a040; --shadow: rgba(0,0,0,0.1); --today-ring: rgba(184,137,42,0.4); --sel-bg: #b8892a; --sel-text: #fff; --toggle-bg:#e8e2d8; } .cal08 { font-family: 'Instrument Sans', sans-serif; background: var(--bg); min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 40px 20px; color: var(--text); transition: background 0.4s ease, color 0.4s ease; position: relative; } /* Subtle noise overlay for dark mode texture */ .cal08::before { content: ''; position: fixed; 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"); opacity: 0.5; pointer-events: none; z-index: 0; } @keyframes cal08-enter { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } } @keyframes cal08-today-ring { 0%, 100% { box-shadow: 0 0 0 2px var(--today-ring), 0 0 16px var(--today-ring); } 50% { box-shadow: 0 0 0 4px var(--today-ring), 0 0 28px var(--today-ring); } } @keyframes cal08-bar-grow { from { transform: scaleY(0); } to { transform: scaleY(1); } } @keyframes cal08-theme-flip { 0% { transform: rotate(0deg) scale(1); } 50% { transform: rotate(180deg) scale(0.8); } 100% { transform: rotate(360deg) scale(1); } } .cal08__shell { position: relative; z-index: 1; max-width: 860px; width: 100%; display: grid; grid-template-columns: 1fr 256px; gap: 16px; animation: cal08-enter 0.55s cubic-bezier(0.22,1,0.36,1) both; } /* ── Main card ── */ .cal08__main { background: var(--card); border: 1px solid var(--border2); border-radius: 24px; overflow: hidden; box-shadow: 0 24px 60px var(--shadow); transition: background 0.4s, border-color 0.4s, box-shadow 0.4s; } /* ── Header ── */ .cal08__header { padding: 28px 28px 20px; display: flex; align-items: flex-start; justify-content: space-between; border-bottom: 1px solid var(--border); position: relative; } /* Gold accent top bar */ .cal08__header::before { content: ''; position: absolute; top: 0; left: 28px; right: 28px; height: 2px; background: linear-gradient(90deg, transparent, var(--gold), transparent); opacity: 0.6; } .cal08__header-left {} .cal08__month-big { font-family: 'Instrument Serif', serif; font-style: italic; font-size: 52px; line-height: 1; color: var(--text); letter-spacing: -0.01em; transition: color 0.4s; } .cal08__month-big em { font-style: normal; color: var(--gold); } .cal08__header-meta { margin-top: 5px; display: flex; gap: 12px; align-items: center; } .cal08__meta-item { font-size: 11px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text3); transition: color 0.4s; } .cal08__meta-dot { width: 3px; height: 3px; border-radius: 50%; background: var(--text3); opacity: 0.4; } .cal08__header-right { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; } .cal08__nav { display: flex; border: 1px solid var(--border2); border-radius: 10px; overflow: hidden; transition: border-color 0.4s; } .cal08__nav-btn { padding: 8px 14px; background: transparent; border: none; color: var(--text2); font-size: 15px; cursor: pointer; transition: all 0.15s; user-select: none; font-family: 'Instrument Sans', sans-serif; border-right: 1px solid var(--border2); } .cal08__nav-btn:last-child { border-right: none; } .cal08__nav-btn:hover { background: var(--card2); color: var(--gold); } /* Theme toggle button */ .cal08__theme-toggle { display: flex; align-items: center; gap: 8px; background: var(--toggle-bg); border: 1px solid var(--border2); border-radius: 24px; padding: 6px 14px 6px 10px; cursor: pointer; font-size: 12px; font-weight: 600; color: var(--text2); letter-spacing: 0.06em; text-transform: uppercase; transition: all 0.25s; user-select: none; } .cal08__theme-toggle:hover { border-color: var(--gold); color: var(--gold); } .cal08__toggle-icon { font-size: 16px; transition: transform 0.4s; line-height: 1; } .cal08__theme-toggle:active .cal08__toggle-icon { animation: cal08-theme-flip 0.4s ease; } /* ── DOW row ── */ .cal08__dow { display: grid; grid-template-columns: repeat(7, 1fr); padding: 14px 20px 0; } .cal08__dw { text-align: center; font-size: 10px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text3); padding-bottom: 10px; transition: color 0.4s; } .cal08__dw:first-child, .cal08__dw:last-child { color: var(--gold); opacity: 0.7; } /* ── Date grid ── */ .cal08__grid { display: grid; grid-template-columns: repeat(7, 1fr); padding: 4px 20px 24px; gap: 3px; } .cal08__cell { display: flex; flex-direction: column; align-items: center; padding: 5px 0; border-radius: 12px; cursor: pointer; transition: background 0.15s; min-height: 60px; position: relative; gap: 3px; } .cal08__cell:hover { background: var(--card2); } .cal08__cell.other { opacity: 0.2; pointer-events: none; } .cal08__cell-n { font-family: 'Instrument Serif', serif; font-size: 18px; color: var(--text); width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; border-radius: 50%; line-height: 1; transition: all 0.15s, color 0.4s; } .cal08__cell.weekend .cal08__cell-n { color: var(--gold); opacity: 0.8; } .cal08__cell.other .cal08__cell-n { color: var(--text3); } .cal08__cell.today .cal08__cell-n { background: var(--gold); color: var(--sel-text); font-weight: 700; animation: cal08-today-ring 2.5s ease-in-out infinite; font-style: italic; } .cal08__cell.selected:not(.today) .cal08__cell-n { background: var(--card2); border: 2px solid var(--gold); color: var(--gold); } /* Event blocks inside cells */ .cal08__cell-evs { display: flex; flex-direction: column; gap: 2px; width: 100%; padding: 0 3px; } .cal08__ev-block { font-size: 8.5px; font-weight: 600; padding: 2px 4px; border-radius: 3px; text-align: left; letter-spacing: 0.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-transform: uppercase; } .cal08__ev-block--gold { background: rgba(201,168,76,0.15); color: var(--gold); } .cal08__ev-block--red { background: rgba(224,82,82,0.15); color: var(--red); } .cal08__ev-block--emerald { background: rgba(61,153,112,0.15); color: var(--emerald); } .cal08__ev-block--sky { background: rgba(90,176,212,0.15); color: var(--sky); } /* ── Right sidebar ── */ .cal08__side { display: flex; flex-direction: column; gap: 14px; transition: all 0.4s; } .cal08__side-card { background: var(--card); border: 1px solid var(--border2); border-radius: 20px; padding: 20px; box-shadow: 0 8px 24px var(--shadow); transition: background 0.4s, border-color 0.4s, box-shadow 0.4s; } .cal08__side-lbl { font-size: 9px; font-weight: 700; letter-spacing: 0.22em; text-transform: uppercase; color: var(--text3); margin-bottom: 14px; transition: color 0.4s; display: flex; align-items: center; gap: 8px; } .cal08__side-lbl::after { content: ''; flex: 1; height: 1px; background: var(--border); } /* Big date */ .cal08__big-date { font-family: 'Instrument Serif', serif; font-style: italic; font-size: 72px; line-height: 1; color: var(--gold); text-shadow: 0 0 30px var(--today-ring); letter-spacing: -0.02em; transition: color 0.4s, text-shadow 0.4s; } .cal08__big-sub { font-size: 12px; color: var(--text3); margin-top: 6px; letter-spacing: 0.08em; transition: color 0.4s; } /* Event list */ .cal08__ev-item { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-bottom: 1px solid var(--border); transition: border-color 0.4s; } .cal08__ev-item:last-child { border-bottom: none; padding-bottom: 0; } .cal08__ev-bar { width: 2px; min-height: 30px; border-radius: 1px; flex-shrink: 0; margin-top: 2px; } .cal08__ev-info { flex: 1; min-width: 0; } .cal08__ev-name { font-size: 12px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: color 0.4s; } .cal08__ev-time { font-size: 10px; color: var(--text3); margin-top: 2px; transition: color 0.4s; } /* Sparkline / bar chart */ .cal08__bars { display: flex; align-items: flex-end; gap: 5px; height: 40px; } .cal08__bar-w { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; justify-content: flex-end; } .cal08__bar-fill { width: 100%; border-radius: 3px 3px 0 0; background: var(--gold); opacity: 0.6; transform-origin: bottom; animation: cal08-bar-grow 0.7s cubic-bezier(0.22,1,0.36,1) both; } .cal08__bar-fill:nth-child(1) { animation-delay: 0.05s; } .cal08__bar-lbl { font-size: 8px; color: var(--text3); font-weight: 600; letter-spacing: 0.05em; transition: color 0.4s; } /* Color bar overrides */ .cal08__bar-w:nth-child(4) .cal08__bar-fill { background: var(--gold2); opacity: 1; } .cal08__bar-w:nth-child(2) .cal08__bar-fill, .cal08__bar-w:nth-child(6) .cal08__bar-fill { background: var(--emerald); } @media (max-width: 700px) { .cal08__shell { grid-template-columns: 1fr; } .cal08__side { display: none; } .cal08__month-big { font-size: 38px; } } @media (prefers-reduced-motion: reduce) { .cal08 * { animation: none !important; transition: color 0.1s, background 0.1s !important; } } ``` **JS:** ```js // Date cell selection document.querySelectorAll('#cal08Grid .cal08__cell:not(.other)').forEach(cell => { cell.addEventListener('click', function() { document.querySelectorAll('#cal08Grid .cal08__cell').forEach(c => c.classList.remove('selected')); this.classList.add('selected'); }); }); // Theme toggle — just flips data-theme, CSS vars do ALL the work const root = document.getElementById('cal08Root'); const toggle = document.getElementById('cal08Toggle'); const icon = document.getElementById('cal08Icon'); const label = document.getElementById('cal08ThemeLabel'); toggle.addEventListener('click', function() { const isDark = root.getAttribute('data-theme') === 'dark'; root.setAttribute('data-theme', isDark ? 'light' : 'dark'); icon.textContent = isDark ? '☀' : '☽'; label.textContent = isDark ? 'Light' : 'Dark'; }); ``` ### 09. Event Planner & Schedule Layout **Type:** CSS + JS **Description:** A dense event planner where each date cell anchors layered events via position:relative: an absolute count badge, a flex stack of color-coded event blocks with ::before accent bars, and a +N more overflow. Sidebar shows a time-blocked agenda and a counted legend. **HTML:** ```html
June 2026
Event Planner
Month
Week
Agenda
Sun
Mon
Tue
Wed
Thu
Fri
Sat
25
26
27
28
29
30
31
1
2
1
Design Sprint
3
4
2
Holiday
BBQ
5
6
1
Deadline
7
8
1
Today
9
2
Sprint Plan
1:1 w/ Sam
10
11
3
🚀 Launch
Deadline
+1 more
12
13
2
Review
Lunch
14
15
16
17
3
Demo Day
Q2 Report
+1 more
18
19
20
1
Board Mtg
21
1
Summer!
22
23
24
25
2
Planning
Team Dinner
26
27
1
Retro
28
29
30
1
2
3
4
5
Today
08
Sunday, June 2026
Today's Agenda
09:00
Sprint Planning
Zoom · 1h
● Team
14:00
Product Launch
All-hands · 2h
● Critical
17:30
Design Review
Figma share · 45m
● Design
Event Legend
Team & sprints5
Critical / launches3
Deadlines4
Meetings6
1:1s2
Social3
``` **CSS:** ```css .cal09, .cal09 *, .cal09 *::before, .cal09 *::after { box-sizing: border-box; margin: 0; padding: 0; } .cal09 ::selection { background: #2d4a3e; color: #fff; } .cal09 { --bg: #1a1f1c; --surface: #222820; --card: #262d24; --card2: #2d3529; --border: rgba(255,255,255,0.07); --border2: rgba(255,255,255,0.12); --text: #e8ede4; --text2: #8fa888; --text3: #4a574a; --green: #4caf7d; --lime: #97c95c; --amber: #e8a23a; --rose: #e05870; --sky: #5ab4d4; --violet: #a07dd4; --sand: #d4b87a; font-family: 'Space Grotesk', sans-serif; background: var(--bg); min-height: 100vh; display: flex; align-items: flex-start; justify-content: center; padding: 36px 20px; color: var(--text); position: relative; overflow-x: hidden; } /* Subtle grid pattern background */ .cal09::before { content: ''; position: fixed; inset: 0; background-image: linear-gradient(rgba(76,175,125,0.03) 1px, transparent 1px), linear-gradient(90deg, rgba(76,175,125,0.03) 1px, transparent 1px); background-size: 28px 28px; pointer-events: none; z-index: 0; } @keyframes cal09-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } } @keyframes cal09-badge-pop { from { transform: scale(0.7); opacity: 0; } to { transform: scale(1); opacity: 1; } } @keyframes cal09-event-slide { from { transform: translateX(-6px); opacity: 0; } to { transform: translateX(0); opacity: 1; } } @keyframes cal09-today-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(76,175,125,0.5); } 50% { box-shadow: 0 0 0 5px rgba(76,175,125,0); } } .cal09__shell { position: relative; z-index: 1; max-width: 980px; width: 100%; display: flex; flex-direction: column; gap: 16px; animation: cal09-in 0.5s ease both; } /* ── Top toolbar ── */ .cal09__toolbar { display: flex; align-items: center; justify-content: space-between; padding: 0 4px; } .cal09__toolbar-left { display: flex; align-items: baseline; gap: 12px; } .cal09__title { font-family: 'Libre Baskerville', serif; font-style: italic; font-size: 36px; color: var(--text); line-height: 1; } .cal09__title-badge { font-family: 'Space Grotesk', sans-serif; font-style: normal; font-size: 12px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--green); background: rgba(76,175,125,0.12); border: 1px solid rgba(76,175,125,0.25); padding: 4px 10px; border-radius: 20px; animation: cal09-badge-pop 0.4s cubic-bezier(0.34,1.56,0.64,1) 0.3s both; } .cal09__toolbar-right { display: flex; gap: 8px; align-items: center; } .cal09__view-btn { padding: 7px 16px; border-radius: 8px; font-size: 12px; font-weight: 600; letter-spacing: 0.05em; cursor: pointer; transition: all 0.15s; user-select: none; background: var(--card); border: 1px solid var(--border2); color: var(--text2); } .cal09__view-btn:hover { border-color: var(--green); color: var(--green); } .cal09__view-btn.active { background: rgba(76,175,125,0.15); border-color: var(--green); color: var(--green); } .cal09__nav-group { display: flex; border: 1px solid var(--border2); border-radius: 8px; overflow: hidden; } .cal09__nav-b { padding: 7px 12px; font-size: 15px; cursor: pointer; color: var(--text2); border-right: 1px solid var(--border2); transition: all 0.15s; user-select: none; } .cal09__nav-b:last-child { border-right: none; } .cal09__nav-b:hover { background: var(--card2); color: var(--green); } /* ── Body: 2-col layout ── */ .cal09__body { display: grid; grid-template-columns: 1fr 300px; gap: 14px; } /* ── Calendar grid panel ── */ .cal09__cal-panel { background: var(--card); border: 1px solid var(--border2); border-radius: 20px; overflow: hidden; } /* DOW headers */ .cal09__dow { display: grid; grid-template-columns: repeat(7, 1fr); border-bottom: 1px solid var(--border); padding: 0; } .cal09__dw { padding: 12px 10px; font-size: 10px; font-weight: 700; letter-spacing: 0.15em; text-transform: uppercase; color: var(--text3); text-align: center; border-right: 1px solid var(--border); } .cal09__dw:last-child { border-right: none; } .cal09__dw.wkend { color: var(--green); opacity: 0.6; } /* ── The Event Planner Grid — THE CORE TECHNIQUE ── Each cell uses: - display: grid / flex for inner layout - position: relative for absolute-positioned event blocks - Nested grids for multi-event day layouts - CSS absolute positioning for spanning events - z-index layers for overlapping badges ── */ .cal09__grid { display: grid; grid-template-columns: repeat(7, 1fr); grid-auto-rows: minmax(110px, auto); } .cal09__cell { border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 8px 6px 6px; position: relative; /* ← enables absolute event blocks */ transition: background 0.15s; display: flex; flex-direction: column; gap: 4px; cursor: pointer; } .cal09__cell:nth-child(7n) { border-right: none; } .cal09__cell:hover { background: var(--card2); } .cal09__cell.other { opacity: 0.2; pointer-events: none; } .cal09__cell-top { display: flex; align-items: flex-start; justify-content: space-between; } .cal09__cell-n { font-size: 15px; font-weight: 700; color: var(--text); width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; border-radius: 8px; line-height: 1; font-family: 'Libre Baskerville', serif; transition: all 0.15s; } .cal09__cell.wkend .cal09__cell-n { color: var(--green); opacity: 0.8; } /* Today */ .cal09__cell.today { background: rgba(76,175,125,0.06); border-color: rgba(76,175,125,0.2); } .cal09__cell.today .cal09__cell-n { background: var(--green); color: #0d1a12; animation: cal09-today-pulse 2.5s ease-in-out infinite; } .cal09__cell.selected { background: rgba(76,175,125,0.08); } .cal09__cell.selected .cal09__cell-n { background: var(--card2); border: 2px solid var(--green); color: var(--green); } /* Event count badge — top right, absolutely positioned */ .cal09__cell-badge { position: absolute; top: 8px; right: 6px; min-width: 18px; height: 18px; border-radius: 9px; font-size: 9px; font-weight: 700; display: flex; align-items: center; justify-content: center; padding: 0 5px; animation: cal09-badge-pop 0.3s cubic-bezier(0.34,1.56,0.64,1) both; } .cal09__cell-badge--g { background: rgba(76,175,125,0.25); color: var(--green); } .cal09__cell-badge--a { background: rgba(232,162,58,0.25); color: var(--amber); } .cal09__cell-badge--r { background: rgba(224,88,112,0.2); color: var(--rose); } /* ── Event blocks inside cells ── Technique 1: stacked flex column (normal flow) Technique 2: absolute positioned for "spanning" look Technique 3: color-coded left border + bg ── */ .cal09__cell-events { display: flex; flex-direction: column; gap: 3px; margin-top: 4px; flex: 1; } .cal09__ev { padding: 3px 6px 3px 8px; border-radius: 5px; font-size: 9.5px; font-weight: 600; letter-spacing: 0.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; position: relative; animation: cal09-event-slide 0.3s ease both; cursor: default; display: flex; align-items: center; gap: 5px; } /* Left accent bar via ::before */ .cal09__ev::before { content: ''; position: absolute; left: 0; top: 2px; bottom: 2px; width: 3px; border-radius: 2px; } /* Color variants */ .cal09__ev--green { background: rgba(76,175,125,0.12); color: var(--green); } .cal09__ev--green::before { background: var(--green); } .cal09__ev--amber { background: rgba(232,162,58,0.12); color: var(--amber); } .cal09__ev--amber::before { background: var(--amber); } .cal09__ev--rose { background: rgba(224,88,112,0.12); color: var(--rose); } .cal09__ev--rose::before { background: var(--rose); } .cal09__ev--sky { background: rgba(90,180,212,0.12); color: var(--sky); } .cal09__ev--sky::before { background: var(--sky); } .cal09__ev--violet { background: rgba(160,125,212,0.12); color: var(--violet); } .cal09__ev--violet::before { background: var(--violet); } .cal09__ev--lime { background: rgba(151,201,92,0.12); color: var(--lime); } .cal09__ev--lime::before { background: var(--lime); } .cal09__ev--sand { background: rgba(212,184,122,0.12); color: var(--sand); } .cal09__ev--sand::before { background: var(--sand); } /* Event dot icon */ .cal09__ev-dot { width: 5px; height: 5px; border-radius: 50%; flex-shrink: 0; } /* "+N more" overflow badge — absolutely placed bottom */ .cal09__more { font-size: 9px; font-weight: 600; color: var(--text3); letter-spacing: 0.06em; padding: 2px 6px; text-align: right; cursor: pointer; margin-top: auto; } .cal09__more:hover { color: var(--green); } /* ── Right sidebar ── */ .cal09__sidebar { display: flex; flex-direction: column; gap: 12px; } .cal09__sb-card { background: var(--card); border: 1px solid var(--border2); border-radius: 16px; padding: 18px; } .cal09__sb-lbl { font-size: 9px; font-weight: 700; letter-spacing: 0.22em; text-transform: uppercase; color: var(--text3); margin-bottom: 14px; display: flex; align-items: center; gap: 8px; } .cal09__sb-lbl::after { content: ''; flex: 1; height: 1px; background: var(--border); } /* Today summary */ .cal09__today-date { font-family: 'Libre Baskerville', serif; font-style: italic; font-size: 56px; color: var(--green); line-height: 1; } .cal09__today-info { font-size: 12px; color: var(--text3); margin-top: 4px; } /* Agenda list — time-blocked */ .cal09__agenda-item { display: grid; grid-template-columns: 38px auto; gap: 10px; align-items: start; padding: 8px 0; border-bottom: 1px solid var(--border); animation: cal09-event-slide 0.3s ease both; } .cal09__agenda-item:last-child { border-bottom: none; padding-bottom: 0; } .cal09__agenda-item:nth-child(2) { animation-delay: 0.07s; } .cal09__agenda-item:nth-child(3) { animation-delay: 0.14s; } .cal09__agenda-item:nth-child(4) { animation-delay: 0.21s; } .cal09__ag-time { font-size: 10px; color: var(--text3); font-weight: 600; letter-spacing: 0.04em; padding-top: 3px; } .cal09__ag-body {} .cal09__ag-name { font-size: 12px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .cal09__ag-meta { font-size: 10px; color: var(--text3); margin-top: 2px; } .cal09__ag-tag { display: inline-flex; align-items: center; gap: 4px; font-size: 9px; font-weight: 600; padding: 2px 7px; border-radius: 10px; margin-top: 5px; letter-spacing: 0.04em; } /* Legend */ .cal09__legend { display: flex; flex-direction: column; gap: 8px; } .cal09__legend-row { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--text2); } .cal09__legend-swatch { width: 12px; height: 4px; border-radius: 2px; flex-shrink: 0; } .cal09__legend-count { margin-left: auto; font-size: 10px; color: var(--text3); font-weight: 600; } @media (max-width: 780px) { .cal09__body { grid-template-columns: 1fr; } .cal09__sidebar { display: none; } .cal09__cell { min-height: 80px; } } @media (max-width: 480px) { .cal09__title { font-size: 26px; } .cal09__cell { padding: 5px 4px; min-height: 60px; } .cal09__cell-n { font-size: 12px; width: 22px; height: 22px; } .cal09__ev { font-size: 8px; } } @media (prefers-reduced-motion: reduce) { .cal09 * { animation: none !important; transition: none !important; } } ``` **JS:** ```js document.querySelectorAll('#cal09Grid .cal09__cell:not(.other)').forEach(cell => { cell.addEventListener('click', function() { document.querySelectorAll('#cal09Grid .cal09__cell').forEach(c => c.classList.remove('selected')); this.classList.add('selected'); const n = this.querySelector('.cal09__cell-n'); if (n) document.getElementById('cal09BigDate').textContent = n.textContent.padStart(2,'0'); }); }); ``` ### 10. Neumorphic Calendar Widget **Type:** CSS + JS **Description:** Pure soft-UI on the canonical #e0e5ec base with the dual light/dark shadow recipe exposed as reusable variables. Buttons extrude and press to inset, today is permanently inset, the selected day is a raised button, and the footer is one large inset event well. **HTML:** ```html
June
2026
S
M
T
W
T
F
S
25
26
27
28
29
30
31
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
1
2
3
4
5
Month
Week
Day
``` **CSS:** ```css .cal10, .cal10 *, .cal10 *::before, .cal10 *::after { box-sizing: border-box; margin: 0; padding: 0; } .cal10 ::selection { background: #6d5dfc; color: #fff; } .cal10 { /* The neumorphic base — everything matches this exact bg */ --bg: #e0e5ec; --light: #ffffff; --dark: #a3b1c6; --text: #4a5568; --text2: #8595ad; --text3: #b0bcce; --accent: #6d5dfc; --accent-l: #8a7cff; --red: #fc5d7c; --green: #4ecda6; --amber: #fcb15d; /* The famous dual-shadow recipe */ --shadow-out: 8px 8px 16px var(--dark), -8px -8px 16px var(--light); --shadow-out-sm: 5px 5px 10px var(--dark), -5px -5px 10px var(--light); --shadow-in: inset 5px 5px 10px var(--dark), inset -5px -5px 10px var(--light); --shadow-in-sm: inset 3px 3px 6px var(--dark), inset -3px -3px 6px var(--light); font-family: 'Nunito', sans-serif; background: var(--bg); min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 40px 20px; color: var(--text); } @keyframes cal10-in { from { opacity: 0; transform: scale(0.96); } to { opacity: 1; transform: scale(1); } } .cal10__widget { width: 100%; max-width: 420px; background: var(--bg); border-radius: 36px; padding: 32px; box-shadow: var(--shadow-out); animation: cal10-in 0.5s ease both; } /* ── Header ── */ .cal10__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 28px; } .cal10__month-wrap {} .cal10__month { font-size: 28px; font-weight: 900; color: var(--text); line-height: 1; } .cal10__year { font-size: 13px; font-weight: 700; color: var(--text3); letter-spacing: 0.08em; margin-top: 2px; } .cal10__nav { display: flex; gap: 12px; } /* Neumorphic buttons — extruded, press to inset */ .cal10__nav-btn { width: 46px; height: 46px; border-radius: 50%; background: var(--bg); box-shadow: var(--shadow-out-sm); display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--accent); font-size: 18px; font-weight: 800; transition: box-shadow 0.18s, color 0.18s; user-select: none; } .cal10__nav-btn:hover { color: var(--accent-l); } .cal10__nav-btn:active { box-shadow: var(--shadow-in-sm); } /* ── DOW row ── */ .cal10__dow { display: grid; grid-template-columns: repeat(7, 1fr); margin-bottom: 16px; } .cal10__dw { text-align: center; font-size: 11px; font-weight: 800; color: var(--text3); letter-spacing: 0.05em; } /* ── Date grid ── */ .cal10__grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 10px; } .cal10__cell { aspect-ratio: 1; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; color: var(--text); cursor: pointer; position: relative; transition: box-shadow 0.18s, color 0.18s, transform 0.18s; background: var(--bg); } /* Default flat cells press in on hover */ .cal10__cell:hover { box-shadow: var(--shadow-in-sm); color: var(--accent); } .cal10__cell.other { color: var(--text3); opacity: 0.5; pointer-events: none; } /* Today — permanently inset (pressed look) */ .cal10__cell.today { box-shadow: var(--shadow-in); color: var(--accent); font-weight: 900; } /* Selected — raised + accent, the "active" button */ .cal10__cell.selected { box-shadow: var(--shadow-out-sm); color: var(--accent); font-weight: 900; transform: scale(1.02); } .cal10__cell.selected::after { content: ''; position: absolute; inset: 6px; border-radius: 50%; border: 2px solid var(--accent); opacity: 0.25; } /* Event dots */ .cal10__dot { position: absolute; bottom: 7px; width: 5px; height: 5px; border-radius: 50%; } .cal10__dot--a { background: var(--accent); } .cal10__dot--r { background: var(--red); } .cal10__dot--g { background: var(--green); } /* ── Footer event card — inset well ── */ .cal10__footer { margin-top: 28px; padding: 20px; border-radius: 24px; box-shadow: var(--shadow-in); background: var(--bg); } .cal10__footer-label { font-size: 10px; font-weight: 800; letter-spacing: 0.18em; text-transform: uppercase; color: var(--text3); margin-bottom: 14px; } .cal10__ev { display: flex; align-items: center; gap: 14px; padding: 8px 0; } .cal10__ev + .cal10__ev { border-top: 1px solid rgba(163,177,198,0.25); } /* Neumorphic mini icon */ .cal10__ev-icon { width: 40px; height: 40px; border-radius: 12px; background: var(--bg); box-shadow: var(--shadow-out-sm); display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; } .cal10__ev-body { flex: 1; min-width: 0; } .cal10__ev-name { font-size: 14px; font-weight: 800; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .cal10__ev-time { font-size: 12px; font-weight: 600; color: var(--text2); margin-top: 1px; } .cal10__ev-pill { font-size: 11px; font-weight: 800; padding: 4px 10px; border-radius: 20px; background: var(--bg); box-shadow: var(--shadow-out-sm); flex-shrink: 0; } .cal10__ev-pill--a { color: var(--accent); } .cal10__ev-pill--r { color: var(--red); } .cal10__ev-pill--g { color: var(--green); } /* ── Bottom toggle row (neumorphic switches) ── */ .cal10__toggles { display: flex; gap: 12px; margin-top: 20px; } .cal10__toggle { flex: 1; padding: 12px; border-radius: 16px; background: var(--bg); box-shadow: var(--shadow-out-sm); text-align: center; font-size: 12px; font-weight: 800; color: var(--text2); cursor: pointer; transition: box-shadow 0.18s, color 0.18s; user-select: none; } .cal10__toggle:hover { color: var(--accent); } .cal10__toggle.active { box-shadow: var(--shadow-in-sm); color: var(--accent); } @media (max-width: 460px) { .cal10__widget { padding: 24px; border-radius: 28px; } .cal10__grid { gap: 7px; } .cal10__cell { font-size: 13px; } } @media (prefers-reduced-motion: reduce) { .cal10 * { animation: none !important; transition: none !important; } } ``` **JS:** ```js document.querySelectorAll('#cal10Grid .cal10__cell:not(.other)').forEach(cell => { cell.addEventListener('click', function() { document.querySelectorAll('#cal10Grid .cal10__cell').forEach(c => c.classList.remove('selected')); this.classList.add('selected'); }); }); document.querySelectorAll('.cal10__toggle').forEach(t => { t.addEventListener('click', function() { document.querySelectorAll('.cal10__toggle').forEach(x => x.classList.remove('active')); this.classList.add('active'); }); }); ``` ### 11. Horizontal Scroll / Timeline Calendar **Type:** CSS + JS **Description:** A fitness/booking-app date strip using display:flex with overflow-x:auto and scroll-snap. Day pills spring on hover, today glows lime, edge gradient masks hint at more, and a selected-day detail panel renders a vertical timeline with connector line and node dots. **HTML:** ```html
June 2026 · Week 23
Schedule
Sun
1
Jun
Mon
2
Jun
Tue
3
Jun
Wed
4
Jun
Thu
5
Jun
Fri
6
Jun
Sat
7
Jun
Sun
8
Today
Mon
9
Jun
Tue
10
Jun
Wed
11
Jun
Thu
12
Jun
Fri
13
Jun
Sat
14
Jun
Sun
15
Jun
Mon
16
Jun
Tue
17
Jun
Wed
18
Jun
Thu
19
Jun
Fri
20
Jun
Sat
21
Jun
Monday, June 9
2 events
10:00 — 11:00 AM
Sprint Planning
Zoom · 8 attendees
3:00 — 3:30 PM
1:1 with Sam
Office · Recurring
``` **CSS:** ```css .cal11, .cal11 *, .cal11 *::before, .cal11 *::after { box-sizing: border-box; margin: 0; padding: 0; } .cal11 ::selection { background: #ff4d4d; color: #fff; } .cal11 { --bg: #0e0e12; --surface: #16161d; --card: #1d1d27; --card2: #25252f; --border: rgba(255,255,255,0.08); --text: #f5f5f7; --text2: #9a9aa8; --text3: #55555f; --lime: #d4ff3d; --coral: #ff5e4d; --cyan: #3dd4ff; --violet: #9d7dff; font-family: 'Sora', sans-serif; background: var(--bg); min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 40px 0; color: var(--text); } @keyframes cal11-in { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } } @keyframes cal11-glow { 0%, 100% { box-shadow: 0 0 20px rgba(212,255,61,0.4); } 50% { box-shadow: 0 0 36px rgba(212,255,61,0.65); } } .cal11__wrap { width: 100%; max-width: 720px; padding: 0 24px; animation: cal11-in 0.5s ease both; } /* ── Header ── */ .cal11__head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 28px; padding: 0 4px; } .cal11__title-block {} .cal11__eyebrow { font-size: 11px; font-weight: 700; letter-spacing: 0.25em; text-transform: uppercase; color: var(--lime); margin-bottom: 6px; } .cal11__title { font-family: 'Archivo Black', sans-serif; font-size: 40px; line-height: 0.95; letter-spacing: -0.02em; } .cal11__month-toggle { display: flex; gap: 6px; } .cal11__mt-btn { width: 42px; height: 42px; border-radius: 14px; background: var(--card); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--text2); font-size: 18px; transition: all 0.2s; user-select: none; } .cal11__mt-btn:hover { background: var(--card2); color: var(--lime); border-color: var(--lime); } /* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ HORIZONTAL SCROLL STRIP — the core. display: flex; overflow-x: auto; scroll-snap for that booking-app feel. ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */ .cal11__strip { display: flex; gap: 12px; overflow-x: auto; padding: 8px 4px 20px; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; scrollbar-width: thin; scrollbar-color: var(--card2) transparent; } .cal11__strip::-webkit-scrollbar { height: 6px; } .cal11__strip::-webkit-scrollbar-track { background: transparent; } .cal11__strip::-webkit-scrollbar-thumb { background: var(--card2); border-radius: 3px; } .cal11__strip::-webkit-scrollbar-thumb:hover { background: var(--text3); } /* Each day pill */ .cal11__day { flex: 0 0 auto; width: 76px; padding: 18px 10px 14px; border-radius: 20px; background: var(--card); border: 1px solid var(--border); display: flex; flex-direction: column; align-items: center; gap: 8px; cursor: pointer; scroll-snap-align: center; transition: all 0.22s cubic-bezier(0.34,1.56,0.64,1); position: relative; } .cal11__day:hover { transform: translateY(-4px); border-color: var(--text3); background: var(--card2); } .cal11__day-dow { font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text2); } .cal11__day-num { font-family: 'Archivo Black', sans-serif; font-size: 26px; line-height: 1; color: var(--text); } .cal11__day-mon { font-size: 10px; font-weight: 600; color: var(--text3); text-transform: uppercase; letter-spacing: 0.08em; } /* Event pips on the pill */ .cal11__day-pips { display: flex; gap: 4px; height: 6px; } .cal11__pip { width: 6px; height: 6px; border-radius: 50%; } .cal11__pip--l { background: var(--lime); } .cal11__pip--c { background: var(--coral); } .cal11__pip--y { background: var(--cyan); } .cal11__pip--v { background: var(--violet); } /* Weekend tint */ .cal11__day.weekend .cal11__day-dow { color: var(--coral); } /* Today */ .cal11__day.today { background: var(--lime); border-color: var(--lime); animation: cal11-glow 2.5s ease-in-out infinite; } .cal11__day.today .cal11__day-dow, .cal11__day.today .cal11__day-num, .cal11__day.today .cal11__day-mon { color: #0e0e12; } .cal11__day.today .cal11__pip--l { background: #0e0e12; } /* Selected */ .cal11__day.selected:not(.today) { background: var(--card2); border-color: var(--lime); transform: translateY(-4px); } .cal11__day.selected:not(.today)::after { content: ''; position: absolute; bottom: -1px; left: 50%; transform: translateX(-50%); width: 24px; height: 3px; background: var(--lime); border-radius: 2px; } /* Scroll hint gradient masks */ .cal11__strip-wrap { position: relative; } .cal11__strip-wrap::before, .cal11__strip-wrap::after { content: ''; position: absolute; top: 0; bottom: 20px; width: 40px; pointer-events: none; z-index: 2; } .cal11__strip-wrap::before { left: 0; background: linear-gradient(90deg, var(--bg), transparent); } .cal11__strip-wrap::after { right: 0; background: linear-gradient(270deg, var(--bg), transparent); } /* ── Selected day detail panel ── */ .cal11__detail { margin-top: 16px; background: var(--card); border: 1px solid var(--border); border-radius: 24px; padding: 24px; } .cal11__detail-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; } .cal11__detail-date { font-size: 18px; font-weight: 700; } .cal11__detail-date span { color: var(--lime); } .cal11__detail-count { font-size: 12px; font-weight: 600; color: var(--text2); background: var(--card2); padding: 5px 12px; border-radius: 20px; } /* Timeline of the day */ .cal11__timeline { position: relative; padding-left: 20px; } .cal11__timeline::before { content: ''; position: absolute; left: 4px; top: 6px; bottom: 6px; width: 2px; background: var(--border); } .cal11__tl-item { position: relative; padding: 10px 0 10px 18px; } .cal11__tl-item::before { content: ''; position: absolute; left: -20px; top: 14px; width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--bg); } .cal11__tl-item--l::before { background: var(--lime); } .cal11__tl-item--c::before { background: var(--coral); } .cal11__tl-item--y::before { background: var(--cyan); } .cal11__tl-item--v::before { background: var(--violet); } .cal11__tl-time { font-size: 11px; font-weight: 700; color: var(--text3); letter-spacing: 0.05em; } .cal11__tl-name { font-size: 14px; font-weight: 600; color: var(--text); margin-top: 2px; } .cal11__tl-meta { font-size: 12px; color: var(--text2); margin-top: 2px; } @media (max-width: 480px) { .cal11__title { font-size: 30px; } .cal11__day { width: 66px; padding: 14px 8px 12px; } .cal11__day-num { font-size: 22px; } } @media (prefers-reduced-motion: reduce) { .cal11 * { animation: none !important; transition: none !important; } .cal11__strip { scroll-behavior: auto; } } ``` **JS:** ```js document.querySelectorAll('#cal11Strip .cal11__day').forEach(d => { d.addEventListener('click', function() { document.querySelectorAll('#cal11Strip .cal11__day').forEach(x => x.classList.remove('selected')); if (!this.classList.contains('today')) this.classList.add('selected'); this.scrollIntoView({behavior:'smooth', inline:'center', block:'nearest'}); }); }); ``` ### 12. Minimalist Sidebar Calendar Card **Type:** CSS + JS **Description:** An ultra-clean compact widget sized for a dashboard rail or blog footer. Newsreader serif month, tight 1px grid, hairline dividers, a quiet today dot and black-fill selection, a 3-row mini agenda with tabular times, and a footer mini-stat with an add chip. **HTML:** ```html
June 2026
S
M
T
W
T
F
S
25
26
27
28
29
30
31
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
1
2
3
4
5
Today
10:00
Sprint Planning
14:00
Product Launch
16:30
Design Review
3 events today
+ Add
— sidebar widget, actual size —
``` **CSS:** ```css .cal12, .cal12 *, .cal12 *::before, .cal12 *::after { box-sizing: border-box; margin: 0; padding: 0; } .cal12 ::selection { background: #111; color: #fff; } .cal12 { --paper: #fcfcfa; --ink: #14140f; --ink2: #6e6e64; --ink3: #b8b8ad; --hair: #ebebe4; --accent: #d94f30; --accent-soft: #fbe9e4; font-family: 'Inter Tight', sans-serif; background: #f0f0eb; min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 40px 20px; color: var(--ink); } @keyframes cal12-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } } /* Mock sidebar context to show scale */ .cal12__context { width: 100%; max-width: 300px; animation: cal12-in 0.45s ease both; } /* ── The compact card ── */ .cal12__card { background: var(--paper); border: 1px solid var(--hair); border-radius: 16px; padding: 20px; box-shadow: 0 1px 2px rgba(0,0,0,0.03), 0 8px 24px rgba(0,0,0,0.04); } /* ── Header ── */ .cal12__head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 18px; } .cal12__month { font-family: 'Newsreader', serif; font-size: 21px; font-weight: 500; letter-spacing: -0.01em; color: var(--ink); } .cal12__month span { color: var(--ink3); font-weight: 400; } .cal12__nav { display: flex; gap: 2px; } .cal12__nav-btn { width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; border-radius: 6px; cursor: pointer; color: var(--ink2); font-size: 13px; transition: all 0.15s; user-select: none; } .cal12__nav-btn:hover { background: var(--hair); color: var(--ink); } /* ── DOW ── */ .cal12__dow { display: grid; grid-template-columns: repeat(7, 1fr); margin-bottom: 6px; } .cal12__dw { text-align: center; font-size: 10px; font-weight: 600; color: var(--ink3); letter-spacing: 0.04em; padding: 2px 0; } /* ── Grid — tight ── */ .cal12__grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 1px; } .cal12__cell { aspect-ratio: 1; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 500; color: var(--ink); cursor: pointer; border-radius: 8px; position: relative; transition: all 0.13s; } .cal12__cell:hover { background: var(--hair); } .cal12__cell.other { color: var(--ink3); opacity: 0.55; pointer-events: none; } .cal12__cell.today { font-weight: 700; color: var(--accent); } .cal12__cell.today::after { content: ''; position: absolute; bottom: 4px; width: 4px; height: 4px; border-radius: 50%; background: var(--accent); } .cal12__cell.selected { background: var(--ink); color: var(--paper); font-weight: 600; } .cal12__cell.selected.today { color: var(--paper); } .cal12__cell.selected.today::after { background: var(--paper); } /* tiny event marker */ .cal12__cell.has-ev:not(.selected)::before { content: ''; position: absolute; top: 5px; right: 5px; width: 3px; height: 3px; border-radius: 50%; background: var(--ink3); } /* ── Divider ── */ .cal12__rule { height: 1px; background: var(--hair); margin: 18px 0 14px; } /* ── Mini agenda ── */ .cal12__agenda-label { font-size: 10px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink3); margin-bottom: 12px; } .cal12__ev { display: flex; align-items: center; gap: 10px; padding: 7px 0; } .cal12__ev-time { font-size: 11px; font-weight: 600; color: var(--ink2); width: 38px; flex-shrink: 0; font-variant-numeric: tabular-nums; } .cal12__ev-bar { width: 2px; align-self: stretch; border-radius: 1px; flex-shrink: 0; } .cal12__ev-name { font-size: 12px; font-weight: 500; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } /* ── Footer mini-stat ── */ .cal12__foot { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--hair); } .cal12__foot-text { font-size: 11px; color: var(--ink2); } .cal12__foot-text b { color: var(--ink); font-weight: 700; } .cal12__foot-btn { font-size: 11px; font-weight: 600; color: var(--accent); cursor: pointer; padding: 4px 10px; border-radius: 8px; background: var(--accent-soft); transition: all 0.15s; user-select: none; } .cal12__foot-btn:hover { background: var(--accent); color: #fff; } /* Caption beneath card */ .cal12__caption { text-align: center; font-size: 11px; color: #aaa; margin-top: 14px; letter-spacing: 0.05em; } @media (prefers-reduced-motion: reduce) { .cal12 * { animation: none !important; transition: none !important; } } ``` **JS:** ```js document.querySelectorAll('#cal12Grid .cal12__cell:not(.other)').forEach(cell => { cell.addEventListener('click', function() { document.querySelectorAll('#cal12Grid .cal12__cell').forEach(c => c.classList.remove('selected')); this.classList.add('selected'); }); }); ``` ### 13. CSS Booking Date Picker UI **Type:** CSS + JS **Description:** A travel/reservation dual-month range picker. Range days get a band that stretches edge-to-edge via full-width ::before; endpoints use half-width bands so the highlight connects across rows. Live check-in/out summary and night count; click to set start then end. **HTML:** ```html
Check-in
Jun 11
Check-out
Jun 17
6
Nights
June 2026
Su
Mo
Tu
We
Th
Fr
Sa
25
26
27
28
29
30
31
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
July 2026
Su
Mo
Tu
We
Th
Fr
Sa
29
30
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
Selected
In range
``` **CSS:** ```css .cal13, .cal13 *, .cal13 *::before, .cal13 *::after { box-sizing: border-box; margin: 0; padding: 0; } .cal13 ::selection { background: #1f6f5c; color: #fff; } .cal13 { --bg: #f4f1ec; --card: #ffffff; --ink: #1c2825; --ink2: #5e6e69; --ink3: #a3afab; --hair: #ebe7e0; --teal: #1f6f5c; --teal-d: #16513f; --range: #e3f0eb; --range-edge: #1f6f5c; font-family: 'DM Sans', sans-serif; background: var(--bg); min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 40px 20px; color: var(--ink); } @keyframes cal13-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } } .cal13__card { background: var(--card); border-radius: 24px; box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 24px 60px rgba(28,40,37,0.1); overflow: hidden; max-width: 720px; width: 100%; animation: cal13-in 0.5s ease both; } /* ── Summary header ── */ .cal13__summary { display: flex; align-items: stretch; border-bottom: 1px solid var(--hair); } .cal13__sum-block { flex: 1; padding: 20px 24px; cursor: pointer; transition: background 0.15s; position: relative; } .cal13__sum-block:hover { background: #faf9f6; } .cal13__sum-block.active::after { content: ''; position: absolute; bottom: -1px; left: 24px; right: 24px; height: 2px; background: var(--teal); } .cal13__sum-label { font-size: 10px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink3); margin-bottom: 5px; } .cal13__sum-value { font-family: 'Fraunces', serif; font-size: 22px; font-weight: 600; color: var(--ink); } .cal13__sum-value.empty { color: var(--ink3); font-weight: 400; } .cal13__sum-arrow { display: flex; align-items: center; padding: 0 8px; color: var(--ink3); font-size: 18px; } .cal13__sum-nights { display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 0 24px; border-left: 1px solid var(--hair); background: var(--range); min-width: 90px; } .cal13__nights-num { font-family: 'Fraunces', serif; font-size: 28px; font-weight: 600; color: var(--teal-d); line-height: 1; } .cal13__nights-lbl { font-size: 10px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--teal); margin-top: 3px; } /* ── Dual month container ── */ .cal13__months { display: grid; grid-template-columns: 1fr 1fr; gap: 0; padding: 24px; } .cal13__month { padding: 0 16px; } .cal13__month:first-child { border-right: 1px solid var(--hair); } .cal13__month-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; } .cal13__month-name { font-family: 'Fraunces', serif; font-size: 17px; font-weight: 600; color: var(--ink); } .cal13__month-nav { width: 30px; height: 30px; border-radius: 8px; display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--ink2); font-size: 14px; transition: all 0.15s; user-select: none; } .cal13__month-nav:hover { background: var(--hair); color: var(--teal); } .cal13__month-nav.ghost { visibility: hidden; } .cal13__dow { display: grid; grid-template-columns: repeat(7, 1fr); margin-bottom: 6px; } .cal13__dw { text-align: center; font-size: 10px; font-weight: 700; color: var(--ink3); letter-spacing: 0.03em; } .cal13__grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 0; row-gap: 2px; } /* Each date cell */ .cal13__cell { aspect-ratio: 1; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 500; color: var(--ink); cursor: pointer; position: relative; transition: color 0.12s; } .cal13__cell .n { width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; border-radius: 50%; position: relative; z-index: 2; transition: all 0.12s; } .cal13__cell:hover:not(.other):not(.disabled) .n { background: var(--hair); } .cal13__cell.other { color: var(--ink3); opacity: 0; pointer-events: none; } .cal13__cell.disabled { color: var(--ink3); opacity: 0.4; pointer-events: none; text-decoration: line-through; } /* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ RANGE SELECTION — the key feature. .in-range → light band background that stretches .range-start / .range-end → solid teal endpoints The band uses a ::before that fills the full cell width. ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */ .cal13__cell.in-range::before { content: ''; position: absolute; top: 3px; bottom: 3px; left: 0; right: 0; background: var(--range); z-index: 1; } .cal13__cell.range-start::before, .cal13__cell.range-end::before { content: ''; position: absolute; top: 3px; bottom: 3px; background: var(--range); z-index: 1; } /* start: band only extends right */ .cal13__cell.range-start::before { left: 50%; right: 0; } /* end: band only extends left */ .cal13__cell.range-end::before { left: 0; right: 50%; } /* single day (start==end): no band */ .cal13__cell.range-start.range-end::before { display: none; } /* endpoint circles */ .cal13__cell.range-start .n, .cal13__cell.range-end .n { background: var(--teal); color: #fff; font-weight: 700; box-shadow: 0 4px 12px rgba(31,111,92,0.3); } /* today marker */ .cal13__cell.today .n { border: 1.5px solid var(--teal); color: var(--teal); font-weight: 700; } .cal13__cell.today.range-start .n, .cal13__cell.today.range-end .n { color: #fff; border-color: var(--teal); } /* ── Footer ── */ .cal13__foot { display: flex; align-items: center; justify-content: space-between; padding: 18px 24px; border-top: 1px solid var(--hair); background: #faf9f6; } .cal13__foot-legend { display: flex; gap: 16px; } .cal13__leg { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--ink2); } .cal13__leg-sw { width: 14px; height: 14px; border-radius: 4px; } .cal13__foot-actions { display: flex; gap: 10px; } .cal13__btn { padding: 10px 20px; border-radius: 10px; font-size: 13px; font-weight: 600; cursor: pointer; transition: all 0.15s; user-select: none; border: none; font-family: 'DM Sans', sans-serif; } .cal13__btn--ghost { background: transparent; color: var(--ink2); } .cal13__btn--ghost:hover { background: var(--hair); } .cal13__btn--solid { background: var(--teal); color: #fff; } .cal13__btn--solid:hover { background: var(--teal-d); } @media (max-width: 600px) { .cal13__months { grid-template-columns: 1fr; } .cal13__month:first-child { border-right: none; border-bottom: 1px solid var(--hair); padding-bottom: 20px; margin-bottom: 20px; } .cal13__sum-nights { display: none; } .cal13__foot { flex-direction: column; gap: 14px; align-items: stretch; } .cal13__foot-actions { justify-content: flex-end; } } @media (prefers-reduced-motion: reduce) { .cal13 * { animation: none !important; transition: none !important; } } ``` **JS:** ```js (() => { const cells = Array.from(document.querySelectorAll('.cal13__cell[data-d]')); // Build an ordered index for range math (June 1-30 = 1..30, July = 101..131) const order = d => d > 100 ? (30 + (d - 100)) : d; let start = 11, end = 17; // June 11 -> June 17 const monNames = {June:'Jun', July:'Jul'}; function fmt(d) { if (d > 100) return 'Jul ' + (d - 100); return 'Jun ' + d; } function paint() { const lo = Math.min(order(start), end ? order(end) : order(start)); const hi = end ? Math.max(order(start), order(end)) : order(start); cells.forEach(c => { c.classList.remove('range-start','range-end','in-range'); const o = order(+c.dataset.d); if (end === null) { if (+c.dataset.d === start) { c.classList.add('range-start','range-end'); } } else { if (o === lo) c.classList.add('range-start'); else if (o === hi) c.classList.add('range-end'); else if (o > lo && o < hi) c.classList.add('in-range'); } }); // summary const inEl = document.getElementById('cal13In'); const outEl = document.getElementById('cal13Out'); const nightsEl = document.getElementById('cal13Nights'); const sLo = Math.min(order(start), end ? order(end) : order(start)); const sHi = end ? Math.max(order(start), order(end)) : null; inEl.textContent = fmt(order(start) <= (end ? order(end) : 1e9) ? start : end); if (end !== null) { const lowD = order(start) <= order(end) ? start : end; const highD = order(start) <= order(end) ? end : start; inEl.textContent = fmt(lowD); outEl.textContent = fmt(highD); outEl.classList.remove('empty'); nightsEl.textContent = Math.abs(order(end) - order(start)); } else { outEl.textContent = 'Select'; outEl.classList.add('empty'); nightsEl.textContent = '0'; } } cells.forEach(c => { c.addEventListener('click', () => { const d = +c.dataset.d; if (end === null) { // completing a range end = d; } else { // start a new range start = d; end = null; } paint(); }); }); document.getElementById('cal13Clear').addEventListener('click', () => { start = 11; end = 17; paint(); }); paint(); })(); ``` ### 14. CSS Grid Advent Calendar **Type:** CSS + JS **Description:** A festive mosaic using grid-auto-flow:dense so wide/tall/big door tiles pack together. Each door is a real 3D flip card (perspective + preserve-3d + rotateY) revealing an emoji surprise. Falling-snow background, glowing today door, click to flip open. **HTML:** ```html
Advent Calendar
December 2026 · Tap a door
1
🎁
A gift!
2
🍪
3
4
🎄
🕯️
Candle
5
🦌
6
🔔
7
🧦
Stocking
8
☃️
9
🍬
10
🎅
11
🎶
Carols
12
🧣
13
🌟
14
🎄
🥮
Treat
15
🎀
16
🍫
17
🦌
18
19
🎁
Surprise
20
🔔
21
🌟
22
🍷
23
🎶
24
⭐ Today ⭐
🎄
Christmas Eve!
🎁 1 door opened · 23 to go · come back tomorrow!
``` **CSS:** ```css .cal14, .cal14 *, .cal14 *::before, .cal14 *::after { box-sizing: border-box; margin: 0; padding: 0; } .cal14 ::selection { background: #c0392b; color: #fff; } .cal14 { --bg1: #0a2342; --bg2: #123c63; --red: #c0392b; --red-d: #8e2820; --green: #1e6f5c; --green-l:#2a9d8f; --gold: #e9c46a; --gold-d:#d4a843; --cream: #fdf6ec; --snow: #ffffff; font-family: 'Quicksand', sans-serif; background: radial-gradient(ellipse at top, var(--bg2) 0%, var(--bg1) 70%); min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 40px 20px; color: var(--cream); position: relative; overflow: hidden; } /* Falling snow */ .cal14__snow { position: fixed; inset: 0; pointer-events: none; z-index: 0; background-image: radial-gradient(2px 2px at 10% 10%, #fff, transparent), radial-gradient(2px 2px at 30% 40%, rgba(255,255,255,.8), transparent), radial-gradient(1px 1px at 50% 20%, #fff, transparent), radial-gradient(2px 2px at 70% 60%, rgba(255,255,255,.7), transparent), radial-gradient(1px 1px at 90% 30%, #fff, transparent), radial-gradient(2px 2px at 20% 80%, rgba(255,255,255,.6), transparent), radial-gradient(1px 1px at 60% 90%, #fff, transparent), radial-gradient(2px 2px at 85% 75%, rgba(255,255,255,.7), transparent); background-size: 100% 100%; animation: cal14-snowfall 12s linear infinite; opacity: 0.5; } @keyframes cal14-snowfall { from { background-position: 0 0, 0 0, 0 0, 0 0, 0 0, 0 0, 0 0, 0 0; } to { background-position: 0 100vh, 0 100vh, 0 100vh, 0 100vh, 0 100vh, 0 100vh, 0 100vh, 0 100vh; } } @keyframes cal14-in { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: scale(1); } } @keyframes cal14-twinkle { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } } @keyframes cal14-pop { 0% { transform: scale(0.6) rotate(-10deg); opacity: 0; } 60% { transform: scale(1.15) rotate(4deg); } 100% { transform: scale(1) rotate(0); opacity: 1; } } .cal14__wrap { position: relative; z-index: 1; max-width: 680px; width: 100%; animation: cal14-in 0.6s ease both; } /* ── Header ── */ .cal14__head { text-align: center; margin-bottom: 24px; } .cal14__title { font-family: 'Mountains of Christmas', cursive; font-weight: 700; font-size: 52px; line-height: 1; color: var(--gold); text-shadow: 0 2px 0 var(--gold-d), 0 0 30px rgba(233,196,106,0.4); } .cal14__sub { font-size: 13px; font-weight: 600; letter-spacing: 0.25em; text-transform: uppercase; color: rgba(253,246,236,0.6); margin-top: 6px; } /* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ CSS GRID with auto-flow:dense — doors of varying sizes pack like a mosaic. grid-auto-flow:dense lets big tiles slot in wherever they fit. ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */ .cal14__grid { display: grid; grid-template-columns: repeat(6, 1fr); grid-auto-rows: 80px; grid-auto-flow: dense; gap: 10px; } /* ── Each door — 3D flip card ── */ .cal14__door { perspective: 600px; cursor: pointer; position: relative; } /* Size variants for mosaic effect */ .cal14__door--wide { grid-column: span 2; } .cal14__door--tall { grid-row: span 2; } .cal14__door--big { grid-column: span 2; grid-row: span 2; } .cal14__door-inner { position: relative; width: 100%; height: 100%; transition: transform 0.6s cubic-bezier(0.34,1.2,0.64,1); transform-style: preserve-3d; border-radius: 14px; } .cal14__door.open .cal14__door-inner { transform: rotateY(180deg); } /* Faces */ .cal14__face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: 14px; display: flex; flex-direction: column; align-items: center; justify-content: center; overflow: hidden; } /* Front face — the closed door */ .cal14__front { background: linear-gradient(145deg, var(--red) 0%, var(--red-d) 100%); border: 2px solid rgba(255,255,255,0.15); box-shadow: inset 0 2px 8px rgba(255,255,255,0.15), 0 6px 16px rgba(0,0,0,0.35); } .cal14__door:nth-child(3n) .cal14__front { background: linear-gradient(145deg, var(--green-l) 0%, var(--green) 100%); } .cal14__door:nth-child(4n) .cal14__front { background: linear-gradient(145deg, var(--gold) 0%, var(--gold-d) 100%); } .cal14__door-num { font-family: 'Mountains of Christmas', cursive; font-weight: 700; font-size: 32px; color: var(--cream); text-shadow: 0 2px 3px rgba(0,0,0,0.3); line-height: 1; } .cal14__door--big .cal14__door-num { font-size: 56px; } .cal14__door:nth-child(4n) .cal14__door-num { color: var(--bg1); text-shadow: none; } .cal14__door-deco { font-size: 14px; margin-top: 2px; opacity: 0.7; } /* Back face — the surprise behind the door */ .cal14__back { background: linear-gradient(145deg, var(--cream) 0%, #f0e6d2 100%); transform: rotateY(180deg); border: 2px solid var(--gold); padding: 6px; text-align: center; } .cal14__back-emoji { font-size: 28px; animation: cal14-pop 0.5s ease both; } .cal14__door--big .cal14__back-emoji { font-size: 52px; } .cal14__back-label { font-size: 9px; font-weight: 700; color: var(--red-d); margin-top: 3px; letter-spacing: 0.04em; } .cal14__door--big .cal14__back-label, .cal14__door--wide .cal14__back-label { font-size: 11px; } /* Today's door — glowing gold ring + twinkle */ .cal14__door.today .cal14__front { border-color: var(--gold); box-shadow: inset 0 2px 8px rgba(255,255,255,0.2), 0 0 0 3px var(--gold), 0 0 24px rgba(233,196,106,0.6); } .cal14__door.today .cal14__door-deco { animation: cal14-twinkle 1.5s ease-in-out infinite; } /* Hover lift */ .cal14__door:hover .cal14__door-inner:not(.open) { transform: translateY(-4px) scale(1.03); } .cal14__door.open:hover .cal14__door-inner { transform: rotateY(180deg) translateY(4px) scale(1.03); } /* ── Footer hint ── */ .cal14__hint { text-align: center; margin-top: 22px; font-size: 12px; font-weight: 600; letter-spacing: 0.1em; color: rgba(253,246,236,0.5); } .cal14__hint b { color: var(--gold); } @media (max-width: 560px) { .cal14__title { font-size: 38px; } .cal14__grid { grid-template-columns: repeat(4, 1fr); grid-auto-rows: 70px; gap: 8px; } .cal14__door-num { font-size: 24px; } } @media (prefers-reduced-motion: reduce) { .cal14 *, .cal14__snow { animation: none !important; } .cal14__door-inner { transition: none !important; } } ``` **JS:** ```js document.querySelectorAll('#cal14Grid .cal14__door').forEach(door => { door.addEventListener('click', function() { this.classList.toggle('open'); }); }); ``` ### 15. Fluent / Material Design Calendar **Type:** CSS + JS **Description:** Two design languages in one: a Material 3 calendar with accent-ring today, filled-circle selection, state layers and JS ripple animations plus a FAB; and a Fluent events list with pointer-tracking reveal glow borders built via radial-gradient and mask-composite. **HTML:** ```html
Select date
June 2026
S
M
T
W
T
F
S
25
26
27
28
29
30
31
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
1
2
3
4
5
Today · 3 events
📋
Sprint Planning
10:00 AM · Teams
1h
🚀
Product Launch
2:00 PM · All-hands
2h
🎨
Design Review
4:30 PM · Figma
45m
+
``` **CSS:** ```css .cal15, .cal15 *, .cal15 *::before, .cal15 *::after { box-sizing: border-box; margin: 0; padding: 0; } .cal15 ::selection { background: #6750a4; color: #fff; } .cal15 { /* Material 3 tonal palette */ --primary: #6750a4; --primary-c: #ffffff; --primary-ct: #21005d; --primary-cont: #eaddff; --surface: #fef7ff; --surface-2: #f7f2fa; --surface-v: #e7e0ec; --on-surface: #1d1b20; --on-surface-v:#49454f; --outline: #cac4d0; --tertiary: #7d5260; --secondary: #625b71; /* Fluent acrylic */ --fluent-glow: rgba(103,80,164,0.4); font-family: 'Roboto', sans-serif; background: #e8def8; background-image: radial-gradient(circle at 30% 20%, #f0e7fb 0%, #e2d4f5 100%); min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 40px 20px; color: var(--on-surface); } @keyframes cal15-in { from { opacity: 0; transform: translateY(20px) scale(0.98); } to { opacity: 1; transform: translateY(0) scale(1); } } @keyframes cal15-ripple { from { transform: scale(0); opacity: 0.5; } to { transform: scale(2.6); opacity: 0; } } @keyframes cal15-fab-in { from { transform: scale(0) rotate(-90deg); } to { transform: scale(1) rotate(0); } } .cal15__card { background: var(--surface); border-radius: 28px; max-width: 400px; width: 100%; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,0.1), 0 8px 24px rgba(103,80,164,0.18), 0 24px 48px rgba(103,80,164,0.12); animation: cal15-in 0.5s cubic-bezier(0.2,0,0,1) both; position: relative; } /* ── Header (Material filled style) ── */ .cal15__header { background: var(--primary-cont); padding: 24px 24px 20px; position: relative; } .cal15__header-label { font-size: 12px; font-weight: 500; letter-spacing: 0.06em; color: var(--primary-ct); opacity: 0.7; text-transform: uppercase; } .cal15__header-row { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; } .cal15__header-date { font-family: 'Roboto Flex', sans-serif; font-size: 30px; font-weight: 600; color: var(--primary-ct); letter-spacing: -0.01em; } .cal15__header-nav { display: flex; gap: 4px; } /* Material icon button with state layer + ripple */ .cal15__icon-btn { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--primary-ct); font-size: 20px; position: relative; overflow: hidden; transition: background 0.2s; user-select: none; } .cal15__icon-btn::before { content: ''; position: absolute; inset: 0; background: var(--primary-ct); opacity: 0; transition: opacity 0.15s; } .cal15__icon-btn:hover::before { opacity: 0.08; } .cal15__icon-btn:active::before { opacity: 0.12; } /* ── DOW row ── */ .cal15__dow { display: grid; grid-template-columns: repeat(7, 1fr); padding: 16px 16px 8px; } .cal15__dw { text-align: center; font-size: 12px; font-weight: 500; color: var(--on-surface-v); } /* ── Grid ── */ .cal15__grid { display: grid; grid-template-columns: repeat(7, 1fr); padding: 0 16px 16px; gap: 2px; } .cal15__cell { aspect-ratio: 1; display: flex; align-items: center; justify-content: center; position: relative; cursor: pointer; } /* The day number sits in a circular state-layer target */ .cal15__day { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 500; color: var(--on-surface); position: relative; overflow: hidden; transition: background 0.2s, color 0.2s; } /* Material state layer on hover */ .cal15__day::before { content: ''; position: absolute; inset: 0; border-radius: 50%; background: var(--primary); opacity: 0; transition: opacity 0.15s; } .cal15__cell:hover:not(.other) .cal15__day::before { opacity: 0.08; } .cal15__cell.other .cal15__day { color: var(--on-surface-v); opacity: 0.38; pointer-events: none; } /* ── Material TODAY: bold accent ring ── */ .cal15__cell.today .cal15__day { border: 1px solid var(--primary); color: var(--primary); font-weight: 700; } /* ── Material SELECTED: filled accent circle ── */ .cal15__cell.selected .cal15__day { background: var(--primary); color: var(--primary-c); font-weight: 700; } .cal15__cell.selected.today .cal15__day { border-color: transparent; } /* Ripple element injected by JS */ .cal15__rip { position: absolute; border-radius: 50%; background: var(--primary); opacity: 0.4; pointer-events: none; transform: scale(0); animation: cal15-ripple 0.55s ease-out forwards; } /* Event indicator dots (Material small) */ .cal15__cell-dots { position: absolute; bottom: 3px; display: flex; gap: 3px; } .cal15__cdot { width: 4px; height: 4px; border-radius: 50%; } .cal15__cdot--p { background: var(--primary); } .cal15__cdot--t { background: var(--tertiary); } .cal15__cdot--s { background: var(--secondary); } /* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ FLUENT SECTION — reveal-on-hover glow border that follows the card, acrylic translucency. ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */ .cal15__fluent { margin: 0 16px 16px; padding: 4px; border-radius: 18px; background: var(--surface-2); } .cal15__fluent-label { font-size: 11px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--on-surface-v); padding: 10px 14px 6px; } .cal15__event { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 14px; cursor: pointer; position: relative; background: var(--surface); margin-bottom: 4px; transition: background 0.2s, box-shadow 0.2s; /* Fluent reveal border base */ border: 1px solid transparent; } .cal15__event:last-child { margin-bottom: 0; } /* Fluent glow-border reveal on hover */ .cal15__event::after { content: ''; position: absolute; inset: 0; border-radius: 14px; padding: 1px; background: radial-gradient(120px circle at var(--mx, 50%) var(--my, 50%), var(--fluent-glow), transparent 60%); -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0); -webkit-mask-composite: xor; mask-composite: exclude; opacity: 0; transition: opacity 0.2s; pointer-events: none; } .cal15__event:hover { box-shadow: 0 2px 8px rgba(103,80,164,0.12); } .cal15__event:hover::after { opacity: 1; } .cal15__event-icon { width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; } .cal15__event-icon--p { background: var(--primary-cont); } .cal15__event-icon--t { background: #ffd8e4; } .cal15__event-icon--s { background: #e2e0f0; } .cal15__event-body { flex: 1; min-width: 0; } .cal15__event-name { font-size: 14px; font-weight: 500; color: var(--on-surface); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .cal15__event-time { font-size: 12px; color: var(--on-surface-v); margin-top: 1px; } .cal15__event-chip { font-size: 11px; font-weight: 500; padding: 4px 10px; border-radius: 8px; flex-shrink: 0; } /* Material FAB */ .cal15__fab { position: absolute; bottom: 20px; right: 20px; width: 56px; height: 56px; border-radius: 18px; background: var(--primary-cont); color: var(--primary-ct); display: flex; align-items: center; justify-content: center; font-size: 26px; cursor: pointer; box-shadow: 0 3px 8px rgba(0,0,0,0.2), 0 1px 3px rgba(0,0,0,0.12); transition: box-shadow 0.2s, transform 0.15s; animation: cal15-fab-in 0.5s cubic-bezier(0.2,0,0,1) 0.3s both; overflow: hidden; z-index: 5; } .cal15__fab:hover { box-shadow: 0 5px 14px rgba(0,0,0,0.28); } .cal15__fab:active { transform: scale(0.94); } .cal15__fab::before { content: ''; position: absolute; inset: 0; background: var(--primary-ct); opacity: 0; transition: opacity 0.15s; } .cal15__fab:hover::before { opacity: 0.08; } @media (prefers-reduced-motion: reduce) { .cal15 *, .cal15__rip { animation: none !important; transition: none !important; } } ``` **JS:** ```js // Material ripple on date cells function ripple(target, e) { const day = target.querySelector('.cal15__day'); const rect = day.getBoundingClientRect(); const rip = document.createElement('span'); rip.className = 'cal15__rip'; const size = rect.width; rip.style.width = rip.style.height = size + 'px'; const x = (e.clientX || rect.left + rect.width/2) - rect.left - size/2; const y = (e.clientY || rect.top + rect.height/2) - rect.top - size/2; rip.style.left = x + 'px'; rip.style.top = y + 'px'; day.appendChild(rip); setTimeout(() => rip.remove(), 600); } document.querySelectorAll('#cal15Grid .cal15__cell:not(.other)').forEach(cell => { cell.addEventListener('click', function(e) { document.querySelectorAll('#cal15Grid .cal15__cell').forEach(c => c.classList.remove('selected')); this.classList.add('selected'); ripple(this, e); }); }); // Fluent pointer-tracking glow border document.querySelectorAll('.cal15__event').forEach(ev => { ev.addEventListener('pointermove', function(e) { const r = this.getBoundingClientRect(); this.style.setProperty('--mx', (e.clientX - r.left) + 'px'); this.style.setProperty('--my', (e.clientY - r.top) + 'px'); }); }); // FAB ripple const fab = document.getElementById('cal15Fab'); fab.addEventListener('click', function(e) { const rect = this.getBoundingClientRect(); const rip = document.createElement('span'); rip.className = 'cal15__rip'; rip.style.width = rip.style.height = rect.width + 'px'; rip.style.left = (e.clientX - rect.left - rect.width/2) + 'px'; rip.style.top = (e.clientY - rect.top - rect.width/2) + 'px'; rip.style.borderRadius = '50%'; this.appendChild(rip); setTimeout(() => rip.remove(), 600); }); ``` ### 16. Minimalist Circular / Radial Calendar Layout **Type:** CSS + JS **Description:** Days arranged around an elegant ring instead of a grid, positioned with trig-computed transforms. Concentric guide rings, a slowly rotating tick ring, a serif center hub, gold pulsing today, gold-outline selection, and radially placed weekday labels. **HTML:** ```html
June
2026
the 8th
3 events today
``` **CSS:** ```css .cal16, .cal16 *, .cal16 *::before, .cal16 *::after { box-sizing: border-box; margin: 0; padding: 0; } .cal16 ::selection { background: #c89b6a; color: #fff; } .cal16 { --bg: #faf8f4; --ink: #2b2820; --ink2: #837c6e; --ink3: #c4bcab; --hair: #e7e1d5; --gold: #c89b6a; --gold-d: #a47c4c; --rose: #c97a6a; --ring: #ddd5c6; font-family: 'Jost', sans-serif; background: var(--bg); background-image: radial-gradient(circle at center, #fffdfa 0%, #f2ede3 100%); min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 40px 20px; color: var(--ink); } @keyframes cal16-in { from { opacity: 0; transform: scale(0.9) rotate(-8deg); } to { opacity: 1; transform: scale(1) rotate(0); } } @keyframes cal16-spin-ring { from { transform: rotate(0deg); } to { transform: rotate(360deg); } } @keyframes cal16-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(200,155,106,0.5); } 50% { box-shadow: 0 0 0 8px rgba(200,155,106,0); } } .cal16__stage { position: relative; width: 560px; height: 560px; max-width: 92vw; max-height: 92vw; animation: cal16-in 0.7s cubic-bezier(0.22,1,0.36,1) both; } /* Decorative concentric rings */ .cal16__ring { position: absolute; border-radius: 50%; border: 1px solid var(--hair); top: 50%; left: 50%; transform: translate(-50%, -50%); } /* Outer ring sits just inside where the day numbers orbit */ .cal16__ring--1 { width: 75%; height: 75%; } /* Middle dashed ring */ .cal16__ring--2 { width: 52%; height: 52%; border-style: dashed; border-color: var(--ring); } /* Inner ring hugs the center hub */ .cal16__ring--3 { width: 30%; height: 30%; } /* Slowly rotating tick marks ring — anchored at exact center, ticks pushed out by transform */ .cal16__ticks { position: absolute; width: 0; height: 0; top: 50%; left: 50%; animation: cal16-spin-ring 160s linear infinite; } .cal16__tick { position: absolute; top: 0; left: 0; width: 1px; height: 6px; background: var(--ink3); transform-origin: 0 0; } /* ── Day cells positioned around the circle ── Each cell uses: rotate(θ) translateY(-radius) rotate(-θ) to sit on the ring while keeping text upright. θ set inline per cell. ── */ .cal16__day { position: absolute; top: 50%; left: 50%; width: 42px; height: 42px; margin: -21px 0 0 -21px; display: flex; align-items: center; justify-content: center; border-radius: 50%; font-family: 'Jost', sans-serif; font-size: 14px; font-weight: 400; color: var(--ink); cursor: pointer; transition: all 0.2s; } .cal16__day:hover { background: #fff; box-shadow: 0 4px 14px rgba(43,40,32,0.1); } .cal16__day.weekend { color: var(--rose); } .cal16__day.today { background: var(--gold); color: #fff; font-weight: 600; animation: cal16-pulse 2.5s ease-in-out infinite; } .cal16__day.selected:not(.today) { background: #fff; color: var(--gold-d); font-weight: 600; box-shadow: 0 0 0 1.5px var(--gold); } /* event dot */ .cal16__day .ev { position: absolute; bottom: 4px; width: 4px; height: 4px; border-radius: 50%; background: var(--rose); } .cal16__day.today .ev { background: #fff; } /* ── Center hub ── */ .cal16__center { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 38%; text-align: center; display: flex; flex-direction: column; align-items: center; justify-content: center; } .cal16__center-month { font-family: 'Cormorant', serif; font-size: 54px; font-weight: 400; line-height: 0.9; color: var(--ink); letter-spacing: 0.01em; } .cal16__center-year { font-size: 12px; font-weight: 500; letter-spacing: 0.4em; color: var(--ink3); margin-top: 8px; padding-left: 0.4em; } .cal16__center-divider { width: 40px; height: 1px; background: var(--gold); margin: 14px 0; opacity: 0.5; } .cal16__center-today { font-family: 'Cormorant', serif; font-style: italic; font-size: 18px; color: var(--ink2); } .cal16__center-events { font-size: 11px; letter-spacing: 0.1em; color: var(--ink3); margin-top: 6px; text-transform: uppercase; } /* Weekday labels on the outer edge */ .cal16__wlabels { position: absolute; width: 100%; height: 100%; top: 0; left: 0; } .cal16__wlabel { position: absolute; top: 50%; left: 50%; font-size: 9px; font-weight: 600; letter-spacing: 0.15em; text-transform: uppercase; color: var(--ink3); transform-origin: 0 0; } /* Nav buttons */ .cal16__nav { position: absolute; bottom: -6px; left: 50%; transform: translateX(-50%); display: flex; gap: 12px; } .cal16__nav-btn { width: 36px; height: 36px; border-radius: 50%; background: #fff; border: 1px solid var(--hair); display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--gold-d); font-size: 15px; transition: all 0.2s; user-select: none; box-shadow: 0 2px 8px rgba(43,40,32,0.06); } .cal16__nav-btn:hover { background: var(--gold); color: #fff; border-color: var(--gold); } @media (max-width: 600px) { .cal16__center-month { font-size: 38px; } .cal16__day { width: 34px; height: 34px; margin: -17px 0 0 -17px; font-size: 12px; } } @media (prefers-reduced-motion: reduce) { .cal16 *, .cal16__ticks { animation: none !important; } } ``` **JS:** ```js (() => { const stage = document.getElementById('cal16Stage'); const daysWrap = document.getElementById('cal16Days'); const ticksWrap = document.getElementById('cal16Ticks'); const wlabelsWrap = document.getElementById('cal16Wlabels'); const DAYS = 30; const today = 8; const events = {2:1, 4:1, 7:1, 8:1, 9:1, 11:1, 13:1, 17:1, 20:1, 25:1}; // June 1, 2026 is a Monday → Sunday index. weekday of day d: // Jun 1 = Mon(1). day-of-week = (d) % 7 where 0=Sun... compute: const firstDow = 1; // Monday const isWeekend = d => { const dow = (firstDow + (d-1)) % 7; return dow === 0 || dow === 6; }; const R = 210; // radius for day-number ring (stage radius = 280) for (let d = 1; d <= DAYS; d++) { const angle = (d / DAYS) * 360 - 90; // start at top const rad = angle * Math.PI / 180; const x = Math.cos(rad) * R; const y = Math.sin(rad) * R; const el = document.createElement('div'); el.className = 'cal16__day'; if (d === today) el.classList.add('today'); if (isWeekend(d)) el.classList.add('weekend'); el.style.transform = `translate(${x}px, ${y}px)`; el.innerHTML = d + (events[d] ? '' : ''); el.addEventListener('click', function() { daysWrap.querySelectorAll('.cal16__day').forEach(c => c.classList.remove('selected')); this.classList.add('selected'); }); daysWrap.appendChild(el); } // tick marks — placed by rotate + translateY from the dead-center anchor const tickR = 232; for (let i = 0; i < 60; i++) { const t = document.createElement('div'); t.className = 'cal16__tick'; const ang = (i / 60) * 360; t.style.transform = `rotate(${ang}deg) translate(0, ${-tickR}px)`; if (i % 5 === 0) { t.style.height = '10px'; t.style.opacity = '0.6'; } ticksWrap.appendChild(t); } // weekday labels on the outer edge const labels = ['S','M','T','W','T','F','S']; const RL = 256; for (let i = 0; i < 7; i++) { const ang = (i / 7) * 360 - 90; const rad = ang * Math.PI / 180; const x = Math.cos(rad) * RL; const y = Math.sin(rad) * RL; const l = document.createElement('div'); l.className = 'cal16__wlabel'; l.style.transform = `translate(${x}px, ${y}px) translate(-50%, -50%)`; l.textContent = labels[i]; wlabelsWrap.appendChild(l); } })(); ``` ### 17. Retro Neon / Cyberpunk Grid Calendar **Type:** CSS + JS **Description:** Full synthwave: near-black canvas, animated perspective grid floor and glow sun. Orbitron title with stacked text-shadow and a neon flicker keyframe; cells carry cyan glow borders that intensify on hover, today pulses, selection fills hot pink, glowing event dots. **HTML:** ```html
JUNE_26
// SYS.CAL.2026
SUN
MON
TUE
WED
THU
FRI
SAT
25
26
27
28
29
30
31
01
02
03
04
05
06
07
08
09
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
01
02
03
04
05
12
Events
07
Days_left
03
Priority
``` **CSS:** ```css .cal17, .cal17 *, .cal17 *::before, .cal17 *::after { box-sizing: border-box; margin: 0; padding: 0; } .cal17 ::selection { background: #ff2bd6; color: #000; } .cal17 { --bg: #07060f; --bg2: #0d0a1f; --pink: #ff2bd6; --cyan: #00f0ff; --purple: #a64dff; --yellow: #f5ff3d; --grid: rgba(0,240,255,0.12); --text: #d8e8ff; --dim: #4a5a7a; font-family: 'Share Tech Mono', monospace; background: var(--bg); min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 40px 20px; color: var(--text); position: relative; overflow: hidden; } /* Perspective grid floor */ .cal17::before { content: ''; position: fixed; bottom: 0; left: -50%; width: 200%; height: 60%; background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px); background-size: 50px 50px; transform: perspective(300px) rotateX(70deg); transform-origin: bottom; pointer-events: none; z-index: 0; animation: cal17-floor 8s linear infinite; } @keyframes cal17-floor { from { background-position: 0 0; } to { background-position: 0 50px; } } /* glow sun */ .cal17::after { content: ''; position: fixed; top: 8%; left: 50%; transform: translateX(-50%); width: 380px; height: 380px; border-radius: 50%; background: radial-gradient(circle, rgba(255,43,214,0.18) 0%, rgba(166,77,255,0.08) 40%, transparent 70%); pointer-events: none; z-index: 0; } @keyframes cal17-flicker { 0%, 100% { opacity: 1; } 41% { opacity: 1; } 42% { opacity: 0.4; } 43% { opacity: 1; } 45% { opacity: 0.6; } 46% { opacity: 1; } } @keyframes cal17-scan { 0% { transform: translateY(0); } 100% { transform: translateY(100%); } } @keyframes cal17-in { from { opacity: 0; transform: translateY(20px) scale(0.97); } to { opacity: 1; transform: translateY(0) scale(1); } } @keyframes cal17-pulse-border { 0%, 100% { box-shadow: 0 0 8px var(--cyan), inset 0 0 8px rgba(0,240,255,0.3); } 50% { box-shadow: 0 0 18px var(--cyan), inset 0 0 14px rgba(0,240,255,0.5); } } .cal17__frame { position: relative; z-index: 1; max-width: 520px; width: 100%; background: rgba(13,10,31,0.85); backdrop-filter: blur(8px); border: 2px solid var(--cyan); border-radius: 4px; padding: 28px; box-shadow: 0 0 20px rgba(0,240,255,0.5), inset 0 0 30px rgba(0,240,255,0.08), 0 0 60px rgba(255,43,214,0.2); animation: cal17-in 0.6s ease both; } /* corner accents */ .cal17__frame::before, .cal17__frame::after { content: ''; position: absolute; width: 18px; height: 18px; border: 2px solid var(--pink); } .cal17__frame::before { top: -2px; left: -2px; border-right: none; border-bottom: none; } .cal17__frame::after { bottom: -2px; right: -2px; border-left: none; border-top: none; } /* ── Header ── */ .cal17__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; padding-bottom: 16px; border-bottom: 1px solid rgba(0,240,255,0.2); } .cal17__title { font-family: 'Orbitron', sans-serif; font-weight: 900; font-size: 30px; letter-spacing: 0.05em; color: var(--pink); text-shadow: 0 0 6px var(--pink), 0 0 14px var(--pink), 0 0 28px rgba(255,43,214,0.6); animation: cal17-flicker 6s infinite; line-height: 1; } .cal17__title span { color: var(--cyan); text-shadow: 0 0 6px var(--cyan), 0 0 14px var(--cyan); } .cal17__year { font-family: 'Orbitron', sans-serif; font-size: 13px; letter-spacing: 0.25em; color: var(--cyan); text-shadow: 0 0 8px var(--cyan); margin-top: 4px; } .cal17__nav { display: flex; gap: 8px; } .cal17__nav-btn { width: 40px; height: 40px; background: transparent; border: 1px solid var(--purple); color: var(--purple); font-size: 18px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.2s; user-select: none; text-shadow: 0 0 6px var(--purple); } .cal17__nav-btn:hover { border-color: var(--cyan); color: var(--cyan); box-shadow: 0 0 14px var(--cyan), inset 0 0 8px rgba(0,240,255,0.3); text-shadow: 0 0 8px var(--cyan); } /* ── DOW ── */ .cal17__dow { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; margin-bottom: 5px; } .cal17__dw { text-align: center; font-family: 'Orbitron', sans-serif; font-size: 10px; font-weight: 700; letter-spacing: 0.1em; color: var(--cyan); text-shadow: 0 0 6px rgba(0,240,255,0.6); padding: 6px 0; } /* ── Grid ── */ .cal17__grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; } .cal17__cell { aspect-ratio: 1; display: flex; align-items: center; justify-content: center; font-family: 'Orbitron', sans-serif; font-size: 14px; font-weight: 500; color: var(--text); cursor: pointer; border: 1px solid rgba(0,240,255,0.15); background: rgba(0,240,255,0.02); position: relative; transition: all 0.18s; } .cal17__cell:hover { border-color: var(--cyan); color: var(--cyan); box-shadow: 0 0 12px rgba(0,240,255,0.6), inset 0 0 8px rgba(0,240,255,0.2); text-shadow: 0 0 8px var(--cyan); } .cal17__cell.other { color: var(--dim); border-color: rgba(74,90,122,0.15); pointer-events: none; opacity: 0.4; } /* Today — neon cyan box */ .cal17__cell.today { border-color: var(--cyan); color: var(--cyan); text-shadow: 0 0 10px var(--cyan); animation: cal17-pulse-border 2s ease-in-out infinite; } /* Selected — hot pink fill */ .cal17__cell.selected { border-color: var(--pink); background: rgba(255,43,214,0.12); color: var(--pink); text-shadow: 0 0 10px var(--pink); box-shadow: 0 0 16px rgba(255,43,214,0.7), inset 0 0 10px rgba(255,43,214,0.3); } /* event marker */ .cal17__cell .ev { position: absolute; bottom: 4px; width: 5px; height: 5px; border-radius: 50%; } .cal17__cell .ev--p { background: var(--pink); box-shadow: 0 0 6px var(--pink); } .cal17__cell .ev--y { background: var(--yellow); box-shadow: 0 0 6px var(--yellow); } .cal17__cell .ev--c { background: var(--cyan); box-shadow: 0 0 6px var(--cyan); } /* ── Footer readout ── */ .cal17__foot { margin-top: 22px; padding-top: 16px; border-top: 1px solid rgba(0,240,255,0.2); display: flex; gap: 10px; } .cal17__stat { flex: 1; border: 1px solid rgba(166,77,255,0.4); padding: 10px 12px; background: rgba(166,77,255,0.05); } .cal17__stat-val { font-family: 'Orbitron', sans-serif; font-weight: 900; font-size: 22px; color: var(--purple); text-shadow: 0 0 8px var(--purple); line-height: 1; } .cal17__stat-lbl { font-size: 9px; letter-spacing: 0.15em; text-transform: uppercase; color: var(--dim); margin-top: 4px; } .cal17__stat:nth-child(1) .cal17__stat-val { color: var(--cyan); text-shadow: 0 0 8px var(--cyan); } .cal17__stat:nth-child(3) .cal17__stat-val { color: var(--pink); text-shadow: 0 0 8px var(--pink); } @media (max-width: 480px) { .cal17__title { font-size: 22px; } .cal17__cell { font-size: 12px; } } @media (prefers-reduced-motion: reduce) { .cal17 *, .cal17::before { animation: none !important; } } ``` **JS:** ```js document.querySelectorAll('#cal17Grid .cal17__cell:not(.other)').forEach(cell => { cell.addEventListener('click', function() { document.querySelectorAll('#cal17Grid .cal17__cell').forEach(c => c.classList.remove('selected')); this.classList.add('selected'); }); }); ``` ### 18. Brutalist Bold Typography Calendar **Type:** CSS + JS **Description:** Neo-brutalism with 5px solid borders, hard offset shadow, zero radius and a slam entrance. Archivo Black 64px month, oversized date numerals, mismatched primary colors, a red NOW tag and bordered event squares, plus clashing solid-color footer stat blocks. **HTML:** ```html
JUNE
2026 // Q2 // WK23
SU
MO
TU
WE
TH
FR
SA
25
26
27
28
29
30
31
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
1
2
3
4
5
12
Events
04
Deadlines
07
Left
``` **CSS:** ```css .cal18, .cal18 *, .cal18 *::before, .cal18 *::after { box-sizing: border-box; margin: 0; padding: 0; } .cal18 ::selection { background: #000; color: #ffe600; } .cal18 { --black: #000000; --paper: #f4f2e9; --yellow: #ffe600; --blue: #2b3fff; --red: #ff2e2e; --green: #00d97e; --pink: #ff6ec7; font-family: 'Space Mono', monospace; background: var(--paper); min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 30px 20px; color: var(--black); } @keyframes cal18-slam { 0% { transform: scale(1.15) rotate(1deg); opacity: 0; } 100% { transform: scale(1) rotate(0); opacity: 1; } } .cal18__wrap { max-width: 760px; width: 100%; border: 5px solid var(--black); background: var(--paper); box-shadow: 12px 12px 0 var(--black); animation: cal18-slam 0.4s cubic-bezier(0.34,1.3,0.64,1) both; } /* ── Header ── */ .cal18__head { display: flex; align-items: stretch; border-bottom: 5px solid var(--black); } .cal18__month { flex: 1; padding: 18px 22px; background: var(--yellow); border-right: 5px solid var(--black); } .cal18__month-name { font-family: 'Archivo Black', sans-serif; font-size: 64px; line-height: 0.85; text-transform: uppercase; letter-spacing: -0.03em; } .cal18__month-year { font-family: 'Space Mono', monospace; font-weight: 700; font-size: 14px; letter-spacing: 0.2em; margin-top: 6px; } .cal18__nav { display: flex; flex-direction: column; } .cal18__nav-btn { flex: 1; width: 64px; background: var(--paper); border: none; border-bottom: 5px solid var(--black); font-family: 'Archivo Black', sans-serif; font-size: 24px; cursor: pointer; transition: background 0.1s; user-select: none; } .cal18__nav-btn:last-child { border-bottom: none; } .cal18__nav-btn:hover { background: var(--blue); color: var(--paper); } /* ── DOW ── */ .cal18__dow { display: grid; grid-template-columns: repeat(7, 1fr); border-bottom: 5px solid var(--black); } .cal18__dw { padding: 8px 0; text-align: center; font-family: 'Archivo Black', sans-serif; font-size: 12px; text-transform: uppercase; border-right: 3px solid var(--black); } .cal18__dw:last-child { border-right: none; } .cal18__dw:first-child, .cal18__dw:last-child { background: var(--black); color: var(--paper); } /* ── Grid ── */ .cal18__grid { display: grid; grid-template-columns: repeat(7, 1fr); } .cal18__cell { aspect-ratio: 1; border-right: 3px solid var(--black); border-bottom: 3px solid var(--black); display: flex; align-items: center; justify-content: center; font-family: 'Archivo Black', sans-serif; font-size: 28px; cursor: pointer; position: relative; transition: all 0.08s; background: var(--paper); } .cal18__cell:nth-child(7n) { border-right: none; } .cal18__cell:nth-last-child(-n+7) { border-bottom: none; } .cal18__cell:hover { background: var(--black); color: var(--paper); transform: scale(1.04); z-index: 2; box-shadow: 4px 4px 0 var(--blue); } .cal18__cell.other { color: #b8b5a8; pointer-events: none; } /* Today — yellow block, oversized */ .cal18__cell.today { background: var(--yellow); font-size: 38px; } .cal18__cell.today::after { content: 'NOW'; position: absolute; top: 5px; right: 5px; font-family: 'Space Mono', monospace; font-size: 8px; font-weight: 700; background: var(--red); color: var(--paper); padding: 1px 4px; } /* Selected — blue invert */ .cal18__cell.selected { background: var(--blue); color: var(--paper); } /* Event corner blocks */ .cal18__cell .ev { position: absolute; bottom: 5px; left: 5px; width: 12px; height: 12px; border: 2px solid var(--black); } .cal18__cell.today .ev, .cal18__cell.selected .ev { border-color: var(--paper); } .cal18__cell .ev--r { background: var(--red); } .cal18__cell .ev--g { background: var(--green); } .cal18__cell .ev--p { background: var(--pink); } /* ── Footer ── */ .cal18__foot { display: grid; grid-template-columns: 1fr 1fr 1fr; border-top: 5px solid var(--black); } .cal18__stat { padding: 16px 18px; border-right: 5px solid var(--black); } .cal18__stat:last-child { border-right: none; } .cal18__stat:nth-child(1) { background: var(--red); color: var(--paper); } .cal18__stat:nth-child(2) { background: var(--green); } .cal18__stat:nth-child(3) { background: var(--pink); } .cal18__stat-val { font-family: 'Archivo Black', sans-serif; font-size: 36px; line-height: 1; } .cal18__stat-lbl { font-family: 'Space Mono', monospace; font-weight: 700; font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; margin-top: 4px; } @media (max-width: 560px) { .cal18__month-name { font-size: 40px; } .cal18__cell { font-size: 18px; } .cal18__cell.today { font-size: 22px; } .cal18__stat-val { font-size: 24px; } } @media (prefers-reduced-motion: reduce) { .cal18 * { animation: none !important; transition: none !important; } } ``` **JS:** ```js document.querySelectorAll('#cal18Grid .cal18__cell:not(.other)').forEach(cell => { cell.addEventListener('click', function() { document.querySelectorAll('#cal18Grid .cal18__cell').forEach(c => c.classList.remove('selected')); this.classList.add('selected'); }); }); ``` ### 19. Interactive 3D Flip Card Calendar **Type:** CSS + JS **Description:** Every day is a true 3D flip card using perspective, preserve-3d and rotateY with hidden backfaces. Event days flip on hover; any day flips and stays on click to reveal an emoji, title and time on the back. Dark indigo theme with a selected-event detail panel. **HTML:** ```html
June 2026
// hover or tap a marked day to flip
SUN
MON
TUE
WED
THU
FRI
SAT
25
26
27
28
29
30
31
1
2
📋
Standup
09:00
3
4
🎉
Holiday
All day
5
6
7
🍷
Dinner
19:30
8
Today
3 events
9
🗓️
Sprint
10:00
10
11
🚀
Launch
14:00
12
13
🎨
Review
16:30
14
15
16
17
📊
Demo Day
11:00
18
19
20
👥
1:1
15:00
21
22
23
24
🏛️
Board
14:00
25
26
27
🔄
Retro
16:00
28
29
30
1
2
3
4
5
11
Product Launch 🚀
Wednesday, June 11 · 2:00 PM · All-hands
High priority 2 hours 28 invited
``` **CSS:** ```css .cal19, .cal19 *, .cal19 *::before, .cal19 *::after { box-sizing: border-box; margin: 0; padding: 0; } .cal19 ::selection { background: #6c5ce7; color: #fff; } .cal19 { --bg1: #1a1a2e; --bg2: #16213e; --card: #232444; --card2: #2c2d52; --border: rgba(255,255,255,0.08); --text: #eef0ff; --text2: #9a9cc4; --text3: #5a5c88; --violet: #6c5ce7; --violet-l:#a29bfe; --pink: #fd79a8; --teal: #00cec9; --amber: #fdcb6e; font-family: 'Sora', sans-serif; background: linear-gradient(135deg, var(--bg1), var(--bg2)); min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 40px 20px; color: var(--text); } @keyframes cal19-in { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } } .cal19__wrap { max-width: 580px; width: 100%; animation: cal19-in 0.55s ease both; } /* ── Header ── */ .cal19__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; padding: 0 4px; } .cal19__title { font-size: 30px; font-weight: 800; letter-spacing: -0.02em; } .cal19__title span { color: var(--violet-l); } .cal19__hint { font-family: 'Spline Sans Mono', monospace; font-size: 11px; color: var(--text3); letter-spacing: 0.05em; margin-top: 3px; } .cal19__nav { display: flex; gap: 8px; } .cal19__nav-btn { width: 40px; height: 40px; border-radius: 12px; background: var(--card); border: 1px solid var(--border); color: var(--text2); font-size: 16px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.2s; user-select: none; } .cal19__nav-btn:hover { background: var(--card2); color: var(--violet-l); border-color: var(--violet); } /* ── DOW ── */ .cal19__dow { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-bottom: 6px; } .cal19__dw { text-align: center; font-family: 'Spline Sans Mono', monospace; font-size: 10px; font-weight: 700; letter-spacing: 0.1em; color: var(--text3); padding: 4px 0; } /* ── Grid of flip cards ── */ .cal19__grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; } /* The flip card mechanism */ .cal19__card3d { aspect-ratio: 1; perspective: 700px; cursor: pointer; } .cal19__card3d.other { pointer-events: none; opacity: 0.25; } .cal19__inner { position: relative; width: 100%; height: 100%; transition: transform 0.6s cubic-bezier(0.34,1.1,0.5,1); transform-style: preserve-3d; } /* Flip when card has .flipped OR on hover (for days with events) */ .cal19__card3d.flipped .cal19__inner { transform: rotateY(180deg); } .cal19__card3d.has-ev:hover .cal19__inner { transform: rotateY(180deg); } .cal19__face { position: absolute; inset: 0; border-radius: 12px; backface-visibility: hidden; -webkit-backface-visibility: hidden; display: flex; align-items: center; justify-content: center; overflow: hidden; } /* Front */ .cal19__front { background: var(--card); border: 1px solid var(--border); font-size: 15px; font-weight: 600; color: var(--text); flex-direction: column; gap: 4px; } .cal19__card3d.weekend .cal19__front { color: var(--violet-l); } .cal19__front .ev-dots { display: flex; gap: 3px; } .cal19__front .ev-dots span { width: 4px; height: 4px; border-radius: 50%; } /* Today front */ .cal19__card3d.today .cal19__front { background: linear-gradient(135deg, var(--violet), var(--pink)); border-color: transparent; color: #fff; font-weight: 800; box-shadow: 0 6px 20px rgba(108,92,231,0.4); } /* Back — reveals event detail */ .cal19__back { transform: rotateY(180deg); background: linear-gradient(135deg, var(--card2), var(--card)); border: 1px solid var(--violet); padding: 6px 4px; flex-direction: column; text-align: center; gap: 2px; } .cal19__back-icon { font-size: 16px; line-height: 1; } .cal19__back-title { font-size: 8px; font-weight: 700; color: var(--violet-l); letter-spacing: 0.02em; line-height: 1.1; } .cal19__back-time { font-family: 'Spline Sans Mono', monospace; font-size: 7px; color: var(--text3); } /* Selected (clicked) keeps flip + glow */ .cal19__card3d.flipped .cal19__back { box-shadow: inset 0 0 16px rgba(108,92,231,0.25); } /* ── Detail readout ── */ .cal19__detail { margin-top: 20px; background: var(--card); border: 1px solid var(--border); border-radius: 18px; padding: 22px; display: flex; align-items: center; gap: 18px; } .cal19__detail-date { font-size: 44px; font-weight: 800; color: var(--violet-l); line-height: 1; flex-shrink: 0; } .cal19__detail-body { flex: 1; } .cal19__detail-title { font-size: 15px; font-weight: 700; } .cal19__detail-sub { font-size: 12px; color: var(--text2); margin-top: 3px; } .cal19__detail-tags { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; } .cal19__tag { font-family: 'Spline Sans Mono', monospace; font-size: 10px; padding: 3px 9px; border-radius: 20px; font-weight: 500; } @media (max-width: 480px) { .cal19__title { font-size: 24px; } .cal19__front { font-size: 13px; } .cal19__detail { flex-direction: column; text-align: center; } } @media (prefers-reduced-motion: reduce) { .cal19 * { animation: none !important; } .cal19__inner { transition: none !important; } } ``` **JS:** ```js document.querySelectorAll('#cal19Grid .cal19__card3d:not(.other)').forEach(card => { card.addEventListener('click', function() { this.classList.toggle('flipped'); }); }); ``` ### 20. Infinite Isometric Dashboard Calendar View **Type:** CSS + JS **Description:** The grid tilts into an architectural floating plane via rotateX/rotateZ with a float loop. Each date is an extruded 3D block with pseudo-element sides; numbers are counter-rotated to stay upright and legible. Today is a tall bobbing tower, with a floating HUD and legend. **HTML:** ```html
June 2026
// isometric.view · q2.dashboard
12
Events
8
Done
4
Due
▦ JUNE.GRID
25
26
27
28
29
30
31
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
1
2
3
4
5
Today (tower)
Selected
Has event
``` **CSS:** ```css .cal20, .cal20 *, .cal20 *::before, .cal20 *::after { box-sizing: border-box; margin: 0; padding: 0; } .cal20 ::selection { background: #5e72e4; color: #fff; } .cal20 { --bg1: #161a2e; --bg2: #1e2440; --tile: #2a3157; --tile-l: #343d6b; --tile-top: #3a4378; --border: rgba(255,255,255,0.1); --text: #eef1ff; --text2: #9aa3d4; --text3: #5a6394; --blue: #5e72e4; --blue-l: #8a9bff; --pink: #f56991; --teal: #2dd4bf; --amber: #fbbf24; font-family: 'Outfit', sans-serif; background: radial-gradient(ellipse at top, var(--bg2), var(--bg1) 80%); min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 40px 20px; color: var(--text); overflow: hidden; } @keyframes cal20-in { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: translateY(0); } } @keyframes cal20-float { 0%, 100% { transform: rotateX(58deg) rotateZ(-45deg) translateZ(0); } 50% { transform: rotateX(58deg) rotateZ(-45deg) translateZ(14px); } } @keyframes cal20-bob { 0%, 100% { transform: translateZ(40px); } 50% { transform: translateZ(58px); } } .cal20__dash { display: grid; grid-template-columns: 1fr; gap: 28px; max-width: 720px; width: 100%; animation: cal20-in 0.7s cubic-bezier(0.22,1,0.36,1) both; } /* ── HUD header (flat, on top) ── */ .cal20__hud { display: flex; align-items: center; justify-content: space-between; background: rgba(42,49,87,0.5); backdrop-filter: blur(10px); border: 1px solid var(--border); border-radius: 16px; padding: 16px 22px; position: relative; z-index: 10; } .cal20__hud-title { font-size: 24px; font-weight: 800; letter-spacing: -0.01em; } .cal20__hud-title span { color: var(--blue-l); } .cal20__hud-sub { font-family: 'IBM Plex Mono', monospace; font-size: 11px; color: var(--text3); margin-top: 2px; } .cal20__hud-stats { display: flex; gap: 22px; } .cal20__hud-stat { text-align: right; } .cal20__hud-stat-v { font-size: 22px; font-weight: 700; line-height: 1; } .cal20__hud-stat-l { font-size: 9px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--text3); margin-top: 3px; } .cal20__hud-stat:nth-child(1) .cal20__hud-stat-v { color: var(--blue-l); } .cal20__hud-stat:nth-child(2) .cal20__hud-stat-v { color: var(--teal); } .cal20__hud-stat:nth-child(3) .cal20__hud-stat-v { color: var(--pink); } /* ── Isometric stage ── */ .cal20__stage { perspective: 1400px; display: flex; justify-content: center; padding: 40px 0 60px; min-height: 480px; } /* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ISOMETRIC TRANSFORM — the core. rotateX(58deg) rotateZ(-45deg) tilts the whole grid into an architectural floating-plane look. ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */ .cal20__plane { transform: rotateX(52deg) rotateZ(-45deg); transform-style: preserve-3d; animation: cal20-float 6s ease-in-out infinite; position: relative; } .cal20__grid { display: grid; grid-template-columns: repeat(7, 56px); grid-auto-rows: 56px; gap: 8px; transform-style: preserve-3d; } /* Each tile is a raised 3D block */ .cal20__tile { position: relative; background: var(--tile-top); border-radius: 6px; display: flex; align-items: center; justify-content: center; font-size: 16px; font-weight: 600; color: var(--text); cursor: pointer; transform-style: preserve-3d; transform: translateZ(14px); transition: transform 0.25s cubic-bezier(0.34,1.4,0.5,1); box-shadow: 0 0 0 1px rgba(255,255,255,0.05); } /* Counter-rotate the number to fully face the camera (undo the plane exactly), lift it above the tile face, and give it a subtle backing so digits read clearly. */ .cal20__tile .num { display: inline-flex; align-items: center; justify-content: center; min-width: 26px; height: 22px; padding: 0 4px; border-radius: 6px; font-size: 15px; font-weight: 700; color: #fff; background: rgba(20,26,46,0.55); transform: translateZ(6px) rotateZ(45deg) rotateX(-52deg); transform-origin: center; pointer-events: none; white-space: nowrap; text-shadow: 0 1px 3px rgba(0,0,0,0.6); will-change: transform; } /* Block sides via pseudo-elements for the extruded depth */ .cal20__tile::before { content: ''; position: absolute; left: 0; bottom: 0; width: 100%; height: 14px; background: var(--tile-l); transform: rotateX(-90deg); transform-origin: bottom; border-radius: 0 0 6px 6px; } .cal20__tile::after { content: ''; position: absolute; right: 0; top: 0; width: 14px; height: 100%; background: var(--tile); transform: rotateY(90deg); transform-origin: right; border-radius: 0 6px 6px 0; } .cal20__tile:hover { transform: translateZ(34px); } .cal20__tile.other { opacity: 0.3; pointer-events: none; transform: translateZ(4px); } /* Today — tall blue tower, bobbing */ .cal20__tile.today { background: var(--blue); color: #fff; font-weight: 800; transform: translateZ(46px); animation: cal20-bob 2.5s ease-in-out infinite; box-shadow: 0 0 24px rgba(94,114,228,0.6); } .cal20__tile.today::before { background: #3a4bbf; height: 46px; } .cal20__tile.today::after { background: #4a5dd0; } /* Selected — pink raised */ .cal20__tile.selected { background: var(--pink); color: #fff; font-weight: 700; transform: translateZ(38px); } .cal20__tile.selected::before { background: #d04a72; height: 38px; } .cal20__tile.selected::after { background: #e05882; } /* Event tiles get a colored top stripe + raised a bit */ .cal20__tile.ev { transform: translateZ(24px); } .cal20__tile.ev::before { height: 24px; } .cal20__tile.ev .marker { position: absolute; top: 4px; right: 4px; width: 6px; height: 6px; border-radius: 50%; transform: translateZ(8px); } .cal20__tile.ev--teal .marker { background: var(--teal); } .cal20__tile.ev--amber .marker { background: var(--amber); } .cal20__tile.ev--pink .marker { background: var(--pink); } /* On the bright today/selected towers, give the number a light frosted backing and lift it higher so it clears the raised tower geometry. */ .cal20__tile.today .num, .cal20__tile.selected .num { background: rgba(255,255,255,0.28); color: #fff; transform: translateZ(30px) rotateZ(45deg) rotateX(-52deg); z-index: 5; } /* Floating month label on the plane */ .cal20__plane-label { position: absolute; top: -54px; left: 0; font-family: 'IBM Plex Mono', monospace; font-size: 13px; font-weight: 600; letter-spacing: 0.1em; color: var(--blue-l); transform: translateZ(60px); white-space: nowrap; } /* ── Footer legend ── */ .cal20__legend { display: flex; justify-content: center; gap: 20px; position: relative; z-index: 10; } .cal20__leg { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--text2); } .cal20__leg-block { width: 14px; height: 14px; border-radius: 3px; } @media (max-width: 600px) { .cal20__grid { grid-template-columns: repeat(7, 38px); grid-auto-rows: 38px; gap: 5px; } .cal20__tile { font-size: 12px; } .cal20__hud-stats { display: none; } } @media (prefers-reduced-motion: reduce) { .cal20 * { animation: none !important; } } ``` **JS:** ```js // Wrap the leading number text of every tile in a counter-rotated .num span // so digits stay upright/legible on the isometric plane (markers untouched). document.querySelectorAll('#cal20Grid .cal20__tile').forEach(tile => { const first = tile.firstChild; if (first && first.nodeType === Node.TEXT_NODE && first.textContent.trim()) { const span = document.createElement('span'); span.className = 'num'; span.textContent = first.textContent.trim(); tile.replaceChild(span, first); } }); document.querySelectorAll('#cal20Grid .cal20__tile:not(.other)').forEach(tile => { tile.addEventListener('click', function() { document.querySelectorAll('#cal20Grid .cal20__tile').forEach(t => t.classList.remove('selected')); this.classList.add('selected'); }); }); ``` ### 21. Fluid Split-Screen Hero Calendar **Type:** CSS + JS **Description:** A landing-page hero split into an immersive seasonal half (sunset gradient, drifting sun orb, layered hills, giant Fraunces month) and a clean date-selector half with pulsing today, event dots, a live selected-day readout and a CTA. Stacks vertically on mobile. **HTML:** ```html
Early Summer
Long days, warm light
June
2026
21°
Avg high
15h
Daylight
12
Events
Pick a date
S
M
T
W
T
F
S
25
26
27
28
29
30
31
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
1
2
3
4
5
08
Sunday, June 8
3 events · Sprint, Launch, Review
Reserve this date →
``` **CSS:** ```css .cal21, .cal21 *, .cal21 *::before, .cal21 *::after { box-sizing: border-box; margin: 0; padding: 0; } .cal21 ::selection { background: #e8643c; color: #fff; } .cal21 { --cream: #f6f1e9; --ink: #2a2520; --ink2: #6e665a; --ink3: #b5ad9e; --hair: #e4ddd0; --sun: #e8643c; --sun-d: #c44e2c; --leaf: #4a7c59; --sky: #f3a953; font-family: 'Manrope', sans-serif; background: var(--cream); min-height: 100vh; display: flex; align-items: center; justify-content: center; color: var(--ink); } @keyframes cal21-in { from { opacity: 0; } to { opacity: 1; } } @keyframes cal21-slide-left { from { opacity: 0; transform: translateX(-30px); } to { opacity: 1; transform: translateX(0); } } @keyframes cal21-slide-right { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: translateX(0); } } @keyframes cal21-sun-drift { 0%, 100% { transform: translate(0,0) scale(1); } 50% { transform: translate(-20px, 16px) scale(1.05); } } @keyframes cal21-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(232,100,60,0.4); } 50% { box-shadow: 0 0 0 7px rgba(232,100,60,0); } } .cal21__hero { display: grid; grid-template-columns: 1.1fr 1fr; width: 100%; min-height: 100vh; animation: cal21-in 0.6s ease both; } /* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ LEFT — immersive seasonal panel ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */ .cal21__left { position: relative; overflow: hidden; background: linear-gradient(160deg, #f3a953 0%, #e8643c 55%, #c44e2c 100%); display: flex; flex-direction: column; justify-content: space-between; padding: 56px 52px; color: var(--cream); } /* Big sun orb */ .cal21__left::before { content: ''; position: absolute; top: 12%; right: -10%; width: 380px; height: 380px; border-radius: 50%; background: radial-gradient(circle, rgba(255,236,200,0.9) 0%, rgba(248,200,120,0.5) 45%, transparent 70%); animation: cal21-sun-drift 10s ease-in-out infinite; } /* Layered hill silhouettes */ .cal21__hills { position: absolute; bottom: 0; left: 0; right: 0; height: 45%; pointer-events: none; } .cal21__hill { position: absolute; bottom: 0; left: -10%; width: 120%; border-radius: 50% 50% 0 0 / 100% 100% 0 0; } .cal21__hill--1 { height: 70%; background: rgba(74,124,89,0.4); } .cal21__hill--2 { height: 50%; background: rgba(58,98,70,0.5); left: 20%; width: 100%; } .cal21__hill--3 { height: 32%; background: rgba(42,72,52,0.55); left: -20%; } .cal21__left-top { position: relative; z-index: 2; } .cal21__eyebrow { font-size: 12px; font-weight: 600; letter-spacing: 0.3em; text-transform: uppercase; opacity: 0.85; } .cal21__left-meta { font-family: 'Fraunces', serif; font-style: italic; font-size: 18px; margin-top: 8px; opacity: 0.9; } .cal21__bigmonth { position: relative; z-index: 2; } .cal21__bigmonth-name { font-family: 'Fraunces', serif; font-weight: 300; font-size: 110px; line-height: 0.82; letter-spacing: -0.02em; } .cal21__bigmonth-year { font-family: 'Fraunces', serif; font-size: 28px; font-weight: 300; opacity: 0.8; margin-top: 4px; } .cal21__left-foot { position: relative; z-index: 2; display: flex; gap: 28px; } .cal21__lf-stat {} .cal21__lf-num { font-family: 'Fraunces', serif; font-size: 32px; font-weight: 600; line-height: 1; } .cal21__lf-lbl { font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; opacity: 0.8; margin-top: 3px; } /* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ RIGHT — minimalist date selector ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */ .cal21__right { display: flex; flex-direction: column; justify-content: center; padding: 56px 52px; background: var(--cream); animation: cal21-slide-right 0.6s ease 0.1s both; } .cal21__right-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 32px; } .cal21__right-title { font-family: 'Fraunces', serif; font-size: 22px; font-weight: 600; } .cal21__right-nav { display: flex; gap: 6px; } .cal21__rn-btn { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--hair); background: transparent; display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--ink2); font-size: 15px; transition: all 0.2s; user-select: none; } .cal21__rn-btn:hover { background: var(--sun); color: #fff; border-color: var(--sun); } .cal21__dow { display: grid; grid-template-columns: repeat(7, 1fr); margin-bottom: 10px; } .cal21__dw { text-align: center; font-size: 11px; font-weight: 700; letter-spacing: 0.06em; color: var(--ink3); text-transform: uppercase; } .cal21__grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; } .cal21__cell { aspect-ratio: 1; display: flex; align-items: center; justify-content: center; border-radius: 14px; font-size: 15px; font-weight: 500; color: var(--ink); cursor: pointer; position: relative; transition: all 0.18s; } .cal21__cell:hover { background: #fff; box-shadow: 0 4px 14px rgba(42,37,32,0.08); } .cal21__cell.other { color: var(--ink3); opacity: 0.4; pointer-events: none; } .cal21__cell.weekend { color: var(--sun-d); } .cal21__cell.today { background: var(--sun); color: #fff; font-weight: 700; animation: cal21-pulse 2.5s ease-in-out infinite; } .cal21__cell.selected:not(.today) { background: var(--ink); color: var(--cream); font-weight: 600; } .cal21__cell .ev { position: absolute; bottom: 6px; width: 4px; height: 4px; border-radius: 50%; background: var(--leaf); } .cal21__cell.today .ev, .cal21__cell.selected .ev { background: currentColor; } /* Selected day readout */ .cal21__readout { margin-top: 36px; padding-top: 24px; border-top: 1px solid var(--hair); display: flex; align-items: center; gap: 18px; } .cal21__readout-date { font-family: 'Fraunces', serif; font-size: 50px; font-weight: 300; color: var(--sun); line-height: 1; } .cal21__readout-body {} .cal21__readout-title { font-size: 15px; font-weight: 700; } .cal21__readout-sub { font-size: 13px; color: var(--ink2); margin-top: 3px; } .cal21__cta { margin-top: 28px; padding: 16px; border-radius: 16px; background: var(--ink); color: var(--cream); text-align: center; font-size: 14px; font-weight: 600; letter-spacing: 0.03em; cursor: pointer; transition: all 0.2s; user-select: none; } .cal21__cta:hover { background: var(--sun); } /* ── Responsive: stack ── */ @media (max-width: 860px) { .cal21__hero { grid-template-columns: 1fr; min-height: auto; } .cal21__left { padding: 44px 36px; min-height: 360px; gap: 40px; } .cal21__bigmonth-name { font-size: 72px; } .cal21__right { padding: 40px 36px; } } @media (max-width: 480px) { .cal21__left { padding: 32px 24px; } .cal21__bigmonth-name { font-size: 56px; } .cal21__right { padding: 32px 24px; } } @media (prefers-reduced-motion: reduce) { .cal21 *, .cal21__left::before { animation: none !important; } } ``` **JS:** ```js const days = ['Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday']; // Jun 1 2026 = Monday; cell index 7 = Jun 1 document.querySelectorAll('#cal21Grid .cal21__cell:not(.other)').forEach(cell => { cell.addEventListener('click', function() { document.querySelectorAll('#cal21Grid .cal21__cell').forEach(c => c.classList.remove('selected')); this.classList.add('selected'); const n = parseInt(this.textContent); document.getElementById('cal21RoDate').textContent = String(n).padStart(2,'0'); const dow = days[(1 + (n-1)) % 7]; document.getElementById('cal21RoTitle').textContent = dow + ', June ' + n; }); }); ``` ### 22. Micro-Interactions & Liquid Bubble Date Hover **Type:** CSS + JS **Description:** A plain-looking grid whose magic is the hover. A goo layer with filter:blur+contrast and screen blending fuses circles into a liquid metaball; each cell's hidden blob springs to scale under the cursor and melts away. Today wobbles a morphing gradient blob. **HTML:** ```html
June 2026
// hover the dates — liquid goo
S
M
T
W
T
F
S
25
26
27
28
29
30
31
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
1
2
3
4
5
Sunday, June 8
3 events · sprint, launch, review
``` **CSS:** ```css .cal22, .cal22 *, .cal22 *::before, .cal22 *::after { box-sizing: border-box; margin: 0; padding: 0; } .cal22 ::selection { background: #ff5470; color: #fff; } .cal22 { --bg: #0f0e17; --surface:#16151f; --text: #fffffe; --text2: #a7a9be; --text3: #5a5b70; --blob: #ff5470; --blob2: #ff8906; --accent: #e53170; --soft: #2e2f3e; font-family: 'Bricolage Grotesque', sans-serif; background: var(--bg); min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 40px 20px; color: var(--text); } @keyframes cal22-in { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } } @keyframes cal22-wobble { 0%, 100% { border-radius: 42% 58% 56% 44% / 48% 50% 50% 52%; } 50% { border-radius: 56% 44% 48% 52% / 56% 44% 56% 44%; } } .cal22__card { max-width: 460px; width: 100%; background: var(--surface); border-radius: 28px; padding: 32px; box-shadow: 0 30px 70px rgba(0,0,0,0.5); animation: cal22-in 0.5s ease both; position: relative; } /* ── Header ── */ .cal22__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 28px; } .cal22__title { font-size: 32px; font-weight: 800; letter-spacing: -0.02em; } .cal22__title span { background: linear-gradient(135deg, var(--blob), var(--blob2)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; } .cal22__hint { font-family: 'DM Mono', monospace; font-size: 11px; color: var(--text3); margin-top: 3px; } .cal22__nav { display: flex; gap: 8px; } .cal22__nav-btn { width: 40px; height: 40px; border-radius: 50%; background: var(--soft); border: none; color: var(--text2); font-size: 16px; cursor: pointer; transition: all 0.2s; display: flex; align-items: center; justify-content: center; user-select: none; } .cal22__nav-btn:hover { background: var(--blob); color: #fff; } /* ── DOW ── */ .cal22__dow { display: grid; grid-template-columns: repeat(7, 1fr); margin-bottom: 8px; } .cal22__dw { text-align: center; font-family: 'DM Mono', monospace; font-size: 11px; font-weight: 500; color: var(--text3); padding: 4px 0; } /* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ GOOEY LIQUID LAYER — the core trick. A blurred + high-contrast filter on the blob container fuses overlapping circles into a single liquid mass (metaball effect). ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */ .cal22__gridwrap { position: relative; } /* Goo layer sits behind the numbers */ .cal22__goo { position: absolute; inset: 0; filter: blur(8px) contrast(22); pointer-events: none; z-index: 1; mix-blend-mode: screen; } /* Each blob is a small circle that grows + wobbles on its cell's hover */ .cal22__blob { position: absolute; width: 44px; height: 44px; border-radius: 50%; background: var(--blob); transform: translate(-50%, -50%) scale(0); transition: transform 0.35s cubic-bezier(0.34,1.56,0.64,1); will-change: transform; } .cal22__grid { position: relative; z-index: 2; display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; } .cal22__cell { aspect-ratio: 1; display: flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 600; color: var(--text); cursor: pointer; position: relative; border-radius: 50%; transition: color 0.2s; } .cal22__cell:hover { color: #fff; } .cal22__cell.other { color: var(--text3); opacity: 0.4; pointer-events: none; } /* Today — persistent gradient blob underneath via box-shadow ring */ .cal22__cell.today { color: #fff; font-weight: 800; } .cal22__cell.today::after { content: ''; position: absolute; inset: 6px; border-radius: 50%; background: linear-gradient(135deg, var(--blob), var(--blob2)); z-index: -1; animation: cal22-wobble 4s ease-in-out infinite; } .cal22__cell.selected { color: #fff; font-weight: 800; } .cal22__cell.selected::before { content: ''; position: absolute; inset: 5px; border-radius: 50%; border: 2px solid var(--blob2); z-index: -1; } /* event dot */ .cal22__cell .ev { position: absolute; bottom: 8px; width: 4px; height: 4px; border-radius: 50%; background: var(--blob2); } .cal22__cell.today .ev, .cal22__cell:hover .ev { background: #fff; } /* ── Footer readout ── */ .cal22__foot { margin-top: 26px; padding: 16px 18px; border-radius: 18px; background: var(--bg); display: flex; align-items: center; gap: 14px; } .cal22__foot-blob { width: 44px; height: 44px; border-radius: 42% 58% 56% 44% / 48% 50% 50% 52%; background: linear-gradient(135deg, var(--blob), var(--blob2)); flex-shrink: 0; animation: cal22-wobble 4s ease-in-out infinite; } .cal22__foot-body {} .cal22__foot-title { font-size: 14px; font-weight: 600; } .cal22__foot-sub { font-family: 'DM Mono', monospace; font-size: 11px; color: var(--text3); margin-top: 2px; } @media (prefers-reduced-motion: reduce) { .cal22 * { animation: none !important; } } ``` **JS:** ```js (() => { const grid = document.getElementById('cal22Grid'); const goo = document.getElementById('cal22Goo'); const cells = grid.querySelectorAll('.cal22__cell:not(.other)'); // create one blob per real cell, track to its position cells.forEach(cell => { const blob = document.createElement('div'); blob.className = 'cal22__blob'; goo.appendChild(blob); function place() { const gr = grid.getBoundingClientRect(); const cr = cell.getBoundingClientRect(); blob.style.left = (cr.left - gr.left + cr.width/2) + 'px'; blob.style.top = (cr.top - gr.top + cr.height/2) + 'px'; } cell.addEventListener('mouseenter', () => { place(); blob.style.transform = 'translate(-50%,-50%) scale(1.15)'; }); cell.addEventListener('mouseleave', () => { blob.style.transform = 'translate(-50%,-50%) scale(0)'; }); cell.addEventListener('click', function() { cells.forEach(c => c.classList.remove('selected')); this.classList.add('selected'); }); }); })(); ``` ### 23. Bento Grid Style Booking System **Type:** CSS + JS **Description:** Apple-style asymmetric bento on a 7-column grid. Special cells break uniformity: a 2x2 gradient today hero with event chips, 2x1 event cells with icon+title+time, and a 1x2 cell holding an animated SVG progress ring. Cells lift and shadow on hover. **HTML:** ```html
June 2026
Bento booking · 4 of 7 days available
8
Sunday · Today
3 events
10:00 Sprint
14:00 Launch
9
Mon
10
Tue
11
Wed
🚀
Product Launch
2:00 PM · All-hands
12
Thu
13
Fri
70%
14
Sat
15
Sun
16
Mon
17
Tue
📊
Demo Day + Q2 Report
11:00 AM · 2 sessions
18
Wed
``` **CSS:** ```css .cal23, .cal23 *, .cal23 *::before, .cal23 *::after { box-sizing: border-box; margin: 0; padding: 0; } .cal23 ::selection { background: #111; color: #fff; } .cal23 { --bg: #ececef; --card: #ffffff; --ink: #18181b; --ink2: #71717a; --ink3: #a1a1aa; --line: #e4e4e7; --accent: #4f46e5; --accent2:#06b6d4; --green: #10b981; --amber: #f59e0b; --rose: #f43f5e; font-family: 'Geist', -apple-system, sans-serif; background: var(--bg); min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 32px 20px; color: var(--ink); } @keyframes cal23-in { from { opacity: 0; transform: translateY(14px) scale(0.99); } to { opacity: 1; transform: translateY(0) scale(1); } } @keyframes cal23-ring { to { stroke-dashoffset: var(--target); } } .cal23__wrap { max-width: 720px; width: 100%; animation: cal23-in 0.5s ease both; } /* ── Header ── */ .cal23__head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 16px; padding: 0 2px; } .cal23__title { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; } .cal23__title span { color: var(--ink3); font-weight: 500; } .cal23__sub { font-size: 13px; color: var(--ink2); margin-top: 2px; } .cal23__nav { display: flex; gap: 6px; } .cal23__nav-btn { width: 38px; height: 38px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); cursor: pointer; color: var(--ink2); font-size: 15px; display: flex; align-items: center; justify-content: center; transition: all 0.18s; user-select: none; } .cal23__nav-btn:hover { border-color: var(--ink); color: var(--ink); } /* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ BENTO GRID — asymmetric spans. 7 base columns; special cells span 2×2 / 2×1 / 1×2 for the bento look. ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */ .cal23__bento { display: grid; grid-template-columns: repeat(7, 1fr); grid-auto-rows: 78px; gap: 8px; } .cal23__cell { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 12px; cursor: pointer; transition: all 0.18s; display: flex; flex-direction: column; position: relative; overflow: hidden; } .cal23__cell:hover { border-color: var(--ink); transform: translateY(-2px); box-shadow: 0 8px 22px rgba(24,24,27,0.1); } .cal23__cell.other { background: transparent; border-color: transparent; pointer-events: none; } .cal23__cell.other .cal23__n { color: var(--ink3); opacity: 0.5; } .cal23__n { font-size: 16px; font-weight: 600; line-height: 1; } .cal23__cell .dow-mini { font-size: 10px; color: var(--ink3); font-weight: 500; margin-top: 2px; } /* span helpers */ .cal23__cell--2x2 { grid-column: span 2; grid-row: span 2; } .cal23__cell--2x1 { grid-column: span 2; } .cal23__cell--1x2 { grid-row: span 2; } /* ── TODAY: big 2×2 hero cell ── */ .cal23__cell--today { grid-column: span 2; grid-row: span 2; background: linear-gradient(135deg, var(--accent), #7c3aed); border-color: transparent; color: #fff; padding: 16px; justify-content: space-between; } .cal23__cell--today:hover { box-shadow: 0 14px 32px rgba(79,70,229,0.4); } .cal23__today-top { display: flex; align-items: flex-start; justify-content: space-between; } .cal23__today-n { font-size: 40px; font-weight: 800; line-height: 0.9; } .cal23__today-badge { font-size: 10px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; background: rgba(255,255,255,0.2); padding: 4px 9px; border-radius: 20px; } .cal23__today-label { font-size: 12px; opacity: 0.8; } .cal23__today-events { display: flex; gap: 5px; margin-top: 8px; } .cal23__today-ev { flex: 1; background: rgba(255,255,255,0.16); border-radius: 8px; padding: 6px 8px; font-size: 10px; font-weight: 500; } /* progress ring cell (an event with a goal) */ .cal23__ring-wrap { display: flex; align-items: center; justify-content: center; flex: 1; } .cal23__ring { transform: rotate(-90deg); } .cal23__ring-bg { fill: none; stroke: var(--line); stroke-width: 6; } .cal23__ring-fg { fill: none; stroke-width: 6; stroke-linecap: round; stroke-dasharray: 150.8; animation: cal23-ring 1.1s cubic-bezier(0.22,1,0.36,1) forwards; } .cal23__ring-label { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); font-size: 13px; font-weight: 700; } /* event-rich 2x1 cell */ .cal23__cell--event { justify-content: space-between; } .cal23__cell--event .cal23__ev-row { display: flex; align-items: center; gap: 6px; margin-top: auto; } .cal23__ev-icon { width: 24px; height: 24px; border-radius: 7px; display: flex; align-items: center; justify-content: center; font-size: 13px; flex-shrink: 0; } .cal23__ev-text { min-width: 0; } .cal23__ev-name { font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .cal23__ev-time { font-size: 10px; color: var(--ink2); } /* selected */ .cal23__cell.selected { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); } /* mini event dots */ .cal23__dots { display: flex; gap: 3px; margin-top: auto; } .cal23__dots span { width: 5px; height: 5px; border-radius: 50%; } /* corner pill for weekend */ .cal23__cell.weekend .cal23__n { color: var(--accent); } @media (max-width: 600px) { .cal23__bento { grid-auto-rows: 64px; gap: 6px; } .cal23__today-n { font-size: 30px; } .cal23__title { font-size: 22px; } } @media (prefers-reduced-motion: reduce) { .cal23 * { animation: none !important; transition: none !important; } } ``` **JS:** ```js document.querySelectorAll('#cal23Bento .cal23__cell:not(.other):not(.cal23__cell--today)').forEach(cell => { cell.addEventListener('click', function() { document.querySelectorAll('#cal23Bento .cal23__cell').forEach(c => c.classList.remove('selected')); this.classList.add('selected'); }); }); ``` ### 24. Vintage Skeuomorphic / Paper-Torn Tear-off Design **Type:** CSS + JS **Description:** A realistic desk tear-off pad on a wood-grain wall. Metal binding with 3D rings, paper depth via gradients and ruled lines, a stacked-page look, and a jagged torn bottom edge built with CSS mask. Giant serif date, typewriter weekday, and a tear-off page-rip animation. **HTML:** ```html
June
2026
8
Sunday
Sprint 10AM
Launch 2PM
Review 4PM
— day 159 of 365 · 207 remaining —
``` **CSS:** ```css .cal24, .cal24 *, .cal24 *::before, .cal24 *::after { box-sizing: border-box; margin: 0; padding: 0; } .cal24 ::selection { background: #b23a2e; color: #fff; } .cal24 { --wood: #6b4f3a; --wood2: #543d2c; --paper: #f5f0e3; --paper2: #ebe3d0; --ink: #2b2620; --red: #b23a2e; --red-d: #8a2c22; --gold: #b8923f; --shadow: rgba(0,0,0,0.3); font-family: 'Oswald', sans-serif; background: repeating-linear-gradient(90deg, var(--wood) 0px, var(--wood) 38px, var(--wood2) 38px, var(--wood2) 40px), var(--wood); min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 40px 20px; color: var(--ink); } @keyframes cal24-in { from { opacity: 0; transform: translateY(-20px) rotate(-1deg); } to { opacity: 1; transform: translateY(0) rotate(0); } } @keyframes cal24-tear { 0% { transform: rotate(0) translateY(0); opacity: 1; } 40% { transform: rotate(-6deg) translateY(8px); } 100% { transform: rotate(-14deg) translateY(420px) translateX(-60px); opacity: 0; } } @keyframes cal24-flutter { 0%, 100% { transform: rotate(0deg); } 50% { transform: rotate(0.6deg); } } .cal24__pad { position: relative; width: 340px; animation: cal24-in 0.6s cubic-bezier(0.34,1.3,0.64,1) both; } /* The metal binding at top */ .cal24__binding { position: relative; height: 34px; background: linear-gradient(180deg, #c9c9cf 0%, #8e8e96 50%, #6a6a72 100%); border-radius: 8px 8px 0 0; box-shadow: inset 0 2px 3px rgba(255,255,255,0.5), 0 3px 6px var(--shadow); display: flex; justify-content: space-around; align-items: flex-end; padding: 0 24px 0; z-index: 5; } /* binding rings */ .cal24__ring { width: 14px; height: 26px; background: linear-gradient(180deg, #5a5a62, #2e2e34); border-radius: 7px; margin-bottom: -13px; box-shadow: inset 0 1px 1px rgba(255,255,255,0.3), 0 2px 3px rgba(0,0,0,0.4); position: relative; z-index: 6; } /* Stacked pages behind (depth) */ .cal24__stack { position: relative; } .cal24__stack::before, .cal24__stack::after { content: ''; position: absolute; left: 4px; right: 4px; background: var(--paper2); border-radius: 0 0 3px 3px; } .cal24__stack::before { top: 6px; bottom: -6px; box-shadow: 0 6px 10px var(--shadow); } .cal24__stack::after { top: 3px; bottom: -3px; background: #f0ead9; } /* ── The top (current) page ── */ .cal24__page { position: relative; z-index: 3; background: var(--paper); background-image: radial-gradient(circle at 50% 0%, rgba(255,255,255,0.6), transparent 60%), repeating-linear-gradient(0deg, transparent 0 27px, rgba(43,38,32,0.04) 27px 28px); padding: 18px 24px 0; box-shadow: 0 4px 8px rgba(0,0,0,0.15); animation: cal24-flutter 5s ease-in-out infinite; /* Torn bottom edge via mask */ -webkit-mask: linear-gradient(#000 0 0) top/100% calc(100% - 14px) no-repeat, radial-gradient(circle at 8px -2px, transparent 7px, #000 8px) bottom left/16px 14px repeat-x; mask: linear-gradient(#000 0 0) top/100% calc(100% - 14px) no-repeat, radial-gradient(circle at 8px -2px, transparent 7px, #000 8px) bottom left/16px 14px repeat-x; padding-bottom: 22px; } /* Header row: month + year */ .cal24__top { display: flex; align-items: center; justify-content: space-between; border-bottom: 2px solid var(--ink); padding-bottom: 8px; } .cal24__month { font-family: 'Oswald', sans-serif; font-weight: 700; font-size: 26px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--red); } .cal24__year { font-family: 'Special Elite', monospace; font-size: 15px; color: var(--ink); } /* The giant date numeral */ .cal24__bignum { font-family: 'Playfair Display', serif; font-weight: 900; font-size: 150px; line-height: 0.9; text-align: center; color: var(--ink); margin: 6px 0 -4px; text-shadow: 1px 1px 0 rgba(255,255,255,0.6), 3px 3px 5px rgba(0,0,0,0.12); } .cal24__weekday { text-align: center; font-family: 'Special Elite', monospace; font-size: 20px; letter-spacing: 0.3em; text-transform: uppercase; color: var(--red); padding-left: 0.3em; } .cal24__note { text-align: center; font-family: 'Special Elite', monospace; font-size: 11px; color: var(--ink); opacity: 0.6; margin-top: 8px; letter-spacing: 0.05em; } /* tiny event stamps */ .cal24__stamps { display: flex; justify-content: center; gap: 8px; margin: 12px 0 4px; } .cal24__stamp { font-family: 'Special Elite', monospace; font-size: 9px; text-transform: uppercase; letter-spacing: 0.06em; border: 1px solid var(--red); color: var(--red); padding: 3px 7px; border-radius: 2px; transform: rotate(-2deg); opacity: 0.85; } .cal24__stamp:nth-child(2) { transform: rotate(1.5deg); border-color: var(--gold); color: var(--gold); } .cal24__stamp:nth-child(3) { transform: rotate(-1deg); border-color: var(--ink); color: var(--ink); } /* ── Tear-off button ── */ .cal24__controls { position: relative; z-index: 4; display: flex; gap: 10px; justify-content: center; margin-top: 22px; } .cal24__btn { font-family: 'Oswald', sans-serif; font-weight: 600; font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; padding: 10px 18px; border-radius: 4px; cursor: pointer; border: none; transition: all 0.15s; user-select: none; box-shadow: 0 3px 0 var(--red-d), 0 5px 8px rgba(0,0,0,0.3); background: var(--red); color: var(--paper); } .cal24__btn:active { transform: translateY(3px); box-shadow: 0 0 0 var(--red-d), 0 2px 4px rgba(0,0,0,0.3); } .cal24__btn--ghost { background: var(--paper); color: var(--ink); box-shadow: 0 3px 0 #c9bfa6, 0 5px 8px rgba(0,0,0,0.25); } .cal24__page.tearing { animation: cal24-tear 0.7s ease-in forwards; } @media (max-width: 400px) { .cal24__pad { width: 290px; } .cal24__bignum { font-size: 120px; } } @media (prefers-reduced-motion: reduce) { .cal24 * { animation: none !important; } } ``` **JS:** ```js (() => { const page = document.getElementById('cal24Page'); const num = document.getElementById('cal24Num'); const day = document.getElementById('cal24Day'); const days = ['Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday']; let date = 8; // June 8 = Sunday (index 0) function render() { num.textContent = date; day.textContent = days[(date - 8 + 700) % 7]; } document.getElementById('cal24Tear').addEventListener('click', () => { page.classList.add('tearing'); setTimeout(() => { date = date >= 30 ? 1 : date + 1; render(); page.classList.remove('tearing'); }, 650); }); document.getElementById('cal24Prev').addEventListener('click', () => { date = date <= 1 ? 30 : date - 1; render(); }); })(); ``` ### 25. Vertical Timeline Slipstream Calendar **Type:** CSS + JS **Description:** Dates cascade down a central spine, alternating left and right via a 2-column grid with directional slide-in. Nodes pin to a gradient line; today is a green card with a pulsing node. Each card stacks date, weekday and a dotted event list; collapses to a single rail on mobile. **HTML:** ```html
June 2026
Timeline · this week
Week 23
8 Sun · Today
Sprint Planning · 10:00 Product Launch · 14:00
9 Monday
Design Review · 11:00
10 Tuesday
Free day
11 Wednesday
Board Meeting · 09:00 Team Dinner · 19:30
12 Thursday
1:1 with Sam · 15:00
13 Friday
Retro · 16:00
``` **CSS:** ```css .cal25, .cal25 *, .cal25 *::before, .cal25 *::after { box-sizing: border-box; margin: 0; padding: 0; } .cal25 ::selection { background: #5b8a72; color: #fff; } .cal25 { --bg: #faf8f4; --line: #d9d2c4; --ink: #2a2620; --ink2: #6e665a; --ink3: #a59c8c; --green: #5b8a72; --terra: #c17a52; --gold: #c9a44a; --gold2: #b89344; --card: #ffffff; font-family: 'Inter', sans-serif; background: var(--bg); background-image: radial-gradient(circle at 50% 0%, #fffdf9, #f2ece1); min-height: 100vh; display: flex; justify-content: center; padding: 48px 20px; color: var(--ink); } @keyframes cal25-in { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } } @keyframes cal25-slip-l { from { opacity: 0; transform: translateX(-30px); } to { opacity: 1; transform: translateX(0); } } @keyframes cal25-slip-r { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: translateX(0); } } @keyframes cal25-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(91,138,114,0.4); } 50% { box-shadow: 0 0 0 8px rgba(91,138,114,0); } } .cal25__wrap { max-width: 680px; width: 100%; animation: cal25-in 0.5s ease both; } /* ── Header ── */ .cal25__head { text-align: center; margin-bottom: 40px; } .cal25__title { font-family: 'Fraunces', serif; font-style: italic; font-size: 46px; font-weight: 400; line-height: 1; } .cal25__title b { font-style: normal; font-weight: 600; color: var(--green); } .cal25__sub { font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink3); margin-top: 8px; } /* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ VERTICAL TIMELINE — central line, items alternate left/right via grid. ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */ .cal25__stream { position: relative; padding: 10px 0; } /* the central spine */ .cal25__stream::before { content: ''; position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; background: linear-gradient(180deg, transparent, var(--line) 6%, var(--line) 94%, transparent); transform: translateX(-50%); } .cal25__item { position: relative; display: grid; grid-template-columns: 1fr 1fr; margin-bottom: 14px; } /* node on the spine */ .cal25__node { position: absolute; left: 50%; top: 22px; transform: translateX(-50%); width: 14px; height: 14px; border-radius: 50%; background: var(--card); border: 3px solid var(--ink3); z-index: 3; } /* card */ .cal25__card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; cursor: pointer; transition: all 0.2s; box-shadow: 0 2px 8px rgba(42,38,32,0.05); } .cal25__card:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(42,38,32,0.1); border-color: var(--green); } /* LEFT item: card in col 1, animate from left */ .cal25__item--left .cal25__card { grid-column: 1; margin-right: 32px; text-align: right; animation: cal25-slip-l 0.5s ease both; } /* RIGHT item: card in col 2, animate from right */ .cal25__item--right .cal25__card { grid-column: 2; margin-left: 32px; animation: cal25-slip-r 0.5s ease both; } /* card content */ .cal25__date-row { display: flex; align-items: baseline; gap: 8px; } .cal25__item--left .cal25__date-row { justify-content: flex-end; } .cal25__date-num { font-family: 'Fraunces', serif; font-size: 30px; font-weight: 600; line-height: 1; color: var(--ink); } .cal25__date-dow { font-size: 11px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink3); } .cal25__events { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; } .cal25__item--left .cal25__events { align-items: flex-end; } .cal25__ev { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: var(--ink2); } .cal25__ev-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; } /* Today node + card emphasis */ .cal25__item--today .cal25__node { background: var(--green); border-color: var(--green); width: 18px; height: 18px; animation: cal25-pulse 2.5s ease-in-out infinite; } .cal25__item--today .cal25__card { background: linear-gradient(135deg, var(--green), #4a7560); border-color: transparent; color: #fff; } .cal25__item--today .cal25__date-num { color: #fff; } .cal25__item--today .cal25__date-dow { color: rgba(255,255,255,0.7); } .cal25__item--today .cal25__ev { color: rgba(255,255,255,0.9); } /* selected */ .cal25__card.selected { border-color: var(--terra); box-shadow: 0 0 0 2px var(--terra); } /* month divider chip */ .cal25__divider { position: relative; text-align: center; margin: 8px 0 20px; z-index: 3; } .cal25__divider span { display: inline-block; background: var(--bg); padding: 4px 16px; font-size: 11px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink3); border: 1px solid var(--line); border-radius: 20px; } @media (max-width: 560px) { .cal25__stream::before { left: 20px; } .cal25__item { grid-template-columns: 1fr; } .cal25__node { left: 20px; } .cal25__item--left .cal25__card, .cal25__item--right .cal25__card { grid-column: 1; margin-left: 44px; margin-right: 0; text-align: left; animation: cal25-slip-r 0.5s ease both; } .cal25__item--left .cal25__date-row, .cal25__item--left .cal25__events { justify-content: flex-start; align-items: flex-start; } .cal25__divider { text-align: left; padding-left: 12px; } } @media (prefers-reduced-motion: reduce) { .cal25 * { animation: none !important; } } ``` **JS:** ```js document.querySelectorAll('#cal25Stream .cal25__card').forEach(card => { card.addEventListener('click', function() { document.querySelectorAll('#cal25Stream .cal25__card').forEach(c => c.classList.remove('selected')); this.classList.add('selected'); }); }); ``` ### 26. Kinetic Typography Changing Calendar **Type:** CSS + JS **Description:** Hyper-minimal where the numbers are the layout, built on the Roboto Flex variable font. Cursor distance drives a decaying wave of font-variation-settings (weight, width and scale) so digits swell outward and settle on leave. Today stays heavy in accent lime. **HTML:** ```html
JUNE
2026
Hover across a row — the weights ripple like a wave
Su
Mo
Tu
We
Th
Fr
Sa
25
26
27
28
29
30
31
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
1
2
3
4
5
Sunday 08
3 EVENTS · WEIGHT-WAVE INTERACTION
``` **CSS:** ```css .cal26, .cal26 *, .cal26 *::before, .cal26 *::after { box-sizing: border-box; margin: 0; padding: 0; } .cal26 ::selection { background: #e8ff3d; color: #000; } .cal26 { --bg: #0c0c0c; --text: #f5f5f5; --text2: #6a6a6a; --text3: #333333; --accent: #e8ff3d; font-family: 'Roboto Flex', sans-serif; background: var(--bg); min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 40px 20px; color: var(--text); } @keyframes cal26-in { from { opacity: 0; } to { opacity: 1; } } .cal26__wrap { max-width: 760px; width: 100%; animation: cal26-in 0.6s ease both; } /* ── Header ── */ .cal26__head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 40px; border-bottom: 1px solid var(--text3); padding-bottom: 18px; } .cal26__title { font-variation-settings: 'wght' 800, 'opsz' 100; font-size: 44px; line-height: 0.9; letter-spacing: -0.02em; } .cal26__title em { font-style: normal; color: var(--accent); } .cal26__hint { font-variation-settings: 'wght' 400; font-size: 12px; color: var(--text2); letter-spacing: 0.06em; text-align: right; max-width: 180px; } /* DOW */ .cal26__dow { display: grid; grid-template-columns: repeat(7, 1fr); margin-bottom: 18px; } .cal26__dw { text-align: center; font-variation-settings: 'wght' 500; font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--text2); } /* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ KINETIC TYPE GRID — numbers ARE the layout. Hover drives a weight/width/ scale wave via variable-font settings; neighbours respond at decaying strength through JS-set CSS custom properties. ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */ .cal26__grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 0; } .cal26__cell { aspect-ratio: 1.1; display: flex; align-items: center; justify-content: center; cursor: pointer; position: relative; } .cal26__n { --w: 200; /* weight */ --wd: 100; /* width */ --s: 1; /* scale */ font-variation-settings: 'wght' var(--w), 'wdth' var(--wd), 'opsz' 144; font-size: 34px; color: var(--text); line-height: 1; transform: scale(var(--s)); transition: font-variation-settings 0.35s cubic-bezier(0.22,1,0.36,1), transform 0.35s cubic-bezier(0.22,1,0.36,1), color 0.35s; will-change: font-variation-settings, transform; } .cal26__cell.other .cal26__n { color: var(--text3); } .cal26__cell.other { pointer-events: none; } /* today: persistent heavy + accent */ .cal26__cell.today .cal26__n { --w: 900; --wd: 130; color: var(--accent); } /* selected */ .cal26__cell.selected .cal26__n { --w: 800; color: var(--accent); } .cal26__cell.selected::after { content: ''; position: absolute; bottom: 18%; width: 26px; height: 3px; background: var(--accent); border-radius: 2px; } /* event underline tick */ .cal26__cell.has-ev::before { content: ''; position: absolute; bottom: 22%; width: 5px; height: 5px; border-radius: 50%; background: var(--text2); transition: background 0.3s; } .cal26__cell:hover.has-ev::before, .cal26__cell.today.has-ev::before { background: var(--accent); } /* ── Footer readout ── */ .cal26__foot { margin-top: 36px; border-top: 1px solid var(--text3); padding-top: 20px; display: flex; align-items: baseline; justify-content: space-between; } .cal26__foot-date { font-variation-settings: 'wght' 700, 'wdth' 120; font-size: 26px; } .cal26__foot-date em { font-style: normal; color: var(--accent); } .cal26__foot-meta { font-variation-settings: 'wght' 400; font-size: 12px; color: var(--text2); letter-spacing: 0.08em; } @media (max-width: 560px) { .cal26__title { font-size: 30px; } .cal26__n { font-size: 24px; } .cal26__hint { display: none; } } @media (prefers-reduced-motion: reduce) { .cal26 *, .cal26__n { animation: none !important; transition: color 0.2s !important; } } ``` **JS:** ```js (() => { const grid = document.getElementById('cal26Grid'); const cells = Array.from(grid.querySelectorAll('.cal26__cell')); // map each real cell to its grid index for distance-based falloff cells.forEach((cell, i) => { if (cell.classList.contains('other')) return; cell.addEventListener('mousemove', () => { const col = i % 7, row = Math.floor(i / 7); cells.forEach((c, j) => { if (c.classList.contains('other') || c.classList.contains('today')) return; const cc = j % 7, cr = Math.floor(j / 7); const dist = Math.hypot(cc - col, cr - row); const n = c.querySelector('.cal26__n'); // wave: closer = heavier/wider/bigger const f = Math.max(0, 1 - dist / 2.6); const w = 200 + f * 700; // 200 → 900 const wd = 100 + f * 50; // 100 → 150 const s = 1 + f * 0.35; // 1 → 1.35 n.style.setProperty('--w', w.toFixed(0)); n.style.setProperty('--wd', wd.toFixed(0)); n.style.setProperty('--s', s.toFixed(3)); }); }); }); grid.addEventListener('mouseleave', () => { cells.forEach(c => { if (c.classList.contains('today')) return; const n = c.querySelector('.cal26__n'); n.style.setProperty('--w', '200'); n.style.setProperty('--wd', '100'); n.style.setProperty('--s', '1'); }); }); cells.forEach(cell => { if (cell.classList.contains('other')) return; cell.addEventListener('click', function() { cells.forEach(c => c.classList.remove('selected')); this.classList.add('selected'); }); }); })(); ``` ### 27. Diagonal Slanted Grid Calendar **Type:** CSS + JS **Description:** Aggressive sports/gaming energy: a clip-path banner, week rows skewed with skewX and numbers counter-skewed to stay upright. Today is a red diagonal-split block with a corner flag, event days get skew-corrected underline bars, and footer stat panels match the slant. **HTML:** ```html
June · 2026
Sun
Mon
Tue
Wed
Thu
Fri
Sat
25
26
27
28
29
30
31
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
1
2
3
4
5
12
Events
08
Sessions
07
Days left
``` **CSS:** ```css .cal27, .cal27 *, .cal27 *::before, .cal27 *::after { box-sizing: border-box; margin: 0; padding: 0; } .cal27 ::selection { background: #ff3b30; color: #fff; } .cal27 { --bg: #101216; --bg2: #16191f; --panel: #1d2129; --panel2: #252a34; --text: #f2f4f8; --text2: #8a92a6; --text3: #4a5160; --red: #ff3b30; --lime: #c6ff00; --cyan: #00e0ff; --amber: #ffb300; font-family: 'Saira', sans-serif; background: var(--bg); min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 40px 20px; color: var(--text); overflow: hidden; } /* diagonal stripe background */ .cal27::before { content: ''; position: fixed; inset: -20%; background: repeating-linear-gradient( -22deg, transparent 0, transparent 60px, rgba(255,255,255,0.015) 60px, rgba(255,255,255,0.015) 61px ); pointer-events: none; } @keyframes cal27-in { from { opacity: 0; transform: translateX(-30px) skewX(-3deg); } to { opacity: 1; transform: translateX(0) skewX(0); } } @keyframes cal27-flash { 0%, 100% { opacity: 1; } 50% { opacity: 0.6; } } .cal27__wrap { position: relative; z-index: 1; max-width: 720px; width: 100%; animation: cal27-in 0.5s cubic-bezier(0.22,1,0.36,1) both; } /* ── Header — slanted banner ── */ .cal27__head { display: flex; align-items: center; justify-content: space-between; background: var(--red); padding: 14px 28px; clip-path: polygon(0 0, 100% 0, calc(100% - 22px) 100%, 0 100%); margin-bottom: 4px; } .cal27__title { font-family: 'Saira Condensed', sans-serif; font-weight: 900; font-size: 36px; letter-spacing: 0.02em; text-transform: uppercase; font-style: italic; line-height: 1; color: #fff; } .cal27__nav { display: flex; gap: 6px; } .cal27__nav-btn { width: 38px; height: 38px; background: rgba(0,0,0,0.25); border: none; color: #fff; font-size: 16px; cursor: pointer; clip-path: polygon(0 0, 100% 0, 85% 100%, 0 100%); transition: background 0.15s; user-select: none; } .cal27__nav-btn:hover { background: rgba(0,0,0,0.5); } /* DOW slanted strip */ .cal27__dow { display: grid; grid-template-columns: repeat(7, 1fr); background: var(--panel2); clip-path: polygon(0 0, 100% 0, calc(100% - 14px) 100%, 0 100%); margin-bottom: 8px; } .cal27__dw { text-align: center; font-family: 'Saira Condensed', sans-serif; font-weight: 700; font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text2); padding: 8px 0; transform: skewX(-12deg); } /* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ SLANTED GRID — each row is skewed, numbers counter-skewed to stay upright. Diagonal cut via clip-path + skewX. ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */ .cal27__grid { display: flex; flex-direction: column; gap: 6px; } .cal27__row { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; transform: skewX(-12deg); } .cal27__cell { aspect-ratio: 1.15; background: var(--panel); display: flex; align-items: center; justify-content: center; cursor: pointer; position: relative; transition: all 0.18s; overflow: hidden; border-left: 3px solid transparent; } .cal27__cell:hover { background: var(--panel2); border-left-color: var(--lime); } .cal27__cell.other { background: var(--bg2); pointer-events: none; } /* counter-skew the contents so numbers read upright */ .cal27__n { font-family: 'Saira Condensed', sans-serif; font-weight: 700; font-size: 22px; color: var(--text); transform: skewX(12deg); line-height: 1; } .cal27__cell.other .cal27__n { color: var(--text3); } /* today — red slash block */ .cal27__cell.today { background: linear-gradient(110deg, var(--red) 60%, #d62d23 60%); border-left-color: var(--lime); } .cal27__cell.today .cal27__n { color: #fff; font-weight: 900; font-size: 26px; } .cal27__cell.today::after { content: ''; position: absolute; top: 0; right: 0; border-style: solid; border-width: 0 14px 14px 0; border-color: transparent var(--lime) transparent transparent; transform: skewX(12deg); } /* selected */ .cal27__cell.selected { background: var(--panel2); border-left-color: var(--cyan); } .cal27__cell.selected .cal27__n { color: var(--cyan); font-weight: 900; } /* event flag — colored corner triangle */ .cal27__cell.ev::before { content: ''; position: absolute; bottom: 5px; left: 8px; width: 16px; height: 3px; transform: skewX(12deg); } .cal27__cell.ev--lime::before { background: var(--lime); } .cal27__cell.ev--cyan::before { background: var(--cyan); } .cal27__cell.ev--amber::before { background: #ffb300; } /* ── Footer slanted stats ── */ .cal27__foot { display: flex; gap: 6px; margin-top: 10px; } .cal27__stat { flex: 1; background: var(--panel); padding: 12px 18px; transform: skewX(-12deg); } .cal27__stat-inner { transform: skewX(12deg); } .cal27__stat-val { font-family: 'Saira Condensed', sans-serif; font-weight: 900; font-size: 28px; line-height: 1; font-style: italic; } .cal27__stat-lbl { font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text2); margin-top: 3px; } .cal27__stat:nth-child(1) .cal27__stat-val { color: var(--red); } .cal27__stat:nth-child(2) .cal27__stat-val { color: var(--lime); } .cal27__stat:nth-child(3) .cal27__stat-val { color: var(--cyan); } @media (max-width: 560px) { .cal27__title { font-size: 26px; } .cal27__n { font-size: 17px; } } @media (prefers-reduced-motion: reduce) { .cal27 * { animation: none !important; transition: none !important; } } ``` **JS:** ```js document.querySelectorAll('#cal27Grid .cal27__cell:not(.other)').forEach(cell => { cell.addEventListener('click', function() { document.querySelectorAll('#cal27Grid .cal27__cell').forEach(c => c.classList.remove('selected')); this.classList.add('selected'); }); }); ``` --- ## 33 CSS Card Hover Effects URL: https://codefronts.com/motion/css-card-hover-effects/ Description: 33 hand-coded CSS card hover effects with live demos — multi-axis 3D tilt with parallax, glowing gradient glassmorphic border, image zoom with content slide-up, front-to-back 3D flip, sibling de-emphasis with :has(), minimalist elevation, plus 27 more (elastic lift, conic-gradient border, holographic foil, neon sign, glitch RGB split, magnetic float, blueprint reveal, aurora drift and more). 26 pure CSS + 7 with a small vanilla JS snippet for cursor tracking. prefers-reduced-motion respected, scoped class names, MIT-licensed. Demo count: 33 ### 01. 3D Tilt & Parallax Card Effects **Type:** CSS + JS **Description:** A premium portfolio card that follows the cursor's orientation in real 3D, with the background, badge, title, and description each pushed onto separate Z-axis depth planes so they shift at different rates as you move. A specular glare tracks the pointer across the surface, making the whole card feel like a physical, light-catching object — ideal for featured work, showcase grids, and hero web-app cards. **HTML:** ```html
Featured Work

Aether
Studio

An award-winning interactive site. Background, type, and badge each ride their own depth plane.

``` **CSS:** ```css @import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500;9..144,900&family=Inter+Tight:wght@400;500;600&display=swap'); .card-01, .card-01 *, .card-01 *::before, .card-01 *::after { box-sizing: border-box; margin: 0; padding: 0; } .card-01 { min-height: 460px; display: grid; place-items: center; background: radial-gradient(circle at 30% 20%, #1f2347, #090a18 65%); font-family: 'Inter Tight', sans-serif; padding: 2rem; perspective: 1300px; } .card-01__card { position: relative; width: 340px; height: 460px; border-radius: 26px; cursor: pointer; transform-style: preserve-3d; transition: transform 0.15s ease-out, box-shadow 0.5s ease; box-shadow: 0 30px 60px rgba(0,0,0,0.5); background: #0e1024; border: 1px solid rgba(255,255,255,0.08); } .card-01__card > * { position: absolute; transition: transform 0.15s ease-out; will-change: transform; } /* split background — far layer */ .card-01__bg { inset: 0; border-radius: 26px; overflow: hidden; background: radial-gradient(circle at 30% 25%, #ff7a59 0 18%, transparent 19%), radial-gradient(circle at 75% 70%, #5b8cff 0 24%, transparent 25%), linear-gradient(160deg, #2a2f63, #11132c); } .card-01__bg::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 50% 40%, transparent, rgba(9,10,24,0.6)); } /* floating glare */ .card-01__glare { inset: 0; border-radius: 26px; background: radial-gradient(circle at var(--card-01-gx,50%) var(--card-01-gy,50%), rgba(255,255,255,0.22), transparent 45%); opacity: 0; transition: opacity 0.3s ease; z-index: 6; pointer-events: none; } .card-01__card:hover .card-01__glare { opacity: 1; } .card-01__tag { top: 2rem; left: 2rem; z-index: 5; font-size: 0.7rem; letter-spacing: 0.22em; text-transform: uppercase; color: #ffd6c4; } .card-01__emblem { top: 2rem; right: 2rem; z-index: 5; width: 46px; height: 46px; border-radius: 14px; background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.25); display: grid; place-items: center; color: #fff; font-weight: 700; backdrop-filter: blur(4px); } .card-01__title { left: 2rem; bottom: 5.4rem; z-index: 5; font-family: 'Fraunces', serif; font-weight: 900; font-size: 3rem; line-height: 0.9; color: #fff; } .card-01__desc { left: 2rem; right: 2rem; bottom: 2rem; z-index: 5; font-size: 0.85rem; line-height: 1.55; color: #c4c8e6; } @media (prefers-reduced-motion: reduce) { .card-01__card, .card-01__card > *, .card-01__glare { transition: none !important; } } ``` **JS:** ```js (() => { const root = document.querySelector('.card-01'); if (!root) return; const card = root.querySelector('[data-card-01="root"]'); if (!card) return; const layers = card.querySelectorAll('[data-depth]'); card.addEventListener('mousemove', (e) => { const r = card.getBoundingClientRect(); const px = (e.clientX - r.left) / r.width; const py = (e.clientY - r.top) / r.height; card.style.transform = `rotateY(${(px - 0.5) * 18}deg) rotateX(${(0.5 - py) * 18}deg)`; layers.forEach((l) => { const d = parseFloat(l.dataset.depth); l.style.transform = `translateZ(${d}px) translate(${(0.5 - px) * d * 0.6}px, ${(0.5 - py) * d * 0.6}px)`; }); card.style.setProperty('--card-01-gx', `${px * 100}%`); card.style.setProperty('--card-01-gy', `${py * 100}%`); }); card.addEventListener('mouseleave', () => { card.style.transform = 'rotateY(0) rotateX(0)'; layers.forEach((l) => { const d = parseFloat(l.dataset.depth); l.style.transform = `translateZ(${d}px)`; }); }); })(); ``` ### 02. Glowing Gradient & Glassmorphic Borders **Type:** CSS + JS **Description:** A dark web3/crypto wallet card on a frosted-glass surface where a vibrant teal-to-violet radial glow blooms behind the blur and a matching neon border lights up, both tracking the cursor around the edges. Built with backdrop-filter and a masked gradient ring, perfect for crypto dashboards, staking widgets, and dark-themed SaaS landing pages that want an energetic, high-tech edge. **HTML:** ```html
// MAINNET

STAKED BALANCE

48.20 Ξ

Self-custody vault with live yield. The neon edge ignites and follows your cursor around the glass.

STAKE MORE →
``` **CSS:** ```css @import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;700&family=Azeret+Mono:wght@400;500&display=swap'); .card-02, .card-02 *, .card-02 *::before, .card-02 *::after { box-sizing: border-box; margin: 0; padding: 0; } .card-02 { min-height: 460px; display: grid; place-items: center; background: radial-gradient(circle at 25% 25%, #1a1140 0 20%, transparent 21%), radial-gradient(circle at 80% 70%, #06343f 0 24%, transparent 25%), #06060e; font-family: 'Space Grotesk', sans-serif; padding: 2rem; } .card-02__card { --card-02-x: 50%; --card-02-y: 50%; position: relative; width: 340px; height: 440px; border-radius: 22px; cursor: pointer; background: rgba(255,255,255,0.05); -webkit-backdrop-filter: blur(14px) saturate(1.3); backdrop-filter: blur(14px) saturate(1.3); border: 1px solid rgba(255,255,255,0.1); overflow: hidden; transition: transform 0.4s ease; } .card-02__card:hover { transform: translateY(-4px); } /* radial glow that tracks the cursor, behind the glass */ .card-02__card::before { content: ""; position: absolute; inset: 0; z-index: 0; background: radial-gradient( 320px circle at var(--card-02-x) var(--card-02-y), rgba(0,240,200,0.35), rgba(120,80,255,0.18) 40%, transparent 65% ); opacity: 0; transition: opacity 0.4s ease; } .card-02__card:hover::before { opacity: 1; } /* neon border that lights up around the cursor */ .card-02__card::after { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1.5px; background: radial-gradient( 260px circle at var(--card-02-x) var(--card-02-y), #00f0c8, #7a50ff 45%, transparent 60% ); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; opacity: 0; transition: opacity 0.4s ease; z-index: 3; pointer-events: none; } .card-02__card:hover::after { opacity: 1; } .card-02__inner { position: relative; z-index: 2; height: 100%; padding: 2.2rem; display: flex; flex-direction: column; justify-content: space-between; color: #e8f7f4; } .card-02__row { display: flex; justify-content: space-between; align-items: center; } .card-02__coin { width: 44px; height: 44px; border-radius: 50%; background: conic-gradient(#00f0c8, #7a50ff, #00f0c8); box-shadow: 0 0 22px rgba(0,240,200,0.4); } .card-02__net { font-family: 'Azeret Mono', monospace; font-size: 0.7rem; letter-spacing: 0.16em; color: #7af0db; border: 1px solid rgba(122,240,219,0.35); padding: 0.3rem 0.7rem; border-radius: 999px; } .card-02__balance { font-family: 'Azeret Mono', monospace; font-size: 0.74rem; letter-spacing: 0.1em; color: #8fa0bd; } .card-02__amount { font-weight: 700; font-size: 2.8rem; line-height: 1; background: linear-gradient(90deg, #00f0c8, #9d7bff); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; } .card-02__desc { font-size: 0.84rem; line-height: 1.6; color: #9aa6bf; } .card-02__btn { text-align: center; font-family: 'Azeret Mono', monospace; font-size: 0.82rem; letter-spacing: 0.08em; padding: 0.85rem; border-radius: 12px; background: rgba(0,240,200,0.12); border: 1px solid rgba(0,240,200,0.3); color: #5ff5d8; } @media (prefers-reduced-motion: reduce) { .card-02__card, .card-02__card::before, .card-02__card::after { transition: none !important; } } ``` **JS:** ```js (() => { const root = document.querySelector('.card-02'); if (!root) return; const c = root.querySelector('[data-card-02="root"]'); if (!c) return; c.addEventListener('mousemove', (e) => { const r = c.getBoundingClientRect(); c.style.setProperty('--card-02-x', `${e.clientX - r.left}px`); c.style.setProperty('--card-02-y', `${e.clientY - r.top}px`); }); })(); ``` ### 03. Image Zoom with Content Reveal / Slide-Up **Type:** Pure CSS **Description:** A clean e-commerce product card showing only the image and a small badge at rest. On hover, the image scales up smoothly inside an overflow:hidden frame while a frosted detail panel — name, price, description, and a "View Product" CTA — slides up from a peeking strip at the bottom. A dependable workhorse for shop grids, blog post cards, and directory listings. **HTML:** ```html
New In

Terra Vase

Hand-thrown stoneware

$68

Matte terracotta with a subtle asymmetric lip. Each piece is wheel-thrown and one of a kind.

View Product
``` **CSS:** ```css @import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500;9..144,600&family=Manrope:wght@400;500;700&display=swap'); .card-03, .card-03 *, .card-03 *::before, .card-03 *::after { box-sizing: border-box; margin: 0; padding: 0; } .card-03 { min-height: 460px; display: grid; place-items: center; background: #f4f1ec; font-family: 'Manrope', sans-serif; padding: 2rem; } .card-03__card { position: relative; width: 330px; height: 440px; border-radius: 18px; cursor: pointer; overflow: hidden; background: #fff; box-shadow: 0 14px 36px rgba(60,50,40,0.12); } /* image area — clips the zoom */ .card-03__media { position: absolute; inset: 0; overflow: hidden; } .card-03__img { position: absolute; inset: 0; transform: scale(1); transition: transform 0.7s cubic-bezier(0.16,1,0.3,1); background: radial-gradient(circle at 35% 30%, #ffe2c2 0 30%, transparent 31%), linear-gradient(150deg, #e8956b, #b6452f 70%); } .card-03__img::after { content: ""; position: absolute; left: 50%; top: 42%; width: 150px; height: 150px; transform: translate(-50%,-50%); border-radius: 50% 50% 48% 52% / 60% 58% 42% 40%; background: linear-gradient(160deg, #6b3526, #3a1a12); box-shadow: 0 20px 40px rgba(0,0,0,0.25); } .card-03__card:hover .card-03__img { transform: scale(1.12); } /* top tag pinned over image */ .card-03__badge { position: absolute; top: 1.2rem; left: 1.2rem; z-index: 3; background: #1a1a1a; color: #fff; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; padding: 0.4rem 0.8rem; border-radius: 999px; } /* sliding panel from bottom */ .card-03__panel { position: absolute; left: 0; right: 0; bottom: 0; z-index: 4; background: rgba(255,255,255,0.96); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); padding: 1.4rem 1.5rem 1.6rem; transform: translateY(calc(100% - 84px)); transition: transform 0.55s cubic-bezier(0.16,1,0.3,1); } .card-03__card:hover .card-03__panel { transform: translateY(0); } .card-03__top { display: flex; justify-content: space-between; align-items: baseline; } .card-03__name { font-family: 'Fraunces', serif; font-weight: 600; font-size: 1.5rem; color: #2a2018; } .card-03__price { font-weight: 700; font-size: 1.25rem; color: #b6452f; } .card-03__sub { font-size: 0.8rem; color: #8a7d70; margin-top: 0.15rem; } .card-03__desc { font-size: 0.84rem; line-height: 1.55; color: #6a5e52; margin: 0.9rem 0 1rem; } .card-03__cta { display: block; text-align: center; background: #1a1a1a; color: #fff; font-weight: 600; font-size: 0.88rem; padding: 0.8rem; border-radius: 10px; } @media (prefers-reduced-motion: reduce) { .card-03__img, .card-03__panel { transition: none !important; } } ``` ### 04. 3D Flip Cards (Front to Back) **Type:** Pure CSS **Description:** A team-member profile card that rotates a full 180° on the Y-axis using perspective and backface-visibility, flipping from a photo-and-name front to a back face with bio and social links. Space-efficient and tactile, it suits team pages, flashcard apps, pricing tiers, and anywhere two sides of information share one footprint. **HTML:** ```html
Lead Designer

Mara
Okonkwo

↻ hover to flip
Lead Designer

Mara Okonkwo

Twelve years shaping product systems for fintech and health. Obsessed with motion, type, and the space between clicks.

``` **CSS:** ```css @import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,600;12..96,800&family=DM+Sans:opsz,wght@9..40,400;9..40,500&display=swap'); .card-04, .card-04 *, .card-04 *::before, .card-04 *::after { box-sizing: border-box; margin: 0; padding: 0; } .card-04 { min-height: 460px; display: grid; place-items: center; background: #eceae3; background-image: radial-gradient(circle at 70% 20%, #f6f4ee, #dcd9cf); font-family: 'DM Sans', sans-serif; padding: 2rem; perspective: 1600px; } .card-04__card { width: 320px; height: 430px; cursor: pointer; position: relative; transform-style: preserve-3d; transition: transform 0.75s cubic-bezier(0.4,0.15,0.2,1); } .card-04__card:hover { transform: rotateY(180deg); } .card-04__face { position: absolute; inset: 0; border-radius: 24px; backface-visibility: hidden; -webkit-backface-visibility: hidden; overflow: hidden; box-shadow: 0 20px 45px rgba(60,55,40,0.2); } /* FRONT — photo + name */ .card-04__front { background: linear-gradient(165deg, #2f9e8f 0%, #145c52 100%); display: flex; flex-direction: column; justify-content: flex-end; padding: 2.2rem; color: #f2fbf9; } .card-04__front::before { content: ""; position: absolute; top: -10%; left: 50%; width: 200px; height: 200px; transform: translateX(-50%); border-radius: 50%; background: radial-gradient(circle at 40% 35%, #d8f5ee, #6cc4b4); box-shadow: 0 20px 50px rgba(0,0,0,0.2); } .card-04__ff-role { font-size: 0.7rem; letter-spacing: 0.22em; text-transform: uppercase; color: #aef0e3; } .card-04__ff-name { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 800; font-size: 2.2rem; line-height: 1; margin-top: 0.3rem; } .card-04__ff-hint { margin-top: 1rem; font-size: 0.74rem; color: #cdeee7; opacity: 0.8; } /* BACK — bio + links */ .card-04__back { background: linear-gradient(165deg, #1c1b1a, #0f0e0d); transform: rotateY(180deg); padding: 2.2rem; display: flex; flex-direction: column; justify-content: space-between; color: #ece9e2; } .card-04__fb-role { font-size: 0.7rem; letter-spacing: 0.22em; text-transform: uppercase; color: #5fd3c0; } .card-04__fb-name { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 800; font-size: 1.7rem; line-height: 1.05; margin: 0.3rem 0 0.9rem; } .card-04__fb-bio { font-size: 0.85rem; line-height: 1.6; color: #b3afa6; } .card-04__fb-links { display: flex; gap: 0.6rem; } .card-04__fb-links a { flex: 1; text-align: center; text-decoration: none; font-size: 0.78rem; font-weight: 500; color: #ece9e2; padding: 0.6rem; border-radius: 10px; border: 1px solid rgba(255,255,255,0.18); transition: background 0.3s ease; } .card-04__fb-links a:hover { background: rgba(95,211,192,0.18); } @media (prefers-reduced-motion: reduce) { .card-04__card, .card-04__fb-links a { transition: none !important; } } ``` ### 05. Parent Blur / Sibling De-emphasis (Focus States) **Type:** Pure CSS **Description:** A pricing grid where hovering one card scales it up and brings it forward, while modern :has() and :not(:hover) selectors automatically blur and dim every neighboring card — pulling all attention to the chosen option with zero JavaScript. Best for pricing tables, minimalist galleries, and any multi-column layout where guiding focus matters. (Note: this demo intentionally renders three cards, since the effect only reads with siblings present.) **HTML:** ```html
Starter
$0/mo
  • 1 project
  • Community support
  • 1 GB storage
Get started
Team
$60/mo
  • Everything in Pro
  • SSO & roles
  • 1 TB storage
Contact sales
``` **CSS:** ```css @import url('https://fonts.googleapis.com/css2?family=Clash+Display:wght@500;600;700&family=Geist:wght@400;500;600&display=swap'); @import url('https://fonts.cdnfonts.com/css/clash-display'); .card-05, .card-05 *, .card-05 *::before, .card-05 *::after { box-sizing: border-box; margin: 0; padding: 0; } .card-05 { min-height: 460px; display: grid; place-items: center; background: #0d0f14; background-image: radial-gradient(circle at 50% 0%, #1a1e29, #0a0b10 70%); font-family: 'Geist', sans-serif; padding: 2rem; } .card-05__grid { display: flex; gap: 1.4rem; } .card-05__card { position: relative; width: 220px; height: 400px; border-radius: 20px; cursor: pointer; padding: 1.8rem; background: #14171f; border: 1px solid rgba(255,255,255,0.07); display: flex; flex-direction: column; color: #e6e9f0; transition: transform 0.4s cubic-bezier(0.16,1,0.3,1), filter 0.4s ease, opacity 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease; } /* hovered card pops forward */ .card-05__grid:has(.card-05__card:hover) .card-05__card:hover { transform: translateY(-12px) scale(1.05); box-shadow: 0 30px 60px rgba(0,0,0,0.5); border-color: rgba(122,160,255,0.5); z-index: 2; } /* every non-hovered sibling dims + blurs */ .card-05__grid:has(.card-05__card:hover) .card-05__card:not(:hover) { filter: blur(3px) saturate(0.6); opacity: 0.45; transform: scale(0.97); } .card-05__plan { font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase; color: #8a93a8; } .card-05__popular { color: #7aa0ff; } .card-05__price { font-family: 'Clash Display', 'Geist', sans-serif; font-weight: 600; font-size: 2.6rem; line-height: 1; margin: 0.6rem 0 0.2rem; } .card-05__price span { font-size: 0.9rem; color: #8a93a8; font-family:'Geist'; } .card-05__feat { list-style: none; margin: 1.4rem 0; display: flex; flex-direction: column; gap: 0.7rem; font-size: 0.82rem; color: #aab2c4; } .card-05__feat li::before { content: "✓ "; color: #7aa0ff; font-weight: 700; } .card-05__btn { margin-top: auto; text-align: center; font-weight: 600; font-size: 0.85rem; padding: 0.8rem; border-radius: 10px; border: 1px solid rgba(255,255,255,0.15); color: #e6e9f0; } .card-05__card--featured .card-05__btn { background: linear-gradient(90deg, #5a7cff, #7a50ff); border: none; color: #fff; } .card-05__card--featured { border-color: rgba(122,160,255,0.3); } @media (max-width: 760px) { .card-05__grid { flex-direction: column; } .card-05__card { width: 280px; height: auto; } } @media (prefers-reduced-motion: reduce) { .card-05__card { transition: none !important; } } ``` ### 06. Minimalist Elevation & Dynamic Shadows **Type:** Pure CSS **Description:** A clean corporate/SaaS documentation card that sits nearly flat at rest, then lifts on hover with a translateY shift and a layered, multi-step box-shadow that expands to mimic a real card rising off the page. A small arrow nudges forward on the CTA for a final touch of polish. Ideal for SaaS marketing sites, docs platforms, and restrained UI systems where subtlety is the point. **HTML:** ```html
Documentation

Quickstart
in 5 minutes

Install the SDK, authenticate, and ship your first request. The card lifts gently off the page as you focus it.

Read the guide
``` **CSS:** ```css @import url('https://fonts.googleapis.com/css2?family=Newsreader:opsz,wght@6..72,400;6..72,500&family=Geist:wght@400;500;600&display=swap'); .card-06, .card-06 *, .card-06 *::before, .card-06 *::after { box-sizing: border-box; margin: 0; padding: 0; } .card-06 { min-height: 460px; display: grid; place-items: center; background: #f7f8fa; font-family: 'Geist', sans-serif; padding: 2rem; } .card-06__card { position: relative; width: 340px; height: 420px; border-radius: 16px; cursor: pointer; background: #ffffff; border: 1px solid #e7e9ee; padding: 2.2rem; display: flex; flex-direction: column; color: #1c2230; box-shadow: 0 1px 2px rgba(20,30,50,0.04), 0 2px 4px rgba(20,30,50,0.03); transition: transform 0.35s cubic-bezier(0.2,0.7,0.2,1), box-shadow 0.35s cubic-bezier(0.2,0.7,0.2,1), border-color 0.35s ease; } .card-06__card:hover { transform: translateY(-8px); border-color: #dfe2e8; box-shadow: 0 2px 4px rgba(20,30,50,0.04), 0 6px 12px rgba(20,30,50,0.06), 0 14px 28px rgba(20,30,50,0.08), 0 28px 56px rgba(20,30,50,0.10); } .card-06__icon { width: 52px; height: 52px; border-radius: 13px; background: linear-gradient(150deg, #3b82f6, #2563eb); display: grid; place-items: center; color: #fff; font-size: 1.5rem; box-shadow: 0 6px 14px rgba(37,99,235,0.3); } .card-06__kicker { margin-top: 1.6rem; font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: #8a94a6; } .card-06__title { font-family: 'Newsreader', serif; font-weight: 500; font-size: 1.9rem; line-height: 1.15; margin-top: 0.4rem; } .card-06__desc { font-size: 0.9rem; line-height: 1.65; color: #5c6678; margin-top: 0.9rem; } .card-06__link { margin-top: auto; display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.88rem; font-weight: 600; color: #2563eb; } .card-06__arrow { transition: transform 0.35s ease; } .card-06__card:hover .card-06__arrow { transform: translateX(4px); } @media (prefers-reduced-motion: reduce) { .card-06__card, .card-06__arrow { transition: none !important; } } ``` ### 07. Elastic Lift **Type:** Pure CSS **Description:** A coffee brand card that springs upward on hover with a bouncy, overshooting cubic-bezier curve and a warm ember glow rising from below. The elastic timing makes the lift feel physical and tactile rather than a flat translate — ideal for product or menu cards where you want a friendly, energetic response. **HTML:** ```html
Seasonal Roast
04

Ember Drip
Coffee Co.

Slow-roasted single origin beans with notes of burnt caramel and stone fruit.

``` **CSS:** ```css @import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,600;9..144,900&family=Spline+Sans+Mono:wght@400;500&display=swap'); .card-07, .card-07 *, .card-07 *::before, .card-07 *::after { box-sizing: border-box; margin: 0; padding: 0; } .card-07 { min-height: 460px; display: grid; place-items: center; background: radial-gradient(circle at 20% 20%, #ffe7c2 0%, transparent 45%), radial-gradient(circle at 80% 80%, #ffc9d4 0%, transparent 45%), #f4ede4; font-family: 'Spline Sans Mono', monospace; padding: 2rem; } .card-07__card { --card-07-bounce: cubic-bezier(0.34, 1.8, 0.4, 1); position: relative; width: 320px; height: 420px; border-radius: 28px; background: linear-gradient(160deg, #1c1410 0%, #3a2618 100%); color: #f4ede4; cursor: pointer; overflow: hidden; transform-origin: bottom center; transition: transform 0.55s var(--card-07-bounce), box-shadow 0.55s ease; box-shadow: 0 10px 25px rgba(60, 30, 10, 0.25); will-change: transform; } .card-07__card::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 50% 120%, #ff8a3c 0%, transparent 60%); opacity: 0; transition: opacity 0.5s ease; } .card-07__card:hover { transform: translateY(-26px) scale(1.04); box-shadow: 0 40px 60px rgba(60, 30, 10, 0.4); } .card-07__card:hover::before { opacity: 0.55; } .card-07__inner { position: relative; z-index: 2; height: 100%; padding: 2.4rem 2rem; display: flex; flex-direction: column; justify-content: space-between; } .card-07__tag { font-size: 0.72rem; letter-spacing: 0.32em; text-transform: uppercase; color: #ffb27a; } .card-07__num { font-family: 'Fraunces', serif; font-size: 5.5rem; font-weight: 900; line-height: 0.85; transition: transform 0.55s var(--card-07-bounce); } .card-07__card:hover .card-07__num { transform: translateY(-6px); } .card-07__title { font-family: 'Fraunces', serif; font-size: 1.9rem; font-weight: 600; line-height: 1.1; } .card-07__desc { font-size: 0.85rem; line-height: 1.6; color: #cdb9a6; max-width: 90%; } .card-07__dot { position: absolute; bottom: 1.8rem; right: 1.8rem; width: 14px; height: 14px; border-radius: 50%; background: #ff8a3c; box-shadow: 0 0 0 0 rgba(255, 138, 60, 0.6); transition: box-shadow 0.5s ease; } .card-07__card:hover .card-07__dot { box-shadow: 0 0 0 10px rgba(255, 138, 60, 0); } @media (prefers-reduced-motion: reduce) { .card-07__card, .card-07__num, .card-07__dot { transition: none !important; } } ``` ### 08. Gradient Border Draw **Type:** Pure CSS **Description:** A dark edge-compute product card where a multi-color conic gradient traces a live circuit around the border on hover, powered by the modern @property animated angle. Great for tech, SaaS, or developer-tool cards that want a premium "powered-on" signal without distracting from the content. **HTML:** ```html
/ Edge Compute

Halo
Runtime

A serverless mesh that traces a live circuit around every active deployment region.

v3.2.0 99.99% SLA
``` **CSS:** ```css @import url('https://fonts.googleapis.com/css2?family=Syne:wght@600;800&family=DM+Mono:wght@400;500&display=swap'); @property --card-08-angle { syntax: ''; initial-value: 0deg; inherits: false; } .card-08, .card-08 *, .card-08 *::before, .card-08 *::after { box-sizing: border-box; margin: 0; padding: 0; } .card-08 { min-height: 460px; display: grid; place-items: center; background: #07080d; font-family: 'DM Mono', monospace; padding: 2rem; } .card-08__card { --card-08-b: 2px; position: relative; width: 340px; height: 420px; border-radius: 20px; background: #0d0f17; cursor: pointer; isolation: isolate; } .card-08__card::before { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: var(--card-08-b); background: conic-gradient( from var(--card-08-angle, 0deg), transparent 0deg, transparent 70deg, #00f0ff 130deg, #7b5cff 200deg, #ff4dd8 250deg, transparent 320deg, transparent 360deg ); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; opacity: 0; transition: opacity 0.4s ease; animation: card-08-spin 4s linear infinite paused; } @keyframes card-08-spin { to { --card-08-angle: 360deg; } } .card-08__card:hover::before { opacity: 1; animation-play-state: running; } .card-08__card::after { content: ""; position: absolute; inset: 0; border-radius: inherit; border: var(--card-08-b) solid rgba(255,255,255,0.06); pointer-events: none; } .card-08__inner { position: relative; z-index: 2; height: 100%; padding: 2.4rem; display: flex; flex-direction: column; justify-content: space-between; color: #e8eaf2; } .card-08__eyebrow { font-size: 0.7rem; letter-spacing: 0.3em; text-transform: uppercase; color: #6f7488; } .card-08__title { font-family: 'Syne', sans-serif; font-weight: 800; font-size: 2.3rem; line-height: 1.05; background: linear-gradient(90deg, #00f0ff, #7b5cff, #ff4dd8); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; } .card-08__desc { font-size: 0.82rem; line-height: 1.65; color: #9499ab; } .card-08__meta { display: flex; justify-content: space-between; font-size: 0.72rem; color: #6f7488; border-top: 1px solid rgba(255,255,255,0.08); padding-top: 1rem; } @media (prefers-reduced-motion: reduce) { .card-08__card::before { animation: none !important; } } ``` ### 09. Stacked Reveal **Type:** Pure CSS **Description:** A vinyl/record card built from three colored layers that fan out and rotate on hover, like spreading a deck of risograph prints. The offset rotations give a playful, editorial collage feel suited to music, art prints, or creative portfolios. **HTML:** ```html
Vinyl Press · 2025

Paper
Cities

Limited run pressing. Three layers of risograph artwork fan out across the gatefold sleeve.

``` **CSS:** ```css @import url('https://fonts.googleapis.com/css2?family=Archivo+Black&family=Archivo:wght@400;600&display=swap'); .card-09, .card-09 *, .card-09 *::before, .card-09 *::after { box-sizing: border-box; margin: 0; padding: 0; } .card-09 { min-height: 460px; display: grid; place-items: center; background: #ebe4d8; background-image: repeating-linear-gradient(45deg, rgba(0,0,0,0.02) 0 12px, transparent 12px 24px); font-family: 'Archivo', sans-serif; padding: 2rem; } .card-09__card { --card-09-shift: 14px; position: relative; width: 320px; height: 410px; cursor: pointer; } .card-09__layer { position: absolute; inset: 0; border-radius: 16px; transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.5s ease; } .card-09__layer.card-09__l1 { background: #d94f30; transform: translate(0, 0) rotate(0deg); z-index: 1; } .card-09__layer.card-09__l2 { background: #f2b138; z-index: 2; } .card-09__layer.card-09__l3 { background: #1a1a1a; z-index: 3; box-shadow: 0 18px 40px rgba(0,0,0,0.25); } .card-09__card:hover .card-09__l1 { transform: translate(calc(var(--card-09-shift) * -2), calc(var(--card-09-shift) * 1.4)) rotate(-6deg); } .card-09__card:hover .card-09__l2 { transform: translate(calc(var(--card-09-shift) * 1.6), calc(var(--card-09-shift) * -0.6)) rotate(5deg); } .card-09__card:hover .card-09__l3 { transform: translateY(-6px); box-shadow: 0 30px 60px rgba(0,0,0,0.35); } .card-09__content { position: relative; z-index: 4; height: 100%; padding: 2.2rem; display: flex; flex-direction: column; justify-content: space-between; color: #f4efe6; pointer-events: none; } .card-09__kicker { font-size: 0.7rem; letter-spacing: 0.28em; text-transform: uppercase; color: #f2b138; } .card-09__title { font-family: 'Archivo Black', sans-serif; font-size: 2.6rem; line-height: 0.95; text-transform: uppercase; } .card-09__desc { font-size: 0.85rem; line-height: 1.6; color: #c9c2b6; } @media (prefers-reduced-motion: reduce) { .card-09__layer { transition: none !important; } } ``` ### 10. Holographic Shimmer **Type:** Pure CSS **Description:** A collectible trading-card treatment with a color-dodge foil sweep, sparkle grain, and a subtle 3D tilt, mimicking light catching a holographic surface. Perfect for NFT/collectible, gaming, or limited-edition product cards that need a "rare item" feel. **HTML:** ```html
// MYTHIC · 001/250

Prism Warden

A foil-stamped collector card that catches light across the full spectrum.

``` **CSS:** ```css @import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@500;800&family=Rajdhani:wght@400;600&display=swap'); .card-10, .card-10 *, .card-10 *::before, .card-10 *::after { box-sizing: border-box; margin: 0; padding: 0; } .card-10 { min-height: 460px; display: grid; place-items: center; background: #0a0a12; font-family: 'Rajdhani', sans-serif; padding: 2rem; perspective: 1200px; } .card-10__card { position: relative; width: 320px; height: 450px; border-radius: 18px; background: linear-gradient(135deg, #14142a, #0c0c1a); cursor: pointer; overflow: hidden; transform-style: preserve-3d; transition: transform 0.4s ease, box-shadow 0.4s ease; box-shadow: 0 12px 30px rgba(0,0,0,0.5); border: 1px solid rgba(255,255,255,0.08); } .card-10__card:hover { transform: rotateX(6deg) rotateY(-6deg); box-shadow: 0 30px 60px rgba(120, 80, 255, 0.3); } .card-10__foil { position: absolute; inset: 0; background: linear-gradient( 115deg, transparent 20%, rgba(255, 0, 200, 0.35) 35%, rgba(0, 255, 220, 0.35) 45%, rgba(255, 230, 0, 0.35) 55%, transparent 70% ); background-size: 250% 250%; background-position: 0% 0%; mix-blend-mode: color-dodge; opacity: 0; transition: opacity 0.4s ease; } .card-10__card:hover .card-10__foil { opacity: 1; animation: card-10-sweep 2.5s linear infinite; } @keyframes card-10-sweep { 0% { background-position: 0% 0%; } 100% { background-position: 200% 200%; } } .card-10__grain { position: absolute; inset: 0; background-image: radial-gradient(rgba(255,255,255,0.4) 0.5px, transparent 0.6px); background-size: 7px 7px; opacity: 0; mix-blend-mode: overlay; transition: opacity 0.4s ease; } .card-10__card:hover .card-10__grain { opacity: 0.5; } .card-10__inner { position: relative; z-index: 3; height: 100%; padding: 2.2rem; display: flex; flex-direction: column; justify-content: space-between; color: #e6e9ff; transform: translateZ(40px); } .card-10__rank { font-family: 'Orbitron', sans-serif; font-size: 0.7rem; letter-spacing: 0.3em; color: #6cf; } .card-10__emblem { width: 90px; height: 90px; border-radius: 50%; background: conic-gradient(#ff00c8, #00ffdc, #ffe600, #ff00c8); margin: 0 auto; filter: blur(0.5px); box-shadow: 0 0 30px rgba(120, 80, 255, 0.5); } .card-10__title { font-family: 'Orbitron', sans-serif; font-weight: 800; font-size: 1.7rem; text-align: center; letter-spacing: 0.05em; } .card-10__desc { font-size: 0.95rem; line-height: 1.4; color: #aab; text-align: center; } @media (prefers-reduced-motion: reduce) { .card-10__foil { animation: none !important; } } ``` ### 11. Curtain Reveal **Type:** Pure CSS **Description:** A theater/event card where two striped velvet curtain halves part on hover to unveil the content behind, complete with a gold seam. Best for performing-arts, cinema, launch, or "reveal" moments where anticipation is part of the message. **HTML:** ```html
— ACT III —

The Velvet
Hour

An evening of chamber music and candlelight. Doors open at eight.

Hover to part the curtain
``` **CSS:** ```css @import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,600;0,800;1,500&family=Cormorant+Garamond:wght@400;500&display=swap'); .card-11, .card-11 *, .card-11 *::before, .card-11 *::after { box-sizing: border-box; margin: 0; padding: 0; } .card-11 { min-height: 460px; display: grid; place-items: center; background: #1a0d12; font-family: 'Cormorant Garamond', serif; padding: 2rem; } .card-11__card { position: relative; width: 340px; height: 460px; border-radius: 6px; overflow: hidden; cursor: pointer; box-shadow: 0 20px 50px rgba(0,0,0,0.5); } .card-11__back { position: absolute; inset: 0; background: linear-gradient(rgba(20,8,12,0.55), rgba(20,8,12,0.75)), radial-gradient(circle at 50% 35%, #5a2030, #1a0d12 70%); display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding: 2.5rem; color: #f3e3d3; } .card-11__num { font-family: 'Playfair Display', serif; font-style: italic; font-size: 1rem; letter-spacing: 0.2em; color: #d4a373; } .card-11__title { font-family: 'Playfair Display', serif; font-weight: 800; font-size: 2.6rem; line-height: 1.05; margin: 0.6rem 0 1rem; } .card-11__desc { font-size: 1.15rem; line-height: 1.5; color: #cbb8a6; } .card-11__half { position: absolute; top: 0; bottom: 0; width: 50%; background: repeating-linear-gradient(90deg, #7a1f2b 0 10px, #5e1620 10px 20px); z-index: 2; transition: transform 0.7s cubic-bezier(0.77, 0, 0.18, 1); box-shadow: inset 0 0 40px rgba(0,0,0,0.4); } .card-11__half.card-11__left { left: 0; transform-origin: left; } .card-11__half.card-11__right { right: 0; transform-origin: right; } .card-11__half::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(0,0,0,0.25)); } .card-11__half.card-11__right::after { background: linear-gradient(270deg, transparent, rgba(0,0,0,0.25)); } .card-11__card:hover .card-11__half.card-11__left { transform: translateX(-100%); } .card-11__card:hover .card-11__half.card-11__right { transform: translateX(100%); } .card-11__seam { position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; background: linear-gradient(#d4a373, #8a5a2b); transform: translateX(-50%); z-index: 3; opacity: 0.8; transition: opacity 0.4s ease; } .card-11__card:hover .card-11__seam { opacity: 0; } .card-11__label { position: absolute; bottom: 1.4rem; left: 0; right: 0; text-align: center; z-index: 4; font-family: 'Playfair Display', serif; font-style: italic; color: #f3e3d3; font-size: 1.1rem; letter-spacing: 0.1em; transition: opacity 0.3s ease; } .card-11__card:hover .card-11__label { opacity: 0; } @media (prefers-reduced-motion: reduce) { .card-11__half, .card-11__seam, .card-11__label { transition: none !important; } } ``` ### 12. Corner Peel **Type:** Pure CSS **Description:** A sticker-style promo card whose top-right corner physically peels back to expose a hidden discount underneath, with a soft drop shadow on the lifted flap. Ideal for coupons, membership perks, or any card with a reward worth "uncovering." **HTML:** ```html
-20%
Members Only

Spring
Harvest Box

Peel the corner to uncover this week's hidden subscriber discount on farm-fresh produce.

``` **CSS:** ```css @import url('https://fonts.googleapis.com/css2?family=Caveat:wght@600&family=Nunito+Sans:opsz,wght@6..12,400;6..12,700&display=swap'); .card-12, .card-12 *, .card-12 *::before, .card-12 *::after { box-sizing: border-box; margin: 0; padding: 0; } .card-12 { min-height: 460px; display: grid; place-items: center; background: #cfe3dd; background-image: radial-gradient(circle at 30% 20%, #e2f0eb, #b9d4cb); font-family: 'Nunito Sans', sans-serif; padding: 2rem; } .card-12__card { position: relative; width: 320px; height: 400px; border-radius: 14px; background: #fffdf7; cursor: pointer; box-shadow: 0 14px 30px rgba(40, 70, 60, 0.18); overflow: hidden; } .card-12__content { position: relative; z-index: 1; height: 100%; padding: 2.2rem; display: flex; flex-direction: column; justify-content: space-between; color: #2a3d36; } .card-12__tag { align-self: flex-start; background: #ff7a59; color: #fff; font-weight: 700; font-size: 0.7rem; letter-spacing: 0.12em; padding: 0.35rem 0.8rem; border-radius: 999px; text-transform: uppercase; } .card-12__title { font-family: 'Caveat', cursive; font-size: 3rem; line-height: 0.95; color: #1f5c4d; } .card-12__desc { font-size: 0.9rem; line-height: 1.6; color: #5a6e66; } .card-12__flap { position: absolute; top: 0; right: 0; width: 0; height: 0; z-index: 4; background: linear-gradient(135deg, #f7efe0, #e7dcc6); transform-origin: top right; transition: width 0.45s cubic-bezier(0.16,1,0.3,1), height 0.45s cubic-bezier(0.16,1,0.3,1), box-shadow 0.45s ease; clip-path: polygon(100% 0, 0 0, 100% 100%); box-shadow: none; } .card-12__secret { position: absolute; top: 0; right: 0; width: 0; height: 0; z-index: 3; background: linear-gradient(135deg, #1f5c4d, #2f8f76); clip-path: polygon(100% 0, 0 0, 100% 100%); transition: width 0.45s cubic-bezier(0.16,1,0.3,1), height 0.45s cubic-bezier(0.16,1,0.3,1); display: grid; place-items: center; } .card-12__secret span { position: absolute; top: 14px; right: 14px; color: #fff; font-weight: 700; font-size: 0.65rem; opacity: 0; transition: opacity 0.3s ease 0.2s; transform: rotate(45deg); } .card-12__card:hover .card-12__secret { width: 110px; height: 110px; } .card-12__card:hover .card-12__secret span { opacity: 1; } .card-12__card:hover .card-12__flap { width: 110px; height: 110px; box-shadow: -6px 6px 14px rgba(0,0,0,0.25); } @media (prefers-reduced-motion: reduce) { .card-12__flap, .card-12__secret, .card-12__secret span { transition: none !important; } } ``` ### 13. Neon Sign **Type:** Pure CSS **Description:** A bar/nightlife card on a dim brick wall where the sign text ignites into a flickering neon glow on hover using layered text-shadows. Suited to restaurants, bars, music venues, and any brand with after-dark personality. **HTML:** ```html
— open till late —

Lola's

cocktail bar

Hover to light the sign. Hand-bent tubes, mezcal flights, and a back room you have to ask about.

``` **CSS:** ```css @import url('https://fonts.googleapis.com/css2?family=Monoton&family=Major+Mono+Display&family=Oxanium:wght@400;600&display=swap'); .card-13, .card-13 *, .card-13 *::before, .card-13 *::after { box-sizing: border-box; margin: 0; padding: 0; } .card-13 { min-height: 460px; display: grid; place-items: center; background: radial-gradient(circle at 50% 120%, #1a1430 0%, #050308 70%); font-family: 'Oxanium', sans-serif; padding: 2rem; } .card-13__card { --card-13-c1: #ff2d95; --card-13-c2: #29f5ff; position: relative; width: 330px; height: 430px; border-radius: 16px; background: #0a0712; cursor: pointer; overflow: hidden; border: 2px solid rgba(255,255,255,0.04); transition: box-shadow 0.5s ease; } .card-13__card:hover { box-shadow: 0 0 50px rgba(255,45,149,0.25); } .card-13__card::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(10,7,18,0.85), rgba(10,7,18,0.92)), repeating-linear-gradient(0deg, #181020 0 24px, transparent 24px 26px), repeating-linear-gradient(90deg, #181020 0 48px, transparent 48px 50px); opacity: 0.7; } .card-13__inner { position: relative; z-index: 2; height: 100%; padding: 2.4rem; display: flex; flex-direction: column; justify-content: space-between; align-items: center; text-align: center; } .card-13__open { font-family: 'Major Mono Display', monospace; font-size: 0.85rem; letter-spacing: 0.3em; color: var(--card-13-c2); opacity: 0.4; transition: all 0.4s ease; } .card-13__card:hover .card-13__open { opacity: 1; text-shadow: 0 0 8px var(--card-13-c2), 0 0 18px var(--card-13-c2); } .card-13__title { font-family: 'Monoton', cursive; font-size: 3.4rem; line-height: 0.95; color: #2a1a35; transition: all 0.5s ease; } .card-13__card:hover .card-13__title { color: var(--card-13-c1); text-shadow: 0 0 6px var(--card-13-c1), 0 0 14px var(--card-13-c1), 0 0 30px var(--card-13-c1), 0 0 60px var(--card-13-c1); animation: card-13-flicker 3s infinite; } @keyframes card-13-flicker { 0%, 18%, 22%, 25%, 53%, 57%, 100% { text-shadow: 0 0 6px var(--card-13-c1), 0 0 14px var(--card-13-c1), 0 0 30px var(--card-13-c1), 0 0 60px var(--card-13-c1); opacity: 1; } 20%, 24%, 55% { text-shadow: none; opacity: 0.6; } } .card-13__desc { font-size: 0.85rem; line-height: 1.6; color: #8a7a9a; max-width: 90%; } .card-13__sub { font-family: 'Major Mono Display', monospace; font-size: 1.1rem; color: #2a1a35; transition: all 0.5s ease 0.1s; } .card-13__card:hover .card-13__sub { color: var(--card-13-c2); text-shadow: 0 0 6px var(--card-13-c2), 0 0 16px var(--card-13-c2); } @media (prefers-reduced-motion: reduce) { .card-13__card:hover .card-13__title { animation: none !important; } } ``` ### 14. Scanline **Type:** Pure CSS **Description:** A retro CRT terminal card with phosphor-green text, static scanlines, a sweeping refresh beam, and a blinking cursor. Great for cybersecurity, retro-tech, archival, or developer products that lean into a vintage-computing identity. **HTML:** ```html
> SYSTEM/READY_

VAULT
OS 9 

Cold-storage terminal for archival data. Phosphor-green display, zero network exposure.

UPTIME 4096d MEM 64K OK
``` **CSS:** ```css @import url('https://fonts.googleapis.com/css2?family=VT323&family=Share+Tech+Mono&display=swap'); .card-14, .card-14 *, .card-14 *::before, .card-14 *::after { box-sizing: border-box; margin: 0; padding: 0; } .card-14 { min-height: 460px; display: grid; place-items: center; background: #04110a; font-family: 'Share Tech Mono', monospace; padding: 2rem; } .card-14__card { position: relative; width: 340px; height: 430px; border-radius: 10px; background: #021006; cursor: pointer; overflow: hidden; border: 1px solid #0c5; box-shadow: 0 0 25px rgba(0,255,120,0.12), inset 0 0 30px rgba(0,255,120,0.05); } .card-14__inner { position: relative; z-index: 1; height: 100%; padding: 2.2rem; display: flex; flex-direction: column; justify-content: space-between; color: #38ff8e; text-shadow: 0 0 4px rgba(56,255,142,0.6); } .card-14__head { font-size: 0.8rem; letter-spacing: 0.1em; opacity: 0.7; } .card-14__title { font-family: 'VT323', monospace; font-size: 3.4rem; line-height: 0.95; } .card-14__cursor { display: inline-block; width: 0.6ch; background: #38ff8e; animation: card-14-blink 1s steps(1) infinite; } @keyframes card-14-blink { 50% { opacity: 0; } } .card-14__desc { font-size: 0.85rem; line-height: 1.6; opacity: 0.85; } .card-14__stat { display: flex; justify-content: space-between; font-size: 0.75rem; border-top: 1px dashed rgba(56,255,142,0.4); padding-top: 0.8rem; opacity: 0.7; } .card-14__lines { position: absolute; inset: 0; z-index: 2; background: repeating-linear-gradient( 0deg, rgba(0,0,0,0.25) 0 1px, transparent 1px 3px ); pointer-events: none; } .card-14__beam { position: absolute; left: 0; right: 0; height: 80px; top: -80px; z-index: 3; background: linear-gradient( to bottom, transparent, rgba(56,255,142,0.18) 50%, transparent ); pointer-events: none; opacity: 0; transition: opacity 0.3s ease; } .card-14__card:hover .card-14__beam { opacity: 1; animation: card-14-sweep 2s linear infinite; } @keyframes card-14-sweep { 0% { top: -80px; } 100% { top: 100%; } } .card-14__card::after { content: ""; position: absolute; inset: 0; z-index: 4; pointer-events: none; background: radial-gradient(ellipse at center, transparent 60%, rgba(0,0,0,0.5)); } @media (prefers-reduced-motion: reduce) { .card-14__cursor, .card-14__beam { animation: none !important; } } ``` ### 15. Depth Parallax **Type:** CSS + JS **Description:** A landscape/travel card with stacked depth layers (mountains, sun, foreground hills) that shift independently as the cursor moves, creating real 3D depth. Best for travel, outdoor, and immersive storytelling cards where motion conveys place. **HTML:** ```html
Field Notes

Valley of
Long Light

A guided dawn trek through layered ridgelines. Move your cursor to feel the depth.

``` **CSS:** ```css @import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,500;12..96,800&family=Inter+Tight:wght@400;600&display=swap'); .card-15, .card-15 *, .card-15 *::before, .card-15 *::after { box-sizing: border-box; margin: 0; padding: 0; } .card-15 { min-height: 460px; display: grid; place-items: center; background: #0b1d2a; font-family: 'Inter Tight', sans-serif; padding: 2rem; perspective: 1000px; } .card-15__card { position: relative; width: 340px; height: 440px; border-radius: 22px; cursor: pointer; overflow: hidden; transform-style: preserve-3d; transition: transform 0.2s ease-out, box-shadow 0.4s ease; background: linear-gradient(180deg, #2c6e8f 0%, #0b1d2a 100%); box-shadow: 0 20px 50px rgba(0,0,0,0.45); } .card-15__layer { position: absolute; inset: 0; transition: transform 0.2s ease-out; will-change: transform; } .card-15__far { background: radial-gradient(circle at 20% 70%, #1b4a63 0 28%, transparent 29%), radial-gradient(circle at 70% 75%, #1b4a63 0 32%, transparent 33%); opacity: 0.9; } .card-15__sun { display: grid; place-items: center; } .card-15__sun .card-15__orb { width: 130px; height: 130px; border-radius: 50%; background: radial-gradient(circle, #ffd56b, #ff8c42); box-shadow: 0 0 60px rgba(255,170,80,0.6); margin-top: -60px; } .card-15__near { background: radial-gradient(ellipse 120% 60% at 30% 110%, #06222e 60%, transparent 61%), radial-gradient(ellipse 120% 50% at 80% 115%, #04161e 60%, transparent 61%); } .card-15__content { position: absolute; inset: 0; z-index: 5; padding: 2.2rem; display: flex; flex-direction: column; justify-content: flex-end; color: #eaf4fa; transition: transform 0.2s ease-out; } .card-15__kicker { font-size: 0.72rem; letter-spacing: 0.28em; text-transform: uppercase; color: #ffd56b; } .card-15__title { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 800; font-size: 2.6rem; line-height: 0.95; margin: 0.4rem 0 0.6rem; } .card-15__desc { font-size: 0.85rem; line-height: 1.6; color: #b9d0dd; } @media (prefers-reduced-motion: reduce) { .card-15__card, .card-15__layer, .card-15__content { transition: none !important; } } ``` **JS:** ```js (() => { const root = document.querySelector('.card-15'); if (!root) return; const card = root.querySelector('[data-card-15="root"]'); if (!card) return; const layers = card.querySelectorAll('[data-depth]'); card.addEventListener('mousemove', (e) => { const r = card.getBoundingClientRect(); const x = (e.clientX - r.left) / r.width - 0.5; const y = (e.clientY - r.top) / r.height - 0.5; card.style.transform = `rotateY(${x * 10}deg) rotateX(${-y * 10}deg)`; layers.forEach((l) => { const d = parseFloat(l.dataset.depth); l.style.transform = `translate(${-x * d}px, ${-y * d}px)`; }); }); card.addEventListener('mouseleave', () => { card.style.transform = 'rotateY(0) rotateX(0)'; layers.forEach((l) => (l.style.transform = 'translate(0,0)')); }); })(); ``` ### 16. Spotlight **Type:** CSS + JS **Description:** A minimalist case-study card where a soft light and a matching border highlight follow the cursor across a dark surface. The restraint makes it ideal for design studios, agencies, and premium editorial content that values calm sophistication. **HTML:** ```html
CASE STUDY 2025

Quiet
Interfaces

A design system built on restraint. The light follows you because attention should follow intent.

— READ THE ESSAY
``` **CSS:** ```css @import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=Geist+Mono:wght@400;500&display=swap'); .card-16, .card-16 *, .card-16 *::before, .card-16 *::after { box-sizing: border-box; margin: 0; padding: 0; } .card-16 { min-height: 460px; display: grid; place-items: center; background: #08080a; font-family: 'Geist Mono', monospace; padding: 2rem; } .card-16__card { --card-16-x: 50%; --card-16-y: 50%; position: relative; width: 340px; height: 440px; border-radius: 18px; background: #101014; cursor: pointer; overflow: hidden; border: 1px solid rgba(255,255,255,0.06); } .card-16__card::before { content: ""; position: absolute; inset: 0; background: radial-gradient( 300px circle at var(--card-16-x) var(--card-16-y), rgba(120, 200, 255, 0.18), transparent 60% ); opacity: 0; transition: opacity 0.4s ease; z-index: 1; } .card-16__card:hover::before { opacity: 1; } .card-16__card::after { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; background: radial-gradient( 250px circle at var(--card-16-x) var(--card-16-y), rgba(120,200,255,0.6), transparent 50% ); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; opacity: 0; transition: opacity 0.4s ease; z-index: 2; } .card-16__card:hover::after { opacity: 1; } .card-16__inner { position: relative; z-index: 3; height: 100%; padding: 2.4rem; display: flex; flex-direction: column; justify-content: space-between; color: #d7dbe2; } .card-16__row { display: flex; justify-content: space-between; font-size: 0.72rem; letter-spacing: 0.1em; color: #6a7080; } .card-16__title { font-family: 'Instrument Serif', serif; font-size: 3.4rem; line-height: 0.95; color: #f3f5f9; } .card-16__title em { color: #78c8ff; } .card-16__desc { font-size: 0.82rem; line-height: 1.65; color: #8e94a3; } .card-16__foot { font-size: 0.72rem; color: #6a7080; letter-spacing: 0.12em; } @media (prefers-reduced-motion: reduce) { .card-16__card::before, .card-16__card::after { transition: none !important; } } ``` **JS:** ```js (() => { const root = document.querySelector('.card-16'); if (!root) return; const c = root.querySelector('[data-card-16="root"]'); if (!c) return; c.addEventListener('mousemove', (e) => { const r = c.getBoundingClientRect(); c.style.setProperty('--card-16-x', `${e.clientX - r.left}px`); c.style.setProperty('--card-16-y', `${e.clientY - r.top}px`); }); })(); ``` ### 17. 3D Tilt **Type:** CSS + JS **Description:** A product card that tilts in 3D toward the cursor with a moving specular glare and layered depth on the text, using translateZ for true parallax. Perfect for sneaker drops, gadgets, and hero product features that reward close inspection. **HTML:** ```html
Limited Drop

Nimbus
Hi-Tops

Float-foam midsole and an iridescent upper that shifts as it turns in the light.

$189
``` **CSS:** ```css @import url('https://fonts.googleapis.com/css2?family=Clash+Display:wght@600;700&family=Space+Grotesk:wght@400;500&display=swap'); @import url('https://fonts.cdnfonts.com/css/clash-display'); .card-17, .card-17 *, .card-17 *::before, .card-17 *::after { box-sizing: border-box; margin: 0; padding: 0; } .card-17 { min-height: 460px; display: grid; place-items: center; background: radial-gradient(circle at 70% 30%, #2a1f4d, #0d0a1a 70%); font-family: 'Space Grotesk', sans-serif; padding: 2rem; perspective: 1100px; } .card-17__card { position: relative; width: 330px; height: 440px; border-radius: 24px; cursor: pointer; transform-style: preserve-3d; transition: transform 0.12s ease-out, box-shadow 0.4s ease; background: linear-gradient(150deg, #3a2b6e, #18122e); box-shadow: 0 25px 50px rgba(0,0,0,0.5); border: 1px solid rgba(255,255,255,0.08); } .card-17__glare { position: absolute; inset: 0; border-radius: inherit; background: radial-gradient( circle at var(--card-17-gx, 50%) var(--card-17-gy, 50%), rgba(255,255,255,0.28), transparent 45% ); opacity: 0; transition: opacity 0.3s ease; pointer-events: none; z-index: 5; } .card-17__card:hover .card-17__glare { opacity: 1; } .card-17__inner { height: 100%; padding: 2.4rem; display: flex; flex-direction: column; justify-content: space-between; color: #ede9ff; transform: translateZ(0); } .card-17__chip { align-self: flex-start; font-size: 0.7rem; letter-spacing: 0.18em; text-transform: uppercase; padding: 0.4rem 0.9rem; border: 1px solid rgba(255,255,255,0.25); border-radius: 999px; transform: translateZ(60px); color: #c5b8ff; } .card-17__title { font-family: 'Clash Display', 'Space Grotesk', sans-serif; font-weight: 700; font-size: 2.8rem; line-height: 0.95; transform: translateZ(80px); } .card-17__desc { font-size: 0.85rem; line-height: 1.6; color: #b3a9d6; transform: translateZ(40px); } .card-17__price { font-family: 'Clash Display', 'Space Grotesk', sans-serif; font-weight: 600; font-size: 1.6rem; transform: translateZ(70px); color: #9d7bff; } @media (prefers-reduced-motion: reduce) { .card-17__card, .card-17__glare { transition: none !important; } } ``` **JS:** ```js (() => { const root = document.querySelector('.card-17'); if (!root) return; const c = root.querySelector('[data-card-17="root"]'); if (!c) return; c.addEventListener('mousemove', (e) => { const r = c.getBoundingClientRect(); const px = (e.clientX - r.left) / r.width; const py = (e.clientY - r.top) / r.height; c.style.transform = `rotateY(${(px - 0.5) * 20}deg) rotateX(${(0.5 - py) * 20}deg)`; c.style.setProperty('--card-17-gx', `${px * 100}%`); c.style.setProperty('--card-17-gy', `${py * 100}%`); }); c.addEventListener('mouseleave', () => { c.style.transform = 'rotateY(0) rotateX(0)'; }); })(); ``` ### 18. Slide Up Content **Type:** Pure CSS **Description:** A travel/blog card showing a hero image with a minimal label that slides away as a frosted detail panel rises from the bottom. A clean, dependable pattern for article grids, portfolios, and product listings that need progressive disclosure. **HTML:** ```html
Travel · 12 min

Sunset Over
Cartagena

Travel · 12 min read

Sunset Over Cartagena

Walled-city rooftops, fruit carts at dusk, and where to find the best ceviche after dark.

READ STORY →
``` **CSS:** ```css @import url('https://fonts.googleapis.com/css2?family=Sora:wght@400;600;800&family=JetBrains+Mono:wght@400;500&display=swap'); .card-18, .card-18 *, .card-18 *::before, .card-18 *::after { box-sizing: border-box; margin: 0; padding: 0; } .card-18 { min-height: 460px; display: grid; place-items: center; background: #e8e4dd; font-family: 'Sora', sans-serif; padding: 2rem; } .card-18__card { position: relative; width: 330px; height: 440px; border-radius: 20px; cursor: pointer; overflow: hidden; box-shadow: 0 18px 40px rgba(0,0,0,0.2); } .card-18__media { position: absolute; inset: 0; background: linear-gradient(160deg, #ff6b4a, #c91f5f 60%, #5b1e6b); } .card-18__media::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 30% 25%, rgba(255,255,255,0.3), transparent 50%); } .card-18__peek { position: absolute; left: 0; right: 0; bottom: 0; padding: 1.8rem; z-index: 3; color: #fff; transition: transform 0.5s cubic-bezier(0.16,1,0.3,1), opacity 0.4s ease; } .card-18__peek-cat { font-family: 'JetBrains Mono', monospace; font-size: 0.7rem; letter-spacing: 0.18em; text-transform: uppercase; opacity: 0.85; } .card-18__peek-title { font-weight: 800; font-size: 1.9rem; line-height: 1.05; margin-top: 0.3rem; } .card-18__card:hover .card-18__peek { transform: translateY(-130px); opacity: 0; } .card-18__panel { position: absolute; left: 0; right: 0; bottom: 0; background: rgba(12,8,16,0.92); backdrop-filter: blur(8px); color: #f0ece6; padding: 1.8rem; z-index: 4; transform: translateY(100%); transition: transform 0.5s cubic-bezier(0.16,1,0.3,1); } .card-18__card:hover .card-18__panel { transform: translateY(0); } .card-18__panel-cat { font-family: 'JetBrains Mono', monospace; font-size: 0.7rem; letter-spacing: 0.18em; text-transform: uppercase; color: #ff8a6b; } .card-18__panel-title { font-weight: 800; font-size: 1.7rem; line-height: 1.05; margin: 0.4rem 0 0.7rem; } .card-18__panel-desc { font-size: 0.85rem; line-height: 1.6; color: #c4bdb4; } .card-18__panel-link { display: inline-block; margin-top: 1rem; font-family: 'JetBrains Mono', monospace; font-size: 0.78rem; color: #ff8a6b; letter-spacing: 0.08em; } @media (prefers-reduced-motion: reduce) { .card-18__peek, .card-18__panel { transition: none !important; } } ``` ### 19. Flip Card **Type:** Pure CSS **Description:** A credit-card-style component that performs a full 180° 3D flip to reveal the reverse face, complete with magnetic strip and CVV. Ideal for fintech, membership cards, profiles, or any front/back information pairing. **HTML:** ```html
PLATINUM
4921 ·· 7755 ·· 0042
A. Marlowe 12/29

Flip to
the back

Same card, two faces. A full 180° rotation reveals account details on the reverse.

··· 309
``` **CSS:** ```css @import url('https://fonts.googleapis.com/css2?family=Libre+Franklin:wght@400;600;800&family=IBM+Plex+Mono:wght@400;500&display=swap'); .card-19, .card-19 *, .card-19 *::before, .card-19 *::after { box-sizing: border-box; margin: 0; padding: 0; } .card-19 { min-height: 460px; display: grid; place-items: center; background: #0e1116; font-family: 'Libre Franklin', sans-serif; padding: 2rem; perspective: 1500px; } .card-19__card { width: 330px; height: 440px; cursor: pointer; transform-style: preserve-3d; transition: transform 0.7s cubic-bezier(0.4, 0.2, 0.2, 1); position: relative; } .card-19__card:hover { transform: rotateY(180deg); } .card-19__face { position: absolute; inset: 0; border-radius: 20px; backface-visibility: hidden; -webkit-backface-visibility: hidden; overflow: hidden; padding: 2.4rem; display: flex; flex-direction: column; justify-content: space-between; box-shadow: 0 20px 45px rgba(0,0,0,0.45); } .card-19__front { background: linear-gradient(160deg, #12806a, #064237); color: #eafff7; } .card-19__front-logo { width: 44px; height: 44px; border-radius: 12px; background: #eafff7; color: #064237; display: grid; place-items: center; font-weight: 800; font-size: 1.3rem; } .card-19__front-num { font-family: 'IBM Plex Mono', monospace; font-size: 1.4rem; letter-spacing: 0.16em; } .card-19__front-row { display: flex; justify-content: space-between; align-items: flex-end; font-size: 0.78rem; } .card-19__front-name { font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; } .card-19__back { background: linear-gradient(160deg, #1a1f29, #0c0f14); color: #dfe4ec; transform: rotateY(180deg); } .card-19__back-strip { height: 46px; background: #000; margin: 0 -2.4rem; } .card-19__back-title { font-weight: 800; font-size: 1.6rem; line-height: 1.1; } .card-19__back-desc { font-size: 0.85rem; line-height: 1.6; color: #9aa3b2; } .card-19__back-cvv { font-family: 'IBM Plex Mono', monospace; background: #e8ecf3; color: #0c0f14; align-self: flex-end; padding: 0.3rem 0.9rem; border-radius: 6px; letter-spacing: 0.2em; font-weight: 500; } @media (prefers-reduced-motion: reduce) { .card-19__card { transition: none !important; } } ``` ### 20. Glitch Card **Type:** Pure CSS **Description:** An event/music card with RGB channel-split text, datamosh slice bars, and stepped jitter animation on hover. Built for cyberpunk, electronic music, gaming, and edgy brands that want controlled digital chaos. **HTML:** ```html
// SIGNAL_LOST

NULL
CITY

A cyberpunk audio-visual set. Corrupted frames, datamoshed visuals, bass you feel in your teeth.

FRI · WAREHOUSE 7 · 23:00
``` **CSS:** ```css @import url('https://fonts.googleapis.com/css2?family=Anton&family=Space+Mono:wght@400;700&display=swap'); .card-20, .card-20 *, .card-20 *::before, .card-20 *::after { box-sizing: border-box; margin: 0; padding: 0; } .card-20 { min-height: 460px; display: grid; place-items: center; background: #08080a; font-family: 'Space Mono', monospace; padding: 2rem; } .card-20__card { position: relative; width: 340px; height: 440px; border-radius: 4px; background: #0f0f12; cursor: pointer; overflow: hidden; border: 1px solid #1c1c22; } .card-20__inner { position: relative; z-index: 2; height: 100%; padding: 2.4rem; display: flex; flex-direction: column; justify-content: space-between; color: #e8e8ee; } .card-20__tag { font-size: 0.72rem; letter-spacing: 0.25em; color: #00e0ff; } .card-20__title { font-family: 'Anton', sans-serif; font-size: 4rem; line-height: 0.85; text-transform: uppercase; position: relative; color: #fff; display: inline-block; } .card-20__ghost { position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; opacity: 0; transition: opacity 0.2s ease; } .card-20__ghost.card-20__ghost-r { color: #ff003c; } .card-20__ghost.card-20__ghost-c { color: #00e0ff; } .card-20__card:hover .card-20__ghost.card-20__ghost-r { opacity: 0.85; animation: card-20-shift-a 0.35s steps(2) infinite; } .card-20__card:hover .card-20__ghost.card-20__ghost-c { opacity: 0.85; animation: card-20-shift-b 0.35s steps(2) infinite; } @keyframes card-20-shift-a { 0% { transform: translate(0,0); clip-path: inset(0 0 70% 0); } 50% { transform: translate(-4px,2px); clip-path: inset(40% 0 20% 0); } 100% { transform: translate(3px,-2px); clip-path: inset(70% 0 0 0); } } @keyframes card-20-shift-b { 0% { transform: translate(0,0); clip-path: inset(60% 0 10% 0); } 50% { transform: translate(4px,-2px); clip-path: inset(10% 0 60% 0); } 100% { transform: translate(-3px,2px); clip-path: inset(30% 0 40% 0); } } .card-20__real { position: relative; z-index: 1; display: block; } .card-20__desc { font-size: 0.82rem; line-height: 1.6; color: #888; } .card-20__foot { font-size: 0.72rem; letter-spacing: 0.15em; color: #555; } .card-20__bars { position: absolute; inset: 0; z-index: 3; pointer-events: none; opacity: 0; } .card-20__card:hover .card-20__bars { opacity: 1; animation: card-20-bars 0.4s steps(3) infinite; } .card-20__bars::before, .card-20__bars::after { content: ""; position: absolute; left: 0; right: 0; height: 2px; background: rgba(0,224,255,0.5); } .card-20__bars::before { top: 32%; } .card-20__bars::after { top: 68%; background: rgba(255,0,60,0.5); } @keyframes card-20-bars { 0%,100% { transform: translateX(0); } 50% { transform: translateX(6px); } } @media (prefers-reduced-motion: reduce) { .card-20__ghost, .card-20__bars { animation: none !important; } } ``` ### 21. Gradient Rotate **Type:** Pure CSS **Description:** A creative-suite card framed by a blurred conic gradient that rotates behind a masked inner panel, leaving a glowing animated ring. Great for AI tools, creative apps, and SaaS landing cards needing an energetic, "alive" aura. **HTML:** ```html
AI · CREATIVE SUITE

Spectra
Studio

Generate, remix, and color-grade in one canvas. The aura rotates while the engine warms up.

→ START FREE TRIAL
``` **CSS:** ```css @import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;500;700&family=Azeret+Mono:wght@400;500&display=swap'); @property --card-21-gr { syntax: ''; initial-value: 0deg; inherits: false; } .card-21, .card-21 *, .card-21 *::before, .card-21 *::after { box-sizing: border-box; margin: 0; padding: 0; } .card-21 { min-height: 460px; display: grid; place-items: center; background: #0a0a0f; font-family: 'Outfit', sans-serif; padding: 2rem; } .card-21__card { position: relative; width: 330px; height: 430px; border-radius: 24px; cursor: pointer; overflow: hidden; isolation: isolate; background: #111118; } .card-21__card::before { content: ""; position: absolute; inset: -40%; z-index: 0; background: conic-gradient( from var(--card-21-gr), #ff4d6d, #ffa64d, #ffe14d, #4dffa6, #4dd2ff, #b04dff, #ff4d6d ); filter: blur(40px) saturate(1.2); opacity: 0.65; transition: opacity 0.5s ease; animation: card-21-spin 6s linear infinite paused; } @keyframes card-21-spin { to { --card-21-gr: 360deg; } } .card-21__card:hover::before { opacity: 1; animation-play-state: running; } .card-21__card::after { content: ""; position: absolute; inset: 2px; z-index: 1; border-radius: 22px; background: linear-gradient(160deg, #15151e, #0c0c12); } .card-21__inner { position: relative; z-index: 2; height: 100%; padding: 2.4rem; display: flex; flex-direction: column; justify-content: space-between; color: #f2f2f7; } .card-21__eyebrow { font-family: 'Azeret Mono', monospace; font-size: 0.72rem; letter-spacing: 0.2em; color: #9a9ab0; } .card-21__title { font-weight: 700; font-size: 2.6rem; line-height: 1; background: linear-gradient(120deg, #ff8aa0, #ffd24d, #6ad6ff); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; } .card-21__desc { font-size: 0.88rem; line-height: 1.6; color: #a6a6bc; font-weight: 300; } .card-21__cta { font-family: 'Azeret Mono', monospace; font-size: 0.78rem; letter-spacing: 0.1em; color: #ffd24d; } @media (prefers-reduced-motion: reduce) { .card-21__card::before { animation: none !important; } } ``` ### 22. Border Morph **Type:** Pure CSS **Description:** A wellness/meditation card that morphs from an organic blob shape into a clean rounded rectangle on hover, with icons and buttons reshaping in sync. Best for calm, friendly, lifestyle, or health brands where softness is on-brand. **HTML:** ```html
🫧

Bubble
Wellness

A meditation app that breathes with you. Shapes soften and settle as you exhale.

Try a session
``` **CSS:** ```css @import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@500;600;700&family=DM+Sans:opsz,wght@9..40,400;9..40,500&display=swap'); .card-22, .card-22 *, .card-22 *::before, .card-22 *::after { box-sizing: border-box; margin: 0; padding: 0; } .card-22 { min-height: 460px; display: grid; place-items: center; background: #fef0e6; background-image: radial-gradient(circle at 80% 10%, #ffe0cc, transparent 50%); font-family: 'DM Sans', sans-serif; padding: 2rem; } .card-22__card { position: relative; width: 320px; height: 420px; cursor: pointer; background: linear-gradient(155deg, #ff7e54, #ff4d8d); color: #fff; border-radius: 38% 62% 63% 37% / 41% 44% 56% 59%; transition: border-radius 0.7s cubic-bezier(0.34,1.4,0.5,1), transform 0.5s ease, box-shadow 0.5s ease; box-shadow: 0 20px 45px rgba(255,77,141,0.35); overflow: hidden; } .card-22__card::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 30% 20%, rgba(255,255,255,0.35), transparent 55%); } .card-22__card:hover { border-radius: 28px; transform: translateY(-6px); box-shadow: 0 30px 60px rgba(255,77,141,0.45); } .card-22__inner { position: relative; z-index: 2; height: 100%; padding: 2.6rem; display: flex; flex-direction: column; justify-content: space-between; } .card-22__icon { width: 56px; height: 56px; border-radius: 50%; background: rgba(255,255,255,0.25); display: grid; place-items: center; font-size: 1.6rem; transition: border-radius 0.7s cubic-bezier(0.34,1.4,0.5,1); } .card-22__card:hover .card-22__icon { border-radius: 16px; } .card-22__title { font-family: 'Fredoka', sans-serif; font-weight: 700; font-size: 2.5rem; line-height: 1; } .card-22__desc { font-size: 0.9rem; line-height: 1.6; color: rgba(255,255,255,0.9); } .card-22__btn { align-self: flex-start; background: #fff; color: #ff4d8d; font-family: 'Fredoka', sans-serif; font-weight: 600; padding: 0.7rem 1.6rem; border-radius: 999px; font-size: 0.9rem; transition: border-radius 0.7s cubic-bezier(0.34,1.4,0.5,1); } .card-22__card:hover .card-22__btn { border-radius: 12px; } @media (prefers-reduced-motion: reduce) { .card-22__card, .card-22__icon, .card-22__btn { transition: none !important; } } ``` ### 23. Magnetic Float **Type:** CSS + JS **Description:** A music/interactive card with a glowing orb that leans toward the cursor as if caught in a magnetic field, over a tech grid backdrop. Ideal for interactive demos, audio apps, and playful CTAs that invite the pointer in. **HTML:** ```html
PLAY ▶
Interactive Demo

Gravity
Synth

Drag your cursor near the orb — it leans toward you like it's caught in your field.

``` **CSS:** ```css @import url('https://fonts.googleapis.com/css2?family=Unbounded:wght@500;700;900&family=Manrope:wght@400;500;700&display=swap'); .card-23, .card-23 *, .card-23 *::before, .card-23 *::after { box-sizing: border-box; margin: 0; padding: 0; } .card-23 { min-height: 460px; display: grid; place-items: center; background: #06060a; font-family: 'Manrope', sans-serif; padding: 2rem; } .card-23__card { position: relative; width: 340px; height: 440px; border-radius: 26px; background: radial-gradient(circle at 50% 0%, #1c2540, #0a0d1a); cursor: pointer; overflow: hidden; border: 1px solid rgba(120,160,255,0.12); } .card-23__grid { position: absolute; inset: 0; background-image: linear-gradient(rgba(120,160,255,0.06) 1px, transparent 1px), linear-gradient(90deg, rgba(120,160,255,0.06) 1px, transparent 1px); background-size: 28px 28px; } .card-23__inner { position: relative; z-index: 2; height: 100%; padding: 2.4rem; display: flex; flex-direction: column; justify-content: space-between; color: #e9eefc; } .card-23__eyebrow { font-size: 0.72rem; letter-spacing: 0.22em; text-transform: uppercase; color: #6f8bd6; } .card-23__title { font-family: 'Unbounded', sans-serif; font-weight: 700; font-size: 2.1rem; line-height: 1.05; } .card-23__desc { font-size: 0.85rem; line-height: 1.6; color: #93a0c4; } .card-23__orb { position: absolute; top: 50%; left: 50%; width: 110px; height: 110px; margin: -55px 0 0 -55px; border-radius: 50%; background: linear-gradient(145deg, #6a8cff, #b46aff); display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 0.95rem; letter-spacing: 0.05em; z-index: 3; box-shadow: 0 0 40px rgba(120,140,255,0.5); transition: transform 0.18s ease-out, box-shadow 0.3s ease; will-change: transform; } .card-23__card:hover .card-23__orb { box-shadow: 0 0 60px rgba(140,120,255,0.7); } @media (prefers-reduced-motion: reduce) { .card-23__orb { transition: none !important; } } ``` **JS:** ```js (() => { const root = document.querySelector('.card-23'); if (!root) return; const card = root.querySelector('[data-card-23="root"]'); const orb = root.querySelector('[data-card-23="orb"]'); if (!card || !orb) return; card.addEventListener('mousemove', (e) => { const r = card.getBoundingClientRect(); const cx = r.left + r.width / 2; const cy = r.top + r.height / 2; const dx = (e.clientX - cx) * 0.4; const dy = (e.clientY - cy) * 0.4; orb.style.transform = `translate(${dx}px, ${dy}px) scale(1.05)`; }); card.addEventListener('mouseleave', () => { orb.style.transform = 'translate(0,0) scale(1)'; }); })(); ``` ### 24. Typewriter Reveal **Type:** Pure CSS **Description:** A field-journal card that types out its quote line-by-line with a blinking caret on hover, on aged paper with grain. Perfect for storytelling, blogs, narrative brands, and editorial content with a literary voice. **HTML:** ```html
Dispatch No. 14 — Field Log

The Cartographer's
Last Letter

They said the river had no end —

so I followed it anyway.

— hover to type the entry —
``` **CSS:** ```css @import url('https://fonts.googleapis.com/css2?family=Special+Elite&family=Courier+Prime:wght@400;700&display=swap'); .card-24, .card-24 *, .card-24 *::before, .card-24 *::after { box-sizing: border-box; margin: 0; padding: 0; } .card-24 { min-height: 460px; display: grid; place-items: center; background: #ddd6c7; background-image: radial-gradient(circle at 50% 50%, #e8e1d2, #c9c0ad); font-family: 'Courier Prime', monospace; padding: 2rem; } .card-24__card { position: relative; width: 350px; height: 440px; border-radius: 4px; background: #f7f2e7; cursor: pointer; overflow: hidden; box-shadow: 0 16px 36px rgba(60,50,30,0.25); border: 1px solid #d8cfba; } .card-24__card::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(120,100,70,0.06) 0.5px, transparent 0.6px); background-size: 4px 4px; pointer-events: none; } .card-24__inner { position: relative; z-index: 2; height: 100%; padding: 2.4rem; display: flex; flex-direction: column; color: #2c2419; } .card-24__meta { font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase; color: #8a7a5a; border-bottom: 1px solid #d8cfba; padding-bottom: 0.8rem; margin-bottom: 1.6rem; } .card-24__title { font-family: 'Special Elite', cursive; font-size: 2rem; line-height: 1.15; margin-bottom: 1.4rem; min-height: 4.6rem; } .card-24__line { font-family: 'Special Elite', cursive; font-size: 0.95rem; line-height: 1.7; white-space: nowrap; overflow: hidden; width: 0; border-right: 2px solid #2c2419; } .card-24__card:hover .card-24__line { animation: card-24-type 2.2s steps(34) forwards, card-24-caret 0.6s steps(1) infinite; } .card-24__card:hover .card-24__line.card-24__l2 { animation: card-24-type 1.8s steps(28) 2.2s forwards, card-24-caret 0.6s steps(1) infinite; border-right-color: transparent; } .card-24__card:hover .card-24__line.card-24__l1 { border-right-color: transparent; } @keyframes card-24-type { to { width: 100%; } } @keyframes card-24-caret { 50% { border-right-color: transparent; } } .card-24__foot { margin-top: auto; font-size: 0.75rem; color: #8a7a5a; letter-spacing: 0.1em; } @media (prefers-reduced-motion: reduce) { .card-24__card:hover .card-24__line { animation: none !important; } } ``` ### 25. Overlay Slide **Type:** Pure CSS **Description:** A magazine card where a bold color panel slides up from the bottom to overtake the cover, swapping the teaser for full article details. A strong choice for editorial grids, issue archives, and publication or portfolio listings. **HTML:** ```html
Editorial

Issue
No. 27

№ 27 — Spring

The Red
Issue

Forty pages on color, courage, and the people painting cities awake.

Read the issue →
``` **CSS:** ```css @import url('https://fonts.googleapis.com/css2?family=Bodoni+Moda:opsz,wght@6..96,500;6..96,900&family=Work+Sans:wght@400;500&display=swap'); .card-25, .card-25 *, .card-25 *::before, .card-25 *::after { box-sizing: border-box; margin: 0; padding: 0; } .card-25 { min-height: 460px; display: grid; place-items: center; background: #f2f0eb; font-family: 'Work Sans', sans-serif; padding: 2rem; } .card-25__card { position: relative; width: 330px; height: 440px; border-radius: 2px; cursor: pointer; overflow: hidden; background: #1a1a1a; box-shadow: 0 18px 40px rgba(0,0,0,0.2); } .card-25__base { position: absolute; inset: 0; background: linear-gradient(rgba(0,0,0,0.2), rgba(0,0,0,0.45)), linear-gradient(135deg, #6b7c8c, #2f3a44); display: flex; flex-direction: column; justify-content: flex-end; padding: 2.2rem; color: #fff; } .card-25__base-cat { font-size: 0.7rem; letter-spacing: 0.25em; text-transform: uppercase; opacity: 0.85; } .card-25__base-title { font-family: 'Bodoni Moda', serif; font-weight: 900; font-size: 2.4rem; line-height: 1; margin-top: 0.4rem; } .card-25__panel { position: absolute; inset: 0; z-index: 2; background: #e23744; transform: translateY(101%); transition: transform 0.55s cubic-bezier(0.76,0,0.24,1); padding: 2.2rem; display: flex; flex-direction: column; justify-content: space-between; color: #fff; } .card-25__card:hover .card-25__panel { transform: translateY(0); } .card-25__panel-num { font-family: 'Bodoni Moda', serif; font-style: italic; font-size: 1rem; } .card-25__panel-title { font-family: 'Bodoni Moda', serif; font-weight: 900; font-size: 2.6rem; line-height: 0.95; } .card-25__panel-desc { font-size: 0.88rem; line-height: 1.6; color: rgba(255,255,255,0.92); } .card-25__panel-link { font-size: 0.78rem; letter-spacing: 0.18em; text-transform: uppercase; border-top: 1px solid rgba(255,255,255,0.4); padding-top: 1rem; } @media (prefers-reduced-motion: reduce) { .card-25__panel { transition: none !important; } } ``` ### 26. Grain Texture **Type:** Pure CSS **Description:** A vintage film card where animated SVG noise grain breathes faster and stronger on hover over a sepia, vignetted frame. Suited to photography, film, archival, and any brand chasing an analog, celluloid mood. **HTML:** ```html
SUPER 8 · 1974

Golden
Hour Reel

A scanned film transfer. Hover and the grain breathes, like light running through celluloid.

``` **CSS:** ```css @import url('https://fonts.googleapis.com/css2?family=Cormorant:wght@500;600&family=Fragment+Mono&display=swap'); .card-26, .card-26 *, .card-26 *::before, .card-26 *::after { box-sizing: border-box; margin: 0; padding: 0; } .card-26 { min-height: 460px; display: grid; place-items: center; background: #16130f; font-family: 'Fragment Mono', monospace; padding: 2rem; } .card-26__card { position: relative; width: 330px; height: 440px; border-radius: 8px; cursor: pointer; overflow: hidden; background: linear-gradient(160deg, #3a2e22, #1b140d); box-shadow: 0 20px 45px rgba(0,0,0,0.5); } .card-26__card::before { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 35%, rgba(210,170,110,0.35), transparent 60%), linear-gradient(160deg, #5a4732, #241a10); } .card-26__overlay { position: absolute; inset: -50%; z-index: 2; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); opacity: 0.12; mix-blend-mode: overlay; pointer-events: none; transition: opacity 0.5s ease; animation: card-26-move 0.6s steps(4) infinite; } .card-26__card:hover .card-26__overlay { opacity: 0.42; animation-duration: 0.25s; } @keyframes card-26-move { 0% { transform: translate(0,0); } 25% { transform: translate(-8%, 5%); } 50% { transform: translate(6%, -8%); } 75% { transform: translate(-5%, -4%); } 100% { transform: translate(7%, 6%); } } .card-26__card::after { content: ""; position: absolute; inset: 0; z-index: 3; box-shadow: inset 0 0 90px rgba(0,0,0,0.7); pointer-events: none; } .card-26__inner { position: relative; z-index: 4; height: 100%; padding: 2.4rem; display: flex; flex-direction: column; justify-content: space-between; color: #f0e2cc; } .card-26__meta { font-size: 0.72rem; letter-spacing: 0.2em; color: #c9a877; } .card-26__title { font-family: 'Cormorant', serif; font-weight: 600; font-size: 3rem; line-height: 0.95; font-style: italic; } .card-26__desc { font-size: 0.82rem; line-height: 1.65; color: #c4b39a; } @media (prefers-reduced-motion: reduce) { .card-26__overlay { animation: none !important; } } ``` ### 27. Frosted Glass Intensify **Type:** Pure CSS **Description:** A weather-widget card over a vivid color backdrop whose backdrop-filter blur deepens on hover, melting the colors behind the glass. Ideal for dashboards, weather/utility widgets, and modern glassmorphism interfaces. **HTML:** ```html
Weather · Now

Coastal
Forecast

A glass widget over a living wallpaper. Hover and the frost thickens, melting the color behind it.

Light fog · breezy 18°
``` **CSS:** ```css @import url('https://fonts.googleapis.com/css2?family=Hanken+Grotesk:wght@400;500;800&display=swap'); .card-27, .card-27 *, .card-27 *::before, .card-27 *::after { box-sizing: border-box; margin: 0; padding: 0; } .card-27 { min-height: 460px; display: grid; place-items: center; background: radial-gradient(circle at 20% 30%, #ff5ea0 0 22%, transparent 23%), radial-gradient(circle at 75% 25%, #ffd23f 0 18%, transparent 19%), radial-gradient(circle at 60% 80%, #2bd9c4 0 26%, transparent 27%), radial-gradient(circle at 30% 75%, #6a5cff 0 20%, transparent 21%), #1a0f2e; font-family: 'Hanken Grotesk', sans-serif; padding: 2rem; } .card-27__card { position: relative; width: 340px; height: 440px; border-radius: 26px; cursor: pointer; overflow: hidden; background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.22); -webkit-backdrop-filter: blur(4px) saturate(1.1); backdrop-filter: blur(4px) saturate(1.1); box-shadow: 0 18px 50px rgba(0,0,0,0.3); transition: backdrop-filter 0.5s ease, -webkit-backdrop-filter 0.5s ease, background 0.5s ease, border-color 0.5s ease, transform 0.4s ease; } .card-27__card:hover { -webkit-backdrop-filter: blur(22px) saturate(1.6); backdrop-filter: blur(22px) saturate(1.6); background: rgba(255,255,255,0.16); border-color: rgba(255,255,255,0.4); transform: translateY(-6px); } .card-27__card::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 45%; background: linear-gradient(rgba(255,255,255,0.25), transparent); opacity: 0.5; } .card-27__inner { position: relative; z-index: 2; height: 100%; padding: 2.4rem; display: flex; flex-direction: column; justify-content: space-between; color: #fff; } .card-27__pill { align-self: flex-start; font-size: 0.7rem; letter-spacing: 0.16em; text-transform: uppercase; padding: 0.4rem 0.9rem; border-radius: 999px; background: rgba(255,255,255,0.2); border: 1px solid rgba(255,255,255,0.3); } .card-27__title { font-weight: 800; font-size: 2.5rem; line-height: 1; text-shadow: 0 2px 20px rgba(0,0,0,0.2); } .card-27__desc { font-size: 0.88rem; line-height: 1.6; color: rgba(255,255,255,0.92); } .card-27__foot { display: flex; justify-content: space-between; align-items: center; font-size: 0.8rem; } .card-27__foot b { font-size: 1.5rem; font-weight: 800; } @media (prefers-reduced-motion: reduce) { .card-27__card { transition: none !important; } } ``` ### 28. Blueprint Reveal **Type:** Pure CSS **Description:** A product card where a circular wipe transforms the finished object into a technical blueprint drawing with dimension lines and specs. Great for design, manufacturing, architecture, and engineering brands that want to show the craft behind the product. **HTML:** ```html
MODEL · ARC-01

Arc Pendant

Hand-blown matte ceramic lamp.

DRAWING № 01 — REV C

Arc Pendant
Cross-Section

Ø 130mm · cord 1.8m
E27 · 2700K · matte glaze
TOL ±0.5mm

``` **CSS:** ```css @import url('https://fonts.googleapis.com/css2?family=Archivo:wght@500;700&family=Spline+Sans+Mono:wght@400;500&display=swap'); .card-28, .card-28 *, .card-28 *::before, .card-28 *::after { box-sizing: border-box; margin: 0; padding: 0; } .card-28 { min-height: 460px; display: grid; place-items: center; background: #e9ebee; font-family: 'Spline Sans Mono', monospace; padding: 2rem; } .card-28__card { position: relative; width: 340px; height: 440px; border-radius: 6px; cursor: pointer; overflow: hidden; background: #fdfdfb; border: 1px solid #d4d8de; box-shadow: 0 16px 36px rgba(30,50,80,0.15); } .card-28__product { position: absolute; inset: 0; z-index: 1; display: flex; flex-direction: column; justify-content: space-between; padding: 2.4rem; color: #1a2533; background: radial-gradient(circle at 70% 20%, #f0f3f7, #fdfdfb 60%); transition: opacity 0.5s ease; } .card-28__shape { width: 130px; height: 130px; margin: 1rem auto; border-radius: 50% 50% 50% 12px; background: linear-gradient(145deg, #2d6cdf, #16306b); box-shadow: 0 14px 30px rgba(40,80,160,0.35); } .card-28__blue { position: absolute; inset: 0; z-index: 2; background: #0d3b8c; background-image: linear-gradient(rgba(255,255,255,0.12) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.12) 1px, transparent 1px); background-size: 22px 22px; color: #cfe0ff; padding: 2.4rem; display: flex; flex-direction: column; justify-content: space-between; clip-path: circle(0% at 100% 0%); transition: clip-path 0.6s cubic-bezier(0.65,0,0.35,1); } .card-28__card:hover .card-28__blue { clip-path: circle(150% at 100% 0%); } .card-28__card:hover .card-28__product { opacity: 0; } .card-28__draw { width: 130px; height: 130px; margin: 1rem auto; border: 1.5px solid #9dc0ff; border-radius: 50% 50% 50% 12px; position: relative; } .card-28__draw::before, .card-28__draw::after { content: ""; position: absolute; background: #6f9aff; } .card-28__draw::before { left: -30px; right: -30px; top: 50%; height: 1px; background: repeating-linear-gradient(90deg, #6f9aff 0 6px, transparent 6px 10px); } .card-28__draw::after { top: -30px; bottom: -30px; left: 50%; width: 1px; background: repeating-linear-gradient(0deg, #6f9aff 0 6px, transparent 6px 10px); } .card-28__meta { font-size: 0.72rem; letter-spacing: 0.16em; } .card-28__title-p { font-family: 'Archivo', sans-serif; font-weight: 700; font-size: 2rem; line-height: 1; } .card-28__title-b { font-family: 'Archivo', sans-serif; font-weight: 700; font-size: 1.6rem; line-height: 1.05; } .card-28__specs { font-size: 0.74rem; line-height: 1.7; color: #aecaff; } @media (prefers-reduced-motion: reduce) { .card-28__product, .card-28__blue { transition: none !important; } } ``` ### 29. Shockwave **Type:** CSS + JS **Description:** An energy/tech card that fires concentric ripple rings outward from the exact point where the cursor enters, with staggered colored waves. Best for power, audio, gaming, and CTA cards that should feel reactive and kinetic. **HTML:** ```html
// Energy Core

Pulse
Reactor

Every interaction sends a wave outward. Hover anywhere — the ripple starts where you enter.

Discharge ⚡
``` **CSS:** ```css @import url('https://fonts.googleapis.com/css2?family=Chakra+Petch:wght@500;700&family=Inter:wght@400;500&display=swap'); .card-29, .card-29 *, .card-29 *::before, .card-29 *::after { box-sizing: border-box; margin: 0; padding: 0; } .card-29 { min-height: 460px; display: grid; place-items: center; background: #07101a; font-family: 'Inter', sans-serif; padding: 2rem; } .card-29__card { --card-29-x: 50%; --card-29-y: 50%; position: relative; width: 340px; height: 440px; border-radius: 18px; cursor: pointer; overflow: hidden; background: radial-gradient(circle at 50% 40%, #0e2236, #060d16); border: 1px solid rgba(60,180,255,0.18); } .card-29__card::before { content: ""; position: absolute; top: var(--card-29-y); left: var(--card-29-x); width: 10px; height: 10px; border-radius: 50%; transform: translate(-50%, -50%) scale(0); border: 2px solid rgba(80,200,255,0.7); box-shadow: 0 0 30px rgba(80,200,255,0.5); z-index: 1; } .card-29__card:hover::before { animation: card-29-ring 0.9s cubic-bezier(0.2,0.6,0.3,1) forwards; } @keyframes card-29-ring { 0% { transform: translate(-50%,-50%) scale(0); opacity: 0.9; } 100% { transform: translate(-50%,-50%) scale(60); opacity: 0; } } .card-29__card::after { content: ""; position: absolute; top: var(--card-29-y); left: var(--card-29-x); width: 10px; height: 10px; border-radius: 50%; transform: translate(-50%, -50%) scale(0); border: 1px solid rgba(160,90,255,0.6); z-index: 1; } .card-29__card:hover::after { animation: card-29-ring 1.1s cubic-bezier(0.2,0.6,0.3,1) 0.12s forwards; } .card-29__inner { position: relative; z-index: 2; height: 100%; padding: 2.4rem; display: flex; flex-direction: column; justify-content: space-between; color: #dceaf7; } .card-29__tag { font-family: 'Chakra Petch', sans-serif; font-size: 0.72rem; letter-spacing: 0.24em; text-transform: uppercase; color: #4fc3ff; } .card-29__title { font-family: 'Chakra Petch', sans-serif; font-weight: 700; font-size: 2.6rem; line-height: 0.95; } .card-29__desc { font-size: 0.86rem; line-height: 1.6; color: #8fa6bb; } .card-29__btn { align-self: flex-start; font-family: 'Chakra Petch', sans-serif; font-size: 0.85rem; letter-spacing: 0.06em; padding: 0.7rem 1.5rem; border-radius: 8px; border: 1px solid rgba(80,200,255,0.4); color: #4fc3ff; background: rgba(80,200,255,0.08); transition: background 0.3s ease; } .card-29__card:hover .card-29__btn { background: rgba(80,200,255,0.18); } @media (prefers-reduced-motion: reduce) { .card-29__card::before, .card-29__card::after { animation: none !important; } } ``` **JS:** ```js (() => { const root = document.querySelector('.card-29'); if (!root) return; const c = root.querySelector('[data-card-29="root"]'); if (!c) return; c.addEventListener('mouseenter', (e) => { const r = c.getBoundingClientRect(); c.style.setProperty('--card-29-x', `${e.clientX - r.left}px`); c.style.setProperty('--card-29-y', `${e.clientY - r.top}px`); }); })(); ``` ### 30. Color Burn **Type:** Pure CSS **Description:** A BBQ/food card that starts desaturated and dim, then ignites with a color-burn blend-mode fire layer and drifting embers on hover. Perfect for food, fitness, automotive, and any brand with heat and intensity in its story. **HTML:** ```html
BBQ · Texas Style

Low &
Slow

Sixteen hours over post oak. Hover to bring the coals back to life.

``` **CSS:** ```css @import url('https://fonts.googleapis.com/css2?family=Big+Shoulders+Display:wght@600;800&family=Barlow:wght@400;500&display=swap'); .card-30, .card-30 *, .card-30 *::before, .card-30 *::after { box-sizing: border-box; margin: 0; padding: 0; } .card-30 { min-height: 460px; display: grid; place-items: center; background: #100804; font-family: 'Barlow', sans-serif; padding: 2rem; } .card-30__card { position: relative; width: 330px; height: 440px; border-radius: 14px; cursor: pointer; overflow: hidden; background: #1a1a1a; filter: grayscale(0.8) brightness(0.7); transition: filter 0.6s ease, box-shadow 0.6s ease; } .card-30__card:hover { filter: grayscale(0) brightness(1); box-shadow: 0 0 60px rgba(255,90,20,0.4); } .card-30__base { position: absolute; inset: 0; background: linear-gradient(160deg, #4a4a52, #1c1c20); } .card-30__layer { position: absolute; inset: 0; z-index: 1; background: radial-gradient(circle at 50% 100%, #ff7a18, #ff2d00 40%, #8a0e00 70%, transparent 90%); mix-blend-mode: color-burn; opacity: 0; transform: translateY(20%); transition: opacity 0.6s ease, transform 0.6s ease; } .card-30__card:hover .card-30__layer { opacity: 1; transform: translateY(0); } .card-30__embers { position: absolute; inset: 0; z-index: 2; background-image: radial-gradient(#ffcf6b 1px, transparent 1.5px), radial-gradient(#ff8a3c 1px, transparent 1.5px); background-size: 60px 60px, 90px 90px; background-position: 0 0, 30px 40px; opacity: 0; transition: opacity 0.6s ease 0.1s; mix-blend-mode: screen; } .card-30__card:hover .card-30__embers { opacity: 0.7; } .card-30__inner { position: relative; z-index: 3; height: 100%; padding: 2.4rem; display: flex; flex-direction: column; justify-content: space-between; color: #f3ece4; } .card-30__tag { font-size: 0.72rem; letter-spacing: 0.25em; text-transform: uppercase; color: #ffb27a; } .card-30__title { font-family: 'Big Shoulders Display', sans-serif; font-weight: 800; font-size: 3.6rem; line-height: 0.82; text-transform: uppercase; } .card-30__desc { font-size: 0.86rem; line-height: 1.6; color: #d8cabc; } @media (prefers-reduced-motion: reduce) { .card-30__card, .card-30__layer, .card-30__embers { transition: none !important; } } ``` ### 31. Prismatic Sweep **Type:** Pure CSS **Description:** An optics/art card where a soft rainbow light bar sweeps diagonally across the surface in screen blend mode, like light refracting through glass. Ideal for art installations, science, premium tech, and visually rich landing cards. **HTML:** ```html
Optics Lab

Refraction
No. 9

A coated-glass installation. Light enters white and leaves as a spectrum sweeping the wall.

540nmpeak 1.52index
``` **CSS:** ```css @import url('https://fonts.googleapis.com/css2?family=Sora:wght@400;600;800&family=Geist+Mono:wght@400;500&display=swap'); .card-31, .card-31 *, .card-31 *::before, .card-31 *::after { box-sizing: border-box; margin: 0; padding: 0; } .card-31 { min-height: 460px; display: grid; place-items: center; background: #06060c; font-family: 'Sora', sans-serif; padding: 2rem; } .card-31__card { position: relative; width: 340px; height: 440px; border-radius: 20px; cursor: pointer; overflow: hidden; background: linear-gradient(160deg, #14141f, #0a0a12); border: 1px solid rgba(255,255,255,0.07); } .card-31__sweep { position: absolute; top: -60%; left: -120%; width: 60%; height: 220%; z-index: 1; transform: rotate(22deg); background: linear-gradient( 90deg, transparent, rgba(255,0,128,0.5), rgba(255,200,0,0.5), rgba(0,255,170,0.5), rgba(0,170,255,0.5), rgba(180,80,255,0.5), transparent ); filter: blur(8px); mix-blend-mode: screen; transition: left 0.7s cubic-bezier(0.4,0,0.2,1); } .card-31__card:hover .card-31__sweep { left: 160%; } .card-31__lines { position: absolute; inset: 0; z-index: 1; background: repeating-linear-gradient( 115deg, transparent 0 40px, rgba(255,255,255,0.015) 40px 41px ); } .card-31__inner { position: relative; z-index: 2; height: 100%; padding: 2.4rem; display: flex; flex-direction: column; justify-content: space-between; color: #eef0f7; } .card-31__eyebrow { font-family: 'Geist Mono', monospace; font-size: 0.72rem; letter-spacing: 0.22em; text-transform: uppercase; color: #8b8fa6; } .card-31__title { font-weight: 800; font-size: 2.5rem; line-height: 1; } .card-31__desc { font-size: 0.86rem; line-height: 1.6; color: #a3a7bd; } .card-31__meta { display: flex; gap: 1.4rem; font-family: 'Geist Mono', monospace; font-size: 0.74rem; color: #7c8197; } .card-31__meta span b { display: block; color: #eef0f7; font-size: 1.1rem; } @media (prefers-reduced-motion: reduce) { .card-31__sweep { transition: none !important; } } ``` ### 32. Book Open **Type:** Pure CSS **Description:** A literary card whose hard cover swings open on a hinge in 3D to reveal the first page and chapter text inside. Best for publishers, bookstores, courses, and storytelling experiences that benefit from a tactile "open me" gesture. **HTML:** ```html
Chapter One

The House
on Linden Row

"I had not meant to stay the winter. But the house, you understand, had other plans..."

— 1 —
Harrow & Quill

The House
on Linden
Row

by E. Marlowe
``` **CSS:** ```css @import url('https://fonts.googleapis.com/css2?family=Marcellus&family=EB+Garamond:ital,wght@0,400;0,500;1,400&display=swap'); .card-32, .card-32 *, .card-32 *::before, .card-32 *::after { box-sizing: border-box; margin: 0; padding: 0; } .card-32 { min-height: 460px; display: grid; place-items: center; background: #2a2018; background-image: radial-gradient(circle at 50% 40%, #3a2e22, #1a130d); font-family: 'EB Garamond', serif; padding: 2rem; perspective: 1600px; } .card-32__card { position: relative; width: 300px; height: 420px; cursor: pointer; transform-style: preserve-3d; } .card-32__pages { position: absolute; inset: 0; border-radius: 4px 8px 8px 4px; background: #f5efe0; padding: 2.4rem 2rem 2.4rem 2.6rem; box-shadow: inset 18px 0 30px -18px rgba(0,0,0,0.4); display: flex; flex-direction: column; color: #3a2e1f; } .card-32__chapter { font-family: 'Marcellus', serif; font-size: 0.8rem; letter-spacing: 0.2em; text-transform: uppercase; color: #9a7b4f; margin-bottom: 1rem; } .card-32__page-title { font-family: 'Marcellus', serif; font-size: 1.9rem; line-height: 1.15; margin-bottom: 1rem; } .card-32__text { font-size: 1rem; line-height: 1.65; font-style: italic; color: #5a4a36; } .card-32__page-no { margin-top: auto; text-align: center; font-size: 0.85rem; color: #9a7b4f; } .card-32__cover { position: absolute; inset: 0; z-index: 2; border-radius: 4px 8px 8px 4px; transform-origin: left center; transform: rotateY(0deg); transition: transform 0.9s cubic-bezier(0.65,0,0.35,1), box-shadow 0.9s ease; transform-style: preserve-3d; box-shadow: 6px 6px 24px rgba(0,0,0,0.5); } .card-32__card:hover .card-32__cover { transform: rotateY(-145deg); box-shadow: -10px 6px 30px rgba(0,0,0,0.4); } .card-32__cover-front, .card-32__cover-back { position: absolute; inset: 0; border-radius: 4px 8px 8px 4px; backface-visibility: hidden; -webkit-backface-visibility: hidden; } .card-32__cover-front { background: linear-gradient(160deg, #6b2737, #401520); padding: 2.6rem 2rem; display: flex; flex-direction: column; justify-content: space-between; color: #e8d8b8; border-left: 6px solid #2e0f17; } .card-32__cover-back { background: #5a1f2c; transform: rotateY(180deg); box-shadow: inset 0 0 40px rgba(0,0,0,0.4); } .card-32__pub { font-family: 'Marcellus', serif; font-size: 0.72rem; letter-spacing: 0.25em; text-transform: uppercase; color: #c9a86b; } .card-32__cover-title { font-family: 'Marcellus', serif; font-size: 2.6rem; line-height: 1.05; } .card-32__rule { width: 50px; height: 2px; background: #c9a86b; margin: 0.8rem 0; } .card-32__author { font-style: italic; font-size: 1.05rem; color: #d8c3a0; } @media (prefers-reduced-motion: reduce) { .card-32__cover { transition: none !important; } } ``` ### 33. Aurora **Type:** Pure CSS **Description:** A travel card with layered, drifting northern-lights ribbons over a starfield that brighten and sharpen on hover. Perfect for travel, hospitality, ambient/relaxation, and aspirational brands wanting an atmospheric, dreamlike backdrop. **HTML:** ```html
Arctic Expeditions

Chasing
the Lights

Seven nights in Tromsø under the polar sky. Glass-roof cabins, dog sleds, and the slow green fire overhead.

Sept – March from $2,400
``` **CSS:** ```css @import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@400;500;600&family=Jost:wght@300;400;500&display=swap'); .card-33, .card-33 *, .card-33 *::before, .card-33 *::after { box-sizing: border-box; margin: 0; padding: 0; } .card-33 { min-height: 460px; display: grid; place-items: center; background: #03060d; font-family: 'Jost', sans-serif; padding: 2rem; } .card-33__card { position: relative; width: 340px; height: 450px; border-radius: 22px; cursor: pointer; overflow: hidden; background: linear-gradient(180deg, #050b1a 0%, #02040a 100%); border: 1px solid rgba(120,255,200,0.1); } .card-33__card::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(1px 1px at 20% 30%, #fff, transparent), radial-gradient(1px 1px at 70% 20%, #cfe, transparent), radial-gradient(1px 1px at 40% 60%, #fff, transparent), radial-gradient(1px 1px at 85% 75%, #dff, transparent), radial-gradient(1px 1px at 55% 85%, #fff, transparent), radial-gradient(1px 1px at 10% 80%, #cef, transparent); opacity: 0.7; } .card-33__band { position: absolute; left: -30%; right: -30%; height: 60%; top: 5%; z-index: 1; filter: blur(28px); opacity: 0.55; background: radial-gradient(ellipse 60% 100% at 30% 50%, #2cffa6 0%, transparent 60%), radial-gradient(ellipse 50% 100% at 60% 40%, #3ad0ff 0%, transparent 60%), radial-gradient(ellipse 55% 100% at 80% 60%, #b06cff 0%, transparent 60%); transform: translateY(0) skewX(-6deg); transition: opacity 0.6s ease, filter 0.6s ease; animation: card-33-drift 9s ease-in-out infinite; } .card-33__band.card-33__b2 { top: 20%; opacity: 0.4; animation-duration: 13s; animation-direction: reverse; background: radial-gradient(ellipse 50% 100% at 50% 50%, #5affc4 0%, transparent 60%), radial-gradient(ellipse 50% 100% at 75% 40%, #6a8cff 0%, transparent 60%); } @keyframes card-33-drift { 0%,100% { transform: translateX(-6%) translateY(0) skewX(-6deg); } 50% { transform: translateX(8%) translateY(-12px) skewX(4deg); } } .card-33__card:hover .card-33__band { opacity: 0.85; filter: blur(20px); } .card-33__inner { position: relative; z-index: 2; height: 100%; padding: 2.6rem; display: flex; flex-direction: column; justify-content: flex-end; color: #eafff6; } .card-33__kicker { font-size: 0.72rem; letter-spacing: 0.3em; text-transform: uppercase; color: #7ff0c4; font-weight: 500; } .card-33__title { font-family: 'Cormorant Garamond', serif; font-weight: 500; font-size: 3rem; line-height: 1; margin: 0.6rem 0 0.8rem; } .card-33__desc { font-size: 0.9rem; line-height: 1.65; color: #b9d6cc; font-weight: 300; } .card-33__foot { margin-top: 1.4rem; display: flex; justify-content: space-between; font-size: 0.78rem; color: #7ff0c4; letter-spacing: 0.08em; border-top: 1px solid rgba(127,240,196,0.2); padding-top: 1rem; } @media (prefers-reduced-motion: reduce) { .card-33__band { animation: none !important; } } ``` --- ## 20 CSS Cards with Animations URL: https://codefronts.com/components/css-cards/ Description: 20 hand-crafted CSS card components — aurora glow, 3D tilt, glassmorphism, neon borders, flip card, pricing, terminal, music player, weather widget and more. Demo count: 20 ### 01. Glassmorphism Card **Type:** Pure CSS **Description:** Frosted glass effect using backdrop-filter blur with radial gradient background orbs and subtle white border. **HTML:** ```html

Glassmorphism

Frosted glass with backdrop blur and layered gradient glows.

``` **CSS:** ```css .card-glass { width: 200px; padding: 20px 22px; border-radius: 16px; 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); position: relative; z-index: 1; transition: transform 0.3s, box-shadow 0.3s; } .card-glass:hover { transform: translateY(-4px); box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4); } .card-glass h4 { font-size: 14px; font-weight: 700; color: #fff; margin-bottom: 6px; } .card-glass p { font-size: 11px; color: rgba(255, 255, 255, 0.65); line-height: 1.5; margin-bottom: 14px; } .glass-btn { font-size: 11px; padding: 5px 14px; border-radius: 20px; background: rgba(255, 255, 255, 0.2); color: #fff; border: 1px solid rgba(255, 255, 255, 0.3); cursor: pointer; transition: background 0.2s; } .card-glass:hover .glass-btn { background: rgba(255, 255, 255, 0.32); } /* parent stage backdrop (so the demo renders standalone) */ [class^="stage-"] { width: 100%; min-height: 200px; display: flex; align-items: center; justify-content: center; position: relative; padding: 2.5rem 1.5rem; box-sizing: border-box; } .stage-1 { background: linear-gradient(135deg, #1a0533 0%, #0a1a3a 50%, #0d2b1a 100%); overflow: hidden; } .stage-1::before { content: ""; position: absolute; width: 120px; height: 120px; border-radius: 50%; background: rgba(124, 108, 255, 0.4); top: -30px; right: -20px; filter: blur(40px); } .stage-1::after { content: ""; position: absolute; width: 80px; height: 80px; border-radius: 50%; background: rgba(61, 232, 245, 0.35); bottom: -10px; left: 10px; filter: blur(30px); } ``` ### 02. Neon Gradient Border Card **Type:** Pure CSS **Description:** Rainbow gradient border that fades in on hover using a background pseudo-element positioned behind the card with z-index -1. **HTML:** ```html

Neon Border

Gradient border reveals on hover using pseudo-element z-index trick.

``` **CSS:** ```css .card-neon { width: 200px; padding: 22px; border-radius: 12px; background: #111118; border: 1px solid transparent; position: relative; transition: transform 0.3s; } .card-neon::before { content: ""; position: absolute; inset: -1px; border-radius: 13px; background: linear-gradient(135deg, #7c6cff, #ff6c8a, #3de8f5); z-index: -1; opacity: 0; transition: opacity 0.3s; } .card-neon:hover::before { opacity: 1; } .card-neon:hover { transform: translateY(-3px); } .card-neon:hover .neon-icon { box-shadow: 0 0 20px rgba(124, 108, 255, 0.8); } .neon-icon { width: 36px; height: 36px; border-radius: 10px; background: rgba(124, 108, 255, 0.2); display: flex; align-items: center; justify-content: center; font-size: 18px; margin-bottom: 12px; transition: box-shadow 0.3s; } .card-neon h4 { font-size: 13px; font-weight: 700; color: #fff; margin-bottom: 4px; } .card-neon p { font-size: 11px; color: var(--ccg-muted); line-height: 1.5; } /* parent stage backdrop (so the demo renders standalone) */ [class^="stage-"] { width: 100%; min-height: 200px; display: flex; align-items: center; justify-content: center; position: relative; padding: 2.5rem 1.5rem; box-sizing: border-box; } .stage-2 { background: #07070f; } /* gallery vars + keyframes (so the demo renders standalone) */ :root { --ccg-bg: #0a0a0f; --ccg-surface: #111118; --ccg-surface2: #17171f; --ccg-surface3: #1e1e28; --ccg-border: rgba(255, 255, 255, 0.15); --ccg-border2: rgba(255, 255, 255, 0.13); --ccg-accent: #7c6cff; --ccg-pink: #ff6c8a; --ccg-green: #1ed98a; --ccg-amber: #f5a84a; --ccg-cyan: #3de8f5; --ccg-text: #f0eeff; --ccg-muted: #6b6987; --ccg-label: #9896b8; --ccg-mono: "DM Mono", "Fira Code", monospace; --ccg-sans: "Syne", sans-serif; } ``` ### 03. 3D Flip Card **Type:** Pure CSS **Description:** Pure CSS 3D flip using transform-style: preserve-3d and rotateY with backface-visibility: hidden on both faces. **HTML:** ```html

Hover to Flip

3D card flip effect →

The Back Side

Revealed with CSS 3D perspective

``` **CSS:** ```css .flip-scene { width: 190px; height: 120px; perspective: 700px; cursor: pointer; } .flip-card { width: 100%; height: 100%; position: relative; transform-style: preserve-3d; transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1); } .flip-scene:hover .flip-card { transform: rotateY(180deg); } .flip-front, .flip-back { position: absolute; inset: 0; border-radius: 14px; backface-visibility: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 16px; } .flip-front { background: linear-gradient(135deg, #1a1a2e, #16213e); border: 1px solid rgba(124, 108, 255, 0.3); } .flip-front h4 { font-size: 13px; font-weight: 700; color: #fff; margin-bottom: 4px; } .flip-front p { font-size: 10px; color: var(--ccg-muted); } .flip-back { background: linear-gradient(135deg, #7c6cff, #ff6c8a); transform: rotateY(180deg); } .flip-back h4 { font-size: 13px; font-weight: 700; color: #fff; margin-bottom: 4px; text-align: center; } .flip-back p { font-size: 10px; color: rgba(255, 255, 255, 0.8); text-align: center; } /* parent stage backdrop (so the demo renders standalone) */ [class^="stage-"] { width: 100%; min-height: 200px; display: flex; align-items: center; justify-content: center; position: relative; padding: 2.5rem 1.5rem; box-sizing: border-box; } .stage-3 { background: #0d0d14; } /* gallery vars + keyframes (so the demo renders standalone) */ :root { --ccg-bg: #0a0a0f; --ccg-surface: #111118; --ccg-surface2: #17171f; --ccg-surface3: #1e1e28; --ccg-border: rgba(255, 255, 255, 0.15); --ccg-border2: rgba(255, 255, 255, 0.13); --ccg-accent: #7c6cff; --ccg-pink: #ff6c8a; --ccg-green: #1ed98a; --ccg-amber: #f5a84a; --ccg-cyan: #3de8f5; --ccg-text: #f0eeff; --ccg-muted: #6b6987; --ccg-label: #9896b8; --ccg-mono: "DM Mono", "Fira Code", monospace; --ccg-sans: "Syne", sans-serif; } ``` ### 04. Animated Gradient Border Card **Type:** Pure CSS **Description:** Continuously rotating conic-gradient border using a pseudo-element with rotate keyframes. No JavaScript needed. **HTML:** ```html

Spinning Gradient

Conic-gradient border spins continuously using CSS animation.

Live animation
``` **CSS:** ```css .card-grad-border { width: 200px; padding: 20px; border-radius: 14px; background: #111118; position: relative; } .card-grad-border::before { content: ""; position: absolute; inset: -2px; border-radius: 16px; background: conic-gradient(#7c6cff, #ff6c8a, #3de8f5, #1ed98a, #7c6cff); z-index: -1; animation: ccg-grad-spin 3s linear infinite; } .card-grad-border h4 { font-size: 13px; font-weight: 700; color: #fff; margin-bottom: 6px; } .card-grad-border p { font-size: 11px; color: var(--ccg-muted); line-height: 1.5; margin-bottom: 12px; } .grad-tag { display: inline-block; font-size: 10px; padding: 2px 8px; border-radius: 20px; background: rgba(124, 108, 255, 0.2); color: var(--ccg-accent); } /* parent stage backdrop (so the demo renders standalone) */ [class^="stage-"] { width: 100%; min-height: 200px; display: flex; align-items: center; justify-content: center; position: relative; padding: 2.5rem 1.5rem; box-sizing: border-box; } .stage-4 { background: #090912; overflow: hidden; } /* gallery vars + keyframes (so the demo renders standalone) */ :root { --ccg-bg: #0a0a0f; --ccg-surface: #111118; --ccg-surface2: #17171f; --ccg-surface3: #1e1e28; --ccg-border: rgba(255, 255, 255, 0.15); --ccg-border2: rgba(255, 255, 255, 0.13); --ccg-accent: #7c6cff; --ccg-pink: #ff6c8a; --ccg-green: #1ed98a; --ccg-amber: #f5a84a; --ccg-cyan: #3de8f5; --ccg-text: #f0eeff; --ccg-muted: #6b6987; --ccg-label: #9896b8; --ccg-mono: "DM Mono", "Fira Code", monospace; --ccg-sans: "Syne", sans-serif; } @keyframes ccg-grad-spin { to { transform: rotate(360deg); } } @media (prefers-reduced-motion: reduce) { .card-grad-border, .card-grad-border * { animation: none !important; } } ``` ### 05. 3D Mouse Tilt Card **Type:** CSS + JS **Description:** Tracks cursor position and applies rotateX/rotateY perspective transforms in real-time, with a dynamic radial shine that follows the mouse. **HTML:** ```html

3D Tilt Card

Move your mouse over me to see the 3D tilt effect.

Mouse-tracked
``` **CSS:** ```css .card-tilt { width: 195px; padding: 22px; border-radius: 16px; background: linear-gradient(160deg, #1a1a28 0%, #111118 100%); border: 1px solid var(--ccg-border2); transform-style: preserve-3d; transition: transform 0.1s; cursor: none; position: relative; } .tilt-shine { position: absolute; inset: 0; border-radius: 16px; background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.08) 0%, transparent 65%); pointer-events: none; opacity: 0; transition: opacity 0.3s; } .card-tilt:hover .tilt-shine { opacity: 1; } .tilt-layer { transform: translateZ(20px); } .card-tilt h4 { font-size: 13px; font-weight: 700; color: #fff; margin-bottom: 4px; } .card-tilt p { font-size: 11px; color: var(--ccg-muted); line-height: 1.5; } .tilt-badge { margin-top: 10px; display: inline-block; font-size: 10px; padding: 2px 8px; border-radius: 20px; background: rgba(61, 232, 245, 0.15); color: var(--ccg-cyan); border: 1px solid rgba(61, 232, 245, 0.3); } /* parent stage backdrop (so the demo renders standalone) */ [class^="stage-"] { width: 100%; min-height: 200px; display: flex; align-items: center; justify-content: center; position: relative; padding: 2.5rem 1.5rem; box-sizing: border-box; } .stage-5 { background: #0c0c14; } /* gallery vars + keyframes (so the demo renders standalone) */ :root { --ccg-bg: #0a0a0f; --ccg-surface: #111118; --ccg-surface2: #17171f; --ccg-surface3: #1e1e28; --ccg-border: rgba(255, 255, 255, 0.15); --ccg-border2: rgba(255, 255, 255, 0.13); --ccg-accent: #7c6cff; --ccg-pink: #ff6c8a; --ccg-green: #1ed98a; --ccg-amber: #f5a84a; --ccg-cyan: #3de8f5; --ccg-text: #f0eeff; --ccg-muted: #6b6987; --ccg-label: #9896b8; --ccg-mono: "DM Mono", "Fira Code", monospace; --ccg-sans: "Syne", sans-serif; } ``` **JS:** ```js const card = document.getElementById("tiltCard"); card.addEventListener("mousemove", (e) => { const { left, top, width, height } = card.getBoundingClientRect(); const x = (e.clientX - left) / width - 0.5; const y = (e.clientY - top) / height - 0.5; card.style.transform = `perspective(700px) rotateX(${-y * 18}deg) rotateY(${x * 18}deg)`; }); card.addEventListener("mouseleave", () => { card.style.transform = "perspective(700px) rotateX(0) rotateY(0)"; }); ``` ### 06. Cursor Spotlight Card **Type:** CSS + JS **Description:** A soft radial glow follows the cursor position inside the card, illuminating where you look. Border subtly highlights on hover. **HTML:** ```html
V

Spotlight Card

Cursor light follows your mouse around the card surface.

``` **CSS:** ```css .card-spotlight { width: 200px; padding: 20px; border-radius: 14px; background: #111118; border: 1px solid var(--ccg-border); position: relative; overflow: hidden; cursor: none; } .spotlight-glow { position: absolute; width: 140px; height: 140px; border-radius: 50%; background: radial-gradient(circle, rgba(124, 108, 255, 0.22) 0%, transparent 70%); pointer-events: none; transform: translate(-50%, -50%); top: 50%; left: 50%; transition: opacity 0.3s; opacity: 0; } .card-spotlight:hover .spotlight-glow { opacity: 1; } .card-spotlight:hover { border-color: rgba(124, 108, 255, 0.4); } .spot-content { position: relative; z-index: 1; } .card-spotlight h4 { font-size: 13px; font-weight: 700; color: #fff; margin-bottom: 4px; } .card-spotlight p { font-size: 11px; color: var(--ccg-muted); line-height: 1.5; } .spot-avatar { width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(135deg, #7c6cff, #ff6c8a); margin-bottom: 12px; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; color: #fff; } /* parent stage backdrop (so the demo renders standalone) */ [class^="stage-"] { width: 100%; min-height: 200px; display: flex; align-items: center; justify-content: center; position: relative; padding: 2.5rem 1.5rem; box-sizing: border-box; } .stage-6 { background: #09090e; overflow: hidden; } /* gallery vars + keyframes (so the demo renders standalone) */ :root { --ccg-bg: #0a0a0f; --ccg-surface: #111118; --ccg-surface2: #17171f; --ccg-surface3: #1e1e28; --ccg-border: rgba(255, 255, 255, 0.15); --ccg-border2: rgba(255, 255, 255, 0.13); --ccg-accent: #7c6cff; --ccg-pink: #ff6c8a; --ccg-green: #1ed98a; --ccg-amber: #f5a84a; --ccg-cyan: #3de8f5; --ccg-text: #f0eeff; --ccg-muted: #6b6987; --ccg-label: #9896b8; --ccg-mono: "DM Mono", "Fira Code", monospace; --ccg-sans: "Syne", sans-serif; } ``` **JS:** ```js const card = document.getElementById("spotCard"); const glow = document.getElementById("spotGlow"); card.addEventListener("mousemove", (e) => { const r = card.getBoundingClientRect(); glow.style.left = e.clientX - r.left + "px"; glow.style.top = e.clientY - r.top + "px"; }); ``` ### 07. Stacked Paper Card **Type:** Pure CSS **Description:** Two pseudo-elements behind the card rotate and offset on hover to create a fanned paper stack effect. Works beautifully on light backgrounds. **HTML:** ```html

Stacked Paper

Pseudo-elements create layered paper cards that fan out on hover.

``` **CSS:** ```css .card-stack { position: relative; width: 200px; } .card-stack::before, .card-stack::after { content: ""; position: absolute; border-radius: 12px; transition: transform 0.35s cubic-bezier(0.23, 1, 0.32, 1); } .card-stack::before { background: #d6c9ff; width: 100%; height: 100%; top: 8px; left: 6px; z-index: 0; } .card-stack::after { background: #ffc8d6; width: 100%; height: 100%; top: 4px; left: 3px; z-index: 0; } .card-stack:hover::before { transform: translate(4px, 6px) rotate(3deg); } .card-stack:hover::after { transform: translate(-3px, 4px) rotate(-2deg); } .stack-main { position: relative; z-index: 1; background: #fff; border-radius: 12px; padding: 20px; box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12); } .stack-main h4 { font-size: 13px; font-weight: 700; color: #1a1a2e; margin-bottom: 4px; } .stack-main p { font-size: 11px; color: #b8b6d4; line-height: 1.5; margin-bottom: 12px; } .stack-btn { font-size: 11px; padding: 5px 14px; border-radius: 6px; background: #1a1a2e; color: #fff; border: none; cursor: pointer; } /* parent stage backdrop (so the demo renders standalone) */ [class^="stage-"] { width: 100%; min-height: 200px; display: flex; align-items: center; justify-content: center; position: relative; padding: 2.5rem 1.5rem; box-sizing: border-box; } .stage-7 { background: #f5f3ee; } ``` ### 08. Holographic Shimmer Card **Type:** Pure CSS **Description:** A white light sweeps across the card on hover using translateX animation, over a multi-color gradient background for a trading-card holographic look. **HTML:** ```html
Ultra Rare

Holographic

``` **CSS:** ```css .card-holo { width: 200px; padding: 22px; border-radius: 16px; position: relative; overflow: hidden; cursor: pointer; border: 1px solid rgba(255, 255, 255, 0.1); } .card-holo::before { content: ""; position: absolute; inset: 0; background: linear-gradient( 135deg, rgba(124, 108, 255, 0.2), rgba(61, 232, 245, 0.15), rgba(255, 108, 138, 0.2), rgba(30, 217, 138, 0.15) ); opacity: 0.7; } .holo-shine { position: absolute; inset: 0; background: linear-gradient( 105deg, transparent 40%, rgba(255, 255, 255, 0.15) 50%, transparent 60% ); transform: translateX(-100%); transition: transform 0.5s ease; } .card-holo:hover .holo-shine { transform: translateX(100%); } .holo-content { position: relative; z-index: 1; } .holo-label { font-family: var(--ccg-mono); font-size: 9px; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(255, 255, 255, 0.5); margin-bottom: 8px; } .card-holo h4 { font-size: 15px; font-weight: 800; color: #fff; margin-bottom: 4px; letter-spacing: -0.02em; } .card-holo .holo-num { font-size: 28px; font-weight: 800; color: rgba(255, 255, 255, 0.15); position: absolute; top: 12px; right: 16px; letter-spacing: -0.04em; } .holo-bar { height: 3px; border-radius: 2px; background: linear-gradient(90deg, #7c6cff, #ff6c8a, #3de8f5); margin-top: 14px; } /* parent stage backdrop (so the demo renders standalone) */ [class^="stage-"] { width: 100%; min-height: 200px; display: flex; align-items: center; justify-content: center; position: relative; padding: 2.5rem 1.5rem; box-sizing: border-box; } .stage-8 { background: #07070e; overflow: hidden; } /* gallery vars + keyframes (so the demo renders standalone) */ :root { --ccg-bg: #0a0a0f; --ccg-surface: #111118; --ccg-surface2: #17171f; --ccg-surface3: #1e1e28; --ccg-border: rgba(255, 255, 255, 0.15); --ccg-border2: rgba(255, 255, 255, 0.13); --ccg-accent: #7c6cff; --ccg-pink: #ff6c8a; --ccg-green: #1ed98a; --ccg-amber: #f5a84a; --ccg-cyan: #3de8f5; --ccg-text: #f0eeff; --ccg-muted: #6b6987; --ccg-label: #9896b8; --ccg-mono: "DM Mono", "Fira Code", monospace; --ccg-sans: "Syne", sans-serif; } ``` ### 09. Slide Reveal Card **Type:** Pure CSS **Description:** On hover the initial image content translates up and out while the description panel slides up from the bottom to fill the card. **HTML:** ```html
🎨

Hover to Reveal

Content slides up from the bottom replacing the image

``` **CSS:** ```css .card-reveal { width: 195px; height: 140px; border-radius: 14px; overflow: hidden; position: relative; cursor: pointer; background: linear-gradient(160deg, #1a1a2e, #0d0d1a); border: 1px solid var(--ccg-border2); } .reveal-img { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 40px; transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1); } .card-reveal:hover .reveal-img { transform: translateY(-100%); } .reveal-content { position: absolute; bottom: -100%; left: 0; right: 0; padding: 16px; background: linear-gradient(180deg, #7c6cff, #ff6c8a); transition: bottom 0.4s cubic-bezier(0.23, 1, 0.32, 1); } .card-reveal:hover .reveal-content { bottom: 0; } .reveal-content h4 { font-size: 13px; font-weight: 700; color: #fff; margin-bottom: 3px; } .reveal-content p { font-size: 10px; color: rgba(255, 255, 255, 0.8); line-height: 1.4; } /* parent stage backdrop (so the demo renders standalone) */ [class^="stage-"] { width: 100%; min-height: 200px; display: flex; align-items: center; justify-content: center; position: relative; padding: 2.5rem 1.5rem; box-sizing: border-box; } .stage-9 { background: #0d0d14; } /* gallery vars + keyframes (so the demo renders standalone) */ :root { --ccg-bg: #0a0a0f; --ccg-surface: #111118; --ccg-surface2: #17171f; --ccg-surface3: #1e1e28; --ccg-border: rgba(255, 255, 255, 0.15); --ccg-border2: rgba(255, 255, 255, 0.13); --ccg-accent: #7c6cff; --ccg-pink: #ff6c8a; --ccg-green: #1ed98a; --ccg-amber: #f5a84a; --ccg-cyan: #3de8f5; --ccg-text: #f0eeff; --ccg-muted: #6b6987; --ccg-label: #9896b8; --ccg-mono: "DM Mono", "Fira Code", monospace; --ccg-sans: "Syne", sans-serif; } ``` ### 10. Morphing Blob Card **Type:** Pure CSS **Description:** 8-point border-radius transitions between two organic blob shapes on hover with a smooth CSS transition. Pure CSS, no JavaScript. **HTML:** ```html

Blob Shape

border-radius morphs into a completely different blob on hover

``` **CSS:** ```css .card-morph { width: 200px; padding: 22px; border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; background: linear-gradient(135deg, #7c6cff 0%, #ff6c8a 100%); transition: border-radius 0.6s ease, transform 0.3s; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; min-height: 140px; } .card-morph:hover { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; transform: scale(1.04); } .card-morph h4 { font-size: 14px; font-weight: 800; color: #fff; margin-bottom: 4px; } .card-morph p { font-size: 11px; color: rgba(255, 255, 255, 0.8); line-height: 1.4; } /* parent stage backdrop (so the demo renders standalone) */ [class^="stage-"] { width: 100%; min-height: 200px; display: flex; align-items: center; justify-content: center; position: relative; padding: 2.5rem 1.5rem; box-sizing: border-box; } .stage-10 { background: #0a0a0f; } ``` ### 11. Brutalist Card **Type:** Pure CSS **Description:** Hard offset box-shadow gives a bold physical depth effect. Shadow shifts position and color on hover. Pressing moves card into the shadow. **HTML:** ```html
NEW

Brutalist
Design

Raw edges, hard shadows, zero subtlety. Hover to shift the shadow.

``` **CSS:** ```css .card-brute { width: 200px; padding: 18px 20px; background: #fff; border: 2.5px solid #1a1a1a; box-shadow: 6px 6px 0 #1a1a1a; transition: transform 0.15s, box-shadow 0.15s; cursor: pointer; } .card-brute:hover { transform: translate(-3px, -3px); box-shadow: 9px 9px 0 #7c6cff; } .card-brute:active { transform: translate(3px, 3px); box-shadow: 3px 3px 0 #1a1a1a; } .brute-tag { font-family: var(--ccg-mono); font-size: 9px; letter-spacing: 0.12em; text-transform: uppercase; background: #1a1a1a; color: #fff; padding: 2px 7px; display: inline-block; margin-bottom: 10px; } .card-brute h4 { font-size: 16px; font-weight: 800; color: #1a1a1a; letter-spacing: -0.03em; margin-bottom: 4px; line-height: 1.1; } .card-brute p { font-size: 11px; color: #b8b6d4; line-height: 1.5; margin-bottom: 12px; } .brute-btn { width: 100%; padding: 7px; background: #1a1a1a; color: #fff; border: none; font-family: var(--ccg-mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; cursor: pointer; transition: background 0.15s; } .brute-btn:hover { background: #7c6cff; } /* parent stage backdrop (so the demo renders standalone) */ [class^="stage-"] { width: 100%; min-height: 200px; display: flex; align-items: center; justify-content: center; position: relative; padding: 2.5rem 1.5rem; box-sizing: border-box; } .stage-11 { background: #f0ede5; } /* gallery vars + keyframes (so the demo renders standalone) */ :root { --ccg-bg: #0a0a0f; --ccg-surface: #111118; --ccg-surface2: #17171f; --ccg-surface3: #1e1e28; --ccg-border: rgba(255, 255, 255, 0.15); --ccg-border2: rgba(255, 255, 255, 0.13); --ccg-accent: #7c6cff; --ccg-pink: #ff6c8a; --ccg-green: #1ed98a; --ccg-amber: #f5a84a; --ccg-cyan: #3de8f5; --ccg-text: #f0eeff; --ccg-muted: #6b6987; --ccg-label: #9896b8; --ccg-mono: "DM Mono", "Fira Code", monospace; --ccg-sans: "Syne", sans-serif; } ``` ### 12. Retro Terminal Card **Type:** Pure CSS **Description:** Green-on-black terminal aesthetic with a blinking cursor using step-end animation. Perfect for dev tools, documentation, and code-related sites. **HTML:** ```html
$ npm install codefronts
✓ Packages installed
$ npm run build
✓ Built in 0.4s
$
``` **CSS:** ```css .card-term { width: 210px; border-radius: 8px; overflow: hidden; border: 1px solid rgba(30, 217, 138, 0.3); font-family: var(--ccg-mono); } .term-bar { background: #111; padding: 6px 10px; display: flex; align-items: center; gap: 5px; border-bottom: 1px solid rgba(30, 217, 138, 0.2); } .term-dot { width: 8px; height: 8px; border-radius: 50%; } .term-body { background: #050a05; padding: 14px; } .term-line { font-size: 10.5px; line-height: 2; color: var(--ccg-green); } .term-line .cmd { color: rgba(30, 217, 138, 0.5); } .term-line .out { color: rgba(255, 255, 255, 0.6); } .term-cursor { display: inline-block; width: 7px; height: 13px; background: var(--ccg-green); animation: ccg-blink 0.8s step-end infinite; vertical-align: middle; } /* parent stage backdrop (so the demo renders standalone) */ [class^="stage-"] { width: 100%; min-height: 200px; display: flex; align-items: center; justify-content: center; position: relative; padding: 2.5rem 1.5rem; box-sizing: border-box; } .stage-12 { background: #050a05; } /* gallery vars + keyframes (so the demo renders standalone) */ :root { --ccg-bg: #0a0a0f; --ccg-surface: #111118; --ccg-surface2: #17171f; --ccg-surface3: #1e1e28; --ccg-border: rgba(255, 255, 255, 0.15); --ccg-border2: rgba(255, 255, 255, 0.13); --ccg-accent: #7c6cff; --ccg-pink: #ff6c8a; --ccg-green: #1ed98a; --ccg-amber: #f5a84a; --ccg-cyan: #3de8f5; --ccg-text: #f0eeff; --ccg-muted: #6b6987; --ccg-label: #9896b8; --ccg-mono: "DM Mono", "Fira Code", monospace; --ccg-sans: "Syne", sans-serif; } @keyframes ccg-blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } } @media (prefers-reduced-motion: reduce) { .card-term, .card-term * { animation: none !important; } } ``` ### 13. Neumorphic Card **Type:** Pure CSS **Description:** Soft UI neumorphism using dual box-shadows — one light, one dark — to create the illusion of being extruded from the background surface. **HTML:** ```html
🔮

Neumorphic

Soft extrusion from the surface. Hover to push it inward.

``` **CSS:** ```css .card-neu { width: 200px; padding: 22px; border-radius: 20px; background: #e0e0e8; box-shadow: 6px 6px 14px rgba(0, 0, 0, 0.18), -6px -6px 14px rgba(255, 255, 255, 0.7); transition: box-shadow 0.3s; } .card-neu:hover { box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.15), -2px -2px 6px rgba(255, 255, 255, 0.6), inset 3px 3px 8px rgba(0, 0, 0, 0.12), inset -3px -3px 8px rgba(255, 255, 255, 0.6); } .neu-icon { width: 44px; height: 44px; border-radius: 12px; background: #e0e0e8; box-shadow: 4px 4px 8px rgba(0, 0, 0, 0.15), -4px -4px 8px rgba(255, 255, 255, 0.65); display: flex; align-items: center; justify-content: center; font-size: 20px; margin-bottom: 14px; } .card-neu h4 { font-size: 13px; font-weight: 700; color: #3a3a4a; margin-bottom: 4px; } .card-neu p { font-size: 11px; color: #8a8898; line-height: 1.5; } /* parent stage backdrop (so the demo renders standalone) */ [class^="stage-"] { width: 100%; min-height: 200px; display: flex; align-items: center; justify-content: center; position: relative; padding: 2.5rem 1.5rem; box-sizing: border-box; } .stage-13 { background: #e0e0e8; } ``` ### 14. Animated Stats Card **Type:** Pure CSS **Description:** Dashboard metric card with an animated progress bar that grows from 0 using CSS animation. Use IntersectionObserver for scroll-trigger. **HTML:** ```html
📈
+24.8%
48,293
Monthly Visitors
``` **CSS:** ```css .card-stats { width: 200px; padding: 18px 20px; border-radius: 14px; background: var(--ccg-surface2); border: 1px solid var(--ccg-border2); } .stats-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; } .stats-icon { width: 32px; height: 32px; border-radius: 8px; background: rgba(124, 108, 255, 0.2); display: flex; align-items: center; justify-content: center; font-size: 14px; } .stats-trend { font-size: 10px; color: var(--ccg-green); background: rgba(30, 217, 138, 0.1); padding: 2px 6px; border-radius: 4px; } .stats-num { font-size: 28px; font-weight: 800; color: #fff; letter-spacing: -0.04em; font-family: var(--ccg-sans); } .stats-label { font-size: 11px; color: var(--ccg-muted); margin-top: 2px; margin-bottom: 12px; } .stats-bar-wrap { height: 4px; background: rgba(255, 255, 255, 0.08); border-radius: 2px; } .stats-bar-fill { height: 100%; width: 72%; background: linear-gradient(90deg, #7c6cff, #ff6c8a); border-radius: 2px; animation: ccg-stats-grow 0.8s ease-out both; } /* parent stage backdrop (so the demo renders standalone) */ [class^="stage-"] { width: 100%; min-height: 200px; display: flex; align-items: center; justify-content: center; position: relative; padding: 2.5rem 1.5rem; box-sizing: border-box; } .stage-14 { background: #0a0a0f; } /* gallery vars + keyframes (so the demo renders standalone) */ :root { --ccg-bg: #0a0a0f; --ccg-surface: #111118; --ccg-surface2: #17171f; --ccg-surface3: #1e1e28; --ccg-border: rgba(255, 255, 255, 0.15); --ccg-border2: rgba(255, 255, 255, 0.13); --ccg-accent: #7c6cff; --ccg-pink: #ff6c8a; --ccg-green: #1ed98a; --ccg-amber: #f5a84a; --ccg-cyan: #3de8f5; --ccg-text: #f0eeff; --ccg-muted: #6b6987; --ccg-label: #9896b8; --ccg-mono: "DM Mono", "Fira Code", monospace; --ccg-sans: "Syne", sans-serif; } @keyframes ccg-stats-grow { from { width: 0; } } @media (prefers-reduced-motion: reduce) { .card-stats, .card-stats * { animation: none !important; } } ``` ### 15. Profile Card **Type:** Pure CSS **Description:** Social profile card with gradient avatar ring using CSS mask-composite trick, stats row, and a lift animation on hover. **HTML:** ```html
VR
Alex Morgan
Frontend Developer
142
Projects
4.8k
Stars
328
Followers
``` **CSS:** ```css .card-profile { width: 200px; padding: 22px; border-radius: 16px; background: var(--ccg-surface); border: 1px solid var(--ccg-border2); text-align: center; transition: transform 0.3s; } .card-profile:hover { transform: translateY(-4px); } .profile-avatar { width: 56px; height: 56px; border-radius: 50%; background: linear-gradient(135deg, #7c6cff, #ff6c8a); margin: 0 auto 10px; display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 800; color: #fff; position: relative; } .profile-avatar::after { content: ""; position: absolute; inset: -3px; border-radius: 50%; border: 2px solid transparent; background: linear-gradient(135deg, #7c6cff, #ff6c8a) border-box; -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0); -webkit-mask-composite: xor; mask-composite: exclude; } .profile-name { font-size: 14px; font-weight: 700; color: #fff; margin-bottom: 2px; } .profile-role { font-size: 11px; color: var(--ccg-muted); margin-bottom: 14px; } .profile-stats { display: flex; gap: 0; border-top: 1px solid var(--ccg-border); padding-top: 12px; } .pstat-num { font-size: 14px; font-weight: 700; color: #fff; } .pstat-label { font-size: 9px; color: var(--ccg-muted); font-family: var(--ccg-mono); letter-spacing: 0.06em; } /* parent stage backdrop (so the demo renders standalone) */ [class^="stage-"] { width: 100%; min-height: 200px; display: flex; align-items: center; justify-content: center; position: relative; padding: 2.5rem 1.5rem; box-sizing: border-box; } .stage-15 { background: #0d0d14; } /* gallery vars + keyframes (so the demo renders standalone) */ :root { --ccg-bg: #0a0a0f; --ccg-surface: #111118; --ccg-surface2: #17171f; --ccg-surface3: #1e1e28; --ccg-border: rgba(255, 255, 255, 0.15); --ccg-border2: rgba(255, 255, 255, 0.13); --ccg-accent: #7c6cff; --ccg-pink: #ff6c8a; --ccg-green: #1ed98a; --ccg-amber: #f5a84a; --ccg-cyan: #3de8f5; --ccg-text: #f0eeff; --ccg-muted: #6b6987; --ccg-label: #9896b8; --ccg-mono: "DM Mono", "Fira Code", monospace; --ccg-sans: "Syne", sans-serif; } /* missing class rules (merged from gallery) */ .pstat { flex: 1; text-align: center; } .pstat + .pstat { border-left: 1px solid var(--ccg-border); } ``` ### 16. Pricing Card **Type:** Pure CSS **Description:** Pricing tier card with a top border line that draws in from the left on hover using scaleX transform, and a button that fills with color. **HTML:** ```html
Pro Plan
$29/mo
Everything you need to ship faster.
Unlimited projects
Priority support
Custom domain
``` **CSS:** ```css .card-price { width: 190px; padding: 20px; border-radius: 16px; background: var(--ccg-surface2); border: 1px solid var(--ccg-border); position: relative; overflow: hidden; transition: border-color 0.3s, transform 0.3s; } .card-price::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: linear-gradient(90deg, #7c6cff, #ff6c8a); transform: scaleX(0); transform-origin: left; transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1); } .card-price:hover::before { transform: scaleX(1); } .card-price:hover { border-color: rgba(124, 108, 255, 0.4); transform: translateY(-3px); } .price-plan { font-family: var(--ccg-mono); font-size: 9px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ccg-accent); margin-bottom: 8px; } .price-amt { font-size: 30px; font-weight: 800; color: #fff; letter-spacing: -0.04em; line-height: 1; } .price-amt span { font-size: 14px; font-weight: 400; color: var(--ccg-muted); letter-spacing: 0; } .price-desc { font-size: 11px; color: var(--ccg-muted); margin: 8px 0 14px; line-height: 1.5; } .price-features { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; } .price-feat { font-size: 10.5px; color: var(--ccg-label); display: flex; align-items: center; gap: 5px; } .price-feat::before { content: "✓"; color: var(--ccg-green); font-size: 10px; } .price-btn { width: 100%; padding: 8px; border-radius: 8px; background: rgba(124, 108, 255, 0.15); color: var(--ccg-accent); border: 1px solid rgba(124, 108, 255, 0.3); font-family: var(--ccg-mono); font-size: 11px; cursor: pointer; transition: all 0.2s; } .card-price:hover .price-btn { background: var(--ccg-accent); color: #fff; border-color: var(--ccg-accent); } /* parent stage backdrop (so the demo renders standalone) */ [class^="stage-"] { width: 100%; min-height: 200px; display: flex; align-items: center; justify-content: center; position: relative; padding: 2.5rem 1.5rem; box-sizing: border-box; } .stage-16 { background: #09090e; } /* gallery vars + keyframes (so the demo renders standalone) */ :root { --ccg-bg: #0a0a0f; --ccg-surface: #111118; --ccg-surface2: #17171f; --ccg-surface3: #1e1e28; --ccg-border: rgba(255, 255, 255, 0.15); --ccg-border2: rgba(255, 255, 255, 0.13); --ccg-accent: #7c6cff; --ccg-pink: #ff6c8a; --ccg-green: #1ed98a; --ccg-amber: #f5a84a; --ccg-cyan: #3de8f5; --ccg-text: #f0eeff; --ccg-muted: #6b6987; --ccg-label: #9896b8; --ccg-mono: "DM Mono", "Fira Code", monospace; --ccg-sans: "Syne", sans-serif; } ``` ### 17. Notification Stack Card **Type:** Pure CSS **Description:** Stacked notification items that slide right and highlight on hover. Pulsing colored dots indicate notification type. **HTML:** ```html
New follower

@alex started following you

2m
Build passed

Production deploy successful

8m
Alert

CPU usage exceeded 90%

1h
``` **CSS:** ```css .card-notif { width: 210px; display: flex; flex-direction: column; gap: 8px; } .notif-item { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border-radius: 10px; background: var(--ccg-surface2); border: 1px solid var(--ccg-border); transform: translateX(0); transition: transform 0.2s, border-color 0.2s, background 0.2s; cursor: pointer; } .notif-item:hover { transform: translateX(4px); border-color: rgba(124, 108, 255, 0.4); background: rgba(124, 108, 255, 0.06); } .notif-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; margin-top: 3px; animation: ccg-notif-pulse 2s ease-in-out infinite; } .notif-body { flex: 1; min-width: 0; } .notif-body h5 { font-size: 11px; font-weight: 600; color: #fff; margin: 0 0 2px; } .notif-body p { font-size: 10px; color: var(--ccg-muted); line-height: 1.4; margin: 0; } .notif-time { font-family: var(--ccg-mono); font-size: 9px; color: var(--ccg-muted); margin-left: auto; flex-shrink: 0; margin-top: 1px; } /* parent stage backdrop (so the demo renders standalone) */ [class^="stage-"] { width: 100%; min-height: 200px; display: flex; align-items: center; justify-content: center; position: relative; padding: 2.5rem 1.5rem; box-sizing: border-box; } .stage-17 { background: #0a0a0f; } /* gallery vars + keyframes (so the demo renders standalone) */ :root { --ccg-bg: #0a0a0f; --ccg-surface: #111118; --ccg-surface2: #17171f; --ccg-surface3: #1e1e28; --ccg-border: rgba(255, 255, 255, 0.15); --ccg-border2: rgba(255, 255, 255, 0.13); --ccg-accent: #7c6cff; --ccg-pink: #ff6c8a; --ccg-green: #1ed98a; --ccg-amber: #f5a84a; --ccg-cyan: #3de8f5; --ccg-text: #f0eeff; --ccg-muted: #6b6987; --ccg-label: #9896b8; --ccg-mono: "DM Mono", "Fira Code", monospace; --ccg-sans: "Syne", sans-serif; } @keyframes ccg-notif-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } } @media (prefers-reduced-motion: reduce) { .card-notif, .card-notif * { animation: none !important; } } ``` ### 18. Skeleton Loader Card **Type:** Pure CSS **Description:** Animated skeleton loading state with a sweeping shimmer wave using background-position keyframes. Replace divs with real content after data loads. **HTML:** ```html
``` **CSS:** ```css .card-skel { width: 200px; padding: 18px 20px; border-radius: 14px; background: var(--ccg-surface2); border: 1px solid var(--ccg-border); } .skel { background: linear-gradient( 90deg, rgba(255, 255, 255, 0.04) 25%, rgba(255, 255, 255, 0.1) 50%, rgba(255, 255, 255, 0.04) 75% ); background-size: 200% 100%; animation: ccg-skel-wave 1.5s infinite; border-radius: 4px; } .skel-avatar { width: 44px; height: 44px; border-radius: 50%; margin-bottom: 14px; } .skel-line { height: 10px; margin-bottom: 7px; } .skel-line.w-full { width: 100%; } .skel-line.w-3q { width: 75%; } .skel-line.w-half { width: 50%; } .skel-line.w-2q { width: 40%; } .skel-gap { height: 14px; } .skel-btn { height: 30px; border-radius: 6px; margin-top: 14px; } /* missing class rules (merged from gallery) */ @keyframes ccg-skel-wave { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } } /* parent stage backdrop (so the demo renders standalone) */ [class^="stage-"] { width: 100%; min-height: 200px; display: flex; align-items: center; justify-content: center; position: relative; padding: 2.5rem 1.5rem; box-sizing: border-box; } .stage-18 { background: #0a0a0f; } /* gallery vars + keyframes (so the demo renders standalone) */ :root { --ccg-bg: #0a0a0f; --ccg-surface: #111118; --ccg-surface2: #17171f; --ccg-surface3: #1e1e28; --ccg-border: rgba(255, 255, 255, 0.15); --ccg-border2: rgba(255, 255, 255, 0.13); --ccg-accent: #7c6cff; --ccg-pink: #ff6c8a; --ccg-green: #1ed98a; --ccg-amber: #f5a84a; --ccg-cyan: #3de8f5; --ccg-text: #f0eeff; --ccg-muted: #6b6987; --ccg-label: #9896b8; --ccg-mono: "DM Mono", "Fira Code", monospace; --ccg-sans: "Syne", sans-serif; } @media (prefers-reduced-motion: reduce) { .card-skel, .card-skel * { animation: none !important; } } ``` ### 19. Magazine Card **Type:** Pure CSS **Description:** Editorial card with image area, category badge, read progress bar that fills on hover, and a smooth lift transition. **HTML:** ```html
🌌
Design

The Future of CSS in 2025

``` **CSS:** ```css .card-mag { width: 210px; border-radius: 16px; overflow: hidden; border: 1px solid var(--ccg-border2); cursor: pointer; transition: transform 0.35s; } .card-mag:hover { transform: translateY(-4px); } .mag-img { height: 110px; background: linear-gradient(135deg, #1a0533 0%, #0a1535 50%, #0d1a33 100%); display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden; } .mag-img::before { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse at 30% 50%, rgba(124, 108, 255, 0.4), transparent 60%), radial-gradient(ellipse at 80% 30%, rgba(61, 232, 245, 0.25), transparent 50%); } .mag-img-inner { position: relative; z-index: 1; font-size: 36px; } .mag-body { padding: 14px 16px; background: var(--ccg-surface); } .mag-category { font-family: var(--ccg-mono); font-size: 9px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ccg-accent); margin-bottom: 5px; } .card-mag h4 { font-size: 13px; font-weight: 700; color: #fff; line-height: 1.3; margin-bottom: 6px; } .mag-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; } .mag-author { font-size: 10px; color: var(--ccg-muted); } .mag-read { font-size: 10px; color: var(--ccg-accent); } .mag-read-bar { height: 2px; background: rgba(124, 108, 255, 0.2); margin-top: 8px; border-radius: 1px; overflow: hidden; } .mag-read-fill { height: 100%; width: 0; background: var(--ccg-accent); transition: width 0.4s ease; } .card-mag:hover .mag-read-fill { width: 60%; } /* parent stage backdrop (so the demo renders standalone) */ [class^="stage-"] { width: 100%; min-height: 200px; display: flex; align-items: center; justify-content: center; position: relative; padding: 2.5rem 1.5rem; box-sizing: border-box; } .stage-19 { background: #0a080e; } /* gallery vars + keyframes (so the demo renders standalone) */ :root { --ccg-bg: #0a0a0f; --ccg-surface: #111118; --ccg-surface2: #17171f; --ccg-surface3: #1e1e28; --ccg-border: rgba(255, 255, 255, 0.15); --ccg-border2: rgba(255, 255, 255, 0.13); --ccg-accent: #7c6cff; --ccg-pink: #ff6c8a; --ccg-green: #1ed98a; --ccg-amber: #f5a84a; --ccg-cyan: #3de8f5; --ccg-text: #f0eeff; --ccg-muted: #6b6987; --ccg-label: #9896b8; --ccg-mono: "DM Mono", "Fira Code", monospace; --ccg-sans: "Syne", sans-serif; } ``` ### 20. Interactive Vote Card **Type:** CSS + JS **Description:** Poll card with clickable options that fill in with a progress bar and show percentage. Selected option persists state via JS class toggle. **HTML:** ```html

Best CSS feature?

1,284 votes
Pick your favourite modern CSS feature.
Container Queries 64%
:has() selector 22%
CSS Layers 14%
``` **CSS:** ```css .card-vote { width: 200px; padding: 18px 20px; border-radius: 14px; background: var(--ccg-surface2); border: 1px solid var(--ccg-border2); } .vote-header { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 10px; } .vote-header h4 { margin: 0; font-size: 13px; font-weight: 700; color: #fff; line-height: 1.3; flex: 1; min-width: 0; } .vote-count { font-family: var(--ccg-mono); font-size: 11px; color: var(--ccg-muted); } .vote-desc { font-size: 11px; color: var(--ccg-muted); line-height: 1.5; margin-bottom: 14px; } .vote-options { display: flex; flex-direction: column; gap: 6px; } .vote-opt { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 8px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--ccg-border); cursor: pointer; transition: all 0.2s; position: relative; overflow: hidden; } .vote-opt:hover { border-color: rgba(124, 108, 255, 0.4); background: rgba(124, 108, 255, 0.07); } .vote-opt.selected { border-color: var(--ccg-accent); } .vote-fill { position: absolute; left: 0; top: 0; bottom: 0; background: rgba(124, 108, 255, 0.12); transition: width 0.4s ease; width: 0; } .vote-opt.selected .vote-fill { width: 64%; } .vote-opt-label { font-size: 11px; color: var(--ccg-label); position: relative; z-index: 1; } .vote-opt-pct { font-family: var(--ccg-mono); font-size: 10px; color: var(--ccg-muted); margin-left: auto; position: relative; z-index: 1; } .vote-opt.selected .vote-opt-pct { color: var(--ccg-accent); } .vote-opt.selected .vote-opt-label { color: #fff; } /* parent stage backdrop (so the demo renders standalone) */ [class^="stage-"] { width: 100%; min-height: 200px; display: flex; align-items: center; justify-content: center; position: relative; padding: 2.5rem 1.5rem; box-sizing: border-box; } .stage-20 { background: #0a0a0f; } /* gallery vars + keyframes (so the demo renders standalone) */ :root { --ccg-bg: #0a0a0f; --ccg-surface: #111118; --ccg-surface2: #17171f; --ccg-surface3: #1e1e28; --ccg-border: rgba(255, 255, 255, 0.15); --ccg-border2: rgba(255, 255, 255, 0.13); --ccg-accent: #7c6cff; --ccg-pink: #ff6c8a; --ccg-green: #1ed98a; --ccg-amber: #f5a84a; --ccg-cyan: #3de8f5; --ccg-text: #f0eeff; --ccg-muted: #6b6987; --ccg-label: #9896b8; --ccg-mono: "DM Mono", "Fira Code", monospace; --ccg-sans: "Syne", sans-serif; } /* missing class rules (merged from gallery) */ .vote-desc { font-size: 11px; color: var(--ccg-muted); line-height: 1.5; margin-bottom: 14px; } ``` **JS:** ```js document.querySelectorAll(".vote-opt").forEach((opt) => { opt.addEventListener("click", () => { opt .closest(".vote-options") .querySelectorAll(".vote-opt") .forEach((o) => o.classList.remove("selected")); opt.classList.add("selected"); }); }); ``` --- ## CSS Center a Div URL: https://codefronts.com/layouts/css-center-div-designs/ Description: The complete guide to centering a div in CSS in 2026 — covering all 5 production techniques with live interactive demos. Flexbox (the modern default, works for 95% of cases): display: flex; align-items: center; justify-content: center on the parent. CSS Grid (one-line shorthand): display: grid; place-items: center. Absolute positioning + transform (for overlays and modals): position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%). Margin auto (for block elements with a known width): margin: 0 auto (horizontal only) or margin: auto with position: absolute + inset: 0 (both axes). All methods side-by-side comparison — see every technique render the same content with visible axis crosshairs so you can see exactly where each method lands the element. All 5 demos are 100% pure CSS, MIT-licensed, copy-paste ready, with detailed explanations of which method to use when. Works in every modern browser (Chrome, Safari, Firefox, Edge), no JavaScript required. Demo count: 5 ### 01. CSS Flexbox Center a Div **Type:** Pure CSS **Description:** Three flex centering patterns showing how display:flex with align-items and justify-content centers a div both horizontally and vertically, as a row, and as a stacked column. **HTML:** ```html
Pure CSS

CSS Flexbox Center a Div

Three flex centering patterns — single element, row of cards, and column stack

Center both axes display:flex; align-items:center; justify-content:center

Perfectly Centered

Both axes, one declaration

Row of items centered display:flex; justify-content:center; gap:20px

Card One

Auto aligned

Card Two

Equal spacing

Card Three

Via gap

Column stack centered flex-direction:column; align-items:center

Stacked & Centered

Column direction + align-items

Call to Action
``` **CSS:** ```css .cd-01,.cd-01 *,.cd-01 *::before,.cd-01 *::after{box-sizing:border-box;margin:0;padding:0} .cd-01 ::selection{background:#6366f1;color:#fff} .cd-01 { --bg: #0a0a0f; --surface: #13131a; --border: rgba(255,255,255,.08); --accent: #6366f1; --accent2: #a78bfa; --text: #f1f0ff; --muted: rgba(241,240,255,.45); font-family: 'Segoe UI', system-ui, sans-serif; background: var(--bg); min-height: 100vh; padding: 40px 24px; color: var(--text); } /* ── Label strip ── */ .cd-01__header { text-align: center; margin-bottom: 40px; } .cd-01__header h2 { font-size: clamp(1.4rem, 4vw, 2rem); font-weight: 700; letter-spacing: -.02em; background: linear-gradient(135deg, var(--accent), var(--accent2)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; } .cd-01__header p { margin-top: 8px; color: var(--muted); font-size: .9rem; } /* ── Code badge ── */ .cd-01__badge { display: inline-flex; align-items: center; gap: 6px; background: rgba(99,102,241,.12); border: 1px solid rgba(99,102,241,.3); border-radius: 6px; padding: 4px 12px; font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: var(--accent2); margin-bottom: 16px; } /* ── Main showcase container ── */ .cd-01__viewport { max-width: 900px; margin: 0 auto; display: flex; flex-direction: column; gap: 32px; } /* ── Single demo cell ── */ .cd-01__demo { background: var(--surface); border: 1px solid var(--border); border-radius: 20px; overflow: hidden; } .cd-01__demo-label { padding: 14px 24px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; } .cd-01__demo-label span { font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); } .cd-01__demo-label code { font-size: .78rem; background: rgba(99,102,241,.15); color: var(--accent2); padding: 2px 8px; border-radius: 4px; font-family: 'Cascadia Code', 'Fira Code', monospace; } /* ── The actual centering playgrounds ── */ .cd-01__stage { height: 260px; position: relative; } /* Flexbox center both axes */ .cd-01__stage--flex { display: flex; align-items: center; justify-content: center; } /* Flex row with gap */ .cd-01__stage--flex-row { display: flex; align-items: center; justify-content: center; gap: 20px; flex-wrap: wrap; padding: 24px; } /* Flex column center */ .cd-01__stage--flex-col { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; } /* ── Cards inside stages ── */ .cd-01__card { background: linear-gradient(135deg, rgba(99,102,241,.2), rgba(167,139,250,.15)); border: 1px solid rgba(99,102,241,.3); border-radius: 16px; padding: 28px 36px; text-align: center; backdrop-filter: blur(12px); box-shadow: 0 8px 32px rgba(99,102,241,.15); } .cd-01__card h3 { font-size: 1.1rem; font-weight: 700; color: var(--text); margin-bottom: 6px; } .cd-01__card p { font-size: .82rem; color: var(--muted); } .cd-01__card--sm { padding: 20px 24px; } .cd-01__card--sm h3 { font-size: .95rem; } .cd-01__pill { background: linear-gradient(90deg, var(--accent), var(--accent2)); border-radius: 50px; padding: 10px 28px; font-size: .85rem; font-weight: 600; color: #fff; box-shadow: 0 4px 20px rgba(99,102,241,.4); } /* ── Axis lines overlay ── */ .cd-01__axis { position: absolute; inset: 0; pointer-events: none; } .cd-01__axis::before, .cd-01__axis::after { content: ''; position: absolute; background: rgba(99,102,241,.12); } .cd-01__axis::before { width: 1px; height: 100%; left: 50%; } .cd-01__axis::after { width: 100%; height: 1px; top: 50%; } /* ── Grid guide ── */ .cd-01__grid-guide { position: absolute; inset: 0; pointer-events: none; background-image: linear-gradient(rgba(99,102,241,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(99,102,241,.06) 1px, transparent 1px); background-size: 40px 40px; } @media (max-width: 600px) { .cd-01__demo-label { flex-direction: column; align-items: flex-start; gap: 6px; } .cd-01__stage { height: auto; min-height: 200px; padding: 24px; } } @media (prefers-reduced-motion: reduce) { .cd-01 * { animation: none !important; transition: none !important; } } ``` ### 02. CSS Grid Center a Div **Type:** Pure CSS **Description:** Three CSS Grid centering techniques — place-items shorthand, a 3×3 named template that puts the child at column 2/row 2, and the grid-absorbs-free-space margin:auto pattern. **HTML:** ```html
Pure CSS

CSS Grid Center a Div

Three grid centering techniques — place-items, named template areas, and auto margins

place-items shorthand display:grid; place-items:center

Grid Centered

Two properties, total control

3-col / 3-row template grid-template: 1fr auto 1fr / 1fr auto 1fr

Column 2 · Row 2

Exact grid placement

Auto margins inside grid display:grid → margin:auto on child

Margin Auto Magic

Grid absorbs free space

``` **CSS:** ```css .cd-02,.cd-02 *,.cd-02 *::before,.cd-02 *::after{box-sizing:border-box;margin:0;padding:0} .cd-02 ::selection{background:#f59e0b;color:#000} .cd-02 { --bg: #0c0a00; --surface: #151200; --border: rgba(245,158,11,.12); --accent: #f59e0b; --accent2: #fcd34d; --text: #fefce8; --muted: rgba(254,252,232,.45); font-family: 'Segoe UI', system-ui, sans-serif; background: var(--bg); min-height: 100vh; padding: 40px 24px; color: var(--text); } .cd-02__header { text-align: center; margin-bottom: 40px; } .cd-02__badge { display: inline-flex; align-items: center; background: rgba(245,158,11,.12); border: 1px solid rgba(245,158,11,.3); border-radius: 6px; padding: 4px 12px; font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: var(--accent2); margin-bottom: 16px; } .cd-02__header h2 { font-size: clamp(1.4rem, 4vw, 2rem); font-weight: 700; letter-spacing: -.02em; background: linear-gradient(135deg, var(--accent), var(--accent2)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; } .cd-02__header p { margin-top: 8px; color: var(--muted); font-size: .9rem; } .cd-02__viewport { max-width: 900px; margin: 0 auto; display: flex; flex-direction: column; gap: 32px; } .cd-02__demo { background: var(--surface); border: 1px solid var(--border); border-radius: 20px; overflow: hidden; } .cd-02__demo-label { padding: 14px 24px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; } .cd-02__demo-label span { font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); } .cd-02__demo-label code { font-size: .78rem; background: rgba(245,158,11,.15); color: var(--accent2); padding: 2px 8px; border-radius: 4px; font-family: 'Cascadia Code', 'Fira Code', monospace; } .cd-02__stage { height: 280px; position: relative; } /* ── Grid center: place-items shorthand ── */ .cd-02__stage--place { display: grid; place-items: center; } /* ── Grid center: named template ── */ .cd-02__stage--template { display: grid; grid-template-columns: 1fr auto 1fr; grid-template-rows: 1fr auto 1fr; gap: 0; } .cd-02__stage--template .cd-02__center { grid-column: 2; grid-row: 2; } /* ── Grid center: auto margins ── */ .cd-02__stage--margins { display: grid; } .cd-02__stage--margins .cd-02__center { margin: auto; } /* ── Cards ── */ .cd-02__card { background: linear-gradient(135deg, rgba(245,158,11,.18), rgba(252,211,77,.1)); border: 1px solid rgba(245,158,11,.3); border-radius: 16px; padding: 28px 36px; text-align: center; box-shadow: 0 8px 32px rgba(245,158,11,.12); position: relative; z-index: 1; } .cd-02__card h3 { font-size: 1.1rem; font-weight: 700; color: var(--text); margin-bottom: 6px; } .cd-02__card p { font-size: .82rem; color: var(--muted); } /* ── Dot grid ── */ .cd-02__dots { position: absolute; inset: 0; background-image: radial-gradient(rgba(245,158,11,.18) 1px, transparent 1px); background-size: 28px 28px; pointer-events: none; } /* ── Grid lines overlay ── */ .cd-02__lines { position: absolute; inset: 0; pointer-events: none; } .cd-02__lines::before, .cd-02__lines::after { content: ''; position: absolute; background: rgba(245,158,11,.1); } .cd-02__lines::before { width: 1px; height: 100%; left: 50%; } .cd-02__lines::after { width: 100%; height: 1px; top: 50%; } /* ── Grid cell highlight visual ── */ .cd-02__cell-markers { position: absolute; inset: 0; pointer-events: none; display: grid; grid-template-columns: 1fr auto 1fr; grid-template-rows: 1fr auto 1fr; } .cd-02__cell-markers span { border: 1px dashed rgba(245,158,11,.08); } @media (max-width: 600px) { .cd-02__demo-label { flex-direction: column; align-items: flex-start; gap: 6px; } .cd-02__stage { height: auto; min-height: 200px; padding: 32px; } } @media (prefers-reduced-motion: reduce) { .cd-02 * { animation: none !important; transition: none !important; } } ``` ### 03. CSS Absolute Position Center a Div **Type:** Pure CSS **Description:** Three absolute-positioning centering methods demonstrated inside a glassmorphism UI — the classic top/left 50% + translate trick, inset:0 with margin:auto, and known-size calc offset. **HTML:** ```html
Pure CSS

CSS Absolute Position Center a Div

Classic centering via position:absolute — translate trick, inset auto, and calc variants

Top/Left 50% + translate top:50%; left:50%; transform:translate(-50%,-50%)

Translate Trick

Works at any unknown size

Inset 0 + margin auto position:absolute; inset:0; margin:auto; width:fit-content

Inset + Margin Auto

Modern, readable, no translate

Anchor with calc offset top:calc(50% - Npx); left:calc(50% - Npx)

Calc Offset

Precise when dimensions are known

``` **CSS:** ```css .cd-03,.cd-03 *,.cd-03 *::before,.cd-03 *::after{box-sizing:border-box;margin:0;padding:0} .cd-03 ::selection{background:#ec4899;color:#fff} .cd-03 { --bg: #0d0818; --surface: #130f22; --border: rgba(236,72,153,.1); --accent: #ec4899; --accent2: #f9a8d4; --blue: #818cf8; --text: #fdf2f8; --muted: rgba(253,242,248,.45); font-family: 'Segoe UI', system-ui, sans-serif; background: var(--bg); min-height: 100vh; padding: 40px 24px; color: var(--text); } /* ── Ambient glow blobs (decorative background) ── */ .cd-03__blob { position: fixed; border-radius: 50%; filter: blur(80px); opacity: .25; pointer-events: none; z-index: 0; } .cd-03__blob--a { width: 500px; height: 500px; background: var(--accent); top: -120px; left: -100px; } .cd-03__blob--b { width: 400px; height: 400px; background: var(--blue); bottom: -100px; right: -80px; } .cd-03__header { text-align: center; margin-bottom: 40px; position: relative; z-index: 1; } .cd-03__badge { display: inline-flex; align-items: center; background: rgba(236,72,153,.12); border: 1px solid rgba(236,72,153,.3); border-radius: 6px; padding: 4px 12px; font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: var(--accent2); margin-bottom: 16px; } .cd-03__header h2 { font-size: clamp(1.4rem, 4vw, 2rem); font-weight: 700; letter-spacing: -.02em; background: linear-gradient(135deg, var(--accent), var(--accent2)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; } .cd-03__header p { margin-top: 8px; color: var(--muted); font-size: .9rem; } .cd-03__viewport { max-width: 900px; margin: 0 auto; display: flex; flex-direction: column; gap: 32px; position: relative; z-index: 1; } .cd-03__demo { background: rgba(19,15,34,.6); border: 1px solid var(--border); border-radius: 20px; overflow: hidden; backdrop-filter: blur(20px); } .cd-03__demo-label { padding: 14px 24px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; } .cd-03__demo-label span { font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); } .cd-03__demo-label code { font-size: .78rem; background: rgba(236,72,153,.15); color: var(--accent2); padding: 2px 8px; border-radius: 4px; font-family: 'Cascadia Code', 'Fira Code', monospace; } .cd-03__stage { height: 280px; position: relative; overflow: hidden; } /* ── Method 1: top/left 50% + translate(-50%,-50%) ── */ .cd-03__center--translate { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); } /* ── Method 2: inset:0 + margin:auto ── */ .cd-03__center--inset { position: absolute; inset: 0; margin: auto; width: fit-content; height: fit-content; } /* ── Method 3: calc center ── */ .cd-03__center--calc { position: absolute; /* centering via calc without knowing exact size — uses transform */ top: calc(50% - 0px); left: calc(50% - 0px); transform: translate(-50%, -50%); } /* ── Glassmorphism cards ── */ .cd-03__glass { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.15); border-radius: 20px; padding: 32px 40px; text-align: center; backdrop-filter: blur(24px); box-shadow: 0 8px 32px rgba(236,72,153,.15), inset 0 1px 0 rgba(255,255,255,.1); white-space: nowrap; } .cd-03__glass h3 { font-size: 1.1rem; font-weight: 700; color: var(--text); margin-bottom: 6px; } .cd-03__glass p { font-size: .82rem; color: var(--muted); } /* ── Crosshair lines ── */ .cd-03__cross { position: absolute; inset: 0; pointer-events: none; } .cd-03__cross::before, .cd-03__cross::after { content: ''; position: absolute; background: rgba(236,72,153,.1); } .cd-03__cross::before { width: 1px; height: 100%; left: 50%; } .cd-03__cross::after { width: 100%; height: 1px; top: 50%; } /* ── Corner tick marks ── */ .cd-03__corner { position: absolute; width: 14px; height: 14px; pointer-events: none; } .cd-03__corner--tl { top: 16px; left: 16px; border-top: 1px solid rgba(236,72,153,.3); border-left: 1px solid rgba(236,72,153,.3); } .cd-03__corner--tr { top: 16px; right: 16px; border-top: 1px solid rgba(236,72,153,.3); border-right: 1px solid rgba(236,72,153,.3); } .cd-03__corner--bl { bottom: 16px; left: 16px; border-bottom: 1px solid rgba(236,72,153,.3); border-left: 1px solid rgba(236,72,153,.3); } .cd-03__corner--br { bottom: 16px; right: 16px; border-bottom: 1px solid rgba(236,72,153,.3); border-right: 1px solid rgba(236,72,153,.3); } @media (max-width: 600px) { .cd-03__demo-label { flex-direction: column; align-items: flex-start; gap: 6px; } .cd-03__stage { height: 200px; } .cd-03__glass { padding: 20px 24px; white-space: normal; } } @media (prefers-reduced-motion: reduce) { .cd-03 * { animation: none !important; transition: none !important; } } ``` ### 04. CSS Margin Auto Center a Div **Type:** Pure CSS **Description:** Horizontal and block centering via the classic margin:0 auto, the modern logical margin-inline:auto equivalent, and the real-world max-width + margin-inline:auto content-column pattern. **HTML:** ```html
Pure CSS

CSS Margin Auto Center a Div

Horizontal centering via margin auto, logical properties, and max-width content blocks

Classic margin auto width:fit-content; margin:0 auto

Margin Auto

The original horizontal centerer

Logical properties margin-inline:auto; margin-block:auto

margin-inline: auto

Writing-mode aware, direction-safe

Max-width content centering max-width:560px; margin-inline:auto

Page Content Block

This is the real-world pattern — constrain width, auto-center inline

Works at Any Viewport

Centered on wide screens, full-bleed on mobile

``` **CSS:** ```css .cd-04,.cd-04 *,.cd-04 *::before,.cd-04 *::after{box-sizing:border-box;margin:0;padding:0} .cd-04 ::selection{background:#10b981;color:#000} .cd-04 { --bg: #020c08; --surface: #071410; --border: rgba(16,185,129,.1); --accent: #10b981; --accent2: #6ee7b7; --text: #ecfdf5; --muted: rgba(236,253,245,.45); font-family: 'Segoe UI', system-ui, sans-serif; background: var(--bg); min-height: 100vh; padding: 40px 24px; color: var(--text); } .cd-04__header { text-align: center; margin-bottom: 40px; } .cd-04__badge { display: inline-flex; align-items: center; background: rgba(16,185,129,.12); border: 1px solid rgba(16,185,129,.3); border-radius: 6px; padding: 4px 12px; font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: var(--accent2); margin-bottom: 16px; } .cd-04__header h2 { font-size: clamp(1.4rem, 4vw, 2rem); font-weight: 700; letter-spacing: -.02em; background: linear-gradient(135deg, var(--accent), var(--accent2)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; } .cd-04__header p { margin-top: 8px; color: var(--muted); font-size: .9rem; } .cd-04__viewport { max-width: 900px; margin: 0 auto; display: flex; flex-direction: column; gap: 32px; } .cd-04__demo { background: var(--surface); border: 1px solid var(--border); border-radius: 20px; overflow: hidden; } .cd-04__demo-label { padding: 14px 24px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; } .cd-04__demo-label span { font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); } .cd-04__demo-label code { font-size: .78rem; background: rgba(16,185,129,.15); color: var(--accent2); padding: 2px 8px; border-radius: 4px; font-family: 'Cascadia Code', 'Fira Code', monospace; } .cd-04__stage { height: 240px; position: relative; padding: 24px; display: flex; align-items: center; } /* ── Method 1: margin: 0 auto (horizontal only) ── */ .cd-04__stage--h-center { display: block; overflow: auto; } .cd-04__center--margin-auto { margin: 0 auto; width: fit-content; /* vertical centering via line-height trick */ position: relative; top: 50%; transform: translateY(-50%); } /* ── Method 2: margin-inline: auto (logical) ── */ .cd-04__stage--logical { display: block; overflow: auto; } .cd-04__center--logical { margin-inline: auto; margin-block: auto; width: fit-content; /* Needs a block formatting context — use absolute parent here */ position: relative; top: 50%; transform: translateY(-50%); } /* ── Method 3: max-width + margin auto (content centering) ── */ .cd-04__stage--content { display: block; padding: 0; } .cd-04__content-wrapper { max-width: 560px; width: 100%; margin-inline: auto; padding: 40px 32px; height: 100%; display: flex; flex-direction: column; justify-content: center; gap: 12px; } /* ── Cards ── */ .cd-04__card { background: linear-gradient(135deg, rgba(16,185,129,.18), rgba(110,231,183,.1)); border: 1px solid rgba(16,185,129,.3); border-radius: 16px; padding: 24px 32px; text-align: center; box-shadow: 0 8px 32px rgba(16,185,129,.1); } .cd-04__card h3 { font-size: 1.05rem; font-weight: 700; color: var(--text); margin-bottom: 6px; } .cd-04__card p { font-size: .82rem; color: var(--muted); } /* ── Content block ── */ .cd-04__content-block { border-left: 3px solid var(--accent); padding: 16px 20px; background: rgba(16,185,129,.06); border-radius: 0 12px 12px 0; } .cd-04__content-block h3 { font-size: 1rem; font-weight: 600; color: var(--text); margin-bottom: 4px; } .cd-04__content-block p { font-size: .82rem; color: var(--muted); } /* ── Rail lines ── */ .cd-04__rail { position: absolute; inset: 0; pointer-events: none; } .cd-04__rail::before, .cd-04__rail::after { content: ''; position: absolute; background: rgba(16,185,129,.08); } .cd-04__rail::before { width: 1px; height: 100%; left: 50%; } .cd-04__rail::after { width: 100%; height: 1px; top: 50%; } /* ── Max-width borders ── */ .cd-04__maxw-guide { position: absolute; top: 0; bottom: 0; left: 50%; width: 560px; transform: translateX(-50%); border-left: 1px dashed rgba(16,185,129,.2); border-right: 1px dashed rgba(16,185,129,.2); pointer-events: none; } @media (max-width: 600px) { .cd-04__demo-label { flex-direction: column; align-items: flex-start; gap: 6px; } .cd-04__stage { height: auto; min-height: 180px; } } @media (prefers-reduced-motion: reduce) { .cd-04 * { animation: none !important; transition: none !important; } } ``` ### 05. CSS Center a Div All Methods **Type:** Pure CSS **Description:** Side-by-side comparison of every major CSS centering technique — Flexbox, Grid, Absolute+Transform, Table-cell, and the Writing-mode trick — each in its own live tile with browser support chips. **HTML:** ```html
Pure CSS

CSS Center a Div — All 5 Methods

Flexbox, Grid, Absolute, Table-cell, and Writing-mode — every technique side by side

1 · Flexbox

display:flex; align-items:center; justify-content:center
Flexbox
Modern ✓ 2-axis Chrome 21+

2 · CSS Grid

display:grid; place-items:center
Grid
Modern ✓ Shortest Chrome 57+

3 · Absolute + Transform

position:absolute; top:50%; left:50%; transform:translate(-50%,-50%)
Absolute
Universal ✓ Needs parent IE9+

4 · Table-Cell

display:table-cell; vertical-align:middle; text-align:center
Table Cell
Legacy Semantic cost IE8+

5 · Writing-Mode Trick

writing-mode → inline-block child → reset writing-mode
Writing-Mode
Obscure RTL care needed Chrome 25+
``` **CSS:** ```css .cd-05,.cd-05 *,.cd-05 *::before,.cd-05 *::after{box-sizing:border-box;margin:0;padding:0} .cd-05 ::selection{background:#8b5cf6;color:#fff} .cd-05 { --bg: #08060f; --surface: #0e0b1a; --border: rgba(139,92,246,.1); --accent: #8b5cf6; --accent2: #c4b5fd; --orange: #fb923c; --teal: #2dd4bf; --text: #f5f3ff; --muted: rgba(245,243,255,.45); font-family: 'Segoe UI', system-ui, sans-serif; background: var(--bg); min-height: 100vh; padding: 40px 24px; color: var(--text); } .cd-05__header { text-align: center; margin-bottom: 40px; } .cd-05__badge { display: inline-flex; align-items: center; background: rgba(139,92,246,.12); border: 1px solid rgba(139,92,246,.3); border-radius: 6px; padding: 4px 12px; font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: var(--accent2); margin-bottom: 16px; } .cd-05__header h2 { font-size: clamp(1.4rem, 4vw, 2rem); font-weight: 700; letter-spacing: -.02em; background: linear-gradient(135deg, var(--accent), var(--accent2)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; } .cd-05__header p { margin-top: 8px; color: var(--muted); font-size: .9rem; } /* ── Comparison grid ── */ .cd-05__grid { max-width: 960px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; } .cd-05__tile { background: var(--surface); border: 1px solid var(--border); border-radius: 20px; overflow: hidden; display: flex; flex-direction: column; } .cd-05__tile-label { padding: 16px 20px 12px; border-bottom: 1px solid var(--border); } .cd-05__tile-label h3 { font-size: .88rem; font-weight: 700; color: var(--text); margin-bottom: 4px; } .cd-05__tile-label code { font-size: .72rem; background: rgba(139,92,246,.15); color: var(--accent2); padding: 2px 8px; border-radius: 4px; font-family: 'Cascadia Code', 'Fira Code', monospace; word-break: break-all; } .cd-05__stage { flex: 1; height: 200px; position: relative; } /* ── Crosshair ── */ .cd-05__cross { position: absolute; inset: 0; pointer-events: none; } .cd-05__cross::before, .cd-05__cross::after { content: ''; position: absolute; background: rgba(139,92,246,.1); } .cd-05__cross::before { width: 1px; height: 100%; left: 50%; } .cd-05__cross::after { width: 100%; height: 1px; top: 50%; } /* ── METHOD 1: Flexbox ── */ .cd-05__stage--flex { display: flex; align-items: center; justify-content: center; } /* ── METHOD 2: Grid place-items ── */ .cd-05__stage--grid { display: grid; place-items: center; } /* ── METHOD 3: Absolute + translate ── */ .cd-05__stage--abs { position: relative; } .cd-05__abs-child { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); } /* ── METHOD 4: table-cell (legacy) ── */ .cd-05__table-wrap { display: table; width: 100%; height: 200px; } .cd-05__stage--table { display: table-cell; vertical-align: middle; text-align: center; height: 200px; } /* ── METHOD 5: sticky/sticky scroll snap (CSS-only modal-like center) ── */ .cd-05__stage--writing { writing-mode: horizontal-tb; display: flex; align-items: center; justify-content: center; } /* ── Boxes inside stages ── */ .cd-05__box { border-radius: 12px; padding: 18px 24px; text-align: center; font-size: .85rem; font-weight: 600; color: var(--text); white-space: nowrap; border: 1px solid; } .cd-05__box--flex { background: rgba(99,102,241,.2); border-color: rgba(99,102,241,.4); box-shadow: 0 0 20px rgba(99,102,241,.2); } .cd-05__box--grid { background: rgba(245,158,11,.15); border-color: rgba(245,158,11,.35); box-shadow: 0 0 20px rgba(245,158,11,.15); } .cd-05__box--abs { background: rgba(236,72,153,.15); border-color: rgba(236,72,153,.35); box-shadow: 0 0 20px rgba(236,72,153,.15); } .cd-05__box--table { background: rgba(16,185,129,.15); border-color: rgba(16,185,129,.35); box-shadow: 0 0 20px rgba(16,185,129,.15); } .cd-05__box--writing { background: rgba(251,146,60,.15); border-color: rgba(251,146,60,.35); box-shadow: 0 0 20px rgba(251,146,60,.15); } /* ── Support indicator ── */ .cd-05__support { padding: 10px 20px 14px; display: flex; gap: 8px; flex-wrap: wrap; } .cd-05__chip { font-size: .68rem; padding: 2px 8px; border-radius: 20px; font-weight: 600; letter-spacing: .04em; } .cd-05__chip--green { background: rgba(16,185,129,.15); color: #6ee7b7; } .cd-05__chip--blue { background: rgba(99,102,241,.15); color: #a5b4fc; } .cd-05__chip--warn { background: rgba(245,158,11,.15); color: #fcd34d; } @media (max-width: 480px) { .cd-05__stage { height: 160px; } .cd-05__table-wrap { height: 160px; } .cd-05__stage--table { height: 160px; } } @media (prefers-reduced-motion: reduce) { .cd-05 * { animation: none !important; transition: none !important; } } ``` --- ## 23 CSS Checkboxes URL: https://codefronts.com/components/css-checkboxes/ Description: 23 hand-crafted CSS checkboxes — toggles, glow, draw stroke, bouncy pop, glassmorphism, neumorphic, liquid fill, ripple, confetti and more. Mostly pure CSS, copy-paste ready. Demo count: 23 ### 01. Smooth Slide Toggle **Type:** Pure CSS **Description:** Pill toggle with gradient fill. The thumb glides on a cubic-bezier curve. **HTML:** ```html ``` **CSS:** ```css .cb-toggle { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; } .cb-toggle__input { display: none; } .cb-toggle__track { width: 44px; height: 24px; border-radius: 12px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.15); position: relative; transition: background .3s cubic-bezier(.23,1,.32,1), border-color .3s; } .cb-toggle__thumb { position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.3); transition: transform .3s cubic-bezier(.23,1,.32,1); } .cb-toggle__input:checked + .cb-toggle__track { background: linear-gradient(135deg, #7c6cff, #ff6c8a); border-color: transparent; } .cb-toggle__input:checked + .cb-toggle__track .cb-toggle__thumb { transform: translateX(20px); } ``` ### 02. Neon Glow Checkbox **Type:** Pure CSS **Description:** Electric box-shadow glow blooms when checked. The checkmark is an inline SVG. **HTML:** ```html ``` **CSS:** ```css .cb-neon { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; } .cb-neon__input { display: none; } .cb-neon__box { width: 22px; height: 22px; border-radius: 6px; border: 2px solid rgba(124,108,255,.4); display: flex; align-items: center; justify-content: center; color: transparent; transition: all .25s; } .cb-neon__input:checked + .cb-neon__box { background: #7c6cff; border-color: #7c6cff; color: #fff; box-shadow: 0 0 12px rgba(124,108,255,.7), 0 0 24px rgba(124,108,255,.3); } ``` ### 03. Draw Stroke Checkmark **Type:** Pure CSS **Description:** The checkmark draws itself using SVG stroke-dashoffset animation on :checked. **HTML:** ```html ``` **CSS:** ```css .cb-draw { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; } .cb-draw__input { display: none; } .cb-draw__box { width: 24px; height: 24px; border-radius: 7px; border: 2px solid rgba(30,217,138,.35); background: rgba(30,217,138,.05); display: flex; align-items: center; justify-content: center; transition: border-color .3s, background .3s; } .cb-draw__input:checked + .cb-draw__box { border-color: #1ed98a; background: rgba(30,217,138,.12); } .cb-draw__svg { width: 14px; height: 10px; } .cb-draw__path { stroke-dasharray: 22; stroke-dashoffset: 22; transition: stroke-dashoffset .35s cubic-bezier(.23,1,.32,1) .05s; } .cb-draw__input:checked + .cb-draw__box .cb-draw__path { stroke-dashoffset: 0; } ``` ### 04. Bouncy Pop Checkbox **Type:** Pure CSS **Description:** An inner dot springs in with cubic-bezier overshoot, giving an elastic tactile feel. **HTML:** ```html ``` **CSS:** ```css .cb-pop { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; } .cb-pop__input { display: none; } .cb-pop__box { width: 24px; height: 24px; border-radius: 50%; border: 2px solid rgba(245,168,74,.4); display: flex; align-items: center; justify-content: center; transition: border-color .25s; } .cb-pop__dot { width: 10px; height: 10px; border-radius: 50%; background: #f5a84a; transform: scale(0); transition: transform .4s cubic-bezier(.34,1.56,.64,1); } .cb-pop__input:checked + .cb-pop__box { border-color: #f5a84a; } .cb-pop__input:checked + .cb-pop__box .cb-pop__dot { transform: scale(1); } ``` ### 05. Glassmorphism Checkbox **Type:** Pure CSS **Description:** Frosted glass via backdrop-filter. Checked state fills with a translucent gradient. **HTML:** ```html ``` **CSS:** ```css .cb-glass { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; } .cb-glass__input { display: none; } .cb-glass__box { width: 24px; height: 24px; border-radius: 8px; background: rgba(255,255,255,.08); backdrop-filter: blur(8px); border: 1px solid rgba(255,255,255,.2); display: flex; align-items: center; justify-content: center; color: transparent; transition: background .3s, border-color .3s, box-shadow .3s, color .3s; } .cb-glass__input:checked + .cb-glass__box { background: rgba(124,108,255,.4); border-color: rgba(124,108,255,.6); color: #fff; box-shadow: inset 0 1px 0 rgba(255,255,255,.2); } ``` ### 06. Neumorphic Checkbox **Type:** Pure CSS **Description:** Dual box-shadows create extrusion. Checked state inverts to a pressed inset. **HTML:** ```html ``` **CSS:** ```css /* Card background must match: #e0e0e8 */ .cb-neu { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; } .cb-neu__input { display: none; } .cb-neu__box { width: 26px; height: 26px; border-radius: 8px; background: #e0e0e8; color: transparent; display: flex; align-items: center; justify-content: center; box-shadow: 3px 3px 6px rgba(0,0,0,.18), -3px -3px 6px rgba(255,255,255,.7); transition: box-shadow .3s, color .3s; } .cb-neu__input:checked + .cb-neu__box { color: #7c6cff; box-shadow: inset 2px 2px 5px rgba(0,0,0,.15), inset -2px -2px 5px rgba(255,255,255,.6); } ``` ### 07. Liquid Fill Checkbox **Type:** Pure CSS **Description:** A flood fill rises from the bottom using scaleY then reveals a white checkmark. **HTML:** ```html ``` **CSS:** ```css .cb-liquid { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; } .cb-liquid__input { display: none; } .cb-liquid__box { width: 24px; height: 24px; border-radius: 7px; border: 2px solid rgba(61,232,245,.4); position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center; color: transparent; transition: border-color .3s, color .3s; } .cb-liquid__fill { position: absolute; inset: 0; background: linear-gradient(180deg, #3de8f5, #06b6d4); transform: scaleY(0); transform-origin: bottom; transition: transform .35s cubic-bezier(.23,1,.32,1); } .cb-liquid__input:checked + .cb-liquid__box { border-color: #3de8f5; color: #fff; } .cb-liquid__input:checked + .cb-liquid__box .cb-liquid__fill { transform: scaleY(1); } ``` ### 08. Rotating Ring Checkbox **Type:** Pure CSS **Description:** A conic-gradient ring spins in on check. The inner dot scales up simultaneously. **HTML:** ```html ``` **CSS:** ```css .cb-ring { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; } .cb-ring__input { display: none; } .cb-ring__box { width: 26px; height: 26px; border-radius: 50%; border: 2px solid rgba(255,255,255,.1); position: relative; display: flex; align-items: center; justify-content: center; } .cb-ring__halo { position: absolute; inset: -2px; border-radius: 50%; background: conic-gradient( #7c6cff 0%, #ff6c8a 50%, transparent 50%); opacity: 0; transition: opacity .3s; } .cb-ring__dot { width: 10px; height: 10px; border-radius: 50%; background: linear-gradient(135deg,#7c6cff,#ff6c8a); transform: scale(0); transition: transform .35s cubic-bezier(.34,1.56,.64,1) .1s; } .cb-ring__input:checked + .cb-ring__box .cb-ring__halo { opacity: 1; animation: ring-spin .5s cubic-bezier(.23,1,.32,1) forwards; } .cb-ring__input:checked + .cb-ring__box .cb-ring__dot { transform: scale(1); } @keyframes ring-spin { from { transform: rotate(-90deg); opacity: 0; } to { transform: rotate(0deg); opacity: 1; } } @media (prefers-reduced-motion: reduce) { .cb-ring, .cb-ring * { animation: none !important; } } ``` ### 09. Brutalist Checkbox **Type:** Pure CSS **Description:** Hard offset shadow gives physical depth. Checking shifts the box like pressing a button. **HTML:** ```html ``` **CSS:** ```css /* Card background must be light, e.g. #f0ede5 */ .cb-brute { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; } .cb-brute__input { display: none; } .cb-brute__box { width: 24px; height: 24px; border: 2.5px solid #1a1a1a; box-shadow: 3px 3px 0 #1a1a1a; background: #fff; display: flex; align-items: center; justify-content: center; font-size: 14px; color: transparent; cursor: pointer; transition: transform .12s, box-shadow .12s, background .12s, color .12s; } .cb-brute__input:checked + .cb-brute__box { background: #1a1a1a; color: #fff; transform: translate(2px, 2px); box-shadow: 1px 1px 0 #1a1a1a; } ``` ### 10. Gradient Sweep Checkbox **Type:** Pure CSS **Description:** A rainbow gradient sweeps across the box using background-position animation on check. **HTML:** ```html ``` **CSS:** ```css .cb-sweep { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; } .cb-sweep__input { display: none; } .cb-sweep__box { width: 24px; height: 24px; border-radius: 7px; border: 2px solid rgba(255,255,255,.15); background: rgba(255,255,255,.06); display: flex; align-items: center; justify-content: center; color: transparent; transition: border-color .4s, color .4s; } .cb-sweep__input:checked + .cb-sweep__box { border-color: transparent; color: #fff; background: linear-gradient(90deg, #7c6cff, #ff6c8a, #3de8f5, #7c6cff); background-size: 200% 100%; animation: grad-sweep .6s ease forwards; } @keyframes grad-sweep { from { background-position: 100% 0; } to { background-position: 0% 0; } } @media (prefers-reduced-motion: reduce) { .cb-sweep, .cb-sweep * { animation: none !important; } } ``` ### 11. 3D Flip Checkbox **Type:** Pure CSS **Description:** The box rotates on the Y axis using rotateY to reveal a checked face. **HTML:** ```html ``` **CSS:** ```css .cb-flip { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; } .cb-flip__input { display: none; } .cb-flip__box { width: 26px; height: 26px; border-radius: 7px; border: 2px solid rgba(124,108,255,.3); perspective: 80px; position: relative; } .cb-flip__face { position: absolute; inset: 0; border-radius: 5px; background: #7c6cff; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 14px; transform: rotateY(90deg); transform-origin: center; transition: transform .4s cubic-bezier(.23,1,.32,1); } .cb-flip__input:checked + .cb-flip__box .cb-flip__face { transform: rotateY(0deg); } ``` ### 12. Ripple Wave Checkbox **Type:** Pure CSS **Description:** A ring expands outward from the checkbox on check using a scale + fade keyframe. **HTML:** ```html ``` **CSS:** ```css .cb-ripple { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; } .cb-ripple__input { display: none; } .cb-ripple__box { width: 24px; height: 24px; border-radius: 7px; border: 2px solid rgba(255,108,138,.4); position: relative; overflow: visible; display: flex; align-items: center; justify-content: center; color: transparent; transition: background .25s, border-color .25s, color .25s; } .cb-ripple__wave { position: absolute; inset: -4px; border-radius: 11px; border: 2px solid #ff6c8a; opacity: 0; } .cb-ripple__input:checked + .cb-ripple__box { background: #ff6c8a; border-color: #ff6c8a; color: #fff; } .cb-ripple__input:checked + .cb-ripple__box .cb-ripple__wave { animation: ripple-out .5s ease-out forwards; } @keyframes ripple-out { 0% { transform: scale(1); opacity: .8; } 100% { transform: scale(1.6); opacity: 0; } } @media (prefers-reduced-motion: reduce) { .cb-ripple, .cb-ripple * { animation: none !important; } } ``` ### 13. Retro Pixel Checkbox **Type:** Pure CSS **Description:** An 8-bit checkmark built from SVG rects with crispEdges. Scales in with a pop on check. **HTML:** ```html ``` **CSS:** ```css .cb-pixel { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; } .cb-pixel__input { display: none; } .cb-pixel__box { width: 26px; height: 26px; border: 3px solid #1ed98a; display: flex; align-items: center; justify-content: center; overflow: hidden; transition: background .25s; } .cb-pixel__svg { width: 14px; height: 11px; image-rendering: pixelated; image-rendering: crisp-edges; opacity: 0; transform: scale(.5); transition: opacity .2s, transform .3s cubic-bezier(.34,1.56,.64,1); } .cb-pixel__input:checked + .cb-pixel__box { background: rgba(30,217,138,.15); } .cb-pixel__input:checked + .cb-pixel__box .cb-pixel__svg { opacity: 1; transform: scale(1); } ``` ### 14. Strikethrough Checkbox **Type:** Pure CSS **Description:** Checking the box strikes through the label text with a sliding underline. **HTML:** ```html ``` **CSS:** ```css .cb-strike { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; } .cb-strike__input { display: none; } .cb-strike__box { width: 22px; height: 22px; border-radius: 50%; border: 2px solid rgba(255,255,255,.2); background: rgba(255,255,255,.05); display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: transparent; overflow: hidden; transition: background .25s, border-color .25s, color .25s; } .cb-strike__box svg { transform: scale(0); transition: transform .3s cubic-bezier(.34,1.56,.64,1); } .cb-strike__text { position: relative; transition: color .3s; font-size: 14px; } .cb-strike__text::after { content: ""; position: absolute; left: 0; top: 50%; width: 0; height: 1.5px; background: #7c6cff; transition: width .35s cubic-bezier(.23,1,.32,1); } .cb-strike__input:checked + .cb-strike__box { background: #7c6cff; border-color: #7c6cff; color: #fff; } .cb-strike__input:checked + .cb-strike__box svg { transform: scale(1); } .cb-strike__input:checked ~ .cb-strike__text { color: rgba(255, 255, 255, 0.55); } .cb-strike__input:checked ~ .cb-strike__text::after { width: 100%; } ``` ### 15. Gooey Blob Checkbox **Type:** Pure CSS **Description:** A morphing blob shape squishes into view with spring easing when checked. **HTML:** ```html ``` **CSS:** ```css .cb-blob { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; } .cb-blob__input { display: none; } .cb-blob__box { width: 28px; height: 28px; border-radius: 8px; border: 2px solid rgba(124,108,255,.3); display: flex; align-items: center; justify-content: center; overflow: hidden; } .cb-blob__shape { width: 18px; height: 18px; background: linear-gradient(135deg, #7c6cff, #ff6c8a); border-radius: 0; transform: scale(0) rotate(45deg); transition: transform .45s cubic-bezier(.34,1.56,.64,1), border-radius .45s ease; } .cb-blob__input:checked + .cb-blob__box .cb-blob__shape { transform: scale(1) rotate(0deg); border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; } ``` ### 16. Dark Mode Toggle **Type:** Pure CSS **Description:** Moon-to-sun emoji toggle that shifts between a dark and a warm golden background. **HTML:** ```html ``` **CSS:** ```css .cb-darkmode { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; } .cb-darkmode__input { display: none; } .cb-darkmode__track { width: 52px; height: 28px; border-radius: 14px; background: #1a1a2e; border: 1px solid rgba(255,255,255,.1); position: relative; transition: background .4s; } .cb-darkmode__thumb { position: absolute; top: 4px; left: 4px; width: 20px; height: 20px; border-radius: 50%; background: #fff; font-size: 11px; display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 8px rgba(0,0,0,.3); transition: transform .4s cubic-bezier(.23,1,.32,1); } .cb-darkmode__icon::before { content: "\1F319"; } .cb-darkmode__input:checked + .cb-darkmode__track { background: linear-gradient(135deg, #f5a84a, #ffd700); } .cb-darkmode__input:checked + .cb-darkmode__track .cb-darkmode__thumb { transform: translateX(24px); } .cb-darkmode__input:checked + .cb-darkmode__track .cb-darkmode__icon::before { content: "\2600\FE0F"; } ``` ### 17. Pulse Ring Checkbox **Type:** Pure CSS **Description:** A ring pulses outward from the box on check, like a sonar ping. **HTML:** ```html ``` **CSS:** ```css .cb-pulse { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; } .cb-pulse__input { display: none; } .cb-pulse__box { width: 24px; height: 24px; border-radius: 7px; border: 2px solid rgba(61,232,245,.3); position: relative; overflow: visible; display: flex; align-items: center; justify-content: center; color: transparent; transition: background .25s, border-color .25s, color .25s; } .cb-pulse__box::after { content: ""; position: absolute; inset: -6px; border-radius: 13px; border: 2px solid #3de8f5; opacity: 0; } .cb-pulse__input:checked + .cb-pulse__box { background: linear-gradient(135deg, #3de8f5, #06b6d4); border-color: #3de8f5; color: #fff; } .cb-pulse__input:checked + .cb-pulse__box::after { animation: pulse-ring .6s ease-out forwards; } @keyframes pulse-ring { 0% { transform: scale(1); opacity: .8; } 100% { transform: scale(1.5); opacity: 0; } } @media (prefers-reduced-motion: reduce) { .cb-pulse, .cb-pulse * { animation: none !important; } } ``` ### 18. Dash to Check **Type:** Pure CSS **Description:** An indeterminate dash morphs into a checkmark using border rotation on check. **HTML:** ```html ``` **CSS:** ```css .cb-dash { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; } .cb-dash__input { display: none; } .cb-dash__box { width: 24px; height: 24px; border-radius: 7px; border: 2px solid rgba(124,108,255,.4); background: rgba(124,108,255,.08); display: flex; align-items: center; justify-content: center; transition: border-color .3s, background .3s; } .cb-dash__mark { width: 10px; height: 2px; background: #7c6cff; border-radius: 2px; transition: all .35s cubic-bezier(.23,1,.32,1); } .cb-dash__input:checked + .cb-dash__box { border-color: #7c6cff; background: rgba(124,108,255,.18); } .cb-dash__input:checked + .cb-dash__box .cb-dash__mark { width: 12px; height: 12px; background: transparent; border-right: 2.5px solid #7c6cff; border-bottom: 2.5px solid #7c6cff; border-radius: 0; transform: rotate(45deg) translate(-2px,-3px); } ``` ### 19. Multi-State Checkbox **Type:** CSS + JS **Description:** Three visual states — unchecked, partial (amber), and checked (green) — cycled by JS. **HTML:** ```html ``` **CSS:** ```css .cb-multi { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; background: none; border: none; color: #f0eeff; font-size: 14px; padding: 0; } .cb-multi__box { width: 24px; height: 24px; border-radius: 7px; border: 2px solid rgba(255,255,255,.2); display: flex; align-items: center; justify-content: center; color: transparent; transition: all .25s cubic-bezier(.23,1,.32,1); } .cb-multi__tick { transform: scale(0); transition: transform .3s cubic-bezier(.34,1.56,.64,1); } .cb-multi[data-state="1"] .cb-multi__box { background: #f5a84a; border-color: #f5a84a; color: #fff; } .cb-multi[data-state="1"] .cb-multi__tick { transform: scale(.55); } .cb-multi[data-state="2"] .cb-multi__box { background: #1ed98a; border-color: #1ed98a; color: #fff; box-shadow: 0 0 14px rgba(30,217,138,.4); } .cb-multi[data-state="2"] .cb-multi__tick { transform: scale(1); } ``` **JS:** ```js document.querySelectorAll('.cb-multi').forEach(function(btn) { btn.addEventListener('click', function() { var s = (parseInt(btn.dataset.state || '0') + 1) % 3; btn.dataset.state = s; var labels = ['Click to cycle', 'Partial', 'Checked']; btn.querySelector('.cb-multi__label').textContent = labels[s]; }); }); ``` ### 20. Magnetic Checkbox **Type:** CSS + JS **Description:** The checkbox box subtly shifts toward the cursor on hover using JS-driven translate. **HTML:** ```html ``` **CSS:** ```css .cb-magnet { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; } .cb-magnet__input { display: none; } .cb-magnet__box { width: 26px; height: 26px; border-radius: 8px; border: 2px solid rgba(124,108,255,.4); display: flex; align-items: center; justify-content: center; color: transparent; transition: background .25s, border-color .25s, color .25s; will-change: transform; } .cb-magnet__input:checked + .cb-magnet__box { background: #7c6cff; border-color: #7c6cff; color: #fff; } ``` **JS:** ```js document.querySelectorAll('.cb-magnet__box').forEach(function(box) { box.addEventListener('mousemove', function(e) { var r = box.getBoundingClientRect(); var x = (e.clientX - r.left - r.width / 2) * 0.3; var y = (e.clientY - r.top - r.height / 2) * 0.3; box.style.transform = 'translate(' + x + 'px,' + y + 'px)'; }); box.addEventListener('mouseleave', function() { box.style.transform = ''; }); }); ``` ### 21. Confetti Burst Checkbox **Type:** CSS + JS **Description:** Coloured dots explode outward from the checkbox the moment it is checked. **HTML:** ```html ``` **CSS:** ```css .cb-confetti { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; position: relative; } .cb-confetti__input { display: none; } .cb-confetti__box { width: 24px; height: 24px; border-radius: 7px; border: 2px solid rgba(255,108,138,.4); display: flex; align-items: center; justify-content: center; color: transparent; transition: background .25s, border-color .25s, color .25s; } .cb-confetti__input:checked + .cb-confetti__box { background: #ff6c8a; border-color: #ff6c8a; color: #fff; } .cb-dot { position: absolute; width: 5px; height: 5px; border-radius: 50%; pointer-events: none; animation: cb-confetti-burst .55s ease-out forwards; } @keyframes cb-confetti-burst { 0% { transform: translate(0,0) scale(1); opacity: 1; } 100% { transform: translate(var(--tx),var(--ty)) scale(0); opacity: 0; } } @media (prefers-reduced-motion: reduce) { .cb-confetti, .cb-confetti * { animation: none !important; } } ``` **JS:** ```js document.querySelectorAll('.cb-confetti__input').forEach(function(inp) { inp.addEventListener('change', function() { if (!inp.checked) return; var box = inp.nextElementSibling; var colors = ['#7c6cff','#ff6c8a','#1ed98a','#f5a84a','#3de8f5']; for (var i = 0; i < 8; i++) { var dot = document.createElement('span'); dot.className = 'cb-dot'; var angle = (i / 8) * 2 * Math.PI; var dist = 22 + Math.random() * 14; dot.style.cssText = 'background:' + colors[i % colors.length] + ';' + 'left:8px;top:8px;' + '--tx:' + Math.cos(angle) * dist + 'px;' + '--ty:' + Math.sin(angle) * dist + 'px;'; inp.closest('.cb-confetti').appendChild(dot); setTimeout(function(d) { d.remove(); }, 600, dot); } }); }); ``` ### 22. Slide-In Label **Type:** Pure CSS **Description:** A confirmation label slides in from the left when the checkbox is checked. **HTML:** ```html ``` **CSS:** ```css .cb-slidein { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; } .cb-slidein__input { display: none; } .cb-slidein__box { width: 24px; height: 24px; border-radius: 7px; border: 2px solid rgba(30,217,138,.3); display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: transparent; transition: background .25s, border-color .25s, color .25s; } .cb-slidein__text { font-size: 14px; color: #1ed98a; max-width: 0; overflow: hidden; white-space: nowrap; opacity: 0; transition: max-width .4s cubic-bezier(.23,1,.32,1), opacity .4s ease; } .cb-slidein__input:checked + .cb-slidein__box { background: #1ed98a; border-color: #1ed98a; color: #fff; } .cb-slidein__input:checked ~ .cb-slidein__text { max-width: 200px; opacity: 1; } ``` ### 23. Aurora Toggle **Type:** Pure CSS **Description:** A toggle whose track fills with a shifting aurora gradient when active. **HTML:** ```html ``` **CSS:** ```css .cb-aurora { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; } .cb-aurora__input { display: none; } .cb-aurora__track { width: 56px; height: 28px; border-radius: 14px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); position: relative; transition: background .4s, border-color .4s; } .cb-aurora__thumb { position: absolute; top: 4px; left: 4px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.25); transition: transform .4s cubic-bezier(.23,1,.32,1); } .cb-aurora__input:checked + .cb-aurora__track { background: linear-gradient(90deg, #7c6cff, #ff6c8a, #3de8f5, #1ed98a, #7c6cff); background-size: 300% 100%; border-color: transparent; animation: aurora-shift 3s linear infinite; } .cb-aurora__input:checked + .cb-aurora__track .cb-aurora__thumb { transform: translateX(28px); } @keyframes aurora-shift { 0% { background-position: 0% 50%; } 100% { background-position: 100% 50%; } } @media (prefers-reduced-motion: reduce) { .cb-aurora, .cb-aurora * { animation: none !important; } } ``` --- ## 21 CSS Circular & Radial Menu Designs URL: https://codefronts.com/navigation/css-circular-menus/ Description: 21 free CSS circular and radial menu designs — pie, dome, orbital and skeumorphic layouts with copy-paste HTML and CSS. Demo count: 21 ### 01. Mission Hub **Type:** Pure CSS **Description:** A 5-segment half-wheel command surface with curved SVG labels riding the outer rim, hairline wedge dividers, and a context-aware sub-toolbar that swaps icons based on the selected wedge. Pure CSS via :checked + :has(), teal-on-navy cockpit palette. **HTML:** ```html ``` **CSS:** ```css .ccm-sun { --n: 5; --ba: calc(180deg / var(--n)); --r: 110px; position: relative; width: 240px; height: 130px; overflow: visible; font-family: system-ui, sans-serif; } .ccm-sun-wheel { position: absolute; bottom: 0; left: 50%; width: calc(var(--r) * 2); height: var(--r); margin-left: calc(var(--r) * -1); border-radius: var(--r) var(--r) 0 0; background: radial-gradient( farthest-side at 50% 100%, #14b8a6 35%, #1e293b 36%, #1e293b calc(100% - 1px), transparent 100% ); filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.4)); } .ccm-sun-rim { position: absolute; bottom: 0; left: 50%; width: 240px; height: 130px; margin-left: -120px; pointer-events: none; z-index: 1; } .ccm-sun-dividers line { stroke: rgba(94, 234, 212, 0.25); stroke-width: 1; } .ccm-sun-curve { font: 700 9px/1 ui-monospace, monospace; letter-spacing: 0.18em; fill: #cbd5e1; } .ccm-sun-pivot { position: absolute; bottom: 0; left: 50%; width: 70px; height: 35px; margin-left: -35px; border-radius: 35px 35px 0 0; background: radial-gradient(farthest-side at 50% 100%, #5eead4 0%, #14b8a6 70%, #0f766e 100%); box-shadow: 0 -2px 8px rgba(94, 234, 212, 0.35); z-index: 3; } .ccm-sun-arc { position: absolute; bottom: 0; left: 50%; width: 50px; height: var(--r); margin-left: -25px; display: flex; align-items: flex-start; justify-content: center; padding-top: 28px; cursor: pointer; transform-origin: 50% 100%; transform: rotate(calc((var(--i) + 0.5) * var(--ba) - 90deg)); transition: color 0.25s; color: #94a3b8; z-index: 2; } .ccm-sun-ico { display: inline-block; font-size: 22px; line-height: 1; transform: rotate(calc((var(--i) + 0.5) * var(--ba) * -1 + 90deg)); transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1); } .ccm-sun-arc:hover, .ccm-sun-arc:focus-visible { color: #5eead4; } .ccm-sun-arc:hover .ccm-sun-ico, .ccm-sun-arc:focus-visible .ccm-sun-ico { transform: rotate(calc((var(--i) + 0.5) * var(--ba) * -1 + 90deg)) translateY(-3px) scale(1.1); } .ccm-sun:has(#ccm-sun-0:checked) [for="ccm-sun-0"], .ccm-sun:has(#ccm-sun-1:checked) [for="ccm-sun-1"], .ccm-sun:has(#ccm-sun-2:checked) [for="ccm-sun-2"], .ccm-sun:has(#ccm-sun-3:checked) [for="ccm-sun-3"], .ccm-sun:has(#ccm-sun-4:checked) [for="ccm-sun-4"] { color: #5eead4; } .ccm-sun:has(#ccm-sun-0:checked) [for="ccm-sun-0"] .ccm-sun-ico, .ccm-sun:has(#ccm-sun-1:checked) [for="ccm-sun-1"] .ccm-sun-ico, .ccm-sun:has(#ccm-sun-2:checked) [for="ccm-sun-2"] .ccm-sun-ico, .ccm-sun:has(#ccm-sun-3:checked) [for="ccm-sun-3"] .ccm-sun-ico, .ccm-sun:has(#ccm-sun-4:checked) [for="ccm-sun-4"] .ccm-sun-ico { filter: drop-shadow(0 0 6px rgba(94, 234, 212, 0.7)); } .ccm-sun-bar { position: absolute; left: 50%; bottom: calc(var(--r) + 14px); display: flex; gap: 6px; padding: 8px 10px; background: #1e293b; border: 1px solid #334155; border-radius: 12px; transform: translateX(-50%) scale(0); transform-origin: 50% calc(100% + 10px); transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1); z-index: 4; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4); } .ccm-sun-bar::after { content: ""; position: absolute; left: 50%; bottom: -7px; margin-left: -6px; border: 6px solid transparent; border-top-color: #1e293b; } .ccm-sun:has(#ccm-sun-0:checked) .ccm-sun-bar-0, .ccm-sun:has(#ccm-sun-1:checked) .ccm-sun-bar-1, .ccm-sun:has(#ccm-sun-2:checked) .ccm-sun-bar-2, .ccm-sun:has(#ccm-sun-3:checked) .ccm-sun-bar-3, .ccm-sun:has(#ccm-sun-4:checked) .ccm-sun-bar-4 { transform: translateX(-50%) scale(1); } .ccm-sun-sub { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; background: rgba(94, 234, 212, 0.12); color: #5eead4; font: 700 13px/1 ui-monospace, monospace; text-decoration: none; border: 1px solid rgba(94, 234, 212, 0.3); transition: background 0.2s, color 0.2s, transform 0.2s; } .ccm-sun-sub:hover, .ccm-sun-sub:focus-visible { background: #5eead4; color: #0f172a; transform: scale(1.1); } ``` ### 02. Service Orbit **Type:** Pure CSS **Description:** Six service satellites orbit a central disc with an animated pointer that snaps to the active selection. Click any satellite to swap the centre title and rotate the pointer with a spring overshoot. Pure CSS via :checked + :has() — adapted from a service-business radial nav, simplified to remove its 600+ lines of icon paths and JS pointer animation. **HTML:** ```html
Industries Validation Engineering Project Mgmt Manufacturing Automation Learn more →
``` **CSS:** ```css .ccm-svc { --n: 6; --ba: calc(360deg / var(--n)); --r: 105px; --pa: 0deg; position: relative; width: 260px; height: 260px; display: flex; align-items: center; justify-content: center; font-family: system-ui, sans-serif; } .ccm-svc-orbit { position: absolute; width: calc(var(--r) * 2); height: calc(var(--r) * 2); border-radius: 50%; border: 1px dashed rgba(124, 108, 255, 0.18); background: radial-gradient(circle at center, rgba(124, 108, 255, 0.08), transparent 70%); } .ccm-svc-disc { position: relative; width: 110px; height: 110px; border-radius: 50%; background: linear-gradient(135deg, #7c6cff, #a78bfa); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; box-shadow: 0 8px 24px rgba(124, 108, 255, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.2); z-index: 2; } .ccm-svc-title { display: none; font: 700 14px/1.2 system-ui, sans-serif; text-align: center; padding: 0 12px; } .ccm-svc-cta { display: block; margin-top: 8px; padding: 4px 10px; font: 600 10px/1 ui-monospace, monospace; letter-spacing: 0.06em; color: rgba(255, 255, 255, 0.85); border: 1px solid rgba(255, 255, 255, 0.4); border-radius: 999px; cursor: pointer; transition: background 0.2s, color 0.2s; } .ccm-svc-cta:hover { background: #fff; color: #7c6cff; } .ccm-svc:has(#ccm-svc-0:checked) .ccm-svc-t-0, .ccm-svc:has(#ccm-svc-1:checked) .ccm-svc-t-1, .ccm-svc:has(#ccm-svc-2:checked) .ccm-svc-t-2, .ccm-svc:has(#ccm-svc-3:checked) .ccm-svc-t-3, .ccm-svc:has(#ccm-svc-4:checked) .ccm-svc-t-4, .ccm-svc:has(#ccm-svc-5:checked) .ccm-svc-t-5 { display: block; } .ccm-svc-pointer { position: absolute; width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 2px solid #7c6cff; box-shadow: 0 0 0 4px rgba(124, 108, 255, 0.18); transform: rotate(var(--pa)) translateY(calc(var(--r) * -0.55)); transform-origin: 50% 50%; transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1); z-index: 3; } .ccm-svc:has(#ccm-svc-0:checked) { --pa: 0deg; } .ccm-svc:has(#ccm-svc-1:checked) { --pa: 60deg; } .ccm-svc:has(#ccm-svc-2:checked) { --pa: 120deg; } .ccm-svc:has(#ccm-svc-3:checked) { --pa: 180deg; } .ccm-svc:has(#ccm-svc-4:checked) { --pa: 240deg; } .ccm-svc:has(#ccm-svc-5:checked) { --pa: 300deg; } .ccm-svc-sat { position: absolute; width: 44px; height: 44px; border-radius: 50%; background: #1f1f2e; border: 1px solid rgba(124, 108, 255, 0.4); color: #c4b5fd; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; transform: rotate(calc(var(--i) * var(--ba))) translateY(calc(var(--r) * -1)) rotate(calc(var(--i) * var(--ba) * -1)); transition: background 0.25s, color 0.25s, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s; z-index: 4; } .ccm-svc-sat span { font-size: 18px; line-height: 1; } .ccm-svc-sat:hover, .ccm-svc-sat:focus-visible { background: #2a2a3e; color: #fff; transform: rotate(calc(var(--i) * var(--ba))) translateY(calc(var(--r) * -1)) rotate(calc(var(--i) * var(--ba) * -1)) scale(1.15); } .ccm-svc:has(#ccm-svc-0:checked) [for="ccm-svc-0"], .ccm-svc:has(#ccm-svc-1:checked) [for="ccm-svc-1"], .ccm-svc:has(#ccm-svc-2:checked) [for="ccm-svc-2"], .ccm-svc:has(#ccm-svc-3:checked) [for="ccm-svc-3"], .ccm-svc:has(#ccm-svc-4:checked) [for="ccm-svc-4"], .ccm-svc:has(#ccm-svc-5:checked) [for="ccm-svc-5"] { background: #7c6cff; color: #fff; border-color: #fff; box-shadow: 0 0 0 4px rgba(124, 108, 255, 0.3); transform: rotate(calc(var(--i) * var(--ba))) translateY(calc(var(--r) * -1)) rotate(calc(var(--i) * var(--ba) * -1)) scale(1.15); } ``` ### 03. Tactile Dial **Type:** Pure CSS **Description:** A brushed-steel rotary dial flanked by 5 icons arranged on a downward arc. Click any icon and the whole dial rotates left or right (-90°/-45°/0°/+45°/+90°) to "point" at the active selection, with a soft white halo around the chosen icon. Pure CSS via :checked + :has() + a CSS custom property for the rotation angle — adapted from a hardware-knob nav, simplified to drop ~10 PNG dependencies and ~100 lines of jQuery. **HTML:** ```html ``` **CSS:** ```css .ccm-tac { --rot: 0deg; position: relative; width: 280px; height: 240px; display: flex; align-items: flex-end; justify-content: center; font-family: system-ui, sans-serif; } .ccm-tac-dial { position: absolute; bottom: 20px; left: 50%; width: 130px; height: 130px; margin-left: -65px; border-radius: 50%; background: repeating-conic-gradient(from 0deg, #c9cfd7 0deg, #8b929c 1deg, #c9cfd7 2deg), linear-gradient(180deg, #c9cfd7 0%, #2b2f3e 46%, #2b2f3e 54%, #b0b7c1 100%); background-blend-mode: overlay, normal; box-shadow: 0 12px 24px rgba(0, 0, 0, 0.4), 0 4px 8px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.3), inset 0 -2px 4px rgba(0, 0, 0, 0.4); transform: rotate(var(--rot)); transform-origin: center; transition: transform 0.7s cubic-bezier(0.65, 0, 0.35, 1); z-index: 2; } .ccm-tac-bevel { position: absolute; inset: 12px; border-radius: 50%; background: radial-gradient(circle at 30% 30%, #e8ecf0, #6b7280 70%, #2b2f3e); box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.4), inset 0 -2px 4px rgba(0, 0, 0, 0.5); } .ccm-tac-mark { position: absolute; top: 8px; left: 50%; width: 4px; height: 16px; margin-left: -2px; background: linear-gradient(180deg, #fff, #94a3b8); border-radius: 2px; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.6); z-index: 3; } .ccm-tac:has(#ccm-tac-0:checked) { --rot: -50deg; } .ccm-tac:has(#ccm-tac-1:checked) { --rot: -25deg; } .ccm-tac:has(#ccm-tac-2:checked) { --rot: 0deg; } .ccm-tac:has(#ccm-tac-3:checked) { --rot: 25deg; } .ccm-tac:has(#ccm-tac-4:checked) { --rot: 50deg; } .ccm-tac-arc { position: absolute; bottom: -40px; left: 50%; width: 250px; height: 250px; margin-left: -125px; border-radius: 50%; border: 1px dashed rgba(255, 255, 255, 0.08); pointer-events: none; -webkit-mask: linear-gradient(180deg, #000 0%, #000 50%, transparent 50%); mask: linear-gradient(180deg, #000 0%, #000 50%, transparent 50%); } .ccm-tac-i { position: absolute; bottom: calc(20px + 65px); left: 50%; width: 38px; height: 38px; margin: -19px; border-radius: 50%; background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.1); color: #94a3b8; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; transform: rotate(calc((var(--p) - 2) * 25deg)) translateY(-125px); transform-origin: 50% 50%; transition: background 0.25s, color 0.25s, box-shadow 0.3s, border-color 0.25s, transform 0.25s; z-index: 4; } .ccm-tac-i span { font-size: 17px; line-height: 1; display: inline-block; transform: rotate(calc((var(--p) - 2) * -25deg)); } .ccm-tac-i:hover, .ccm-tac-i:focus-visible { background: rgba(255, 255, 255, 0.08); color: #fff; border-color: rgba(255, 255, 255, 0.25); transform: rotate(calc((var(--p) - 2) * 25deg)) translateY(-130px); } .ccm-tac:has(#ccm-tac-0:checked) [for="ccm-tac-0"], .ccm-tac:has(#ccm-tac-1:checked) [for="ccm-tac-1"], .ccm-tac:has(#ccm-tac-2:checked) [for="ccm-tac-2"], .ccm-tac:has(#ccm-tac-3:checked) [for="ccm-tac-3"], .ccm-tac:has(#ccm-tac-4:checked) [for="ccm-tac-4"] { background: rgba(255, 255, 255, 0.16); color: #fff; border-color: rgba(255, 255, 255, 0.5); box-shadow: 0 0 24px 6px rgba(255, 255, 255, 0.18); transform: rotate(calc((var(--p) - 2) * 25deg)) translateY(-132px); } ``` ### 04. Fan Reveal **Type:** Pure CSS **Description:** Six wedges of a 6-color pie that fan open from a closed stack on first paint with a staggered "deal the cards" reveal — each wedge rotates from 0° to its 60° slot with a per-wedge delay. Hover lifts the wedge outward, click locks the selection. Pure CSS keyframe animation, zero JS — adapted from a jQuery-driven menu and rebuilt with proper 60° clip-path geometry. **HTML:** ```html ``` **CSS:** ```css .ccm-fan { position: relative; width: 220px; height: 220px; display: flex; align-items: center; justify-content: center; font-family: "Lato", system-ui, sans-serif; filter: drop-shadow(0 0 18px rgba(255, 255, 255, 0.08)); } .ccm-fan-w { position: absolute; inset: 0; background: radial-gradient(circle at 50% 5%, rgba(255, 255, 255, 0.35), transparent 55%), radial-gradient(circle at 50% 30%, var(--c) 0%, color-mix(in srgb, var(--c), #000 35%) 100%); cursor: pointer; clip-path: polygon(50% 50%, 25% 6.7%, 37.06% 1.92%, 50% 0%, 62.94% 1.92%, 75% 6.7%); transform-origin: 50% 50%; transform: rotate(0deg); animation: ccm-fan-deal 0.9s cubic-bezier(0.49, 0.24, 0.32, 0.96) forwards; animation-delay: calc(var(--i) * 0.08s); transition: filter 0.3s, transform 0.3s; } .ccm-fan-w span { position: absolute; top: 24px; left: 50%; display: inline-block; color: #fff; font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; transform: translateX(-50%); pointer-events: none; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6), 0 0 8px rgba(255, 255, 255, 0.25); white-space: nowrap; } .ccm-fan-w:hover, .ccm-fan-w:focus-visible { filter: brightness(1.18) saturate(1.2) drop-shadow(0 0 12px color-mix(in srgb, var(--c), white 20%)); z-index: 2; } .ccm-fan:has(#ccm-fan-0:checked) [for="ccm-fan-0"], .ccm-fan:has(#ccm-fan-1:checked) [for="ccm-fan-1"], .ccm-fan:has(#ccm-fan-2:checked) [for="ccm-fan-2"], .ccm-fan:has(#ccm-fan-3:checked) [for="ccm-fan-3"], .ccm-fan:has(#ccm-fan-4:checked) [for="ccm-fan-4"], .ccm-fan:has(#ccm-fan-5:checked) [for="ccm-fan-5"] { filter: brightness(1.45) saturate(1.5) drop-shadow(0 0 22px color-mix(in srgb, var(--c), white 40%)) drop-shadow(0 0 6px color-mix(in srgb, var(--c), white 60%)); z-index: 3; transform: rotate(calc(var(--i) * 60deg)) scale(1.06); } .ccm-fan:has(#ccm-fan-0:checked) [for="ccm-fan-0"] span, .ccm-fan:has(#ccm-fan-1:checked) [for="ccm-fan-1"] span, .ccm-fan:has(#ccm-fan-2:checked) [for="ccm-fan-2"] span, .ccm-fan:has(#ccm-fan-3:checked) [for="ccm-fan-3"] span, .ccm-fan:has(#ccm-fan-4:checked) [for="ccm-fan-4"] span, .ccm-fan:has(#ccm-fan-5:checked) [for="ccm-fan-5"] span { font-size: 13px; letter-spacing: 0.1em; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7), 0 0 12px rgba(255, 255, 255, 0.6); } .ccm-fan-hub { position: absolute; width: 60px; height: 60px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.18), transparent 55%), radial-gradient(circle at center, #1f1f2e 0%, #0a0a14 100%); border: 1px solid rgba(255, 255, 255, 0.08); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), inset 0 -2px 6px rgba(0, 0, 0, 0.5), 0 0 24px rgba(124, 108, 255, 0.25), 0 4px 12px rgba(0, 0, 0, 0.5); z-index: 4; pointer-events: none; } @media (prefers-reduced-motion: reduce) { .ccm-fan-w { animation: none; transform: rotate(calc(var(--i) * 60deg)); } } @keyframes ccm-fan-deal { from { transform: rotate(0deg); } to { transform: rotate(calc(var(--i) * 60deg)); } } ``` ### 05. Petal Fan **Type:** Pure CSS **Description:** Six action buttons fan out across a 180° upper arc from a central FAB on hover, each with a staggered scale-in. Pure CSS via :hover + transition-delay per child. **HTML:** ```html ``` **CSS:** ```css .ccm-petal { position: relative; width: 220px; height: 140px; } .ccm-petal-fab { position: absolute; left: 50%; bottom: 0; width: 52px; height: 52px; border-radius: 50%; background: linear-gradient(135deg, #7c6cff, #a78bfa); color: #fff; font-size: 26px; line-height: 52px; text-align: center; cursor: pointer; transform: translateX(-50%); transition: transform 0.4s; box-shadow: 0 6px 18px rgba(124, 108, 255, 0.4); z-index: 2; } .ccm-petal-i { position: absolute; left: 50%; bottom: 12px; width: 36px; height: 36px; border-radius: 50%; background: #1f1f2e; color: #c4b5fd; font-size: 14px; display: flex; align-items: center; justify-content: center; text-decoration: none; border: 1px solid rgba(255, 255, 255, 0.08); transform: translate(-50%, 0) rotate(0) translateY(0) rotate(0); opacity: 0; transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s; } .ccm-petal:hover .ccm-petal-fab, .ccm-petal-t:checked + .ccm-petal-fab { transform: translateX(-50%) rotate(45deg); } .ccm-petal:hover .ccm-petal-i, .ccm-petal-t:checked ~ .ccm-petal-i { transform: translate(-50%, 0) rotate(var(--a)) translateY(-72px) rotate(calc(var(--a) * -1)); opacity: 1; } .ccm-petal-i:nth-of-type(1) { transition-delay: 0.05s; } .ccm-petal-i:nth-of-type(2) { transition-delay: 0.1s; } .ccm-petal-i:nth-of-type(3) { transition-delay: 0.15s; } .ccm-petal-i:nth-of-type(4) { transition-delay: 0.2s; } .ccm-petal-i:nth-of-type(5) { transition-delay: 0.25s; } .ccm-petal-i:nth-of-type(6) { transition-delay: 0.3s; } ``` ### 06. Full Circle Wheel **Type:** Pure CSS **Description:** Eight items evenly distributed around a 360° ring, all visible at rest. Hover any item to scale it up; the central icon stays anchored. Pure trig via CSS variables. **HTML:** ```html
A B C D E F G H
``` **CSS:** ```css .ccm-wheel { position: relative; width: 200px; height: 200px; display: flex; align-items: center; justify-content: center; } .ccm-wheel-c { width: 44px; height: 44px; border-radius: 50%; background: linear-gradient(135deg, #7c6cff, #ff6c8a); color: #fff; font-size: 18px; display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 0 0 4px rgba(124, 108, 255, 0.18); } .ccm-wheel-i { position: absolute; top: 50%; left: 50%; width: 32px; height: 32px; margin: -16px; border-radius: 50%; background: #1f1f2e; color: #c4b5fd; font: 700 12px/32px ui-monospace, monospace; text-align: center; text-decoration: none; border: 1px solid rgba(124, 108, 255, 0.3); transform: rotate(var(--a)) translate(78px) rotate(calc(var(--a) * -1)); transition: transform 0.25s, background 0.2s, color 0.2s; } .ccm-wheel-i:hover, .ccm-wheel-i:focus-visible { background: #7c6cff; color: #fff; transform: rotate(var(--a)) translate(78px) rotate(calc(var(--a) * -1)) scale(1.4); z-index: 2; } ``` ### 07. Pie Slice Selector **Type:** Pure CSS **Description:** Four pie slices, each a labelled clickable wedge. Real per-slice hit area via border-radius corners (no overlapping squares) — only the visible pie wedge receives hover and click. **HTML:** ```html ``` **CSS:** ```css .ccm-pie { position: relative; width: 170px; height: 170px; } .ccm-pie-s { position: absolute; width: 50%; height: 50%; background: var(--c); text-decoration: none; cursor: pointer; transition: filter 0.2s, transform 0.2s; display: flex; } .ccm-pie-tr { top: 0; right: 0; border-top-right-radius: 100% 100%; transform-origin: 0% 100%; } .ccm-pie-br { bottom: 0; right: 0; border-bottom-right-radius: 100% 100%; transform-origin: 0% 0%; } .ccm-pie-bl { bottom: 0; left: 0; border-bottom-left-radius: 100% 100%; transform-origin: 100% 0%; } .ccm-pie-tl { top: 0; left: 0; border-top-left-radius: 100% 100%; transform-origin: 100% 100%; } .ccm-pie-s span { margin: auto; padding: 8px 18px; font: 700 12px/1 system-ui, sans-serif; color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3); } .ccm-pie-s:hover, .ccm-pie-s:focus-visible { filter: brightness(1.18) saturate(1.15); transform: scale(1.04); z-index: 2; } .ccm-pie-h { position: absolute; top: 50%; left: 50%; width: 56px; height: 56px; margin: -28px; border-radius: 50%; background: #15151d; border: 3px solid #17171f; pointer-events: none; z-index: 3; } ``` ### 08. Donut Sectors **Type:** Pure CSS **Description:** A 6-sector SVG donut with curved labels following each arc via textPath. On hover the sector pulls outward (split effect), the label brightens, and a subtle scale animation runs. Real hit-tested wedges. **HTML:** ```html PLAN DESIGN BUILD TEST SHIP LEARN MENU ``` **CSS:** ```css .ccm-donut { width: 200px; height: 200px; display: block; overflow: visible; font-family: ui-monospace, "SF Mono", monospace; } .ccm-donut-s { cursor: pointer; transform-origin: 100px 100px; transform: scale(1) translate(0, 0); transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.2s; text-decoration: none; animation: ccm-donut-pop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) backwards; } .ccm-donut-s path { stroke: #17171f; stroke-width: 2; transition: filter 0.2s; } .ccm-donut-l { font: 700 10px/1 ui-monospace, monospace; fill: #fff; letter-spacing: 0.18em; pointer-events: none; opacity: 0.92; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4); } .ccm-donut-c { font: 700 9px/1 ui-monospace, monospace; fill: #c4b5fd; letter-spacing: 0.16em; pointer-events: none; } .ccm-donut-s:nth-of-type(1):hover, .ccm-donut-s:nth-of-type(1):focus-visible { transform: translate(4px, -4px); } .ccm-donut-s:nth-of-type(2):hover, .ccm-donut-s:nth-of-type(2):focus-visible { transform: translate(6px, 0px); } .ccm-donut-s:nth-of-type(3):hover, .ccm-donut-s:nth-of-type(3):focus-visible { transform: translate(4px, 4px); } .ccm-donut-s:nth-of-type(4):hover, .ccm-donut-s:nth-of-type(4):focus-visible { transform: translate(-4px, 4px); } .ccm-donut-s:nth-of-type(5):hover, .ccm-donut-s:nth-of-type(5):focus-visible { transform: translate(-6px, 0px); } .ccm-donut-s:nth-of-type(6):hover, .ccm-donut-s:nth-of-type(6):focus-visible { transform: translate(-4px, -4px); } .ccm-donut-s:hover path, .ccm-donut-s:focus-visible path { filter: brightness(1.18) saturate(1.1); } .ccm-donut-s:nth-of-type(1) { animation-delay: 0.05s; } .ccm-donut-s:nth-of-type(2) { animation-delay: 0.1s; } .ccm-donut-s:nth-of-type(3) { animation-delay: 0.15s; } .ccm-donut-s:nth-of-type(4) { animation-delay: 0.2s; } .ccm-donut-s:nth-of-type(5) { animation-delay: 0.25s; } .ccm-donut-s:nth-of-type(6) { animation-delay: 0.3s; } @keyframes ccm-donut-pop { from { opacity: 0; transform: scale(0.6); } to { opacity: 1; transform: scale(1); } } ``` ### 09. Half-Donut Speed Dial **Type:** Pure CSS **Description:** A bottom-anchored half-arc FAB that fans 5 actions upward in a 180° spread. Each item lands on the arc at an even angle. Pure CSS via :checked. **HTML:** ```html
A B C D E
``` **CSS:** ```css .ccm-half { position: relative; width: 220px; height: 130px; display: flex; align-items: flex-end; justify-content: center; } .ccm-half-fab { width: 56px; height: 56px; border-radius: 50%; background: linear-gradient(135deg, #2ecc8a, #00e5ff); color: #0a0f0c; font-weight: 700; font-size: 24px; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: transform 0.4s; z-index: 2; box-shadow: 0 6px 22px rgba(46, 204, 138, 0.4); } .ccm-half input:checked + .ccm-half-fab { transform: rotate(180deg); } .ccm-half-i { position: absolute; bottom: 28px; left: 50%; width: 36px; height: 36px; margin: -18px; border-radius: 50%; background: #1f1f2e; border: 1.5px solid #2ecc8a; color: #2ecc8a; font: 700 12px/36px ui-monospace, monospace; text-align: center; text-decoration: none; transform: translate(0, 0) rotate(var(--a)) translate(0) rotate(calc(var(--a) * -1)); opacity: 0; transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s; } .ccm-half input:checked ~ .ccm-half-i { transform: translate(0, 0) rotate(var(--a)) translate(80px) rotate(calc(var(--a) * -1)); opacity: 1; } .ccm-half-i:nth-of-type(1) { transition-delay: 0.05s; } .ccm-half-i:nth-of-type(2) { transition-delay: 0.1s; } .ccm-half-i:nth-of-type(3) { transition-delay: 0.15s; } .ccm-half-i:nth-of-type(4) { transition-delay: 0.2s; } .ccm-half-i:nth-of-type(5) { transition-delay: 0.25s; } ``` ### 10. Glass Dome **Type:** Pure CSS **Description:** A glass hemisphere with backdrop-blur and an inner highlight; menu items orbit along the dome edge. Items lift on hover. The hero of the dome family. **HTML:** ```html ``` **CSS:** ```css .ccm-glass-bg { padding: 30px; border-radius: 14px; background: linear-gradient(135deg, #7c6cff 0%, #ff6c8a 100%); } .ccm-glass { position: relative; width: 200px; height: 110px; } .ccm-glass-dome { position: absolute; bottom: 0; left: 0; right: 0; height: 110px; border-radius: 100px 100px 0 0; background: rgba(255, 255, 255, 0.18); border: 1px solid rgba(255, 255, 255, 0.45); border-bottom: none; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), inset 0 -10px 30px rgba(255, 255, 255, 0.1); } .ccm-glass-dome::before { content: ""; position: absolute; top: 8px; left: 20%; right: 50%; height: 24px; border-radius: 50%; background: linear-gradient(180deg, rgba(255, 255, 255, 0.55), transparent); filter: blur(2px); } .ccm-glass-i { position: absolute; bottom: 0; left: 50%; width: 32px; height: 32px; margin-left: -16px; border-radius: 50%; background: rgba(255, 255, 255, 0.25); border: 1px solid rgba(255, 255, 255, 0.5); color: #fff; display: flex; align-items: center; justify-content: center; text-decoration: none; transform: rotate(var(--a)) translate(95px) rotate(calc(var(--a) * -1)); transition: transform 0.3s, background 0.2s; backdrop-filter: blur(6px); } .ccm-glass-i:hover { background: rgba(255, 255, 255, 0.45); transform: rotate(var(--a)) translate(95px) rotate(calc(var(--a) * -1)) scale(1.18) translateY(-6px); } ``` ### 11. Holographic Dome **Type:** Pure CSS **Description:** A translucent dome with an iridescent rim that rotates continuously via @property-animated conic gradient. The dome itself stays still; only the rim shimmers. **HTML:** ```html ``` **CSS:** ```css .ccm-holo { position: relative; width: 200px; height: 110px; } .ccm-holo-rim { position: absolute; bottom: -2px; left: -2px; right: -2px; height: 114px; border-radius: 100px 100px 0 0; background: conic-gradient(from var(--ccm-holo-a), #7c6cff, #ff6c8a, #2ecc8a, #00e5ff, #7c6cff); animation: ccm-holo-spin 4s linear infinite; filter: blur(0.5px); } .ccm-holo-dome { position: absolute; bottom: 0; left: 0; right: 0; height: 110px; border-radius: 100px 100px 0 0; background: rgba(15, 15, 25, 0.7); backdrop-filter: blur(8px); border-bottom: none; } .ccm-holo-i { position: absolute; bottom: 0; left: 50%; width: 32px; height: 32px; margin-left: -16px; border-radius: 50%; background: #15151d; border: 1px solid rgba(255, 255, 255, 0.18); color: #c4b5fd; display: flex; align-items: center; justify-content: center; text-decoration: none; transform: rotate(var(--a)) translate(95px) rotate(calc(var(--a) * -1)); transition: transform 0.3s, color 0.2s; } .ccm-holo-i:hover { color: #fff; transform: rotate(var(--a)) translate(95px) rotate(calc(var(--a) * -1)) scale(1.2); } @media (prefers-reduced-motion: reduce) { .ccm-holo-rim, .ccm-snow-flakes, .ccm-orbit-sat, .ccm-orbit-i, .ccm-solar-o, .ccm-solar-o a, .ccm-tri-grp, .ccm-vinyl-disc, .ccm-bh-disk, .ccm-neb-cloud, .ccm-neb-i { animation: none !important; } } @keyframes ccm-holo-spin { to { --ccm-holo-a: 360deg; } } ``` ### 12. Single Satellite Orbit **Type:** Pure CSS **Description:** One satellite continuously orbits the central FAB. Hover the FAB to pause the orbit, click to "lock in" the satellite at its current angle. Pure CSS via :hover paused state. **HTML:** ```html ``` **CSS:** ```css .ccm-orbit { position: relative; width: 180px; height: 180px; display: flex; align-items: center; justify-content: center; } .ccm-orbit-track { position: absolute; inset: 20px; border-radius: 50%; border: 1px dashed rgba(124, 108, 255, 0.3); } .ccm-orbit-c { width: 48px; height: 48px; border-radius: 50%; background: linear-gradient(135deg, #7c6cff, #a78bfa); color: #fff; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; font-size: 18px; z-index: 2; box-shadow: 0 0 0 4px rgba(124, 108, 255, 0.18); } .ccm-orbit-sat { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; animation: ccm-orbit-spin 5s linear infinite; } .ccm-orbit-i { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; background: #1f1f2e; color: #c4b5fd; text-decoration: none; border: 1px solid rgba(124, 108, 255, 0.4); transform: translate(70px); animation: ccm-orbit-counter 5s linear infinite; } .ccm-orbit:hover .ccm-orbit-sat, .ccm-orbit:hover .ccm-orbit-i { animation-play-state: paused; } @media (prefers-reduced-motion: reduce) { .ccm-holo-rim, .ccm-snow-flakes, .ccm-orbit-sat, .ccm-orbit-i, .ccm-solar-o, .ccm-solar-o a, .ccm-tri-grp, .ccm-vinyl-disc, .ccm-bh-disk, .ccm-neb-cloud, .ccm-neb-i { animation: none !important; } } @keyframes ccm-orbit-spin { to { transform: rotate(360deg); } } @keyframes ccm-orbit-counter { to { transform: translate(70px) rotate(-360deg); } } ``` ### 13. Solar System **Type:** Pure CSS **Description:** A central "sun" + 4 "planets" at decreasing orbit radii, each labelled, each orbiting at a different speed (Kepler-style — closer = faster). Real CSS animation, no JS. **HTML:** ```html ``` **CSS:** ```css .ccm-solar { position: relative; width: 240px; height: 240px; display: flex; align-items: center; justify-content: center; } .ccm-solar-c { width: 36px; height: 36px; border-radius: 50%; background: radial-gradient(circle at 30% 30%, #ffd479, #f5a84a); display: inline-flex; align-items: center; justify-content: center; color: rgba(255, 255, 255, 0.85); font-size: 20px; text-decoration: none; box-shadow: 0 0 24px #f5a84a; z-index: 5; } .ccm-solar-o { position: absolute; border-radius: 50%; border: 1px dashed rgba(255, 255, 255, 0.08); animation: ccm-solar-spin linear infinite; } .ccm-solar-o1 { inset: 20px; animation-duration: 11s; } .ccm-solar-o2 { inset: 50px; animation-duration: 8s; } .ccm-solar-o3 { inset: 80px; animation-duration: 6s; } .ccm-solar-o4 { inset: 105px; animation-duration: 4s; } .ccm-solar-pos { position: absolute; top: 0; left: 50%; width: 0; height: 0; } .ccm-solar-p { position: absolute; top: 0; left: 0; width: 24px; height: 24px; margin: -12px; border-radius: 50%; background: #1f1f2e; color: #c4b5fd; font-size: 13px; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; border: 1px solid rgba(124, 108, 255, 0.4); animation: ccm-solar-counter linear infinite; z-index: 6; } .ccm-solar-o1 .ccm-solar-p { animation-duration: 11s; } .ccm-solar-o2 .ccm-solar-p { animation-duration: 8s; } .ccm-solar-o3 .ccm-solar-p { animation-duration: 6s; } .ccm-solar-o4 .ccm-solar-p { animation-duration: 4s; } .ccm-solar-p:hover { background: #7c6cff; color: #fff; } .ccm-solar:hover .ccm-solar-o, .ccm-solar:hover .ccm-solar-p { animation-play-state: paused; } @media (prefers-reduced-motion: reduce) { .ccm-holo-rim, .ccm-snow-flakes, .ccm-orbit-sat, .ccm-orbit-i, .ccm-solar-o, .ccm-solar-o a, .ccm-tri-grp, .ccm-vinyl-disc, .ccm-bh-disk, .ccm-neb-cloud, .ccm-neb-i { animation: none !important; } } @keyframes ccm-solar-spin { to { transform: rotate(360deg); } } @keyframes ccm-solar-counter { to { transform: rotate(-360deg); } } ``` ### 14. Hexagonal Honeycomb **Type:** Pure CSS **Description:** Six hexagonal items arranged around a central hex via real geometry (clip-path polygon). Each cell highlights independently. Honeycomb pattern with mathematical precision. **HTML:** ```html ``` **CSS:** ```css .ccm-hex { position: relative; width: 200px; height: 200px; display: flex; align-items: center; justify-content: center; } .ccm-hex-c, .ccm-hex-i { width: 50px; height: 58px; clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%); display: inline-flex; align-items: center; justify-content: center; font: 700 11px/1 system-ui, sans-serif; text-decoration: none; transition: transform 0.2s, background 0.2s; } .ccm-hex-c { background: linear-gradient(135deg, #7c6cff, #a78bfa); color: #fff; position: relative; z-index: 2; } .ccm-hex-i { position: absolute; top: 50%; left: 50%; margin: -29px -25px; background: #1f1f2e; color: #c4b5fd; transform: rotate(var(--a)) translate(64px) rotate(calc(var(--a) * -1)); } .ccm-hex-i:hover, .ccm-hex-i:focus-visible { background: #2a2a3e; color: #fff; transform: rotate(var(--a)) translate(64px) rotate(calc(var(--a) * -1)) scale(1.1); } ``` ### 15. Rotating Triangle Trio **Type:** Pure CSS **Description:** Three triangle items rotate together in a trio formation. Hover any triangle to lift it forward. The whole group rotates slowly on idle for visual interest. **HTML:** ```html
A B C
``` **CSS:** ```css .ccm-tri { position: relative; width: 180px; height: 180px; display: flex; align-items: center; justify-content: center; } .ccm-tri-grp { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; animation: ccm-tri-spin 16s linear infinite; } .ccm-tri-i { position: absolute; width: 48px; height: 48px; display: inline-flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #ff6c8a, #f5a84a); color: #fff; font: 700 14px/1 system-ui, sans-serif; text-decoration: none; clip-path: polygon(50% 5%, 95% 95%, 5% 95%); transform: rotate(var(--a)) translate(60px); transition: transform 0.3s; } .ccm-tri-i:hover { transform: rotate(var(--a)) translate(60px) scale(1.2); filter: drop-shadow(0 4px 12px rgba(255, 108, 138, 0.5)); z-index: 2; } .ccm-tri-c { width: 14px; height: 14px; border-radius: 50%; background: #1f1f2e; border: 2px solid #7c6cff; position: relative; z-index: 1; } @media (prefers-reduced-motion: reduce) { .ccm-holo-rim, .ccm-snow-flakes, .ccm-orbit-sat, .ccm-orbit-i, .ccm-solar-o, .ccm-solar-o a, .ccm-tri-grp, .ccm-vinyl-disc, .ccm-bh-disk, .ccm-neb-cloud, .ccm-neb-i { animation: none !important; } } @keyframes ccm-tri-spin { to { transform: rotate(360deg); } } ``` ### 16. Vinyl Record **Type:** Pure CSS **Description:** A spinning vinyl record menu. The disc rotates continuously; menu items sit on the label area. Pause on hover via animation-play-state. Classic music-app metaphor. **HTML:** ```html ``` **CSS:** ```css .ccm-vinyl { position: relative; width: 200px; height: 200px; display: flex; align-items: center; justify-content: center; } .ccm-vinyl-disc { width: 200px; height: 200px; border-radius: 50%; background: radial-gradient(circle at center, #1a1a1a 30%, transparent 31%), repeating-radial-gradient(circle at center, #0a0a0a 0, #0a0a0a 1px, #1a1a1a 1px, #1a1a1a 3px); position: relative; animation: ccm-vinyl-spin 8s linear infinite; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.05), 0 8px 24px rgba(0, 0, 0, 0.5); } .ccm-vinyl-disc::after { content: ""; position: absolute; top: 50%; left: 50%; width: 8px; height: 8px; margin: -4px; border-radius: 50%; background: #f5a84a; } .ccm-vinyl-label { position: absolute; top: 50%; left: 50%; width: 100px; height: 100px; margin: -50px; border-radius: 50%; background: linear-gradient(135deg, #ff6c8a, #f5a84a); } .ccm-vinyl-i { position: absolute; top: 50%; left: 50%; width: 22px; height: 22px; margin: -11px; border-radius: 50%; background: rgba(0, 0, 0, 0.45); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; text-decoration: none; transform: rotate(var(--a)) translate(28px) rotate(calc(var(--a) * -1)); } .ccm-vinyl-i:hover { background: rgba(0, 0, 0, 0.7); } .ccm-vinyl:hover .ccm-vinyl-disc { animation-play-state: paused; } @media (prefers-reduced-motion: reduce) { .ccm-holo-rim, .ccm-snow-flakes, .ccm-orbit-sat, .ccm-orbit-i, .ccm-solar-o, .ccm-solar-o a, .ccm-tri-grp, .ccm-vinyl-disc, .ccm-bh-disk, .ccm-neb-cloud, .ccm-neb-i { animation: none !important; } } @keyframes ccm-vinyl-spin { to { transform: rotate(360deg); } } ``` ### 17. Compass Rose **Type:** Pure CSS **Description:** A nautical compass rose with N/E/S/W labels and a needle that points at the active direction. Hover any direction to rotate the needle smoothly via :has(). **HTML:** ```html
``` **CSS:** ```css .ccm-compass { position: relative; width: 190px; height: 190px; display: flex; align-items: center; justify-content: center; } .ccm-compass-face { width: 160px; height: 160px; border-radius: 50%; background: radial-gradient(circle at center, #2a2a3e, #15151d); border: 2px solid rgba(212, 175, 55, 0.5); box-shadow: inset 0 0 24px rgba(212, 175, 55, 0.2), 0 4px 16px rgba(0, 0, 0, 0.4); } .ccm-compass-needle { position: absolute; top: 50%; left: 50%; width: 4px; height: 70px; margin: -35px -2px; background: linear-gradient(180deg, #ff3d6e 0 50%, #d4af37 50% 100%); transform-origin: center; transform: rotate(0deg); transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1); border-radius: 2px; } .ccm-compass:has(#ccm-compass-n:checked) .ccm-compass-needle { transform: rotate(0deg); } .ccm-compass:has(#ccm-compass-e:checked) .ccm-compass-needle { transform: rotate(90deg); } .ccm-compass:has(#ccm-compass-s:checked) .ccm-compass-needle { transform: rotate(180deg); } .ccm-compass:has(#ccm-compass-w:checked) .ccm-compass-needle { transform: rotate(270deg); } .ccm-compass-i { position: absolute; top: 50%; left: 50%; width: 28px; height: 28px; margin: -14px; border-radius: 50%; background: rgba(212, 175, 55, 0.18); color: #ffd479; font: 700 12px/28px ui-monospace, monospace; text-align: center; cursor: pointer; border: 1px solid rgba(212, 175, 55, 0.4); transform: rotate(var(--a)) translate(80px) rotate(calc(var(--a) * -1)); transition: background 0.2s, color 0.2s, transform 0.2s; } .ccm-compass-i:hover { background: rgba(212, 175, 55, 0.4); color: #fff; } ``` ### 18. Iris Aperture **Type:** Pure CSS **Description:** A camera-lens iris with 6 blades. On hover the blades "stop down" via clip-path + rotation, revealing menu items around the exposed diaphragm. **HTML:** ```html ``` **CSS:** ```css .ccm-iris { position: relative; width: 200px; height: 200px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: radial-gradient(circle at center, #0a0a14 30%, #15151d); border: 4px solid #2a2a3e; } .ccm-iris-blade { position: absolute; top: 50%; left: 50%; width: 100px; height: 100px; margin: -50px; background: linear-gradient(135deg, #2a2a3e, #15151d); clip-path: polygon(50% 0%, 100% 50%, 50% 50%); transform: rotate(var(--a)) translateY(-30px); transform-origin: center; transition: transform 0.5s cubic-bezier(0.65, 0, 0.35, 1); } .ccm-iris:hover .ccm-iris-blade { transform: rotate(calc(var(--a) + 30deg)) translateY(-50px); } .ccm-iris-i { position: absolute; top: 50%; left: 50%; width: 28px; height: 28px; margin: -14px; border-radius: 50%; background: #1f1f2e; color: #00e5ff; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; border: 1px solid rgba(0, 229, 255, 0.4); transform: rotate(var(--a)) translate(70px) rotate(calc(var(--a) * -1)); opacity: 0; transition: opacity 0.4s ease 0.25s; z-index: 2; } .ccm-iris:hover .ccm-iris-i { opacity: 1; } .ccm-iris-i:hover { background: #00e5ff; color: #0a0a14; } ``` ### 19. Black Hole **Type:** Pure CSS **Description:** Items orbit a glowing accretion-disk singularity at all times. On hover the disk pulses brighter and items lift outward slightly — a gravitational "release". Items stay clickable throughout. **HTML:** ```html
A B C D E F
``` **CSS:** ```css .ccm-bh { position: relative; width: 200px; height: 200px; display: flex; align-items: center; justify-content: center; } .ccm-bh-disk { position: absolute; top: 50%; left: 50%; width: 110px; height: 110px; margin: -55px; border-radius: 50%; background: conic-gradient(from 0deg, #d4af37, #ff6c8a, #7c6cff, #d4af37); filter: blur(6px); animation: ccm-bh-spin 8s linear infinite; transition: filter 0.4s; z-index: 1; } .ccm-bh:hover .ccm-bh-disk { filter: blur(4px) brightness(1.3); } .ccm-bh-core { position: absolute; top: 50%; left: 50%; width: 56px; height: 56px; margin: -28px; border-radius: 50%; background: #000; box-shadow: 0 0 30px 8px rgba(0, 0, 0, 0.7); z-index: 2; } .ccm-bh-i { position: absolute; top: 50%; left: 50%; width: 30px; height: 30px; margin: -15px; border-radius: 50%; background: #1f1f2e; color: #ffd479; display: inline-flex; align-items: center; justify-content: center; font: 700 12px/1 ui-monospace, monospace; text-decoration: none; border: 1px solid rgba(212, 175, 55, 0.5); transform: rotate(var(--a)) translate(80px) rotate(calc(var(--a) * -1)); transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.2s, color 0.2s, box-shadow 0.3s; z-index: 3; } .ccm-bh:hover .ccm-bh-i { transform: rotate(var(--a)) translate(92px) rotate(calc(var(--a) * -1)); box-shadow: 0 0 12px rgba(212, 175, 55, 0.45); } .ccm-bh-i:hover, .ccm-bh-i:focus-visible { background: #ffd479; color: #0a0a14; transform: rotate(var(--a)) translate(96px) rotate(calc(var(--a) * -1)) scale(1.2); z-index: 4; } @media (prefers-reduced-motion: reduce) { .ccm-holo-rim, .ccm-snow-flakes, .ccm-orbit-sat, .ccm-orbit-i, .ccm-solar-o, .ccm-solar-o a, .ccm-tri-grp, .ccm-vinyl-disc, .ccm-bh-disk, .ccm-neb-cloud, .ccm-neb-i { animation: none !important; } } @keyframes ccm-bh-spin { to { transform: rotate(360deg); } } ``` ### 20. Chronometer **Type:** Pure CSS **Description:** An analog watch face with menu items at hour positions. The second-hand sweeps continuously; click any hour position to "set" the menu (hand snaps to that hour). **HTML:** ```html
``` **CSS:** ```css .ccm-chrono { position: relative; width: 190px; height: 190px; display: flex; align-items: center; justify-content: center; --hand: 90deg; } .ccm-chrono-face { width: 170px; height: 170px; border-radius: 50%; background: radial-gradient(circle at 30% 30%, #f5f5f5, #d8d8d8); border: 3px solid #2a2a3e; box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 4px 12px rgba(0, 0, 0, 0.4); } .ccm-chrono-hand { position: absolute; top: 50%; left: 50%; width: 3px; height: 60px; margin-left: -1.5px; background: #2a2a3e; border-radius: 1.5px; transform-origin: top center; transform: rotate(var(--hand)); transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1); } .ccm-chrono-hand::after { content: ""; position: absolute; bottom: -3px; left: -2px; width: 7px; height: 7px; border-radius: 50%; background: #ff3d6e; } .ccm-chrono:has(#ccm-chrono-3:checked) { --hand: -90deg; } .ccm-chrono:has(#ccm-chrono-6:checked) { --hand: 0deg; } .ccm-chrono:has(#ccm-chrono-9:checked) { --hand: 90deg; } .ccm-chrono:has(#ccm-chrono-12:checked) { --hand: 180deg; } .ccm-chrono-i { position: absolute; top: 50%; left: 50%; width: 28px; height: 28px; margin: -14px; border-radius: 50%; background: rgba(0, 0, 0, 0.05); color: #2a2a3e; font: 700 13px/28px Georgia, serif; text-align: center; cursor: pointer; transform: rotate(var(--a)) translate(70px) rotate(calc(var(--a) * -1)); transition: background 0.2s, color 0.2s; } .ccm-chrono-i:hover { background: rgba(255, 61, 110, 0.15); color: #ff3d6e; } ``` ### 21. Nebula Cloud **Type:** Pure CSS **Description:** Items float in a soft glowing nebula cloud with no fixed grid positions. Each item has a subtle drift animation; hovering pulls it forward and brightens the surrounding glow. **HTML:** ```html ``` **CSS:** ```css .ccm-neb { position: relative; width: 220px; height: 180px; display: flex; align-items: center; justify-content: center; } .ccm-neb-cloud { position: absolute; inset: 0; background: radial-gradient(60% 50% at 30% 40%, rgba(124, 108, 255, 0.45), transparent 70%), radial-gradient(50% 40% at 70% 60%, rgba(255, 108, 138, 0.4), transparent 70%), radial-gradient(45% 35% at 50% 30%, rgba(46, 184, 138, 0.3), transparent 70%); filter: blur(10px); animation: ccm-neb-drift 10s ease-in-out infinite alternate; } .ccm-neb-i { position: absolute; top: 50%; left: 50%; width: 36px; height: 36px; margin: -18px; border-radius: 50%; background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.18); color: #fff; font-size: 14px; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; transform: translate(var(--x), var(--y)); animation: ccm-neb-float 4s ease-in-out var(--d) infinite alternate; transition: transform 0.3s, background 0.2s, box-shadow 0.3s; z-index: 2; } .ccm-neb-i:hover { background: rgba(255, 255, 255, 0.25); box-shadow: 0 0 20px rgba(255, 255, 255, 0.4); transform: translate(var(--x), var(--y)) scale(1.3); animation-play-state: paused; } @media (prefers-reduced-motion: reduce) { .ccm-holo-rim, .ccm-snow-flakes, .ccm-orbit-sat, .ccm-orbit-i, .ccm-solar-o, .ccm-solar-o a, .ccm-tri-grp, .ccm-vinyl-disc, .ccm-bh-disk, .ccm-neb-cloud, .ccm-neb-i { animation: none !important; } } @keyframes ccm-neb-drift { 0% { transform: translate(0,0) scale(1); } 100% { transform: translate(8px, -6px) scale(1.05); } } @keyframes ccm-neb-float { to { transform: translate(calc(var(--x) + 4px), calc(var(--y) - 4px)); } } ``` --- ## 18 CSS Close Buttons URL: https://codefronts.com/components/css-close-buttons/ Description: 18 hand-coded CSS close buttons — rotate, magnetic cross, liquid pop, glitch, ink ripple, hold-to-confirm, origami crease and more. Pure CSS, drop-in ready. Demo count: 18 ### 01. Origami Crease **Type:** Pure CSS **Description:** The X is rendered as two thin paper-fold creases — on hover the button collapses inward via clip-path like an origami fold, leaving a tight diamond that vanishes. **HTML:** ```html ``` **CSS:** ```css .ccb-origami { width: 40px; height: 40px; border: none; background: linear-gradient(135deg, #f0eeff 0%, #e8e4ff 50%, #d4ccff 51%, #c4b8ff 100%); position: relative; cursor: pointer; clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%); transition: clip-path 0.45s cubic-bezier(0.65,0,0.35,1), transform 0.45s; box-shadow: 0 2px 6px rgba(60,40,140,0.2), inset -1px -1px 0 rgba(0,0,0,0.04); } .ccb-origami span { position: absolute; top: 50%; left: 50%; width: 18px; height: 1.5px; background: #1a1a2e; border-radius: 1px; box-shadow: 0 0.5px 0 rgba(255,255,255,0.6); } .ccb-origami span:nth-child(1) { transform: translate(-50%,-50%) rotate(45deg); } .ccb-origami span:nth-child(2) { transform: translate(-50%,-50%) rotate(-45deg); } .ccb-origami:hover { clip-path: polygon(50% 12%, 88% 50%, 50% 88%, 12% 50%); transform: rotate(45deg) scale(0.9); } .ccb-origami:active { clip-path: polygon(50% 50%, 50% 50%, 50% 50%, 50% 50%); transform: rotate(90deg) scale(0.6); } ``` ### 02. Lock Tumble **Type:** CSS + JS **Description:** A padlock chrome with a shackle that tumbles open on click — the X aligns into the lock body as it unlocks. Premium choice for "remove from saved" and "unlock to dismiss" flows. **HTML:** ```html ``` **CSS:** ```css .ccb-lock { width: 40px; height: 48px; border: none; background: transparent; position: relative; cursor: pointer; padding: 0; } .ccb-lock-shackle { position: absolute; top: 4px; left: 50%; width: 20px; height: 18px; border: 2.5px solid #f5a623; border-bottom: none; border-radius: 10px 10px 0 0; transform: translateX(-50%); transition: transform 0.4s cubic-bezier(0.34,1.56,0.64,1), border-color 0.3s; transform-origin: bottom right; } .ccb-lock-body { position: absolute; bottom: 0; left: 50%; width: 30px; height: 26px; background: #f5a623; border-radius: 5px; transform: translateX(-50%); transition: background 0.3s; } .ccb-lock-x1, .ccb-lock-x2 { position: absolute; top: 50%; left: 50%; width: 12px; height: 2px; background: #1a1a2e; border-radius: 1px; transition: transform 0.4s cubic-bezier(0.34,1.56,0.64,1); } .ccb-lock-x1 { transform: translate(-50%,-50%) rotate(45deg); } .ccb-lock-x2 { transform: translate(-50%,-50%) rotate(-45deg); } .ccb-lock.is-open .ccb-lock-shackle { transform: translateX(-50%) rotate(40deg) translate(4px,-2px); border-color: #2ecc8a; } .ccb-lock.is-open .ccb-lock-body { background: #2ecc8a; } .ccb-lock.is-open .ccb-lock-x1 { transform: translate(-50%,-50%) rotate(0deg) scaleX(1.1); } .ccb-lock.is-open .ccb-lock-x2 { transform: translate(-50%,-50%) rotate(90deg) scaleX(1.1); } .ccb-lock:hover .ccb-lock-shackle { border-color: #fbbf24; } ``` **JS:** ```js document.querySelectorAll('.ccb-lock').forEach(function(btn) { btn.addEventListener('click', function() { btn.classList.toggle('is-open'); }); }); ``` ### 03. Rotate Out **Type:** Pure CSS **Description:** A timeless close button — the X rotates 90° and the chrome scales up subtly on hover. The benchmark every dismiss button is measured against. **HTML:** ```html ``` **CSS:** ```css .ccb-rotate { width: 36px; height: 36px; border: none; border-radius: 50%; background: rgba(255,255,255,0.06); position: relative; cursor: pointer; transition: background 0.2s, transform 0.3s; } .ccb-rotate span { position: absolute; top: 50%; left: 50%; width: 16px; height: 2px; background: #f0eeff; border-radius: 2px; transform-origin: center; } .ccb-rotate span:nth-child(1) { transform: translate(-50%,-50%) rotate(45deg); } .ccb-rotate span:nth-child(2) { transform: translate(-50%,-50%) rotate(-45deg); } .ccb-rotate:hover { background: rgba(255,108,138,0.18); transform: rotate(90deg) scale(1.08); } .ccb-rotate:hover span { background: #ff6c8a; } ``` ### 04. Magnetic Cross **Type:** Pure CSS **Description:** Two stubby horizontal bars sit apart at rest — on hover they magnetically pull toward each other and snap into a perfect X. Hyper-clean micro-interaction. **HTML:** ```html ``` **CSS:** ```css .ccb-magnet { width: 38px; height: 38px; border: 1px solid rgba(124,108,255,0.3); border-radius: 8px; background: #17171f; position: relative; cursor: pointer; transition: border-color 0.25s, background 0.25s; } .ccb-magnet span { position: absolute; top: 50%; left: 50%; width: 6px; height: 2px; background: #7c6cff; border-radius: 2px; transition: width 0.25s ease, transform 0.3s cubic-bezier(0.34,1.56,0.64,1); } .ccb-magnet span:nth-child(1) { transform: translate(-130%,-50%) rotate(0deg); } .ccb-magnet span:nth-child(2) { transform: translate(30%,-50%) rotate(0deg); } .ccb-magnet:hover { border-color: #7c6cff; background: rgba(124,108,255,0.08); } .ccb-magnet:hover span { width: 16px; } .ccb-magnet:hover span:nth-child(1) { transform: translate(-50%,-50%) rotate(45deg); } .ccb-magnet:hover span:nth-child(2) { transform: translate(-50%,-50%) rotate(-45deg); } ``` ### 05. Liquid Pop **Type:** Pure CSS **Description:** The circular blob morphs into a soft squashed pill on hover, then springs back releasing a tighter X. Feels rubbery and alive. **HTML:** ```html ``` **CSS:** ```css .ccb-liquid { width: 38px; height: 38px; border: none; border-radius: 50%; background: linear-gradient(135deg, #7c6cff, #a78bfa); position: relative; cursor: pointer; transition: border-radius 0.4s cubic-bezier(0.68,-0.55,0.27,1.55), transform 0.4s cubic-bezier(0.68,-0.55,0.27,1.55); } .ccb-liquid span { position: absolute; top: 50%; left: 50%; width: 14px; height: 2px; background: #fff; border-radius: 2px; transition: transform 0.35s cubic-bezier(0.68,-0.55,0.27,1.55); } .ccb-liquid span:nth-child(1) { transform: translate(-50%,-50%) rotate(45deg); } .ccb-liquid span:nth-child(2) { transform: translate(-50%,-50%) rotate(-45deg); } .ccb-liquid:hover { border-radius: 30% 70% 70% 30% / 50% 50% 50% 50%; transform: scale(0.92); } .ccb-liquid:hover span:nth-child(1) { transform: translate(-50%,-50%) rotate(135deg) scaleX(1.15); } .ccb-liquid:hover span:nth-child(2) { transform: translate(-50%,-50%) rotate(-135deg) scaleX(1.15); } ``` ### 06. Glitch Cross **Type:** Pure CSS **Description:** RGB-split glitch shudders across the X every few seconds — a constant micro-twitch that screams sci-fi UI panel. **HTML:** ```html ``` **CSS:** ```css .ccb-glitch { width: 38px; height: 38px; border: 1px solid rgba(46,204,138,0.3); background: #0c0c12; font-size: 16px; font-weight: 700; cursor: pointer; position: relative; color: #2ecc8a; } .ccb-g-x { position: relative; z-index: 1; } .ccb-glitch::before, .ccb-glitch::after { content: '✕'; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 16px; font-weight: 700; } .ccb-glitch::before { color: #ff6c8a; clip-path: polygon(0 0, 100% 0, 100% 45%, 0 45%); animation: ccb-gl-t 2.4s infinite steps(2); } .ccb-glitch::after { color: #7c6cff; clip-path: polygon(0 55%, 100% 55%, 100% 100%, 0 100%); animation: ccb-gl-b 2.4s infinite steps(2); } .ccb-glitch:hover::before, .ccb-glitch:hover::after { animation-duration: 0.3s; } @keyframes ccb-gl-t { 0%,90% { transform: translateX(0); } 92% { transform: translateX(-3px); } 94% { transform: translateX(3px); } 100% { transform: translateX(0); } } @keyframes ccb-gl-b { 0%,90% { transform: translateX(0); } 92% { transform: translateX(3px); } 94% { transform: translateX(-3px); } 100% { transform: translateX(0); } } @media (prefers-reduced-motion: reduce) { .ccb-glitch, .ccb-glitch * { animation: none !important; } } ``` ### 07. Trash Compactor **Type:** CSS + JS **Description:** Click and the entire button squashes vertically like a trash compactor crushing it into nothing. A satisfying physical metaphor for dismissal. **HTML:** ```html ``` **CSS:** ```css .ccb-compact { width: 40px; height: 40px; border: none; border-radius: 8px; background: linear-gradient(180deg, #2a2a3e, #1a1a28); box-shadow: 0 4px 12px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.06); position: relative; cursor: pointer; transition: transform 0.35s cubic-bezier(0.55,0,0.45,1), opacity 0.35s; transform-origin: center bottom; } .ccb-compact span { position: absolute; top: 50%; left: 50%; width: 16px; height: 2px; background: #f0eeff; border-radius: 2px; } .ccb-compact span:nth-child(1) { transform: translate(-50%,-50%) rotate(45deg); } .ccb-compact span:nth-child(2) { transform: translate(-50%,-50%) rotate(-45deg); } .ccb-compact.is-crushed { transform: scaleY(0.08) scaleX(1.3); opacity: 0; } ``` **JS:** ```js document.querySelectorAll('.ccb-compact').forEach(function(btn) { btn.addEventListener('click', function() { btn.classList.add('is-crushed'); setTimeout(function() { btn.classList.remove('is-crushed'); }, 800); }); }); ``` ### 08. Inkwell Ripple **Type:** CSS + JS **Description:** Click triggers a dark ink drop that ripples outward and swallows the X for a moment. The X re-emerges when the ink drains. **HTML:** ```html ``` **CSS:** ```css .ccb-ink { width: 40px; height: 40px; border: none; border-radius: 50%; background: #f0eeff; position: relative; cursor: pointer; overflow: hidden; } .ccb-ink span { position: absolute; top: 50%; left: 50%; width: 16px; height: 2px; background: #1a1a28; border-radius: 2px; z-index: 2; transition: background 0.3s; } .ccb-ink span:nth-child(1) { transform: translate(-50%,-50%) rotate(45deg); } .ccb-ink span:nth-child(2) { transform: translate(-50%,-50%) rotate(-45deg); } .ccb-ink-drop { position: absolute; top: 50%; left: 50%; width: 8px; height: 8px; background: #1a1a28; border-radius: 50%; transform: translate(-50%,-50%) scale(0); z-index: 1; pointer-events: none; } .ccb-ink.is-poured .ccb-ink-drop { animation: ccb-ink-pour 0.9s ease-out forwards; } .ccb-ink.is-poured span { background: #f0eeff; } @keyframes ccb-ink-pour { 0% { transform: translate(-50%,-50%) scale(0); } 40% { transform: translate(-50%,-50%) scale(8); } 60% { transform: translate(-50%,-50%) scale(8); } 100% { transform: translate(-50%,-50%) scale(0); } } @media (prefers-reduced-motion: reduce) { .ccb-ink, .ccb-ink * { animation: none !important; } } ``` **JS:** ```js document.querySelectorAll('.ccb-ink').forEach(function(btn) { btn.addEventListener('click', function() { if (btn.classList.contains('is-poured')) return; var drop = document.createElement('span'); drop.className = 'ccb-ink-drop'; btn.appendChild(drop); btn.classList.add('is-poured'); setTimeout(function() { btn.classList.remove('is-poured'); drop.remove(); }, 900); }); }); ``` ### 09. Particle Burst **Type:** CSS + JS **Description:** On click, eight small dots fan out radially from the centre and fade — the X dissolves into particles. CSS-driven, fully animated. **HTML:** ```html ``` **CSS:** ```css .ccb-burst { width: 40px; height: 40px; border: none; border-radius: 50%; background: #ff6c8a; box-shadow: 0 4px 18px rgba(255,108,138,0.4); position: relative; cursor: pointer; transition: transform 0.2s, box-shadow 0.2s; } .ccb-burst:hover { transform: scale(1.08); box-shadow: 0 6px 24px rgba(255,108,138,0.55); } .ccb-burst-x { position: absolute; top: 50%; left: 50%; width: 16px; height: 2px; background: #fff; border-radius: 2px; transition: opacity 0.15s; } .ccb-burst-x:nth-child(1) { transform: translate(-50%,-50%) rotate(45deg); } .ccb-burst-x:nth-child(2) { transform: translate(-50%,-50%) rotate(-45deg); } .ccb-burst.is-burst .ccb-burst-x { opacity: 0; } .ccb-burst-particle { position: absolute; top: 50%; left: 50%; width: 5px; height: 5px; background: #fff; border-radius: 50%; pointer-events: none; animation: ccb-particle 0.7s ease-out forwards; } @keyframes ccb-particle { 0% { transform: translate(-50%,-50%) rotate(var(--a)) translateX(0) scale(1); opacity: 1; } 100% { transform: translate(-50%,-50%) rotate(var(--a)) translateX(28px) scale(0); opacity: 0; } } @media (prefers-reduced-motion: reduce) { .ccb-burst, .ccb-burst * { animation: none !important; } } ``` **JS:** ```js document.querySelectorAll('.ccb-burst').forEach(function(btn) { btn.addEventListener('click', function() { if (btn.classList.contains('is-burst')) return; btn.classList.add('is-burst'); for (var i = 0; i < 8; i++) { var p = document.createElement('span'); p.className = 'ccb-burst-particle'; p.style.setProperty('--a', (i * 45) + 'deg'); btn.appendChild(p); (function(node) { setTimeout(function() { node.remove(); }, 700); })(p); } setTimeout(function() { btn.classList.remove('is-burst'); }, 700); }); }); ``` ### 10. Snap Cross **Type:** Pure CSS **Description:** Two diagonal bars fly in from off-button and snap together with an overshoot bounce on first paint. Perfect for things that just appeared. **HTML:** ```html ``` **CSS:** ```css .ccb-snap { width: 38px; height: 38px; border: 1px solid rgba(245,166,35,0.3); border-radius: 8px; background: rgba(245,166,35,0.12); position: relative; cursor: pointer; overflow: hidden; transition: background 0.2s; } .ccb-snap:hover { background: rgba(245,166,35,0.22); } .ccb-snap span { position: absolute; top: 50%; left: 50%; width: 16px; height: 2px; background: #f5a623; border-radius: 2px; animation: ccb-snap-tl 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) infinite; } .ccb-snap span:nth-child(1) { animation-name: ccb-snap-tl; } .ccb-snap span:nth-child(2) { animation-name: ccb-snap-tr; animation-delay: 0.05s; } @keyframes ccb-snap-tl { 0% { transform: translate(-300%,-300%) rotate(45deg); opacity: 0; } 60%,100% { transform: translate(-50%,-50%) rotate(45deg); opacity: 1; } } @keyframes ccb-snap-tr { 0% { transform: translate(200%,-300%) rotate(-45deg); opacity: 0; } 60%,100% { transform: translate(-50%,-50%) rotate(-45deg); opacity: 1; } } @media (prefers-reduced-motion: reduce) { .ccb-snap, .ccb-snap * { animation: none !important; } } ``` ### 11. Neon Etch **Type:** Pure CSS **Description:** An outlined neon X sits inside a transparent ring with a slow breathing glow — built for dark dashboards and admin panels. **HTML:** ```html ``` **CSS:** ```css .ccb-neon { width: 40px; height: 40px; border: 1.5px solid #2ecc8a; border-radius: 50%; background: transparent; box-shadow: 0 0 8px rgba(46,204,138,0.35), inset 0 0 8px rgba(46,204,138,0.15); position: relative; cursor: pointer; animation: ccb-neon-breathe 2.4s ease-in-out infinite; transition: transform 0.2s; } .ccb-neon:hover { transform: scale(1.1); } .ccb-neon span { position: absolute; top: 50%; left: 50%; width: 16px; height: 2px; background: #2ecc8a; border-radius: 2px; box-shadow: 0 0 6px rgba(46,204,138,0.7); } .ccb-neon span:nth-child(1) { transform: translate(-50%,-50%) rotate(45deg); } .ccb-neon span:nth-child(2) { transform: translate(-50%,-50%) rotate(-45deg); } @keyframes ccb-neon-breathe { 0%,100% { box-shadow: 0 0 8px rgba(46,204,138,0.35), inset 0 0 8px rgba(46,204,138,0.15); } 50% { box-shadow: 0 0 18px rgba(46,204,138,0.7), inset 0 0 14px rgba(46,204,138,0.3); } } @media (prefers-reduced-motion: reduce) { .ccb-neon, .ccb-neon * { animation: none !important; } } ``` ### 12. Ribbon Tag **Type:** Pure CSS **Description:** Looks like a removable label/sticker — the X is integrated into a tag-shaped chrome with a notched left edge. Perfect for filter chips. **HTML:** ```html ``` **CSS:** ```css .ccb-tag { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px 7px 18px; border: none; background: rgba(124,108,255,0.15); color: #a78bfa; font-size: 13px; font-weight: 600; cursor: pointer; clip-path: polygon(8px 0, 100% 0, 100% 100%, 8px 100%, 0 50%); transition: background 0.2s, color 0.2s; } .ccb-tag:hover { background: rgba(124,108,255,0.3); color: #fff; } .ccb-tag-x { position: relative; width: 12px; height: 12px; border-radius: 50%; background: rgba(255,255,255,0.18); display: inline-block; transition: background 0.2s; } .ccb-tag-x::before, .ccb-tag-x::after { content: ''; position: absolute; top: 50%; left: 50%; width: 7px; height: 1.5px; background: currentColor; border-radius: 1px; } .ccb-tag-x::before { transform: translate(-50%,-50%) rotate(45deg); } .ccb-tag-x::after { transform: translate(-50%,-50%) rotate(-45deg); } .ccb-tag:hover .ccb-tag-x { background: rgba(255,255,255,0.3); } ``` ### 13. Fold Away **Type:** Pure CSS **Description:** On hover the button physically folds away on its Y-axis like a closing book — 3D rotateY with perspective for a tactile dismissal. **HTML:** ```html ``` **CSS:** ```css .ccb-fold { width: 40px; height: 40px; border: none; border-radius: 8px; background: linear-gradient(135deg, #7c6cff, #ff6c8a); position: relative; cursor: pointer; perspective: 200px; transform-style: preserve-3d; transition: transform 0.5s cubic-bezier(0.65,0,0.35,1); } .ccb-fold span { position: absolute; top: 50%; left: 50%; width: 16px; height: 2px; background: #fff; border-radius: 2px; backface-visibility: hidden; } .ccb-fold span:nth-child(1) { transform: translate(-50%,-50%) rotate(45deg); } .ccb-fold span:nth-child(2) { transform: translate(-50%,-50%) rotate(-45deg); } .ccb-fold:hover { transform: rotateY(75deg); } .ccb-fold:active { transform: rotateY(180deg); } ``` ### 14. Hold to Confirm **Type:** CSS + JS **Description:** A safety net for destructive actions — press and hold for 800ms while the ring fills clockwise, release early to cancel. Releases on full ring. **HTML:** ```html ``` **CSS:** ```css .ccb-hold { width: 40px; height: 40px; border: none; border-radius: 50%; background: rgba(255,108,138,0.12); position: relative; cursor: pointer; transition: background 0.2s; } .ccb-hold:hover { background: rgba(255,108,138,0.2); } .ccb-hold-ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); pointer-events: none; } .ccb-hold-ring circle { fill: none; stroke: #ff6c8a; stroke-width: 2; stroke-dasharray: 113; stroke-dashoffset: 113; transition: stroke-dashoffset 0.05s linear; } .ccb-hold.is-holding .ccb-hold-ring circle { transition: stroke-dashoffset 0.8s linear; stroke-dashoffset: 0; } .ccb-hold span { position: absolute; top: 50%; left: 50%; width: 14px; height: 2px; background: #ff6c8a; border-radius: 2px; } .ccb-hold span:nth-child(2) { transform: translate(-50%,-50%) rotate(45deg); } .ccb-hold span:nth-child(3) { transform: translate(-50%,-50%) rotate(-45deg); } .ccb-hold.is-confirmed { background: rgba(46,204,138,0.25); transform: scale(1.1); } .ccb-hold.is-confirmed span { background: #2ecc8a; } .ccb-hold.is-confirmed .ccb-hold-ring circle { stroke: #2ecc8a; } ``` **JS:** ```js document.querySelectorAll('.ccb-hold').forEach(function(btn) { var timer; function start() { btn.classList.add('is-holding'); timer = setTimeout(function() { btn.classList.remove('is-holding'); btn.classList.add('is-confirmed'); setTimeout(function() { btn.classList.remove('is-confirmed'); }, 600); }, 800); } function cancel() { clearTimeout(timer); btn.classList.remove('is-holding'); } btn.addEventListener('mousedown', start); btn.addEventListener('touchstart', start, { passive: true }); btn.addEventListener('mouseup', cancel); btn.addEventListener('mouseleave', cancel); btn.addEventListener('touchend', cancel); }); ``` ### 15. Toast Dismiss **Type:** CSS + JS **Description:** A fully-fledged toast notification with an X — clicking slides the toast off-canvas to the right while fading, the way a real production toast behaves. **HTML:** ```html
Saved successfully
``` **CSS:** ```css .ccb-toast { display: inline-flex; align-items: center; gap: 10px; padding: 10px 8px 10px 14px; border-radius: 10px; background: #1a1a28; border: 1px solid rgba(46,204,138,0.25); color: #f0eeff; font-size: 13px; font-weight: 500; box-shadow: 0 6px 20px rgba(0,0,0,0.4); transition: transform 0.45s cubic-bezier(0.55,0,0.45,1), opacity 0.45s; } .ccb-toast.is-out { transform: translateX(120%); opacity: 0; } .ccb-toast-dot { width: 8px; height: 8px; border-radius: 50%; background: #2ecc8a; box-shadow: 0 0 8px rgba(46,204,138,0.5); } .ccb-toast-msg { white-space: nowrap; } .ccb-toast-x { width: 22px; height: 22px; border: none; border-radius: 6px; background: transparent; position: relative; cursor: pointer; transition: background 0.2s; } .ccb-toast-x:hover { background: rgba(255,255,255,0.08); } .ccb-toast-x span { position: absolute; top: 50%; left: 50%; width: 10px; height: 1.5px; background: #6b6987; border-radius: 1px; transition: background 0.2s; } .ccb-toast-x:hover span { background: #f0eeff; } .ccb-toast-x span:nth-child(1) { transform: translate(-50%,-50%) rotate(45deg); } .ccb-toast-x span:nth-child(2) { transform: translate(-50%,-50%) rotate(-45deg); } ``` **JS:** ```js document.querySelectorAll('.ccb-toast').forEach(function(toast) { var x = toast.querySelector('.ccb-toast-x'); if (!x) return; x.addEventListener('click', function() { toast.classList.add('is-out'); setTimeout(function() { toast.classList.remove('is-out'); }, 1400); }); }); ``` ### 16. Modal Corner **Type:** Pure CSS **Description:** A larger absolute-positioned corner X — the kind you put on lightboxes and image galleries. Hover leaves a soft purple trail behind the cursor. **HTML:** ```html ``` **CSS:** ```css .ccb-corner { width: 48px; height: 48px; border: 1px solid rgba(255,255,255,0.1); border-radius: 50%; background: rgba(255,255,255,0.06); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); position: relative; cursor: pointer; overflow: hidden; transition: background 0.25s, border-color 0.25s; } .ccb-corner::before { content: ''; position: absolute; inset: -50%; background: radial-gradient(circle at center, rgba(124,108,255,0.4) 0%, transparent 60%); opacity: 0; transition: opacity 0.3s; } .ccb-corner:hover { background: rgba(255,255,255,0.1); border-color: rgba(124,108,255,0.4); } .ccb-corner:hover::before { opacity: 1; } .ccb-corner span { position: absolute; top: 50%; left: 50%; width: 18px; height: 2px; background: #f0eeff; border-radius: 2px; z-index: 1; transition: background 0.25s, transform 0.3s; } .ccb-corner span:nth-child(1) { transform: translate(-50%,-50%) rotate(45deg); } .ccb-corner span:nth-child(2) { transform: translate(-50%,-50%) rotate(-45deg); } .ccb-corner:hover span { background: #fff; } .ccb-corner:hover span:nth-child(1) { transform: translate(-50%,-50%) rotate(135deg); } .ccb-corner:hover span:nth-child(2) { transform: translate(-50%,-50%) rotate(-135deg); } ``` ### 17. Brutalist Stamp **Type:** Pure CSS **Description:** A bold offset-shadow stamp button straight from the brutalist playbook — hard edges, monospace label "DISMISS", press collapses into the shadow. **HTML:** ```html ``` **CSS:** ```css .ccb-brutalist { display: inline-flex; align-items: center; gap: 10px; padding: 10px 16px 10px 12px; border: 2px solid #f0eeff; border-radius: 0; background: #f0eeff; color: #111118; font-family: monospace; font-size: 12px; font-weight: 800; letter-spacing: 0.12em; cursor: pointer; box-shadow: 5px 5px 0 #ff6c8a; transition: transform 0.1s, box-shadow 0.1s; } .ccb-brutalist:hover { transform: translate(-1px,-1px); box-shadow: 6px 6px 0 #ff6c8a; } .ccb-brutalist:active { transform: translate(5px,5px); box-shadow: 0 0 0 #ff6c8a; } .ccb-brutalist-x { position: relative; width: 14px; height: 14px; display: inline-block; } .ccb-brutalist-x::before, .ccb-brutalist-x::after { content: ''; position: absolute; top: 50%; left: 50%; width: 14px; height: 2.5px; background: #111118; } .ccb-brutalist-x::before { transform: translate(-50%,-50%) rotate(45deg); } .ccb-brutalist-x::after { transform: translate(-50%,-50%) rotate(-45deg); } ``` ### 18. Galaxy Vortex **Type:** Pure CSS **Description:** A conic-gradient vortex swirls slowly behind the X at rest, then accelerates dramatically on hover — the ultimate premium "this is special" close button. **HTML:** ```html ``` **CSS:** ```css .ccb-vortex { width: 44px; height: 44px; border: none; border-radius: 50%; background: #0c0c12; position: relative; cursor: pointer; overflow: hidden; isolation: isolate; } .ccb-vortex::before { content: ''; position: absolute; inset: -25%; background: conic-gradient(from 0deg, #7c6cff, #ff6c8a, #f5a623, #2ecc8a, #06b6d4, #7c6cff); animation: ccb-vortex-spin 6s linear infinite; z-index: -2; } .ccb-vortex::after { content: ''; position: absolute; inset: 2px; border-radius: 50%; background: radial-gradient(circle at 30% 30%, #1a1a28, #0c0c12 70%); z-index: -1; } .ccb-vortex:hover::before { animation-duration: 1.2s; } .ccb-vortex span { position: absolute; top: 50%; left: 50%; width: 18px; height: 2px; background: #fff; border-radius: 2px; box-shadow: 0 0 8px rgba(255,255,255,0.6); transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1); } .ccb-vortex span:nth-child(1) { transform: translate(-50%,-50%) rotate(45deg); } .ccb-vortex span:nth-child(2) { transform: translate(-50%,-50%) rotate(-45deg); } .ccb-vortex:hover span:nth-child(1) { transform: translate(-50%,-50%) rotate(135deg) scale(1.1); } .ccb-vortex:hover span:nth-child(2) { transform: translate(-50%,-50%) rotate(-135deg) scale(1.1); } @keyframes ccb-vortex-spin { to { transform: rotate(360deg); } } @media (prefers-reduced-motion: reduce) { .ccb-vortex, .ccb-vortex * { animation: none !important; } } ``` --- ## 12 CSS Code Blocks URL: https://codefronts.com/snippets/css-code-blocks/ Description: Twelve hand-coded CSS code block patterns covering every developer surface: minimalist dark and light modes, a Mac terminal CSS code block with traffic-light chrome, a CSS code block with copy button, a CSS code block with line numbers driven by counter-increment, a mobile-responsive overflow / word-wrap pair, neon glow, a glassmorphism code block, inline pill styling, neumorphic embedded, split-pane code plus live preview, and a pure-CSS expandable wrapper. Accessible, mobile-first, scoped per-demo classes, MIT-licensed. Demo count: 12 ### 01. Minimalist Dark Mode Code Box **Type:** Pure CSS **Description:** A clean, high-contrast dark code container on a deep navy gradient with a glowing left-accent border, JetBrains Mono type, subtle line numbers, and a muted meta bar carrying a colored language tag. Best for documentation hero blocks, blog post code samples, marketing pages, and any dark-themed dev site that needs a single focal code reference. **HTML:** ```html
session.ts TypeScript
1// resolve an active session token
2export async function getSession(id: string) {
3  const token = await cache.read(`sess:${id}`);
4  if (!token) return null;
5  return { id, token, ttl: 3600 };
6}
``` **CSS:** ```css /* ─── 01 Minimalist Dark Mode Code Box ──────── */ @import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;700&family=Sora:wght@400;600;800&display=swap'); .ccb-mdm { --ccb-mdm-bg: #0b0f1a; --ccb-mdm-panel: #0f172a; --ccb-mdm-panel-2: #111a30; --ccb-mdm-ink: #e2e8f0; --ccb-mdm-muted: #64748b; --ccb-mdm-accent: #38bdf8; --ccb-mdm-line: rgba(148,163,184,.08); width: 100%; min-height: 320px; display: flex; align-items: center; justify-content: center; background: radial-gradient(900px 500px at 85% -10%, rgba(56,189,248,.10), transparent 60%), radial-gradient(700px 400px at 0% 110%, rgba(129,140,248,.08), transparent 55%), var(--ccb-mdm-bg); color: var(--ccb-mdm-ink); font-family: 'Sora', sans-serif; padding: 36px 22px; box-sizing: border-box; } .ccb-mdm *, .ccb-mdm *::before, .ccb-mdm *::after { box-sizing: border-box; } .ccb-mdm__card { position: relative; width: 100%; max-width: 620px; background: linear-gradient(180deg, var(--ccb-mdm-panel), var(--ccb-mdm-panel-2)); border: 1px solid var(--ccb-mdm-line); border-radius: 16px; overflow: hidden; box-shadow: 0 30px 80px -30px rgba(0,0,0,.8), inset 0 1px 0 rgba(255,255,255,.03); } .ccb-mdm__card::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: linear-gradient(180deg, var(--ccb-mdm-accent), #818cf8); box-shadow: 0 0 24px rgba(56,189,248,.6); } .ccb-mdm__meta { display: flex; align-items: center; gap: 10px; padding: 14px 22px 12px 24px; border-bottom: 1px solid var(--ccb-mdm-line); font-family: 'JetBrains Mono', monospace; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--ccb-mdm-muted); } .ccb-mdm__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ccb-mdm-accent); box-shadow: 0 0 10px var(--ccb-mdm-accent); } .ccb-mdm__lang { margin-left: auto; color: var(--ccb-mdm-accent); font-weight: 700; } .ccb-mdm__pre { margin: 0; padding: 20px 24px 24px; font-family: 'JetBrains Mono', monospace; font-size: 13.5px; line-height: 1.85; overflow-x: auto; color: #cbd5e1; } .ccb-mdm__pre code { display: block; white-space: pre; } .ccb-mdm__ln { color: #334155; user-select: none; display: inline-block; width: 2.2em; text-align: right; margin-right: 1.4em; } .ccb-mdm__k { color: #c084fc; } .ccb-mdm__f { color: #38bdf8; } .ccb-mdm__s { color: #34d399; } .ccb-mdm__c { color: #475569; font-style: italic; } .ccb-mdm__n { color: #fbbf24; } .ccb-mdm__pre::-webkit-scrollbar { height: 8px; } .ccb-mdm__pre::-webkit-scrollbar-thumb { background: rgba(148,163,184,.2); border-radius: 8px; } ``` ### 02. Mac-Style Window Container **Type:** Pure CSS **Description:** A floating macOS-style window with the canonical red / yellow / green traffic-light controls and a filename in the title bar, sitting on a soft pastel gradient with a 3D tilt that straightens on hover. Best for product hero sections, landing-page demos, slide thumbnails, and any place a code sample needs to feel like a real app surface instead of a flat block. **HTML:** ```html
App.jsx — codefronts
// floating window component
import { useState } from 'react';

export default function App() {
  const [open, setOpen] = useState(true);
  return open && <Panel title="Terminal" />;
}
``` **CSS:** ```css /* ─── 02 Mac-Style Window Container ──────── */ @import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@400;500;600&family=Outfit:wght@400;600;700&display=swap'); .ccb-mac { width: 100%; min-height: 320px; font-family: 'Outfit', sans-serif; background: linear-gradient(135deg, #fbe6c8 0%, #f5b1b1 35%, #c7a6f0 70%, #9ad7f0 100%); display: flex; align-items: center; justify-content: center; padding: 40px 24px; box-sizing: border-box; } .ccb-mac *, .ccb-mac *::before, .ccb-mac *::after { box-sizing: border-box; } .ccb-mac__scene { width: 100%; max-width: 600px; perspective: 1600px; } .ccb-mac__window { background: #1d1f27; border-radius: 14px; overflow: hidden; box-shadow: 0 2px 0 rgba(255,255,255,.06) inset, 0 40px 70px -24px rgba(76,29,99,.55), 0 12px 24px -12px rgba(0,0,0,.45); transform: rotateX(6deg) rotateZ(-.4deg); transition: transform .5s cubic-bezier(.2,.8,.2,1); } .ccb-mac__window:hover { transform: rotateX(0deg) rotateZ(0deg) translateY(-4px); } .ccb-mac__titlebar { display: flex; align-items: center; gap: 8px; height: 42px; padding: 0 16px; background: linear-gradient(180deg, #33363f, #282b33); border-bottom: 1px solid rgba(0,0,0,.4); } .ccb-mac__traffic { display: flex; gap: 9px; } .ccb-mac__traffic span { width: 13px; height: 13px; border-radius: 50%; box-shadow: inset 0 1px 1px rgba(255,255,255,.4); } .ccb-mac__red { background: #ff5f57; } .ccb-mac__yellow { background: #febc2e; } .ccb-mac__green { background: #28c840; } .ccb-mac__filename { margin: 0 auto; font-family: 'Fira Code', monospace; font-size: 13px; color: #aeb3c2; letter-spacing: .02em; display: flex; align-items: center; gap: 8px; } .ccb-mac__filename::before { content: ''; width: 14px; height: 14px; border-radius: 3px; background: linear-gradient(135deg, #61dafb, #3b82f6); } .ccb-mac__pre { margin: 0; padding: 22px 24px 26px; font-family: 'Fira Code', monospace; font-size: 13.5px; line-height: 1.85; color: #dfe3ee; overflow-x: auto; background: #1d1f27; } .ccb-mac__k { color: #ff79c6; } .ccb-mac__f { color: #8be9fd; } .ccb-mac__s { color: #f1fa8c; } .ccb-mac__c { color: #6272a4; font-style: italic; } .ccb-mac__t { color: #bd93f9; } .ccb-mac__pre::-webkit-scrollbar { height: 8px; } .ccb-mac__pre::-webkit-scrollbar-thumb { background: #3a3d48; border-radius: 8px; } @media (prefers-reduced-motion: reduce) { .ccb-mac__window { transition: none; transform: none; } .ccb-mac__window:hover { transform: none; } } ``` ### 03. Code Block with Copy to Clipboard Button **Type:** Light JS **Description:** A teal-accented dark code block using position: relative on the container and position: absolute on a copy button that is hidden by default and fades in on hover, with a working navigator.clipboard.writeText action and a "Copied!" confirmation state. Best for documentation pages, package install snippets, CLI command references, and any tutorial where a one-click copy is the primary reader action. **HTML:** ```html
install bash
# add the codefronts CLI
npm install -g @codefronts/cli
codefronts init --template "snippet"
codefronts build && codefronts deploy
``` **CSS:** ```css /* ─── 03 Code Block with Copy to Clipboard Button ──────── */ @import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;600&family=Space+Grotesk:wght@400;600;700&display=swap'); .ccb-cpy { --ccb-cpy-bg: #10131a; --ccb-cpy-panel: #171b24; --ccb-cpy-ink: #e7ecf3; --ccb-cpy-muted: #7b8494; --ccb-cpy-accent: #5eead4; --ccb-cpy-accent-2: #2dd4bf; width: 100%; min-height: 320px; display: flex; align-items: center; justify-content: center; background: radial-gradient(800px 460px at 110% 0%, rgba(45,212,191,.12), transparent 55%), var(--ccb-cpy-bg); color: var(--ccb-cpy-ink); font-family: 'Space Grotesk', sans-serif; padding: 36px 24px; box-sizing: border-box; } .ccb-cpy *, .ccb-cpy *::before, .ccb-cpy *::after { box-sizing: border-box; } .ccb-cpy__block { position: relative; width: 100%; max-width: 600px; background: var(--ccb-cpy-panel); border: 1px solid rgba(255,255,255,.06); border-radius: 14px; box-shadow: 0 24px 60px -28px rgba(0,0,0,.8); } .ccb-cpy__bar { display: flex; align-items: center; padding: 12px 18px; border-bottom: 1px solid rgba(255,255,255,.05); font-family: 'IBM Plex Mono', monospace; font-size: 12.5px; color: var(--ccb-cpy-muted); letter-spacing: .05em; } .ccb-cpy__badge { margin-left: auto; color: var(--ccb-cpy-accent); border: 1px solid rgba(94,234,212,.3); padding: 3px 10px; border-radius: 999px; font-size: 11px; } .ccb-cpy__copy { position: absolute; top: 50px; right: 16px; display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 9px; background: rgba(45,212,191,.12); color: var(--ccb-cpy-accent); border: 1px solid rgba(94,234,212,.28); font-family: 'IBM Plex Mono', monospace; font-size: 12px; cursor: pointer; opacity: 0; transform: translateY(-4px); transition: opacity .25s ease, transform .25s ease, background .2s; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); } .ccb-cpy__block:hover .ccb-cpy__copy, .ccb-cpy__copy:focus-visible { opacity: 1; transform: translateY(0); } .ccb-cpy__copy:hover { background: rgba(45,212,191,.22); } .ccb-cpy__copy:focus-visible { outline: 2px solid var(--ccb-cpy-accent); outline-offset: 3px; } .ccb-cpy__copy.is-done { background: var(--ccb-cpy-accent-2); color: #06231e; border-color: var(--ccb-cpy-accent-2); } .ccb-cpy__copy svg { width: 14px; height: 14px; } .ccb-cpy__pre { margin: 0; padding: 22px 22px 24px; position: relative; font-family: 'IBM Plex Mono', monospace; font-size: 13.5px; line-height: 1.85; overflow-x: auto; color: #cdd6e3; } .ccb-cpy__k { color: #c792ea; } .ccb-cpy__f { color: #82aaff; } .ccb-cpy__s { color: #c3e88d; } .ccb-cpy__c { color: #546178; font-style: italic; } .ccb-cpy__pre::-webkit-scrollbar { height: 8px; } .ccb-cpy__pre::-webkit-scrollbar-thumb { background: #2a2f3a; border-radius: 8px; } @media (prefers-reduced-motion: reduce) { .ccb-cpy__copy { transition: none; } } ``` **JS:** ```js (() => { const root = document.querySelector('.ccb-cpy'); if (!root) return; const btn = root.querySelector('[data-ccb-cpy="btn"]'); const txt = root.querySelector('[data-ccb-cpy="txt"]'); const code = root.querySelector('[data-ccb-cpy="code"]'); if (!btn || !txt || !code) return; btn.addEventListener('click', async () => { const raw = code.innerText; try { await navigator.clipboard.writeText(raw); } catch (e) { /* permission denied */ } btn.classList.add('is-done'); txt.textContent = 'Copied!'; setTimeout(() => { btn.classList.remove('is-done'); txt.textContent = 'Copy'; }, 1600); }); })(); ``` ### 04. Code Container with Line Numbers and Filename Header **Type:** Pure CSS **Description:** A GitHub-dark inspired code container with editor-style filename tabs (index.html / styles.css) and a grid gutter that draws its line numbers from counter-increment in CSS — the numbers never get copied with the code, because they exist only as generated content in the gutter pseudo-element. Best for tutorial walk-throughs, multi-file documentation, before/after refactors, and any post where you reference specific line numbers in prose. **HTML:** ```html
index.html
styles.css
/* card layout tokens */
.card {
display: grid;
gap: 1.25rem;
padding: clamp(1rem, 3vw, 2rem);
border-radius: 16px;
}
``` **CSS:** ```css /* ─── 04 Code Container with Line Numbers and Filename Header ──────── */ @import url('https://fonts.googleapis.com/css2?family=Source+Code+Pro:wght@400;500;600&family=DM+Sans:wght@400;500;700&display=swap'); .ccb-lnh { --ccb-lnh-bg: #0d1117; --ccb-lnh-panel: #0f141d; --ccb-lnh-header: #161b25; --ccb-lnh-ink: #d7dee9; --ccb-lnh-muted: #8a93a2; --ccb-lnh-accent: #f78166; --ccb-lnh-gutter: #1a212d; --ccb-lnh-gutter-ink: #4b5566; width: 100%; min-height: 320px; display: flex; align-items: center; justify-content: center; background: radial-gradient(700px 380px at 0% 0%, rgba(247,129,102,.08), transparent 55%), var(--ccb-lnh-bg); color: var(--ccb-lnh-ink); font-family: 'DM Sans', sans-serif; padding: 36px 22px; box-sizing: border-box; } .ccb-lnh *, .ccb-lnh *::before, .ccb-lnh *::after { box-sizing: border-box; } .ccb-lnh__file { width: 100%; max-width: 620px; background: var(--ccb-lnh-panel); border: 1px solid rgba(255,255,255,.06); border-radius: 14px; overflow: hidden; box-shadow: 0 30px 70px -32px rgba(0,0,0,.85); } .ccb-lnh__tabs { display: flex; align-items: center; gap: 2px; background: var(--ccb-lnh-header); padding: 10px 12px 0; border-bottom: 1px solid rgba(255,255,255,.05); } .ccb-lnh__tab { font-family: 'Source Code Pro', monospace; font-size: 12.5px; padding: 9px 16px; border-radius: 8px 8px 0 0; color: var(--ccb-lnh-muted); display: flex; align-items: center; gap: 8px; } .ccb-lnh__tab--active { background: var(--ccb-lnh-panel); color: var(--ccb-lnh-ink); border-top: 2px solid var(--ccb-lnh-accent); } .ccb-lnh__ico { width: 10px; height: 10px; border-radius: 2px; } .ccb-lnh__ico--html { background: #e34c26; } .ccb-lnh__ico--css { background: #2965f1; } .ccb-lnh__codegrid { counter-reset: ccblnh-line; font-family: 'Source Code Pro', monospace; font-size: 13.5px; line-height: 1.9; overflow-x: auto; } .ccb-lnh__row { display: grid; grid-template-columns: 3.4em 1fr; } .ccb-lnh__row::before { counter-increment: ccblnh-line; content: counter(ccblnh-line); color: var(--ccb-lnh-gutter-ink); background: var(--ccb-lnh-gutter); text-align: right; padding: 0 14px 0 0; user-select: none; border-right: 1px solid rgba(255,255,255,.04); } .ccb-lnh__row code { padding: 0 18px; white-space: pre; overflow-x: auto; color: #cdd6e2; } .ccb-lnh__pad { padding: 14px 0 18px; } .ccb-lnh__k { color: #ff7b72; } .ccb-lnh__f { color: #d2a8ff; } .ccb-lnh__s { color: #a5d6ff; } .ccb-lnh__p { color: #79c0ff; } .ccb-lnh__c { color: #6e7681; font-style: italic; } ``` ### 05. Horizontal Scroll & Word-Wrap Handling (Mobile Responsive) **Type:** Pure CSS **Description:** Two stacked code blocks comparing approaches: one with overflow-x: auto (clean gradient scrollbar, single line stays on one row) versus white-space: pre-wrap (graceful wrapping for long URLs and identifiers). Both capped at max-width: 100% for mobile safety. Best for documentation that shows long API endpoints, file paths, package names, or hash strings where the reader needs to choose which trade-off fits their layout. **HTML:** ```html
overflow-x: auto scroll
// long line stays on one row → scrollbar appears
const endpoint = "https://api.codefronts.com/v2/snippets?category=css&sort=popular&limit=50&include=author";
white-space: pre-wrap wrap
// same line wraps gracefully on narrow screens
const endpoint = "https://api.codefronts.com/v2/snippets?category=css&sort=popular&limit=50&include=author";
``` **CSS:** ```css /* ─── 05 Horizontal Scroll & Word-Wrap Handling ──────── */ @import url('https://fonts.googleapis.com/css2?family=Roboto+Mono:wght@400;500;600&family=Manrope:wght@400;600;800&display=swap'); .ccb-rsp { --ccb-rsp-bg: #0e1216; --ccb-rsp-panel: #151b21; --ccb-rsp-ink: #e3e9ee; --ccb-rsp-muted: #7d8893; --ccb-rsp-accent: #fbbf24; --ccb-rsp-line: rgba(255,255,255,.06); width: 100%; min-height: 360px; display: flex; align-items: center; justify-content: center; background: radial-gradient(680px 400px at 100% 100%, rgba(251,191,36,.08), transparent 55%), var(--ccb-rsp-bg); color: var(--ccb-rsp-ink); font-family: 'Manrope', sans-serif; padding: 32px 22px; box-sizing: border-box; } .ccb-rsp *, .ccb-rsp *::before, .ccb-rsp *::after { box-sizing: border-box; } .ccb-rsp__wrap { width: 100%; max-width: 580px; display: grid; gap: 18px; } .ccb-rsp__block { background: var(--ccb-rsp-panel); border: 1px solid var(--ccb-rsp-line); border-radius: 14px; overflow: hidden; box-shadow: 0 24px 56px -30px rgba(0,0,0,.8); } .ccb-rsp__head { display: flex; align-items: center; gap: 10px; padding: 11px 18px; border-bottom: 1px solid var(--ccb-rsp-line); font-family: 'Roboto Mono', monospace; font-size: 12px; color: var(--ccb-rsp-muted); letter-spacing: .05em; } .ccb-rsp__pill { margin-left: auto; font-size: 11px; color: var(--ccb-rsp-accent); border: 1px solid rgba(251,191,36,.3); padding: 3px 10px; border-radius: 999px; } .ccb-rsp__pre { margin: 0; padding: 18px 20px; font-family: 'Roboto Mono', monospace; font-size: 13px; line-height: 1.75; color: #cbd5e0; max-width: 100%; } .ccb-rsp__scroll .ccb-rsp__pre { overflow-x: auto; white-space: pre; } .ccb-rsp__wrapmode .ccb-rsp__pre { white-space: pre-wrap; word-break: break-word; overflow-wrap: anywhere; } .ccb-rsp__scroll .ccb-rsp__pre::-webkit-scrollbar { height: 9px; } .ccb-rsp__scroll .ccb-rsp__pre::-webkit-scrollbar-track { background: rgba(255,255,255,.03); } .ccb-rsp__scroll .ccb-rsp__pre::-webkit-scrollbar-thumb { background: linear-gradient(90deg, var(--ccb-rsp-accent), #f59e0b); border-radius: 9px; } .ccb-rsp__k { color: #c792ea; } .ccb-rsp__s { color: #c3e88d; } .ccb-rsp__c { color: #5a6573; font-style: italic; } ``` ### 06. Glow-Effect & Neon Tech Code Block **Type:** Pure CSS **Description:** A cyberpunk-style code block on a faint grid background with a frosted backdrop-filter: blur panel, neon cyan / magenta / lime borders, and a pulsing animated glow that shifts the box-shadow color between cyan and magenta on a 3.4-second loop. text-shadow syntax accents make the code itself glow. Best for hackathon landing pages, gaming or AI product hero sections, retro-futurist portfolio sites, and any place where the code block needs to feel like a sci-fi terminal readout. **HTML:** ```html
sys.core // online 0xCF-77
// boot the grid runtime
fn main() -> Result<()> {
    let grid = Grid::connect("neon://core")?;
    grid.pulse(144).await;
    Ok(())
}
``` **CSS:** ```css /* ─── 06 Glow-Effect & Neon Tech Code Block ──────── */ @import url('https://fonts.googleapis.com/css2?family=Share+Tech+Mono&family=Orbitron:wght@500;700;900&display=swap'); .ccb-neo { --ccb-neo-cyan: #22d3ee; --ccb-neo-magenta: #f0f; --ccb-neo-lime: #a3ff12; width: 100%; min-height: 320px; background: #05060a; background-image: linear-gradient(rgba(34,211,238,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(34,211,238,.05) 1px, transparent 1px), radial-gradient(900px 500px at 50% -10%, rgba(255,0,255,.12), transparent 60%); background-size: 42px 42px, 42px 42px, 100% 100%; color: #e6f7ff; font-family: 'Orbitron', sans-serif; display: flex; align-items: center; justify-content: center; padding: 40px 22px; box-sizing: border-box; } .ccb-neo *, .ccb-neo *::before, .ccb-neo *::after { box-sizing: border-box; } .ccb-neo__panel { position: relative; width: 100%; max-width: 580px; background: rgba(8,12,20,.55); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border: 1px solid rgba(34,211,238,.5); border-radius: 14px; box-shadow: 0 0 18px rgba(34,211,238,.35), 0 0 50px rgba(34,211,238,.18), inset 0 0 24px rgba(34,211,238,.06); overflow: hidden; animation: ccb-neo-pulse 3.4s ease-in-out infinite; } @keyframes ccb-neo-pulse { 0%, 100% { box-shadow: 0 0 18px rgba(34,211,238,.35), 0 0 50px rgba(34,211,238,.18), inset 0 0 24px rgba(34,211,238,.06); } 50% { box-shadow: 0 0 26px rgba(255,0,255,.45), 0 0 64px rgba(255,0,255,.22), inset 0 0 28px rgba(255,0,255,.08); } } .ccb-neo__scan { display: flex; align-items: center; gap: 12px; padding: 12px 18px; border-bottom: 1px solid rgba(34,211,238,.25); font-size: 11px; letter-spacing: .32em; text-transform: uppercase; color: var(--ccb-neo-cyan); text-shadow: 0 0 8px var(--ccb-neo-cyan); } .ccb-neo__blip { width: 9px; height: 9px; border-radius: 50%; background: var(--ccb-neo-lime); box-shadow: 0 0 12px var(--ccb-neo-lime); } .ccb-neo__id { margin-left: auto; color: var(--ccb-neo-magenta); text-shadow: 0 0 8px var(--ccb-neo-magenta); } .ccb-neo__pre { margin: 0; padding: 22px 22px 26px; font-family: 'Share Tech Mono', monospace; font-size: 14px; line-height: 1.95; color: #cdfaff; overflow-x: auto; text-shadow: 0 0 6px rgba(34,211,238,.4); } .ccb-neo__k { color: var(--ccb-neo-magenta); text-shadow: 0 0 8px var(--ccb-neo-magenta); } .ccb-neo__f { color: var(--ccb-neo-cyan); text-shadow: 0 0 8px var(--ccb-neo-cyan); } .ccb-neo__s { color: var(--ccb-neo-lime); text-shadow: 0 0 8px var(--ccb-neo-lime); } .ccb-neo__c { color: #5b7488; text-shadow: none; font-style: italic; } .ccb-neo__n { color: #ffb86c; text-shadow: 0 0 8px rgba(255,184,108,.6); } .ccb-neo__pre::-webkit-scrollbar { height: 8px; } .ccb-neo__pre::-webkit-scrollbar-thumb { background: var(--ccb-neo-cyan); border-radius: 8px; box-shadow: 0 0 10px var(--ccb-neo-cyan); } @media (prefers-reduced-motion: reduce) { .ccb-neo__panel { animation: none; } } ``` ### 07. Glassmorphism Code Terminal **Type:** Pure CSS **Description:** A frosted-glass terminal floating over a vibrant multi-color radial-gradient backdrop with blurred orbs scattered behind it. Uses backdrop-filter: blur(22px) saturate(160%) with rgba() transparency, a thin translucent white border, and layered inset highlights so the text stays legible over the busy backdrop. Best for AI product splash pages, design-tool marketing sites, summer / festival campaign chrome, and any context where the surrounding palette is louder than the code itself. **HTML:** ```html
~/codefronts — zsh
# spin up the dev preview
$ pnpm dev --port 3000
# ✔ ready in 412ms
$ open "http://localhost:3000"
 watching 128 modules for changes
``` **CSS:** ```css /* ─── 07 Glassmorphism Code Terminal ──────── */ @import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600&family=Plus+Jakarta+Sans:wght@400;600;800&display=swap'); .ccb-gls { position: relative; width: 100%; min-height: 380px; font-family: 'Plus Jakarta Sans', sans-serif; background: radial-gradient(circle at 15% 20%, #ff6ec4 0%, transparent 40%), radial-gradient(circle at 85% 30%, #7873f5 0%, transparent 45%), radial-gradient(circle at 50% 90%, #42e695 0%, transparent 50%), linear-gradient(135deg, #1a1c4b, #2d1b4e); display: flex; align-items: center; justify-content: center; padding: 40px 24px; overflow: hidden; box-sizing: border-box; } .ccb-gls *, .ccb-gls *::before, .ccb-gls *::after { box-sizing: border-box; } /* floating orbs scoped to the wrapper, NOT body — required so multiple gallery demos can coexist on one page */ .ccb-gls::before, .ccb-gls::after { content: ''; position: absolute; border-radius: 50%; filter: blur(8px); z-index: 0; pointer-events: none; } .ccb-gls::before { width: 130px; height: 130px; background: rgba(255,255,255,.18); top: 14%; right: 16%; } .ccb-gls::after { width: 76px; height: 76px; background: rgba(66,230,149,.40); bottom: 18%; left: 14%; } .ccb-gls__wrap { width: 100%; max-width: 580px; position: relative; z-index: 1; } .ccb-gls__panel { background: rgba(255,255,255,.08); backdrop-filter: blur(22px) saturate(160%); -webkit-backdrop-filter: blur(22px) saturate(160%); border: 1px solid rgba(255,255,255,.18); border-radius: 20px; box-shadow: 0 24px 70px -20px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.3), inset 0 -1px 0 rgba(255,255,255,.06); overflow: hidden; } .ccb-gls__topbar { display: flex; align-items: center; gap: 10px; padding: 14px 20px; border-bottom: 1px solid rgba(255,255,255,.12); } .ccb-gls__dots { display: flex; gap: 8px; } .ccb-gls__dots span { width: 12px; height: 12px; border-radius: 50%; background: rgba(255,255,255,.45); box-shadow: inset 0 0 0 1px rgba(255,255,255,.2); } .ccb-gls__label { margin-left: auto; font-family: 'JetBrains Mono', monospace; font-size: 12px; color: rgba(255,255,255,.85); letter-spacing: .06em; } .ccb-gls__pre { margin: 0; padding: 22px 22px 26px; font-family: 'JetBrains Mono', monospace; font-size: 13.5px; line-height: 1.9; color: #f4f4ff; overflow-x: auto; text-shadow: 0 1px 6px rgba(0,0,0,.3); } .ccb-gls__k { color: #ffd6f5; } .ccb-gls__f { color: #aef9ff; } .ccb-gls__s { color: #d4ffb0; } .ccb-gls__c { color: rgba(255,255,255,.5); font-style: italic; } .ccb-gls__n { color: #ffe39a; } .ccb-gls__pre::-webkit-scrollbar { height: 8px; } .ccb-gls__pre::-webkit-scrollbar-thumb { background: rgba(255,255,255,.3); border-radius: 8px; } ``` ### 08. Inline Code Snippet Pill Styling **Type:** Pure CSS **Description:** Editorial article styling on cream textured paper showing standalone <code> pills woven into serif prose — tiny 2px 8px padding, full pill border-radius: 999px, color variants (green / blue / orange), and vertical-align: middle so the line-height never breaks around them. Best for long-form technical articles, design system documentation, blog posts mixing prose and short identifiers, and any reading surface where inline code references need to feel typographically settled, not jarring. **HTML:** ```html

When you set display: grid on a container, every direct child becomes a grid item. Use gap instead of margins to space them, and reach for minmax() when columns need to flex.

Avoid setting a fixed height on the wrapper — let the content define it. If you must clamp it, pair max-height with overflow: auto so nothing gets visually clipped without a scroll affordance.

Finally, run npm run build and confirm the line-height stays uniform — the pill should never push a line taller than its neighbors.

``` **CSS:** ```css /* ─── 08 Inline Code Snippet Pill Styling ──────── */ @import url('https://fonts.googleapis.com/css2?family=Spline+Sans+Mono:wght@500;600&family=Newsreader:ital,opsz,wght@0,18..72,400;0,18..72,500;1,18..72,400&display=swap'); .ccb-inl { --ccb-inl-paper: #fcfbf7; --ccb-inl-ink: #23201c; --ccb-inl-muted: #6b6459; --ccb-inl-pill-bg: #eef0e8; --ccb-inl-pill-ink: #3f6b3a; --ccb-inl-accent: #b4532a; width: 100%; min-height: 360px; background: var(--ccb-inl-paper); background-image: radial-gradient(circle at 1px 1px, rgba(0,0,0,.04) 1px, transparent 0); background-size: 22px 22px; color: var(--ccb-inl-ink); font-family: 'Newsreader', Georgia, serif; display: flex; align-items: center; justify-content: center; padding: 40px 24px; box-sizing: border-box; } .ccb-inl *, .ccb-inl *::before, .ccb-inl *::after { box-sizing: border-box; } .ccb-inl__prose { max-width: 540px; font-size: 18px; line-height: 1.85; letter-spacing: .005em; } .ccb-inl__prose p { margin-bottom: 1.2em; } .ccb-inl__prose p:last-child { margin-bottom: 0; } .ccb-inl__c { font-family: 'Spline Sans Mono', monospace; font-size: .82em; font-weight: 600; background: var(--ccb-inl-pill-bg); color: var(--ccb-inl-pill-ink); padding: 2px 8px; border-radius: 999px; vertical-align: middle; border: 1px solid rgba(0,0,0,.05); white-space: nowrap; } .ccb-inl__c--warn { background: #f7e9e1; color: var(--ccb-inl-accent); } .ccb-inl__c--blue { background: #e6eef7; color: #2d5d8a; } .ccb-inl__em { color: var(--ccb-inl-muted); } .ccb-inl__lead::first-letter { font-size: 3.2em; float: left; line-height: .8; padding: 6px 10px 0 0; color: var(--ccb-inl-accent); font-weight: 500; } ``` ### 09. Neumorphic Embedded Code Box **Type:** Pure CSS **Description:** A soft-UI card on a matched gray canvas where the code box uses dual box-shadow: inset (one light highlight, one dark shadow) to look recessed into the surface, with a raised outer card and a pressed-in icon badge for the tactile look. Best for design-tool dashboards, settings panels embedded inside documentation, calm productivity apps, and any place a code reference needs to feel like part of the surrounding UI rather than a hard rectangle dropped on top. **HTML:** ```html
useToggle
hooks/useToggle.js
// soft, tactile state hook
export const useToggle = (init = false) => {
  const [on, set] = useState(init);
  return [on, () => set(v => !v)];
};
``` **CSS:** ```css /* ─── 09 Neumorphic Embedded Code Box ──────── */ @import url('https://fonts.googleapis.com/css2?family=Azeret+Mono:wght@400;500;600&family=Quicksand:wght@400;500;700&display=swap'); .ccb-nmp { --ccb-nmp-bg: #e4e8ef; --ccb-nmp-ink: #56627a; --ccb-nmp-muted: #9aa3b6; --ccb-nmp-accent: #7b8cde; --ccb-nmp-light: #ffffff; --ccb-nmp-dark: #bcc4d4; width: 100%; min-height: 320px; background: var(--ccb-nmp-bg); color: var(--ccb-nmp-ink); font-family: 'Quicksand', sans-serif; display: flex; align-items: center; justify-content: center; padding: 36px 24px; box-sizing: border-box; } .ccb-nmp *, .ccb-nmp *::before, .ccb-nmp *::after { box-sizing: border-box; } .ccb-nmp__card { width: 100%; max-width: 560px; background: var(--ccb-nmp-bg); border-radius: 28px; padding: 26px; box-shadow: -10px -10px 24px var(--ccb-nmp-light), 12px 12px 28px var(--ccb-nmp-dark); } .ccb-nmp__row { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; } .ccb-nmp__badge { width: 46px; height: 46px; border-radius: 14px; background: var(--ccb-nmp-bg); display: flex; align-items: center; justify-content: center; box-shadow: inset 3px 3px 7px var(--ccb-nmp-dark), inset -3px -3px 7px var(--ccb-nmp-light); color: var(--ccb-nmp-accent); font-weight: 700; font-family: 'Azeret Mono', monospace; } .ccb-nmp__title { font-weight: 700; font-size: 15px; } .ccb-nmp__sub { font-size: 12.5px; color: var(--ccb-nmp-muted); font-family: 'Azeret Mono', monospace; } .ccb-nmp__embed { background: var(--ccb-nmp-bg); border-radius: 18px; box-shadow: inset 6px 6px 14px var(--ccb-nmp-dark), inset -6px -6px 14px var(--ccb-nmp-light); padding: 20px 22px; } .ccb-nmp__pre { margin: 0; font-family: 'Azeret Mono', monospace; font-size: 13px; line-height: 1.9; color: #5b6680; overflow-x: auto; } .ccb-nmp__k { color: #8c6fd6; } .ccb-nmp__f { color: #5a8ad6; } .ccb-nmp__s { color: #5aa07a; } .ccb-nmp__c { color: #a7afc0; font-style: italic; } .ccb-nmp__pre::-webkit-scrollbar { height: 7px; } .ccb-nmp__pre::-webkit-scrollbar-thumb { background: var(--ccb-nmp-dark); border-radius: 7px; } ``` ### 10. Split-Pane Code + Live Preview Container **Type:** Pure CSS **Description:** A two-pane CSS Grid card: the left pane renders a live interactive gradient button (with working hover lift + press feedback), the right pane shows the styled <pre><code> source that produced it. Collapses to a stacked layout on mobile. Best for documentation tutorials, design-system component reference pages, MDX-driven docs sites, and any teaching context where reading the code is half the story and seeing it run is the other half. **HTML:** ```html
Result + Source .demo-btn
.demo-btn {
  background: linear-gradient(135deg,#7c5cff,#b16cff);
  padding: 14px 30px;
  border-radius: 12px;
  box-shadow: 0 10px 30px -8px rgba(124,92,255,.7);
}
``` **CSS:** ```css /* ─── 10 Split-Pane Code + Live Preview Container ──────── */ @import url('https://fonts.googleapis.com/css2?family=Geist+Mono:wght@400;500;600&family=Geist:wght@400;500;700&display=swap'); .ccb-spl { --ccb-spl-bg: #0f1115; --ccb-spl-code-bg: #15181f; --ccb-spl-preview-bg: #1b1f29; --ccb-spl-ink: #e6e9ef; --ccb-spl-muted: #828b9c; --ccb-spl-accent: #7c5cff; --ccb-spl-line: rgba(255,255,255,.07); width: 100%; min-height: 320px; display: flex; align-items: center; justify-content: center; background: radial-gradient(700px 400px at 100% 0%, rgba(124,92,255,.12), transparent 55%), var(--ccb-spl-bg); color: var(--ccb-spl-ink); font-family: 'Geist', 'Segoe UI', sans-serif; padding: 36px 22px; box-sizing: border-box; } .ccb-spl *, .ccb-spl *::before, .ccb-spl *::after { box-sizing: border-box; } .ccb-spl__wrap { width: 100%; max-width: 700px; } .ccb-spl__split { display: grid; grid-template-columns: 1fr 1fr; background: var(--ccb-spl-code-bg); border: 1px solid var(--ccb-spl-line); border-radius: 16px; overflow: hidden; box-shadow: 0 30px 70px -32px rgba(0,0,0,.85); } @media (max-width: 680px) { .ccb-spl__split { grid-template-columns: 1fr; } .ccb-spl__preview { border-right: none; border-bottom: 1px solid var(--ccb-spl-line); } } .ccb-spl__preview { background: radial-gradient(circle at 30% 20%, rgba(124,92,255,.18), transparent 60%), var(--ccb-spl-preview-bg); display: flex; align-items: center; justify-content: center; padding: 36px 22px; border-right: 1px solid var(--ccb-spl-line); } .ccb-spl__demo-btn { font-family: 'Geist', sans-serif; font-weight: 600; font-size: 15px; color: #fff; border: none; cursor: pointer; padding: 14px 30px; border-radius: 12px; background: linear-gradient(135deg, #7c5cff, #b16cff); box-shadow: 0 10px 30px -8px rgba(124,92,255,.7); transition: transform .2s, box-shadow .2s; } .ccb-spl__demo-btn:hover { transform: translateY(-3px); box-shadow: 0 16px 40px -8px rgba(124,92,255,.9); } .ccb-spl__demo-btn:active { transform: translateY(0); } .ccb-spl__demo-btn:focus-visible { outline: 2px solid #fff; outline-offset: 3px; } .ccb-spl__codepane { display: flex; flex-direction: column; } .ccb-spl__codehead { display: flex; align-items: center; gap: 8px; padding: 11px 18px; border-bottom: 1px solid var(--ccb-spl-line); font-family: 'Geist Mono', monospace; font-size: 12px; color: var(--ccb-spl-muted); letter-spacing: .05em; } .ccb-spl__tag { margin-left: auto; color: var(--ccb-spl-accent); } .ccb-spl__pre { margin: 0; padding: 20px 20px; flex: 1; font-family: 'Geist Mono', monospace; font-size: 12.5px; line-height: 1.85; color: #cdd4e0; overflow-x: auto; } .ccb-spl__k { color: #c4b5fd; } .ccb-spl__p { color: #7dd3fc; } .ccb-spl__s { color: #86efac; } .ccb-spl__pre::-webkit-scrollbar { height: 8px; } .ccb-spl__pre::-webkit-scrollbar-thumb { background: #2a2f3a; border-radius: 8px; } @media (prefers-reduced-motion: reduce) { .ccb-spl__demo-btn { transition: none; } } ``` ### 11. Minimalist Light Mode / Editorial Theme **Type:** Pure CSS **Description:** A bright Stripe-style docs aesthetic — crisp #f8fafc background, white panel, elegant Fraunces headings, and gentle indigo / green / orange syntax accents tuned for daylight readability. Filename + language pill on a soft header strip. Best for product docs, API reference sites, marketing pages targeting designers who want the page to feel calm, and any audience reading on bright screens during the day. **HTML:** ```html
checkout.js JavaScript
// create a payment session
const session = await stripe.checkout.sessions.create({
  mode: 'payment',
  line_items: [{ price: 'price_1Nx', quantity: 1 }],
  success_url: 'https://codefronts.com/done',
});
``` **CSS:** ```css /* ─── 11 Minimalist Light Mode / Editorial Theme ──────── */ @import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;600&family=Fraunces:opsz,wght@9..144,400;9..144,600;9..144,800&display=swap'); .ccb-lgt { --ccb-lgt-paper: #f8fafc; --ccb-lgt-panel: #ffffff; --ccb-lgt-ink: #1f2933; --ccb-lgt-muted: #697586; --ccb-lgt-line: #e7ecf2; --ccb-lgt-accent: #635bff; --ccb-lgt-green: #0a7c5a; --ccb-lgt-orange: #c2410c; width: 100%; min-height: 320px; background: var(--ccb-lgt-paper); color: var(--ccb-lgt-ink); font-family: 'Fraunces', Georgia, serif; display: flex; align-items: center; justify-content: center; padding: 36px 22px; box-sizing: border-box; } .ccb-lgt *, .ccb-lgt *::before, .ccb-lgt *::after { box-sizing: border-box; } .ccb-lgt__wrap { width: 100%; max-width: 600px; } .ccb-lgt__block { background: var(--ccb-lgt-panel); border: 1px solid var(--ccb-lgt-line); border-radius: 14px; overflow: hidden; box-shadow: 0 1px 2px rgba(16,24,40,.04), 0 12px 28px -16px rgba(16,24,40,.18); } .ccb-lgt__head { display: flex; align-items: center; gap: 10px; padding: 13px 18px; border-bottom: 1px solid var(--ccb-lgt-line); background: #fcfdfe; } .ccb-lgt__name { font-family: 'IBM Plex Mono', monospace; font-size: 13px; color: var(--ccb-lgt-muted); font-weight: 500; } .ccb-lgt__lang { margin-left: auto; font-family: 'IBM Plex Mono', monospace; font-size: 11px; color: var(--ccb-lgt-accent); background: #eef0ff; padding: 3px 10px; border-radius: 6px; font-weight: 600; } .ccb-lgt__pre { margin: 0; padding: 20px 20px 24px; font-family: 'IBM Plex Mono', monospace; font-size: 13px; line-height: 1.8; color: #334155; overflow-x: auto; } .ccb-lgt__k { color: var(--ccb-lgt-accent); } .ccb-lgt__f { color: #0b69c7; } .ccb-lgt__s { color: var(--ccb-lgt-green); } .ccb-lgt__n { color: var(--ccb-lgt-orange); } .ccb-lgt__c { color: #9aa5b1; font-style: italic; } .ccb-lgt__pre::-webkit-scrollbar { height: 8px; } .ccb-lgt__pre::-webkit-scrollbar-thumb { background: #dde3ea; border-radius: 8px; } ``` ### 12. Expandable / Collapsible Code Wrapper **Type:** Pure CSS **Description:** A long code snippet capped with max-height + overflow: hidden and a linear-gradient(transparent, bg) fade mask at the bottom hinting at more content. A pure-CSS checkbox hack drives the smooth "Show more / Show less" toggle and rotating chevron — no JavaScript required. Best for documentation pages with long source listings, FAQ answers that embed code, blog posts where the snippet is reference material rather than the focus, and any place a long block of code would otherwise dominate the page above the fold. **HTML:** ```html
utils/animate.js 142 lines
// easing + tween helpers
export const easeOutCubic = t => 1 - Math.pow(1 - t, 3);
export const easeInOut = t => t < .5
  ? 4 * t * t * t
  : 1 - Math.pow(-2 * t + 2, 3) / 2;

export function tween({ from, to, duration, onUpdate }) {
  const start = performance.now();
  function frame(now) {
    const p = Math.min((now - start) / duration, 1);
    onUpdate(from + (to - from) * easeOutCubic(p));
    if (p < 1) requestAnimationFrame(frame);
  }
  requestAnimationFrame(frame);
}

export function stagger(items, delay = 60) {
  items.forEach((el, i) => {
    el.style.animationDelay = `${i * delay}ms`;
  });
}
``` **CSS:** ```css /* ─── 12 Expandable / Collapsible Code Wrapper ──────── */ @import url('https://fonts.googleapis.com/css2?family=Martian+Mono:wght@400;500;600&family=Space+Grotesk:wght@400;600;700&display=swap'); .ccb-exp { --ccb-exp-bg: #0c0e13; --ccb-exp-panel: #13161d; --ccb-exp-ink: #dfe4ec; --ccb-exp-muted: #79828f; --ccb-exp-accent: #34d399; --ccb-exp-line: rgba(255,255,255,.06); width: 100%; min-height: 360px; background: radial-gradient(640px 360px at 0% 0%, rgba(52,211,153,.09), transparent 55%), var(--ccb-exp-bg); color: var(--ccb-exp-ink); font-family: 'Space Grotesk', sans-serif; display: flex; align-items: center; justify-content: center; padding: 36px 22px; box-sizing: border-box; } .ccb-exp *, .ccb-exp *::before, .ccb-exp *::after { box-sizing: border-box; } .ccb-exp__wrap { width: 100%; max-width: 600px; } .ccb-exp__block { background: var(--ccb-exp-panel); border: 1px solid var(--ccb-exp-line); border-radius: 14px; overflow: hidden; box-shadow: 0 24px 60px -30px rgba(0,0,0,.85); } .ccb-exp__head { display: flex; align-items: center; gap: 10px; padding: 12px 18px; border-bottom: 1px solid var(--ccb-exp-line); font-family: 'Martian Mono', monospace; font-size: 11.5px; color: var(--ccb-exp-muted); letter-spacing: .04em; } .ccb-exp__lines { margin-left: auto; color: var(--ccb-exp-accent); } .ccb-exp__toggle { display: none; } .ccb-exp__codewrap { position: relative; } .ccb-exp__pre { margin: 0; padding: 20px 20px; font-family: 'Martian Mono', monospace; font-size: 12px; line-height: 1.95; color: #cbd3df; overflow: hidden; max-height: 170px; transition: max-height .45s cubic-bezier(.4,0,.2,1); } .ccb-exp__toggle:checked ~ .ccb-exp__codewrap .ccb-exp__pre { max-height: 1200px; } .ccb-exp__fade { position: absolute; left: 0; right: 0; bottom: 0; height: 80px; pointer-events: none; background: linear-gradient(transparent, var(--ccb-exp-panel)); transition: opacity .3s; } .ccb-exp__toggle:checked ~ .ccb-exp__codewrap .ccb-exp__fade { opacity: 0; } .ccb-exp__btn { display: block; width: 100%; text-align: center; cursor: pointer; padding: 13px; font-family: 'Martian Mono', monospace; font-size: 11.5px; letter-spacing: .08em; color: var(--ccb-exp-accent); background: rgba(52,211,153,.06); border-top: 1px solid var(--ccb-exp-line); user-select: none; transition: background .2s; } .ccb-exp__btn:hover { background: rgba(52,211,153,.12); } .ccb-exp__btn .ccb-exp__more { display: inline; } .ccb-exp__btn .ccb-exp__less { display: none; } .ccb-exp__toggle:checked ~ .ccb-exp__btn .ccb-exp__more { display: none; } .ccb-exp__toggle:checked ~ .ccb-exp__btn .ccb-exp__less { display: inline; } .ccb-exp__btn::after { content: ' \25BE'; display: inline-block; transition: transform .3s; } .ccb-exp__toggle:checked ~ .ccb-exp__btn::after { transform: rotate(180deg); } .ccb-exp__toggle:focus-visible ~ .ccb-exp__btn { outline: 2px solid var(--ccb-exp-accent); outline-offset: -3px; } .ccb-exp__k { color: #c792ea; } .ccb-exp__f { color: #82aaff; } .ccb-exp__s { color: #c3e88d; } .ccb-exp__c { color: #586173; font-style: italic; } .ccb-exp__p { color: #7dd3fc; } .ccb-exp__n { color: #ffb86c; } .ccb-exp__pre::-webkit-scrollbar { height: 8px; } .ccb-exp__pre::-webkit-scrollbar-thumb { background: #262b34; border-radius: 8px; } @media (prefers-reduced-motion: reduce) { .ccb-exp__pre, .ccb-exp__fade, .ccb-exp__btn::after, .ccb-exp__btn { transition: none; } } ``` --- ## 6 CSS Countdown Timers URL: https://codefronts.com/snippets/css-countdown-timers/ Description: Six hand-coded CSS countdown timer patterns for the conversion surfaces real products need — ecommerce flash sales, site-wide sticky announcement bars, shopping cart expiration alerts, coming-soon launches, circular SVG progress rings, and retro flip-clock timers. Accessible aria-live markup, prefers-reduced-motion fallbacks, scoped per-demo classes, MIT-licensed. Demo count: 6 ### 01. E-Commerce Flash Sales & Product Pages **Type:** CSS + JS **Description:** A bold, high-contrast product card with a brutalist offset shadow and split-panel box-style D/H/M/S clock. Pulsing "flash sale ends in" indicator, strikethrough pricing, discount badge, and a stock-scarcity line built to drive urgency-based conversions. Best for limited-edition drops, daily deals, daily-deal email landing pages, and product detail pages where the deadline is the headline. **HTML:** ```html
SALE
AERO·9
Limited Drop · Footwear

Aero 9 Carbon Runner

$89 $179 -50%
Flash sale ends in
00Days
00Hours
00Mins
00Secs

Only 12 pairs left at this price

``` **CSS:** ```css /* ─── 01 Flash Sale — brutalist product card ─────────────── */ @import url('https://fonts.googleapis.com/css2?family=Archivo+Black&family=Space+Mono:wght@400;700&display=swap'); .cdt-fls { --cdt-fls-ink: #0a0a0a; --cdt-fls-paper: #f4f1ea; --cdt-fls-flame: #ff3b14; --cdt-fls-gold: #ffcf3a; position: relative; width: 100%; min-height: 520px; background: radial-gradient(circle at 20% 30%, rgba(255,59,20,0.08), transparent 40%), var(--cdt-fls-paper); display: flex; align-items: center; justify-content: center; font-family: 'Space Mono', monospace; padding: 40px 20px; box-sizing: border-box; overflow: hidden; } .cdt-fls *, .cdt-fls *::before, .cdt-fls *::after { box-sizing: border-box; margin: 0; padding: 0; } .cdt-fls__card { background: var(--cdt-fls-ink); color: var(--cdt-fls-paper); width: 100%; max-width: 460px; border-radius: 4px; box-shadow: 14px 14px 0 var(--cdt-fls-flame); position: relative; overflow: hidden; } .cdt-fls__card::before { content: ''; position: absolute; inset: 0; background-image: repeating-linear-gradient(45deg, rgba(255,255,255,0.02) 0 2px, transparent 2px 6px); pointer-events: none; } .cdt-fls__badge { position: absolute; top: 22px; right: -42px; background: var(--cdt-fls-flame); color: #fff; font-family: 'Archivo Black', sans-serif; font-size: 12px; letter-spacing: 2px; padding: 8px 50px; transform: rotate(45deg); z-index: 3; } .cdt-fls__img-zone { height: 180px; background: linear-gradient(135deg, #2a2a2a, #111), var(--cdt-fls-ink); display: flex; align-items: center; justify-content: center; border-bottom: 3px solid var(--cdt-fls-flame); } .cdt-fls__img-zone span { font-family: 'Archivo Black', sans-serif; font-size: 56px; color: var(--cdt-fls-flame); opacity: 0.85; text-shadow: 4px 4px 0 rgba(0,0,0,0.5); transform: rotate(-6deg); } .cdt-fls__info { padding: 24px 28px 30px; position: relative; z-index: 2; } .cdt-fls__cat { font-size: 11px; letter-spacing: 4px; color: var(--cdt-fls-gold); text-transform: uppercase; } .cdt-fls__title { font-family: 'Archivo Black', sans-serif; font-size: 26px; line-height: 1.05; margin: 8px 0 14px; text-transform: uppercase; color: var(--cdt-fls-paper); } .cdt-fls__price-row { display: flex; align-items: baseline; gap: 12px; margin-bottom: 22px; } .cdt-fls__price { font-family: 'Archivo Black', sans-serif; font-size: 32px; color: var(--cdt-fls-flame); } .cdt-fls__was { font-size: 16px; color: #777; text-decoration: line-through; } .cdt-fls__off { margin-left: auto; background: var(--cdt-fls-gold); color: var(--cdt-fls-ink); font-weight: 700; padding: 4px 10px; font-size: 13px; } .cdt-fls__urgency { font-size: 12px; letter-spacing: 2px; text-transform: uppercase; color: var(--cdt-fls-flame); margin-bottom: 10px; display: flex; align-items: center; gap: 8px; } .cdt-fls__pulse { width: 9px; height: 9px; border-radius: 50%; background: var(--cdt-fls-flame); animation: cdt-fls-blip 1s infinite; } @keyframes cdt-fls-blip { 0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(255,59,20,.6); } 50% { opacity: 0.4; box-shadow: 0 0 0 8px rgba(255,59,20,0); } } .cdt-fls__timer { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 22px; } .cdt-fls__seg { background: var(--cdt-fls-paper); color: var(--cdt-fls-ink); border-radius: 3px; padding: 12px 4px 6px; text-align: center; position: relative; overflow: hidden; } .cdt-fls__seg::after { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 50%; background: rgba(0,0,0,0.04); } .cdt-fls__num { font-family: 'Archivo Black', sans-serif; font-size: 30px; line-height: 1; position: relative; z-index: 1; display: block; } .cdt-fls__lab { font-size: 9px; letter-spacing: 2px; text-transform: uppercase; color: #888; margin-top: 6px; display: block; } .cdt-fls__buy { width: 100%; background: var(--cdt-fls-flame); color: #fff; border: none; padding: 16px; font-family: 'Archivo Black', sans-serif; font-size: 15px; letter-spacing: 2px; text-transform: uppercase; cursor: pointer; transition: transform 0.15s, background 0.2s; } .cdt-fls__buy:hover { background: var(--cdt-fls-gold); color: var(--cdt-fls-ink); transform: translateY(-2px); } .cdt-fls__buy:active { transform: translateY(0); } .cdt-fls__buy:focus-visible { outline: 2px solid var(--cdt-fls-gold); outline-offset: 3px; } .cdt-fls__stock { text-align: center; font-size: 11px; color: #999; margin-top: 12px; letter-spacing: 1px; } .cdt-fls__stock b { color: var(--cdt-fls-gold); } @media (prefers-reduced-motion: reduce) { .cdt-fls__pulse, .cdt-fls__buy { animation: none; transition: none; } } ``` **JS:** ```js (() => { const root = document.querySelector('.cdt-fls'); if (!root) return; const target = Date.now() + (1*86400 + 7*3600 + 42*60 + 18) * 1000; const pad = (n) => String(n).padStart(2, '0'); const els = { d: root.querySelector('[data-cdt-fls="d"]'), h: root.querySelector('[data-cdt-fls="h"]'), m: root.querySelector('[data-cdt-fls="m"]'), s: root.querySelector('[data-cdt-fls="s"]'), }; function tick() { const diff = Math.max(0, target - Date.now()); els.d.textContent = pad(Math.floor(diff / 86400000)); els.h.textContent = pad(Math.floor(diff % 86400000 / 3600000)); els.m.textContent = pad(Math.floor(diff % 3600000 / 60000)); els.s.textContent = pad(Math.floor(diff % 60000 / 1000)); } tick(); setInterval(tick, 1000); })(); ``` ### 02. Website Sticky Announcement Bars (Site-Wide) **Type:** CSS + JS **Description:** An ultra-thin, flexbox-aligned strip pinned to the top of the viewport, broadcasting a free-shipping deadline. Compact monospace clock with blinking colon separators, inline CTA pill, and a faux scrollable page so you can see it stay fixed. Best for site-wide promo bars, shipping cutoff alerts, holiday campaign chrome, and any persistent deadline that should never scroll away. **HTML:** ```html
🎉 FREE express shipping on all orders — ends midnight!
Ends in 05 00 00
Shop Now

Your storefront content

The announcement strip above stays pinned to the top of the section as visitors scroll. It is built with a flexbox-aligned inline layout, a compact monospace clock, and clean translucent borders that flow naturally with a site header.

Scroll this card to confirm the bar remains fixed. The blinking colon separators reinforce that the deadline is live and ticking.

↑ The bar stays put while you scroll ↑

``` **CSS:** ```css /* ─── 02 Sticky Announcement Bar — site-wide countdown ──────── */ @import url('https://fonts.googleapis.com/css2?family=Sora:wght@400;600;700&family=DM+Mono:wght@500&display=swap'); .cdt-stk { --cdt-stk-bar-bg: #0d1b2a; --cdt-stk-accent: #4ee1a0; --cdt-stk-accent-2: #7cc6fe; --cdt-stk-text: #eef4f8; position: relative; width: 100%; height: 560px; background: linear-gradient(180deg, #c7d4dc 0%, #9fb2bd 100%); font-family: 'Sora', sans-serif; display: flex; flex-direction: column; overflow-y: auto; overflow-x: hidden; box-sizing: border-box; } .cdt-stk *, .cdt-stk *::before, .cdt-stk *::after { box-sizing: border-box; margin: 0; padding: 0; } .cdt-stk__announce { position: sticky; top: 0; z-index: 100; width: 100%; background: var(--cdt-stk-bar-bg); background-image: radial-gradient(circle at 15% 50%, rgba(78,225,160,0.18), transparent 35%), radial-gradient(circle at 85% 50%, rgba(124,198,254,0.15), transparent 35%); color: var(--cdt-stk-text); border-bottom: 1px solid rgba(255,255,255,0.08); box-shadow: 0 4px 24px rgba(13,27,42,0.25); } .cdt-stk__inner { max-width: 1180px; margin: 0 auto; padding: 11px 22px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; justify-content: center; } .cdt-stk__ship-icon { width: 22px; height: 22px; border-radius: 50%; background: linear-gradient(135deg, var(--cdt-stk-accent), var(--cdt-stk-accent-2)); display: flex; align-items: center; justify-content: center; flex-shrink: 0; box-shadow: 0 0 14px rgba(78,225,160,0.5); } .cdt-stk__ship-icon svg { width: 13px; height: 13px; fill: var(--cdt-stk-bar-bg); } .cdt-stk__msg { font-size: 14px; font-weight: 600; letter-spacing: 0.2px; } .cdt-stk__hl { color: var(--cdt-stk-accent); } .cdt-stk__divider { width: 1px; height: 18px; background: rgba(255,255,255,0.15); } .cdt-stk__countdown { display: flex; align-items: center; gap: 6px; font-family: 'DM Mono', monospace; } .cdt-stk__lbl { font-family: 'Sora', sans-serif; font-size: 12px; opacity: 0.65; margin-right: 4px; letter-spacing: 0.5px; } .cdt-stk__unit { background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.1); border-radius: 6px; padding: 4px 8px; font-size: 14px; font-weight: 500; min-width: 30px; text-align: center; color: var(--cdt-stk-text); } .cdt-stk__sep { color: var(--cdt-stk-accent); font-weight: 700; animation: cdt-stk-flick 1s steps(1) infinite; } @keyframes cdt-stk-flick { 50% { opacity: 0.25; } } .cdt-stk__cta-link { font-size: 13px; font-weight: 700; color: var(--cdt-stk-bar-bg); background: var(--cdt-stk-accent); padding: 7px 16px; border-radius: 20px; text-decoration: none; white-space: nowrap; transition: transform 0.15s, box-shadow 0.2s; } .cdt-stk__cta-link:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(78,225,160,0.4); } .cdt-stk__cta-link:focus-visible { outline: 2px solid var(--cdt-stk-bar-bg); outline-offset: 2px; } .cdt-stk__page { flex: 1; padding: 60px 24px; max-width: 760px; margin: 0 auto; color: #2b3a44; } .cdt-stk__h2 { font-size: 22px; margin-bottom: 14px; font-weight: 700; color: #1c2a33; } .cdt-stk__p { line-height: 1.8; margin-bottom: 16px; opacity: 0.8; font-size: 14px; } .cdt-stk__ghost { height: 12px; background: rgba(43,58,68,0.12); border-radius: 6px; margin-bottom: 10px; } .cdt-stk__ghost--s { width: 60%; } .cdt-stk__hint { text-align: center; font-size: 12px; opacity: 0.55; margin-top: 30px; } @media (max-width: 600px) { .cdt-stk__divider { display: none; } .cdt-stk__inner { gap: 10px; padding: 10px 14px; } .cdt-stk__msg { font-size: 12.5px; text-align: center; } } @media (prefers-reduced-motion: reduce) { .cdt-stk__sep, .cdt-stk__cta-link { animation: none; transition: none; } } ``` **JS:** ```js (() => { const root = document.querySelector('.cdt-stk'); if (!root) return; const target = Date.now() + (5*3600 + 12*60 + 47) * 1000; const pad = (n) => String(n).padStart(2, '0'); const h = root.querySelector('[data-cdt-stk="h"]'); const m = root.querySelector('[data-cdt-stk="m"]'); const s = root.querySelector('[data-cdt-stk="s"]'); function tick() { const diff = Math.max(0, target - Date.now()); h.textContent = pad(Math.floor(diff / 3600000)); m.textContent = pad(Math.floor(diff % 3600000 / 60000)); s.textContent = pad(Math.floor(diff % 60000 / 1000)); } tick(); setInterval(tick, 1000); })(); ``` ### 03. Shopping Cart Expiration Timers **Type:** CSS + JS **Description:** A compact cart widget with a reserved-items alert, "Your cart is reserved for 04:59" MM:SS clock, blinking colon, and a draining progress sliver that shifts to red in the final 30 seconds — purpose-built to combat cart abandonment. Best for checkout flows, BOPIS reservations, ticket holds, limited-stock carts where a deadline is the conversion lever. **HTML:** ```html

Your cart is reserved for

0459

Studio Wireless Headphones

Matte Black · Qty 1
$129

Pulse Fitness Watch

Slate · Qty 1
$89
Subtotal$218.00
ShippingFree
Total$218.00

⚡ Hurry — items release back to stock when the timer ends

``` **CSS:** ```css /* ─── 03 Cart Expiration Timer — reservation hold UX ───────── */ @import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@500;600;700;800&family=Roboto+Mono:wght@600&display=swap'); .cdt-crt { --cdt-crt-bg: #faf7f2; --cdt-crt-card: #ffffff; --cdt-crt-ink: #211c1a; --cdt-crt-muted: #8a807a; --cdt-crt-alert: #e8552d; --cdt-crt-alert-soft: #fef0eb; --cdt-crt-line: #efe9e1; position: relative; width: 100%; min-height: 520px; background: var(--cdt-crt-bg); background-image: radial-gradient(circle at 90% 0%, rgba(232,85,45,0.05), transparent 40%); font-family: 'Plus Jakarta Sans', sans-serif; display: flex; align-items: center; justify-content: center; padding: 36px 18px; color: var(--cdt-crt-ink); box-sizing: border-box; overflow: hidden; } .cdt-crt *, .cdt-crt *::before, .cdt-crt *::after { box-sizing: border-box; margin: 0; padding: 0; } .cdt-crt__cart { background: var(--cdt-crt-card); width: 100%; max-width: 420px; border-radius: 20px; border: 1px solid var(--cdt-crt-line); box-shadow: 0 30px 60px -28px rgba(33,28,26,0.3); overflow: hidden; } .cdt-crt__reserve { background: var(--cdt-crt-alert-soft); border-bottom: 1px solid #f6ddd4; padding: 16px 22px; display: flex; align-items: center; gap: 13px; } .cdt-crt__lock { width: 34px; height: 34px; flex-shrink: 0; background: var(--cdt-crt-alert); border-radius: 10px; display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 14px -4px rgba(232,85,45,0.6); } .cdt-crt__lock svg { width: 16px; height: 16px; fill: #fff; } .cdt-crt__reserve-text { flex: 1; } .cdt-crt__reserve-text p { font-size: 12.5px; color: var(--cdt-crt-muted); font-weight: 600; } .cdt-crt__clock { font-family: 'Roboto Mono', monospace; font-size: 22px; font-weight: 600; color: var(--cdt-crt-alert); letter-spacing: 1px; margin-top: 1px; } .cdt-crt__colon { animation: cdt-crt-blink 1s steps(1) infinite; } @keyframes cdt-crt-blink { 50% { opacity: 0; } } .cdt-crt__bar-track { height: 4px; background: #f3e7e1; } .cdt-crt__bar-fill { height: 100%; width: 100%; background: linear-gradient(90deg, var(--cdt-crt-alert), #f6915f); transition: width 1s linear, background 0.3s; } .cdt-crt__items { padding: 8px 22px 4px; } .cdt-crt__row { display: flex; align-items: center; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--cdt-crt-line); } .cdt-crt__row:last-child { border-bottom: none; } .cdt-crt__thumb { width: 56px; height: 56px; border-radius: 12px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 24px; } .cdt-crt__t1 { background: #eaf2ff; } .cdt-crt__t2 { background: #fff1e8; } .cdt-crt__meta { flex: 1; } .cdt-crt__meta h3 { font-size: 14px; font-weight: 700; } .cdt-crt__meta span { font-size: 12px; color: var(--cdt-crt-muted); font-weight: 600; } .cdt-crt__price { font-weight: 800; font-size: 15px; } .cdt-crt__summary { padding: 18px 22px 22px; background: #fdfbf8; border-top: 1px solid var(--cdt-crt-line); } .cdt-crt__line { display: flex; justify-content: space-between; font-size: 13px; color: var(--cdt-crt-muted); font-weight: 600; margin-bottom: 8px; } .cdt-crt__total { display: flex; justify-content: space-between; font-size: 18px; font-weight: 800; margin: 12px 0 18px; } .cdt-crt__checkout { width: 100%; border: none; background: var(--cdt-crt-ink); color: #fff; font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 700; font-size: 15px; padding: 16px; border-radius: 14px; cursor: pointer; transition: transform 0.15s, background 0.2s; } .cdt-crt__checkout:hover { background: var(--cdt-crt-alert); transform: translateY(-2px); } .cdt-crt__checkout:focus-visible { outline: 2px solid var(--cdt-crt-alert); outline-offset: 3px; } .cdt-crt__reassure { text-align: center; font-size: 11px; color: var(--cdt-crt-muted); margin-top: 12px; font-weight: 600; } @media (prefers-reduced-motion: reduce) { .cdt-crt__colon, .cdt-crt__bar-fill, .cdt-crt__checkout { animation: none; transition: none; } } ``` **JS:** ```js (() => { const root = document.querySelector('.cdt-crt'); if (!root) return; const DURATION = 5 * 60; let remaining = 4 * 60 + 59; const pad = (n) => String(n).padStart(2, '0'); const mEl = root.querySelector('[data-cdt-crt="m"]'); const sEl = root.querySelector('[data-cdt-crt="s"]'); const bar = root.querySelector('[data-cdt-crt="bar"]'); function tick() { mEl.textContent = pad(Math.floor(remaining / 60)); sEl.textContent = pad(remaining % 60); bar.style.width = (remaining / DURATION * 100) + '%'; if (remaining <= 30) bar.style.background = '#c0392b'; if (remaining > 0) remaining--; } tick(); setInterval(tick, 1000); })(); ``` ### 04. "Coming Soon" & Product Launch Landing Pages **Type:** CSS + JS **Description:** A full-screen hero with animated aurora blobs, grain overlay, and four glassmorphism cards as the visual focal point. Gradient display typography, live status pip, and an email "Notify Me" capture for building launch anticipation. Best for unreleased product teasers, app pre-launch pages, event registration funnels, and waitlist capture flows. **HTML:** ```html
Launching Soon

Something
extraordinary
is coming.

We're putting the final touches on the next generation of our platform. Be the first to experience it the moment we go live.

00Days
00Hours
00Minutes
00Seconds
``` **CSS:** ```css /* ─── 04 Coming Soon — glassmorphism aurora launch ─────────── */ @import url('https://fonts.googleapis.com/css2?family=Syne:wght@600;700;800&family=Outfit:wght@300;400;500&display=swap'); .cdt-coa { --cdt-coa-bg: #07060f; --cdt-coa-glass: rgba(255,255,255,0.06); --cdt-coa-glass-line: rgba(255,255,255,0.14); --cdt-coa-text: #f3f0ff; --cdt-coa-muted: #a39fc4; --cdt-coa-glow1: #8b5cff; --cdt-coa-glow2: #2de2c6; position: relative; width: 100%; min-height: 600px; background: var(--cdt-coa-bg); font-family: 'Outfit', sans-serif; color: var(--cdt-coa-text); display: flex; align-items: center; justify-content: center; overflow: hidden; padding: 40px 30px; box-sizing: border-box; } .cdt-coa *, .cdt-coa *::before, .cdt-coa *::after { box-sizing: border-box; margin: 0; padding: 0; } .cdt-coa__aurora { position: absolute; inset: -20%; z-index: 0; filter: blur(90px); opacity: 0.7; } .cdt-coa__aurora span { position: absolute; border-radius: 50%; mix-blend-mode: screen; } .cdt-coa__b1 { width: 50%; height: 50%; background: var(--cdt-coa-glow1); top: -10%; left: -5%; animation: cdt-coa-float1 14s ease-in-out infinite; } .cdt-coa__b2 { width: 45%; height: 45%; background: var(--cdt-coa-glow2); bottom: -15%; right: -5%; animation: cdt-coa-float2 18s ease-in-out infinite; } .cdt-coa__b3 { width: 30%; height: 30%; background: #ff5db1; top: 40%; left: 50%; animation: cdt-coa-float1 22s ease-in-out infinite reverse; } @keyframes cdt-coa-float1 { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(8%, 12%) scale(1.15); } } @keyframes cdt-coa-float2 { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(-10%, -8%) scale(1.1); } } .cdt-coa__wrap { position: relative; z-index: 2; text-align: center; max-width: 760px; } .cdt-coa__tag { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; letter-spacing: 3px; text-transform: uppercase; color: var(--cdt-coa-muted); border: 1px solid var(--cdt-coa-glass-line); background: var(--cdt-coa-glass); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); padding: 8px 18px; border-radius: 30px; margin-bottom: 22px; } .cdt-coa__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--cdt-coa-glow2); box-shadow: 0 0 10px var(--cdt-coa-glow2); animation: cdt-coa-ping 1.6s infinite; } @keyframes cdt-coa-ping { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } } .cdt-coa__h1 { font-family: 'Syne', sans-serif; font-weight: 800; font-size: clamp(34px, 6vw, 64px); line-height: 0.95; letter-spacing: -2px; margin-bottom: 16px; background: linear-gradient(120deg, #fff 30%, #c4b5ff 60%, var(--cdt-coa-glow2)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; } .cdt-coa__sub { font-weight: 300; font-size: clamp(14px, 1.8vw, 17px); color: var(--cdt-coa-muted); max-width: 520px; margin: 0 auto 36px; line-height: 1.6; } .cdt-coa__timer { display: flex; justify-content: center; gap: 14px; margin-bottom: 36px; flex-wrap: wrap; } .cdt-coa__card { background: var(--cdt-coa-glass); border: 1px solid var(--cdt-coa-glass-line); backdrop-filter: blur(20px) saturate(150%); -webkit-backdrop-filter: blur(20px) saturate(150%); border-radius: 22px; padding: 22px 8px 16px; width: 110px; position: relative; box-shadow: inset 0 1px 0 rgba(255,255,255,0.1), 0 24px 50px -20px rgba(0,0,0,0.6); overflow: hidden; } .cdt-coa__card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.5), transparent); } .cdt-coa__num { font-family: 'Syne', sans-serif; font-weight: 700; font-size: 44px; line-height: 1; text-shadow: 0 0 24px rgba(139,92,255,0.5); display: block; } .cdt-coa__lab { display: block; margin-top: 10px; font-size: 10px; letter-spacing: 2.5px; text-transform: uppercase; color: var(--cdt-coa-muted); } .cdt-coa__notify { display: inline-flex; background: var(--cdt-coa-glass); border: 1px solid var(--cdt-coa-glass-line); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-radius: 40px; padding: 6px 6px 6px 22px; align-items: center; gap: 12px; } .cdt-coa__notify input { background: transparent; border: none; outline: none; color: var(--cdt-coa-text); font-family: 'Outfit', sans-serif; font-size: 15px; width: 200px; } .cdt-coa__notify input::placeholder { color: var(--cdt-coa-muted); } .cdt-coa__notify button { border: none; cursor: pointer; background: linear-gradient(120deg, var(--cdt-coa-glow1), var(--cdt-coa-glow2)); color: #07060f; font-weight: 600; font-family: 'Outfit', sans-serif; font-size: 14px; padding: 12px 24px; border-radius: 34px; transition: transform 0.15s, box-shadow 0.2s; } .cdt-coa__notify button:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(139,92,255,0.5); } .cdt-coa__notify button:focus-visible { outline: 2px solid var(--cdt-coa-glow2); outline-offset: 2px; } @media (max-width: 560px) { .cdt-coa__card { width: 70px; padding: 18px 4px 12px; } .cdt-coa__num { font-size: 30px; } .cdt-coa__notify input { width: 130px; } } @media (prefers-reduced-motion: reduce) { .cdt-coa__aurora span, .cdt-coa__dot, .cdt-coa__notify button { animation: none; transition: none; } } ``` **JS:** ```js (() => { const root = document.querySelector('.cdt-coa'); if (!root) return; const target = Date.now() + (18*86400 + 6*3600 + 31*60 + 9) * 1000; const pad = (n) => String(n).padStart(2, '0'); const els = { d: root.querySelector('[data-cdt-coa="d"]'), h: root.querySelector('[data-cdt-coa="h"]'), m: root.querySelector('[data-cdt-coa="m"]'), s: root.querySelector('[data-cdt-coa="s"]'), }; function tick() { const diff = Math.max(0, target - Date.now()); els.d.textContent = pad(Math.floor(diff / 86400000)); els.h.textContent = pad(Math.floor(diff % 86400000 / 3600000)); els.m.textContent = pad(Math.floor(diff % 3600000 / 60000)); els.s.textContent = pad(Math.floor(diff % 60000 / 1000)); } tick(); setInterval(tick, 1000); })(); ``` ### 05. Circular Progress & Activity Timers (SaaS/Fitness/EdTech) **Type:** CSS + JS **Description:** A radial SVG ring using stroke-dasharray/stroke-dashoffset that smoothly drains as time runs out, color-shifting green → amber → red. Framed as a quiz timer with center digits, live status, and pause/resume/reset controls. Best for SaaS onboarding step timers, fitness app interval rounds, EdTech quiz countdowns, and webinar pre-roll holds. **HTML:** ```html
Section 2 of 4
Algebra Aptitude Quiz
02:00
Remaining
Time is running
``` **CSS:** ```css /* ─── 05 Circular Progress Timer — SVG ring drain ──────────── */ @import url('https://fonts.googleapis.com/css2?family=Sora:wght@400;600;700;800&family=JetBrains+Mono:wght@600;700&display=swap'); .cdt-cir { --cdt-cir-bg: #0f1419; --cdt-cir-panel: #161d26; --cdt-cir-panel-line: #232c38; --cdt-cir-text: #e8eef4; --cdt-cir-muted: #7c8a9a; --cdt-cir-ring-bg: #232c38; --cdt-cir-green: #34d399; --cdt-cir-amber: #fbbf24; --cdt-cir-red: #f87171; position: relative; width: 100%; min-height: 560px; background: var(--cdt-cir-bg); background-image: radial-gradient(circle at 50% 0%, rgba(52,211,153,0.06), transparent 50%); font-family: 'Sora', sans-serif; color: var(--cdt-cir-text); display: flex; align-items: center; justify-content: center; padding: 36px 20px; box-sizing: border-box; overflow: hidden; } .cdt-cir *, .cdt-cir *::before, .cdt-cir *::after { box-sizing: border-box; margin: 0; padding: 0; } .cdt-cir__panel { background: var(--cdt-cir-panel); border: 1px solid var(--cdt-cir-panel-line); border-radius: 28px; padding: 36px 36px 32px; width: 100%; max-width: 380px; text-align: center; box-shadow: 0 40px 80px -40px rgba(0,0,0,0.8); } .cdt-cir__quiz-label { font-size: 12px; letter-spacing: 2.5px; text-transform: uppercase; color: var(--cdt-cir-muted); margin-bottom: 6px; font-weight: 600; } .cdt-cir__quiz-title { font-size: 18px; font-weight: 700; margin-bottom: 26px; } .cdt-cir__ring-wrap { position: relative; width: 220px; height: 220px; margin: 0 auto 26px; } .cdt-cir__ring-wrap svg { transform: rotate(-90deg); width: 100%; height: 100%; } .cdt-cir__ring-bg { fill: none; stroke: var(--cdt-cir-ring-bg); stroke-width: 14; } .cdt-cir__ring-fg { fill: none; stroke: var(--cdt-cir-green); stroke-width: 14; stroke-linecap: round; transition: stroke-dashoffset 1s linear, stroke 0.4s ease; filter: drop-shadow(0 0 8px rgba(52,211,153,0.5)); } .cdt-cir__ring-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; } .cdt-cir__time { font-family: 'JetBrains Mono', monospace; font-size: 52px; font-weight: 700; line-height: 1; letter-spacing: -1px; } .cdt-cir__cap { font-size: 11px; letter-spacing: 2px; text-transform: uppercase; color: var(--cdt-cir-muted); margin-top: 8px; } .cdt-cir__status { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; padding: 7px 16px; border-radius: 20px; background: rgba(52,211,153,0.12); color: var(--cdt-cir-green); margin-bottom: 24px; transition: all 0.4s; } .cdt-cir__pip { width: 8px; height: 8px; border-radius: 50%; background: currentColor; animation: cdt-cir-blip 1.2s infinite; } @keyframes cdt-cir-blip { 50% { opacity: 0.3; } } .cdt-cir__controls { display: flex; gap: 10px; } .cdt-cir__controls button { flex: 1; font-family: 'Sora', sans-serif; font-weight: 600; font-size: 14px; padding: 12px; border-radius: 14px; cursor: pointer; border: 1px solid var(--cdt-cir-panel-line); background: transparent; color: var(--cdt-cir-text); transition: background 0.2s, transform 0.15s, border-color 0.2s; } .cdt-cir__controls button:hover { background: var(--cdt-cir-panel-line); transform: translateY(-1px); } .cdt-cir__controls button:focus-visible { outline: 2px solid var(--cdt-cir-green); outline-offset: 2px; } .cdt-cir__primary { background: var(--cdt-cir-green) !important; color: #07120d !important; border-color: var(--cdt-cir-green) !important; } .cdt-cir__primary:hover { background: #2bbd86 !important; } @media (prefers-reduced-motion: reduce) { .cdt-cir__ring-fg, .cdt-cir__pip, .cdt-cir__controls button { transition: none; animation: none; } } ``` **JS:** ```js (() => { const root = document.querySelector('.cdt-cir'); if (!root) return; const R = 106; const CIRC = 2 * Math.PI * R; const ring = root.querySelector('[data-cdt-cir="ring"]'); const timeEl = root.querySelector('[data-cdt-cir="time"]'); const statusEl = root.querySelector('[data-cdt-cir="status"]'); const statusTxt = root.querySelector('[data-cdt-cir="statusTxt"]'); const toggleBtn = root.querySelector('[data-cdt-cir="toggle"]'); const resetBtn = root.querySelector('[data-cdt-cir="reset"]'); ring.style.strokeDasharray = CIRC; const TOTAL = 120; let remaining = TOTAL; let running = true; const pad = (n) => String(n).padStart(2, '0'); function color() { const frac = remaining / TOTAL; if (frac > 0.5) return '#34d399'; if (frac > 0.2) return '#fbbf24'; return '#f87171'; } function render() { timeEl.textContent = pad(Math.floor(remaining / 60)) + ':' + pad(remaining % 60); ring.style.strokeDashoffset = CIRC * (1 - remaining / TOTAL); const c = color(); ring.style.stroke = c; ring.style.filter = 'drop-shadow(0 0 8px ' + c + ')'; statusEl.style.background = c + '20'; statusEl.style.color = c; if (remaining <= 0) { statusTxt.textContent = "Time's up!"; running = false; toggleBtn.textContent = 'Start'; } } function loop() { if (running && remaining > 0) { remaining--; render(); } } toggleBtn.onclick = () => { if (remaining <= 0) remaining = TOTAL; running = !running; toggleBtn.textContent = running ? 'Pause' : 'Resume'; statusTxt.textContent = running ? 'Time is running' : 'Paused'; }; resetBtn.onclick = () => { remaining = TOTAL; running = true; toggleBtn.textContent = 'Pause'; statusTxt.textContent = 'Time is running'; render(); }; render(); setInterval(loop, 1000); })(); ``` ### 06. Retro Flip-Clock Timers **Type:** CSS + JS **Description:** A classic airport split-flap board using 3D CSS transforms and perspective for mechanical flip motion. Two-digit flaps per unit, glowing amber accents, pulsing colons, and a film-grain ambiance for premium, event-style branding. Best for premium product launches, gallery openings, festival countdowns, and anywhere the deadline itself deserves to be the visual centerpiece. **HTML:** ```html
Departure In
Days
Hours
Minutes
Seconds
``` **CSS:** ```css /* ─── 06 Retro Flip Clock — 3D split-flap mechanism ────────── */ @import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Oswald:wght@300;400;500&display=swap'); .cdt-flp { --cdt-flp-bg: #1a1410; --cdt-flp-flap: #181818; --cdt-flp-flap-line: #000; --cdt-flp-digit: #f5f0e6; --cdt-flp-accent: #e6b450; --cdt-flp-label: #8c7a5c; position: relative; width: 100%; min-height: 520px; background: radial-gradient(circle at 50% 20%, rgba(230,180,80,0.10), transparent 55%), repeating-linear-gradient(0deg, rgba(0,0,0,0.15) 0 2px, transparent 2px 4px), var(--cdt-flp-bg); font-family: 'Oswald', sans-serif; color: var(--cdt-flp-digit); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 20px; box-sizing: border-box; overflow: hidden; } .cdt-flp *, .cdt-flp *::before, .cdt-flp *::after { box-sizing: border-box; margin: 0; padding: 0; } .cdt-flp__marquee { font-family: 'Bebas Neue', sans-serif; font-size: clamp(20px, 3vw, 30px); letter-spacing: 6px; color: var(--cdt-flp-accent); margin-bottom: 30px; text-shadow: 0 2px 12px rgba(230,180,80,0.4); } .cdt-flp__clock { display: flex; align-items: center; gap: 10px; } .cdt-flp__group { display: flex; flex-direction: column; align-items: center; gap: 10px; } .cdt-flp__digits { display: flex; gap: 5px; } .cdt-flp__glabel { font-size: 11px; letter-spacing: 4px; text-transform: uppercase; color: var(--cdt-flp-label); font-weight: 400; } .cdt-flp__flap { position: relative; width: 56px; height: 80px; perspective: 320px; font-family: 'Bebas Neue', sans-serif; font-size: 60px; line-height: 80px; text-align: center; } .cdt-flp__flap .cdt-flp__card { position: absolute; left: 0; right: 0; height: 40px; overflow: hidden; background: var(--cdt-flp-flap); box-shadow: inset 0 0 14px rgba(0,0,0,0.6); } .cdt-flp__flap .cdt-flp__top { top: 0; border-radius: 7px 7px 0 0; border-bottom: 1px solid var(--cdt-flp-flap-line); align-items: flex-end; } .cdt-flp__flap .cdt-flp__top span { display: block; } .cdt-flp__flap .cdt-flp__bottom { bottom: 0; border-radius: 0 0 7px 7px; line-height: 0; } .cdt-flp__flap .cdt-flp__bottom span { display: block; line-height: 80px; margin-top: -40px; } .cdt-flp__flap .cdt-flp__flip-top, .cdt-flp__flap .cdt-flp__flip-bottom { position: absolute; left: 0; right: 0; height: 40px; overflow: hidden; background: var(--cdt-flp-flap); backface-visibility: hidden; } .cdt-flp__flap .cdt-flp__flip-top { top: 0; border-radius: 7px 7px 0 0; border-bottom: 1px solid var(--cdt-flp-flap-line); transform-origin: bottom; box-shadow: inset 0 0 14px rgba(0,0,0,0.6); } .cdt-flp__flap .cdt-flp__flip-bottom { bottom: 0; border-radius: 0 0 7px 7px; line-height: 0; transform-origin: top; transform: rotateX(90deg); box-shadow: inset 0 0 14px rgba(0,0,0,0.6); } .cdt-flp__flap .cdt-flp__flip-bottom span { display: block; line-height: 80px; margin-top: -40px; } .cdt-flp__flap.cdt-flp--go .cdt-flp__flip-top { animation: cdt-flp-flip-top 0.3s ease-in forwards; } .cdt-flp__flap.cdt-flp--go .cdt-flp__flip-bottom { animation: cdt-flp-flip-bottom 0.3s 0.3s ease-out forwards; } @keyframes cdt-flp-flip-top { 0% { transform: rotateX(0); } 100% { transform: rotateX(-90deg); } } @keyframes cdt-flp-flip-bottom { 0% { transform: rotateX(90deg); } 100% { transform: rotateX(0); } } .cdt-flp__flap::after { content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 2px; background: rgba(0,0,0,0.55); transform: translateY(-1px); z-index: 5; } .cdt-flp__colon { font-family: 'Bebas Neue', sans-serif; font-size: 48px; color: var(--cdt-flp-accent); align-self: flex-start; margin-top: 8px; animation: cdt-flp-pulse 1s steps(1) infinite; } @keyframes cdt-flp-pulse { 50% { opacity: 0.25; } } @media (max-width: 560px) { .cdt-flp__flap { width: 38px; height: 56px; font-size: 42px; line-height: 56px; } .cdt-flp__flap .cdt-flp__card, .cdt-flp__flap .cdt-flp__flip-top, .cdt-flp__flap .cdt-flp__flip-bottom { height: 28px; } .cdt-flp__flap .cdt-flp__bottom span, .cdt-flp__flap .cdt-flp__flip-bottom span { line-height: 56px; margin-top: -28px; } .cdt-flp__colon { font-size: 34px; } .cdt-flp__clock { gap: 6px; } .cdt-flp__digits { gap: 3px; } } @media (prefers-reduced-motion: reduce) { .cdt-flp__flap.cdt-flp--go .cdt-flp__flip-top, .cdt-flp__flap.cdt-flp--go .cdt-flp__flip-bottom, .cdt-flp__colon { animation: none; } } ``` **JS:** ```js (() => { const root = document.querySelector('.cdt-flp'); if (!root) return; function buildFlap(el, val) { el.dataset.val = val; el.innerHTML = '
' + val + '
' + '
' + val + '
' + '
' + val + '
' + '
' + val + '
'; } function setFlap(el, next) { const cur = el.dataset.val; if (cur === next) return; const top = el.querySelector('.cdt-flp__top span'); const bottom = el.querySelector('.cdt-flp__bottom span'); const flipTop = el.querySelector('.cdt-flp__flip-top span'); const flipBottom = el.querySelector('.cdt-flp__flip-bottom span'); flipTop.textContent = cur; flipBottom.textContent = next; bottom.textContent = next; top.textContent = cur; el.classList.remove('cdt-flp--go'); void el.offsetWidth; el.classList.add('cdt-flp--go'); setTimeout(() => { top.textContent = next; el.dataset.val = next; }, 600); } const flaps = { d0: root.querySelector('[data-cdt-flp="d0"]'), d1: root.querySelector('[data-cdt-flp="d1"]'), h0: root.querySelector('[data-cdt-flp="h0"]'), h1: root.querySelector('[data-cdt-flp="h1"]'), m0: root.querySelector('[data-cdt-flp="m0"]'), m1: root.querySelector('[data-cdt-flp="m1"]'), s0: root.querySelector('[data-cdt-flp="s0"]'), s1: root.querySelector('[data-cdt-flp="s1"]'), }; Object.values(flaps).forEach((f) => buildFlap(f, '0')); const target = Date.now() + (3*86400 + 14*3600 + 25*60 + 50) * 1000; const pad = (n) => String(n).padStart(2, '0'); function render() { const diff = Math.max(0, target - Date.now()); const d = pad(Math.floor(diff / 86400000)); const h = pad(Math.floor(diff % 86400000 / 3600000)); const m = pad(Math.floor(diff % 3600000 / 60000)); const s = pad(Math.floor(diff % 60000 / 1000)); setFlap(flaps.d0, d[0]); setFlap(flaps.d1, d[1]); setFlap(flaps.h0, h[0]); setFlap(flaps.h1, h[1]); setFlap(flaps.m0, m[0]); setFlap(flaps.m1, m[1]); setFlap(flaps.s0, s[0]); setFlap(flaps.s1, s[1]); } render(); setInterval(render, 1000); })(); ``` --- ## 12 CSS Dark Mode UI Patterns URL: https://codefronts.com/design-styles/css-dark-mode-ui/ Description: 12 free CSS dark-mode UI patterns — OLED true-black, single-accent surfaces, layered slate, and emissive glow effects with copy-paste HTML and CSS. Demo count: 12 ### 01. OLED Card **Type:** Pure CSS **Description:** True-black background that switches off OLED pixels entirely — paired with a single accent stroke for the active element. **HTML:** ```html
NEW

Battery saver

Pure-black surfaces save up to 60% on OLED screens.

``` **CSS:** ```css .dm-oled-bg { padding: 28px; border-radius: 16px; background: #000; } .dm-oled { background: #000; border: 1px solid rgba(255, 255, 255, 0.06); border-radius: 12px; padding: 18px 20px; color: #ededed; } .dm-oled__tag { display: inline-block; background: transparent; color: #4ade80; border: 1px solid #4ade80; padding: 2px 8px; border-radius: 4px; font: 700 9px ui-monospace, monospace; letter-spacing: 0.12em; margin-bottom: 12px; } .dm-oled__title { margin: 0 0 6px; font: 700 16px/1.2 system-ui, sans-serif; color: #fff; } .dm-oled__body { margin: 0 0 14px; font: 12px/1.55 system-ui, sans-serif; color: rgba(255, 255, 255, 0.55); } .dm-oled__btn { background: none; border: none; color: #4ade80; padding: 0; font: 600 12px system-ui, sans-serif; cursor: pointer; transition: color 0.2s; } .dm-oled__btn:hover { color: #86efac; } ``` ### 02. Stealth Panel **Type:** Pure CSS **Description:** Surfaces hide behind a near-black background — only the active control reveals itself with a hairline stroke. **HTML:** ```html
Status OPERATIONAL
Latency 42 ms
Region us-east-1
``` **CSS:** ```css .dm-stealth-bg { padding: 28px; border-radius: 16px; background: #050505; } .dm-stealth { background: #050505; border: 1px solid rgba(255, 255, 255, 0.04); border-radius: 10px; padding: 8px; } .dm-stealth__row { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; border-radius: 6px; transition: background 0.15s; } .dm-stealth__row:hover { background: rgba(255, 255, 255, 0.03); } .dm-stealth__row + .dm-stealth__row { border-top: 1px solid rgba(255, 255, 255, 0.04); } .dm-stealth__lbl { font: 500 11px ui-monospace, monospace; color: rgba(255, 255, 255, 0.55); letter-spacing: 0.08em; text-transform: uppercase; } .dm-stealth__val { font: 600 12px ui-monospace, monospace; color: rgba(255, 255, 255, 0.85); } .dm-stealth__val--ok { color: #4ade80; } ``` ### 03. Inkwell Modal **Type:** Pure CSS **Description:** Deep-black dialog with a single warm-amber rim — the kind of confirmation modal that whispers instead of shouting. **HTML:** ```html
!

Save your work?

Unsaved changes will be lost when you close.

``` **CSS:** ```css .dm-ink-bg { padding: 28px; border-radius: 16px; background: #0a0905; } .dm-ink { background: #000; border: 1px solid #d4a017; border-radius: 12px; padding: 18px 20px; text-align: center; box-shadow: 0 0 0 1px rgba(212, 160, 23, 0.25), 0 8px 32px rgba(212, 160, 23, 0.1); } .dm-ink__icon { width: 36px; height: 36px; margin: 0 auto 12px; border: 1.5px solid #d4a017; border-radius: 50%; display: grid; place-items: center; font: 800 18px ui-serif, Georgia; color: #d4a017; } .dm-ink__title { margin: 0 0 6px; font: 700 14px system-ui, sans-serif; color: #fff; } .dm-ink__body { margin: 0 0 16px; font: 12px/1.55 system-ui, sans-serif; color: rgba(255, 255, 255, 0.55); } .dm-ink__row { display: flex; gap: 8px; justify-content: center; } .dm-ink__btn { background: transparent; color: rgba(255, 255, 255, 0.7); border: 1px solid rgba(255, 255, 255, 0.15); padding: 7px 16px; border-radius: 7px; font: 600 11px system-ui, sans-serif; cursor: pointer; transition: all 0.18s; } .dm-ink__btn:hover { color: #fff; border-color: rgba(255, 255, 255, 0.35); } .dm-ink__btn--primary { background: #d4a017; color: #000; border-color: #d4a017; } .dm-ink__btn--primary:hover { background: #f5b818; border-color: #f5b818; } ``` ### 04. Cyber Terminal **Type:** Pure CSS **Description:** Phosphor-green CRT terminal aesthetic — text and chrome share one accent color, suggesting a coherent technical voice. **HTML:** ```html
node-01.codefronts.io
$ deploy --env=prod
→ Build complete in 8.42s
→ 158 pages · 0 errors
$
``` **CSS:** ```css .dm-cyber-bg { padding: 22px; border-radius: 16px; background: #020a05; } .dm-cyber { background: #020a05; border: 1px solid rgba(74, 222, 128, 0.25); border-radius: 8px; font-family: ui-monospace, "JetBrains Mono", monospace; color: #4ade80; overflow: hidden; } .dm-cyber__head { display: flex; align-items: center; gap: 8px; padding: 8px 14px; background: rgba(74, 222, 128, 0.06); border-bottom: 1px solid rgba(74, 222, 128, 0.15); font-size: 11px; color: rgba(74, 222, 128, 0.7); } .dm-cyber__dot { width: 6px; height: 6px; background: #4ade80; border-radius: 50%; box-shadow: 0 0 8px #4ade80; } .dm-cyber__body { padding: 12px 14px; font-size: 11.5px; line-height: 1.7; } .dm-cyber__line { color: rgba(74, 222, 128, 0.85); } .dm-cyber__prompt { color: #86efac; font-weight: 700; margin-right: 4px; } .dm-cyber__cur { animation: dm-cyber-blink 0.8s steps(2) infinite; } @keyframes dm-cyber-blink { 50% { opacity: 0; } } @media (prefers-reduced-motion: reduce) { .dm-cyber__cur { animation: none; } } ``` ### 05. Mocha Workstation **Type:** Pure CSS **Description:** Warm coffee-tone dark mode — espresso brown surfaces with cream highlights for a cozy reading-app aesthetic. **HTML:** ```html
FEATURED · 4 MIN READ

The art of restraint

In the long view, less surface area means fewer maintenance burdens. Choose carefully what you build.

M Marcus Rivera
``` **CSS:** ```css .dm-mocha-bg { padding: 28px; border-radius: 16px; background: #1c1410; } .dm-mocha { background: #2a1f18; border: 1px solid #3d2c20; border-radius: 10px; padding: 18px 22px; color: #f5e6d3; } .dm-mocha__meta { font: 700 10px ui-monospace, monospace; color: #c9a961; letter-spacing: 0.12em; margin-bottom: 10px; } .dm-mocha__title { margin: 0 0 8px; font: 700 16px/1.3 ui-serif, Georgia; color: #fff8ed; } .dm-mocha__body { margin: 0 0 14px; font: 12.5px/1.65 ui-serif, Georgia; color: #d6c4ab; font-style: italic; } .dm-mocha__author { display: flex; align-items: center; gap: 8px; font: 600 11px system-ui, sans-serif; color: #c9a961; padding-top: 12px; border-top: 1px solid #3d2c20; } .dm-mocha__avatar { width: 22px; height: 22px; background: #c9a961; color: #1c1410; border-radius: 50%; display: grid; place-items: center; font: 700 11px system-ui, sans-serif; } ``` ### 06. Forest Dim **Type:** Pure CSS **Description:** Deep evergreen surfaces with sage accents — a calmer alternative to violet/cyan dark modes for reading-heavy interfaces. **HTML:** ```html
Garden updates 3 plants ready to harvest
Soil moisture Below threshold — water soon
``` **CSS:** ```css .dm-forest-bg { padding: 24px; border-radius: 16px; background: #0a1612; } .dm-forest { background: #0e1f1a; border: 1px solid #1a3329; border-radius: 10px; padding: 6px; } .dm-forest__row { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 7px; transition: background 0.18s; } .dm-forest__row:hover { background: rgba(143, 179, 163, 0.07); } .dm-forest__row + .dm-forest__row { border-top: 1px solid #1a3329; margin-top: 4px; padding-top: 16px; } .dm-forest__icon { width: 28px; height: 28px; background: rgba(143, 179, 163, 0.12); color: #8fb3a3; border-radius: 50%; display: grid; place-items: center; font-size: 13px; flex-shrink: 0; } .dm-forest__body { display: flex; flex-direction: column; gap: 2px; } .dm-forest__body b { font: 600 12px system-ui, sans-serif; color: #d6e6dd; } .dm-forest__body span { font: 11px system-ui, sans-serif; color: #8fb3a3; } ``` ### 07. Slate Stack **Type:** Pure CSS **Description:** Three slate tones layered to create depth without color — useful for dashboard chrome where data is the only color. **HTML:** ```html
Quarterly revenue Q1 2026
$248,392
+18.4% from last quarter
``` **CSS:** ```css .dm-slate-bg { padding: 24px; border-radius: 16px; background: #0f172a; } .dm-slate { background: #1e293b; border: 1px solid #334155; border-radius: 10px; padding: 18px 20px; color: #f1f5f9; } .dm-slate__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; } .dm-slate__title { font: 600 12px system-ui, sans-serif; color: #94a3b8; letter-spacing: 0.04em; } .dm-slate__pill { background: #334155; color: #cbd5e1; padding: 3px 10px; border-radius: 12px; font: 600 10px ui-monospace, monospace; } .dm-slate__num { font: 800 26px/1 system-ui, sans-serif; color: #fff; margin-bottom: 6px; letter-spacing: -0.02em; } .dm-slate__delta { font: 600 11px system-ui, sans-serif; color: #4ade80; } ``` ### 08. Carbon Shelves **Type:** Pure CSS **Description:** List rows shelving against a darker rail — alternating row depth without alternating colors keeps long lists scannable. **HTML:** ```html
api/auth.ts 2.4 KB · 3 min ago
api/session.ts 1.8 KB · 7 min ago
api/users.ts 4.1 KB · 14 min ago
db/schema.sql 12.3 KB · 1 hour ago
``` **CSS:** ```css .dm-carbon-bg { padding: 22px; border-radius: 16px; background: #0a0a10; } .dm-carbon { background: #14141c; border: 1px solid #1f1f2e; border-radius: 8px; overflow: hidden; } .dm-carbon__row { display: flex; justify-content: space-between; align-items: center; padding: 11px 16px; background: #14141c; transition: background 0.15s; } .dm-carbon__row + .dm-carbon__row { border-top: 1px solid #1f1f2e; } .dm-carbon__row:nth-child(even) { background: #181822; } .dm-carbon__row:hover { background: #1f1f2e; } .dm-carbon__name { font: 600 12px ui-monospace, monospace; color: #e2e8f0; } .dm-carbon__meta { font: 500 10.5px ui-monospace, monospace; color: #6b7080; letter-spacing: 0.02em; } ``` ### 09. Onyx Ladder **Type:** Pure CSS **Description:** Vertical step indicator on a series of dark surfaces — each completed step glows gently, future steps stay quiet. **HTML:** ```html
  1. Account created10:42 AM
  2. Email verified10:44 AM
  3. Profile setupIn progress
  4. Workspace readyPending
``` **CSS:** ```css .dm-onyx-bg { padding: 24px; border-radius: 16px; background: #0a0a14; } .dm-onyx { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0; background: #14141f; border: 1px solid #1f1f30; border-radius: 10px; overflow: hidden; } .dm-onyx__step { display: flex; align-items: center; gap: 12px; padding: 11px 16px; border-left: 2px solid transparent; } .dm-onyx__step + .dm-onyx__step { border-top: 1px solid #1f1f30; } .dm-onyx__step b { display: block; font: 600 12px system-ui, sans-serif; color: #cbd5e1; } .dm-onyx__step small { font: 500 10px ui-monospace, monospace; color: #6b7080; } .dm-onyx__dot { width: 10px; height: 10px; border-radius: 50%; background: #2a2a3d; flex-shrink: 0; } .dm-onyx__step--done .dm-onyx__dot { background: #6366f1; } .dm-onyx__step--done b { color: #fff; } .dm-onyx__step--active { background: rgba(99, 102, 241, 0.06); border-left-color: #6366f1; } .dm-onyx__step--active .dm-onyx__dot { background: #818cf8; box-shadow: 0 0 0 4px rgba(129, 140, 248, 0.15); } .dm-onyx__step--active b { color: #c7d2fe; } ``` ### 10. Phosphor Card **Type:** Pure CSS **Description:** Card with a glowing accent line on its left edge — the kind of "now playing" highlight that draws the eye in dark dashboards. **HTML:** ```html
● LIVE 2,341 watching

React Server Components Deep Dive

A walk through the boundaries between server and client.

``` **CSS:** ```css .dm-phos-bg { padding: 28px; border-radius: 16px; background: #0a0a14; } .dm-phos { position: relative; background: #14141f; border: 1px solid #1f1f30; border-radius: 10px; padding: 16px 20px 16px 22px; overflow: hidden; } .dm-phos::before { content: ''; position: absolute; left: 0; top: 12px; bottom: 12px; width: 3px; background: #ec4899; border-radius: 0 2px 2px 0; box-shadow: 0 0 14px #ec4899, 0 0 32px rgba(236, 72, 153, 0.4); } .dm-phos__top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; } .dm-phos__live { font: 700 10px ui-monospace, monospace; color: #ec4899; letter-spacing: 0.12em; } .dm-phos__count { font: 500 10px ui-monospace, monospace; color: #6b7080; } .dm-phos__title { margin: 0 0 6px; font: 700 14px/1.3 system-ui, sans-serif; color: #fff; } .dm-phos__body { margin: 0; font: 12px/1.55 system-ui, sans-serif; color: #94a3b8; } ``` ### 11. Aurora Dim **Type:** Pure CSS **Description:** Dark surface with a soft drifting aurora glow underneath — the aurora is heavily blurred so it never competes with content. **HTML:** ```html
Premium activated Welcome to Aurora Pass.
``` **CSS:** ```css .dm-aurora-bg { position: relative; padding: 32px; border-radius: 16px; overflow: hidden; background: #0a0a14; } .dm-aurora-bg::before { content: ''; position: absolute; inset: -20%; background: radial-gradient(ellipse at 30% 30%, rgba(139, 92, 246, 0.4), transparent 50%), radial-gradient(ellipse at 70% 70%, rgba(236, 72, 153, 0.3), transparent 50%); filter: blur(32px); pointer-events: none; } .dm-aurora { position: relative; background: #14141f; border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 12px; padding: 14px 18px; display: flex; align-items: center; gap: 14px; } .dm-aurora__icon { width: 38px; height: 38px; background: linear-gradient(135deg, #8b5cf6, #ec4899); border-radius: 10px; display: grid; place-items: center; color: #fff; font-size: 16px; flex-shrink: 0; box-shadow: 0 0 16px rgba(139, 92, 246, 0.5); } .dm-aurora__body { display: flex; flex-direction: column; gap: 3px; } .dm-aurora__body b { font: 700 13px system-ui, sans-serif; color: #fff; } .dm-aurora__body span { font: 12px system-ui, sans-serif; color: #94a3b8; } ``` ### 12. Ember Pulse **Type:** Pure CSS **Description:** Notification badge with a warm orange glow that subtly breathes — designed for low-priority but persistent alerts. **HTML:** ```html
Build attention needed 3 warnings · 0 errors · last run 2m ago
``` **CSS:** ```css .dm-ember-bg { padding: 28px; border-radius: 16px; background: #0a0a10; } .dm-ember { background: #14141c; border: 1px solid rgba(245, 158, 11, 0.15); border-radius: 10px; padding: 14px 16px; display: flex; align-items: center; gap: 14px; } .dm-ember__icon { position: relative; width: 36px; height: 36px; flex-shrink: 0; display: grid; place-items: center; } .dm-ember__core { width: 12px; height: 12px; background: #f59e0b; border-radius: 50%; box-shadow: 0 0 12px #f59e0b, 0 0 24px rgba(245, 158, 11, 0.5); z-index: 2; } .dm-ember__pulse { position: absolute; inset: 0; background: radial-gradient(circle, rgba(245, 158, 11, 0.5), transparent 70%); border-radius: 50%; animation: dm-ember-breath 2.5s ease-in-out infinite; } @keyframes dm-ember-breath { 0%, 100% { transform: scale(0.8); opacity: 0.4; } 50% { transform: scale(1.1); opacity: 0.8; } } .dm-ember__body { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; } .dm-ember__body b { font: 600 12px system-ui, sans-serif; color: #f5f5f5; } .dm-ember__body span { font: 11px ui-monospace, monospace; color: #6b7080; } .dm-ember__btn { background: transparent; color: #f59e0b; border: 1px solid rgba(245, 158, 11, 0.3); padding: 6px 12px; border-radius: 6px; font: 600 11px system-ui, sans-serif; cursor: pointer; flex-shrink: 0; transition: background 0.18s, border-color 0.18s; } .dm-ember__btn:hover { background: rgba(245, 158, 11, 0.12); border-color: rgba(245, 158, 11, 0.55); } @media (prefers-reduced-motion: reduce) { .dm-ember__pulse { animation: none; } } ``` --- ## 18 CSS Divider Collections URL: https://codefronts.com/snippets/css-dividers/ Description: 18 hand-coded CSS section-divider collections across eighteen design languages — editorial, brutalist, art deco, cyber, scientific, fantasy, retro, newspaper, playful, music, festive, corporate, sketch and more — 54 animated divider variants, each on its intended background. Demo count: 18 ### 01. Editorial Dividers **Type:** Pure CSS **Description:** Three animated literary section breaks — rules that grow from the centre, a slab that slams in from the left, and a label that fades up into place. **HTML:** ```html

The light in August arrives differently than in other months — slanting through windows at an angle that makes dust particles visible.

She had learned to read weather the way her grandmother did — not from forecasts but from the quality of morning silence.

Memory operates on its own calendar — a smell, a slant of afternoon light, and suddenly it is fifteen years ago.

The village had grown slowly, the way most things of permanence grow: without announcement, without knowing itself.

``` **CSS:** ```css @keyframes div-ed-grow { from { transform: scaleX(0); } to { transform: scaleX(1); } } @keyframes div-ed-rot { from { transform: scale(0) rotate(-210deg); opacity: 0; } to { transform: scale(1) rotate(0); opacity: 1; } } @keyframes div-ed-fade { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: translateY(0); } } @keyframes div-ed-slam { from { transform: translateX(-110%); } to { transform: translateX(0); } } .div-editorial-surface { background: #f4efe7; padding: 36px 40px; border-radius: 12px; } .div-editorial-text { font-family: Georgia, "Times New Roman", serif; font-size: 15px; line-height: 1.88; color: #3c3830; margin: 0; } /* v1 — rules grow from centre, mark rotates in */ .div-editorial-v1 { display: flex; align-items: center; gap: 18px; margin: 32px 0; } .div-editorial-v1::before, .div-editorial-v1::after { content: ''; flex: 1; height: 1px; background: #b5ad9e; animation: div-ed-grow 0.9s cubic-bezier(.16,1,.3,1) both; } .div-editorial-v1::before { transform-origin: right; } .div-editorial-v1::after { transform-origin: left; animation-delay: 0.05s; } .div-editorial-v1 em { font-family: Georgia, serif; font-style: normal; font-size: 18px; letter-spacing: 0.6em; color: #928878; padding-right: 0.4em; animation: div-ed-rot 0.7s cubic-bezier(.34,1.56,.64,1) 0.72s both; } /* v2 — bold rule slams in, hairline grows under it */ .div-editorial-v2 { margin: 32px 0; overflow: hidden; } .div-editorial-v2 i:nth-child(1) { display: block; height: 4px; background: #2c2820; animation: div-ed-slam 0.65s cubic-bezier(.18,0,.05,1) 0.18s both; } .div-editorial-v2 i:nth-child(2) { display: block; height: 1px; margin-top: 4px; background: #c0b8a8; transform-origin: left; animation: div-ed-grow 0.7s cubic-bezier(.16,1,.3,1) 0.5s both; } /* v3 — rules grow from centre, label fades up */ .div-editorial-v3 { display: flex; align-items: center; gap: 22px; margin: 32px 0; } .div-editorial-v3::before, .div-editorial-v3::after { content: ''; flex: 1; height: 0.5px; animation: div-ed-grow 0.8s cubic-bezier(.16,1,.3,1) 0.3s both; } .div-editorial-v3::before { background: linear-gradient(to right, transparent, #a09888); transform-origin: right; } .div-editorial-v3::after { background: linear-gradient(to left, transparent, #a09888); transform-origin: left; animation-delay: 0.35s; } .div-editorial-v3 span { flex-shrink: 0; font-family: Georgia, serif; font-style: italic; font-size: 11px; letter-spacing: 0.18em; color: #857b6e; white-space: nowrap; animation: div-ed-fade 0.5s ease 0.82s both; } @media (prefers-reduced-motion: reduce) { .div-editorial-v1::before, .div-editorial-v1::after, .div-editorial-v1 em, .div-editorial-v2 i, .div-editorial-v3::before, .div-editorial-v3::after, .div-editorial-v3 span { animation: none; } } ``` ### 02. Brutalist Dividers **Type:** Pure CSS **Description:** Three raw breaks that arrive with force — a slab slamming in from the left, a hatch band wiping into view, and color blocks popping up in sequence. **HTML:** ```html

CONTEMPORARY ART FOUNDATION — ANNUAL REPORT 2024. Total acquisitions: 847. Public programs attended: 12,400.

The question of what constitutes public space has never been more contested — streets, plazas, parks, all subject to restriction.

Architecture is political. Every building encodes a value system — a vision of who belongs and who does not.

WE BUILD. WE DEMOLISH. WE BUILD AGAIN. The city is its own argument — perpetually unresolved.

``` **CSS:** ```css @keyframes div-bru-slam { from { transform: translateX(-110%); } to { transform: translateX(0); } } @keyframes div-bru-wipe { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0% 0 0); } } @keyframes div-bru-pop { 0% { transform: scaleY(0); opacity: 0; } 65% { transform: scaleY(1.15); opacity: 1; } 100% { transform: scaleY(1); opacity: 1; } } .div-brutalist-surface { background: #ffffff; padding: 36px 40px; border-radius: 12px; } .div-brutalist-text { font-family: "Courier New", Courier, monospace; font-size: 13px; line-height: 1.78; color: #111111; margin: 0; } /* v1 — solid slab slams in */ .div-brutalist-v1 { position: relative; height: 18px; margin: 32px 0; background: #111111; animation: div-bru-slam 0.52s cubic-bezier(.18,0,.04,1) 0.1s both; } .div-brutalist-v1::after { content: '///'; position: absolute; right: 14px; top: 50%; transform: translateY(-50%); font-family: "Courier New", monospace; font-size: 9px; letter-spacing: 5px; color: #ffffff; } /* v2 — diagonal hatch wipes in */ .div-brutalist-v2 { position: relative; height: 22px; margin: 32px 0; animation: div-bru-wipe 0.72s cubic-bezier(.16,1,.3,1) 0.22s both; } .div-brutalist-v2::before { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient( -60deg, #111111 0, #111111 3px, transparent 3px, transparent 11px ); } .div-brutalist-v2::after { content: ''; position: absolute; inset: 0; background: linear-gradient( to right, #ffffff 0, transparent 40px, transparent calc(100% - 40px), #ffffff 100% ); } /* v3 — color blocks pop up in sequence */ .div-brutalist-v3 { display: flex; gap: 2px; height: 10px; margin: 32px 0; } .div-brutalist-v3 span { transform-origin: bottom; animation: div-bru-pop 0.42s cubic-bezier(.34,1.56,.64,1) both; } .div-brutalist-v3 span:nth-child(1) { flex: 4; background: #111111; animation-delay: 0.26s; } .div-brutalist-v3 span:nth-child(2) { flex: 1; background: #e6351f; animation-delay: 0.36s; } .div-brutalist-v3 span:nth-child(3) { flex: 2; background: #111111; animation-delay: 0.42s; } .div-brutalist-v3 span:nth-child(4) { flex: 1; background: #f2c12e; animation-delay: 0.48s; } .div-brutalist-v3 span:nth-child(5) { flex: 4; background: #111111; animation-delay: 0.53s; } @media (prefers-reduced-motion: reduce) { .div-brutalist-v1, .div-brutalist-v2, .div-brutalist-v3 span { animation: none; } } ``` ### 03. Art Deco Dividers **Type:** Pure CSS **Description:** Three gilded breaks — gold lines that draw themselves toward a diamond, a shimmering micro-diamond band, and a chevron fan that springs into place. **HTML:** ```html

The Grand Palais reopened its gilded doors in the autumn of 1922, its iron-and-glass vault catching the afternoon light.

She wore a dress the colour of champagne with a hem that ended precisely at the knee — scandalous only three years prior.

The jazz arrived from New Orleans by way of Harlem, crossing the Atlantic in the trunks of musicians.

Everything gleamed in those years — chrome fittings, lacquered surfaces, pomaded hair in the lamplight.

``` **CSS:** ```css @keyframes div-deco-draw { to { stroke-dashoffset: 0; } } @keyframes div-deco-gem { from { opacity: 0; transform: scale(0) rotate(-180deg); } to { opacity: 1; transform: scale(1) rotate(0); } } @keyframes div-deco-fade { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: translateY(0); } } @keyframes div-deco-grow { from { transform: scaleX(0); } to { transform: scaleX(1); } } @keyframes div-deco-fan { from { transform: scale(0) rotate(-100deg); opacity: 0; } to { transform: scale(1) rotate(0); opacity: 1; } } @keyframes div-deco-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } } .div-deco-surface { background: #0d1018; padding: 36px 40px; border-radius: 12px; } .div-deco-text { font-family: Georgia, "Times New Roman", serif; font-size: 15px; line-height: 1.88; color: #a0988a; margin: 0; } /* v1 — gold lines draw toward a diamond */ .div-deco-v1 { margin: 32px 0; } .div-deco-v1 svg { display: block; width: 100%; height: 24px; } .div-deco-l { animation: div-deco-draw 0.88s cubic-bezier(.16,1,.3,1) both; } .div-deco-ll1 { stroke-dasharray: 198; stroke-dashoffset: 198; } .div-deco-ll2 { stroke-dasharray: 174; stroke-dashoffset: 174; animation-delay: 0.09s; } .div-deco-rl1 { stroke-dasharray: 198; stroke-dashoffset: 198; animation-delay: 0.04s; } .div-deco-rl2 { stroke-dasharray: 174; stroke-dashoffset: 174; animation-delay: 0.13s; } .div-deco-gem { transform-box: fill-box; transform-origin: center; animation: div-deco-gem 0.52s cubic-bezier(.34,1.56,.64,1) 0.73s both; } /* v2 — micro-diamond band with a shimmer sweep */ .div-deco-v2 { position: relative; margin: 32px 0; animation: div-deco-fade 0.55s ease 0.18s both; } .div-deco-v2::before { content: ''; display: block; height: 6px; border-top: 1px solid #c9a84c; border-bottom: 1px solid #c9a84c; } .div-deco-v2::after { content: '◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆'; position: absolute; top: 50%; left: 0; right: 0; transform: translateY(-50%); overflow: hidden; white-space: nowrap; text-align: center; font-size: 6px; letter-spacing: 2px; background: linear-gradient(90deg, rgba(201,168,76,.1) 0%, rgba(201,168,76,.9) 42%, rgba(255,220,140,1) 50%, rgba(201,168,76,.9) 58%, rgba(201,168,76,.1) 100%); background-size: 300% auto; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent; animation: div-deco-shimmer 2.8s linear infinite; } /* v3 — chevron fan springs in between growing lines */ .div-deco-v3 { display: flex; align-items: center; gap: 10px; margin: 32px 0; } .div-deco-v3::before, .div-deco-v3::after { content: ''; flex: 1; height: 1px; animation: div-deco-grow 0.7s cubic-bezier(.16,1,.3,1) 0.48s both; } .div-deco-v3::before { background: linear-gradient(to right, transparent, #c9a84c); transform-origin: right; } .div-deco-v3::after { background: linear-gradient(to left, transparent, #c9a84c); transform-origin: left; animation-delay: 0.52s; } .div-deco-fan { flex-shrink: 0; font-size: 10px; letter-spacing: 2px; color: #c9a84c; animation: div-deco-fan 0.6s cubic-bezier(.34,1.56,.64,1) 0.1s both; } @media (prefers-reduced-motion: reduce) { .div-deco-l { animation: none; stroke-dashoffset: 0; } .div-deco-gem, .div-deco-v2, .div-deco-v3::before, .div-deco-v3::after, .div-deco-fan { animation: none; } .div-deco-v2::after { animation: none; } } ``` ### 04. Organic Dividers **Type:** Pure CSS **Description:** Three nature-drawn breaks — SVG waves that draw stroke by stroke, leaf pods that spring open, and a scallop edge that fills as its outline traces. **HTML:** ```html

In the understory of the beech forest, an entire civilization of fungi connects root system to root system.

Rain arrives not as individual drops but as a shift in atmospheric attention — the trees lean, the birds fall silent.

Seeds travel improbable distances — a dandelion's parachute can carry its cargo fourteen kilometres.

The forest is not silent — it is thinking at a frequency we have not learned to hear.

``` **CSS:** ```css @keyframes div-org-draw { to { stroke-dashoffset: 0; } } @keyframes div-org-leaf { from { transform: rotate(45deg) scale(0); } 70% { transform: rotate(45deg) scale(1.2); } to { transform: rotate(45deg) scale(1); } } @keyframes div-org-grow { from { transform: scaleX(0); } to { transform: scaleX(1); } } @keyframes div-org-fadein { to { opacity: 1; } } .div-organic-surface { background: #eaede6; padding: 36px 40px; border-radius: 12px; } .div-organic-text { font-family: Georgia, "Times New Roman", serif; font-size: 15px; line-height: 1.88; color: #3d4438; margin: 0; } /* v1 — dual SVG waves draw in */ .div-organic-v1 { margin: 32px 0; } .div-organic-v1 svg { display: block; width: 100%; height: 28px; } .div-organic-w1, .div-organic-w2 { stroke-dasharray: 1350; stroke-dashoffset: 1350; animation: div-org-draw 1.4s cubic-bezier(.16,1,.3,1) both; } .div-organic-w2 { animation-delay: 0.16s; } /* v2 — rotated leaf pods spring open */ .div-organic-v2 { display: flex; align-items: center; margin: 32px 0; } .div-organic-v2::before, .div-organic-v2::after { content: ''; flex: 1; height: 0.5px; background: #7a8c70; animation: div-org-grow 0.8s cubic-bezier(.16,1,.3,1) 0.48s both; } .div-organic-v2::before { transform-origin: right; } .div-organic-v2::after { transform-origin: left; animation-delay: 0.53s; } .div-organic-pods { display: flex; align-items: center; padding: 0 16px; } .div-organic-pods i { display: block; border-radius: 50% 0; animation: div-org-leaf 0.52s cubic-bezier(.34,1.56,.64,1) both; } .div-organic-pods i:nth-child(1) { width: 7px; height: 7px; background: rgba(106,140,96,.55); animation-delay: 0.17s; } .div-organic-pods i:nth-child(2) { width: 10px; height: 10px; margin: 0 5px; background: #4a7040; animation-delay: 0.07s; } .div-organic-pods i:nth-child(3) { width: 7px; height: 7px; background: rgba(106,140,96,.55); animation-delay: 0.25s; } /* v3 — scallop outline traces, fill fades in */ .div-organic-v3 { margin: 32px 0; } .div-organic-v3 svg { display: block; width: 100%; height: 18px; } .div-organic-sf { opacity: 0; animation: div-org-fadein 0.65s ease 0.95s both; } .div-organic-ss { stroke-dasharray: 1300; stroke-dashoffset: 1300; animation: div-org-draw 1.25s cubic-bezier(.16,1,.3,1) 0.14s both; } @media (prefers-reduced-motion: reduce) { .div-organic-w1, .div-organic-w2, .div-organic-ss { animation: none; stroke-dashoffset: 0; } .div-organic-sf { animation: none; opacity: 1; } .div-organic-v2::before, .div-organic-v2::after, .div-organic-pods i { animation: none; } .div-organic-pods i { transform: rotate(45deg); } } ``` ### 05. Cyber Dividers **Type:** Pure CSS **Description:** Three terminal-styled breaks — a beam scanning a track, a dot-matrix grid with a pulse bar growing across it, and a system tag that types itself in. **HTML:** ```html

> ESTABLISHING SECURE CHANNEL... [OK]
> SESSION_ID: 0x7FA3-C891-02BE

The attack surface of a modern data center is not its perimeter — that concept is meaningless now.

> ANOMALY DETECTED: 847 req/sec from 10.0.14.x
> AUTO-THROTTLE: ENGAGED

Cryptography is applied mathematics in service of trust — the implementations are where the problems live.

``` **CSS:** ```css @keyframes div-cy-beam { from { left: -22%; } to { left: 122%; } } @keyframes div-cy-grow { from { transform: scaleX(0); } to { transform: scaleX(1); } } @keyframes div-cy-type { from { max-width: 0; opacity: 0; } 1% { opacity: 1; } to { max-width: 220px; opacity: 1; } } @keyframes div-cy-glitch { 0%,87%,100% { transform: none; } 88% { transform: translateX(3px); } 89% { transform: translateX(-2px); } 90% { transform: none; } 94% { transform: translateX(1px); } 95% { transform: none; } } .div-cyber-surface { background: #060a0f; padding: 36px 40px; border-radius: 12px; } .div-cyber-text { font-family: "Courier New", Courier, monospace; font-size: 12.5px; line-height: 1.78; color: #2a5848; margin: 0; } /* v1 — scanning beam over a faint track */ .div-cyber-v1 { position: relative; height: 2px; margin: 38px 0; background: rgba(0, 245, 200, 0.1); overflow: visible; } .div-cyber-v1::before { content: ''; position: absolute; top: -5px; left: -22%; width: 22%; height: 12px; background: linear-gradient(90deg, transparent, rgba(0,245,200,0.95), transparent); animation: div-cy-beam 2.1s linear infinite; } .div-cyber-v1::after { content: '// 0x4F2A·C8'; position: absolute; right: 0; top: -15px; font-family: "Courier New", monospace; font-size: 8.5px; letter-spacing: 0.08em; color: rgba(0, 245, 200, 0.35); } /* v2 — dot-matrix grid, pulse bar grows across */ .div-cyber-v2 { position: relative; height: 20px; margin: 38px 0; display: flex; align-items: center; } .div-cyber-v2::before { content: ''; position: absolute; inset: 0; background: radial-gradient(circle, rgba(0,245,200,0.5) 1px, transparent 1px) 0 0 / 12px 20px; } .div-cyber-bar { position: absolute; left: 0; right: 0; top: 8px; height: 4px; background: linear-gradient(90deg, transparent, rgba(0,245,200,0.3), transparent); transform-origin: center; animation: div-cy-grow 0.85s cubic-bezier(.16,1,.3,1) 0.44s both; } /* v3 — system tag types itself in, then glitches */ .div-cyber-v3 { display: flex; align-items: center; gap: 14px; margin: 38px 0; } .div-cyber-v3::before, .div-cyber-v3::after { content: ''; flex: 1; height: 1px; animation: div-cy-grow 0.6s ease 0.68s both; } .div-cyber-v3::before { background: linear-gradient(90deg, rgba(0,245,200,.04), rgba(0,245,200,.4)); transform-origin: right; } .div-cyber-v3::after { background: linear-gradient(270deg, rgba(0,245,200,.04), rgba(0,245,200,.4)); transform-origin: left; animation-delay: 0.73s; } .div-cyber-tag { flex-shrink: 0; font-family: "Courier New", monospace; font-size: 9.5px; letter-spacing: 0.2em; color: rgba(0, 245, 200, 0.8); white-space: nowrap; overflow: hidden; max-width: 0; opacity: 0; animation: div-cy-type 0.65s steps(17,end) 0.14s forwards, div-cy-glitch 5s ease 2.2s infinite; } @media (prefers-reduced-motion: reduce) { .div-cyber-v1::before { animation: none; left: calc(50% - 11%); } .div-cyber-bar, .div-cyber-v3::before, .div-cyber-v3::after { animation: none; } .div-cyber-tag { animation: none; max-width: 220px; opacity: 1; } } ``` ### 06. Luxury Dividers **Type:** Pure CSS **Description:** Three restrained gold breaks — a hairline that draws open then shimmers, three pearls dropping into place, and a double rule that separates with a quiet breath. **HTML:** ```html

The maison has existed in its current form since eighteen forty-two, though its predecessor occupied the same address for three decades prior.

Each piece requires between sixty and two hundred hours of work. The stitching is invisible — this is not an accident.

Materials are sourced according to a protocol established in eighteen ninety-one and revised only once.

There is no waiting list. There is a conversation, and then there is time — the object arrives when it is ready.

``` **CSS:** ```css @keyframes div-lux-open { from { transform: scaleX(0); } to { transform: scaleX(1); } } @keyframes div-lux-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } } @keyframes div-lux-grow { from { transform: scaleX(0); } to { transform: scaleX(1); } } @keyframes div-lux-drop { from { transform: scale(0) translateY(-8px); opacity: 0; } 60% { transform: scale(1.25) translateY(0); opacity: 1; } to { transform: scale(1) translateY(0); opacity: 1; } } @keyframes div-lux-up { from { opacity: 0; transform: translateY(2.5px); } to { opacity: 1; transform: translateY(0); } } @keyframes div-lux-down { from { opacity: 0; transform: translateY(-2.5px); } to { opacity: 1; transform: translateY(0); } } .div-luxury-surface { background: #171310; padding: 36px 40px; border-radius: 12px; } .div-luxury-text { font-family: Georgia, "Times New Roman", serif; font-size: 15px; line-height: 1.95; letter-spacing: 0.02em; color: #988e70; margin: 0; } /* v1 — hairline draws open, then shimmers */ .div-luxury-v1 { height: 1px; margin: 34px 0; transform: scaleX(0); transform-origin: center; background: linear-gradient(90deg, transparent, #d4af76 20%, #f5e4b0 50%, #d4af76 80%, transparent); background-size: 200% auto; animation: div-lux-open 0.95s cubic-bezier(.16,1,.3,1) 0.1s forwards, div-lux-shimmer 3s linear 1.15s infinite; } /* v2 — three pearls drop in between vanishing flanks */ .div-luxury-v2 { display: flex; align-items: center; margin: 34px 0; } .div-luxury-v2::before, .div-luxury-v2::after { content: ''; flex: 1; height: 0.5px; background: rgba(212, 175, 118, 0.22); animation: div-lux-grow 0.8s cubic-bezier(.16,1,.3,1) 0.42s both; } .div-luxury-v2::before { transform-origin: right; } .div-luxury-v2::after { transform-origin: left; animation-delay: 0.47s; } .div-luxury-dots { display: flex; align-items: center; gap: 14px; padding: 0 20px; } .div-luxury-dots i { display: block; border-radius: 50%; background: #d4af76; animation: div-lux-drop 0.52s cubic-bezier(.34,1.56,.64,1) both; } .div-luxury-dots i:nth-child(1) { width: 3px; height: 3px; background: rgba(212,175,118,.48); animation-delay: 0.07s; } .div-luxury-dots i:nth-child(2) { width: 6px; height: 6px; animation-delay: 0.18s; } .div-luxury-dots i:nth-child(3) { width: 3px; height: 3px; background: rgba(212,175,118,.48); animation-delay: 0.28s; } /* v3 — double rule separates with a quiet breath */ .div-luxury-v3 { position: relative; height: 5px; margin: 34px 0; } .div-luxury-v3 i:nth-child(1) { position: absolute; left: 0; right: 0; top: 0; height: 0.5px; background: linear-gradient(90deg, transparent, rgba(212,175,118,.65), transparent); animation: div-lux-up 0.75s cubic-bezier(.16,1,.3,1) 0.28s both; } .div-luxury-v3 i:nth-child(2) { position: absolute; left: 0; right: 0; bottom: 0; height: 0.5px; background: linear-gradient(90deg, transparent, rgba(212,175,118,.32), transparent); animation: div-lux-down 0.75s cubic-bezier(.16,1,.3,1) 0.28s both; } @media (prefers-reduced-motion: reduce) { .div-luxury-v1 { animation: none; transform: scaleX(1); } .div-luxury-v2::before, .div-luxury-v2::after, .div-luxury-dots i, .div-luxury-v3 i { animation: none; } } ``` ### 07. Scientific Dividers **Type:** Pure CSS **Description:** Three precise, instrument-styled breaks — a measurement ruler with a section marker, a connection-node line, and a flip-in chapter label between calibrated rules. **HTML:** ```html

Fluorescence microscopy revealed distinct subcellular compartmentalization. Statistical significance was assessed across three independent biological replicates (n=847).

Protein complex formation was confirmed via co-immunoprecipitation followed by tandem mass spectrometry, with peak thresholds set at 3σ above baseline.

Temperature-dependent conformational changes were observed across all conditions, with a thermal denaturation midpoint of 68.4°C (±0.7).

Gene expression profiles were analyzed across 12 developmental timepoints; hierarchical clustering revealed three distinct expression modules.

``` **CSS:** ```css @keyframes div-sci-grow { from { transform: scaleX(0); } to { transform: scaleX(1); } } @keyframes div-sci-fade { from { opacity: 0; } to { opacity: 1; } } @keyframes div-sci-dot { from { transform: scale(0); } 65% { transform: scale(1.3); } to { transform: scale(1); } } @keyframes div-sci-flip { from { transform: perspective(300px) rotateX(90deg); opacity: 0; } to { transform: perspective(300px) rotateX(0); opacity: 1; } } @keyframes div-sci-wipe { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0% 0 0); } } .div-sci-surface { background: #f5f7fb; padding: 36px 40px; border-radius: 12px; } .div-sci-text { font-family: system-ui, -apple-system, sans-serif; font-size: 14px; line-height: 1.78; color: #1e2533; margin: 0; } /* v1 — measurement ruler with a section marker */ .div-sci-v1 { position: relative; height: 26px; margin: 32px 0; } .div-sci-ticks { position: absolute; bottom: 8px; left: 0; right: 0; height: 18px; /* major tick every 64px, minor every 16px — pure-CSS ruler */ background: repeating-linear-gradient(to right, #3060b8 0 1.5px, transparent 1.5px 64px), repeating-linear-gradient(to right, rgba(48,96,184,0.35) 0 1px, transparent 1px 16px); background-size: 100% 18px, 100% 7px; background-position: bottom, bottom; background-repeat: repeat-x; transform-origin: left; animation: div-sci-wipe 0.9s cubic-bezier(.16,1,.3,1) both; } .div-sci-rbar { position: absolute; bottom: 0; left: 0; right: 0; height: 1.5px; background: #3060b8; transform-origin: left; animation: div-sci-grow 0.8s cubic-bezier(.16,1,.3,1) 0.56s both; } .div-sci-rlbl { position: absolute; right: 0; bottom: 7px; font-family: "Courier New", monospace; font-size: 10px; letter-spacing: 0.12em; color: #3060b8; animation: div-sci-fade 0.4s ease 0.96s both; } /* v2 — connection-node line */ .div-sci-v2 { position: relative; height: 14px; margin: 32px 0; } .div-sci-dline { position: absolute; top: 50%; left: 0; right: 0; height: 1px; background: #dde4f0; transform-origin: left; animation: div-sci-grow 0.6s ease 0.08s both; } .div-sci-ddots { position: absolute; inset: 0; display: flex; justify-content: space-between; align-items: center; } .div-sci-ddots i { width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid #3060b8; background: #f5f7fb; animation: div-sci-dot 0.4s cubic-bezier(.34,1.56,.64,1) both; } .div-sci-ddots i:nth-child(1) { animation-delay: 0.28s; } .div-sci-ddots i:nth-child(2) { animation-delay: 0.4s; } .div-sci-ddots i:nth-child(3) { animation-delay: 0.52s; border-color: #c8361a; background: #fff8f6; } .div-sci-ddots i:nth-child(4) { animation-delay: 0.64s; } .div-sci-ddots i:nth-child(5) { animation-delay: 0.76s; } /* v3 — flip-in chapter label */ .div-sci-v3 { display: flex; align-items: center; gap: 16px; margin: 32px 0; } .div-sci-rule { flex: 1; height: 4px; border-top: 1px solid #dde4f0; border-bottom: 1px solid #c8d4ec; animation: div-sci-grow 0.7s cubic-bezier(.16,1,.3,1) 0.4s both; } .div-sci-v3 .div-sci-rule:first-child { transform-origin: right; } .div-sci-v3 .div-sci-rule:last-child { transform-origin: left; animation-delay: 0.45s; } .div-sci-v3 b { flex-shrink: 0; font-family: "Courier New", monospace; font-size: 10.5px; font-weight: 400; letter-spacing: 0.14em; color: #3060b8; white-space: nowrap; animation: div-sci-flip 0.5s cubic-bezier(.34,1.56,.64,1) 0.1s both; } @media (prefers-reduced-motion: reduce) { .div-sci-ticks, .div-sci-rbar, .div-sci-rlbl, .div-sci-dline, .div-sci-ddots i, .div-sci-rule, .div-sci-v3 b { animation: none; } } ``` ### 08. Romantic Dividers **Type:** Pure CSS **Description:** Three soft, hand-drawn breaks — a flowering vine that draws itself leaf by leaf, a petal ornament, and a trio of diamonds set between blush rules. **HTML:** ```html

They had met, improbably, at a florist's shop on a Tuesday morning in November — he returning peonies that had died too quickly.

The invitation had arrived on heavy cream stock, hand-addressed in ink the colour of dried roses.

In the old country, weddings lasted three days and left everyone changed — not just the couple but the witnesses too.

The flowers were white roses mixed with ranunculus and a single stem of something she couldn't name.

``` **CSS:** ```css @keyframes div-rom-draw { to { stroke-dashoffset: 0; } } @keyframes div-rom-leaf { to { opacity: 1; } } @keyframes div-rom-grow { from { transform: scaleX(0); } to { transform: scaleX(1); } } @keyframes div-rom-pop { from { transform: scale(0); } 55% { transform: scale(1.25); } to { transform: scale(1); } } @keyframes div-rom-gem { from { transform: rotate(45deg) scale(0); } 65% { transform: rotate(45deg) scale(1.3); } to { transform: rotate(45deg) scale(1); } } .div-rom-surface { background: #fdf5ed; padding: 36px 40px; border-radius: 12px; } .div-rom-text { font-family: Georgia, "Times New Roman", serif; font-size: 15px; line-height: 1.92; color: #4a3728; margin: 0; } /* v1 — flowering vine draws itself */ .div-rom-v1 { margin: 32px 0; } .div-rom-v1 svg { display: block; width: 100%; height: 32px; } .div-rom-vine { stroke-dasharray: 320; stroke-dashoffset: 320; animation: div-rom-draw 1.25s cubic-bezier(.16,1,.3,1) both; } .div-rom-rv { animation-delay: 0.05s; } .div-rom-lf { opacity: 0; animation: div-rom-leaf 0.35s ease both; animation-delay: var(--ld, 0.65s); } /* v2 — petal ornament */ .div-rom-v2 { display: flex; align-items: center; justify-content: center; gap: 7px; margin: 32px 0; position: relative; } .div-rom-v2::before, .div-rom-v2::after { content: ''; position: absolute; top: 50%; width: calc(50% - 40px); height: 0.5px; animation: div-rom-grow 0.8s cubic-bezier(.16,1,.3,1) 0.42s both; } .div-rom-v2::before { left: 0; background: linear-gradient(to right, transparent, #c4826a); transform-origin: right; } .div-rom-v2::after { right: 0; background: linear-gradient(to left, transparent, #c4826a); transform-origin: left; animation-delay: 0.47s; } .div-rom-petal { color: #c4826a; animation: div-rom-pop 0.52s cubic-bezier(.34,1.56,.64,1) both; } .div-rom-p1 { font-size: 9px; animation-delay: 0.08s; } .div-rom-p2 { font-size: 15px; animation-delay: 0.17s; } .div-rom-p3 { font-size: 9px; animation-delay: 0.25s; } /* v3 — three diamonds between blush rules */ .div-rom-v3 { display: flex; align-items: center; margin: 32px 0; } .div-rom-v3::before, .div-rom-v3::after { content: ''; flex: 1; height: 0.5px; background: #d4a898; animation: div-rom-grow 0.8s cubic-bezier(.16,1,.3,1) 0.4s both; } .div-rom-v3::before { transform-origin: right; } .div-rom-v3::after { transform-origin: left; animation-delay: 0.45s; } .div-rom-gems { display: flex; align-items: center; gap: 9px; padding: 0 16px; } .div-rom-gems i { display: block; width: 7px; height: 7px; background: #c4826a; animation: div-rom-gem 0.45s cubic-bezier(.34,1.56,.64,1) both; } .div-rom-gems i:nth-child(1) { animation-delay: 0.17s; } .div-rom-gems i:nth-child(2) { width: 11px; height: 11px; animation-delay: 0.08s; } .div-rom-gems i:nth-child(3) { animation-delay: 0.24s; } @media (prefers-reduced-motion: reduce) { .div-rom-vine { animation: none; stroke-dashoffset: 0; } .div-rom-lf { animation: none; opacity: 1; } .div-rom-v2::before, .div-rom-v2::after, .div-rom-petal, .div-rom-v3::before, .div-rom-v3::after { animation: none; } .div-rom-gems i { animation: none; transform: rotate(45deg); } } ``` ### 09. Fashion Dividers **Type:** Pure CSS **Description:** Three editorial runway breaks — a slamming black look-number bar, a letter-spaced caption between rules, and a burn-in collection tag. **HTML:** ```html

The collection arrives in silence. No music, no commentary — just footsteps on polished concrete and the soft percussion of fabric.

She believes silhouette is the only truth a garment can tell. Everything else — colour, texture — is opinion.

The atelier occupies four floors of a building that has stood on this street since 1891. The lift still requires an operator.

Fit is the argument. A jacket that fits correctly doesn't announce itself — it becomes invisible.

``` **CSS:** ```css @keyframes div-fa-slam { from { transform: translateX(-110%); } to { transform: translateX(0); } } @keyframes div-fa-grow { from { transform: scaleX(0); } to { transform: scaleX(1); } } @keyframes div-fa-spread { from { letter-spacing: -0.2em; opacity: 0; } to { letter-spacing: 0.35em; opacity: 1; } } @keyframes div-fa-burn { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0 0 0% 0); } } .div-fashion-surface { background: #ffffff; padding: 36px 40px; border-radius: 12px; } .div-fashion-text { font-family: system-ui, -apple-system, Arial, sans-serif; font-size: 14px; line-height: 1.72; letter-spacing: 0.01em; color: #000000; margin: 0; } /* v1 — slamming look-number bar */ .div-fashion-v1 { margin: 32px 0; overflow: hidden; } .div-fashion-v1 span { display: flex; align-items: center; justify-content: flex-end; height: 20px; padding-right: 16px; background: #000000; font-family: system-ui, sans-serif; font-size: 9px; font-weight: 400; letter-spacing: 0.3em; color: #ffffff; animation: div-fa-slam 0.5s cubic-bezier(.18,0,.04,1) 0.1s both; } /* v2 — letter-spaced caption between rules */ .div-fashion-v2 { margin: 32px 0; } .div-fashion-u { display: block; height: 2px; background: #000000; transform-origin: left; animation: div-fa-grow 0.58s cubic-bezier(.18,0,.04,1) both; } .div-fashion-d { display: block; height: 1px; background: #000000; transform-origin: left; animation: div-fa-grow 0.58s cubic-bezier(.18,0,.04,1) 0.35s both; } .div-fashion-cap { display: flex; justify-content: center; margin: 7px 0; overflow: hidden; font-family: system-ui, sans-serif; font-size: 9px; font-weight: 400; letter-spacing: 0.35em; color: #000000; animation: div-fa-spread 0.6s cubic-bezier(.16,1,.3,1) 0.18s both; } /* v3 — burn-in collection tag */ .div-fashion-v3 { margin: 32px 0; padding: 7px 0; border-top: 1.5px solid #000000; border-bottom: 1.5px solid #000000; font-family: system-ui, sans-serif; font-size: 8.5px; letter-spacing: 0.38em; text-align: center; color: #777777; animation: div-fa-burn 0.55s cubic-bezier(.16,1,.3,1) 0.15s both; } @media (prefers-reduced-motion: reduce) { .div-fashion-v1 span, .div-fashion-u, .div-fashion-d, .div-fashion-cap, .div-fashion-v3 { animation: none; } } ``` ### 10. Fantasy Dividers **Type:** Pure CSS **Description:** Three arcane breaks — a row of runes glowing into life, gold lines that draw toward a diamond sigil, and a wiping chain rule. **HTML:** ```html

Before the age of reason came the age of inscription — when words were not merely spoken but carved into stone and oak.

The tome had been sealed with a wax impression bearing an insignia no living archivist could identify.

Every ward the elder cast required a physical anchor — a mark burned into wood, pressed into clay, scratched into the threshold.

The knight had ridden three days without water before arriving at the garrison well — only to find it sealed with a sigil.

``` **CSS:** ```css @keyframes div-fan-glow { 0% { opacity: 0; } 35% { opacity: 1; color: #ffe07a; } 100% { opacity: 1; color: #c4841c; } } @keyframes div-fan-grow { from { transform: scaleX(0); } to { transform: scaleX(1); } } @keyframes div-fan-draw { to { stroke-dashoffset: 0; } } @keyframes div-fan-sigil { from { opacity: 0; transform: scale(0); } to { opacity: 1; transform: scale(1); } } @keyframes div-fan-wipe { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0% 0 0); } } .div-fantasy-surface { background: #17140e; padding: 36px 40px; border-radius: 12px; } .div-fantasy-text { font-family: Georgia, "Times New Roman", serif; font-size: 15px; line-height: 1.88; color: #c9ba9a; margin: 0; } /* v1 — runes glow into life */ .div-fantasy-v1 { margin: 32px 0; } .div-fantasy-runes { display: flex; justify-content: center; gap: 10px; margin-bottom: 9px; } .div-fantasy-runes > span { font-family: Georgia, serif; font-size: 12px; color: #c4841c; animation: div-fan-glow 0.5s ease both; } .div-fantasy-runes > span:nth-child(1) { animation-delay: 0.05s; } .div-fantasy-runes > span:nth-child(2) { animation-delay: 0.13s; } .div-fantasy-runes > span:nth-child(3) { animation-delay: 0.21s; } .div-fantasy-runes > span:nth-child(4) { animation-delay: 0.29s; } .div-fantasy-runes > span:nth-child(5) { animation-delay: 0.37s; } .div-fantasy-runes > span:nth-child(6) { animation-delay: 0.45s; font-size: 7px; } .div-fantasy-runes > span:nth-child(7) { animation-delay: 0.53s; } .div-fantasy-runes > span:nth-child(8) { animation-delay: 0.61s; } .div-fantasy-runes > span:nth-child(9) { animation-delay: 0.69s; } .div-fantasy-runes > span:nth-child(10) { animation-delay: 0.77s; } .div-fantasy-runes > span:nth-child(11) { animation-delay: 0.85s; } .div-fantasy-bar { display: block; height: 0.5px; background: linear-gradient(90deg, transparent, #c4841c 30%, #c4841c 70%, transparent); transform-origin: center; animation: div-fan-grow 0.8s cubic-bezier(.16,1,.3,1) 0.9s both; } /* v2 — gold lines draw toward a sigil */ .div-fantasy-v2 { margin: 32px 0; } .div-fantasy-v2 svg { display: block; width: 100%; height: 24px; } .div-fantasy-l { animation: div-fan-draw 0.9s cubic-bezier(.16,1,.3,1) both; } .div-fantasy-l1 { stroke-dasharray: 214; stroke-dashoffset: 214; } .div-fantasy-l2 { stroke-dasharray: 186; stroke-dashoffset: 186; animation-delay: 0.09s; } .div-fantasy-r1 { stroke-dasharray: 214; stroke-dashoffset: 214; animation-delay: 0.04s; } .div-fantasy-r2 { stroke-dasharray: 186; stroke-dashoffset: 186; animation-delay: 0.13s; } .div-fantasy-sigil { transform-box: fill-box; transform-origin: center; animation: div-fan-sigil 0.52s cubic-bezier(.34,1.56,.64,1) 0.75s both; } /* v3 — wiping chain rule */ .div-fantasy-v3 { margin: 32px 0; overflow: hidden; } .div-fantasy-chain { display: block; font-family: "Courier New", monospace; font-size: 10px; letter-spacing: 2px; color: #c4841c; opacity: 0.7; white-space: nowrap; overflow: hidden; animation: div-fan-wipe 0.85s cubic-bezier(.16,1,.3,1) 0.15s both; } @media (prefers-reduced-motion: reduce) { .div-fantasy-runes > span { animation: none; opacity: 1; } .div-fantasy-bar, .div-fantasy-sigil, .div-fantasy-chain { animation: none; } .div-fantasy-l { animation: none; stroke-dashoffset: 0; } } ``` ### 11. Minimal Dividers **Type:** Pure CSS **Description:** Three quiet, restrained breaks — a hairline that draws slowly open, three dots fading in one by one, and a section mark between fine rules. **HTML:** ```html

The studio was empty when she arrived — not empty between occupants, but empty in the original sense, before anything had been placed there.

Restraint is not the same as emptiness. The most demanding discipline in any art is knowing what to remove.

He worked slowly. The longer he looked at something, the more it revealed, and the less quickly he could move on.

The typeface had been designed in 1932 for a publication that ran for eleven issues before the war interrupted everything.

``` **CSS:** ```css @keyframes div-mn-open { from { transform: scaleX(0); } to { transform: scaleX(1); } } @keyframes div-mn-fade { from { opacity: 0; } to { opacity: 1; } } .div-minimal-surface { background: #f9f8f6; padding: 36px 40px; border-radius: 12px; } .div-minimal-text { font-family: system-ui, -apple-system, sans-serif; font-size: 14px; font-weight: 300; line-height: 1.9; color: #3a3834; margin: 0; } /* v1 — hairline draws slowly open */ .div-minimal-v1 { height: 0.5px; margin: 34px 0; background: #cac7c2; transform: scaleX(0); transform-origin: center; animation: div-mn-open 1.8s cubic-bezier(.16,1,.3,1) 0.1s both; } /* v2 — three dots fade in one by one */ .div-minimal-v2 { display: flex; justify-content: space-between; align-items: center; margin: 34px 0; padding: 0 22%; } .div-minimal-v2 span { width: 3px; height: 3px; border-radius: 50%; background: #9a9690; animation: div-mn-fade 0.7s ease both; } .div-minimal-v2 span:nth-child(1) { animation-delay: 0.2s; } .div-minimal-v2 span:nth-child(2) { animation-delay: 0.65s; } .div-minimal-v2 span:nth-child(3) { animation-delay: 1.1s; } /* v3 — section mark between fine rules */ .div-minimal-v3 { display: flex; align-items: center; gap: 20px; margin: 34px 0; } .div-minimal-rule { flex: 1; height: 0.5px; background: #cac7c2; transform: scaleX(0); animation: div-mn-open 1.2s cubic-bezier(.16,1,.3,1) 0.3s both; } .div-minimal-v3 .div-minimal-rule:first-child { transform-origin: right; } .div-minimal-v3 .div-minimal-rule:last-child { transform-origin: left; animation-delay: 0.35s; } .div-minimal-v3 em { flex-shrink: 0; font-family: Georgia, serif; font-style: normal; font-size: 12px; color: #b0ada8; white-space: nowrap; animation: div-mn-fade 0.9s ease 0.9s both; } @media (prefers-reduced-motion: reduce) { .div-minimal-v1, .div-minimal-rule { animation: none; transform: scaleX(1); } .div-minimal-v2 span, .div-minimal-v3 em { animation: none; opacity: 1; } } ``` ### 12. Retro Dividers **Type:** Pure CSS **Description:** Three nostalgic breaks — a starburst whose rays draw outward, a slamming two-tone diner rule, and a perforated ticket-stub edge. **HTML:** ```html

The diner on Route 9 had been open since 1952 and showed no signs of reconsidering. The menu hadn't changed in thirty years.

Neon signs don't flicker by accident — the gas inside reacts to alternating current with a rhythm that feels almost biological.

The booth was upholstered in vinyl the colour of oxblood — a colour whose name nobody used but everyone recognized.

The jukebox held 200 selections. He had played B-7 every visit since 1971 without wondering why.

``` **CSS:** ```css @keyframes div-rt-ray { to { stroke-dashoffset: 0; } } @keyframes div-rt-dot { from { transform: scale(0); } 65% { transform: scale(1.3); } to { transform: scale(1); } } @keyframes div-rt-draw { to { stroke-dashoffset: 0; } } @keyframes div-rt-slam { from { transform: translateX(-110%); } to { transform: translateX(0); } } @keyframes div-rt-fade { from { opacity: 0; } to { opacity: 1; } } .div-retro-surface { background: #231509; padding: 36px 40px; border-radius: 12px; } .div-retro-text { font-family: "Courier New", Courier, monospace; font-size: 12.5px; line-height: 1.82; letter-spacing: 0.03em; color: #e0c87a; margin: 0; } /* v1 — starburst rays draw outward */ .div-retro-v1 { margin: 32px 0; } .div-retro-v1 svg { display: block; width: 100%; height: 44px; overflow: visible; } .div-retro-rays line { stroke-dasharray: 11; stroke-dashoffset: 11; animation: div-rt-ray 0.22s ease both; } .div-retro-rays line:nth-child(1) { animation-delay: 0.08s; } .div-retro-rays line:nth-child(2) { animation-delay: 0.12s; } .div-retro-rays line:nth-child(3) { animation-delay: 0.17s; } .div-retro-rays line:nth-child(4) { animation-delay: 0.21s; } .div-retro-rays line:nth-child(5) { animation-delay: 0.26s; } .div-retro-rays line:nth-child(6) { animation-delay: 0.30s; } .div-retro-rays line:nth-child(7) { animation-delay: 0.35s; } .div-retro-rays line:nth-child(8) { animation-delay: 0.39s; } .div-retro-rays line:nth-child(9) { animation-delay: 0.44s; } .div-retro-rays line:nth-child(10) { animation-delay: 0.48s; } .div-retro-rays line:nth-child(11) { animation-delay: 0.53s; } .div-retro-rays line:nth-child(12) { animation-delay: 0.57s; } .div-retro-rays line:nth-child(13) { animation-delay: 0.62s; } .div-retro-rays line:nth-child(14) { animation-delay: 0.66s; } .div-retro-rays line:nth-child(15) { animation-delay: 0.71s; } .div-retro-rays line:nth-child(16) { animation-delay: 0.75s; } .div-retro-circ { transform-box: fill-box; transform-origin: center; animation: div-rt-dot 0.4s cubic-bezier(.34,1.56,.64,1) 0.85s both; } .div-retro-fl, .div-retro-fr { stroke-dasharray: 221; stroke-dashoffset: 221; animation: div-rt-draw 0.72s cubic-bezier(.16,1,.3,1) 0.98s both; } .div-retro-fr { animation-delay: 1.02s; } /* v2 — slamming two-tone diner rule */ .div-retro-v2 { margin: 32px 0; overflow: hidden; } .div-retro-t { display: block; height: 5px; background: #d4601a; animation: div-rt-slam 0.5s cubic-bezier(.18,0,.04,1) 0.1s both; } .div-retro-b { display: block; height: 1px; margin-top: 3px; background: #e0c87a; opacity: 0.45; animation: div-rt-slam 0.5s cubic-bezier(.18,0,.04,1) 0.28s both; } /* v3 — perforated ticket-stub edge */ .div-retro-v3 { height: 4px; margin: 32px 0; background: radial-gradient(circle, #d4601a 2px, transparent 2px); background-size: 14.875px 4px; background-repeat: repeat-x; background-position: center; animation: div-rt-fade 0.6s ease 0.2s both; } @media (prefers-reduced-motion: reduce) { .div-retro-rays line, .div-retro-fl, .div-retro-fr { animation: none; stroke-dashoffset: 0; } .div-retro-circ, .div-retro-t, .div-retro-b, .div-retro-v3 { animation: none; } } ``` ### 13. Newspaper Dividers **Type:** Pure CSS **Description:** Three broadsheet-print breaks — a thick-thin masthead rule, a starred jump-line break, and a column-end colophon dash. **HTML:** ```html

The morning edition carried news of the harbour expansion on its front page, set in a headline type the paper had used, unchanged, since nineteen thirty-eight.

Continued reporting suggested the council vote would be closer than the early projections implied — three members had not yet declared a position.

In the arts section, a review of the season's first concert ran two columns, praising the strings and saying little, pointedly, of the brass.

The weather, the almanac noted, would turn by the weekend; readers along the coast were advised to expect the first hard frost of the year.

``` **CSS:** ```css @keyframes div-news-grow { from { transform: scaleX(0); } to { transform: scaleX(1); } } @keyframes div-news-fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } } .div-news-surface { background: #f3efe6; padding: 36px 40px; border-radius: 12px; } .div-news-text { font-family: Georgia, "Times New Roman", serif; font-size: 15px; line-height: 1.82; color: #2a2620; margin: 0; } /* v1 — thick-thin masthead rule */ .div-news-v1 { margin: 30px 0; } .div-news-v1 i { display: block; transform-origin: left; animation: div-news-grow 0.7s cubic-bezier(.18,0,.05,1) both; } .div-news-v1 i:nth-child(1) { height: 3px; background: #2a2620; } .div-news-v1 i:nth-child(2) { height: 1px; margin-top: 3px; background: #2a2620; animation-delay: 0.22s; } /* v2 — starred jump-line break */ .div-news-v2 { display: flex; align-items: center; gap: 18px; margin: 30px 0; } .div-news-v2::before, .div-news-v2::after { content: ''; flex: 1; height: 1px; background: #8a8270; animation: div-news-grow 0.7s cubic-bezier(.16,1,.3,1) 0.1s both; } .div-news-v2::before { transform-origin: right; } .div-news-v2::after { transform-origin: left; animation-delay: 0.14s; } .div-news-v2 span { flex-shrink: 0; font-size: 9px; letter-spacing: 0.4em; color: #6a6252; animation: div-news-fade 0.5s ease 0.5s both; } /* v3 — column-end colophon dash ("-30-" = end of story) */ .div-news-v3 { display: flex; justify-content: center; margin: 30px 0; } .div-news-v3 span { font-family: Georgia, serif; font-size: 12px; letter-spacing: 0.2em; color: #6a6252; padding: 4px 0; border-top: 1px solid #c4bca8; border-bottom: 1px solid #c4bca8; animation: div-news-fade 0.55s ease 0.15s both; } @media (prefers-reduced-motion: reduce) { .div-news-v1 i, .div-news-v2::before, .div-news-v2::after, .div-news-v2 span, .div-news-v3 span { animation: none; } } ``` ### 14. Playful Dividers **Type:** Pure CSS **Description:** Three bright, friendly breaks — a bouncing crayon squiggle, a row of popping shapes, and a dashed cut-here line with scissors. **HTML:** ```html

The classroom hamster had escaped again — third time this term — and the search had become, for the children, the most educational event of the week.

Every desk had been lifted, every backpack unzipped, and a map of the room drawn on the whiteboard with a hopeful X marked near the radiator.

He was found, eventually, asleep inside a shoebox lined with cotton wool — a habitat, the children insisted, that he had clearly chosen on purpose.

A certificate was drawn up, decorated with stickers, and taped above his cage: Most Adventurous Class Pet, awarded by unanimous and very loud vote.

``` **CSS:** ```css @keyframes div-play-draw { to { stroke-dashoffset: 0; } } @keyframes div-play-pop { from { transform: scale(0); } 60% { transform: scale(1.35); } to { transform: scale(1); } } @keyframes div-play-grow { from { transform: scaleX(0); } to { transform: scaleX(1); } } @keyframes div-play-slide { from { transform: translateX(-12px); opacity: 0; } to { transform: translateX(0); opacity: 1; } } .div-playful-surface { background: #fff4dc; padding: 36px 40px; border-radius: 12px; } .div-playful-text { font-family: "Trebuchet MS", Verdana, sans-serif; font-size: 14px; line-height: 1.8; color: #4a3a22; margin: 0; } /* v1 — bouncing crayon squiggle */ .div-playful-v1 { margin: 30px 0; } .div-playful-v1 svg { display: block; width: 100%; height: 22px; overflow: visible; } .div-playful-squiggle { stroke-dasharray: 760; stroke-dashoffset: 760; animation: div-play-draw 1.1s cubic-bezier(.16,1,.3,1) both; } /* v2 — row of popping shapes */ .div-playful-v2 { display: flex; align-items: center; margin: 30px 0; } .div-playful-v2::before, .div-playful-v2::after { content: ''; flex: 1; height: 2px; border-radius: 2px; background: #ffd089; animation: div-play-grow 0.6s cubic-bezier(.16,1,.3,1) 0.4s both; } .div-playful-v2::before { transform-origin: right; } .div-playful-v2::after { transform-origin: left; animation-delay: 0.45s; } .div-playful-shapes { display: flex; align-items: center; gap: 10px; padding: 0 16px; } .div-playful-shapes i { display: block; animation: div-play-pop 0.42s cubic-bezier(.34,1.56,.64,1) both; } .div-playful-c { width: 11px; height: 11px; border-radius: 50%; background: #ff7a3d; animation-delay: 0.1s; } .div-playful-t { width: 0; height: 0; border-left: 6px solid transparent; border-right: 6px solid transparent; border-bottom: 11px solid #3db4c4; animation-delay: 0.2s; } .div-playful-s { width: 12px; height: 12px; background: #ffc23d; clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); animation-delay: 0.3s; } .div-playful-shapes i:nth-child(4) { animation-delay: 0.4s; } .div-playful-shapes i:nth-child(5) { animation-delay: 0.5s; } /* v3 — dashed cut-here line with scissors */ .div-playful-v3 { display: flex; align-items: center; gap: 10px; margin: 30px 0; } .div-playful-v3::before, .div-playful-v3::after { content: ''; flex: 1; height: 2px; background: repeating-linear-gradient(to right, #c4906a 0 7px, transparent 7px 13px); animation: div-play-grow 0.7s cubic-bezier(.16,1,.3,1) 0.2s both; } .div-playful-v3::before { transform-origin: right; } .div-playful-v3::after { transform-origin: left; animation-delay: 0.24s; } .div-playful-scissors { flex-shrink: 0; font-size: 16px; color: #c4906a; animation: div-play-slide 0.5s cubic-bezier(.34,1.56,.64,1) 0.55s both; } @media (prefers-reduced-motion: reduce) { .div-playful-squiggle { animation: none; stroke-dashoffset: 0; } .div-playful-v2::before, .div-playful-v2::after, .div-playful-shapes i, .div-playful-v3::before, .div-playful-v3::after, .div-playful-scissors { animation: none; } } ``` ### 15. Music Dividers **Type:** Pure CSS **Description:** Three sound-themed breaks — rising equalizer bars, a waveform pulse line, and a concentric vinyl-groove rule. **HTML:** ```html

The record opens with eleven seconds of room tone — the sound of the studio itself, breathing, before the first note is allowed to arrive.

Side two was recorded live in a single take, the engineer refusing to stop the tape even when the bassist's string broke four bars from the end.

The mastering took longer than the recording — six weeks spent moving a single frequency band a fraction of a decibel, listening, then moving it back.

When the test pressing arrived, the band listened to it in a parked car, because the car was where, the singer said, music was actually heard.

``` **CSS:** ```css @keyframes div-mus-rise { from { transform: scaleY(0); } to { transform: scaleY(1); } } @keyframes div-mus-draw { to { stroke-dashoffset: 0; } } @keyframes div-mus-spin { from { transform: scale(0) rotate(-90deg); opacity: 0; } to { transform: scale(1) rotate(0); opacity: 1; } } .div-music-surface { background: #0e1014; padding: 36px 40px; border-radius: 12px; } .div-music-text { font-family: system-ui, -apple-system, sans-serif; font-size: 14px; line-height: 1.82; color: #8a93a0; margin: 0; } /* v1 — rising equalizer bars */ .div-music-v1 { margin: 32px 0; } .div-music-eq { display: flex; align-items: flex-end; justify-content: space-between; height: 26px; } .div-music-eq i { flex: 1; margin: 0 1.5px; border-radius: 1.5px; background: linear-gradient(to top, #15d18a, #15d18a 60%, rgba(21,209,138,0.35)); transform-origin: bottom; animation: div-mus-rise 0.5s cubic-bezier(.34,1.56,.64,1) both; } .div-music-eq i:nth-child(odd) { height: 60%; } .div-music-eq i:nth-child(even) { height: 100%; } .div-music-eq i:nth-child(3n) { height: 38%; } .div-music-eq i:nth-child(1) { animation-delay: 0.04s; } .div-music-eq i:nth-child(2) { animation-delay: 0.08s; } .div-music-eq i:nth-child(3) { animation-delay: 0.12s; } .div-music-eq i:nth-child(4) { animation-delay: 0.16s; } .div-music-eq i:nth-child(5) { animation-delay: 0.20s; } .div-music-eq i:nth-child(6) { animation-delay: 0.24s; } .div-music-eq i:nth-child(7) { animation-delay: 0.28s; } .div-music-eq i:nth-child(8) { animation-delay: 0.32s; } .div-music-eq i:nth-child(9) { animation-delay: 0.36s; } .div-music-eq i:nth-child(10) { animation-delay: 0.40s; } .div-music-eq i:nth-child(11) { animation-delay: 0.44s; } .div-music-eq i:nth-child(12) { animation-delay: 0.48s; } .div-music-eq i:nth-child(n+13) { animation-delay: 0.52s; } /* v2 — waveform pulse line */ .div-music-v2 { margin: 32px 0; } .div-music-v2 svg { display: block; width: 100%; height: 24px; } .div-music-wave { stroke-dasharray: 900; stroke-dashoffset: 900; animation: div-mus-draw 1.2s cubic-bezier(.16,1,.3,1) both; } /* v3 — concentric vinyl-groove rule */ .div-music-v3 { display: flex; align-items: center; margin: 32px 0; } .div-music-v3::before, .div-music-v3::after { content: ''; flex: 1; height: 4px; /* concentric grooves rendered as repeating lines */ background: repeating-linear-gradient(to bottom, rgba(21,209,138,0.4) 0 1px, transparent 1px 2px); } .div-music-vinyl { flex-shrink: 0; width: 16px; height: 16px; margin: 0 14px; border-radius: 50%; background: radial-gradient(circle, #15d18a 0 3px, #0e1014 3px 4px, #15d18a 4px 5px, #0e1014 5px 6px, #15d18a 6px 7px, #0e1014 7px 8px); animation: div-mus-spin 0.55s cubic-bezier(.34,1.56,.64,1) 0.3s both; } @media (prefers-reduced-motion: reduce) { .div-music-eq i { animation: none; } .div-music-wave { animation: none; stroke-dashoffset: 0; } .div-music-vinyl { animation: none; } } ``` ### 16. Festive Dividers **Type:** Pure CSS **Description:** Three celebration breaks — a string of fairy lights, a confetti-scatter band, and a garland swag with hanging baubles. **HTML:** ```html

The hall had been decorated since dawn — every banister wound with greenery, every windowsill crowded with candles waiting, unlit, for the evening.

By six o'clock the first guests had arrived, stamping snow from their boots, and the quiet house became, all at once, impossibly loud and warm.

There was a long table, and then a longer one added end to end, and still the children ate standing up because that, apparently, was more fun.

When the candles were finally lit, someone turned off the lamps, and for a moment nobody spoke — the whole room held inside that small, gold light.

``` **CSS:** ```css @keyframes div-fes-grow { from { transform: scaleX(0); } to { transform: scaleX(1); } } @keyframes div-fes-glow { from { transform: scale(0); opacity: 0; } 60% { transform: scale(1.3); } to { transform: scale(1); opacity: 1; } } @keyframes div-fes-fall { from { transform: translateY(-10px) rotate(0); opacity: 0; } to { transform: translateY(0) rotate(var(--r,0deg)); opacity: 1; } } @keyframes div-fes-draw { to { stroke-dashoffset: 0; } } @keyframes div-fes-drop { from { transform: scale(0) translateY(-6px); } 60% { transform: scale(1.25) translateY(0); } to { transform: scale(1) translateY(0); } } .div-festive-surface { background: #0f2418; padding: 36px 40px; border-radius: 12px; } .div-festive-text { font-family: Georgia, "Times New Roman", serif; font-size: 15px; line-height: 1.85; color: #b8c4b0; margin: 0; } /* v1 — string of fairy lights */ .div-festive-v1 { position: relative; height: 16px; margin: 32px 0; } .div-festive-wire { position: absolute; top: 4px; left: 0; right: 0; height: 1px; background: #3a5a44; transform-origin: left; animation: div-fes-grow 0.7s cubic-bezier(.16,1,.3,1) both; } .div-festive-lights { position: absolute; inset: 0; display: flex; justify-content: space-between; align-items: flex-start; } .div-festive-lights i { width: 8px; height: 11px; border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; margin-top: 4px; transform-origin: top; animation: div-fes-glow 0.4s cubic-bezier(.34,1.56,.64,1) both; } .div-festive-lights i:nth-child(4n+1) { background: #e8b53d; box-shadow: 0 0 7px rgba(232,181,61,0.7); } .div-festive-lights i:nth-child(4n+2) { background: #e0455a; box-shadow: 0 0 7px rgba(224,69,90,0.7); } .div-festive-lights i:nth-child(4n+3) { background: #4fb8d4; box-shadow: 0 0 7px rgba(79,184,212,0.7); } .div-festive-lights i:nth-child(4n) { background: #5fc77a; box-shadow: 0 0 7px rgba(95,199,122,0.7); } .div-festive-lights i:nth-child(1) { animation-delay: 0.4s; } .div-festive-lights i:nth-child(2) { animation-delay: 0.46s; } .div-festive-lights i:nth-child(3) { animation-delay: 0.52s; } .div-festive-lights i:nth-child(4) { animation-delay: 0.58s; } .div-festive-lights i:nth-child(5) { animation-delay: 0.64s; } .div-festive-lights i:nth-child(6) { animation-delay: 0.70s; } .div-festive-lights i:nth-child(7) { animation-delay: 0.76s; } .div-festive-lights i:nth-child(8) { animation-delay: 0.82s; } .div-festive-lights i:nth-child(9) { animation-delay: 0.88s; } .div-festive-lights i:nth-child(10) { animation-delay: 0.94s; } .div-festive-lights i:nth-child(11) { animation-delay: 1.00s; } .div-festive-lights i:nth-child(12) { animation-delay: 1.06s; } /* v2 — confetti-scatter band */ .div-festive-v2 { height: 18px; margin: 32px 0; background: radial-gradient(circle, #e8b53d 1.5px, transparent 2px) 0 2px / 26px 18px, radial-gradient(circle, #e0455a 1.5px, transparent 2px) 13px 11px / 26px 18px, radial-gradient(circle, #4fb8d4 1.5px, transparent 2px) 7px 14px / 19px 18px, radial-gradient(circle, #5fc77a 1.5px, transparent 2px) 19px 4px / 23px 18px; background-repeat: repeat-x; transform-origin: center; animation: div-fes-grow 0.85s cubic-bezier(.16,1,.3,1) 0.1s both; } /* v3 — garland swag with hanging baubles */ .div-festive-v3 { margin: 32px 0; } .div-festive-v3 svg { display: block; width: 100%; height: 26px; } .div-festive-swag { stroke-dasharray: 540; stroke-dashoffset: 540; animation: div-fes-draw 1s cubic-bezier(.16,1,.3,1) both; } .div-festive-bauble { transform-box: fill-box; transform-origin: center top; animation: div-fes-drop 0.5s cubic-bezier(.34,1.56,.64,1) both; } .div-festive-b1 { animation-delay: 0.78s; } .div-festive-b2 { animation-delay: 0.9s; } .div-festive-b3 { animation-delay: 1.02s; } @media (prefers-reduced-motion: reduce) { .div-festive-wire, .div-festive-lights i, .div-festive-v2 { animation: none; } .div-festive-swag { animation: none; stroke-dashoffset: 0; } .div-festive-bauble { animation: none; } } ``` ### 17. Corporate Dividers **Type:** Pure CSS **Description:** Three clean dashboard breaks — a filling progress-segment bar, a chevron breadcrumb rule, and a KPI tick-marker line. **HTML:** ```html

Quarterly performance exceeded forecast across three of four operating regions, with the strongest growth recorded in the enterprise services segment.

Customer retention held steady at ninety-four percent, while average contract value rose six points against the prior reporting period.

Operating margin improved as infrastructure costs were consolidated onto a single platform, retiring four legacy systems ahead of schedule.

Guidance for the coming year remains measured: the leadership team expects continued momentum, tempered by ongoing macroeconomic uncertainty.

``` **CSS:** ```css @keyframes div-corp-fill { from { transform: scaleX(0); } to { transform: scaleX(1); } } @keyframes div-corp-pop { from { transform: scale(0); } 60% { transform: scale(1.25); } to { transform: scale(1); } } @keyframes div-corp-slide { from { transform: translateX(-8px); opacity: 0; } to { transform: translateX(0); opacity: 1; } } .div-corp-surface { background: #1b2230; padding: 36px 40px; border-radius: 12px; } .div-corp-text { font-family: system-ui, -apple-system, sans-serif; font-size: 14px; line-height: 1.78; color: #8e98a8; margin: 0; } /* v1 — filling progress-segment bar */ .div-corp-v1 { display: flex; gap: 3px; height: 6px; margin: 30px 0; } .div-corp-seg { flex: 1; border-radius: 2px; background: #4f8cff; transform-origin: left; animation: div-corp-fill 0.4s cubic-bezier(.16,1,.3,1) both; } .div-corp-seg:nth-child(1) { animation-delay: 0.1s; } .div-corp-seg:nth-child(2) { animation-delay: 0.22s; } .div-corp-seg:nth-child(3) { animation-delay: 0.34s; } .div-corp-seg:nth-child(4) { animation-delay: 0.46s; background: #3a4356; } .div-corp-seg:nth-child(5) { animation-delay: 0.58s; background: #3a4356; } /* v2 — chevron breadcrumb rule */ .div-corp-v2 { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 30px 0; } .div-corp-v2::before, .div-corp-v2::after { content: ''; flex: 1; height: 1px; background: #3a4356; } .div-corp-chev { width: 7px; height: 7px; border-top: 2px solid #4f8cff; border-right: 2px solid #4f8cff; transform: rotate(45deg); animation: div-corp-slide 0.4s cubic-bezier(.34,1.56,.64,1) both; } .div-corp-chev:nth-child(2) { animation-delay: 0.12s; } .div-corp-chev:nth-child(3) { animation-delay: 0.24s; } .div-corp-chev:nth-child(4) { animation-delay: 0.36s; } /* v3 — KPI tick-marker line */ .div-corp-v3 { position: relative; height: 14px; margin: 30px 0; } .div-corp-track { position: absolute; top: 50%; left: 0; right: 0; height: 2px; border-radius: 2px; background: linear-gradient(#3a4356, #3a4356) 0 0 / 100% 100%, repeating-linear-gradient(to right, #5a6578 0 1px, transparent 1px 25%); transform-origin: left; animation: div-corp-fill 0.7s cubic-bezier(.16,1,.3,1) both; } .div-corp-marker { position: absolute; top: 50%; left: 68%; width: 11px; height: 11px; border-radius: 50%; background: #4f8cff; border: 2px solid #1b2230; transform: translate(-50%, -50%); box-shadow: 0 0 0 3px rgba(79,140,255,0.25); animation: div-corp-pop 0.45s cubic-bezier(.34,1.56,.64,1) 0.7s both; } @media (prefers-reduced-motion: reduce) { .div-corp-seg, .div-corp-chev, .div-corp-track, .div-corp-marker { animation: none; } } ``` ### 18. Sketch Dividers **Type:** Pure CSS **Description:** Three hand-drawn breaks — a wobbly marker line, a doodled arrow, and a highlighter swipe — each imperfect by design. **HTML:** ```html

The notebook had been with her for nine years and four countries — its cover softened, its spine cracked, every page carrying some half-finished thought.

She wrote in pencil, always — not from caution but from a belief that ideas should remain provisional, should keep the option of being wrong.

The best pages were the messiest — arrows looping back on themselves, words crossed out and rewritten, a coffee ring framing one stubborn paragraph.

When the notebook was full she did not buy a matching one. The next was different on purpose — a new object should not pretend to be the old.

``` **CSS:** ```css @keyframes div-sk-draw { to { stroke-dashoffset: 0; } } @keyframes div-sk-swipe { from { background-size: 0% 62%; } to { background-size: 100% 62%; } } @keyframes div-sk-fade { from { opacity: 0; } to { opacity: 1; } } .div-sketch-surface { background: #faf8f3; padding: 36px 40px; border-radius: 12px; } .div-sketch-text { font-family: "Comic Sans MS", "Segoe Print", "Bradley Hand", cursive; font-size: 14px; line-height: 1.85; color: #3a3a3a; margin: 0; } /* v1 — wobbly hand-drawn line */ .div-sketch-v1 { margin: 30px 0; } .div-sketch-v1 svg { display: block; width: 100%; height: 14px; } .div-sketch-line { stroke-dasharray: 500; stroke-dashoffset: 500; animation: div-sk-draw 0.95s cubic-bezier(.16,1,.3,1) both; } /* v2 — doodled arrow */ .div-sketch-v2 { margin: 30px 0; } .div-sketch-v2 svg { display: block; width: 100%; height: 18px; } .div-sketch-arrow { stroke-dasharray: 480; stroke-dashoffset: 480; animation: div-sk-draw 0.85s cubic-bezier(.16,1,.3,1) both; } .div-sketch-head { stroke-dasharray: 30; stroke-dashoffset: 30; animation: div-sk-draw 0.25s ease 0.82s both; } /* v3 — highlighter swipe under a label */ .div-sketch-v3 { display: flex; justify-content: center; margin: 30px 0; } .div-sketch-swipe { font-family: "Comic Sans MS", "Segoe Print", cursive; font-size: 13px; color: #3a3a3a; padding: 2px 10px; background-image: linear-gradient(rgba(255,221,87,0.85), rgba(255,221,87,0.85)); background-repeat: no-repeat; background-position: 0 78%; background-size: 0% 62%; animation: div-sk-swipe 0.7s cubic-bezier(.16,1,.3,1) 0.2s both; } @media (prefers-reduced-motion: reduce) { .div-sketch-line, .div-sketch-arrow, .div-sketch-head { animation: none; stroke-dashoffset: 0; } .div-sketch-swipe { animation: none; background-size: 100% 62%; } } ``` --- ## 22 CSS Dropdown Menu Designs URL: https://codefronts.com/navigation/css-dropdown-menus/ Description: 22 hand-coded CSS dropdown menu designs with live demos — slide-down fade, clip-path curtain reveal, 3D perspective flip, elastic bounce spring, glassmorphism float panel, stagger children reveal, mega-menu grid, underline nav fade, native details/summary, checkbox-hack mobile nav, nested multi-level flyout, icon sidebar flyout, split-screen mega-menu, segmented pill nav, color swatch picker, right-click context menu, keyboard-accessible roving tabindex, stagger blur entrance, command palette search, autocomplete suggestion, click-outside close, and multi-select chip. 15 pure CSS + 7 with a tiny vanilla JS snippet — no framework. WCAG 2.2 aria-expanded + aria-haspopup + focus management, prefers-reduced-motion honoured, MIT licensed. Demo count: 22 ### 01. Slide-Down Fade Dropdown **Type:** Pure CSS **Description:** Classic navigation dropdown that slides down and fades in on hover using max-height and opacity transitions on a CSS-only nav. **HTML:** ```html ``` **CSS:** ```css .dd-01, .dd-01 *, .dd-01 *::before, .dd-01 *::after { margin: 0; padding: 0; box-sizing: border-box; } .dd-01 ::selection { background: #6366f1; color: #fff; } .dd-01 { --brand: #6366f1; --brand-dark: #4f46e5; --surface: #ffffff; --border: #e5e7eb; --text: #111827; --muted: #6b7280; --hover-bg: #f5f3ff; --shadow: 0 10px 40px rgba(99,102,241,.15); font-family: 'Inter', sans-serif; display: flex; align-items: center; justify-content: center; min-height: 340px; background: linear-gradient(135deg, #f0f4ff 0%, #faf5ff 100%); padding: 40px 20px; } .dd-01__nav { display: flex; align-items: center; gap: 4px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 8px 12px; box-shadow: 0 2px 12px rgba(0,0,0,.06); position: relative; z-index: 100; } .dd-01__item { position: relative; } .dd-01__item::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 8px; /* hover-bridge: invisible strip below the trigger covering the visible gap before the panel. Lives on .__item (not the panel, which has overflow:hidden / pointer-events: none in its closed state) so the parent :hover stays active while the cursor traverses the gap. */ } .dd-01__trigger { display: flex; align-items: center; gap: 5px; padding: 8px 14px; color: var(--text); text-decoration: none; font-size: 14px; font-weight: 500; border-radius: 8px; transition: background 0.18s, color 0.18s; white-space: nowrap; } .dd-01__trigger:hover { background: var(--hover-bg); color: var(--brand); } .dd-01__caret { font-size: 12px; display: inline-block; transition: transform 0.25s ease; color: var(--muted); line-height: 1; margin-top: 1px; } .dd-01__item:hover .dd-01__caret { transform: rotate(180deg); color: var(--brand); } /* ── dropdown panel ── */ .dd-01__panel { position: absolute; top: calc(100% + 8px); left: 50%; transform: translateX(-50%) translateY(-6px); min-width: 200px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); list-style: none; padding: 6px; max-height: 0; overflow: hidden; opacity: 0; pointer-events: none; transition: max-height 0.35s ease, opacity 0.22s ease 0.05s, transform 0.28s ease; } .dd-01__item:hover .dd-01__panel { max-height: 320px; opacity: 1; pointer-events: auto; transform: translateX(-50%) translateY(0); } .dd-01__panel li a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 8px; text-decoration: none; color: var(--text); font-size: 13.5px; font-weight: 450; transition: background 0.15s, color 0.15s; } .dd-01__panel li a:hover { background: var(--hover-bg); color: var(--brand); } .dd-01__icon { font-size: 7px; color: var(--brand); opacity: 0.6; } .dd-01__cta { margin-left: 8px; padding: 8px 18px; background: var(--brand); color: #fff; border-radius: 8px; text-decoration: none; font-size: 14px; font-weight: 600; transition: background 0.18s, transform 0.15s; } .dd-01__cta:hover { background: var(--brand-dark); transform: translateY(-1px); } @media (prefers-reduced-motion: reduce) { .dd-01__panel, .dd-01__caret, .dd-01__trigger, .dd-01__cta { transition: none; } } ``` ### 02. Clip-Path Curtain Reveal Dropdown **Type:** Pure CSS **Description:** A dramatic curtain-wipe dropdown where the panel is revealed by animating a clip-path polygon from a collapsed top strip to full height. **HTML:** ```html ``` **CSS:** ```css .dd-02, .dd-02 *, .dd-02 *::before, .dd-02 *::after { margin: 0; padding: 0; box-sizing: border-box; } .dd-02 ::selection { background: #f97316; color: #fff; } .dd-02 { --brand: #f97316; --surface: #fff; --text: #1c1917; --muted: #78716c; --border: #e7e5e4; --hover: #fff7ed; font-family: 'DM Sans', sans-serif; min-height: 360px; display: flex; align-items: flex-start; justify-content: center; padding: 32px 20px; background: linear-gradient(160deg, #fff7ed 0%, #fef3c7 100%); } .dd-02__nav { display: flex; align-items: center; gap: 32px; background: var(--surface); border-bottom: 2px solid var(--border); padding: 14px 28px; width: 100%; max-width: 720px; border-radius: 12px; box-shadow: 0 2px 16px rgba(0,0,0,.06); position: relative; z-index: 100; } .dd-02__logo { font-size: 18px; font-weight: 700; color: var(--brand); text-decoration: none; letter-spacing: -0.5px; margin-right: auto; } .dd-02__items { display: flex; gap: 4px; } .dd-02__item { position: relative; } .dd-02__item::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 10px; /* hover-bridge: invisible strip below the trigger covering the visible gap before the panel. Lives on .__item (not the panel, which has overflow:hidden / pointer-events: none in its closed state) so the parent :hover stays active while the cursor traverses the gap. */ } .dd-02__trigger { background: none; border: none; cursor: pointer; padding: 8px 14px; font-size: 14px; font-weight: 500; color: var(--text); border-radius: 8px; transition: background 0.15s, color 0.15s; font-family: inherit; } .dd-02__trigger:hover, .dd-02__item:hover .dd-02__trigger { background: var(--hover); color: var(--brand); } /* clip-path curtain panel */ .dd-02__panel { position: absolute; top: calc(100% + 10px); left: 50%; transform: translateX(-50%); min-width: 220px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 16px 48px rgba(0,0,0,.12); overflow: hidden; clip-path: polygon(0 0, 100% 0, 100% 0, 0 0); opacity: 0; pointer-events: none; transition: clip-path 0.38s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease; } .dd-02__item:hover .dd-02__panel { clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%); opacity: 1; pointer-events: auto; } .dd-02__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 8px; } .dd-02__link { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 8px; text-decoration: none; color: var(--text); font-size: 13.5px; font-weight: 500; transition: background 0.15s; } .dd-02__link:hover { background: var(--hover); color: var(--brand); } .dd-02__badge { font-size: 16px; line-height: 1; } @media (prefers-reduced-motion: reduce) { .dd-02__panel { transition: none; } } ``` ### 03. 3D Perspective Flip Dropdown **Type:** Pure CSS **Description:** A dropdown panel that folds open from the top edge using rotateX perspective, simulating a physical lid being lifted. **HTML:** ```html ``` **CSS:** ```css .dd-03, .dd-03 *, .dd-03 *::before, .dd-03 *::after { margin: 0; padding: 0; box-sizing: border-box; } .dd-03 ::selection { background: #0f172a; color: #e2e8f0; } .dd-03 { --ink: #0f172a; --surface: #f8fafc; --panel: #ffffff; --accent: #6366f1; --muted: #64748b; --border: #e2e8f0; font-family: 'Syne', sans-serif; min-height: 360px; display: flex; align-items: flex-start; justify-content: center; padding: 32px 20px; background: linear-gradient(135deg, #f1f5f9 0%, #e0e7ff 100%); } .dd-03__nav { display: flex; align-items: center; gap: 40px; background: var(--ink); padding: 16px 32px; border-radius: 14px; box-shadow: 0 8px 32px rgba(15,23,42,.25); position: relative; z-index: 100; } .dd-03__brand { font-size: 18px; font-weight: 700; color: #fff; letter-spacing: 3px; margin-right: auto; } .dd-03__items { display: flex; gap: 4px; } .dd-03__item { position: relative; } /* hover-bridge: invisible strip below the trigger covering the visible 10px gap before the 3D perspective container (which has pointer-events:none in its closed state, so its own ::before bridge doesn't catch hover). */ .dd-03__item::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 10px; } .dd-03__trigger { display: block; padding: 8px 16px; color: rgba(255,255,255,0.75); text-decoration: none; font-size: 14px; font-weight: 600; letter-spacing: 0.5px; border-radius: 8px; transition: color 0.15s, background 0.15s; } .dd-03__trigger:hover, .dd-03__item:hover .dd-03__trigger { color: #fff; background: rgba(255,255,255,0.1); } /* 3D perspective container */ .dd-03__perspective { position: absolute; top: calc(100% + 10px); left: 50%; transform: translateX(-50%); perspective: 800px; transform-style: preserve-3d; pointer-events: none; } .dd-03__perspective::before { content: ""; position: absolute; left: 0; right: 0; top: -10px; height: 10px; /* invisible hover-bridge — keeps :hover active while the cursor traverses the visible gap between trigger and panel. */ } .dd-03__item:hover .dd-03__perspective { pointer-events: auto; } .dd-03__panel { background: var(--panel); border-radius: 12px; border: 1px solid var(--border); box-shadow: 0 20px 60px rgba(15,23,42,.2); min-width: 180px; padding: 6px; display: flex; flex-direction: column; gap: 2px; transform: rotateX(-90deg); transform-origin: top center; opacity: 0; transition: transform 0.42s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.22s ease; } .dd-03__item:hover .dd-03__panel { transform: rotateX(0deg); opacity: 1; } .dd-03__link { display: block; padding: 10px 14px; border-radius: 8px; text-decoration: none; color: var(--ink); font-size: 14px; font-weight: 500; transition: background 0.15s, color 0.15s; } .dd-03__link:hover { background: #eef2ff; color: var(--accent); } @media (prefers-reduced-motion: reduce) { .dd-03__panel { transition: none; } } ``` ### 04. Elastic Bounce Dropdown **Type:** Pure CSS **Description:** A playful dropdown that springs open with an elastic overshoot using a carefully tuned cubic-bezier on scaleY, giving it a bouncy physical feel. **HTML:** ```html ``` **CSS:** ```css .dd-04, .dd-04 *, .dd-04 *::before, .dd-04 *::after { margin: 0; padding: 0; box-sizing: border-box; } .dd-04 ::selection { background: #ec4899; color: #fff; } .dd-04 { --brand: #ec4899; --brand-light: #fdf2f8; --surface: #fff; --text: #1e1b4b; --muted: #6b7280; --border: #f3f4f6; font-family: 'Plus Jakarta Sans', sans-serif; min-height: 360px; display: flex; align-items: flex-start; justify-content: center; padding: 32px 20px; background: linear-gradient(135deg, #fdf2f8 0%, #fce7f3 50%, #ede9fe 100%); } .dd-04__nav { display: flex; align-items: center; gap: 8px; background: var(--surface); border-radius: 100px; padding: 8px 8px 8px 24px; box-shadow: 0 4px 24px rgba(236,72,153,.15), 0 1px 4px rgba(0,0,0,.05); position: relative; z-index: 100; } .dd-04__brand { font-size: 16px; font-weight: 700; color: var(--brand); margin-right: 8px; letter-spacing: -0.3px; } .dd-04__items { display: flex; gap: 2px; } .dd-04__item { position: relative; } .dd-04__item::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 10px; /* hover-bridge: invisible strip below the trigger covering the visible gap before the panel. Lives on .__item (not the panel, which has overflow:hidden / pointer-events: none in its closed state) so the parent :hover stays active while the cursor traverses the gap. */ } .dd-04__trigger { display: flex; align-items: center; gap: 4px; padding: 8px 16px; border-radius: 100px; color: var(--text); text-decoration: none; font-size: 14px; font-weight: 600; transition: background 0.15s, color 0.15s; } .dd-04__trigger:hover, .dd-04__item:hover .dd-04__trigger { background: var(--brand-light); color: var(--brand); } /* elastic bounce panel */ .dd-04__panel { position: absolute; top: calc(100% + 10px); left: 50%; transform: translateX(-50%) scaleY(0); transform-origin: top center; min-width: 190px; background: var(--surface); border: 1px solid rgba(236,72,153,.12); border-radius: 16px; box-shadow: 0 12px 40px rgba(236,72,153,.18), 0 2px 8px rgba(0,0,0,.05); padding: 8px; display: flex; flex-direction: column; gap: 2px; pointer-events: none; opacity: 0; transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.18s ease; } .dd-04__item:hover .dd-04__panel { transform: translateX(-50%) scaleY(1); opacity: 1; pointer-events: auto; } .dd-04__link { display: block; padding: 10px 14px; border-radius: 10px; text-decoration: none; color: var(--text); font-size: 13.5px; font-weight: 500; transition: background 0.15s, color 0.15s; } .dd-04__link:hover { background: var(--brand-light); color: var(--brand); } .dd-04__link--cta { color: var(--brand); font-weight: 700; } .dd-04__divider { height: 1px; background: var(--border); margin: 4px 0; } @media (prefers-reduced-motion: reduce) { .dd-04__panel { transition: none; } } ``` ### 05. Glassmorphism Float Panel Dropdown **Type:** Pure CSS **Description:** A frosted-glass dropdown panel that floats above a vivid gradient background using backdrop-filter blur and translucent borders. **HTML:** ```html ``` **CSS:** ```css .dd-05, .dd-05 *, .dd-05 *::before, .dd-05 *::after { margin: 0; padding: 0; box-sizing: border-box; } .dd-05 ::selection { background: rgba(255,255,255,.4); color: #fff; } .dd-05 { font-family: 'Outfit', sans-serif; min-height: 380px; display: flex; align-items: flex-start; justify-content: center; } .dd-05__bg { position: relative; width: 100%; min-height: 380px; background: linear-gradient(135deg, #667eea 0%, #764ba2 40%, #f093fb 100%); overflow: hidden; display: flex; align-items: flex-start; justify-content: center; padding: 32px 20px; } .dd-05__orb { position: absolute; border-radius: 50%; filter: blur(60px); opacity: 0.5; } .dd-05__orb--1 { width: 300px; height: 300px; background: #f093fb; top: -100px; left: -80px; } .dd-05__orb--2 { width: 250px; height: 250px; background: #4facfe; bottom: -80px; right: 0; } .dd-05__orb--3 { width: 200px; height: 200px; background: #f5af19; top: 40%; left: 40%; } .dd-05__nav { position: relative; z-index: 10; display: flex; align-items: center; gap: 8px; background: rgba(255,255,255,0.15); -webkit-backdrop-filter: blur(20px) saturate(180%); backdrop-filter: blur(20px) saturate(180%); border: 1px solid rgba(255,255,255,0.3); border-radius: 100px; padding: 8px 8px 8px 24px; box-shadow: 0 8px 32px rgba(0,0,0,.2), inset 0 1px 0 rgba(255,255,255,.4); } .dd-05__brand { font-size: 18px; font-weight: 700; color: #fff; letter-spacing: -0.3px; margin-right: 8px; } .dd-05__items { display: flex; gap: 2px; } .dd-05__item { position: relative; } .dd-05__item::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 12px; /* hover-bridge: invisible strip below the trigger covering the visible gap before the panel. Lives on .__item (not the panel, which has overflow:hidden / pointer-events: none in its closed state) so the parent :hover stays active while the cursor traverses the gap. */ } .dd-05__trigger { display: block; padding: 8px 16px; color: rgba(255,255,255,0.85); text-decoration: none; font-size: 14px; font-weight: 500; border-radius: 100px; transition: background 0.18s, color 0.18s; } .dd-05__trigger:hover, .dd-05__item:hover .dd-05__trigger { background: rgba(255,255,255,0.2); color: #fff; } /* glassmorphism panel */ .dd-05__panel { position: absolute; top: calc(100% + 12px); left: 50%; transform: translateX(-50%) translateY(-12px); min-width: 210px; background: rgba(255,255,255,0.18); -webkit-backdrop-filter: blur(24px) saturate(200%); backdrop-filter: blur(24px) saturate(200%); border: 1px solid rgba(255,255,255,0.35); border-radius: 16px; box-shadow: 0 16px 48px rgba(0,0,0,.25), inset 0 1px 0 rgba(255,255,255,.5), inset 0 -1px 0 rgba(255,255,255,.1); padding: 8px; display: flex; flex-direction: column; gap: 2px; opacity: 0; pointer-events: none; transition: opacity 0.25s ease, transform 0.32s cubic-bezier(0.16, 1, 0.3, 1); } .dd-05__item:hover .dd-05__panel { opacity: 1; pointer-events: auto; transform: translateX(-50%) translateY(0); } .dd-05__link { display: block; padding: 10px 14px; border-radius: 10px; text-decoration: none; color: rgba(255,255,255,0.9); font-size: 13.5px; font-weight: 500; transition: background 0.15s; } .dd-05__link:hover { background: rgba(255,255,255,0.2); color: #fff; } @media (prefers-reduced-motion: reduce) { .dd-05__panel { transition: none; } } ``` ### 06. Stagger Children Reveal Dropdown **Type:** Pure CSS **Description:** Each menu item cascades in one-by-one with staggered animation-delay values applied via nth-child, creating a flowing sequential reveal. **HTML:** ```html ``` **CSS:** ```css .dd-06, .dd-06 *, .dd-06 *::before, .dd-06 *::after { margin: 0; padding: 0; box-sizing: border-box; } .dd-06 ::selection { background: #6366f1; color: #fff; } .dd-06 { --surface: #fff; --text: #1e293b; --border: #f1f5f9; --hover: #f8fafc; font-family: 'Nunito', sans-serif; min-height: 360px; display: flex; align-items: flex-start; justify-content: center; padding: 32px 20px; background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 50%, #f0f9ff 100%); } .dd-06__nav { display: flex; align-items: center; gap: 4px; background: var(--surface); border: 1px solid #e2e8f0; border-radius: 14px; padding: 10px 10px 10px 20px; box-shadow: 0 4px 20px rgba(0,0,0,.06); position: relative; z-index: 100; } .dd-06__brand { font-size: 17px; font-weight: 800; color: #6366f1; margin-right: 12px; letter-spacing: -0.3px; } .dd-06__items { display: flex; gap: 2px; } .dd-06__item { position: relative; } .dd-06__item::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 10px; /* hover-bridge: invisible strip below the trigger covering the visible gap before the panel. Lives on .__item (not the panel, which has overflow:hidden / pointer-events: none in its closed state) so the parent :hover stays active while the cursor traverses the gap. */ } .dd-06__trigger { display: flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 10px; color: var(--text); text-decoration: none; font-size: 14px; font-weight: 600; transition: background 0.15s, color 0.15s; } .dd-06__trigger:hover, .dd-06__item:hover .dd-06__trigger { background: #eef2ff; color: #6366f1; } .dd-06__arrow { font-size: 12px; transition: transform 0.22s ease; color: #94a3b8; } .dd-06__item:hover .dd-06__arrow { transform: rotate(180deg); color: #6366f1; } /* panel */ .dd-06__panel { position: absolute; top: calc(100% + 10px); left: 50%; transform: translateX(-50%); min-width: 200px; background: var(--surface); border: 1px solid #e2e8f0; border-radius: 14px; box-shadow: 0 12px 40px rgba(0,0,0,.10); padding: 8px; display: flex; flex-direction: column; gap: 2px; opacity: 0; pointer-events: none; transition: opacity 0.18s ease; } .dd-06__item:hover .dd-06__panel { opacity: 1; pointer-events: auto; } /* stagger children */ @keyframes dd-06-slide-in { from { opacity: 0; transform: translateX(-10px); } to { opacity: 1; transform: translateX(0); } } .dd-06__link { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; text-decoration: none; color: var(--text); font-size: 13.5px; font-weight: 600; opacity: 0; transition: background 0.15s; } .dd-06__item:hover .dd-06__link { animation: dd-06-slide-in 0.32s cubic-bezier(0.16, 1, 0.3, 1) forwards; animation-delay: calc(var(--i) * 60ms); } .dd-06__link:hover { background: var(--hover); } .dd-06__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c, #6366f1); flex-shrink: 0; } @media (prefers-reduced-motion: reduce) { .dd-06__link { animation: none; opacity: 1; } .dd-06__panel { transition: none; } } ``` ### 07. Mega Menu Grid Dropdown **Type:** Pure CSS **Description:** A full-width mega menu that spans the entire nav bar and organizes links into a multi-column CSS Grid layout with section headings and featured content. **HTML:** ```html ``` **CSS:** ```css .dd-07, .dd-07 *, .dd-07 *::before, .dd-07 *::after { margin: 0; padding: 0; box-sizing: border-box; } .dd-07 ::selection { background: #0ea5e9; color: #fff; } .dd-07 { --brand: #0ea5e9; --surface: #fff; --text: #0f172a; --muted: #64748b; --border: #e2e8f0; --hover: #f0f9ff; font-family: 'Inter', sans-serif; min-height: 380px; background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%); display: flex; flex-direction: column; align-items: stretch; } .dd-07__wrapper { width: 100%; display: flex; justify-content: center; padding: 32px 20px 0; } .dd-07__nav { position: relative; display: flex; align-items: center; gap: 4px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 10px 10px 10px 20px; box-shadow: 0 2px 16px rgba(0,0,0,.06); width: 100%; max-width: 780px; z-index: 100; } .dd-07__brand { font-size: 18px; font-weight: 700; color: var(--brand); margin-right: 8px; letter-spacing: -0.5px; } .dd-07__items { display: flex; align-items: center; gap: 2px; flex: 1; } .dd-07__simple { padding: 8px 14px; color: var(--text); text-decoration: none; font-size: 14px; font-weight: 500; border-radius: 8px; transition: background 0.15s, color 0.15s; } .dd-07__simple:hover { background: var(--hover); color: var(--brand); } .dd-07__item { position: relative; } /* hover-bridge: invisible strip below the trigger covering the 12px gap. */ .dd-07__item::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 12px; } .dd-07__trigger { display: block; padding: 8px 14px; color: var(--text); text-decoration: none; font-size: 14px; font-weight: 500; border-radius: 8px; transition: background 0.15s, color 0.15s; white-space: nowrap; } .dd-07__trigger:hover, .dd-07__item:hover .dd-07__trigger { background: var(--hover); color: var(--brand); } /* mega panel */ .dd-07__mega { position: absolute; top: calc(100% + 12px); left: 50%; transform: translateX(-50%) translateY(-8px); width: 620px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: 0 20px 60px rgba(0,0,0,.12); padding: 24px; display: grid; grid-template-columns: 1fr 1fr 1fr 1.4fr; gap: 24px; opacity: 0; pointer-events: none; transition: opacity 0.24s ease, transform 0.3s cubic-bezier(0.16,1,0.3,1); } .dd-07__mega::before { content: ""; position: absolute; left: 0; right: 0; top: -12px; height: 12px; /* invisible hover-bridge — keeps :hover active while the cursor traverses the visible gap between trigger and panel. */ } .dd-07__item:hover .dd-07__mega { opacity: 1; pointer-events: auto; transform: translateX(-50%) translateY(0); } .dd-07__heading { font-size: 10.5px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; padding-bottom: 8px; border-bottom: 1px solid var(--border); } .dd-07__col { display: flex; flex-direction: column; gap: 2px; } .dd-07__link { display: block; padding: 7px 8px; border-radius: 8px; text-decoration: none; color: var(--text); font-size: 13px; font-weight: 500; transition: background 0.15s, color 0.15s; } .dd-07__link:hover { background: var(--hover); color: var(--brand); } .dd-07__featured { display: flex; flex-direction: column; gap: 8px; } .dd-07__card { background: linear-gradient(135deg, #f0f9ff, #e0f2fe); border: 1px solid #bae6fd; border-radius: 12px; padding: 16px; flex: 1; display: flex; flex-direction: column; gap: 6px; } .dd-07__new { display: inline-block; font-size: 9px; font-weight: 700; letter-spacing: 0.1em; color: var(--brand); background: #e0f2fe; padding: 2px 6px; border-radius: 4px; align-self: flex-start; } .dd-07__card-title { font-size: 14px; font-weight: 700; color: var(--text); } .dd-07__card-desc { font-size: 12px; color: var(--muted); line-height: 1.5; } .dd-07__card-link { font-size: 12px; font-weight: 600; color: var(--brand); text-decoration: none; margin-top: auto; transition: gap 0.15s; } .dd-07__cta { margin-left: auto; padding: 8px 18px; background: var(--brand); color: #fff; border-radius: 8px; text-decoration: none; font-size: 13.5px; font-weight: 600; white-space: nowrap; transition: opacity 0.15s; } .dd-07__cta:hover { opacity: 0.88; } @media (prefers-reduced-motion: reduce) { .dd-07__mega { transition: none; } } ``` ### 08. Underline Nav Fade Panel Dropdown **Type:** Pure CSS **Description:** An editorial navigation style where a scaleX underline sweeps under the active trigger and a clean panel fades in below with category links. **HTML:** ```html ``` **CSS:** ```css .dd-08, .dd-08 *, .dd-08 *::before, .dd-08 *::after { margin: 0; padding: 0; box-sizing: border-box; } .dd-08 ::selection { background: #1e293b; color: #f8fafc; } .dd-08 { --text: #1e293b; --muted: #64748b; --surface: #fff; --border: #e2e8f0; font-family: 'Inter', sans-serif; min-height: 360px; display: flex; align-items: flex-start; justify-content: center; padding: 32px 20px; background: #fafaf8; } .dd-08__nav { display: flex; align-items: center; gap: 0; background: var(--surface); border-bottom: 2px solid var(--border); width: 100%; max-width: 680px; padding: 0 24px; position: relative; z-index: 100; } .dd-08__brand { font-family: 'Fraunces', serif; font-size: 22px; font-weight: 600; color: var(--text); text-decoration: none; padding: 18px 0; margin-right: 32px; letter-spacing: -0.5px; } .dd-08__brand em { font-style: italic; color: #d97706; } .dd-08__items { display: flex; gap: 0; } .dd-08__item { position: relative; } .dd-08__item::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 2px; /* hover-bridge: invisible strip below the trigger covering the visible gap before the panel. Lives on .__item (not the panel, which has overflow:hidden / pointer-events: none in its closed state) so the parent :hover stays active while the cursor traverses the gap. */ } .dd-08__trigger { display: block; padding: 18px 16px; color: var(--muted); text-decoration: none; font-size: 13.5px; font-weight: 500; letter-spacing: 0.02em; position: relative; transition: color 0.18s; } /* scaleX underline */ .dd-08__trigger::after { content: ''; position: absolute; bottom: -2px; left: 16px; right: 16px; height: 2px; background: var(--accent, var(--text)); transform: scaleX(0); transform-origin: left center; transition: transform 0.24s ease-out; border-radius: 1px; } .dd-08__item:hover .dd-08__trigger { color: var(--text); } .dd-08__item:hover .dd-08__trigger::after { transform: scaleX(1); } /* panel */ .dd-08__panel { position: absolute; top: calc(100% + 2px); left: 0; background: var(--surface); border: 1px solid var(--border); border-top: none; border-radius: 0 0 12px 12px; box-shadow: 0 12px 32px rgba(0,0,0,.08); padding: 20px 24px; display: flex; gap: 32px; opacity: 0; visibility: hidden; pointer-events: none; transition: opacity 0.22s ease, visibility 0s linear 0.22s; } .dd-08__item:hover .dd-08__panel { opacity: 1; visibility: visible; pointer-events: auto; transition: opacity 0.22s ease, visibility 0s linear 0s; } .dd-08__col { display: flex; flex-direction: column; gap: 4px; min-width: 140px; } .dd-08__link { display: block; padding: 6px 0; color: var(--muted); text-decoration: none; font-family: 'Fraunces', serif; font-size: 15px; font-weight: 400; transition: color 0.15s; border-bottom: 1px solid transparent; } .dd-08__link:hover { color: var(--text); border-bottom-color: var(--accent, var(--text)); } @media (prefers-reduced-motion: reduce) { .dd-08__panel, .dd-08__trigger::after { transition: none; } } ``` ### 09. Details Summary Native Dropdown **Type:** Pure CSS **Description:** A fully CSS-only dropdown built on the native HTML details/summary element, styled with custom markers and animated with the [open] attribute selector. **HTML:** ```html ``` **CSS:** ```css .dd-09, .dd-09 *, .dd-09 *::before, .dd-09 *::after { margin: 0; padding: 0; box-sizing: border-box; } .dd-09 ::selection { background: #92400e; color: #fffbeb; } .dd-09 { --brand: #b45309; --surface: #fffbeb; --panel: #fff; --text: #1c1917; --muted: #78716c; --border: #e7e5e4; --hover: #fef3c7; font-family: 'Source Sans 3', sans-serif; min-height: 380px; display: flex; align-items: center; justify-content: center; background: linear-gradient(160deg, #fffbeb 0%, #fef3c7 100%); padding: 40px 20px; } .dd-09__layout { display: flex; flex-direction: column; align-items: center; gap: 16px; width: 100%; max-width: 640px; } .dd-09__nav { display: flex; gap: 12px; background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 10px; box-shadow: 0 4px 16px rgba(0,0,0,.06); width: 100%; justify-content: center; } .dd-09__details { position: relative; flex: 1; max-width: 180px; } /* hide default marker */ .dd-09__details > summary { list-style: none; } .dd-09__details > summary::-webkit-details-marker { display: none; } .dd-09__details > summary::marker { display: none; } .dd-09__summary { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; border-radius: 8px; cursor: pointer; user-select: none; color: var(--text); font-size: 14px; font-weight: 600; transition: background 0.15s, color 0.15s; gap: 8px; } .dd-09__summary:hover { background: var(--hover); color: var(--brand); } .dd-09__details[open] .dd-09__summary { background: var(--hover); color: var(--brand); } .dd-09__label { font-family: 'Lora', serif; font-size: 15px; } .dd-09__arrow { width: 16px; height: 16px; position: relative; flex-shrink: 0; overflow: hidden; } .dd-09__arrow::before, .dd-09__arrow::after { content: ''; position: absolute; top: 50%; width: 7px; height: 1.5px; background: currentColor; transition: transform 0.22s ease; } .dd-09__arrow::before { left: 3px; transform: translateY(-50%) rotate(45deg); transform-origin: center; } .dd-09__arrow::after { right: 3px; transform: translateY(-50%) rotate(-45deg); transform-origin: center; } .dd-09__details[open] .dd-09__arrow::before { transform: translateY(-50%) rotate(-45deg); } .dd-09__details[open] .dd-09__arrow::after { transform: translateY(-50%) rotate(45deg); } .dd-09__panel { position: absolute; top: calc(100% + 8px); left: 0; width: 100%; min-width: 160px; background: var(--panel); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.10); padding: 6px; display: flex; flex-direction: column; gap: 2px; overflow: hidden; max-height: 0; opacity: 0; transition: max-height 0.34s ease, opacity 0.22s ease; z-index: 10; } .dd-09__details[open] .dd-09__panel { max-height: 400px; opacity: 1; } .dd-09__link { display: block; padding: 9px 12px; border-radius: 7px; text-decoration: none; color: var(--text); font-size: 13.5px; font-weight: 500; font-family: 'Lora', serif; transition: background 0.15s, color 0.15s; } .dd-09__link:hover { background: var(--hover); color: var(--brand); } .dd-09__hint { font-size: 12px; color: var(--muted); font-style: italic; } @media (prefers-reduced-motion: reduce) { .dd-09__panel, .dd-09__arrow::before, .dd-09__arrow::after, .dd-09__summary { transition: none; } } ``` ### 10. Checkbox Hack Mobile Nav Dropdown **Type:** Pure CSS **Description:** A pure CSS hamburger-to-X mobile nav using the checkbox hack — an invisible input toggled by a label drives the entire menu open/close state. **HTML:** ```html ``` **CSS:** ```css .dd-10, .dd-10 *, .dd-10 *::before, .dd-10 *::after { margin: 0; padding: 0; box-sizing: border-box; } .dd-10 ::selection { background: #111827; color: #f9fafb; } .dd-10 { --ink: #111827; --surface: #fff; --accent: #f59e0b; --border: #f3f4f6; font-family: 'Space Grotesk', sans-serif; min-height: 380px; display: flex; flex-direction: column; background: linear-gradient(160deg, #fff 0%, #f9fafb 100%); max-width: 440px; margin: 0 auto; border: 1px solid var(--border); border-radius: 16px; overflow: hidden; box-shadow: 0 4px 24px rgba(0,0,0,.08); } /* hidden checkbox */ .dd-10__input { position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none; } .dd-10__header { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--border); background: var(--surface); position: relative; z-index: 10; } .dd-10__brand { font-size: 20px; font-weight: 700; color: var(--ink); text-decoration: none; letter-spacing: -0.5px; } .dd-10__hamburger { width: 40px; height: 40px; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 5px; cursor: pointer; border-radius: 8px; transition: background 0.15s; padding: 8px; } .dd-10__hamburger:hover { background: #f9fafb; } .dd-10__hamburger span { display: block; width: 20px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform 0.3s ease, opacity 0.2s ease; transform-origin: center; } /* checked: hamburger → X */ .dd-10__input:checked ~ .dd-10__header .dd-10__hamburger span:nth-child(1) { transform: translateY(7px) rotate(45deg); } .dd-10__input:checked ~ .dd-10__header .dd-10__hamburger span:nth-child(2) { opacity: 0; transform: scaleX(0); } .dd-10__input:checked ~ .dd-10__header .dd-10__hamburger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); } /* menu panel */ .dd-10__menu { display: flex; flex-direction: column; background: var(--surface); max-height: 0; overflow: hidden; opacity: 0; transition: max-height 0.38s ease, opacity 0.25s ease; } .dd-10__input:checked ~ .dd-10__menu { max-height: 400px; opacity: 1; } .dd-10__link { display: block; padding: 18px 24px; color: var(--ink); text-decoration: none; font-size: 22px; font-weight: 700; border-bottom: 1px solid var(--border); letter-spacing: -0.5px; transition: color 0.15s, padding-left 0.2s ease; } .dd-10__link:hover { color: var(--accent); padding-left: 32px; } .dd-10__link--cta { color: var(--accent); font-size: 15px; letter-spacing: 0; font-weight: 600; border-bottom: none; padding: 20px 24px; } .dd-10__link--cta:hover { color: #d97706; padding-left: 32px; } @media (prefers-reduced-motion: reduce) { .dd-10__menu, .dd-10__hamburger span, .dd-10__link { transition: none; } } ``` ### 11. Nested Multi-Level Dropdown **Type:** Pure CSS **Description:** A three-level deep nested dropdown where each submenu flies out to the right of its parent item, triggered purely by CSS hover on sibling selectors. **HTML:** ```html ``` **CSS:** ```css .dd-11, .dd-11 *, .dd-11 *::before, .dd-11 *::after { margin: 0; padding: 0; box-sizing: border-box; } .dd-11 ::selection { background: #1d4ed8; color: #eff6ff; } .dd-11 { --brand: #1d4ed8; --surface: #fff; --text: #1e293b; --muted: #64748b; --border: #e2e8f0; --hover: #eff6ff; font-family: 'Manrope', sans-serif; min-height: 380px; display: flex; align-items: flex-start; justify-content: center; padding: 32px 20px; background: linear-gradient(135deg, #eff6ff 0%, #e0e7ff 100%); } .dd-11__nav { position: relative; z-index: 100; } .dd-11__list { list-style: none; display: flex; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 6px; gap: 2px; box-shadow: 0 4px 20px rgba(0,0,0,.07); } .dd-11__list--root > .dd-11__item { position: relative; } /* submenus */ .dd-11__sub { list-style: none; position: absolute; top: 0; left: 100%; min-width: 170px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 8px 32px rgba(0,0,0,.12); padding: 5px; display: flex; flex-direction: column; gap: 1px; opacity: 0; pointer-events: none; transform: translateX(4px); transition: opacity 0.2s ease, transform 0.2s ease; z-index: 10; } /* Hover bridges — must be on the .dd-11__item (the :hover target), NOT on .dd-11__sub because the sub has pointer-events:none at rest so its ::before is unreachable. Nested items extend their right edge by an invisible strip covering the gap to the submenu. */ .dd-11__item { position: relative; } .dd-11__item:not(.dd-11__list--root > .dd-11__item)::after { content: ""; position: absolute; top: 0; bottom: 0; left: 100%; width: 10px; } /* Root-level items drop submenus DOWNWARD, so bridge goes BELOW. */ .dd-11__list--root > .dd-11__item::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 8px; } /* first level drops down */ .dd-11__list--root > .dd-11__item > .dd-11__sub { top: calc(100% + 8px); left: 0; transform: translateY(-4px); } .dd-11__list--root > .dd-11__item:hover > .dd-11__sub { transform: translateY(0); } .dd-11__item:hover > .dd-11__sub { opacity: 1; pointer-events: auto; transform: translateX(0); } .dd-11__list--root > .dd-11__item:hover > .dd-11__sub { opacity: 1; pointer-events: auto; } .dd-11__link { display: flex; align-items: center; justify-content: space-between; padding: 9px 14px; border-radius: 8px; text-decoration: none; color: var(--text); font-size: 13.5px; font-weight: 500; white-space: nowrap; transition: background 0.15s, color 0.15s; gap: 8px; } .dd-11__link:hover { background: var(--hover); color: var(--brand); } /* nested indicator arrow */ .dd-11__item--has-sub > .dd-11__link::after { content: '›'; font-size: 14px; font-weight: 400; color: var(--muted); margin-left: auto; } /* root level items use down arrow */ .dd-11__list--root > .dd-11__item--has-sub > .dd-11__link::after { content: '⌄'; font-size: 11px; } .dd-11__list--root .dd-11__link { font-weight: 600; } @media (prefers-reduced-motion: reduce) { .dd-11__sub { transition: none; } } ``` ### 12. Icon Sidebar Flyout Dropdown **Type:** Pure CSS **Description:** A compact icon-only rail navigation where hovering each icon causes a labeled flyout panel to slide in from the right — a common pattern for collapsed sidebars. **HTML:** ```html

Hover the icons ←

``` **CSS:** ```css .dd-12, .dd-12 *, .dd-12 *::before, .dd-12 *::after { margin: 0; padding: 0; box-sizing: border-box; } .dd-12 ::selection { background: #7c3aed; color: #ede9fe; } .dd-12 { --accent: #7c3aed; --surface: #fff; --rail-bg: #fafafa; --text: #1e1b4b; --muted: #6b7280; --border: #ede9fe; --hover-icon: #f5f3ff; font-family: 'IBM Plex Sans', sans-serif; min-height: 380px; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%); padding: 40px 20px; } .dd-12__app { display: flex; height: 300px; width: 100%; max-width: 560px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; overflow: visible; box-shadow: 0 8px 32px rgba(124,58,237,.12); } .dd-12__rail { width: 60px; background: var(--rail-bg); border-right: 1px solid var(--border); border-radius: 16px 0 0 16px; display: flex; flex-direction: column; align-items: center; padding: 14px 0; gap: 4px; flex-shrink: 0; position: relative; z-index: 10; overflow: visible; } .dd-12__brand-icon { font-size: 18px; color: var(--accent); font-weight: 700; margin-bottom: 16px; } .dd-12__item { position: relative; width: 100%; display: flex; justify-content: center; } /* hover-bridge: invisible strip on the right of the icon-rail item covering the 8px gap to the flyout panel. Lives on .__item (not .__flyout, which has pointer-events:none at rest). */ .dd-12__item::after { content: ""; position: absolute; top: 0; bottom: 0; left: 100%; width: 8px; } .dd-12__icon-wrap { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; border-radius: 10px; cursor: pointer; transition: background 0.15s; } .dd-12__item:hover .dd-12__icon-wrap { background: var(--hover-icon); } .dd-12__icon { font-size: 18px; } /* flyout panel */ .dd-12__flyout { position: absolute; left: calc(100% + 8px); top: -4px; min-width: 170px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 8px 28px rgba(124,58,237,.15); padding: 12px; display: flex; flex-direction: column; gap: 2px; opacity: 0; pointer-events: none; transform: translateX(-8px); transition: opacity 0.2s ease, transform 0.25s cubic-bezier(0.16,1,0.3,1); z-index: 20; } .dd-12__item:hover .dd-12__flyout { opacity: 1; pointer-events: auto; transform: translateX(0); } .dd-12__fly-title { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent); padding: 0 4px 4px; } .dd-12__fly-divider { height: 1px; background: var(--border); margin: 4px 0; } .dd-12__fly-link { display: block; padding: 7px 10px; border-radius: 7px; text-decoration: none; color: var(--text); font-size: 13px; font-weight: 500; transition: background 0.12s, color 0.12s; } .dd-12__fly-link:hover { background: var(--hover-icon); color: var(--accent); } .dd-12__main { flex: 1; display: flex; align-items: center; justify-content: center; } .dd-12__hint { color: var(--muted); font-size: 13px; font-style: italic; } @media (prefers-reduced-motion: reduce) { .dd-12__flyout { transition: none; } } ``` ### 13. Split-Screen Mega Menu Dropdown **Type:** Pure CSS **Description:** A full-width two-column mega menu with a rich image panel on the left and categorized links on the right, revealing with a smooth fade-up transition. **HTML:** ```html
``` **CSS:** ```css .dd-13, .dd-13 *, .dd-13 *::before, .dd-13 *::after { margin: 0; padding: 0; box-sizing: border-box; } .dd-13 ::selection { background: #1e293b; color: #f8fafc; } .dd-13 { --text: #1e293b; --muted: #64748b; --surface: #fff; --border: #e2e8f0; font-family: 'Inter', sans-serif; min-height: 400px; background: #f8f7f4; display: flex; flex-direction: column; align-items: center; } .dd-13__wrap { width: 100%; padding: 32px 20px 0; display: flex; justify-content: center; } .dd-13__nav { display: flex; align-items: center; gap: 4px; background: var(--surface); border-bottom: 1px solid var(--border); width: 100%; max-width: 720px; padding: 0 20px; position: relative; z-index: 100; border-radius: 12px 12px 0 0; box-shadow: 0 2px 12px rgba(0,0,0,.05); } .dd-13__brand { font-family: 'Playfair Display', serif; font-size: 20px; font-weight: 700; color: var(--text); text-decoration: none; letter-spacing: -0.3px; padding: 16px 0; margin-right: 24px; } .dd-13__items { display: flex; align-items: center; gap: 0; margin-left: auto; } .dd-13__item { position: relative; } .dd-13__trigger, .dd-13__plain { display: block; padding: 18px 14px; color: var(--muted); text-decoration: none; font-size: 13.5px; font-weight: 500; letter-spacing: 0.03em; transition: color 0.15s; } .dd-13__trigger:hover, .dd-13__item:hover .dd-13__trigger, .dd-13__plain:hover { color: var(--text); } /* mega panel */ .dd-13__mega { position: absolute; top: 100%; left: 50%; transform: translateX(-50%) translateY(-10px); width: 580px; background: var(--surface); border: 1px solid var(--border); border-top: none; border-radius: 0 0 16px 16px; box-shadow: 0 24px 60px rgba(0,0,0,.13); display: grid; grid-template-columns: 1.2fr 1fr; overflow: hidden; opacity: 0; pointer-events: none; transition: opacity 0.26s ease, transform 0.32s cubic-bezier(0.16,1,0.3,1); } .dd-13__item:hover .dd-13__mega { opacity: 1; pointer-events: auto; transform: translateX(-50%) translateY(0); } .dd-13__visual { background: linear-gradient(145deg, #1e293b 0%, #334155 50%, #475569 100%); padding: 28px 24px; display: flex; flex-direction: column; gap: 8px; min-height: 220px; } .dd-13__vis-label { font-size: 10px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(255,255,255,0.5); } .dd-13__vis-title { font-family: 'Playfair Display', serif; font-size: 20px; color: #fff; font-weight: 700; line-height: 1.25; } .dd-13__vis-sub { font-size: 12.5px; color: rgba(255,255,255,0.65); line-height: 1.5; margin-top: 4px; flex: 1; } .dd-13__vis-cta { color: rgba(255,255,255,0.85); text-decoration: none; font-size: 12.5px; font-weight: 600; letter-spacing: 0.03em; margin-top: 8px; transition: color 0.15s; } .dd-13__vis-cta:hover { color: #fff; } .dd-13__links { padding: 24px 20px; display: grid; grid-template-columns: 1fr 1fr; gap: 24px; } .dd-13__group { display: flex; flex-direction: column; gap: 4px; } .dd-13__group-heading { font-size: 10px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; padding-bottom: 6px; border-bottom: 1px solid var(--border); } .dd-13__link { display: block; padding: 5px 0; color: var(--text); text-decoration: none; font-size: 13px; font-weight: 450; transition: color 0.15s; } .dd-13__link:hover { color: #0ea5e9; } @media (prefers-reduced-motion: reduce) { .dd-13__mega { transition: none; } } ``` ### 14. Segmented Pill Nav Dropdown **Type:** Pure CSS **Description:** A pill-shaped navigation bar with a sliding background highlight that follows focus between segments, each revealing its own dropdown panel below. **HTML:** ```html ``` **CSS:** ```css .dd-14, .dd-14 *, .dd-14 *::before, .dd-14 *::after { margin: 0; padding: 0; box-sizing: border-box; } .dd-14 ::selection { background: #0f172a; color: #f8fafc; } .dd-14 { --trough: #f1f5f9; --pill-bg: #fff; --text: #0f172a; --muted: #64748b; --accent: #6366f1; --border: #e2e8f0; --shadow: 0 2px 8px rgba(0,0,0,.08); font-family: 'DM Sans', sans-serif; min-height: 360px; display: flex; align-items: flex-start; justify-content: center; padding: 36px 20px; background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%); } .dd-14__scene { display: flex; flex-direction: column; align-items: center; gap: 16px; width: 100%; position: relative; z-index: 100; } .dd-14__rail { display: flex; gap: 4px; background: var(--trough); border-radius: 100px; padding: 4px; box-shadow: inset 0 1px 3px rgba(0,0,0,.08); } .dd-14__seg { position: relative; } /* hover-bridge: invisible strip below the pill covering the 10px gap. */ .dd-14__seg::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 10px; } .dd-14__pill { display: flex; align-items: center; gap: 6px; padding: 9px 18px; border: none; border-radius: 100px; background: transparent; cursor: pointer; font-family: inherit; font-size: 13.5px; font-weight: 600; color: var(--muted); transition: background 0.18s, color 0.18s, box-shadow 0.18s; white-space: nowrap; position: relative; } .dd-14__pill:hover, .dd-14__seg:hover .dd-14__pill { background: var(--pill-bg); color: var(--text); box-shadow: var(--shadow); } /* dropdown */ .dd-14__drop { position: absolute; top: calc(100% + 10px); left: 50%; transform: translateX(-50%) translateY(-6px); min-width: 160px; background: var(--pill-bg); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 12px 36px rgba(0,0,0,.12); padding: 6px; display: flex; flex-direction: column; gap: 2px; opacity: 0; pointer-events: none; transition: opacity 0.2s ease, transform 0.26s cubic-bezier(0.16,1,0.3,1); } .dd-14__seg:hover .dd-14__drop { opacity: 1; pointer-events: auto; transform: translateX(-50%) translateY(0); } /* Hover bridge — keeps :hover active while cursor crosses the 10px visible gap between the pill trigger and the dropdown panel. */ .dd-14__drop::before { content: ""; position: absolute; left: 0; right: 0; top: -10px; height: 10px; } .dd-14__link { display: block; padding: 9px 13px; border-radius: 8px; text-decoration: none; color: var(--text); font-size: 13.5px; font-weight: 500; transition: background 0.14s, color 0.14s; } .dd-14__link:hover { background: #eef2ff; color: var(--accent); } @media (prefers-reduced-motion: reduce) { .dd-14__drop, .dd-14__pill { transition: none; } } ``` ### 15. Color Swatch Picker Dropdown **Type:** Pure CSS **Description:** A color palette dropdown that reveals a grid of color swatches on hover, with a tooltip label appearing on individual swatch hover using CSS only. **HTML:** ```html

Choose a Color

Hover the button to pick a palette color

``` **CSS:** ```css .dd-15, .dd-15 *, .dd-15 *::before, .dd-15 *::after { margin: 0; padding: 0; box-sizing: border-box; } .dd-15 ::selection { background: #6366f1; color: #fff; } .dd-15 { --surface: #fff; --border: #e2e8f0; --text: #0f172a; --muted: #64748b; font-family: 'Inter', sans-serif; min-height: 380px; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #fafafa 0%, #f4f4f5 100%); padding: 40px 20px; } .dd-15__scene { display: flex; flex-direction: column; align-items: center; gap: 24px; } .dd-15__control { position: relative; z-index: 100; } .dd-15__item { position: relative; } .dd-15__item::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 10px; /* hover-bridge: invisible strip below the trigger covering the visible gap before the panel. Lives on .__item (not the panel, which has overflow:hidden / pointer-events: none in its closed state) so the parent :hover stays active while the cursor traverses the gap. */ } .dd-15__trigger { display: flex; align-items: center; gap: 8px; padding: 10px 16px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); cursor: pointer; font-family: inherit; font-size: 14px; font-weight: 500; color: var(--text); box-shadow: 0 1px 4px rgba(0,0,0,.05); transition: box-shadow 0.15s, border-color 0.15s; } .dd-15__trigger:hover, .dd-15__item:hover .dd-15__trigger { box-shadow: 0 4px 16px rgba(0,0,0,.1); border-color: #c7d2fe; } .dd-15__swatch-dot { width: 18px; height: 18px; border-radius: 50%; background: var(--current, #6366f1); border: 2px solid rgba(255,255,255,0.8); box-shadow: 0 0 0 1px rgba(0,0,0,.12); flex-shrink: 0; } .dd-15__chevron { font-size: 11px; color: var(--muted); transition: transform 0.2s; } .dd-15__item:hover .dd-15__chevron { transform: rotate(180deg); } /* panel */ .dd-15__panel { position: absolute; top: calc(100% + 10px); left: 50%; transform: translateX(-50%) translateY(-6px); width: 220px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 12px 40px rgba(0,0,0,.12); padding: 14px; opacity: 0; pointer-events: none; transition: opacity 0.2s ease, transform 0.28s cubic-bezier(0.16,1,0.3,1); } .dd-15__item:hover .dd-15__panel { opacity: 1; pointer-events: auto; transform: translateX(-50%) translateY(0); } .dd-15__panel-title { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 10px; } .dd-15__grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; } .dd-15__sw { width: 26px; height: 26px; border-radius: 6px; background: var(--sw, #ccc); cursor: pointer; position: relative; transition: transform 0.15s, box-shadow 0.15s; box-shadow: 0 1px 3px rgba(0,0,0,.15); } .dd-15__sw:hover { transform: scale(1.22); box-shadow: 0 4px 10px rgba(0,0,0,.2); z-index: 2; } /* CSS tooltip via attr() */ .dd-15__sw::after { content: attr(data-name); position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); background: #0f172a; color: #fff; font-size: 10px; font-weight: 500; padding: 3px 7px; border-radius: 5px; white-space: nowrap; pointer-events: none; opacity: 0; transition: opacity 0.15s ease 0.1s; } .dd-15__sw:hover::after { opacity: 1; } .dd-15__label { font-size: 12.5px; color: var(--muted); font-style: italic; } @media (prefers-reduced-motion: reduce) { .dd-15__panel, .dd-15__sw, .dd-15__sw::after, .dd-15__chevron { transition: none; } } ``` ### 16. Context Menu Right-Click Dropdown **Type:** CSS + JS **Description:** A custom right-click context menu that appears at the exact cursor position on contextmenu event, with smooth CSS entrance animation and click-outside dismissal. **HTML:** ```html
🖰

Right-click anywhere in this area

📄 document.pdf
``` **CSS:** ```css .dd-16, .dd-16 *, .dd-16 *::before, .dd-16 *::after { margin: 0; padding: 0; box-sizing: border-box; } .dd-16 ::selection { background: #0ea5e9; color: #fff; } .dd-16 { --surface: #fff; --border: #e5e7eb; --text: #111827; --muted: #6b7280; --danger: #ef4444; --accent: #0ea5e9; --hover: #f0f9ff; font-family: 'Inter', sans-serif; min-height: 360px; position: relative; background: linear-gradient(135deg, #f8fafc 0%, #e0f2fe 100%); user-select: none; } .dd-16__zone { width: 100%; height: 360px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 24px; cursor: context-menu; border: 2px dashed #bae6fd; border-radius: 16px; } .dd-16__hint { display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--muted); font-size: 13.5px; font-weight: 500; } .dd-16__hint-icon { font-size: 28px; } .dd-16__file { display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 10px 18px; font-size: 13.5px; font-weight: 500; color: var(--text); cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.06); transition: box-shadow 0.15s; } .dd-16__file:hover { box-shadow: 0 4px 16px rgba(0,0,0,.1); } /* context menu */ .dd-16__menu { position: fixed; min-width: 190px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 8px 30px rgba(0,0,0,.16), 0 2px 8px rgba(0,0,0,.08); padding: 6px; list-style: none; z-index: 9999; opacity: 0; transform: scale(0.92); transform-origin: top left; pointer-events: none; transition: opacity 0.18s ease, transform 0.22s cubic-bezier(0.16,1,0.3,1); } .dd-16__menu.is-open { opacity: 1; transform: scale(1); pointer-events: auto; } .dd-16__item { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 7px; font-size: 13.5px; font-weight: 500; color: var(--text); cursor: pointer; transition: background 0.12s, color 0.12s; } .dd-16__item:hover { background: var(--hover); color: var(--accent); } .dd-16__item--danger { color: var(--danger); } .dd-16__item--danger:hover { background: #fef2f2; color: var(--danger); } .dd-16__icon { font-size: 14px; width: 18px; text-align: center; } .dd-16__sep { height: 1px; background: var(--border); margin: 4px 0; } @media (prefers-reduced-motion: reduce) { .dd-16__menu { transition: none; } } ``` **JS:** ```js (function() { const zone = document.getElementById('dd-16-zone'); const menu = document.getElementById('dd-16-menu'); if (!zone || !menu) return; function openMenu(x, y) { menu.classList.add('is-open'); // position with viewport clamping const mw = menu.offsetWidth || 200; const mh = menu.offsetHeight || 240; const cx = Math.min(x, window.innerWidth - mw - 8); const cy = Math.min(y, window.innerHeight - mh - 8); menu.style.left = cx + 'px'; menu.style.top = cy + 'px'; } function closeMenu() { menu.classList.remove('is-open'); } zone.addEventListener('contextmenu', function(e) { e.preventDefault(); closeMenu(); // small delay so scale origin resets requestAnimationFrame(() => openMenu(e.clientX, e.clientY)); }); document.addEventListener('click', function(e) { if (!menu.contains(e.target)) closeMenu(); }); document.addEventListener('keydown', function(e) { if (e.key === 'Escape') closeMenu(); }); // item click closes menu menu.querySelectorAll('.dd-16__item').forEach(function(item) { item.addEventListener('click', closeMenu); }); })(); ``` ### 17. Keyboard Accessible Dropdown **Type:** CSS + JS **Description:** A fully ARIA-compliant dropdown with keyboard navigation: arrow keys move focus between items, Escape closes the menu, and Enter activates links. **HTML:** ```html
▶ Keyboard Try: Enter, ↑↓, Escape

Fully ARIA-compliant — works with screen readers

``` **CSS:** ```css .dd-17, .dd-17 *, .dd-17 *::before, .dd-17 *::after { margin: 0; padding: 0; box-sizing: border-box; } .dd-17 ::selection { background: #059669; color: #ecfdf5; } .dd-17 { --brand: #059669; --surface: #fff; --text: #111827; --muted: #6b7280; --border: #e5e7eb; --hover: #f0fdf4; --danger: #ef4444; font-family: 'Inter', sans-serif; min-height: 380px; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%); padding: 40px 20px; } .dd-17__scene { display: flex; flex-direction: column; align-items: center; gap: 20px; position: relative; z-index: 100; } .dd-17__hint-row { display: flex; align-items: center; gap: 12px; } .dd-17__badge { background: #d1fae5; color: var(--brand); font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 100px; letter-spacing: 0.04em; } .dd-17__tip { font-size: 12.5px; color: var(--muted); } .dd-17__wrap { position: relative; } .dd-17__trigger { display: flex; align-items: center; gap: 10px; padding: 10px 14px 10px 18px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; cursor: pointer; font-family: inherit; font-size: 14px; font-weight: 600; color: var(--text); box-shadow: 0 1px 4px rgba(0,0,0,.05); transition: box-shadow 0.15s, border-color 0.15s; } .dd-17__trigger:hover { box-shadow: 0 4px 16px rgba(0,0,0,.10); border-color: #6ee7b7; } .dd-17__trigger:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; } .dd-17__trigger[aria-expanded="true"] { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(5,150,105,.12); } .dd-17__avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--brand); color: #fff; font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; letter-spacing: 0.04em; } .dd-17__menu { position: absolute; top: calc(100% + 8px); right: 0; min-width: 200px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 12px 40px rgba(0,0,0,.12); padding: 6px; list-style: none; opacity: 0; transform: translateY(-8px) scale(0.97); transform-origin: top right; pointer-events: none; transition: opacity 0.2s ease, transform 0.24s cubic-bezier(0.16,1,0.3,1); } .dd-17__menu[aria-hidden="false"] { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; } .dd-17__item { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 8px; text-decoration: none; color: var(--text); font-size: 13.5px; font-weight: 500; transition: background 0.12s, color 0.12s; } .dd-17__item:hover, .dd-17__item:focus-visible { background: var(--hover); color: var(--brand); outline: none; } .dd-17__item--danger { color: var(--danger); } .dd-17__item--danger:hover, .dd-17__item--danger:focus-visible { background: #fef2f2; color: var(--danger); } .dd-17__sep { height: 1px; background: var(--border); margin: 4px 0; } .dd-17__a11y-note { font-size: 12px; color: var(--muted); font-style: italic; } @media (prefers-reduced-motion: reduce) { .dd-17__menu { transition: none; } } ``` **JS:** ```js (function() { const btn = document.getElementById('dd-17-btn'); const menu = document.getElementById('dd-17-menu'); if (!btn || !menu) return; const getItems = () => Array.from(menu.querySelectorAll('[role="menuitem"]')); function openMenu() { btn.setAttribute('aria-expanded', 'true'); menu.setAttribute('aria-hidden', 'false'); const items = getItems(); if (items.length) items[0].focus(); } function closeMenu(returnFocus) { btn.setAttribute('aria-expanded', 'false'); menu.setAttribute('aria-hidden', 'true'); if (returnFocus) btn.focus(); } function isOpen() { return btn.getAttribute('aria-expanded') === 'true'; } btn.addEventListener('click', function() { isOpen() ? closeMenu(false) : openMenu(); }); menu.addEventListener('keydown', function(e) { const items = getItems(); const idx = items.indexOf(document.activeElement); if (e.key === 'ArrowDown') { e.preventDefault(); items[(idx + 1) % items.length].focus(); } else if (e.key === 'ArrowUp') { e.preventDefault(); items[(idx - 1 + items.length) % items.length].focus(); } else if (e.key === 'Home') { e.preventDefault(); items[0].focus(); } else if (e.key === 'End') { e.preventDefault(); items[items.length - 1].focus(); } else if (e.key === 'Escape') { closeMenu(true); } else if (e.key === 'Tab') { closeMenu(false); } }); btn.addEventListener('keydown', function(e) { if ((e.key === 'Enter' || e.key === ' ') && !isOpen()) { e.preventDefault(); openMenu(); } else if (e.key === 'Escape' && isOpen()) { closeMenu(false); } }); document.addEventListener('mousedown', function(e) { if (!btn.contains(e.target) && !menu.contains(e.target)) { closeMenu(false); } }); })(); ``` ### 18. Stagger Blur Entrance Dropdown **Type:** CSS + JS **Description:** A JS-toggled dropdown where each menu item blurs in from a frosted state, with per-item transition delays applied programmatically for a cinematic cascade. **HTML:** ```html ``` **CSS:** ```css .dd-18, .dd-18 *, .dd-18 *::before, .dd-18 *::after { margin: 0; padding: 0; box-sizing: border-box; } .dd-18 ::selection { background: #7c3aed; color: #ede9fe; } .dd-18 { --brand: #7c3aed; --surface: #fff; --text: #18181b; --muted: #71717a; --border: #e4e4e7; --hover: #f5f3ff; font-family: 'Space Grotesk', sans-serif; min-height: 380px; display: flex; align-items: flex-start; justify-content: center; padding: 36px 20px; background: linear-gradient(135deg, #faf5ff 0%, #ede9fe 100%); } .dd-18__scene { width: 100%; max-width: 480px; position: relative; z-index: 100; } .dd-18__nav { display: flex; align-items: center; justify-content: space-between; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 12px 16px; box-shadow: 0 4px 20px rgba(124,58,237,.1); } .dd-18__brand { font-size: 18px; font-weight: 700; color: var(--brand); letter-spacing: -0.5px; } .dd-18__group { position: relative; } .dd-18__trigger { display: flex; align-items: center; gap: 8px; padding: 8px 18px; background: var(--brand); border: none; border-radius: 10px; cursor: pointer; font-family: inherit; font-size: 14px; font-weight: 600; color: #fff; transition: opacity 0.15s; } .dd-18__trigger:hover { opacity: 0.9; } .dd-18__trigger[aria-expanded="true"] { opacity: 0.85; } .dd-18__dot { width: 8px; height: 8px; border-radius: 50%; background: #a78bfa; transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1); } .dd-18__trigger[aria-expanded="true"] .dd-18__dot { transform: scale(1.5); background: #c4b5fd; } .dd-18__panel { position: absolute; top: calc(100% + 10px); right: 0; min-width: 200px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 12px 40px rgba(124,58,237,.18); padding: 8px; display: flex; flex-direction: column; gap: 2px; opacity: 0; pointer-events: none; transition: opacity 0.2s ease; } .dd-18__panel.is-open { opacity: 1; pointer-events: auto; } .dd-18__item { display: flex; align-items: center; gap: 10px; padding: 10px 13px; border-radius: 10px; text-decoration: none; color: var(--text); font-size: 13.5px; font-weight: 500; opacity: 0; filter: blur(6px); transform: translateY(6px); transition: opacity 0.3s ease, filter 0.3s ease, transform 0.3s ease, background 0.12s; } .dd-18__panel.is-open .dd-18__item { opacity: 1; filter: blur(0); transform: translateY(0); } .dd-18__item:hover { background: var(--hover); } .dd-18__item--em { color: var(--brand); font-weight: 700; } .dd-18__sep { height: 1px; background: var(--border); margin: 4px 0; } @media (prefers-reduced-motion: reduce) { .dd-18__item, .dd-18__panel { transition: none; filter: none; } .dd-18__panel.is-open .dd-18__item { opacity: 1; filter: none; transform: none; } } ``` **JS:** ```js (function() { var btn = document.getElementById('dd-18-btn'); var panel = document.getElementById('dd-18-panel'); if (!btn || !panel) return; var items = Array.from(panel.querySelectorAll('.dd-18__item')); items.forEach(function(el, i) { el.dataset.delay = i * 55; }); function openPanel() { panel.classList.add('is-open'); btn.setAttribute('aria-expanded', 'true'); items.forEach(function(el) { el.style.transitionDelay = el.dataset.delay + 'ms'; }); } function closePanel() { items.forEach(function(el) { el.style.transitionDelay = '0ms'; }); panel.classList.remove('is-open'); btn.setAttribute('aria-expanded', 'false'); } btn.addEventListener('click', function(e) { e.stopPropagation(); panel.classList.contains('is-open') ? closePanel() : openPanel(); }); document.addEventListener('click', function(e) { if (!panel.contains(e.target) && e.target !== btn) closePanel(); }); document.addEventListener('keydown', function(e) { if (e.key === 'Escape') closePanel(); }); })(); ``` ### 19. Command Palette Search Dropdown **Type:** CSS + JS **Description:** A Spotlight/Linear-style command palette that filters a list of commands in real time as you type, with keyboard navigation and highlighted match text. **HTML:** ```html
``` **CSS:** ```css .dd-19, .dd-19 *, .dd-19 *::before, .dd-19 *::after { margin: 0; padding: 0; box-sizing: border-box; } .dd-19 ::selection { background: #6366f1; color: #fff; } .dd-19 { --brand: #6366f1; --surface: #fff; --text: #111827; --muted: #6b7280; --border: #e5e7eb; --hover: #f5f3ff; font-family: 'Inter', sans-serif; min-height: 380px; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%); padding: 40px 20px; position: relative; } .dd-19__scene { display: flex; flex-direction: column; align-items: center; gap: 16px; width: 100%; max-width: 520px; position: relative; } .dd-19__open-btn { display: flex; align-items: center; gap: 8px; padding: 10px 18px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; cursor: pointer; font-family: inherit; font-size: 14px; font-weight: 500; color: var(--muted); box-shadow: 0 2px 8px rgba(0,0,0,.06); transition: box-shadow 0.15s, border-color 0.15s; } .dd-19__open-btn:hover { box-shadow: 0 4px 16px rgba(99,102,241,.15); border-color: #c7d2fe; color: var(--text); } .dd-19__kbd { background: #f3f4f6; border: 1px solid var(--border); border-radius: 5px; padding: 2px 6px; font-size: 11px; font-family: inherit; color: var(--muted); margin-left: 4px; } .dd-19__backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.35); backdrop-filter: blur(2px); z-index: 200; opacity: 0; pointer-events: none; transition: opacity 0.2s ease; } .dd-19__backdrop.is-open { opacity: 1; pointer-events: auto; } .dd-19__palette { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(0.95); width: min(520px, 90vw); background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: 0 24px 80px rgba(0,0,0,.25); z-index: 201; opacity: 0; pointer-events: none; transition: opacity 0.2s ease, transform 0.24s cubic-bezier(0.16, 1, 0.3, 1); overflow: hidden; } .dd-19__palette.is-open { opacity: 1; pointer-events: auto; transform: translate(-50%, -50%) scale(1); } .dd-19__search-row { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--border); } .dd-19__search-icon { font-size: 16px; color: var(--muted); flex-shrink: 0; } .dd-19__input { flex: 1; border: none; outline: none; font-family: inherit; font-size: 15px; font-weight: 500; color: var(--text); background: transparent; } .dd-19__input::placeholder { color: var(--muted); font-weight: 400; } .dd-19__esc-btn { background: #f3f4f6; border: 1px solid var(--border); border-radius: 6px; padding: 3px 8px; font-size: 11px; font-weight: 600; cursor: pointer; color: var(--muted); font-family: inherit; transition: background 0.12s; } .dd-19__esc-btn:hover { background: #e5e7eb; } .dd-19__list { list-style: none; max-height: 260px; overflow-y: auto; padding: 6px; } .dd-19__group-label { padding: 8px 12px 4px; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); } .dd-19__cmd { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 8px; cursor: pointer; transition: background 0.1s; } .dd-19__cmd:hover, .dd-19__cmd.is-focused { background: var(--hover); } .dd-19__ci { font-size: 15px; width: 20px; text-align: center; flex-shrink: 0; } .dd-19__ct { font-size: 14px; font-weight: 500; color: var(--text); flex: 1; } .dd-19__ct mark { background: #c7d2fe; color: var(--brand); border-radius: 2px; font-weight: 700; } .dd-19__footer { display: flex; gap: 16px; padding: 10px 16px; border-top: 1px solid var(--border); background: #fafafa; font-size: 11px; color: var(--muted); font-weight: 500; } @media (prefers-reduced-motion: reduce) { .dd-19__palette, .dd-19__backdrop { transition: none; } } ``` **JS:** ```js (function() { var openBtn = document.getElementById('dd-19-open'); var closeBtn = document.getElementById('dd-19-close'); var palette = document.getElementById('dd-19-palette'); var backdrop = document.getElementById('dd-19-backdrop'); var input = document.getElementById('dd-19-input'); var list = document.getElementById('dd-19-list'); if (!openBtn || !palette) return; function getCmds() { return Array.from(list.querySelectorAll('.dd-19__cmd')).filter(function(el) { return el.style.display !== 'none'; }); } function openPalette() { palette.classList.add('is-open'); backdrop.classList.add('is-open'); setTimeout(function() { input.focus(); }, 50); } function closePalette() { palette.classList.remove('is-open'); backdrop.classList.remove('is-open'); input.value = ''; filterCmds(''); } function filterCmds(query) { var q = query.toLowerCase().trim(); list.querySelectorAll('.dd-19__cmd').forEach(function(cmd) { var label = cmd.dataset.label || ''; var ct = cmd.querySelector('.dd-19__ct'); cmd.classList.remove('is-focused'); if (!q) { cmd.style.display = ''; if (ct) ct.textContent = label; return; } if (label.toLowerCase().includes(q)) { cmd.style.display = ''; if (ct) { var idx = label.toLowerCase().indexOf(q); ct.innerHTML = label.slice(0, idx) + '' + label.slice(idx, idx + q.length) + '' + label.slice(idx + q.length); } } else { cmd.style.display = 'none'; } }); var visible = getCmds(); if (visible.length) visible[0].classList.add('is-focused'); } openBtn.addEventListener('click', openPalette); closeBtn.addEventListener('click', closePalette); backdrop.addEventListener('click', closePalette); input.addEventListener('input', function() { filterCmds(input.value); }); document.addEventListener('keydown', function(e) { if (!palette.classList.contains('is-open')) return; var cmds = getCmds(); var focused = list.querySelector('.dd-19__cmd.is-focused'); var idx = focused ? cmds.indexOf(focused) : -1; if (e.key === 'Escape') { closePalette(); } else if (e.key === 'ArrowDown') { e.preventDefault(); if (cmds.length) { cmds.forEach(function(c) { c.classList.remove('is-focused'); }); cmds[(idx + 1) % cmds.length].classList.add('is-focused'); } } else if (e.key === 'ArrowUp') { e.preventDefault(); if (cmds.length) { cmds.forEach(function(c) { c.classList.remove('is-focused'); }); cmds[(idx - 1 + cmds.length) % cmds.length].classList.add('is-focused'); } } else if (e.key === 'Enter' && focused) { closePalette(); } }); })(); ``` ### 20. Autocomplete Suggestion Dropdown **Type:** CSS + JS **Description:** A live autocomplete input that filters a dataset and shows a suggestion dropdown as you type, with keyboard selection and highlighted match prefix. **HTML:** ```html

🌎 Where to?

Search for a destination

🔍

    Try: "Tok", "Par", "Bar"

    ``` **CSS:** ```css .dd-20, .dd-20 *, .dd-20 *::before, .dd-20 *::after { margin: 0; padding: 0; box-sizing: border-box; } .dd-20 ::selection { background: #0ea5e9; color: #fff; } .dd-20 { --brand: #0ea5e9; --surface: #fff; --text: #0f172a; --muted: #64748b; --border: #e2e8f0; --hover: #f0f9ff; font-family: 'DM Sans', sans-serif; min-height: 380px; display: flex; align-items: center; justify-content: center; background: linear-gradient(160deg, #f0f9ff 0%, #bae6fd 100%); padding: 40px 20px; } .dd-20__card { background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 28px 24px; width: 100%; max-width: 380px; box-shadow: 0 8px 40px rgba(14,165,233,.15); position: relative; } .dd-20__title { font-size: 20px; font-weight: 700; color: var(--text); margin-bottom: 4px; } .dd-20__sub { font-size: 13px; color: var(--muted); margin-bottom: 18px; } .dd-20__field { display: flex; align-items: center; gap: 8px; border: 2px solid var(--border); border-radius: 12px; padding: 10px 14px; transition: border-color 0.18s, box-shadow 0.18s; } .dd-20__field:focus-within { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(14,165,233,.12); } .dd-20__field-icon { font-size: 16px; color: var(--muted); flex-shrink: 0; } .dd-20__input { flex: 1; border: none; outline: none; font-family: inherit; font-size: 15px; font-weight: 500; color: var(--text); background: transparent; } .dd-20__input::placeholder { color: #94a3b8; font-weight: 400; } .dd-20__clear { background: none; border: none; font-size: 18px; color: var(--muted); cursor: pointer; line-height: 1; opacity: 0; transition: opacity 0.15s; } .dd-20__clear.is-visible { opacity: 1; } .dd-20__clear:hover { color: var(--text); } .dd-20__list { list-style: none; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; max-height: 0; opacity: 0; margin-top: 6px; box-shadow: 0 8px 24px rgba(0,0,0,.10); transition: max-height 0.3s ease, opacity 0.2s ease; } .dd-20__list.is-open { max-height: 280px; opacity: 1; overflow-y: auto; } .dd-20__list li { padding: 10px 16px; font-size: 14px; font-weight: 500; color: var(--text); cursor: pointer; display: flex; align-items: center; gap: 10px; transition: background 0.12s; } .dd-20__list li:hover, .dd-20__list li.is-active { background: var(--hover); color: var(--brand); } .dd-20__list li strong { color: var(--brand); font-weight: 700; } .dd-20__hint { margin-top: 12px; font-size: 12px; color: var(--muted); text-align: center; } @media (prefers-reduced-motion: reduce) { .dd-20__list, .dd-20__field { transition: none; } } ``` **JS:** ```js (function() { var data = [ 'Tokyo','Paris','Barcelona','Kyoto','Nairobi','Madrid', 'New York','Rio de Janeiro','Sydney','Rome','Oslo','Cairo', 'Toronto','Mexico City','Lisbon','Amsterdam','Doha','Shanghai', 'Dublin','Bergen','Porto','Nicosia','Singapore','Berlin' ]; var flags = ['🇮🇹','🇫🇷','🇧🇦','🇰🇾','🇰🇪','🇪🇸', '🇺🇸','🇧🇷','🇦🇺','🇮🇹','🇳🇴','🇪🇬', '🇨🇦','🇲🇽','🇵🇹','🇳🇱','🇶🇦','🇨🇳', '🇮🇪','🇳🇴','🇵🇹','🇨🇾','🇸🇬','🇩🇪']; var input = document.getElementById('dd-20-input'); var list = document.getElementById('dd-20-list'); var clearBtn = document.getElementById('dd-20-clear'); var hint = document.getElementById('dd-20-hint'); if (!input || !list) return; var activeIdx = -1; function getItems() { return Array.from(list.querySelectorAll('li[data-idx]')); } function render(query) { var q = query.trim().toLowerCase(); list.innerHTML = ''; activeIdx = -1; if (!q) { list.classList.remove('is-open'); hint && (hint.style.display = ''); clearBtn.classList.remove('is-visible'); return; } clearBtn.classList.add('is-visible'); if (hint) hint.style.display = 'none'; var matched = data.filter(function(d) { return d.toLowerCase().includes(q); }); if (!matched.length) { var li = document.createElement('li'); li.style.color = '#94a3b8'; li.style.cursor = 'default'; li.textContent = 'No destinations found'; list.appendChild(li); } else { matched.slice(0, 8).forEach(function(city) { var li = document.createElement('li'); var origIdx = data.indexOf(city); var flag = flags[origIdx] || '🌎'; var lc = city.toLowerCase(); var start = lc.indexOf(q); var highlighted = start > -1 ? city.slice(0, start) + '' + city.slice(start, start + q.length) + '' + city.slice(start + q.length) : city; li.innerHTML = '' + flag + '' + highlighted + ''; li.dataset.idx = origIdx; li.addEventListener('mousedown', function() { input.value = city; list.classList.remove('is-open'); clearBtn.classList.add('is-visible'); if (hint) hint.style.display = 'none'; }); list.appendChild(li); }); } list.classList.add('is-open'); } input.addEventListener('input', function() { render(input.value); }); input.addEventListener('keydown', function(e) { var items = getItems(); if (e.key === 'ArrowDown') { e.preventDefault(); activeIdx = (activeIdx + 1) % items.length; } else if (e.key === 'ArrowUp') { e.preventDefault(); activeIdx = (activeIdx - 1 + items.length) % items.length; } else if (e.key === 'Enter' && activeIdx > -1) { items[activeIdx].dispatchEvent(new Event('mousedown')); return; } else if (e.key === 'Escape') { list.classList.remove('is-open'); return; } items.forEach(function(li, i) { li.classList.toggle('is-active', i === activeIdx); }); }); clearBtn.addEventListener('click', function() { input.value = ''; render(''); input.focus(); }); document.addEventListener('click', function(e) { if (!e.target.closest('#dd-20-field') && !list.contains(e.target)) list.classList.remove('is-open'); }); })(); ``` ### 21. Tab Panel Dropdown **Type:** CSS + JS **Description:** A dropdown that contains a full tabbed interface inside it, letting users switch between content panels without leaving the nav. **HTML:** ```html ``` **CSS:** ```css .dd-21, .dd-21 *, .dd-21 *::before, .dd-21 *::after { margin: 0; padding: 0; box-sizing: border-box; } .dd-21 ::selection { background: #10b981; color: #fff; } .dd-21 { --brand: #10b981; --surface: #fff; --text: #064e3b; --muted: #6b7280; --border: #d1fae5; --hover: #ecfdf5; font-family: 'Plus Jakarta Sans', sans-serif; min-height: 380px; display: flex; align-items: flex-start; justify-content: center; padding: 32px 20px; background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%); } .dd-21__nav { display: flex; align-items: center; gap: 4px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 10px 10px 10px 20px; box-shadow: 0 4px 24px rgba(16,185,129,.12); position: relative; z-index: 100; width: 100%; max-width: 600px; } .dd-21__brand { font-size: 17px; font-weight: 700; color: var(--brand); margin-right: 12px; } .dd-21__items { display: flex; align-items: center; gap: 4px; } .dd-21__item { position: relative; } .dd-21__trigger { padding: 8px 14px; border: none; background: none; cursor: pointer; font-family: inherit; font-size: 14px; font-weight: 600; color: var(--text); border-radius: 8px; transition: background 0.15s; } .dd-21__trigger:hover { background: var(--hover); } .dd-21__trigger[aria-expanded="true"] { background: var(--hover); color: var(--brand); } .dd-21__plain { padding: 8px 14px; color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 500; border-radius: 8px; transition: background 0.15s, color 0.15s; } .dd-21__plain:hover { background: var(--hover); color: var(--text); } .dd-21__drop { position: absolute; top: calc(100% + 10px); left: 0; width: 260px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 12px 40px rgba(16,185,129,.14); overflow: hidden; opacity: 0; pointer-events: none; transform: translateY(-8px); transition: opacity 0.22s ease, transform 0.28s cubic-bezier(0.16, 1, 0.3, 1); } .dd-21__drop.is-open { opacity: 1; pointer-events: auto; transform: translateY(0); } .dd-21__tabs { display: flex; border-bottom: 1px solid var(--border); padding: 6px 6px 0; gap: 2px; } .dd-21__tab { flex: 1; padding: 8px 6px; border: none; border-radius: 8px 8px 0 0; background: transparent; cursor: pointer; font-family: inherit; font-size: 13px; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; transition: color 0.15s, background 0.15s; position: relative; bottom: -1px; } .dd-21__tab:hover { color: var(--text); background: #f0fdf4; } .dd-21__tab.is-active { color: var(--brand); border-bottom-color: var(--brand); background: #f0fdf4; } .dd-21__panels { padding: 6px; min-height: 140px; } .dd-21__panel { display: flex; flex-direction: column; gap: 2px; } .dd-21__panel.is-hidden { display: none; } @keyframes dd-21-fadein { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } } .dd-21__panel:not(.is-hidden) { animation: dd-21-fadein 0.22s ease; } .dd-21__plink { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 9px; text-decoration: none; color: var(--text); font-size: 13.5px; font-weight: 500; transition: background 0.12s; } .dd-21__plink:hover { background: var(--hover); color: var(--brand); } @media (prefers-reduced-motion: reduce) { .dd-21__drop, .dd-21__tab, .dd-21__panel { transition: none; animation: none; } } ``` **JS:** ```js (function() { var btn = document.getElementById('dd-21-btn'); var drop = document.getElementById('dd-21-drop'); if (!btn || !drop) return; var tabs = Array.from(drop.querySelectorAll('.dd-21__tab')); var panels = Array.from(drop.querySelectorAll('.dd-21__panel')); function activateTab(tab) { tabs.forEach(function(t) { t.classList.remove('is-active'); t.setAttribute('aria-selected', 'false'); }); panels.forEach(function(p) { p.classList.add('is-hidden'); }); tab.classList.add('is-active'); tab.setAttribute('aria-selected', 'true'); var target = document.getElementById(tab.dataset.panel); if (target) target.classList.remove('is-hidden'); } tabs.forEach(function(tab) { tab.addEventListener('click', function() { activateTab(tab); }); }); btn.addEventListener('click', function(e) { e.stopPropagation(); var open = drop.classList.toggle('is-open'); btn.setAttribute('aria-expanded', open ? 'true' : 'false'); }); document.addEventListener('click', function(e) { if (!drop.contains(e.target) && e.target !== btn) { drop.classList.remove('is-open'); btn.setAttribute('aria-expanded', 'false'); } }); document.addEventListener('keydown', function(e) { if (e.key === 'Escape') { drop.classList.remove('is-open'); btn.setAttribute('aria-expanded', 'false'); } }); })(); ``` ### 22. Custom Animated Select Dropdown **Type:** CSS + JS **Description:** A fully custom replacement for the native HTML select element, with animated option reveal, keyboard support, and a value display that updates on selection. **HTML:** ```html

    Choose your plan

    Select the option that fits your needs

    • 🆕 Free $0/month
    • 🚀 Pro $12/month
    • 👥 Team $39/month

    No plan selected

    ``` **CSS:** ```css .dd-22, .dd-22 *, .dd-22 *::before, .dd-22 *::after { margin: 0; padding: 0; box-sizing: border-box; } .dd-22 ::selection { background: #f59e0b; color: #fff; } .dd-22 { --brand: #f59e0b; --brand-dark: #d97706; --surface: #fff; --text: #1c1917; --muted: #78716c; --border: #e7e5e4; --hover: #fffbeb; --selected: #fef3c7; font-family: 'Inter', sans-serif; min-height: 400px; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 60%, #fde68a 100%); padding: 40px 20px; } .dd-22__card { background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 28px 24px; width: 100%; max-width: 360px; box-shadow: 0 8px 40px rgba(245,158,11,.15); display: flex; flex-direction: column; gap: 12px; position: relative; } .dd-22__title { font-size: 20px; font-weight: 700; color: var(--text); letter-spacing: -0.3px; } .dd-22__sub { font-size: 13px; color: var(--muted); margin-top: -8px; } /* custom select wrapper */ .dd-22__select { position: relative; z-index: 100; } .dd-22__btn { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 16px; background: var(--surface); border: 2px solid var(--border); border-radius: 12px; cursor: pointer; font-family: inherit; font-size: 14.5px; font-weight: 500; color: var(--muted); text-align: left; transition: border-color 0.18s, box-shadow 0.18s; } .dd-22__btn:hover { border-color: var(--brand); } .dd-22__btn[aria-expanded="true"] { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(245,158,11,.14); color: var(--text); } .dd-22__btn.has-value { color: var(--text); font-weight: 600; } .dd-22__chevron { font-size: 14px; color: var(--muted); display: inline-block; transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1); flex-shrink: 0; } .dd-22__btn[aria-expanded="true"] .dd-22__chevron { transform: rotate(180deg); } /* option list */ .dd-22__list { position: absolute; top: calc(100% + 8px); left: 0; right: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 12px 40px rgba(245,158,11,.18), 0 2px 8px rgba(0,0,0,.06); list-style: none; padding: 6px; transform: scaleY(0); transform-origin: top center; opacity: 0; pointer-events: none; transition: transform 0.38s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.2s ease; } .dd-22__list.is-open { transform: scaleY(1); opacity: 1; pointer-events: auto; } /* stagger options */ .dd-22__opt { display: flex; align-items: center; justify-content: space-between; padding: 11px 14px; border-radius: 9px; cursor: pointer; opacity: 0; transform: translateY(4px); transition: opacity 0.28s ease, transform 0.28s ease, background 0.12s; } .dd-22__list.is-open .dd-22__opt { opacity: 1; transform: translateY(0); } .dd-22__list.is-open .dd-22__opt:nth-child(1) { transition-delay: 0.04s; } .dd-22__list.is-open .dd-22__opt:nth-child(2) { transition-delay: 0.09s; } .dd-22__list.is-open .dd-22__opt:nth-child(3) { transition-delay: 0.14s; } .dd-22__list.is-open .dd-22__opt:nth-child(4) { transition-delay: 0.19s; } .dd-22__opt:hover { background: var(--hover); } .dd-22__opt.is-selected { background: var(--selected); } .dd-22__opt.is-highlighted { background: var(--hover); outline: 2px solid var(--brand); outline-offset: -2px; } .dd-22__opt--featured { border: 1px dashed var(--brand); margin-top: 4px; } .dd-22__opt--featured:hover { background: var(--selected); } .dd-22__opt-name { font-size: 14px; font-weight: 600; color: var(--text); display: flex; align-items: center; gap: 8px; } .dd-22__opt-price { font-size: 12.5px; font-weight: 500; color: var(--muted); } /* selected tick */ .dd-22__opt.is-selected .dd-22__opt-name::after { content: '✓'; color: var(--brand); font-size: 13px; font-weight: 700; } /* submit button */ .dd-22__submit { width: 100%; padding: 12px; background: var(--brand); color: #fff; border: none; border-radius: 12px; font-family: inherit; font-size: 15px; font-weight: 700; cursor: pointer; transition: background 0.15s, transform 0.15s; margin-top: 4px; } .dd-22__submit:hover { background: var(--brand-dark); transform: translateY(-1px); } .dd-22__submit:active { transform: translateY(0); } .dd-22__status { text-align: center; font-size: 12.5px; color: var(--muted); font-style: italic; min-height: 18px; } @media (prefers-reduced-motion: reduce) { .dd-22__list, .dd-22__opt, .dd-22__chevron, .dd-22__submit { transition: none; } } ``` **JS:** ```js (function() { const btn = document.getElementById('dd-22-btn'); const list = document.getElementById('dd-22-list'); const valSpan = document.getElementById('dd-22-val'); const native = document.getElementById('dd-22-native'); const submitBtn = document.getElementById('dd-22-submit'); const status = document.getElementById('dd-22-status'); if (!btn || !list || !native) return; const opts = Array.from(list.querySelectorAll('.dd-22__opt')); let activeIdx = -1; /* ── open / close ── */ function openList() { list.classList.add('is-open'); btn.setAttribute('aria-expanded', 'true'); // highlight currently selected const selIdx = opts.findIndex(function(o) { return o.classList.contains('is-selected'); }); setHighlight(selIdx > -1 ? selIdx : 0); } function closeList() { list.classList.remove('is-open'); btn.setAttribute('aria-expanded', 'false'); activeIdx = -1; opts.forEach(function(o) { o.classList.remove('is-highlighted'); }); } function isOpen() { return list.classList.contains('is-open'); } /* ── highlight (keyboard focus) ── */ function setHighlight(idx) { opts.forEach(function(o) { o.classList.remove('is-highlighted'); }); if (idx < 0 || idx >= opts.length) return; opts[idx].classList.add('is-highlighted'); opts[idx].scrollIntoView({ block: 'nearest' }); activeIdx = idx; } /* ── select option ── */ function selectOpt(opt) { opts.forEach(function(o) { o.classList.remove('is-selected'); o.setAttribute('aria-selected', 'false'); }); opt.classList.add('is-selected'); opt.setAttribute('aria-selected', 'true'); const value = opt.dataset.value; const name = opt.querySelector('.dd-22__opt-name').textContent.trim(); const price = opt.querySelector('.dd-22__opt-price').textContent.trim(); valSpan.textContent = name + ' — ' + price; btn.classList.add('has-value'); native.value = value; native.dispatchEvent(new Event('change', { bubbles: true })); status.textContent = 'Selected: ' + name + ' (' + price + ')'; closeList(); btn.focus(); } /* ── events ── */ btn.addEventListener('click', function(e) { e.stopPropagation(); isOpen() ? closeList() : openList(); }); opts.forEach(function(opt, i) { opt.addEventListener('click', function() { selectOpt(opt); }); opt.addEventListener('mousemove', function() { setHighlight(i); }); }); btn.addEventListener('keydown', function(e) { if (e.key === 'ArrowDown' || e.key === 'Enter' || e.key === ' ') { e.preventDefault(); if (!isOpen()) openList(); } }); list.addEventListener('keydown', function(e) { if (e.key === 'ArrowDown') { e.preventDefault(); setHighlight((activeIdx + 1) % opts.length); } else if (e.key === 'ArrowUp') { e.preventDefault(); setHighlight((activeIdx - 1 + opts.length) % opts.length); } else if (e.key === 'Enter' || e.key === ' ') { e.preventDefault(); if (activeIdx > -1) selectOpt(opts[activeIdx]); } else if (e.key === 'Escape' || e.key === 'Tab') { closeList(); btn.focus(); } }); // make list focusable for keyboard relay list.setAttribute('tabindex', '-1'); btn.addEventListener('keydown', function(e) { if (isOpen() && (e.key === 'ArrowDown' || e.key === 'ArrowUp')) { e.preventDefault(); list.focus(); setHighlight(e.key === 'ArrowDown' ? 0 : opts.length - 1); } }); document.addEventListener('click', function(e) { if (!btn.contains(e.target) && !list.contains(e.target)) closeList(); }); document.addEventListener('keydown', function(e) { if (e.key === 'Escape' && isOpen()) { closeList(); btn.focus(); } }); submitBtn && submitBtn.addEventListener('click', function() { if (!native.value) { status.textContent = '⚠ Please select a plan first.'; btn.style.borderColor = '#ef4444'; setTimeout(function() { btn.style.borderColor = ''; }, 1500); } else { status.textContent = '✓ Proceeding with ' + valSpan.textContent; } }); })(); ``` --- ## 16 CSS Fade In Animation Designs URL: https://codefronts.com/motion/css-fade-in-animation/ Description: 16 hand-coded CSS fade-in animations with live demos — pure-opacity hero fade with staggered delays, clip-path inset reveal, blur defocus, staggered grid cascade, scroll-triggered IntersectionObserver reveal, directional slide-fade up, scale-up zoom-in, scale-down zoom-in, rotateX perspective tilt, word-by-word split, skew sweep, radial clip-path mask reveal, greyscale-to-color saturate, rotateY flip card, glitch flash multi-step, and cascade letter drop. 13 pure CSS + 3 with a tiny vanilla JS snippet — no framework. animation-fill-mode forwards, prefers-reduced-motion honoured, MIT licensed. Demo count: 16 ### 01. Pure Opacity Hero Fade **Type:** Pure CSS **Description:** A layered hero section where eyebrow, heading, paragraph, CTA buttons, and indicator dots each fade in sequentially using staggered animation-delay on a single opacity keyframe. **HTML:** ```html
    Design System v3.0

    Build Beautiful
    Interfaces Fast

    A production-ready design system with 200+ components, dark mode, and accessibility built in.

    ``` **CSS:** ```css .fi-01{ --bg:#0a0a12;--accent:#6c63ff;--text:#f0eeff;--sub:#9d97c8; --dur:1.2s;--ease:cubic-bezier(.16,1,.3,1); font-family:'DM Sans',sans-serif; min-height:320px;border-radius:20px; display:flex;align-items:center;justify-content:center; padding:40px;overflow:hidden;position:relative; } .fi-01::before{ content:'';position:absolute;inset:0; background:radial-gradient(ellipse 60% 50% at 50% 0%,rgba(108,99,255,.18),transparent); pointer-events:none; } .fi-01 *,.fi-01 *::before,.fi-01 *::after{box-sizing:border-box;margin:0;padding:0} .fi-01 ::selection{background:var(--accent);color:#fff} .fi-01__inner{text-align:center;position:relative;z-index:1} .fi-01__eyebrow{ font-size:.75rem;font-weight:500;letter-spacing:.2em;text-transform:uppercase; color:var(--accent);margin-bottom:20px; opacity:0;animation:fi-01-fade var(--dur) var(--ease) .1s forwards; } .fi-01__heading{ font-family:'Syne',sans-serif;font-size:clamp(2rem,5vw,3.2rem);font-weight:800; color:var(--text);line-height:1.1;margin-bottom:16px; opacity:0;animation:fi-01-fade var(--dur) var(--ease) .35s forwards; } .fi-01__heading span{ background:linear-gradient(135deg,#6c63ff,#a78bfa); -webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text; } .fi-01__sub{ font-size:1rem;color:var(--sub);line-height:1.6;max-width:440px;margin:0 auto 28px; opacity:0;animation:fi-01-fade var(--dur) var(--ease) .55s forwards; } .fi-01__cta{ display:inline-flex;gap:12px;align-items:center; opacity:0;animation:fi-01-fade var(--dur) var(--ease) .75s forwards; } .fi-01__btn{ padding:12px 28px;border-radius:10px;font-size:.95rem;font-weight:500;cursor:pointer; border:none;transition:transform .2s,box-shadow .2s; } .fi-01__btn:hover{transform:translateY(-2px)} .fi-01__btn--primary{ background:var(--accent);color:#fff; box-shadow:0 8px 24px rgba(108,99,255,.35); } .fi-01__btn--primary:hover{box-shadow:0 12px 32px rgba(108,99,255,.5)} .fi-01__btn--ghost{ background:rgba(108,99,255,.1);color:var(--text); border:1px solid rgba(108,99,255,.3); } .fi-01__dots{ display:flex;gap:8px;justify-content:center;margin-top:24px; opacity:0;animation:fi-01-fade var(--dur) var(--ease) .95s forwards; } .fi-01__dot{width:6px;height:6px;border-radius:50%;background:var(--accent);opacity:.3} .fi-01__dot:nth-child(2){opacity:.6} .fi-01__dot:nth-child(3){opacity:1} @keyframes fi-01-fade{from{opacity:0}to{opacity:1}} @media(prefers-reduced-motion:reduce){ .fi-01 *{animation:none!important;opacity:1!important} } ``` ### 02. Clip-Path Inset Reveal **Type:** Pure CSS **Description:** A cyberpunk status panel that sweeps into view from left using clip-path: inset(0 100% 0 0 round 16px) animated to inset(0 0% 0 0), revealing content like a shutter opening. **HTML:** ```html
    System Status
    Neural Core
    Online

    All subsystems operational. Processing at peak efficiency with zero latency degradation.

    99.9%Uptime
    0.4msLatency
    4.2TBProcessed
    ``` **CSS:** ```css .fi-02{ --bg:#06060f;--neon:#00ffe0;--neon2:#ff006e;--text:#e0fff9; font-family:'Inter',sans-serif; min-height:320px;border-radius:20px; display:grid;place-items:center; padding:40px;overflow:hidden;position:relative; } .fi-02 *,.fi-02 *::before,.fi-02 *::after{box-sizing:border-box;margin:0;padding:0} .fi-02 ::selection{background:var(--neon);color:#000} /* clip-path reveal: inset(0 100% 0 0) → inset(0 0% 0 0) */ .fi-02__panel{ background:linear-gradient(135deg,rgba(0,255,224,.06),rgba(255,0,110,.06)); border:1px solid rgba(0,255,224,.2); border-radius:16px;padding:32px 40px; text-align:center;max-width:500px; clip-path:inset(0 100% 0 0 round 16px); animation:fi-02-clip-reveal .9s cubic-bezier(.77,0,.18,1) .2s forwards; } .fi-02__label{ font-size:.7rem;letter-spacing:.25em;text-transform:uppercase; color:var(--neon);margin-bottom:16px;display:block; } .fi-02__title{ font-family:'Orbitron',monospace;font-size:clamp(1.6rem,4vw,2.4rem); font-weight:900;color:var(--text);margin-bottom:12px; text-shadow:0 0 20px rgba(0,255,224,.4); } .fi-02__bar{ height:3px;background:linear-gradient(90deg,var(--neon),var(--neon2)); border-radius:2px;margin:16px 0; } .fi-02__desc{font-size:.9rem;color:rgba(224,255,249,.6);line-height:1.6} .fi-02__stats{ display:flex;gap:24px;justify-content:center;margin-top:24px; } .fi-02__stat span{display:block;font-family:'Orbitron',monospace;font-size:1.4rem;font-weight:700;color:var(--neon)} .fi-02__stat small{font-size:.7rem;color:rgba(224,255,249,.5);text-transform:uppercase;letter-spacing:.1em} @keyframes fi-02-clip-reveal{ to{clip-path:inset(0 0% 0 0 round 16px)} } @media(prefers-reduced-motion:reduce){ .fi-02 *{animation:none!important;clip-path:none!important} } ``` ### 03. Blur Defocus Fade **Type:** Pure CSS **Description:** A feature card that emerges from a dreamlike haze using filter: blur(20px) combined with opacity: 0, animating to sharp focus — the cinematographic rack-focus in pure CSS. **HTML:** ```html

    Blur-to-Focus Reveal

    Elements emerge from a dreamlike haze into sharp clarity using CSS filter: blur() combined with opacity — the cinematographic focus pull, in pure CSS.

    filter: blur() opacity fade Pure CSS
    ``` **CSS:** ```css .fi-03{ --bg:#0d0f1a;--purple:#a855f7;--pink:#ec4899;--text:#f8f0ff; font-family:'Plus Jakarta Sans',sans-serif; min-height:320px;border-radius:20px; display:grid;place-items:center; padding:40px;overflow:hidden; } .fi-03 *,.fi-03 *::before,.fi-03 *::after{box-sizing:border-box;margin:0;padding:0} .fi-03 ::selection{background:var(--purple);color:#fff} /* blur fade: filter:blur(20px) opacity:0 → blur(0) opacity:1 */ .fi-03__card{ background:linear-gradient(135deg,rgba(168,85,247,.1),rgba(236,72,153,.08)); border:1px solid rgba(168,85,247,.25);border-radius:20px; padding:36px;max-width:480px;text-align:center; opacity:0;filter:blur(20px); animation:fi-03-blur-in 1s cubic-bezier(.4,0,.2,1) .15s forwards; } .fi-03__icon{ width:64px;height:64px;border-radius:18px; background:linear-gradient(135deg,var(--purple),var(--pink)); display:grid;place-items:center;font-size:1.8rem; margin:0 auto 20px; box-shadow:0 8px 32px rgba(168,85,247,.4); } .fi-03__title{ font-size:clamp(1.4rem,3vw,2rem);font-weight:800;color:var(--text); margin-bottom:10px; } .fi-03__sub{ font-size:.9rem;color:rgba(248,240,255,.55);line-height:1.6;margin-bottom:24px; } .fi-03__tags{display:flex;gap:8px;flex-wrap:wrap;justify-content:center} .fi-03__tag{ padding:5px 14px;border-radius:20px;font-size:.75rem;font-weight:700; background:rgba(168,85,247,.15);color:var(--purple); border:1px solid rgba(168,85,247,.2); } .fi-03__tag:nth-child(2){background:rgba(236,72,153,.15);color:var(--pink);border-color:rgba(236,72,153,.2)} .fi-03__tag:nth-child(3){background:rgba(168,85,247,.1);color:rgba(248,240,255,.7);border-color:rgba(255,255,255,.1)} @keyframes fi-03-blur-in{ to{opacity:1;filter:blur(0)} } @media(prefers-reduced-motion:reduce){ .fi-03__card{animation:none;opacity:1;filter:none} } ``` ### 04. Staggered Grid Card Fade **Type:** Pure CSS **Description:** A dashboard metrics grid where six stat cards stagger into view with nth-child animation-delay offsets, each sliding up from translateY(16px) to its resting position. **HTML:** ```html
    Dashboard Metrics
    $84K
    Revenue
    12.4K
    Users
    91%
    Uptime
    3.2s
    Avg Load
    73%
    Retention
    4.2★
    Rating
    ``` **CSS:** ```css .fi-04{ --bg:#0c0e16;--c1:#f97316;--c2:#ef4444;--c3:#a855f7;--c4:#3b82f6; --c5:#10b981;--c6:#f59e0b;--text:#f5f5f0; font-family:'DM Sans',sans-serif; min-height:340px;border-radius:20px; padding:32px;overflow:hidden; } .fi-04 *,.fi-04 *::before,.fi-04 *::after{box-sizing:border-box;margin:0;padding:0} .fi-04 ::selection{background:#f97316;color:#000} .fi-04__label{ font-family:'Syne',sans-serif;font-size:.75rem;font-weight:600; letter-spacing:.2em;text-transform:uppercase;color:rgba(245,245,240,.4); margin-bottom:20px; } .fi-04__grid{ display:grid; grid-template-columns:repeat(auto-fill,minmax(130px,1fr)); gap:14px; } .fi-04__card{ border-radius:14px;padding:20px 16px; opacity:0;transform:translateY(16px); animation:fi-04-stagger .6s cubic-bezier(.16,1,.3,1) forwards; } .fi-04__card:nth-child(1){--delay:.05s;background:linear-gradient(135deg,rgba(249,115,22,.15),rgba(239,68,68,.08));border:1px solid rgba(249,115,22,.25)} .fi-04__card:nth-child(2){--delay:.12s;background:linear-gradient(135deg,rgba(168,85,247,.15),rgba(99,102,241,.08));border:1px solid rgba(168,85,247,.25)} .fi-04__card:nth-child(3){--delay:.19s;background:linear-gradient(135deg,rgba(59,130,246,.15),rgba(6,182,212,.08));border:1px solid rgba(59,130,246,.25)} .fi-04__card:nth-child(4){--delay:.26s;background:linear-gradient(135deg,rgba(16,185,129,.15),rgba(5,150,105,.08));border:1px solid rgba(16,185,129,.25)} .fi-04__card:nth-child(5){--delay:.33s;background:linear-gradient(135deg,rgba(245,158,11,.15),rgba(234,179,8,.08));border:1px solid rgba(245,158,11,.25)} .fi-04__card:nth-child(6){--delay:.40s;background:linear-gradient(135deg,rgba(239,68,68,.15),rgba(236,72,153,.08));border:1px solid rgba(239,68,68,.25)} .fi-04__card{animation-delay:var(--delay)} .fi-04__num{ font-family:'Syne',sans-serif;font-size:1.6rem;font-weight:800; line-height:1;margin-bottom:4px; } .fi-04__card:nth-child(1) .fi-04__num{color:var(--c1)} .fi-04__card:nth-child(2) .fi-04__num{color:var(--c3)} .fi-04__card:nth-child(3) .fi-04__num{color:var(--c4)} .fi-04__card:nth-child(4) .fi-04__num{color:var(--c5)} .fi-04__card:nth-child(5) .fi-04__num{color:var(--c6)} .fi-04__card:nth-child(6) .fi-04__num{color:var(--c2)} .fi-04__metric{font-size:.72rem;color:rgba(245,245,240,.5);letter-spacing:.05em;text-transform:uppercase;margin-bottom:12px} .fi-04__bar-bg{height:4px;background:rgba(255,255,255,.07);border-radius:2px} .fi-04__bar{height:4px;border-radius:2px;transition:width .6s cubic-bezier(.16,1,.3,1)} .fi-04__card:nth-child(1) .fi-04__bar{background:var(--c1);width:84%} .fi-04__card:nth-child(2) .fi-04__bar{background:var(--c3);width:67%} .fi-04__card:nth-child(3) .fi-04__bar{background:var(--c4);width:91%} .fi-04__card:nth-child(4) .fi-04__bar{background:var(--c5);width:55%} .fi-04__card:nth-child(5) .fi-04__bar{background:var(--c6);width:73%} .fi-04__card:nth-child(6) .fi-04__bar{background:var(--c2);width:42%} @keyframes fi-04-stagger{to{opacity:1;transform:translateY(0)}} @media(prefers-reduced-motion:reduce){ .fi-04 *{animation:none!important;opacity:1!important;transform:none!important} } ``` ### 05. Scroll-Triggered Observer Fade **Type:** CSS + JS **Description:** An activity feed list where items observe viewport entry via IntersectionObserver and acquire a .fi-05--visible class, triggering CSS transitions to slide and fade in staggered. **HTML:** ```html
    Activity Feed
    Deployment successful
    production · 2 min ago
    Live
    Pull request merged
    feature/auth · 14 min ago
    Done
    Build failed on main
    CI pipeline · 1 hr ago
    Error
    New user signup spike
    analytics · 3 hr ago
    Alert
    Database backup complete
    storage · 6 hr ago
    Done
    ``` **CSS:** ```css .fi-05{ --bg:#0b1120;--sky:#38bdf8;--emerald:#34d399;--rose:#fb7185;--text:#f0f9ff; font-family:'Inter',sans-serif; min-height:360px;border-radius:20px; padding:32px;overflow:hidden; } .fi-05 *,.fi-05 *::before,.fi-05 *::after{box-sizing:border-box;margin:0;padding:0} .fi-05 ::selection{background:var(--sky);color:#000} .fi-05__title{ font-size:.75rem;font-weight:600;letter-spacing:.15em;text-transform:uppercase; color:rgba(240,249,255,.35);margin-bottom:24px; } .fi-05__items{display:flex;flex-direction:column;gap:14px} /* Items start hidden; JS adds .fi-05--visible via IntersectionObserver */ .fi-05__item{ display:flex;gap:16px;align-items:center; background:rgba(255,255,255,.03);border:1px solid rgba(255,255,255,.07); border-radius:12px;padding:16px 20px; opacity:0;transform:translateX(-24px); transition:opacity .6s cubic-bezier(.16,1,.3,1),transform .6s cubic-bezier(.16,1,.3,1); } .fi-05__item.fi-05--visible{opacity:1;transform:translateX(0)} .fi-05__item:hover{background:rgba(255,255,255,.06);border-color:rgba(56,189,248,.2)} .fi-05__dot{width:10px;height:10px;border-radius:50%;flex-shrink:0} .fi-05__item:nth-child(1) .fi-05__dot{background:var(--sky);box-shadow:0 0 8px rgba(56,189,248,.5)} .fi-05__item:nth-child(2) .fi-05__dot{background:var(--emerald);box-shadow:0 0 8px rgba(52,211,153,.5)} .fi-05__item:nth-child(3) .fi-05__dot{background:var(--rose);box-shadow:0 0 8px rgba(251,113,133,.5)} .fi-05__item:nth-child(4) .fi-05__dot{background:var(--sky);box-shadow:0 0 8px rgba(56,189,248,.5)} .fi-05__item:nth-child(5) .fi-05__dot{background:var(--emerald);box-shadow:0 0 8px rgba(52,211,153,.5)} .fi-05__body{flex:1} .fi-05__name{font-size:.9rem;font-weight:600;color:var(--text);margin-bottom:3px} .fi-05__meta{font-size:.75rem;color:rgba(240,249,255,.4)} .fi-05__badge{ font-size:.68rem;font-weight:700;padding:3px 10px;border-radius:8px; } .fi-05__item:nth-child(1) .fi-05__badge{background:rgba(56,189,248,.15);color:var(--sky)} .fi-05__item:nth-child(2) .fi-05__badge{background:rgba(52,211,153,.15);color:var(--emerald)} .fi-05__item:nth-child(3) .fi-05__badge{background:rgba(251,113,133,.15);color:var(--rose)} .fi-05__item:nth-child(4) .fi-05__badge{background:rgba(56,189,248,.15);color:var(--sky)} .fi-05__item:nth-child(5) .fi-05__badge{background:rgba(52,211,153,.15);color:var(--emerald)} @media(prefers-reduced-motion:reduce){ .fi-05__item{transition:none;opacity:1;transform:none} } ``` **JS:** ```js (function(){ const items = document.querySelectorAll('#fi-05-root .fi-05__item'); const obs = new IntersectionObserver((entries)=>{ entries.forEach(e=>{ if(e.isIntersecting){ const el = e.target; const idx = [...items].indexOf(el); setTimeout(()=>el.classList.add('fi-05--visible'), idx * 100); obs.unobserve(el); } }); },{threshold:0.2}); items.forEach(el=>obs.observe(el)); })(); ``` ### 06. Directional Slide-Fade Up **Type:** Pure CSS **Description:** A two-column feature section where the text block slides up from below while card items follow with sequential translateY(30px → 0) + opacity delays for a rising-content effect. **HTML:** ```html
    Premium Features

    Everything you need to ship faster

    Components slide into view from below as the page loads, creating a sense of content rising to meet the reader — directional fade with translateY.

    Explore features →
    Lightning Build
    Zero-config bundling
    🎨
    Design Tokens
    CSS custom properties
    🔒
    Auth Built-in
    JWT + OAuth 2.0
    ``` **CSS:** ```css .fi-06{ --bg:#0e0a1a;--violet:#7c3aed;--indigo:#4f46e5;--text:#ede9fe; font-family:'DM Sans',sans-serif; min-height:340px;border-radius:20px; padding:40px;overflow:hidden; display:grid;grid-template-columns:1fr 1fr;gap:20px;align-items:center; } .fi-06 *,.fi-06 *::before,.fi-06 *::after{box-sizing:border-box;margin:0;padding:0} .fi-06 ::selection{background:var(--violet);color:#fff} /* slide-fade from below: translateY(40px) opacity:0 → Y(0) opacity:1 */ .fi-06__left{ opacity:0;transform:translateY(40px); animation:fi-06-up .8s cubic-bezier(.16,1,.3,1) .1s forwards; } .fi-06__eyebrow{ font-size:.7rem;font-weight:500;letter-spacing:.2em;text-transform:uppercase; color:var(--violet);margin-bottom:14px; } .fi-06__heading{ font-family:'Syne',sans-serif;font-size:clamp(1.6rem,3vw,2.4rem); font-weight:800;color:var(--text);line-height:1.15;margin-bottom:14px; } .fi-06__body{font-size:.9rem;color:rgba(237,233,254,.5);line-height:1.7;margin-bottom:20px} .fi-06__link{ display:inline-flex;align-items:center;gap:8px; font-size:.85rem;font-weight:600;color:var(--violet); text-decoration:none;border-bottom:1px solid rgba(124,58,237,.3); padding-bottom:2px;transition:border-color .2s; } .fi-06__link:hover{border-color:var(--violet)} .fi-06__right{display:flex;flex-direction:column;gap:12px} .fi-06__card{ background:linear-gradient(135deg,rgba(124,58,237,.1),rgba(79,70,229,.06)); border:1px solid rgba(124,58,237,.2);border-radius:12px;padding:16px 20px; display:flex;gap:14px;align-items:center; opacity:0;transform:translateY(30px); } .fi-06__card:nth-child(1){animation:fi-06-up .7s cubic-bezier(.16,1,.3,1) .3s forwards} .fi-06__card:nth-child(2){animation:fi-06-up .7s cubic-bezier(.16,1,.3,1) .45s forwards} .fi-06__card:nth-child(3){animation:fi-06-up .7s cubic-bezier(.16,1,.3,1) .6s forwards} .fi-06__icon{ width:40px;height:40px;border-radius:10px; background:rgba(124,58,237,.2); display:grid;place-items:center;font-size:1.1rem;flex-shrink:0; } .fi-06__cname{font-size:.88rem;font-weight:700;color:var(--text);margin-bottom:2px} .fi-06__cmeta{font-size:.72rem;color:rgba(237,233,254,.4)} @keyframes fi-06-up{to{opacity:1;transform:translateY(0)}} @media(prefers-reduced-motion:reduce){ .fi-06 *{animation:none!important;opacity:1!important;transform:none!important} } ``` ### 07. Scale-Up Zoom In Fade **Type:** Pure CSS **Description:** Four metric stat cards pop into view from scale(0.5) using a spring cubic-bezier(.34,1.56,.64,1) overshoot curve — a satisfying organic scale-up growth entrance. **HTML:** ```html
    2.4B
    Requests
    99.9
    Uptime %
    0.4ms
    Latency
    140+
    Countries
    ``` **CSS:** ```css .fi-07{ --bg:#060d0d;--teal:#2dd4bf;--cyan:#06b6d4;--text:#f0fdfa; font-family:'Inter',sans-serif; min-height:340px;border-radius:20px; display:flex;align-items:center;justify-content:center;gap:24px;flex-wrap:wrap; padding:40px;overflow:hidden; } .fi-07 *,.fi-07 *::before,.fi-07 *::after{box-sizing:border-box;margin:0;padding:0} .fi-07 ::selection{background:var(--teal);color:#000} /* scale-up fade: scale(.5) opacity:0 → scale(1) opacity:1 */ .fi-07__card{ width:140px;border-radius:16px;padding:24px 16px;text-align:center; opacity:0;transform:scale(.5); animation:fi-07-zoom-in .6s cubic-bezier(.34,1.56,.64,1) forwards; } .fi-07__card:nth-child(1){--d:.05s;background:linear-gradient(135deg,rgba(45,212,191,.15),rgba(6,182,212,.08));border:1px solid rgba(45,212,191,.3)} .fi-07__card:nth-child(2){--d:.18s;background:linear-gradient(135deg,rgba(6,182,212,.15),rgba(59,130,246,.08));border:1px solid rgba(6,182,212,.3)} .fi-07__card:nth-child(3){--d:.31s;background:linear-gradient(135deg,rgba(45,212,191,.12),rgba(52,211,153,.08));border:1px solid rgba(45,212,191,.25)} .fi-07__card:nth-child(4){--d:.44s;background:linear-gradient(135deg,rgba(6,182,212,.12),rgba(14,165,233,.08));border:1px solid rgba(6,182,212,.25)} .fi-07__card{animation-delay:var(--d)} .fi-07__card:hover{transform:scale(1.04)!important;transition:transform .2s} .fi-07__num{ font-family:'Orbitron',monospace; font-size:2rem;font-weight:900; background:linear-gradient(135deg,var(--teal),var(--cyan)); -webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text; line-height:1;margin-bottom:6px; } .fi-07__label{font-size:.68rem;font-weight:500;letter-spacing:.1em;text-transform:uppercase;color:rgba(240,253,250,.45);margin-bottom:12px} .fi-07__ring{ width:40px;height:40px;border-radius:50%; border:3px solid rgba(45,212,191,.15); border-top-color:var(--teal); margin:0 auto; } @keyframes fi-07-zoom-in{to{opacity:1;transform:scale(1)}} @media(prefers-reduced-motion:reduce){ .fi-07 *{animation:none!important;opacity:1!important;transform:scale(1)!important} } ``` ### 08. Scale-Down Zoom In Fade **Type:** Pure CSS **Description:** A premium hero that fades in from scale(1.4), shrinking to normal — a dramatic 'punch out' cinematic entrance where content arrives oversized then settles into place. **HTML:** ```html
    👑

    Scale-Down
    Entrance

    Content arrives oversized and shrinks to fit — a cinematic "punch out" effect using scale(1.4) → scale(1) with opacity.

    Premium
    Exclusive
    Gold Tier
    ``` **CSS:** ```css .fi-08{ --bg:#100c1e;--gold:#f59e0b;--amber:#d97706;--text:#fffbeb; font-family:'DM Sans',sans-serif; min-height:340px;border-radius:20px; display:grid;place-items:center; padding:40px;overflow:hidden;position:relative; } .fi-08::before{ content:'';position:absolute;inset:0; background:radial-gradient(circle 300px at 50% 50%,rgba(245,158,11,.07),transparent); } .fi-08 *,.fi-08 *::before,.fi-08 *::after{box-sizing:border-box;margin:0;padding:0} .fi-08 ::selection{background:var(--gold);color:#000} /* scale-down fade: scale(1.4) opacity:0 → scale(1) opacity:1 — dramatic zoom-in from large */ .fi-08__hero{ text-align:center;position:relative;z-index:1; opacity:0;transform:scale(1.4); animation:fi-08-zoom-in .9s cubic-bezier(.25,.46,.45,.94) .1s forwards; } .fi-08__crown{font-size:3rem;margin-bottom:12px;display:block} .fi-08__title{ font-family:'Syne',sans-serif;font-size:clamp(2rem,5vw,3.5rem);font-weight:800; color:var(--text);line-height:1;margin-bottom:8px; } .fi-08__title em{ font-style:normal; background:linear-gradient(90deg,var(--gold),var(--amber)); -webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text; } .fi-08__sub{ font-size:1rem;color:rgba(255,251,235,.5);margin:16px 0 28px;max-width:360px; margin-left:auto;margin-right:auto;line-height:1.6; } .fi-08__ribbon{ display:inline-flex;gap:20px;align-items:center; background:rgba(245,158,11,.1);border:1px solid rgba(245,158,11,.25); border-radius:40px;padding:10px 24px; } .fi-08__ritem{font-size:.8rem;font-weight:600;color:var(--gold);display:flex;gap:6px;align-items:center} .fi-08__ritem::before{content:'✦';font-size:.6rem;opacity:.7} .fi-08__ritem + .fi-08__ritem{border-left:1px solid rgba(245,158,11,.2);padding-left:20px} @keyframes fi-08-zoom-in{to{opacity:1;transform:scale(1)}} @media(prefers-reduced-motion:reduce){ .fi-08 *{animation:none!important;opacity:1!important;transform:scale(1)!important} } ``` ### 09. RotateX Perspective Tilt Fade **Type:** Pure CSS **Description:** Three feature tiles tumble forward into position via perspective(800px) rotateX(60deg → 0) with staggered delays, creating a card-dealing 3D tilt-down entrance. **HTML:** ```html
    🌐
    Web Platform
    Cards tumble into place with a 3D perspective rotation on the X axis.
    rotateX
    📐
    Perspective
    CSS perspective() gives depth, making 2D elements feel truly spatial.
    perspective
    Depth Fade
    Combined with opacity, the tilt creates a cinematic camera-drop entrance.
    3D fade
    ``` **CSS:** ```css .fi-09{ --bg:#0c0d1a;--blue:#3b82f6;--indigo:#6366f1;--text:#eff6ff; font-family:'Inter',sans-serif; min-height:360px;border-radius:20px; display:flex;align-items:center;justify-content:center;gap:16px;flex-wrap:wrap; padding:40px;overflow:hidden; perspective:1000px; } .fi-09 *,.fi-09 *::before,.fi-09 *::after{box-sizing:border-box;margin:0;padding:0} .fi-09 ::selection{background:var(--blue);color:#fff} /* rotateX perspective fade: rotateX(60deg) opacity:0 → rotateX(0) opacity:1 */ .fi-09__tile{ width:160px;min-height:180px;border-radius:14px;padding:24px 18px; display:flex;flex-direction:column;gap:10px; opacity:0;transform:perspective(800px) rotateX(60deg) translateY(20px); animation:fi-09-flip-in .7s cubic-bezier(.16,1,.3,1) forwards; } .fi-09__tile:nth-child(1){--d:.05s;background:linear-gradient(160deg,rgba(59,130,246,.18),rgba(99,102,241,.1));border:1px solid rgba(59,130,246,.3)} .fi-09__tile:nth-child(2){--d:.2s;background:linear-gradient(160deg,rgba(99,102,241,.18),rgba(139,92,246,.1));border:1px solid rgba(99,102,241,.3)} .fi-09__tile:nth-child(3){--d:.35s;background:linear-gradient(160deg,rgba(139,92,246,.18),rgba(167,139,250,.1));border:1px solid rgba(139,92,246,.3)} .fi-09__tile{animation-delay:var(--d)} .fi-09__tile:hover{transform:perspective(800px) rotateX(-4deg) translateY(-4px)!important;transition:transform .3s} .fi-09__icon{font-size:2rem} .fi-09__name{font-family:'Syne',sans-serif;font-size:.95rem;font-weight:700;color:var(--text)} .fi-09__desc{font-size:.75rem;color:rgba(239,246,255,.45);line-height:1.5;flex:1} .fi-09__tag{ font-size:.65rem;font-weight:600;padding:3px 8px;border-radius:6px; background:rgba(59,130,246,.15);color:var(--blue);align-self:flex-start; } .fi-09__tile:nth-child(2) .fi-09__tag{background:rgba(99,102,241,.15);color:#818cf8} .fi-09__tile:nth-child(3) .fi-09__tag{background:rgba(139,92,246,.15);color:#a78bfa} @keyframes fi-09-flip-in{ to{opacity:1;transform:perspective(800px) rotateX(0deg) translateY(0)} } @media(prefers-reduced-motion:reduce){ .fi-09 *{animation:none!important;opacity:1!important;transform:none!important} } ``` ### 10. Word-by-Word Split Fade **Type:** CSS + JS **Description:** A headline is split word-by-word into spans via JavaScript, each assigned an animation-delay, creating a sequential typewriter-style word cascade with translateY spring bounce. **HTML:** ```html
    Word-by-word fade
    Words appear one by one creating a cinematic reading experience
    JavaScript splits text into spans, staggering animation-delay per word index.
    ↺ Replay
    ``` **CSS:** ```css .fi-10{ --bg:#0a0f0a;--green:#4ade80;--lime:#a3e635;--text:#f0fdf4; font-family:'Plus Jakarta Sans',sans-serif; min-height:320px;border-radius:20px; display:grid;place-items:center; padding:40px;overflow:hidden; } .fi-10 *,.fi-10 *::before,.fi-10 *::after{box-sizing:border-box;margin:0;padding:0} .fi-10 ::selection{background:var(--green);color:#000} .fi-10__output{text-align:center;max-width:560px} .fi-10__label{ font-size:.7rem;font-weight:700;letter-spacing:.2em;text-transform:uppercase; color:var(--green);margin-bottom:20px;opacity:0; animation:fi-10-word-fade .5s ease forwards .1s; } .fi-10__text{ font-size:clamp(1.4rem,3.5vw,2.2rem);font-weight:800;line-height:1.4; color:var(--text);margin-bottom:24px; } /* JS injects spans; each span animates individually */ .fi-10__word{ display:inline-block;margin-right:.3em; opacity:0;transform:translateY(12px); animation:fi-10-word-up .5s cubic-bezier(.16,1,.3,1) forwards; } .fi-10__sub{ font-size:.9rem;color:rgba(240,253,244,.45);line-height:1.6; opacity:0;animation:fi-10-word-fade .5s ease forwards; } .fi-10__replay{ margin-top:20px;display:inline-block; font-size:.75rem;font-weight:600;color:var(--green);cursor:pointer; border:1px solid rgba(74,222,128,.2);border-radius:20px;padding:6px 16px; background:rgba(74,222,128,.08);transition:background .2s; } .fi-10__replay:hover{background:rgba(74,222,128,.15)} @keyframes fi-10-word-up{to{opacity:1;transform:translateY(0)}} @keyframes fi-10-word-fade{to{opacity:1}} @media(prefers-reduced-motion:reduce){ .fi-10 *{animation:none!important;opacity:1!important;transform:none!important} } ``` **JS:** ```js (function(){ const textEl = document.getElementById('fi-10-text'); const subEl = document.getElementById('fi-10-sub'); const replay = document.getElementById('fi-10-replay'); const BASE_DELAY = 0.3; const STEP = 0.09; function splitAndAnimate(el, startDelay){ const words = el.textContent.trim().split(/\s+/); el.innerHTML = ''; words.forEach((w,i)=>{ const span = document.createElement('span'); span.className='fi-10__word'; span.textContent = w; span.style.animationDelay = (startDelay + i * STEP)+'s'; el.appendChild(span); }); return startDelay + words.length * STEP; } function run(){ const subDelay = splitAndAnimate(textEl, BASE_DELAY); subEl.style.animationDelay = (subDelay + 0.1)+'s'; subEl.style.animation='none'; void subEl.offsetWidth; subEl.style.animation='fi-10-word-fade .5s ease forwards'; } run(); replay.addEventListener('click',()=>{ // Reset and re-animate textEl.querySelectorAll('.fi-10__word').forEach(s=>{ s.style.animation='none'; void s.offsetWidth; s.style.animation='fi-10-word-up .5s cubic-bezier(.16,1,.3,1) forwards'; }); subEl.style.animation='none'; void subEl.offsetWidth; subEl.style.animation='fi-10-word-fade .5s ease forwards'; }); })(); ``` ### 11. Skew Sweep Fade **Type:** Pure CSS **Description:** Three stat panels slice into frame from the left using skewX(15deg) + translateX(-40px) → skewX(0) — a momentum-carrying diagonal sweep entrance. **HTML:** ```html
    847K
    Monthly Views
    Panels slice into view from the left with a momentum-carrying skew.
    12.3K
    Subscribers
    skewX(15deg) creates a dynamic diagonal entry effect.
    98%
    Satisfaction
    Combined with translateX for a satisfying sweeping entrance.
    ``` **CSS:** ```css .fi-11{ --bg:#0f0a14;--rose:#f43f5e;--pink:#ec4899;--text:#fff1f2; font-family:'DM Sans',sans-serif; min-height:340px;border-radius:20px; display:flex;align-items:center;justify-content:center;gap:20px;flex-wrap:wrap; padding:40px;overflow:hidden; } .fi-11 *,.fi-11 *::before,.fi-11 *::after{box-sizing:border-box;margin:0;padding:0} .fi-11 ::selection{background:var(--rose);color:#fff} /* skew + fade: skewX(15deg) translateX(-40px) opacity:0 → skewX(0) translateX(0) opacity:1 */ .fi-11__block{ border-radius:14px;padding:28px 24px;flex:1;min-width:160px;max-width:200px; opacity:0;transform:skewX(15deg) translateX(-40px); animation:fi-11-skew-in .7s cubic-bezier(.16,1,.3,1) forwards; } .fi-11__block:nth-child(1){--d:.05s;background:linear-gradient(135deg,rgba(244,63,94,.18),rgba(236,72,153,.08));border:1px solid rgba(244,63,94,.25)} .fi-11__block:nth-child(2){--d:.2s;background:linear-gradient(135deg,rgba(236,72,153,.18),rgba(168,85,247,.08));border:1px solid rgba(236,72,153,.25)} .fi-11__block:nth-child(3){--d:.35s;background:linear-gradient(135deg,rgba(168,85,247,.18),rgba(99,102,241,.08));border:1px solid rgba(168,85,247,.25)} .fi-11__block{animation-delay:var(--d)} .fi-11__block:hover{transform:skewX(0) translateX(0) scale(1.03)!important;transition:transform .25s} .fi-11__num{ font-family:'Syne',sans-serif;font-size:2.2rem;font-weight:800; line-height:1;margin-bottom:4px; } .fi-11__block:nth-child(1) .fi-11__num{color:var(--rose)} .fi-11__block:nth-child(2) .fi-11__num{color:var(--pink)} .fi-11__block:nth-child(3) .fi-11__num{color:#a78bfa} .fi-11__stat{font-size:.7rem;font-weight:700;letter-spacing:.1em;text-transform:uppercase;color:rgba(255,241,242,.45);margin-bottom:14px} .fi-11__divider{height:1px;background:rgba(255,255,255,.08);margin-bottom:12px} .fi-11__desc{font-size:.78rem;color:rgba(255,241,242,.55);line-height:1.5} @keyframes fi-11-skew-in{ to{opacity:1;transform:skewX(0deg) translateX(0)} } @media(prefers-reduced-motion:reduce){ .fi-11 *{animation:none!important;opacity:1!important;transform:none!important} } ``` ### 12. Radial Clip-Path Mask Reveal **Type:** Pure CSS **Description:** A feature panel expands outward from the centre using clip-path: circle(0% → 100%) — a portal-opening radial mask reveal radiating from a single focal point. **HTML:** ```html
    🌀

    Radial Mask Reveal

    Content expands outward from a central point using clip-path: circle() — like a portal opening or a spotlight growing to full brightness.

    clip-path
    circle()
    radial reveal
    ``` **CSS:** ```css .fi-12{ --bg:#07080e;--sky:#0ea5e9;--cobalt:#1d4ed8;--text:#f0f9ff; font-family:'Inter',sans-serif; min-height:340px;border-radius:20px; display:grid;place-items:center; padding:40px;overflow:hidden; } .fi-12 *,.fi-12 *::before,.fi-12 *::after{box-sizing:border-box;margin:0;padding:0} .fi-12 ::selection{background:var(--sky);color:#000} /* radial clip-path mask reveal: circle(0%) → circle(100%) */ .fi-12__wrap{position:relative;max-width:480px;width:100%} .fi-12__panel{ background:linear-gradient(135deg,rgba(14,165,233,.12),rgba(29,78,216,.08)); border:1px solid rgba(14,165,233,.25);border-radius:20px; padding:36px;text-align:center; clip-path:circle(0% at 50% 50%); animation:fi-12-radial-reveal 1s cubic-bezier(.4,0,.2,1) .15s forwards; } .fi-12__glow{ position:absolute;top:50%;left:50%;transform:translate(-50%,-50%); width:200px;height:200px;border-radius:50%; background:radial-gradient(circle,rgba(14,165,233,.15),transparent 70%); pointer-events:none; } .fi-12__emoji{font-size:2.5rem;display:block;margin-bottom:16px} .fi-12__title{ font-family:'Syne',sans-serif;font-size:clamp(1.4rem,3vw,2rem); font-weight:800;color:var(--text);margin-bottom:10px; } .fi-12__sub{font-size:.9rem;color:rgba(240,249,255,.5);line-height:1.6;margin-bottom:24px} .fi-12__orbs{display:flex;gap:10px;justify-content:center;flex-wrap:wrap} .fi-12__orb{ padding:6px 14px;border-radius:20px;font-size:.72rem;font-weight:600; background:rgba(14,165,233,.12);border:1px solid rgba(14,165,233,.2);color:var(--sky); } @keyframes fi-12-radial-reveal{to{clip-path:circle(100% at 50% 50%)}} @media(prefers-reduced-motion:reduce){ .fi-12__panel{animation:none;clip-path:none} } ``` ### 13. Greyscale to Color Saturate Fade **Type:** Pure CSS **Description:** Three profile cards transition from filter: saturate(0) brightness(0.7) to full color, creating a greyscale-to-vivid reveal with cascading animation delays. **HTML:** ```html
    Alex Chen
    Lead Designer
    Mia Torres
    Engineering Lead
    Sam Osei
    Product Manager
    ``` **CSS:** ```css .fi-13{ --bg:#111;--text:#fafafa; font-family:'Plus Jakarta Sans',sans-serif; min-height:340px;border-radius:20px; display:flex;align-items:center;justify-content:center;gap:16px;flex-wrap:wrap; padding:40px;overflow:hidden; } .fi-13 *,.fi-13 *::before,.fi-13 *::after{box-sizing:border-box;margin:0;padding:0} .fi-13 ::selection{background:#888;color:#fff} /* Greyscale → color: filter:saturate(0) opacity:0 → saturate(1) opacity:1 */ .fi-13__photo{ position:relative;border-radius:16px;overflow:hidden; flex:1;min-width:140px;max-width:170px;aspect-ratio:3/4; opacity:0;filter:saturate(0) brightness(.7); animation:fi-13-color-in 1s ease-out forwards; cursor:pointer; } .fi-13__photo:nth-child(1){--d:.1s} .fi-13__photo:nth-child(2){--d:.3s} .fi-13__photo:nth-child(3){--d:.5s} .fi-13__photo{animation-delay:var(--d)} .fi-13__photo:hover{filter:saturate(1.2) brightness(1.05)!important;transform:scale(1.03);transition:all .3s} /* Colorful gradient "photos" */ .fi-13__photo:nth-child(1){background:linear-gradient(160deg,#f97316,#ec4899,#8b5cf6)} .fi-13__photo:nth-child(2){background:linear-gradient(160deg,#06b6d4,#3b82f6,#a855f7)} .fi-13__photo:nth-child(3){background:linear-gradient(160deg,#10b981,#14b8a6,#0ea5e9)} .fi-13__overlay{ position:absolute;inset:0;background:linear-gradient(to top,rgba(0,0,0,.7) 0%,transparent 60%); display:flex;flex-direction:column;justify-content:flex-end;padding:16px; } .fi-13__pname{font-size:.85rem;font-weight:700;color:#fff;margin-bottom:3px} .fi-13__prole{font-size:.7rem;color:rgba(255,255,255,.6)} .fi-13__dot{ position:absolute;top:14px;right:14px; width:8px;height:8px;border-radius:50%;background:#4ade80; box-shadow:0 0 6px #4ade80; } @keyframes fi-13-color-in{to{opacity:1;filter:saturate(1) brightness(1)}} @media(prefers-reduced-motion:reduce){ .fi-13 *{animation:none!important;opacity:1!important;filter:none!important} } ``` ### 14. RotateY Flip Card Fade **Type:** Pure CSS **Description:** Three feature cards flip into view from the side via perspective(800px) rotateY(90deg → 0), fanning in sequence like a hand of cards being dealt face-up. **HTML:** ```html
    🎭
    UI Craft
    Design System
    Cards flip into view from the side using rotateY.
    ⚙️
    Dev Tools
    Engineering
    Each card delays 170ms, creating a fan-in sequence.
    🚀
    Launchpad
    Products
    Hover reveals a subtle counter-tilt for depth feedback.
    ``` **CSS:** ```css .fi-14{ --bg:#0c0814;--purple:#9333ea;--violet:#7c3aed;--text:#faf5ff; font-family:'Inter',sans-serif; min-height:360px;border-radius:20px; display:flex;align-items:center;justify-content:center;gap:20px;flex-wrap:wrap; padding:40px;overflow:hidden; perspective:1200px; } .fi-14 *,.fi-14 *::before,.fi-14 *::after{box-sizing:border-box;margin:0;padding:0} .fi-14 ::selection{background:var(--purple);color:#fff} /* flip card: rotateY(90deg) opacity:0 → rotateY(0) opacity:1 */ .fi-14__card{ width:160px;min-height:200px;border-radius:16px;padding:24px 18px; display:flex;flex-direction:column;align-items:center;text-align:center;gap:10px; opacity:0;transform:perspective(800px) rotateY(90deg); animation:fi-14-flip-reveal .65s cubic-bezier(.16,1,.3,1) forwards; cursor:pointer;transition:box-shadow .2s; } .fi-14__card:nth-child(1){--d:.05s;background:linear-gradient(160deg,rgba(147,51,234,.2),rgba(79,70,229,.1));border:1px solid rgba(147,51,234,.3)} .fi-14__card:nth-child(2){--d:.22s;background:linear-gradient(160deg,rgba(79,70,229,.2),rgba(59,130,246,.1));border:1px solid rgba(79,70,229,.3)} .fi-14__card:nth-child(3){--d:.39s;background:linear-gradient(160deg,rgba(236,72,153,.2),rgba(147,51,234,.1));border:1px solid rgba(236,72,153,.3)} .fi-14__card{animation-delay:var(--d)} .fi-14__card:hover{box-shadow:0 16px 48px rgba(147,51,234,.3);transform:perspective(800px) rotateY(-5deg) translateY(-4px)!important;transition:all .3s} .fi-14__emoji{font-size:2rem} .fi-14__name{font-family:'Syne',sans-serif;font-size:.95rem;font-weight:800;color:var(--text)} .fi-14__role{font-size:.72rem;color:rgba(250,245,255,.45);margin-bottom:8px} .fi-14__divider{width:32px;height:1px;background:rgba(255,255,255,.12)} .fi-14__detail{font-size:.72rem;color:rgba(250,245,255,.55);line-height:1.5} @keyframes fi-14-flip-reveal{ to{opacity:1;transform:perspective(800px) rotateY(0deg)} } @media(prefers-reduced-motion:reduce){ .fi-14 *{animation:none!important;opacity:1!important;transform:none!important} } ``` ### 15. Glitch Flash Multi-Step Fade **Type:** Pure CSS **Description:** A terminal-style display where the headline stutters into existence through a multi-step opacity flicker keyframe with micro translateX jitter, simulating a signal locking on. **HTML:** ```html
    BOOT SEQUENCE INITIATED... LOADING KERNEL MODULES... SIGNAL ACQUIRED. RENDERING...
    GLITCH FADE
    MULTI-STEP OPACITY FLICKER TECHNIQUE
    ``` **CSS:** ```css .fi-15{ --bg:#050505;--red:#ff2244;--white:#f8f8f8;--dim:#888; font-family:'Orbitron',monospace; min-height:340px;border-radius:20px; display:grid;place-items:center; padding:40px;overflow:hidden;position:relative; } .fi-15 *,.fi-15 *::before,.fi-15 *::after{box-sizing:border-box;margin:0;padding:0} .fi-15 ::selection{background:var(--red);color:#fff} /* glitch-flash fade: multi-step opacity flicker + slight translateX jitter */ .fi-15__screen{text-align:center;position:relative} .fi-15__line{ display:block; font-family:'Share Tech Mono',monospace; font-size:.7rem;letter-spacing:.15em;color:var(--dim); margin-bottom:8px; opacity:0;animation:fi-15-static .1s steps(1) forwards; } .fi-15__line:nth-child(1){animation-delay:.1s} .fi-15__line:nth-child(2){animation-delay:.2s} .fi-15__line:nth-child(3){animation-delay:.3s} .fi-15__glitch-text{ font-size:clamp(2rem,6vw,4rem);font-weight:900; color:var(--white);position:relative;display:inline-block; animation:fi-15-glitch-in 1.2s steps(1) .4s forwards;opacity:0; } .fi-15__glitch-text::before,.fi-15__glitch-text::after{ content:attr(data-text);position:absolute;inset:0; } .fi-15__glitch-text::before{ color:var(--red); animation:fi-15-ghost-r 1.2s steps(1) .4s forwards;opacity:0; clip-path:polygon(0 20%,100% 20%,100% 45%,0 45%); } .fi-15__glitch-text::after{ color:#0ff; animation:fi-15-ghost-l 1.2s steps(1) .4s forwards;opacity:0; clip-path:polygon(0 55%,100% 55%,100% 80%,0 80%); } .fi-15__sub{ font-size:.65rem;letter-spacing:.2em;color:var(--dim);margin-top:16px; opacity:0;animation:fi-15-static .1s steps(1) 1.4s forwards; } .fi-15__cursor{ display:inline-block;width:2px;height:1em;background:var(--red); vertical-align:middle;margin-left:4px; animation:fi-15-blink .8s steps(1) infinite 1.4s;opacity:0; } @keyframes fi-15-glitch-in{ 0%{opacity:0;transform:translateX(-4px)} 5%{opacity:1;transform:translateX(3px)} 8%{opacity:0;transform:translateX(-2px)} 12%{opacity:1;transform:translateX(0)} 20%{opacity:.3;transform:translateX(2px)} 22%{opacity:1;transform:translateX(0)} 35%{opacity:.8;transform:translateX(-1px)} 40%{opacity:1;transform:translateX(0)} 100%{opacity:1;transform:translateX(0)} } @keyframes fi-15-ghost-r{ 0%{opacity:0}5%{opacity:.8;transform:translateX(4px)} 8%{opacity:0}20%{opacity:.6;transform:translateX(-3px)} 22%{opacity:0}35%{opacity:.4;transform:translateX(2px)} 40%{opacity:0}100%{opacity:0} } @keyframes fi-15-ghost-l{ 0%{opacity:0}12%{opacity:.7;transform:translateX(-3px)} 15%{opacity:0}28%{opacity:.5;transform:translateX(2px)} 30%{opacity:0}100%{opacity:0} } @keyframes fi-15-static{to{opacity:1}} @keyframes fi-15-blink{0%,100%{opacity:1}50%{opacity:0}} @media(prefers-reduced-motion:reduce){ .fi-15 *{animation:none!important;opacity:1!important;transform:none!important} } ``` ### 16. Cascade Letter Drop Fade **Type:** CSS + JS **Description:** JavaScript splits a headline character-by-character into spans with staggered animation-delay; each letter drops in from above with a spring bounce, creating a raindrop cascade. **HTML:** ```html
    Letter cascade
    Cascade Letters

    JavaScript splits every character into a span with a staggered animation-delay, creating a raindrop-style letter cascade.

    JS split nth-child delay spring bounce
    ↺ replay animation
    ``` **CSS:** ```css .fi-16{ --bg:#090b14;--gold:#f59e0b;--amber:#fbbf24;--text:#fffbeb; font-family:'DM Sans',sans-serif; min-height:340px;border-radius:20px; display:grid;place-items:center; padding:40px;overflow:hidden;text-align:center; } .fi-16 *,.fi-16 *::before,.fi-16 *::after{box-sizing:border-box;margin:0;padding:0} .fi-16 ::selection{background:var(--gold);color:#000} .fi-16__label{ font-size:.7rem;font-weight:600;letter-spacing:.2em;text-transform:uppercase; color:rgba(255,251,235,.35);margin-bottom:20px; } .fi-16__title{ font-family:'Syne',sans-serif;font-size:clamp(1.8rem,4vw,3rem);font-weight:800; color:var(--text);line-height:1.2;margin-bottom:16px;display:block; } /* JS injects letter spans */ .fi-16__letter{ display:inline-block; opacity:0;transform:translateY(-20px) rotate(-8deg); animation:fi-16-letter-drop .5s cubic-bezier(.34,1.56,.64,1) forwards; } .fi-16__letter.fi-16--space{margin-right:.35em} .fi-16__sub{ font-size:.95rem;color:rgba(255,251,235,.45);line-height:1.6;max-width:400px; margin-bottom:28px;opacity:0;animation:fi-16-fade-up .6s ease forwards; } .fi-16__row{display:flex;gap:10px;justify-content:center;flex-wrap:wrap;opacity:0;animation:fi-16-fade-up .5s ease forwards} .fi-16__chip{ padding:7px 16px;border-radius:20px;font-size:.75rem;font-weight:700; background:rgba(245,158,11,.12);border:1px solid rgba(245,158,11,.25);color:var(--gold); transition:background .2s,transform .2s;cursor:default; } .fi-16__chip:hover{background:rgba(245,158,11,.22);transform:translateY(-2px)} .fi-16__replay{ margin-top:18px;display:inline-block;font-size:.72rem;font-weight:600; color:rgba(255,251,235,.35);cursor:pointer;border-bottom:1px dashed rgba(255,255,255,.15); padding-bottom:2px;transition:color .2s; opacity:0;animation:fi-16-fade-up .5s ease forwards; } .fi-16__replay:hover{color:var(--gold)} @keyframes fi-16-letter-drop{to{opacity:1;transform:translateY(0) rotate(0deg)}} @keyframes fi-16-fade-up{to{opacity:1}} @media(prefers-reduced-motion:reduce){ .fi-16 *{animation:none!important;opacity:1!important;transform:none!important} } ``` **JS:** ```js (function(){ const titleEl = document.getElementById('fi-16-title'); const replay = document.getElementById('fi-16-replay'); const STEP = 0.05; function animate(){ const text = 'Cascade Letters'; titleEl.innerHTML = ''; [...text].forEach((ch, i)=>{ const span = document.createElement('span'); span.className = 'fi-16__letter' + (ch === ' ' ? ' fi-16--space' : ''); span.textContent = ch === ' ' ? '\u00a0' : ch; span.style.animationDelay = (0.1 + i * STEP)+'s'; titleEl.appendChild(span); }); } animate(); replay.addEventListener('click',()=>{ titleEl.querySelectorAll('.fi-16__letter').forEach(s=>{ s.style.animation='none';void s.offsetWidth; s.style.animation='fi-16-letter-drop .5s cubic-bezier(.34,1.56,.64,1) forwards'; }); }); })(); ``` --- ## 10 CSS Feature Sections URL: https://codefronts.com/layouts/css-feature-sections/ Description: 10 hand-coded CSS feature section templates covering the patterns landing pages actually need in 2026 — icon grid with stats strip, Apple-style bento grid layout, dark glassmorphism with animated blobs, scroll-reveal alternating rows, developer SDK with syntax-highlighted code preview, side-by-side comparison table with pricing cards, full SaaS hero with mesh-gradient + social proof, 3D mousemove tilt cards, parchment-cream floating phone mockup, and Linear-style product roadmap timeline. 7 of 10 demos are 100% pure CSS — drop into any stack. The 3 JS-enhanced demos (scroll-reveal, 3D tilt, timeline-glow) degrade gracefully if JavaScript is disabled. Every demo respects prefers-reduced-motion, uses scoped .fsNN__* class names so multiple can coexist, and ships MIT-licensed. Demo count: 10 ### 01. CSS Feature Section with Icon Grid **Type:** Pure CSS **Description:** A dark-mode icon-grid platform feature section — six cards on a `#09090f` background, each with a coloured icon badge, per-card radial glow on hover, and a stats strip with 99.99% uptime, 300+ nodes, and <30s deploy time. Syne display + Inter body. **HTML:** ```html
    Platform capabilities

    Everything you need to
    ship faster

    A complete toolkit for modern teams. Automate the repetitive, focus on what matters, and deploy with confidence — every single time.

    Instant Deployments
    Push to main and go live in under 30 seconds. Zero-downtime rollouts with automatic health checks built in.
    Infrastructure
    🛡️
    Edge Security
    DDoS protection, WAF rules, and bot mitigation run at the network edge — before traffic ever reaches your app.
    Security
    📊
    Real-Time Analytics
    P99 latencies, error budgets, and user flows surface automatically. No instrumentation required on your end.
    Observability
    🔁
    Smart Rollbacks
    Detect regressions automatically and roll back to the last stable release — database migrations included.
    Reliability
    🌐
    Global CDN
    Static assets and edge functions served from 300+ PoPs worldwide. Sub-20ms cache hits across six continents.
    Performance
    🤝
    Team Workflows
    Preview environments per pull request, role-based access, and audit logs that satisfy even your strictest compliance team.
    Collaboration
    Start for free →
    99.99%
    Uptime SLA
    300+
    Edge nodes
    <30s
    Deploy time
    ``` **CSS:** ```css *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; } .fs01 { --bg: #09090f; --surface: #111118; --border: rgba(255,255,255,0.07); --text: #e8e8f0; --muted: #6b6b85; --accent1: #7c6dfa; --accent2: #e05aff; --accent3: #00e5c3; --card-bg: #13131c; font-family: 'Inter', sans-serif; background: var(--bg); color: var(--text); padding: 96px 24px; min-height: 100vh; } .fs01__inner { max-width: 1100px; margin: 0 auto; } .fs01__eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent1); background: rgba(124,109,250,0.1); border: 1px solid rgba(124,109,250,0.25); padding: 6px 14px; border-radius: 100px; margin-bottom: 28px; } .fs01__eyebrow::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--accent1); box-shadow: 0 0 8px var(--accent1); } .fs01__headline { font-family: 'Syne', sans-serif; font-size: clamp(36px, 5vw, 62px); font-weight: 800; line-height: 1.08; letter-spacing: -0.02em; margin-bottom: 20px; max-width: 680px; } .fs01__headline span { background: linear-gradient(135deg, var(--accent1), var(--accent2)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; } .fs01__sub { font-size: 17px; line-height: 1.7; color: var(--muted); max-width: 520px; margin-bottom: 72px; } .fs01__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 2px; background: var(--border); border: 1px solid var(--border); border-radius: 20px; overflow: hidden; } .fs01__card { background: var(--card-bg); padding: 36px 32px; position: relative; transition: background 0.25s; cursor: default; } .fs01__card::after { content: ''; position: absolute; inset: 0; opacity: 0; transition: opacity 0.3s; background: radial-gradient(circle at 50% 0%, rgba(124,109,250,0.08), transparent 70%); } .fs01__card:hover { background: #16162000; } .fs01__card:hover::after { opacity: 1; } .fs01__icon-wrap { width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; margin-bottom: 20px; font-size: 22px; position: relative; z-index: 1; } .fs01__card:nth-child(1) .fs01__icon-wrap { background: rgba(124,109,250,0.15); } .fs01__card:nth-child(2) .fs01__icon-wrap { background: rgba(224,90,255,0.15); } .fs01__card:nth-child(3) .fs01__icon-wrap { background: rgba(0,229,195,0.15); } .fs01__card:nth-child(4) .fs01__icon-wrap { background: rgba(255,160,64,0.15); } .fs01__card:nth-child(5) .fs01__icon-wrap { background: rgba(255,80,120,0.15); } .fs01__card:nth-child(6) .fs01__icon-wrap { background: rgba(64,180,255,0.15); } .fs01__card-title { font-family: 'Syne', sans-serif; font-size: 17px; font-weight: 700; margin-bottom: 10px; color: #fff; position: relative; z-index: 1; } .fs01__card-body { font-size: 14px; line-height: 1.65; color: var(--muted); position: relative; z-index: 1; } .fs01__card-tag { display: inline-block; margin-top: 16px; font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; padding: 4px 10px; border-radius: 6px; position: relative; z-index: 1; } .fs01__card:nth-child(1) .fs01__card-tag { color: var(--accent1); background: rgba(124,109,250,0.1); } .fs01__card:nth-child(2) .fs01__card-tag { color: var(--accent2); background: rgba(224,90,255,0.1); } .fs01__card:nth-child(3) .fs01__card-tag { color: var(--accent3); background: rgba(0,229,195,0.1); } .fs01__card:nth-child(4) .fs01__card-tag { color: #ffa040; background: rgba(255,160,64,0.1); } .fs01__card:nth-child(5) .fs01__card-tag { color: #ff5078; background: rgba(255,80,120,0.1); } .fs01__card:nth-child(6) .fs01__card-tag { color: #40b4ff; background: rgba(64,180,255,0.1); } .fs01__bottom { margin-top: 64px; display: flex; align-items: center; gap: 40px; flex-wrap: wrap; } .fs01__cta { display: inline-flex; align-items: center; gap: 10px; background: linear-gradient(135deg, var(--accent1), var(--accent2)); color: #fff; font-size: 15px; font-weight: 600; padding: 14px 28px; border-radius: 12px; text-decoration: none; transition: opacity 0.2s, transform 0.2s; } .fs01__cta:hover { opacity: 0.9; transform: translateY(-1px); } .fs01__stats { display: flex; gap: 32px; } .fs01__stat-num { font-family: 'Syne', sans-serif; font-size: 28px; font-weight: 800; background: linear-gradient(135deg, #fff, var(--muted)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; } .fs01__stat-label { font-size: 12px; color: var(--muted); margin-top: 2px; } @media (max-width: 640px) { .fs01__grid { grid-template-columns: 1fr; } .fs01__bottom { flex-direction: column; align-items: flex-start; } } @media (prefers-reduced-motion: reduce) { .fs01__card, .fs01__card::after, .fs01__cta { transition: none; } } ``` ### 02. CSS Bento Grid Features Layout **Type:** Pure CSS **Description:** A warm-cream bento-grid layout with five asymmetric CSS Grid cells (dark ink, forest green, white, terracotta, and deep navy) showcasing animated bar meters, a large metric number, and an orbiting dot animation. Fraunces serif + DM Sans. **HTML:** ```html
    Why teams choose us

    The platform that
    works beautifully at scale

    Workflow
    From idea to production in one tool
    Design, prototype, review, and deploy — without leaving a single workspace. Your entire product lifecycle lives here.
    01
    Performance
    Built for speed without trade-offs
    Build time
    88%
    Uptime
    99%
    Cache hits
    76%
    Savings
    62%
    Scale
    12M
    Requests handled per second at peak
    Elastic infrastructure that scales automatically without capacity planning.
    Security
    Zero-trust by default
    Every request is authenticated at the edge. SSO, SAML, and hardware key support out of the box.
    Integrations
    Connects to your whole stack
    GitHub, Slack, Datadog, PagerDuty — 200+ integrations and a full API for anything custom.
    ``` **CSS:** ```css *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; } .fs02 { --bg: #f5f0e8; --ink: #1a1612; --muted: #7a7065; --card1: #1a1612; --card2: #2c5f3c; --card3: #fff; --card4: #e8623a; --card5: #fff; --card6: #2a2060; --accent: #e8623a; font-family: 'DM Sans', sans-serif; background: var(--bg); color: var(--ink); padding: 80px 24px; min-height: 100vh; } .fs02__inner { max-width: 1100px; margin: 0 auto; } .fs02__header { margin-bottom: 56px; } .fs02__label { font-size: 11px; font-weight: 600; letter-spacing: 0.15em; text-transform: uppercase; color: var(--accent); margin-bottom: 16px; } .fs02__headline { font-family: 'Fraunces', serif; font-size: clamp(38px, 5.5vw, 68px); font-weight: 800; line-height: 1.05; letter-spacing: -0.02em; max-width: 640px; } .fs02__headline em { font-style: italic; color: var(--accent); } .fs02__bento { display: grid; grid-template-columns: repeat(12, 1fr); grid-template-rows: auto; gap: 12px; } /* Card base */ .fs02__cell { border-radius: 20px; padding: 36px; position: relative; overflow: hidden; } .fs02__cell--a { grid-column: span 5; background: var(--card1); color: #f0ece4; min-height: 280px; } .fs02__cell--b { grid-column: span 7; background: var(--card2); color: #d4eedb; min-height: 280px; } .fs02__cell--c { grid-column: span 4; background: var(--card3); border: 1.5px solid rgba(0,0,0,0.1); min-height: 220px; } .fs02__cell--d { grid-column: span 4; background: var(--card4); color: #fff; min-height: 220px; } .fs02__cell--e { grid-column: span 4; background: var(--card6); color: #c8c4ee; min-height: 220px; } .fs02__cell-tag { display: inline-block; font-size: 10px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; padding: 5px 10px; border-radius: 100px; margin-bottom: 24px; } .fs02__cell--a .fs02__cell-tag { background: rgba(255,255,255,0.1); color: rgba(255,255,255,0.6); } .fs02__cell--b .fs02__cell-tag { background: rgba(255,255,255,0.1); color: rgba(212,238,219,0.7); } .fs02__cell--c .fs02__cell-tag { background: #f0ece4; color: #7a7065; } .fs02__cell--d .fs02__cell-tag { background: rgba(255,255,255,0.2); color: #fff; } .fs02__cell--e .fs02__cell-tag { background: rgba(255,255,255,0.1); color: rgba(200,196,238,0.7); } .fs02__cell-title { font-family: 'Fraunces', serif; font-size: clamp(22px, 2.5vw, 30px); font-weight: 800; line-height: 1.15; margin-bottom: 12px; } .fs02__cell-body { font-size: 14px; line-height: 1.65; opacity: 0.72; max-width: 340px; } /* Decorative large number */ .fs02__cell--a .fs02__bg-num { position: absolute; bottom: -20px; right: -10px; font-family: 'Fraunces', serif; font-size: 140px; font-weight: 800; color: rgba(255,255,255,0.04); line-height: 1; pointer-events: none; user-select: none; } /* Progress bars in cell b */ .fs02__bars { margin-top: 24px; display: flex; flex-direction: column; gap: 12px; } .fs02__bar-row { display: flex; align-items: center; gap: 12px; } .fs02__bar-label { font-size: 12px; opacity: 0.7; min-width: 80px; } .fs02__bar-track { flex: 1; height: 6px; background: rgba(255,255,255,0.15); border-radius: 100px; overflow: hidden; } .fs02__bar-fill { height: 100%; background: #5ebd7a; border-radius: 100px; animation: fs02-grow 1.2s cubic-bezier(.4,0,.2,1) both; animation-delay: var(--delay, 0s); } @keyframes fs02-grow { from { width: 0 } } /* Metric in cell c */ .fs02__metric { font-family: 'Fraunces', serif; font-size: 64px; font-weight: 800; color: var(--ink); line-height: 1; margin: 20px 0 8px; } .fs02__metric-sub { font-size: 13px; color: var(--muted); } /* Icon orbit cell e */ .fs02__orbit { position: absolute; right: 24px; bottom: 24px; width: 80px; height: 80px; } .fs02__orbit-ring { width: 80px; height: 80px; border: 1.5px dashed rgba(255,255,255,0.2); border-radius: 50%; animation: fs02-spin 8s linear infinite; } .fs02__orbit-dot { position: absolute; top: -5px; left: 50%; transform: translateX(-50%); width: 10px; height: 10px; background: #8b82f0; border-radius: 50%; } @keyframes fs02-spin { to { transform: rotate(360deg); } } @media (max-width: 700px) { .fs02__cell--a, .fs02__cell--b, .fs02__cell--c, .fs02__cell--d, .fs02__cell--e { grid-column: span 12; } } @media (prefers-reduced-motion: reduce) { .fs02__bar-fill { animation: none; width: var(--w); } .fs02__orbit-ring { animation: none; } } ``` ### 03. CSS Feature Section Dark Glassmorphism **Type:** Pure CSS **Description:** Three animated radial-blob ambients behind a six-card frosted-glass grid on deep `#04040a`. Each card has a per-color glow that intensifies on hover, numbered 01–06, with link arrows that widen on hover. Space Grotesk + Space Mono. **HTML:** ```html
    // PLATFORM_FEATURES v2.5

    Craft experiences
    that feel alive

    Six core capabilities designed from the ground up for 2025 product teams. No bolt-ons, no legacy APIs — just clean, powerful primitives that do exactly what they say.

    01 / 06
    🧠
    AI-Assisted Routing
    Predict user intent and route requests to the optimal compute tier before they complete — reducing latency by up to 60%.
    Explore →
    02 / 06
    🔐
    Passkey Authentication
    Native WebAuthn support with biometric fallback. Drop password forms entirely — your users deserve better UX.
    Explore →
    03 / 06
    📡
    Real-Time Sync Engine
    CRDTs under the hood. Collaborative editing, offline-first state, and live cursors with zero config on your part.
    Explore →
    04 / 06
    ⚙️
    Workflow Automation
    Trigger-action pipelines with branching logic, retry policies, and a visual debugger that shows exactly what ran.
    Explore →
    05 / 06
    📈
    Growth Analytics
    Funnel analysis, cohort retention, and A/B test significance — all computed in-platform with no data leaving your region.
    Explore →
    06 / 06
    🌍
    Regional Compliance
    GDPR, CCPA, and HIPAA data residency enforced at the storage layer. Compliance reports generated on demand.
    Explore →
    Trusted by 4,200+ product teams globally
    ``` **CSS:** ```css *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; } .fs03 { font-family: 'Space Grotesk', sans-serif; min-height: 100vh; padding: 80px 24px; position: relative; overflow: hidden; background: #04040a; color: #e2e0f0; } /* Ambient blobs */ .fs03__blob { position: absolute; border-radius: 50%; filter: blur(90px); pointer-events: none; animation: fs03-pulse 8s ease-in-out infinite; } .fs03__blob--1 { width: 500px; height: 500px; background: #5b3cf7; opacity: .28; top: -100px; left: -100px; animation-delay: 0s; } .fs03__blob--2 { width: 400px; height: 400px; background: #c73ef0; opacity: .22; top: 30%; right: -80px; animation-delay: -3s; } .fs03__blob--3 { width: 350px; height: 350px; background: #1be8c8; opacity: .18; bottom: -60px; left: 30%; animation-delay: -5s; } @keyframes fs03-pulse { 0%, 100% { transform: scale(1) translate(0,0); } 50% { transform: scale(1.12) translate(20px,-20px); } } .fs03__inner { max-width: 1100px; margin: 0 auto; position: relative; z-index: 1; } .fs03__top { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: end; margin-bottom: 56px; } .fs03__badge { display: inline-flex; align-items: center; gap: 6px; font-family: 'Space Mono', monospace; font-size: 10px; color: #1be8c8; background: rgba(27,232,200,0.08); border: 1px solid rgba(27,232,200,0.2); padding: 5px 12px; border-radius: 6px; margin-bottom: 20px; letter-spacing: 0.08em; } .fs03__headline { font-size: clamp(32px, 4.5vw, 58px); font-weight: 700; line-height: 1.1; letter-spacing: -0.025em; } .fs03__headline mark { background: linear-gradient(90deg, #7b5cf7, #c73ef0); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; } .fs03__right-text { font-size: 16px; line-height: 1.7; color: rgba(226,224,240,0.55); padding-bottom: 4px; } .fs03__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; } .fs03__card { background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.09); border-radius: 18px; padding: 32px; backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); position: relative; overflow: hidden; transition: border-color 0.3s, transform 0.3s; } .fs03__card:hover { border-color: rgba(255,255,255,0.2); transform: translateY(-4px); } .fs03__card-glow { position: absolute; width: 180px; height: 180px; border-radius: 50%; filter: blur(50px); pointer-events: none; top: -60px; right: -40px; opacity: 0.35; transition: opacity 0.3s; } .fs03__card:hover .fs03__card-glow { opacity: 0.6; } .fs03__card:nth-child(1) .fs03__card-glow { background: #7b5cf7; } .fs03__card:nth-child(2) .fs03__card-glow { background: #c73ef0; } .fs03__card:nth-child(3) .fs03__card-glow { background: #1be8c8; } .fs03__card:nth-child(4) .fs03__card-glow { background: #f7a03c; } .fs03__card:nth-child(5) .fs03__card-glow { background: #f74460; } .fs03__card:nth-child(6) .fs03__card-glow { background: #3cb8f7; } .fs03__card-num { font-family: 'Space Mono', monospace; font-size: 11px; color: rgba(226,224,240,0.3); margin-bottom: 20px; letter-spacing: 0.1em; } .fs03__card-icon { font-size: 32px; margin-bottom: 16px; display: block; } .fs03__card-title { font-size: 17px; font-weight: 700; margin-bottom: 10px; color: #fff; } .fs03__card-body { font-size: 14px; line-height: 1.65; color: rgba(226,224,240,0.5); } .fs03__card-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 20px; font-size: 13px; font-weight: 600; text-decoration: none; transition: gap 0.2s; } .fs03__card:nth-child(1) .fs03__card-link { color: #9e85f9; } .fs03__card:nth-child(2) .fs03__card-link { color: #db80f7; } .fs03__card:nth-child(3) .fs03__card-link { color: #1be8c8; } .fs03__card:nth-child(4) .fs03__card-link { color: #f7a03c; } .fs03__card:nth-child(5) .fs03__card-link { color: #f74460; } .fs03__card:nth-child(6) .fs03__card-link { color: #3cb8f7; } .fs03__card-link:hover { gap: 10px; } /* Separator line */ .fs03__sep { width: 100%; height: 1px; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent); margin: 56px 0; } .fs03__bottom { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 24px; } .fs03__trust { display: flex; align-items: center; gap: 10px; font-size: 13px; color: rgba(226,224,240,0.45); } .fs03__dots { display: flex; gap: 6px; } .fs03__dot { width: 8px; height: 8px; border-radius: 50%; } .fs03__dot:nth-child(1) { background: #7b5cf7; } .fs03__dot:nth-child(2) { background: #c73ef0; } .fs03__dot:nth-child(3) { background: #1be8c8; } .fs03__cta-row { display: flex; gap: 12px; } .fs03__btn { display: inline-flex; align-items: center; gap: 8px; font-family: 'Space Grotesk', sans-serif; font-size: 14px; font-weight: 600; padding: 12px 24px; border-radius: 10px; text-decoration: none; transition: transform 0.2s, opacity 0.2s; cursor: pointer; } .fs03__btn:hover { transform: translateY(-2px); opacity: 0.9; } .fs03__btn--primary { background: linear-gradient(135deg, #7b5cf7, #c73ef0); color: #fff; } .fs03__btn--ghost { background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12); color: #e2e0f0; } @media (max-width: 768px) { .fs03__top { grid-template-columns: 1fr; } .fs03__grid { grid-template-columns: 1fr 1fr; } } @media (max-width: 500px) { .fs03__grid { grid-template-columns: 1fr; } .fs03__bottom { flex-direction: column; } } @media (prefers-reduced-motion: reduce) { .fs03__blob, .fs03__card, .fs03__card-link { animation: none; transition: none; } } ``` ### 04. CSS Animated Feature Cards Scroll Reveal **Type:** CSS + JS **Description:** A clean light-background feature section with four alternating left-right rows that fade-in via IntersectionObserver on scroll. Each row pairs long-form copy and pill tags with an abstract UI mockup illustration. Manrope. **HTML:** ```html
    How it works

    Fewer tools.
    Better results.

    Four core capabilities that replace a whole stack of point solutions your team is already paying for.

    CAPABILITY 01
    Unified data pipeline with zero ETL
    Stream events from any source directly into your warehouse or lakehouse. Schema inference, deduplication, and backfill handled automatically — no pipeline code required.
    Firehose Auto-schema Backfill
    CAPABILITY 02
    Semantic search across all your content
    Vector embeddings generated for every document, ticket, and message. Natural language queries return results ranked by meaning, not just keywords — in under 100ms.
    Vector DB RAG-ready <100ms p99
    CAPABILITY 03
    Visual workflow builder, no code needed
    Drag-and-drop automations that talk to your existing APIs. Built-in retry logic, dead-letter queues, and SLA alerts keep processes running without hand-holding.
    No-code API webhooks SLA alerts
    CAPABILITY 04
    Role-aware access with fine-grained audit
    Attribute-based permissions that follow your org chart. Every action logged to an immutable audit trail, queryable by time, user, resource, and outcome.
    ABAC Immutable logs SOC 2 ready
    ``` **CSS:** ```css *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; } .fs04 { --bg: #fafafa; --ink: #111; --muted: #777; --line: #e8e8e8; font-family: 'Manrope', sans-serif; background: var(--bg); color: var(--ink); padding: 100px 24px; } .fs04__inner { max-width: 1060px; margin: 0 auto; } .fs04__head { text-align: center; margin-bottom: 80px; } .fs04__kicker { font-size: 12px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin-bottom: 16px; } .fs04__h2 { font-size: clamp(34px, 5vw, 60px); font-weight: 800; letter-spacing: -0.03em; line-height: 1.07; margin-bottom: 18px; } .fs04__h2 span { position: relative; display: inline-block; } .fs04__h2 span::after { content: ''; position: absolute; left: 0; bottom: 4px; width: 100%; height: 8px; background: #ffe045; z-index: -1; border-radius: 2px; } .fs04__desc { font-size: 17px; color: var(--muted); max-width: 500px; margin: 0 auto; line-height: 1.7; } /* Cards list — alternating layout */ .fs04__list { display: flex; flex-direction: column; gap: 0; } .fs04__item { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border-top: 1px solid var(--line); padding: 64px 0; align-items: center; opacity: 0; transform: translateY(40px); transition: opacity 0.7s cubic-bezier(.4,0,.2,1), transform 0.7s cubic-bezier(.4,0,.2,1); } .fs04__item.fs04--visible { opacity: 1; transform: none; } .fs04__item:nth-child(even) .fs04__item-visual { order: -1; } .fs04__item-content { padding: 0 48px 0 0; } .fs04__item:nth-child(even) .fs04__item-content { padding: 0 0 0 48px; } .fs04__item-num { font-size: 11px; font-weight: 800; letter-spacing: 0.1em; color: var(--muted); margin-bottom: 20px; } .fs04__item-title { font-size: clamp(22px, 2.5vw, 32px); font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; margin-bottom: 16px; } .fs04__item-body { font-size: 15px; line-height: 1.7; color: var(--muted); margin-bottom: 24px; } .fs04__item-pills { display: flex; flex-wrap: wrap; gap: 8px; } .fs04__pill { font-size: 12px; font-weight: 600; padding: 5px 12px; border-radius: 100px; background: #f0f0f0; color: #444; } /* Visual areas */ .fs04__item-visual { border-radius: 20px; overflow: hidden; aspect-ratio: 4/3; position: relative; display: flex; align-items: center; justify-content: center; } .fs04__vis--a { background: linear-gradient(135deg, #e8f4ff 0%, #d5eaff 100%); } .fs04__vis--b { background: linear-gradient(135deg, #fff4e0 0%, #ffe8cc 100%); } .fs04__vis--c { background: linear-gradient(135deg, #f0ffe8 0%, #d8f5cc 100%); } .fs04__vis--d { background: linear-gradient(135deg, #f8e8ff 0%, #eecefd 100%); } /* Abstract UI mockup inside each */ .fs04__mockup { width: 85%; background: #fff; border-radius: 14px; box-shadow: 0 20px 60px rgba(0,0,0,0.12); padding: 20px; } .fs04__mock-bar { height: 8px; border-radius: 4px; margin-bottom: 10px; background: #eee; } .fs04__mock-bar--accent { background: linear-gradient(90deg, #6c8ef7, #9c6cf7); width: 60%; } .fs04__mock-bar--sm { width: 40%; } .fs04__mock-bar--md { width: 70%; } .fs04__mock-bar--lg { width: 90%; } .fs04__mock-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; } .fs04__mock-block { height: 48px; border-radius: 8px; background: #f5f5f5; } .fs04__mock-block--a { background: rgba(108,142,247,0.15); } .fs04__mock-block--b { background: rgba(156,108,247,0.15); } .fs04__mock-block--c { background: rgba(247,160,108,0.15); } .fs04__mock-block--d { background: rgba(108,220,180,0.15); } .fs04__mock-chart { display: flex; align-items: flex-end; gap: 6px; height: 60px; margin-top: 12px; } .fs04__mock-bar2 { flex: 1; border-radius: 4px 4px 0 0; background: linear-gradient(to top, #6c8ef7, #c8d8ff); } .fs04__last { border-bottom: 1px solid var(--line); } @media (max-width: 700px) { .fs04__item { grid-template-columns: 1fr; gap: 32px; } .fs04__item:nth-child(even) .fs04__item-visual { order: 0; } .fs04__item-content, .fs04__item:nth-child(even) .fs04__item-content { padding: 0; } } @media (prefers-reduced-motion: reduce) { .fs04__item { opacity: 1; transform: none; transition: none; } } ``` **JS:** ```js const observer = new IntersectionObserver(entries => { entries.forEach(e => { if (e.isIntersecting) { e.target.classList.add('fs04--visible'); observer.unobserve(e.target); } }); }, { threshold: 0.15 }); document.querySelectorAll('.fs04__item').forEach((el, i) => { el.style.transitionDelay = `${i * 0.08}s`; observer.observe(el); }); ``` ### 05. CSS Feature Section with Code Preview **Type:** Pure CSS **Description:** A GitHub-dark developer SDK feature section: a tabbed code window with full JetBrains Mono syntax highlighting (keywords, strings, comments, numbers) and a four-column feature-tile grid below. Green “Install” CTA. JetBrains Mono + Inter. **HTML:** ```html
    $ npm install @platform/sdk

    A developer API that
    gets out of your way

    Five lines to integrate. Full TypeScript types. Logs you can actually read. Built by engineers who've suffered through every other SDK so you don't have to.

    index.ts
    config.json
    1// Initialize the client with your API key
    2import { Platform } from '@platform/sdk';
    3
    4const client = new Platform({
    5  apiKey: process.env.PLATFORM_KEY,
    6  region: 'us-east-1',
    7  retries: 3,
    8});
    9
    10// Stream events with full TypeScript types
    11const stream = await client.events.stream({
    12  source: 'production',
    13  filter: { type: 'purchase' },
    14});
    15
    16for await (const event of stream) {
    17  console.log(event.data); // fully typed
    18}
    🔷
    Full TypeScript support
    Every method, event, and error is typed. IntelliSense autocompletes your way through the entire API surface.
    types: strict
    🔄
    Idempotent retries
    Automatic exponential backoff with jitter. Duplicate prevention guaranteed via idempotency keys.
    retries: 3
    📦
    Webhook validation
    Verify every inbound payload with one helper. HMAC-SHA256 signature checking built into the SDK.
    hmac-sha256
    🪵
    Structured logging
    JSON logs with trace IDs and request context that pipe directly into Datadog, Grafana, or any OTEL collector.
    otel-ready
    ``` **CSS:** ```css *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; } .fs05 { --bg: #0d1117; --surface: #161b22; --border: #30363d; --text: #e6edf3; --muted: #7d8590; --green: #3fb950; --blue: #79c0ff; --purple: #d2a8ff; --orange: #ffa657; --red: #ff7b72; --yellow: #e3b341; font-family: 'Inter', sans-serif; background: var(--bg); color: var(--text); padding: 80px 24px; min-height: 100vh; } .fs05__inner { max-width: 1100px; margin: 0 auto; } .fs05__top { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; margin-bottom: 80px; } .fs05__label { display: inline-flex; align-items: center; gap: 6px; font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--green); background: rgba(63,185,80,0.1); border: 1px solid rgba(63,185,80,0.25); padding: 4px 10px; border-radius: 6px; margin-bottom: 20px; } .fs05__h2 { font-size: clamp(32px, 4vw, 50px); font-weight: 700; line-height: 1.15; letter-spacing: -0.025em; margin-bottom: 18px; } .fs05__h2 em { font-style: normal; color: var(--blue); } .fs05__p { font-size: 16px; line-height: 1.7; color: var(--muted); margin-bottom: 28px; } .fs05__cta-row { display: flex; gap: 10px; } .fs05__btn { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; padding: 10px 20px; border-radius: 8px; text-decoration: none; transition: opacity 0.2s; } .fs05__btn:hover { opacity: 0.8; } .fs05__btn--green { background: var(--green); color: #000; } .fs05__btn--ghost { background: transparent; border: 1px solid var(--border); color: var(--text); } /* Code window */ .fs05__window { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; box-shadow: 0 24px 80px rgba(0,0,0,0.5); } .fs05__win-bar { display: flex; align-items: center; gap: 0; padding: 0; background: #1c2028; border-bottom: 1px solid var(--border); } .fs05__win-tabs { display: flex; } .fs05__tab { padding: 10px 20px; font-family: 'JetBrains Mono', monospace; font-size: 12px; color: var(--muted); border-right: 1px solid var(--border); cursor: pointer; } .fs05__tab--active { background: var(--surface); color: var(--text); border-bottom: 2px solid var(--blue); margin-bottom: -1px; } .fs05__win-dots { margin-left: auto; display: flex; gap: 6px; padding: 0 16px; } .fs05__dot { width: 10px; height: 10px; border-radius: 50%; } .fs05__dot:nth-child(1) { background: #ff5f57; } .fs05__dot:nth-child(2) { background: #febc2e; } .fs05__dot:nth-child(3) { background: #28c840; } .fs05__code { padding: 24px; font-family: 'JetBrains Mono', monospace; font-size: 13px; line-height: 1.7; overflow-x: auto; } .fs05__ln { color: #3d444d; user-select: none; margin-right: 20px; } .kw { color: var(--purple); } .fn { color: var(--blue); } .str { color: var(--orange); } .cm { color: #8b949e; font-style: italic; } .num { color: var(--green); } .prop { color: var(--blue); } .var { color: var(--red); } .obj { color: var(--yellow); } /* Feature grid below */ .fs05__features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; } .fs05__feat { background: var(--surface); padding: 28px; transition: background 0.2s; } .fs05__feat:hover { background: #1c2028; } .fs05__feat-icon { width: 36px; height: 36px; border-radius: 8px; margin-bottom: 14px; display: flex; align-items: center; justify-content: center; font-size: 18px; } .fs05__feat:nth-child(1) .fs05__feat-icon { background: rgba(63,185,80,0.15); } .fs05__feat:nth-child(2) .fs05__feat-icon { background: rgba(121,192,255,0.15); } .fs05__feat:nth-child(3) .fs05__feat-icon { background: rgba(210,168,255,0.15); } .fs05__feat:nth-child(4) .fs05__feat-icon { background: rgba(255,166,87,0.15); } .fs05__feat-title { font-size: 14px; font-weight: 700; margin-bottom: 8px; color: var(--text); } .fs05__feat-desc { font-size: 12px; line-height: 1.6; color: var(--muted); } .fs05__feat-badge { display: inline-block; margin-top: 12px; font-family: 'JetBrains Mono', monospace; font-size: 10px; padding: 2px 8px; border-radius: 4px; } .fs05__feat:nth-child(1) .fs05__feat-badge { background: rgba(63,185,80,0.15); color: var(--green); } .fs05__feat:nth-child(2) .fs05__feat-badge { background: rgba(121,192,255,0.15); color: var(--blue); } .fs05__feat:nth-child(3) .fs05__feat-badge { background: rgba(210,168,255,0.15); color: var(--purple); } .fs05__feat:nth-child(4) .fs05__feat-badge { background: rgba(255,166,87,0.15); color: var(--orange); } @media (max-width: 800px) { .fs05__top { grid-template-columns: 1fr; } .fs05__features { grid-template-columns: 1fr 1fr; } } @media (max-width: 460px) { .fs05__features { grid-template-columns: 1fr; } } @media (prefers-reduced-motion: reduce) { .fs05__btn, .fs05__feat { transition: none; } } ``` ### 06. CSS Feature Comparison Section **Type:** Pure CSS **Description:** A side-by-side feature comparison table: “Typical SaaS” vs “Our Platform” with ✓/✕/~ check indicators, a purple recommended column with extra border+shadow, and two pricing cards at the bottom. Cabinet Grotesk + Plus Jakarta Sans. **HTML:** ```html
    Compare plans

    Why teams switch
    to our platform

    Side-by-side, the difference is obvious. Here's what you get that the alternatives simply don't offer.

    Features
    vs Competitors
    Typical SaaS
    Others
    Real-time collaborationAdd-on only
    ~
    Custom domain supportEnterprise tier
    Automated backupsManual only
    AI-assisted workflowsNot available
    ~
    API rate limits1k req/min
    SSO included+$150/mo
    SLA uptime guaranteeBest effort
    ~
    Audit logs30-day only
    Our Platform
    Recommended
    Real-time collaborationAll plans
    Custom domain supportAll plans
    Automated backupsHourly, 90-day retention
    AI-assisted workflowsBuilt-in
    API rate limitsUnlimited
    SSO includedFree on all plans
    SLA uptime guarantee99.99% guaranteed
    Audit logsUnlimited retention
    $249
    per month, typical competitor
    Learn more
    $89
    per month, everything included
    Start free trial →
    ``` **CSS:** ```css *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; } .fs06 { font-family: 'Plus Jakarta Sans', sans-serif; background: #fff; color: #111827; padding: 100px 24px; } .fs06__inner { max-width: 1060px; margin: 0 auto; } .fs06__header { text-align: center; margin-bottom: 64px; } .fs06__chip { display: inline-block; font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: #6d28d9; background: #f3eeff; padding: 5px 14px; border-radius: 100px; margin-bottom: 20px; } .fs06__h2 { font-family: 'Cabinet Grotesk', sans-serif; font-size: clamp(34px, 5vw, 58px); font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; margin-bottom: 16px; } .fs06__h2 span { color: #6d28d9; } .fs06__sub { font-size: 17px; color: #6b7280; max-width: 480px; margin: 0 auto; line-height: 1.65; } /* Toggle tabs */ .fs06__tabs { display: flex; justify-content: center; gap: 4px; background: #f3f4f6; border-radius: 12px; padding: 4px; max-width: 320px; margin: 0 auto 56px; } .fs06__tab { flex: 1; text-align: center; padding: 8px 16px; font-size: 14px; font-weight: 600; border-radius: 9px; cursor: pointer; color: #6b7280; transition: all 0.2s; user-select: none; } .fs06__tab--on { background: #fff; color: #111827; box-shadow: 0 1px 4px rgba(0,0,0,0.12); } /* Two-column comparison */ .fs06__compare { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; } .fs06__col { border-radius: 20px; overflow: hidden; border: 2px solid transparent; } .fs06__col--them { background: #f9fafb; border-color: #e5e7eb; } .fs06__col--us { background: #fff; border-color: #6d28d9; box-shadow: 0 0 0 1px #6d28d9, 0 20px 60px rgba(109,40,217,0.12); } .fs06__col-head { padding: 28px 28px 20px; display: flex; align-items: center; justify-content: space-between; } .fs06__col-name { font-family: 'Cabinet Grotesk', sans-serif; font-size: 18px; font-weight: 800; color: #111827; } .fs06__col--them .fs06__col-name { color: #6b7280; } .fs06__badge { font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 100px; letter-spacing: 0.06em; } .fs06__badge--purple { background: #f3eeff; color: #6d28d9; } .fs06__badge--gray { background: #e5e7eb; color: #9ca3af; } .fs06__divider { height: 1px; background: #e5e7eb; margin: 0 0 4px; } .fs06__row { display: flex; align-items: center; gap: 12px; padding: 14px 28px; font-size: 14px; color: #374151; border-bottom: 1px solid rgba(0,0,0,0.05); } .fs06__row:last-child { border-bottom: none; } .fs06__check { width: 20px; height: 20px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; } .fs06__check--yes { background: #d1fae5; color: #059669; } .fs06__check--no { background: #f3f4f6; color: #9ca3af; } .fs06__check--part { background: #fef3c7; color: #d97706; } .fs06__row-label { flex: 1; } .fs06__row-note { font-size: 12px; color: #9ca3af; } .fs06__col--us .fs06__row-note { color: #6d28d9; } /* Pricing footer */ .fs06__price-row { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 32px; } .fs06__price-card { border-radius: 16px; padding: 28px; text-align: center; } .fs06__price-card--them { background: #f9fafb; border: 1px solid #e5e7eb; } .fs06__price-card--us { background: linear-gradient(135deg, #6d28d9, #9b59f7); color: #fff; } .fs06__price-num { font-family: 'Cabinet Grotesk', sans-serif; font-size: 40px; font-weight: 800; line-height: 1; } .fs06__price-card--them .fs06__price-num { color: #9ca3af; } .fs06__price-period { font-size: 13px; opacity: 0.7; margin: 4px 0 16px; } .fs06__price-btn { display: inline-block; font-size: 14px; font-weight: 600; padding: 10px 24px; border-radius: 10px; text-decoration: none; transition: opacity 0.2s; } .fs06__price-btn:hover { opacity: 0.85; } .fs06__price-btn--gray { background: #e5e7eb; color: #6b7280; } .fs06__price-btn--white { background: #fff; color: #6d28d9; } @media (max-width: 640px) { .fs06__compare, .fs06__price-row { grid-template-columns: 1fr; } } @media (prefers-reduced-motion: reduce) { .fs06__tab, .fs06__price-btn { transition: none; } } ``` ### 07. CSS SaaS Features Section 2025 **Type:** Pure CSS **Description:** A full SaaS hero with animated mesh-gradient background, shimmer-gradient headline, live-pulse “Now in beta” ticker, G2/Capterra social proof strip, and three alternating feature rows with abstract stat mockups. Bricolage Grotesque + Inter. **HTML:** ```html
    Now in public beta · 2025

    The SaaS platform
    built for what's next

    Stop stitching together tools. One platform to collect, analyze, automate, and act — engineered for the pace modern teams actually move at.

    4.9 / 5 on G2 4.8 / 5 on Capterra Trusted by 10,000+ teams

    Three things your current stack can't do

    Automation
    Workflows that write themselves from your data
    Describe the outcome you want in plain English. The platform reads your event schema, maps triggers to actions, and suggests a fully-wired pipeline before you write a single line.
    • Natural language workflow creation
    • Auto-detected triggers from your event stream
    • One-click deploy to production
    94%
    Faster setup
    0
    Lines of code
    Analytics
    Answers, not just charts. Ask any question.
    No SQL. No BI tool. Type your question and get a chart, a number, or a ranked list — backed by the data in your warehouse, rendered in seconds.
    • Natural language querying over your live data
    • Drill-down filters surfaced automatically
    • Shareable snapshots with one click
    3s
    Query time
    Data sources
    Security
    Enterprise-grade security without the enterprise price tag
    SOC 2 Type II certified, GDPR-compliant data residency, and passkey-first authentication. No additional SKUs required for any of it.
    • SOC 2 Type II, HIPAA, ISO 27001
    • Hardware key + passkey MFA built-in
    • Regional data residency on all plans
    3
    Certifications
    $0
    Add-on cost
    ``` **CSS:** ```css *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; } .fs07 { font-family: 'Inter', sans-serif; background: #fff; color: #0f0f14; overflow: hidden; } /* Hero strip */ .fs07__hero { position: relative; padding: 100px 24px 80px; text-align: center; overflow: hidden; } .fs07__hero-mesh { position: absolute; inset: 0; background: radial-gradient(ellipse 80% 50% at 20% 40%, rgba(139,92,246,0.12) 0%, transparent 60%), radial-gradient(ellipse 60% 40% at 80% 60%, rgba(236,72,153,0.1) 0%, transparent 60%), radial-gradient(ellipse 50% 60% at 50% 0%, rgba(59,130,246,0.08) 0%, transparent 60%); pointer-events: none; } .fs07__ticker { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; color: #6b7280; border: 1px solid #e5e7eb; padding: 6px 16px; border-radius: 100px; margin-bottom: 32px; } .fs07__ticker-dot { width: 6px; height: 6px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 6px #22c55e; animation: fs07-blink 2s ease-in-out infinite; } @keyframes fs07-blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } } .fs07__h1 { font-family: 'Bricolage Grotesque', sans-serif; font-size: clamp(40px, 6vw, 78px); font-weight: 800; letter-spacing: -0.03em; line-height: 1.05; margin-bottom: 24px; position: relative; } .fs07__h1-word { display: inline-block; position: relative; } .fs07__h1-word--gradient { background: linear-gradient(135deg, #8b5cf6, #ec4899, #3b82f6); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; background-size: 200%; animation: fs07-shift 4s ease-in-out infinite alternate; } @keyframes fs07-shift { from { background-position: 0% 50%; } to { background-position: 100% 50%; } } .fs07__hero-sub { font-size: 18px; color: #6b7280; max-width: 520px; margin: 0 auto 40px; line-height: 1.65; } .fs07__cta-group { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; } .fs07__cta { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 600; padding: 13px 28px; border-radius: 12px; text-decoration: none; transition: transform 0.2s, box-shadow 0.2s; } .fs07__cta:hover { transform: translateY(-2px); } .fs07__cta--primary { background: linear-gradient(135deg, #8b5cf6, #ec4899); color: #fff; box-shadow: 0 4px 20px rgba(139,92,246,0.35); } .fs07__cta--primary:hover { box-shadow: 0 8px 30px rgba(139,92,246,0.45); } .fs07__cta--text { color: #6b7280; background: none; font-size: 14px; } /* Social proof strip */ .fs07__proof { padding: 20px 24px 0; display: flex; justify-content: center; align-items: center; gap: 32px; flex-wrap: wrap; } .fs07__proof-item { font-size: 13px; color: #9ca3af; display: flex; align-items: center; gap: 6px; } .fs07__proof-item::before { content: '★★★★★'; font-size: 11px; color: #f59e0b; } /* Features section */ .fs07__section { padding: 80px 24px; max-width: 1100px; margin: 0 auto; } .fs07__section-label { font-size: 12px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: #8b5cf6; text-align: center; margin-bottom: 12px; } .fs07__section-title { font-family: 'Bricolage Grotesque', sans-serif; font-size: clamp(28px, 4vw, 46px); font-weight: 800; letter-spacing: -0.02em; text-align: center; margin-bottom: 56px; } /* Alternating feature rows */ .fs07__feat-row { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; margin-bottom: 80px; } .fs07__feat-row:nth-child(even) .fs07__feat-vis { order: -1; } .fs07__feat-eyebrow { font-size: 12px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 14px; } .fs07__feat-row:nth-child(1) .fs07__feat-eyebrow { color: #8b5cf6; } .fs07__feat-row:nth-child(2) .fs07__feat-eyebrow { color: #ec4899; } .fs07__feat-row:nth-child(3) .fs07__feat-eyebrow { color: #3b82f6; } .fs07__feat-title { font-family: 'Bricolage Grotesque', sans-serif; font-size: clamp(22px, 2.5vw, 32px); font-weight: 800; letter-spacing: -0.02em; line-height: 1.2; margin-bottom: 14px; } .fs07__feat-body { font-size: 15px; line-height: 1.7; color: #6b7280; margin-bottom: 24px; } .fs07__feat-list { list-style: none; display: flex; flex-direction: column; gap: 10px; } .fs07__feat-list li { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; color: #374151; } .fs07__feat-list li::before { content: '→'; font-weight: 700; flex-shrink: 0; margin-top: 1px; } .fs07__feat-row:nth-child(1) .fs07__feat-list li::before { color: #8b5cf6; } .fs07__feat-row:nth-child(2) .fs07__feat-list li::before { color: #ec4899; } .fs07__feat-row:nth-child(3) .fs07__feat-list li::before { color: #3b82f6; } /* Visual areas */ .fs07__feat-vis { border-radius: 20px; aspect-ratio: 4/3; position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center; } .fs07__feat-row:nth-child(1) .fs07__feat-vis { background: linear-gradient(135deg, #f5f0ff, #ede8ff); } .fs07__feat-row:nth-child(2) .fs07__feat-vis { background: linear-gradient(135deg, #fff0f7, #ffe8f4); } .fs07__feat-row:nth-child(3) .fs07__feat-vis { background: linear-gradient(135deg, #eff6ff, #dbeafe); } .fs07__vis-card { background: #fff; border-radius: 14px; padding: 20px; width: 82%; box-shadow: 0 16px 48px rgba(0,0,0,0.1); } .fs07__vis-bar { height: 8px; border-radius: 4px; background: #eee; margin-bottom: 8px; } .fs07__vis-bar--1 { width: 65%; background: linear-gradient(90deg, #8b5cf6, #c4b5fd); } .fs07__vis-bar--2 { width: 80%; background: linear-gradient(90deg, #ec4899, #f9a8d4); } .fs07__vis-bar--3 { width: 55%; background: linear-gradient(90deg, #3b82f6, #93c5fd); } .fs07__vis-stat { display: flex; gap: 12px; margin-top: 16px; } .fs07__vis-stat-box { flex: 1; padding: 12px; background: #f9fafb; border-radius: 10px; text-align: center; } .fs07__vis-stat-num { font-family: 'Bricolage Grotesque', sans-serif; font-size: 22px; font-weight: 800; } .fs07__vis-stat-lbl { font-size: 10px; color: #9ca3af; margin-top: 2px; } @media (max-width: 700px) { .fs07__feat-row { grid-template-columns: 1fr; gap: 32px; } .fs07__feat-row:nth-child(even) .fs07__feat-vis { order: 0; } .fs07__proof { flex-direction: column; gap: 8px; } } @media (prefers-reduced-motion: reduce) { .fs07__ticker-dot, .fs07__h1-word--gradient { animation: none; } .fs07__cta { transition: none; } } ``` ### 08. CSS Feature Section 3D Perspective Cards **Type:** CSS + JS **Description:** A deep-black 6-card feature section where each card tilts in 3D on mousemove via `rotateX/rotateY`. Per-card colour top-stripe, glow intensifies on hover, ghost number decorations, and metric + arrow footer. Outfit. **HTML:** ```html
    Core platform

    Six pillars of a
    faster product

    Each capability was built to remove a specific category of friction. Together they compound into something much harder to replicate.

    01
    🚀
    Instant Previews
    Every branch gets a shareable URL the moment you push. Stakeholders review in production-identical environments, not screenshots.
    02
    🧩
    Component Library
    A living design system that syncs directly with your code. Designers and developers always reference the same source of truth.
    03
    ♻️
    Zero-Waste CI
    Only re-run tests and builds for code that actually changed. Granular caching cuts your CI spend by up to 70% from day one.
    04
    🔮
    Predictive Scaling
    ML-forecasted traffic patterns scale your infra before demand spikes hit — not in response to them. Goodbye cold-start latency.
    05
    🗂️
    Unified Observability
    Traces, metrics, and logs correlated in a single view. Follow a user request from client to database with one click — no tab-switching.
    06
    🔑
    Secrets Management
    Environment variables scoped by branch, team, and service. Rotation policies, leak detection, and audit trails built in, not bolted on.
    ``` **CSS:** ```css *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; } .fs08 { font-family: 'Outfit', sans-serif; background: #08080f; color: #f0eeff; padding: 100px 24px; overflow: hidden; min-height: 100vh; } .fs08__inner { max-width: 1060px; margin: 0 auto; } .fs08__header { text-align: center; margin-bottom: 72px; } .fs08__chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: #a78bfa; margin-bottom: 20px; } .fs08__chip-line { width: 24px; height: 1px; background: #a78bfa; } .fs08__h2 { font-size: clamp(36px, 5vw, 64px); font-weight: 800; letter-spacing: -0.025em; line-height: 1.07; margin-bottom: 18px; } .fs08__h2 span { color: transparent; -webkit-text-stroke: 1.5px rgba(167,139,250,0.6); } .fs08__sub { font-size: 17px; color: rgba(240,238,255,0.45); max-width: 480px; margin: 0 auto; line-height: 1.65; } /* 3D card grid */ .fs08__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; perspective: 1200px; } .fs08__card { position: relative; border-radius: 20px; padding: 36px 28px; overflow: hidden; cursor: pointer; transition: transform 0.4s cubic-bezier(.23,1,.32,1), box-shadow 0.4s; transform-style: preserve-3d; background: #12121e; border: 1px solid rgba(255,255,255,0.07); } .fs08__card:hover { box-shadow: 0 32px 80px rgba(0,0,0,0.5); } /* Color stripe on top */ .fs08__card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; border-radius: 20px 20px 0 0; } .fs08__card:nth-child(1)::before { background: linear-gradient(90deg, #7c3aed, #a78bfa); } .fs08__card:nth-child(2)::before { background: linear-gradient(90deg, #db2777, #f9a8d4); } .fs08__card:nth-child(3)::before { background: linear-gradient(90deg, #059669, #6ee7b7); } .fs08__card:nth-child(4)::before { background: linear-gradient(90deg, #d97706, #fde68a); } .fs08__card:nth-child(5)::before { background: linear-gradient(90deg, #0284c7, #7dd3fc); } .fs08__card:nth-child(6)::before { background: linear-gradient(90deg, #be123c, #fda4af); } /* Glow behind card content */ .fs08__card-glow { position: absolute; width: 200px; height: 200px; border-radius: 50%; filter: blur(60px); bottom: -80px; right: -60px; opacity: 0.2; transition: opacity 0.4s; pointer-events: none; } .fs08__card:hover .fs08__card-glow { opacity: 0.4; } .fs08__card:nth-child(1) .fs08__card-glow { background: #7c3aed; } .fs08__card:nth-child(2) .fs08__card-glow { background: #db2777; } .fs08__card:nth-child(3) .fs08__card-glow { background: #059669; } .fs08__card:nth-child(4) .fs08__card-glow { background: #d97706; } .fs08__card:nth-child(5) .fs08__card-glow { background: #0284c7; } .fs08__card:nth-child(6) .fs08__card-glow { background: #be123c; } .fs08__card-num { font-size: 48px; font-weight: 800; opacity: 0.06; position: absolute; top: 16px; right: 20px; line-height: 1; pointer-events: none; user-select: none; } .fs08__icon { font-size: 30px; margin-bottom: 20px; display: block; position: relative; z-index: 1; } .fs08__card-title { font-size: 20px; font-weight: 800; margin-bottom: 12px; color: #fff; letter-spacing: -0.01em; position: relative; z-index: 1; } .fs08__card-body { font-size: 14px; line-height: 1.65; color: rgba(240,238,255,0.5); position: relative; z-index: 1; } .fs08__card-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 24px; position: relative; z-index: 1; } .fs08__card-metric { font-size: 22px; font-weight: 800; } .fs08__card:nth-child(1) .fs08__card-metric { color: #a78bfa; } .fs08__card:nth-child(2) .fs08__card-metric { color: #f9a8d4; } .fs08__card:nth-child(3) .fs08__card-metric { color: #6ee7b7; } .fs08__card:nth-child(4) .fs08__card-metric { color: #fde68a; } .fs08__card:nth-child(5) .fs08__card-metric { color: #7dd3fc; } .fs08__card:nth-child(6) .fs08__card-metric { color: #fda4af; } .fs08__card-metric-lbl { font-size: 11px; color: rgba(240,238,255,0.3); margin-top: 2px; } .fs08__arrow { width: 32px; height: 32px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.12); display: flex; align-items: center; justify-content: center; font-size: 14px; color: rgba(255,255,255,0.4); transition: border-color 0.2s, color 0.2s; } .fs08__card:hover .fs08__arrow { border-color: rgba(255,255,255,0.3); color: #fff; } @media (max-width: 768px) { .fs08__grid { grid-template-columns: 1fr 1fr; } } @media (max-width: 500px) { .fs08__grid { grid-template-columns: 1fr; } } @media (prefers-reduced-motion: reduce) { .fs08__card { transition: none; } } ``` **JS:** ```js // 3D tilt on hover const cards = document.querySelectorAll('.fs08__card'); cards.forEach(card => { card.addEventListener('mousemove', e => { const rect = card.getBoundingClientRect(); const x = (e.clientX - rect.left) / rect.width - 0.5; const y = (e.clientY - rect.top) / rect.height - 0.5; card.style.transform = `perspective(800px) rotateY(${x * 12}deg) rotateX(${-y * 10}deg) translateZ(10px)`; }); card.addEventListener('mouseleave', () => { card.style.transform = ''; }); }); ``` ### 09. CSS Feature Section with Floating Mockup **Type:** Pure CSS **Description:** Warm parchment background with a CSS-animated floating phone mockup (bob keyframe), two counterphased floating metric cards, a serif italic headline, and a 4-tile bottom grid. Instrument Serif italic + Inter. **HTML:** ```html
    Mobile-first platform

    Your entire business,
    in the palm of your hand

    A native-quality mobile experience for managing your operations, approving requests, and staying on top of what matters — wherever you are.

    • Real-time notifications with one-tap approval
    • Offline-capable sync for low-connectivity environments
    • Biometric authentication and face unlock support
    • Available on iOS and Android — same feature parity
    99.9%
    Offline reliability
    4.9★
    App Store rating
    +$12,440
    3 approvals
    On track ↑
    i.
    Push Notifications
    Smart alerts that know when to interrupt and when to queue — based on your calendar and work patterns.
    ii.
    Offline Mode
    Full read and write access when you're on a plane or in a basement. Changes sync the moment you reconnect.
    iii.
    Widget Support
    Key metrics on your home screen. See today's pipeline, pending approvals, or team pulse without opening the app.
    iv.
    Apple Watch / Wear OS
    Approve requests, check alerts, and see summaries from your wrist. No phone required for common actions.
    ``` **CSS:** ```css *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; } .fs09 { font-family: 'Inter', sans-serif; background: #f8f6f1; color: #1a1814; padding: 96px 24px; overflow: hidden; min-height: 100vh; } .fs09__inner { max-width: 1100px; margin: 0 auto; } /* Split hero */ .fs09__split { display: grid; grid-template-columns: 5fr 6fr; gap: 64px; align-items: center; margin-bottom: 96px; } .fs09__eyebrow { font-size: 12px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: #b45309; margin-bottom: 20px; } .fs09__h2 { font-family: 'Instrument Serif', serif; font-size: clamp(38px, 5vw, 62px); font-weight: 400; line-height: 1.1; letter-spacing: -0.01em; margin-bottom: 20px; } .fs09__h2 em { font-style: italic; color: #b45309; } .fs09__body { font-size: 16px; line-height: 1.75; color: #5c5447; margin-bottom: 32px; } .fs09__list { list-style: none; display: flex; flex-direction: column; gap: 12px; margin-bottom: 36px; } .fs09__list li { display: flex; align-items: center; gap: 10px; font-size: 15px; color: #2d2920; } .fs09__check { width: 20px; height: 20px; border-radius: 50%; background: #fef3c7; border: 1.5px solid #f59e0b; display: flex; align-items: center; justify-content: center; font-size: 10px; color: #92400e; flex-shrink: 0; } .fs09__cta-row { display: flex; gap: 12px; align-items: center; } .fs09__btn-primary { display: inline-flex; align-items: center; gap: 8px; background: #1a1814; color: #f8f6f1; font-size: 15px; font-weight: 600; padding: 13px 26px; border-radius: 100px; text-decoration: none; transition: background 0.2s; } .fs09__btn-primary:hover { background: #2d2920; } .fs09__btn-link { font-size: 14px; color: #5c5447; text-decoration: underline; text-underline-offset: 3px; } /* Floating mockup area */ .fs09__mockup-wrap { position: relative; height: 480px; } .fs09__phone { position: absolute; right: 0; top: 50%; transform: translateY(-50%); width: 260px; background: #1a1814; border-radius: 36px; padding: 16px; box-shadow: 0 40px 100px rgba(0,0,0,0.25); z-index: 2; animation: fs09-float 5s ease-in-out infinite; } @keyframes fs09-float { 0%, 100% { transform: translateY(-50%) translateY(0); } 50% { transform: translateY(-50%) translateY(-14px); } } .fs09__phone-notch { width: 80px; height: 22px; background: #0a0908; border-radius: 100px; margin: 0 auto 14px; } .fs09__phone-screen { background: #fff; border-radius: 24px; padding: 16px; min-height: 340px; } .fs09__phone-bar { height: 6px; border-radius: 3px; background: #f0ece4; margin-bottom: 8px; } .fs09__phone-bar--accent { background: linear-gradient(90deg, #b45309, #f59e0b); width: 70%; } .fs09__phone-bar--sm { width: 45%; } .fs09__phone-bar--md { width: 80%; } .fs09__phone-cards { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; } .fs09__phone-card { background: #fafafa; border: 1px solid #e8e4dc; border-radius: 10px; padding: 10px; } .fs09__phone-card-top { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; } .fs09__phone-avatar { width: 20px; height: 20px; border-radius: 50%; } .fs09__phone-avatar--a { background: linear-gradient(135deg, #b45309, #f59e0b); } .fs09__phone-avatar--b { background: linear-gradient(135deg, #6d28d9, #a78bfa); } .fs09__phone-card-line { height: 5px; flex: 1; border-radius: 3px; background: #e8e4dc; } .fs09__phone-card-metric { font-size: 13px; font-weight: 700; color: #b45309; } /* Floating mini cards */ .fs09__float-card { position: absolute; background: #fff; border-radius: 14px; padding: 14px 18px; box-shadow: 0 12px 40px rgba(0,0,0,0.12); z-index: 3; border: 1px solid rgba(0,0,0,0.07); } .fs09__float-card--a { left: 0; top: 40px; animation: fs09-floatA 6s ease-in-out infinite; } .fs09__float-card--b { left: 60px; bottom: 60px; animation: fs09-floatB 7s ease-in-out infinite; } @keyframes fs09-floatA { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-10px) rotate(-1deg); } } @keyframes fs09-floatB { 0%, 100% { transform: translateY(0) rotate(1deg); } 50% { transform: translateY(10px) rotate(2deg); } } .fs09__fc-num { font-family: 'Instrument Serif', serif; font-size: 28px; font-weight: 400; color: #b45309; line-height: 1; } .fs09__fc-label { font-size: 11px; color: #9c8f7e; margin-top: 2px; white-space: nowrap; } /* Feature tiles below */ .fs09__tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px; background: #e8e4dc; border-radius: 20px; overflow: hidden; border: 1px solid #e8e4dc; } .fs09__tile { background: #f8f6f1; padding: 32px 24px; transition: background 0.2s; } .fs09__tile:hover { background: #fff; } .fs09__tile-num { font-family: 'Instrument Serif', serif; font-size: 14px; font-style: italic; color: #b45309; margin-bottom: 12px; } .fs09__tile-title { font-size: 15px; font-weight: 600; margin-bottom: 8px; color: #1a1814; } .fs09__tile-desc { font-size: 13px; line-height: 1.6; color: #7a6e60; } @media (max-width: 780px) { .fs09__split { grid-template-columns: 1fr; } .fs09__mockup-wrap { height: 340px; } .fs09__tiles { grid-template-columns: 1fr 1fr; } } @media (max-width: 480px) { .fs09__tiles { grid-template-columns: 1fr; } } @media (prefers-reduced-motion: reduce) { .fs09__phone, .fs09__float-card--a, .fs09__float-card--b { animation: none !important; transform: translateY(-50%) !important; } .fs09__float-card--a, .fs09__float-card--b { transform: none !important; } } ``` ### 10. CSS Feature Section Timeline Layout **Type:** CSS + JS **Description:** Midnight `#060612` background with a vertical timeline: an animated traveling-glow line, five staggered IntersectionObserver-reveal phase cards with status badges (Live/Active/New/Beta/Coming), JetBrains Mono labels, and per-phase accent colours. Sora + JetBrains Mono. **HTML:** ```html
    platform_roadmap.json

    Built in layers.
    Shipped with purpose.

    Each capability unlocks the next. Here's how the platform was architected — and what it enables at every stage.

    PHASE_01 Live
    Core Event Ingestion
    A durable, ordered event log that accepts data from any language via SDK or HTTP. The foundation everything else builds on — never lossy, never slow.
    kafka-compatible at-least-once idempotent
    1B+
    events / day
    PHASE_02 Active
    Stream Processing Engine
    Stateful transformations, windowed aggregations, and joins run at the edge — milliseconds after events arrive, not hours later in a batch job.
    sub-50ms exactly-once autoscaling
    48ms
    p99 latency
    PHASE_03 New
    Semantic Layer + Query API
    Define your metrics once, query them everywhere. Consistent definitions across dashboards, alerts, and embedded analytics — no more metric drift across teams.
    metric-store rest + graphql cache-first
    1 def
    metric source
    PHASE_04 Beta
    AI Anomaly Detection
    Unsupervised models trained on your specific traffic fingerprint. Flags statistical outliers and surfaces likely root causes before your on-call engineer wakes up.
    zero-config adaptive baseline explainable
    94%
    detection rate
    PHASE_05 Coming Q3
    Automated Remediation
    Close the loop between detection and resolution. Pre-approved runbooks execute automatically when a known issue is detected — human approval for anything novel.
    runbook-driven approval gates full audit trail
    0
    manual pages

    All five stages included in every plan. No roadmap upsells.

    Explore the full platform →
    ``` **CSS:** ```css *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; } .fs10 { font-family: 'Sora', sans-serif; background: #060612; color: #e8e6f4; padding: 100px 24px; min-height: 100vh; overflow: hidden; } .fs10__inner { max-width: 900px; margin: 0 auto; } .fs10__header { text-align: center; margin-bottom: 80px; } .fs10__pre { display: inline-flex; align-items: center; gap: 6px; font-family: 'JetBrains Mono', monospace; font-size: 11px; color: #64ffda; border: 1px solid rgba(100,255,218,0.2); background: rgba(100,255,218,0.05); padding: 5px 12px; border-radius: 6px; margin-bottom: 24px; } .fs10__h2 { font-size: clamp(34px, 5vw, 58px); font-weight: 800; letter-spacing: -0.025em; line-height: 1.1; margin-bottom: 18px; } .fs10__h2 span { background: linear-gradient(135deg, #64ffda, #00b4d8); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; } .fs10__sub { font-size: 17px; color: rgba(232,230,244,0.45); max-width: 460px; margin: 0 auto; line-height: 1.65; } /* Timeline */ .fs10__timeline { position: relative; padding-left: 60px; } /* Vertical line */ .fs10__timeline::before { content: ''; position: absolute; left: 20px; top: 0; bottom: 0; width: 1px; background: linear-gradient(to bottom, transparent, rgba(100,255,218,0.3) 10%, rgba(100,255,218,0.3) 90%, transparent); } /* Moving glow on the line */ .fs10__line-glow { position: absolute; left: 16px; top: 0; width: 9px; height: 80px; background: linear-gradient(to bottom, transparent, #64ffda, transparent); border-radius: 100px; animation: fs10-travel 4s ease-in-out infinite; pointer-events: none; } @keyframes fs10-travel { 0% { top: 0; opacity: 0; } 10% { opacity: 1; } 90% { opacity: 1; } 100% { top: calc(100% - 80px); opacity: 0; } } .fs10__item { position: relative; padding: 0 0 56px 0; opacity: 0; transform: translateX(-20px); transition: opacity 0.6s cubic-bezier(.4,0,.2,1), transform 0.6s cubic-bezier(.4,0,.2,1); } .fs10__item.fs10--visible { opacity: 1; transform: none; } .fs10__item:last-child { padding-bottom: 0; } /* Timeline node */ .fs10__node { position: absolute; left: -49px; top: 4px; width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(100,255,218,0.3); background: #060612; display: flex; align-items: center; justify-content: center; transition: border-color 0.3s, box-shadow 0.3s; } .fs10__item:hover .fs10__node { border-color: #64ffda; box-shadow: 0 0 12px rgba(100,255,218,0.4); } .fs10__node-dot { width: 6px; height: 6px; border-radius: 50%; background: rgba(100,255,218,0.4); transition: background 0.3s; } .fs10__item:hover .fs10__node-dot { background: #64ffda; } /* Card */ .fs10__card { background: #0d0d20; border: 1px solid rgba(255,255,255,0.07); border-radius: 18px; padding: 28px 32px; display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: start; transition: border-color 0.3s, background 0.3s; position: relative; overflow: hidden; } .fs10__card::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; border-radius: 18px 0 0 18px; opacity: 0; transition: opacity 0.3s; } .fs10__item:nth-child(1) .fs10__card::before { background: #64ffda; } .fs10__item:nth-child(2) .fs10__card::before { background: #00b4d8; } .fs10__item:nth-child(3) .fs10__card::before { background: #a78bfa; } .fs10__item:nth-child(4) .fs10__card::before { background: #fb923c; } .fs10__item:nth-child(5) .fs10__card::before { background: #34d399; } .fs10__item:hover .fs10__card { border-color: rgba(255,255,255,0.14); background: #10102a; } .fs10__item:hover .fs10__card::before { opacity: 1; } .fs10__card-meta { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; } .fs10__card-phase { font-family: 'JetBrains Mono', monospace; font-size: 10px; color: rgba(232,230,244,0.35); letter-spacing: 0.08em; } .fs10__card-status { font-size: 10px; font-weight: 600; padding: 3px 8px; border-radius: 100px; } .fs10__status--live { background: rgba(100,255,218,0.1); color: #64ffda; } .fs10__status--active { background: rgba(0,180,216,0.1); color: #00b4d8; } .fs10__status--new { background: rgba(167,139,250,0.1); color: #a78bfa; } .fs10__status--beta { background: rgba(251,146,60,0.1); color: #fb923c; } .fs10__status--soon { background: rgba(52,211,153,0.1); color: #34d399; } .fs10__card-title { font-size: 20px; font-weight: 800; letter-spacing: -0.015em; color: #fff; margin-bottom: 10px; } .fs10__card-body { font-size: 14px; line-height: 1.7; color: rgba(232,230,244,0.5); margin-bottom: 18px; } .fs10__card-tags { display: flex; flex-wrap: wrap; gap: 6px; } .fs10__tag { font-family: 'JetBrains Mono', monospace; font-size: 11px; padding: 4px 10px; border-radius: 6px; background: rgba(255,255,255,0.05); color: rgba(232,230,244,0.45); } /* Right column: metric */ .fs10__card-right { text-align: right; } .fs10__metric-big { font-size: 36px; font-weight: 800; line-height: 1; margin-bottom: 4px; } .fs10__item:nth-child(1) .fs10__metric-big { color: #64ffda; } .fs10__item:nth-child(2) .fs10__metric-big { color: #00b4d8; } .fs10__item:nth-child(3) .fs10__metric-big { color: #a78bfa; } .fs10__item:nth-child(4) .fs10__metric-big { color: #fb923c; } .fs10__item:nth-child(5) .fs10__metric-big { color: #34d399; } .fs10__metric-lbl { font-size: 11px; color: rgba(232,230,244,0.3); white-space: nowrap; } /* CTA */ .fs10__cta-wrap { text-align: center; margin-top: 64px; padding-top: 48px; border-top: 1px solid rgba(255,255,255,0.07); } .fs10__cta-wrap p { font-size: 16px; color: rgba(232,230,244,0.45); margin-bottom: 20px; } .fs10__btn { display: inline-flex; align-items: center; gap: 10px; background: rgba(100,255,218,0.1); border: 1px solid rgba(100,255,218,0.3); color: #64ffda; font-family: 'Sora', sans-serif; font-size: 15px; font-weight: 600; padding: 13px 28px; border-radius: 100px; text-decoration: none; transition: background 0.2s, box-shadow 0.2s; } .fs10__btn:hover { background: rgba(100,255,218,0.18); box-shadow: 0 0 24px rgba(100,255,218,0.2); } @media (max-width: 600px) { .fs10__timeline { padding-left: 40px; } .fs10__node { left: -32px; } .fs10__card { grid-template-columns: 1fr; } .fs10__card-right { text-align: left; display: flex; gap: 12px; align-items: baseline; } } @media (prefers-reduced-motion: reduce) { .fs10__line-glow { animation: none; } .fs10__item { opacity: 1; transform: none; transition: none; } .fs10__card, .fs10__node, .fs10__card::before { transition: none; } } ``` **JS:** ```js const observer = new IntersectionObserver(entries => { entries.forEach(e => { if (e.isIntersecting) { e.target.classList.add('fs10--visible'); observer.unobserve(e.target); } }); }, { threshold: 0.1 }); document.querySelectorAll('.fs10__item').forEach((el, i) => { el.style.transitionDelay = `${i * 0.12}s`; observer.observe(el); }); ``` --- ## 15 CSS Flexbox Layouts URL: https://codefronts.com/layouts/css-flexbox-layouts/ Description: 15 production-ready CSS flexbox layouts with live demos and copy-paste code — holy grail page shell, responsive card grid, sticky navbar, masonry-style columns, sidebar dashboard, product cards, pricing table, magazine article, sticky footer with min-block-size: 100dvh, centered hero, vertical timeline, chat interface, mosaic gallery, two-column form, and kanban board. Every demo is mobile-first, WCAG-friendly, and works without a build step. Demo count: 15 ### 01. CSS Flexbox Holy Grail Layout **Type:** Pure CSS **Description:** A classic holy grail layout — fixed header, footer, left sidebar, right aside, and expanding main column — built entirely with nested flex containers and no CSS Grid. **HTML:** ```html
    Home › Dashboard › Overview

    Holy Grail Layout
    with CSS Flexbox

    Pure CSS
    Header · Sidebar · Content · Aside · Footer

    The Holy Grail layout — a full-height page with a header, sticky footer, left sidebar, right aside, and fluid centre — solved the hardest layout problem of the float era. Flexbox reduces it to two nested flex containers: an outer column wrapper and an inner row middle section.

    The outer wrapper uses flex-direction: column and min-height: 100%. The middle row gets flex: 1 to fill remaining space, while sidebars use a fixed width with flex-shrink: 0 to resist compression.

    flex: 1
    Main
    Fills remaining width
    flex-shrink: 0
    Sides
    Fixed at 180px each
    flex-direction
    Column
    Header stacks on footer
    ``` **CSS:** ```css .fl-01, .fl-01 *, .fl-01 *::before, .fl-01 *::after { margin: 0; padding: 0; box-sizing: border-box; } .fl-01 ::selection { background: #6c63ff; color: #fff; } .fl-01 { --ink: #1a1a2e; --muted: #6b7280; --accent: #6c63ff; --accent2: #f59e0b; --surface: #f8f7ff; --border: #e5e3ff; --header-bg: #1a1a2e; --sidebar-bg: #f0eeff; --aside-bg: #fff8ed; --content-bg: #ffffff; --footer-bg: #1a1a2e; font-family: 'Inter', sans-serif; background: var(--surface); min-height: 500px; border-radius: 16px; overflow: hidden; border: 1px solid var(--border); } /* Holy Grail: column flex on outer, row flex on middle */ .fl-01__wrapper { display: flex; flex-direction: column; min-height: 500px; } /* ── Header ── */ .fl-01__header { background: var(--header-bg); color: #fff; padding: 14px 24px; display: flex; align-items: center; justify-content: space-between; flex-shrink: 0; } .fl-01__logo { font-family: 'Playfair Display', serif; font-size: 1.25rem; letter-spacing: -0.02em; } .fl-01__logo span { color: var(--accent2); } .fl-01__nav { display: flex; gap: 20px; list-style: none; } .fl-01__nav li a { color: rgba(255,255,255,0.7); text-decoration: none; font-size: 0.8rem; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; transition: color 0.2s; } .fl-01__nav li a:hover { color: #fff; } /* ── Middle row: sidebar + main + aside ── */ .fl-01__body { display: flex; flex: 1; min-height: 0; } /* ── Left Sidebar ── */ .fl-01__sidebar { background: var(--sidebar-bg); width: 180px; flex-shrink: 0; padding: 20px 16px; border-right: 1px solid var(--border); display: flex; flex-direction: column; gap: 4px; } .fl-01__sidebar-label { font-size: 0.65rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); padding: 8px 8px 4px; } .fl-01__sidebar-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; font-size: 0.82rem; font-weight: 500; color: var(--ink); cursor: pointer; transition: background 0.15s; } .fl-01__sidebar-item:hover { background: rgba(108,99,255,0.1); } .fl-01__sidebar-item.is-active { background: var(--accent); color: #fff; } .fl-01__sidebar-icon { width: 18px; height: 18px; border-radius: 4px; background: currentColor; opacity: 0.25; } .fl-01__sidebar-item.is-active .fl-01__sidebar-icon { opacity: 0.6; background: #fff; } /* ── Main Content ── */ .fl-01__main { flex: 1; background: var(--content-bg); padding: 24px; overflow-y: auto; display: flex; flex-direction: column; gap: 16px; } .fl-01__breadcrumb { font-size: 0.72rem; color: var(--muted); display: flex; align-items: center; gap: 6px; } .fl-01__breadcrumb span { color: var(--ink); font-weight: 600; } .fl-01__main-title { font-family: 'Playfair Display', serif; font-size: 1.4rem; color: var(--ink); line-height: 1.3; } .fl-01__meta { display: flex; align-items: center; gap: 12px; font-size: 0.75rem; color: var(--muted); } .fl-01__tag { background: rgba(108,99,255,0.1); color: var(--accent); font-weight: 600; padding: 2px 8px; border-radius: 20px; font-size: 0.7rem; } .fl-01__content-body { font-size: 0.85rem; color: var(--muted); line-height: 1.7; } .fl-01__content-body p + p { margin-top: 10px; } .fl-01__divider { height: 1px; background: var(--border); } .fl-01__cards { display: flex; gap: 12px; } .fl-01__card { flex: 1; border: 1px solid var(--border); border-radius: 10px; padding: 14px; } .fl-01__card-label { font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 6px; } .fl-01__card-value { font-size: 1.4rem; font-weight: 700; color: var(--ink); } .fl-01__card-delta { font-size: 0.72rem; color: #10b981; font-weight: 600; margin-top: 2px; } /* ── Right Aside ── */ .fl-01__aside { background: var(--aside-bg); width: 180px; flex-shrink: 0; padding: 20px 16px; border-left: 1px solid var(--border); display: flex; flex-direction: column; gap: 12px; } .fl-01__aside-title { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); } .fl-01__aside-item { display: flex; flex-direction: column; gap: 4px; padding: 10px; background: #fff; border-radius: 8px; border: 1px solid #fde68a; } .fl-01__aside-name { font-size: 0.78rem; font-weight: 600; color: var(--ink); } .fl-01__aside-sub { font-size: 0.7rem; color: var(--muted); } .fl-01__aside-bar-wrap { height: 4px; background: #fde68a; border-radius: 4px; overflow: hidden; margin-top: 2px; } .fl-01__aside-bar { height: 100%; background: var(--accent2); border-radius: 4px; animation: fl-01-bar-grow 1.2s ease both; } @keyframes fl-01-bar-grow { from { width: 0; } } /* ── Footer ── */ .fl-01__footer { background: var(--footer-bg); color: rgba(255,255,255,0.5); padding: 12px 24px; display: flex; align-items: center; justify-content: space-between; font-size: 0.72rem; flex-shrink: 0; } .fl-01__footer-links { display: flex; gap: 16px; list-style: none; } .fl-01__footer-links a { color: rgba(255,255,255,0.4); text-decoration: none; } .fl-01__footer-links a:hover { color: #fff; } /* Label overlay */ .fl-01__zone-label { display: inline-block; font-size: 0.62rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; background: rgba(108,99,255,0.12); color: var(--accent); padding: 2px 7px; border-radius: 4px; margin-bottom: 6px; } @media (prefers-reduced-motion: reduce) { .fl-01__aside-bar { animation: none; } } ``` ### 02. CSS Flexbox Card Grid Layout **Type:** Pure CSS **Description:** A responsive flex card grid with a featured wide card and uniform standard cards that wrap automatically — no media queries required for the basic reflow. **HTML:** ```html

    Flex Card Grid

    flex-wrap row layout with featured & standard cards

    All
    Design
    Dev
    Motion
    New
    CSS Layout
    Auto Sizing with flex-basis
    Use flex: 1 1 200px for columns that grow and wrap naturally.
    Guide
    Performance
    Gap vs Margin in Flex Rows
    The gap property skips edge gutters. No negative-margin hacks needed.
    Pro
    Advanced
    Order & Reordering Flex Items
    The order property reshuffles DOM order visually, ideal for mobile-first designs.
    ``` **CSS:** ```css .fl-02, .fl-02 *, .fl-02 *::before, .fl-02 *::after { margin: 0; padding: 0; box-sizing: border-box; } .fl-02 ::selection { background: #ff6b6b; color: #fff; } .fl-02 { --ink: #1c1c1e; --muted: #8e8e93; --accent: #ff6b6b; --accent2: #ffd93d; --green: #6bcb77; --blue: #4d96ff; --surface: #0f0f13; --card: #1c1c24; --card-border: rgba(255,255,255,0.07); font-family: 'DM Sans', sans-serif; background: var(--surface); padding: 28px; min-height: 500px; border-radius: 16px; } .fl-02__header { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 6px; } .fl-02__title { font-family: 'DM Serif Display', serif; font-size: 1.5rem; color: #fff; } .fl-02__subtitle { font-size: 0.78rem; color: var(--muted); margin-bottom: 20px; } .fl-02__filter-tabs { display: flex; gap: 8px; margin-bottom: 20px; } .fl-02__tab { padding: 6px 14px; border-radius: 20px; font-size: 0.75rem; font-weight: 600; cursor: pointer; background: var(--card); color: var(--muted); border: 1px solid var(--card-border); transition: all 0.2s; } .fl-02__tab.is-active { background: var(--accent); color: #fff; border-color: transparent; } /* Card grid: flex-wrap row */ .fl-02__grid { display: flex; flex-wrap: wrap; gap: 14px; } /* Featured: 2/3 width */ .fl-02__card { background: var(--card); border: 1px solid var(--card-border); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; flex: 1 1 calc(33% - 14px); min-width: 160px; transition: transform 0.2s, box-shadow 0.2s; cursor: pointer; } .fl-02__card:hover { transform: translateY(-3px); box-shadow: 0 12px 40px rgba(0,0,0,0.4); } .fl-02__card--featured { flex: 2 1 calc(66% - 7px); flex-direction: row; } .fl-02__card-thumb { height: 120px; position: relative; overflow: hidden; flex-shrink: 0; } .fl-02__card--featured .fl-02__card-thumb { width: 200px; height: auto; } .fl-02__card-thumb-bg { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; } .fl-02__card-thumb-shape { width: 60px; height: 60px; border-radius: 50%; opacity: 0.3; animation: fl-02-pulse 3s ease-in-out infinite; } @keyframes fl-02-pulse { 0%,100% { transform: scale(1); opacity: 0.3; } 50% { transform: scale(1.15); opacity: 0.5; } } .fl-02__card-badge { position: absolute; top: 10px; left: 10px; font-size: 0.62rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; padding: 3px 8px; border-radius: 4px; color: #fff; } .fl-02__card-body { padding: 14px; display: flex; flex-direction: column; flex: 1; gap: 6px; } .fl-02__card-category { font-size: 0.68rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); } .fl-02__card-name { font-size: 0.92rem; font-weight: 700; color: #fff; line-height: 1.3; } .fl-02__card--featured .fl-02__card-name { font-size: 1.1rem; } .fl-02__card-desc { font-size: 0.75rem; color: var(--muted); line-height: 1.6; flex: 1; } .fl-02__card-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 4px; padding-top: 10px; border-top: 1px solid var(--card-border); } .fl-02__card-price { font-size: 1rem; font-weight: 700; color: #fff; } .fl-02__card-cta { font-size: 0.72rem; font-weight: 700; padding: 5px 12px; border-radius: 6px; color: #fff; letter-spacing: 0.04em; } @media (prefers-reduced-motion: reduce) { .fl-02__card-thumb-shape { animation: none; } .fl-02__card { transition: none; } } ``` ### 03. CSS Flexbox Navigation Bar **Type:** Pure CSS **Description:** Three navigation bar variants — space-between spread, absolutely centered links with flex spacers, and a pill-style active-highlight nav — all built with flex alignment tricks. **HTML:** ```html
    space-between
    centered links
    pill nav
    Get started →
    Logo Left · Links Center
    justify-content: space-between
    flex: 1 spacers push links
    Two invisible flex: 1 spacers flank the link list, centering it between logo and actions.
    Absolute Center Trick
    position: absolute
    left: 50%; translateX(-50%)
    Links use absolute positioning on the nav container to achieve pixel-perfect centering independent of logo width.
    Pill Nav Pattern
    border-radius: 40px
    align-items: center
    Wrapping the entire flex row in a pill border-radius creates a floating nav aesthetic popular in SaaS landing pages.
    ``` **CSS:** ```css .fl-03, .fl-03 *, .fl-03 *::before, .fl-03 *::after { margin: 0; padding: 0; box-sizing: border-box; } .fl-03 ::selection { background: #00f5c4; color: #000; } .fl-03 { --bg: #0b0c10; --surface: #13151a; --border: rgba(255,255,255,0.08); --accent: #00f5c4; --accent2: #ff5c87; --muted: rgba(255,255,255,0.45); --text: #fff; font-family: 'Syne', sans-serif; background: var(--bg); padding: 12px 0 20px; min-height: 500px; border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; gap: 8px; } /* Variant row — wraps the variant tag + the nav itself. Tag sits ABOVE the nav as a non-overlapping caption so it never conflicts with the actions group on narrow viewports. */ .fl-03__nav-row { display: flex; flex-direction: column; gap: 6px; padding: 12px 24px 0; } .fl-03__nav-tag { align-self: flex-start; font-size: 0.6rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); opacity: 0.75; padding: 2px 8px; background: rgba(0,245,196,0.08); border: 1px solid rgba(0,245,196,0.2); border-radius: 4px; } .fl-03__nav-tag--pink { color: var(--accent2); background: rgba(255,92,135,0.08); border-color: rgba(255,92,135,0.2); } /* ── Navbar 1: Space-between classic ── */ .fl-03__nav { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 0 16px; height: 56px; display: flex; align-items: center; gap: 8px; min-width: 0; } /* Logo */ .fl-03__logo { font-size: 1.1rem; font-weight: 800; color: var(--text); letter-spacing: -0.03em; flex-shrink: 0; } .fl-03__logo em { color: var(--accent); font-style: normal; } /* Nav links group (center or left) */ .fl-03__links { display: flex; align-items: center; gap: 2px; list-style: none; } .fl-03__link { padding: 7px 14px; border-radius: 8px; font-size: 0.8rem; font-weight: 600; color: var(--muted); cursor: pointer; position: relative; transition: color 0.2s, background 0.2s; } .fl-03__link:hover { color: var(--text); background: rgba(255,255,255,0.06); } .fl-03__link.is-active { color: var(--text); } .fl-03__link.is-active::after { content: ''; position: absolute; bottom: -1px; left: 50%; transform: translateX(-50%); width: 20px; height: 2px; background: var(--accent); border-radius: 2px; } .fl-03__link-badge { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; border-radius: 50%; background: var(--accent2); color: #fff; font-size: 0.6rem; font-weight: 800; margin-left: 4px; } /* Actions group */ .fl-03__actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; } .fl-03__btn { padding: 6px 16px; border-radius: 8px; font-size: 0.78rem; font-weight: 700; font-family: 'Syne', sans-serif; cursor: pointer; border: none; transition: opacity 0.2s, transform 0.15s; } .fl-03__btn:hover { opacity: 0.85; transform: translateY(-1px); } .fl-03__btn--ghost { background: transparent; color: var(--muted); border: 1px solid var(--border); } .fl-03__btn--ghost:hover { color: var(--text); } .fl-03__btn--primary { background: var(--accent); color: #000; } .fl-03__avatar { width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg, #ff5c87, #6c63ff); display: flex; align-items: center; justify-content: center; font-size: 0.72rem; font-weight: 800; color: #fff; cursor: pointer; flex-shrink: 0; } .fl-03__icon-btn { width: 34px; height: 34px; border-radius: 8px; background: rgba(255,255,255,0.04); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--muted); font-size: 0.9rem; transition: background 0.2s, color 0.2s; } .fl-03__icon-btn:hover { background: rgba(255,255,255,0.1); color: var(--text); } /* Spacer utility */ .fl-03__spacer { flex: 1; } /* ── Variant descriptor cards ── */ .fl-03__variants { display: flex; flex: 1; padding: 20px 24px; gap: 14px; flex-wrap: wrap; align-content: flex-start; } .fl-03__variant-card { flex: 1 1 200px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 8px; } .fl-03__variant-title { font-size: 0.78rem; font-weight: 700; color: var(--accent); letter-spacing: 0.05em; } .fl-03__variant-code { font-family: 'Courier New', monospace; font-size: 0.72rem; color: rgba(255,255,255,0.5); background: rgba(255,255,255,0.04); padding: 6px 10px; border-radius: 6px; line-height: 1.7; } .fl-03__variant-desc { font-size: 0.75rem; color: var(--muted); line-height: 1.6; } /* Nav variant 2: centered links */ .fl-03__nav--centered .fl-03__links { position: absolute; left: 50%; transform: translateX(-50%); } /* Nav variant 3: pill style */ .fl-03__nav--pill { background: transparent; height: auto; } .fl-03__pill-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: 40px; padding: 6px 8px 6px 16px; display: flex; align-items: center; gap: 8px; width: 100%; min-width: 0; } .fl-03__pill-logo { font-size: 0.9rem; font-weight: 800; color: var(--text); letter-spacing: -0.03em; margin-right: 8px; } .fl-03__pill-logo em { color: var(--accent2); font-style: normal; } .fl-03__pill-links { display: flex; align-items: center; gap: 2px; list-style: none; flex: 1; } .fl-03__pill-link { padding: 5px 12px; border-radius: 20px; font-size: 0.76rem; font-weight: 600; color: var(--muted); cursor: pointer; transition: all 0.2s; } .fl-03__pill-link:hover { color: var(--text); background: rgba(255,255,255,0.06); } .fl-03__pill-link.is-active { background: var(--accent2); color: #fff; } .fl-03__pill-cta { padding: 7px 16px; border-radius: 20px; background: var(--accent); color: #000; font-size: 0.76rem; font-weight: 800; cursor: pointer; flex-shrink: 0; transition: opacity 0.2s; } .fl-03__pill-cta:hover { opacity: 0.85; } /* Responsive defenses: hide low-priority items so the actions group fits and nothing overflows. The "centered links" trick relies on the absolutely-positioned link group — on narrow viewports it would collide with the logo, so re-anchor it inline. */ @media (max-width: 640px) { .fl-03__nav-row { padding: 10px 12px 0; } .fl-03__nav { padding: 0 10px; } .fl-03__icon-btn, .fl-03__avatar { display: none; } .fl-03__link[data-priority="low"] { display: none; } .fl-03__nav--centered .fl-03__links { position: static; transform: none; } .fl-03__pill-logo { font-size: 0.8rem; } .fl-03__pill-link { padding: 5px 8px; font-size: 0.7rem; } } @media (max-width: 480px) { .fl-03__btn--ghost { display: none; } .fl-03__links .fl-03__link:nth-child(n+3) { display: none; } .fl-03__pill-links .fl-03__pill-link:nth-child(n+3) { display: none; } } @media (prefers-reduced-motion: reduce) { .fl-03__btn, .fl-03__icon-btn { transition: none; } } ``` ### 04. CSS Flexbox Masonry-Style Layout **Type:** Pure CSS **Description:** A multi-column masonry-style card waterfall using flex-direction: column and flex-wrap: wrap with a fixed container height — no JavaScript required. **HTML:** ```html

    CSS Flexbox Masonry-Style Layout

    flex-direction: column + flex-wrap
    Layout
    Column-Wrap Masonry
    Set flex-direction: column and flex-wrap: wrap with a fixed container height to make items flow into natural columns.
    flex-wrap
    column
    Sizing
    Item Width
    Items need a fixed width (e.g. 33%) — not flex shorthand — so each column stays the same width.
    Container
    The Height Constraint Controls Column Count
    The container's fixed height determines when items wrap to a new column. Taller height = fewer columns. This is the key insight for this technique.
    height
    wrap boundary
    Gap
    Gutters with gap
    The gap shorthand sets row and column gutters uniformly without margin edge-cases.
    Caveat
    Reading Order Is Top-Down
    Items flow column-first, not row-first. For strict row order, use CSS Grid instead.
    Responsive
    Dynamic Column Count via Container Height
    Use a CSS custom property for container height and update it via JS or @media queries to control how many columns appear at each breakpoint.
    responsive
    custom props
    ``` **CSS:** ```css .fl-04, .fl-04 *, .fl-04 *::before, .fl-04 *::after { margin: 0; padding: 0; box-sizing: border-box; } .fl-04 ::selection { background: #e040fb; color: #fff; } .fl-04 { --bg: #f4f0ff; --surface: #fff; --ink: #1a0a2e; --muted: #8a7fa8; --accent: #7c3aed; --accent2: #e040fb; --accent3: #06b6d4; --accent4: #f59e0b; --border: rgba(124,58,237,0.12); font-family: 'Space Grotesk', sans-serif; background: var(--bg); padding: 24px; border-radius: 16px; min-height: 500px; } .fl-04__header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; } .fl-04__title { font-size: 1.2rem; font-weight: 700; color: var(--ink); } .fl-04__badge { font-size: 0.68rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; background: var(--accent); color: #fff; padding: 4px 10px; border-radius: 20px; } /* Flexbox masonry: flex-direction column + flex-wrap wrap Height of container controls how many items per column. Items flow top→bottom then start a new column. Defensive overflow:hidden prevents excess columns from bleeding past the parent width at narrow viewports — the masonry algorithm doesn't shrink column count on its own, it just keeps packing. */ .fl-04__masonry { display: flex; flex-direction: column; flex-wrap: wrap; gap: 12px; height: 760px; /* controls column count at desktop width */ overflow: hidden; } .fl-04__item { width: calc(33.33% - 8px); background: var(--surface); border-radius: 14px; overflow: hidden; border: 1px solid var(--border); break-inside: avoid; display: flex; flex-direction: column; flex-shrink: 0; transition: transform 0.2s, box-shadow 0.2s; } .fl-04__item:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(124,58,237,0.15); } .fl-04__item-visual { display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden; } .fl-04__item-visual-inner { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; } .fl-04__shape { border-radius: 50%; animation: fl-04-float 4s ease-in-out infinite; } @keyframes fl-04-float { 0%,100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(-6px) rotate(8deg); } } .fl-04__item:nth-child(3n+2) .fl-04__shape { animation-delay: -1.5s; } .fl-04__item:nth-child(3n+3) .fl-04__shape { animation-delay: -3s; } .fl-04__item-body { padding: 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; } .fl-04__item-cat { font-size: 0.65rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); } .fl-04__item-title { font-size: 0.9rem; font-weight: 700; color: var(--ink); line-height: 1.3; } .fl-04__item-text { font-size: 0.77rem; color: var(--muted); line-height: 1.6; } .fl-04__item-tags { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 4px; } .fl-04__tag { font-size: 0.65rem; font-weight: 600; padding: 3px 8px; border-radius: 20px; background: rgba(124,58,237,0.1); color: var(--accent); } /* Responsive masonry. The flex-direction:column masonry algorithm doesn't auto-reduce column count when items get narrow — we have to adjust the container height + item width per breakpoint or items keep wrapping into more columns. */ @media (max-width: 760px) { .fl-04__masonry { height: 1100px; } .fl-04__item { width: calc(50% - 6px); } } @media (max-width: 520px) { .fl-04__masonry { flex-wrap: nowrap; height: auto; overflow: visible; } .fl-04__item { width: 100%; } .fl-04__header { flex-direction: column; align-items: flex-start; gap: 8px; } } @media (prefers-reduced-motion: reduce) { .fl-04__shape { animation: none; } .fl-04__item { transition: none; } } ``` ### 05. CSS Flexbox Sidebar Dashboard Layout **Type:** Pure CSS **Description:** A full app-shell dashboard with a fixed-width flex sidebar, collapsible nav groups, top header bar, stat cards row, and a main content area — all wired with flexbox. **HTML:** ```html
    Dashboard Overview
    ⬇ Export
    + New Project
    Total Revenue
    $48.2k
    ↑ 12.5% this month
    Active Users
    2,841
    ↑ 8.1% this week
    Open Tasks
    34
    ↓ 3 from yesterday
    Recent Activity View all
    Deployment to production succeeded
    2m ago
    New member @alex joined the workspace
    14m ago
    Task "CSS Flexbox docs" moved to Review
    1h ago
    Build #142 failed — check logs
    3h ago
    ``` **CSS:** ```css .fl-05, .fl-05 *, .fl-05 *::before, .fl-05 *::after { margin: 0; padding: 0; box-sizing: border-box; } .fl-05 ::selection { background: #3b82f6; color: #fff; } .fl-05 { --bg: #0d1117; --sidebar: #161b22; --surface: #1c2128; --border: #30363d; --accent: #3b82f6; --accent2: #8b5cf6; --green: #22c55e; --orange: #f97316; --red: #ef4444; --text: #e6edf3; --muted: #7d8590; font-family: 'Plus Jakarta Sans', sans-serif; background: var(--bg); border-radius: 16px; overflow: hidden; min-height: 500px; } /* Outer flex row: sidebar + main */ .fl-05__shell { display: flex; height: 500px; } /* ── Sidebar ── */ .fl-05__sidebar { width: 220px; flex-shrink: 0; background: var(--sidebar); border-right: 1px solid var(--border); display: flex; flex-direction: column; padding: 0; } .fl-05__sidebar-top { padding: 20px 16px 12px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 10px; } .fl-05__workspace-icon { width: 32px; height: 32px; border-radius: 8px; background: linear-gradient(135deg, #3b82f6, #8b5cf6); display: flex; align-items: center; justify-content: center; font-size: 0.8rem; font-weight: 800; color: #fff; flex-shrink: 0; } .fl-05__workspace-name { font-size: 0.82rem; font-weight: 700; color: var(--text); } .fl-05__workspace-plan { font-size: 0.65rem; color: var(--accent); font-weight: 600; } .fl-05__sidebar-nav { flex: 1; padding: 12px 8px; display: flex; flex-direction: column; gap: 2px; overflow-y: auto; } .fl-05__nav-section { font-size: 0.6rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); padding: 10px 8px 4px; } .fl-05__nav-item { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 6px; cursor: pointer; font-size: 0.8rem; font-weight: 500; color: var(--muted); transition: all 0.15s; position: relative; } .fl-05__nav-item:hover { background: rgba(255,255,255,0.06); color: var(--text); } .fl-05__nav-item.is-active { background: rgba(59,130,246,0.15); color: var(--accent); font-weight: 600; } .fl-05__nav-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; } .fl-05__nav-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; } .fl-05__nav-count { margin-left: auto; font-size: 0.65rem; font-weight: 700; background: rgba(255,255,255,0.08); padding: 1px 6px; border-radius: 10px; color: var(--muted); } .fl-05__nav-count.is-hot { background: var(--red); color: #fff; } .fl-05__sidebar-bottom { padding: 12px 8px; border-top: 1px solid var(--border); } .fl-05__user-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; cursor: pointer; transition: background 0.15s; } .fl-05__user-row:hover { background: rgba(255,255,255,0.06); } .fl-05__user-avatar { width: 28px; height: 28px; border-radius: 50%; background: linear-gradient(135deg, #f97316, #ef4444); font-size: 0.7rem; font-weight: 800; color: #fff; display: flex; align-items: center; justify-content: center; flex-shrink: 0; } .fl-05__user-name { font-size: 0.78rem; font-weight: 600; color: var(--text); } .fl-05__user-role { font-size: 0.65rem; color: var(--muted); } /* ── Main panel ── */ .fl-05__main { flex: 1; display: flex; flex-direction: column; overflow: hidden; } .fl-05__topbar { height: 52px; background: var(--sidebar); border-bottom: 1px solid var(--border); display: flex; align-items: center; padding: 0 20px; gap: 12px; flex-shrink: 0; } .fl-05__topbar-title { font-size: 0.9rem; font-weight: 700; color: var(--text); flex: 1; } .fl-05__topbar-action { display: flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 6px; font-size: 0.75rem; font-weight: 600; cursor: pointer; } .fl-05__topbar-action--primary { background: var(--accent); color: #fff; } .fl-05__topbar-action--ghost { background: rgba(255,255,255,0.06); color: var(--muted); border: 1px solid var(--border); } .fl-05__content { flex: 1; padding: 20px; overflow-y: auto; display: flex; flex-direction: column; gap: 16px; } /* Stats row */ .fl-05__stats { display: flex; gap: 12px; } .fl-05__stat { flex: 1; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 14px; } .fl-05__stat-label { font-size: 0.68rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 8px; } .fl-05__stat-value { font-size: 1.4rem; font-weight: 800; color: var(--text); } .fl-05__stat-delta { display: flex; align-items: center; gap: 4px; font-size: 0.72rem; font-weight: 600; margin-top: 4px; } .fl-05__stat-delta.up { color: var(--green); } .fl-05__stat-delta.down { color: var(--red); } /* Activity list */ .fl-05__activity { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; } .fl-05__activity-head { padding: 12px 16px; border-bottom: 1px solid var(--border); font-size: 0.8rem; font-weight: 700; color: var(--text); display: flex; justify-content: space-between; align-items: center; } .fl-05__activity-view { font-size: 0.7rem; color: var(--accent); font-weight: 600; cursor: pointer; } .fl-05__activity-row { display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-bottom: 1px solid rgba(48,54,61,0.5); } .fl-05__activity-row:last-child { border-bottom: none; } .fl-05__activity-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; } .fl-05__activity-text { flex: 1; font-size: 0.78rem; color: var(--text); } .fl-05__activity-time { font-size: 0.68rem; color: var(--muted); flex-shrink: 0; } @media (prefers-reduced-motion: reduce) { .fl-05__nav-item, .fl-05__user-row { transition: none; } } ``` ### 06. CSS Flexbox Responsive Product Cards **Type:** Pure CSS **Description:** An e-commerce product card grid using flex: 1 1 180px with a max-width cap — cards reflow from four columns to one with no JavaScript or media queries. **HTML:** ```html

    Product Collection

    Sort: Popular ▾

    flex: 1 1 180px — naturally wraps to 4, 3, 2, or 1 column at any width

    Sale
    Gear
    Thermal Flask Pro
    (241)
    New
    Audio
    Studio Buds X
    (88)
    Eco
    Home
    Bamboo Notebook Set
    (56)
    Tech
    Wireless Charger Pad
    (312)
    ``` **CSS:** ```css .fl-06, .fl-06 *, .fl-06 *::before, .fl-06 *::after { margin: 0; padding: 0; box-sizing: border-box; } .fl-06 ::selection { background: #fb923c; color: #fff; } .fl-06 { --bg: #fff8f4; --surface: #fff; --ink: #1a0a00; --muted: #9a7a65; --accent: #ea580c; --accent2: #fb923c; --border: rgba(234,88,12,0.12); --star: #fbbf24; font-family: 'Outfit', sans-serif; background: var(--bg); padding: 24px; border-radius: 16px; min-height: 500px; } .fl-06__header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; } .fl-06__title { font-size: 1.2rem; font-weight: 800; color: var(--ink); } .fl-06__sort { display: flex; align-items: center; gap: 6px; font-size: 0.75rem; font-weight: 600; color: var(--muted); cursor: pointer; } .fl-06__subtitle { font-size: 0.78rem; color: var(--muted); margin-bottom: 18px; } /* Product grid: flex-wrap + flex-basis for fluid columns */ .fl-06__grid { display: flex; flex-wrap: wrap; gap: 14px; } .fl-06__card { flex: 1 1 180px; /* grow, shrink, min-basis = fluid cols */ max-width: calc(25% - 11px); /* max 4 per row */ background: var(--surface); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; cursor: pointer; transition: transform 0.2s, box-shadow 0.2s; } .fl-06__card:hover { transform: translateY(-4px); box-shadow: 0 14px 40px rgba(234,88,12,0.12); } .fl-06__thumb { aspect-ratio: 1; display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden; } .fl-06__thumb-bg { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; } .fl-06__product-shape { transition: transform 0.3s; } .fl-06__card:hover .fl-06__product-shape { transform: scale(1.08) rotate(3deg); } .fl-06__badge { position: absolute; top: 10px; left: 10px; font-size: 0.62rem; font-weight: 800; padding: 3px 8px; border-radius: 4px; text-transform: uppercase; letter-spacing: 0.06em; } .fl-06__wishlist { position: absolute; top: 10px; right: 10px; width: 28px; height: 28px; background: rgba(255,255,255,0.9); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.8rem; cursor: pointer; } .fl-06__body { padding: 12px; display: flex; flex-direction: column; gap: 4px; flex: 1; } .fl-06__cat { font-size: 0.65rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); } .fl-06__name { font-size: 0.88rem; font-weight: 700; color: var(--ink); line-height: 1.3; } .fl-06__stars { display: flex; align-items: center; gap: 2px; font-size: 0.7rem; } .fl-06__star { color: var(--star); } .fl-06__rating-count { font-size: 0.65rem; color: var(--muted); margin-left: 4px; } .fl-06__footer { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 10px; border-top: 1px solid var(--border); } .fl-06__price { display: flex; align-items: baseline; gap: 5px; } .fl-06__price-now { font-size: 1rem; font-weight: 800; color: var(--accent); } .fl-06__price-was { font-size: 0.75rem; text-decoration: line-through; color: var(--muted); } .fl-06__add-btn { width: 30px; height: 30px; border-radius: 8px; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 1rem; font-weight: 700; cursor: pointer; transition: background 0.2s, transform 0.15s; flex-shrink: 0; } .fl-06__add-btn:hover { background: #c2410c; transform: scale(1.1); } @media (prefers-reduced-motion: reduce) { .fl-06__card, .fl-06__product-shape, .fl-06__add-btn { transition: none; } } ``` ### 07. CSS Flexbox Pricing Table Layout **Type:** Pure CSS **Description:** A three-tier pricing table with equal-height columns, a scaled featured plan, and flex-driven feature lists — all columns stretch to identical height without JavaScript. **HTML:** ```html
    Pricing

    Simple, Transparent Plans

    Monthly
    Annual
    Save 20%
    Starter
    Free
    Perfect for side projects and learning CSS flexbox layouts.
    $
    0
    /mo
    No credit card needed
    3 projects
    Basic flex layouts
    Community support
    Team collaboration
    Priority export
    Enterprise
    Scale
    For large teams building complex flexbox design systems at scale.
    $
    99
    /mo
    Billed $950/yr — save $238
    Unlimited everything
    Custom flex components
    Dedicated support
    Unlimited team seats
    White-label export
    ``` **CSS:** ```css .fl-07, .fl-07 *, .fl-07 *::before, .fl-07 *::after { margin: 0; padding: 0; box-sizing: border-box; } .fl-07 ::selection { background: #0ea5e9; color: #fff; } .fl-07 { --bg: #f0f9ff; --surface: #fff; --ink: #0c1a2e; --muted: #64748b; --accent: #0ea5e9; --accent-dark: #0284c7; --featured: #0f172a; --border: rgba(14,165,233,0.15); --check: #22c55e; font-family: 'Nunito', sans-serif; background: var(--bg); padding: 28px 20px; border-radius: 16px; min-height: 500px; } .fl-07__head { text-align: center; margin-bottom: 24px; } .fl-07__eyebrow { font-size: 0.7rem; font-weight: 800; letter-spacing: 0.15em; text-transform: uppercase; color: var(--accent); margin-bottom: 6px; } .fl-07__title { font-size: 1.4rem; font-weight: 900; color: var(--ink); margin-bottom: 6px; } .fl-07__toggle { display: inline-flex; align-items: center; gap: 10px; background: rgba(14,165,233,0.08); border-radius: 20px; padding: 4px 8px; font-size: 0.75rem; font-weight: 700; color: var(--muted); cursor: pointer; } .fl-07__toggle-pill { background: var(--accent); color: #fff; padding: 3px 10px; border-radius: 12px; font-size: 0.72rem; } .fl-07__save-badge { background: #dcfce7; color: #16a34a; font-size: 0.65rem; font-weight: 800; padding: 2px 6px; border-radius: 6px; } /* Pricing row: flex with stretch alignment so cards equal height */ .fl-07__plans { display: flex; gap: 16px; align-items: stretch; } .fl-07__plan { flex: 1; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 24px 20px; display: flex; flex-direction: column; gap: 0; transition: box-shadow 0.2s; } .fl-07__plan:hover { box-shadow: 0 10px 40px rgba(14,165,233,0.1); } .fl-07__plan--featured { background: var(--featured); border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent), 0 20px 60px rgba(14,165,233,0.2); position: relative; transform: scale(1.03); z-index: 1; } .fl-07__plan-tag { display: inline-block; font-size: 0.62rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; padding: 3px 8px; border-radius: 4px; margin-bottom: 12px; align-self: flex-start; } .fl-07__plan--featured .fl-07__plan-tag { background: var(--accent); color: #fff; } .fl-07__plan:not(.fl-07__plan--featured) .fl-07__plan-tag { background: rgba(14,165,233,0.1); color: var(--accent); } .fl-07__plan-name { font-size: 1rem; font-weight: 900; color: var(--ink); margin-bottom: 4px; } .fl-07__plan--featured .fl-07__plan-name { color: #fff; } .fl-07__plan-desc { font-size: 0.75rem; color: var(--muted); margin-bottom: 16px; line-height: 1.5; } .fl-07__plan--featured .fl-07__plan-desc { color: rgba(255,255,255,0.55); } .fl-07__price-row { display: flex; align-items: baseline; gap: 2px; margin-bottom: 4px; } .fl-07__price-currency { font-size: 1.1rem; font-weight: 800; color: var(--ink); align-self: flex-start; padding-top: 4px; } .fl-07__plan--featured .fl-07__price-currency { color: #fff; } .fl-07__price-value { font-size: 2.4rem; font-weight: 900; color: var(--ink); line-height: 1; } .fl-07__plan--featured .fl-07__price-value { color: #fff; } .fl-07__price-period { font-size: 0.78rem; color: var(--muted); padding-bottom: 4px; } .fl-07__plan--featured .fl-07__price-period { color: rgba(255,255,255,0.45); } .fl-07__price-annual { font-size: 0.7rem; color: var(--muted); margin-bottom: 20px; } .fl-07__plan--featured .fl-07__price-annual { color: rgba(255,255,255,0.4); } .fl-07__cta { padding: 10px; border-radius: 10px; font-family: 'Nunito', sans-serif; font-size: 0.85rem; font-weight: 800; cursor: pointer; text-align: center; margin-bottom: 20px; transition: all 0.2s; border: none; } .fl-07__cta--outline { background: transparent; border: 2px solid var(--border); color: var(--ink); } .fl-07__cta--outline:hover { border-color: var(--accent); color: var(--accent); } .fl-07__cta--primary { background: var(--accent); color: #fff; } .fl-07__cta--primary:hover { background: var(--accent-dark); } .fl-07__divider { height: 1px; background: var(--border); margin-bottom: 16px; } .fl-07__plan--featured .fl-07__divider { background: rgba(255,255,255,0.1); } .fl-07__features { display: flex; flex-direction: column; gap: 10px; flex: 1; } .fl-07__feature { display: flex; align-items: flex-start; gap: 10px; font-size: 0.78rem; color: var(--muted); line-height: 1.4; } .fl-07__plan--featured .fl-07__feature { color: rgba(255,255,255,0.65); } .fl-07__feature-check { width: 16px; height: 16px; border-radius: 50%; background: rgba(34,197,94,0.15); color: var(--check); display: flex; align-items: center; justify-content: center; font-size: 0.6rem; font-weight: 800; flex-shrink: 0; margin-top: 1px; } .fl-07__feature-check--muted { background: rgba(100,116,139,0.1); color: var(--muted); } @media (prefers-reduced-motion: reduce) { .fl-07__plan, .fl-07__cta { transition: none; } } ``` ### 08. CSS Flexbox Magazine Article Layout **Type:** Pure CSS **Description:** A classic editorial magazine layout with a two-thirds article column, one-third sidebar, drop cap, pull quotes, and a multi-column body text — built with flex and CSS columns. **HTML:** ```html
    FlexMag
    June 2025 · Issue 47
    Design
    Technology
    Culture
    Opinion
    Data
    Cover Story

    The Flexbox Layout Technique That Changed Everything

    How a single CSS property — flex — replaced decades of float hacks, table tricks, and inline-block nightmares to give designers true layout superpowers.
    flex
    Illustration: FlexMag / CSS Visual Studio

    Before flexbox arrived in browsers, building a simple three-column layout with equal-height columns was a multi-hack ordeal — you needed faux backgrounds, table-cell hacks, or JavaScript height equalisers. The magazine layout you are reading now is achieved with two flex containers, two lines of alignment CSS, and nothing else.

    The key insight of flexbox is that it separates the axis of layout from the axis of alignment. The main axis — controlled by flex-direction — decides how items are placed. The cross axis — governed by align-items and align-self — decides how they stretch or anchor within their row or column.

    ``` **CSS:** ```css .fl-08, .fl-08 *, .fl-08 *::before, .fl-08 *::after { margin: 0; padding: 0; box-sizing: border-box; } .fl-08 ::selection { background: #e11d48; color: #fff; } .fl-08 { --bg: #fffdf9; --surface: #fff; --ink: #1a1008; --muted: #78716c; --accent: #e11d48; --accent2: #d97706; --border: #e8e0d5; font-family: 'DM Sans', sans-serif; background: var(--bg); padding: 0; border-radius: 16px; overflow: hidden; min-height: 500px; border: 1px solid var(--border); } /* Magazine masthead */ .fl-08__masthead { background: var(--ink); padding: 14px 28px; display: flex; align-items: center; justify-content: space-between; } .fl-08__masthead-name { font-family: 'Fraunces', serif; font-size: 1.4rem; font-weight: 900; color: #fff; letter-spacing: -0.02em; } .fl-08__masthead-name em { color: var(--accent); font-style: normal; } .fl-08__masthead-date { font-size: 0.72rem; color: rgba(255,255,255,0.45); letter-spacing: 0.06em; text-transform: uppercase; } /* Category banner */ .fl-08__category-bar { display: flex; align-items: center; gap: 0; border-bottom: 1px solid var(--border); padding: 0 28px; overflow-x: auto; } .fl-08__cat-tab { padding: 8px 14px; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); white-space: nowrap; cursor: pointer; border-bottom: 2px solid transparent; transition: color 0.2s, border-color 0.2s; } .fl-08__cat-tab.is-active { color: var(--accent); border-bottom-color: var(--accent); } .fl-08__cat-tab:hover { color: var(--ink); } /* Main layout: flex row — body col (2/3) + sidebar (1/3) */ .fl-08__body { display: flex; min-height: 0; } /* Left body: flex column */ .fl-08__article-col { flex: 2; min-width: 0; padding: 28px; display: flex; flex-direction: column; gap: 16px; border-right: 1px solid var(--border); } .fl-08__kicker { display: flex; align-items: center; gap: 10px; } .fl-08__kicker-label { font-size: 0.65rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); } .fl-08__kicker-line { flex: 1; height: 1px; background: var(--border); } .fl-08__headline { font-family: 'Fraunces', serif; font-size: 1.7rem; font-weight: 900; color: var(--ink); line-height: 1.15; letter-spacing: -0.02em; } .fl-08__headline em { color: var(--accent); font-style: italic; } .fl-08__standfirst { font-family: 'Fraunces', serif; font-style: italic; font-size: 0.95rem; color: var(--muted); line-height: 1.6; border-left: 3px solid var(--accent); padding-left: 14px; } .fl-08__byline { display: flex; align-items: center; gap: 10px; padding-bottom: 12px; border-bottom: 1px solid var(--border); } .fl-08__author-avatar { width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg, #e11d48, #9f1239); display: flex; align-items: center; justify-content: center; font-size: 0.72rem; font-weight: 800; color: #fff; flex-shrink: 0; } .fl-08__author-name { font-size: 0.8rem; font-weight: 600; color: var(--ink); } .fl-08__author-role { font-size: 0.68rem; color: var(--muted); } .fl-08__meta { margin-left: auto; font-size: 0.68rem; color: var(--muted); text-align: right; } /* Hero image placeholder */ .fl-08__hero { border-radius: 10px; overflow: hidden; height: 130px; background: linear-gradient(135deg, #1a0510, #5a0f2e); display: flex; align-items: center; justify-content: center; position: relative; } .fl-08__hero-text { font-family: 'Fraunces', serif; font-size: 2rem; font-weight: 900; font-style: italic; color: rgba(255,255,255,0.12); letter-spacing: -0.04em; user-select: none; } .fl-08__hero-label { position: absolute; bottom: 10px; left: 10px; font-size: 0.62rem; color: rgba(255,255,255,0.4); font-weight: 600; } /* Drop cap + body text */ .fl-08__body-text { font-size: 0.82rem; color: var(--muted); line-height: 1.8; columns: 2; column-gap: 20px; } .fl-08__drop-cap::first-letter { font-family: 'Fraunces', serif; font-size: 3.2em; font-weight: 900; color: var(--accent); float: left; line-height: 0.75; margin: 0.08em 0.06em 0 0; } /* Right sidebar */ .fl-08__sidebar { flex: 1; min-width: 0; padding: 24px 20px; display: flex; flex-direction: column; gap: 20px; } .fl-08__sidebar-section-title { font-size: 0.62rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent2); margin-bottom: 10px; padding-bottom: 6px; border-bottom: 1px solid var(--border); } .fl-08__related-item { display: flex; gap: 10px; padding-bottom: 12px; border-bottom: 1px solid var(--border); cursor: pointer; } .fl-08__related-item:last-child { border-bottom: none; } .fl-08__related-thumb { width: 50px; height: 50px; border-radius: 6px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; } .fl-08__related-title { font-size: 0.78rem; font-weight: 600; color: var(--ink); line-height: 1.3; margin-bottom: 4px; } .fl-08__related-meta { font-size: 0.65rem; color: var(--muted); } .fl-08__tag-cloud { display: flex; flex-wrap: wrap; gap: 6px; } .fl-08__tag { font-size: 0.68rem; font-weight: 600; padding: 4px 10px; border-radius: 4px; background: rgba(225,29,72,0.06); color: var(--accent); cursor: pointer; transition: background 0.2s; } .fl-08__tag:hover { background: rgba(225,29,72,0.15); } @media (prefers-reduced-motion: reduce) { .fl-08__tag, .fl-08__cat-tab { transition: none; } } ``` ### 09. CSS Flexbox Sticky Footer Layout **Type:** Pure CSS **Description:** The definitive flexbox sticky footer pattern — a column flex wrapper with min-height: 100% and flex: 1 on the main content pushes the footer to the bottom on any page length. **HTML:** ```html
    Header flex-shrink: 0
    Main Content flex: 1
    CSS Technique
    Sticky Footer with Flexbox
    .page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    }
    .main { flex: 1; } /* grows */
    .footer { flex-shrink: 0; } /* fixed */
    Footer sticks to the bottom even when content is short — no JS or absolute positioning needed.
    flex: 1 on main is shorthand for flex-grow: 1; flex-shrink: 1; flex-basis: 0, making it absorb all remaining vertical space.
    ``` **CSS:** ```css .fl-09, .fl-09 *, .fl-09 *::before, .fl-09 *::after { margin: 0; padding: 0; box-sizing: border-box; } .fl-09 ::selection { background: #0891b2; color: #fff; } .fl-09 { --bg: #f0f4f8; --surface: #fff; --ink: #0f2139; --muted: #64748b; --accent: #0891b2; --accent2: #0e7490; --footer-bg: #0f2139; --border: #dde4ec; --green: #059669; font-family: 'Manrope', sans-serif; background: var(--bg); border-radius: 16px; overflow: hidden; border: 1px solid var(--border); } /* STICKY FOOTER TECHNIQUE: Outer wrapper = flex column, min-height set. Main content = flex: 1 (grows to fill space). Footer = flex-shrink: 0 (never collapses). This pushes the footer to the bottom even when content is short. */ .fl-09__page { display: flex; flex-direction: column; min-height: 500px; } /* ── Header ── */ .fl-09__header { background: var(--surface); border-bottom: 1px solid var(--border); padding: 0 28px; height: 56px; display: flex; align-items: center; justify-content: space-between; flex-shrink: 0; } .fl-09__logo { font-size: 1rem; font-weight: 800; color: var(--ink); display: flex; align-items: center; gap: 8px; } .fl-09__logo-icon { width: 28px; height: 28px; background: var(--accent); border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 0.8rem; color: #fff; } .fl-09__header-nav { display: flex; gap: 4px; list-style: none; } .fl-09__header-link { padding: 6px 12px; border-radius: 6px; font-size: 0.78rem; font-weight: 600; color: var(--muted); cursor: pointer; transition: all 0.15s; } .fl-09__header-link:hover { color: var(--ink); background: var(--bg); } .fl-09__header-link.is-active { color: var(--accent); } /* ── Main content (grows with flex: 1) ── */ .fl-09__main { flex: 1; /* ← this is the sticky footer magic */ padding: 36px 28px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 24px; } /* Technique explainer card */ .fl-09__explainer { max-width: 560px; width: 100%; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; } .fl-09__explainer-header { background: linear-gradient(135deg, #0e4f6e, #0891b2); padding: 20px 24px; } .fl-09__explainer-tag { font-size: 0.62rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(255,255,255,0.6); margin-bottom: 6px; } .fl-09__explainer-title { font-size: 1.1rem; font-weight: 800; color: #fff; } .fl-09__explainer-body { padding: 20px 24px; display: flex; flex-direction: column; gap: 14px; } .fl-09__code-block { background: #0f2139; border-radius: 8px; padding: 14px 16px; font-family: 'Courier New', monospace; font-size: 0.75rem; line-height: 1.8; color: #94a3b8; } .fl-09__code-comment { color: #475569; } .fl-09__code-prop { color: #7dd3fc; } .fl-09__code-val { color: #86efac; } .fl-09__code-selector { color: #c084fc; } .fl-09__explainer-desc { font-size: 0.8rem; color: var(--muted); line-height: 1.7; } .fl-09__explainer-check { display: flex; align-items: flex-start; gap: 10px; font-size: 0.78rem; color: var(--ink); font-weight: 500; } .fl-09__check-icon { width: 18px; height: 18px; border-radius: 50%; background: rgba(5,150,105,0.12); color: var(--green); display: flex; align-items: center; justify-content: center; font-size: 0.62rem; font-weight: 800; flex-shrink: 0; margin-top: 1px; } /* Diagram showing layout zones */ .fl-09__diagram { max-width: 560px; width: 100%; display: flex; flex-direction: column; gap: 4px; } .fl-09__zone { border-radius: 8px; padding: 10px 14px; font-size: 0.72rem; font-weight: 700; display: flex; align-items: center; justify-content: space-between; } .fl-09__zone-code { font-family: 'Courier New', monospace; font-size: 0.68rem; opacity: 0.7; } .fl-09__zone--header { background: rgba(8,145,178,0.15); color: var(--accent2); } .fl-09__zone--main { background: rgba(8,145,178,0.06); color: var(--muted); border: 1px dashed rgba(8,145,178,0.2); flex: 1; min-height: 36px; } .fl-09__zone--footer { background: rgba(15,33,57,0.08); color: var(--ink); } /* ── Footer (flex-shrink: 0) ── */ .fl-09__footer { background: var(--footer-bg); padding: 24px 28px; flex-shrink: 0; /* ← never shrinks; stays at bottom */ } .fl-09__footer-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 20px; } .fl-09__footer-brand { font-size: 0.92rem; font-weight: 800; color: #fff; margin-bottom: 6px; } .fl-09__footer-tagline { font-size: 0.72rem; color: rgba(255,255,255,0.35); line-height: 1.5; } .fl-09__footer-col-title { font-size: 0.65rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(255,255,255,0.35); margin-bottom: 8px; } .fl-09__footer-links { list-style: none; display: flex; flex-direction: column; gap: 6px; } .fl-09__footer-links li { font-size: 0.76rem; color: rgba(255,255,255,0.5); cursor: pointer; transition: color 0.15s; } .fl-09__footer-links li:hover { color: #fff; } .fl-09__footer-bottom { display: flex; align-items: center; justify-content: space-between; padding-top: 16px; border-top: 1px solid rgba(255,255,255,0.08); font-size: 0.7rem; color: rgba(255,255,255,0.3); } .fl-09__footer-socials { display: flex; gap: 8px; } .fl-09__social-btn { width: 28px; height: 28px; border-radius: 6px; background: rgba(255,255,255,0.06); display: flex; align-items: center; justify-content: center; font-size: 0.8rem; cursor: pointer; transition: background 0.15s; } .fl-09__social-btn:hover { background: rgba(255,255,255,0.12); } @media (prefers-reduced-motion: reduce) { .fl-09__header-link, .fl-09__footer-links li, .fl-09__social-btn { transition: none; } } ``` ### 10. CSS Flexbox Centered Hero Section **Type:** Pure CSS **Description:** A full-bleed hero section with perfect flex centering, animated gradient orbs, a headline group, subtext, and a CTA button row — demonstrating multi-axis flex alignment. **HTML:** ```html
    CSS Flexbox · Perfect Centering

    Center anything with
    two lines of CSS

    The oldest CSS challenge — centering an element both horizontally and vertically — solved at last. display: flex + align-items: center + justify-content: center.

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    ``` **CSS:** ```css .fl-10, .fl-10 *, .fl-10 *::before, .fl-10 *::after { margin: 0; padding: 0; box-sizing: border-box; } .fl-10 ::selection { background: #a855f7; color: #fff; } .fl-10 { --bg: #08000f; --accent: #a855f7; --accent2: #38bdf8; --accent3: #f472b6; --text: #fff; --muted: rgba(255,255,255,0.5); font-family: 'Bricolage Grotesque', sans-serif; background: var(--bg); min-height: 500px; border-radius: 16px; overflow: hidden; position: relative; } /* Background glow orbs */ .fl-10__bg-orb { position: absolute; border-radius: 50%; filter: blur(80px); pointer-events: none; animation: fl-10-drift 8s ease-in-out infinite; } .fl-10__bg-orb--1 { width: 300px; height: 300px; background: rgba(168,85,247,0.25); top: -80px; left: 30%; animation-delay: 0s; } .fl-10__bg-orb--2 { width: 250px; height: 250px; background: rgba(56,189,248,0.15); bottom: -60px; right: 20%; animation-delay: -4s; } .fl-10__bg-orb--3 { width: 200px; height: 200px; background: rgba(244,114,182,0.15); top: 40%; left: 5%; animation-delay: -2s; } @keyframes fl-10-drift { 0%,100% { transform: translate(0,0) scale(1); } 33% { transform: translate(20px,-15px) scale(1.05); } 66% { transform: translate(-10px,10px) scale(0.98); } } /* Grid-noise texture via SVG */ .fl-10__noise { position: absolute; inset: 0; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E"); pointer-events: none; opacity: 0.5; } /* ── THE FLEX CENTERING PATTERN ── */ .fl-10__hero { display: flex; flex-direction: column; align-items: center; /* horizontal center */ justify-content: center; /* vertical center */ min-height: 500px; padding: 48px 24px; position: relative; z-index: 1; text-align: center; gap: 24px; } .fl-10__eyebrow { display: inline-flex; align-items: center; gap: 8px; background: rgba(168,85,247,0.12); border: 1px solid rgba(168,85,247,0.25); border-radius: 20px; padding: 5px 14px; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; color: var(--accent); } .fl-10__eyebrow-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); animation: fl-10-pulse-dot 1.5s ease-in-out infinite; } @keyframes fl-10-pulse-dot { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.4; transform: scale(0.7); } } .fl-10__headline { font-size: clamp(1.8rem, 5vw, 3.2rem); font-weight: 800; color: var(--text); line-height: 1.1; letter-spacing: -0.03em; max-width: 600px; } .fl-10__headline .fl-10__hl-italic { font-family: 'Instrument Serif', serif; font-style: italic; font-weight: 400; color: var(--accent); } .fl-10__headline .fl-10__hl-gradient { background: linear-gradient(90deg, var(--accent2), var(--accent3)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; } .fl-10__subhead { font-size: 0.92rem; color: var(--muted); line-height: 1.7; max-width: 440px; font-weight: 400; } .fl-10__ctas { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: center; } .fl-10__cta { padding: 11px 24px; border-radius: 10px; font-size: 0.85rem; font-weight: 700; cursor: pointer; font-family: 'Bricolage Grotesque', sans-serif; border: none; transition: transform 0.2s, box-shadow 0.2s; } .fl-10__cta:hover { transform: translateY(-2px); } .fl-10__cta--primary { background: var(--accent); color: #fff; box-shadow: 0 0 30px rgba(168,85,247,0.3); } .fl-10__cta--primary:hover { box-shadow: 0 6px 40px rgba(168,85,247,0.5); } .fl-10__cta--ghost { background: rgba(255,255,255,0.06); color: rgba(255,255,255,0.7); border: 1px solid rgba(255,255,255,0.1); } .fl-10__cta--ghost:hover { background: rgba(255,255,255,0.1); color: #fff; } .fl-10__social-proof { display: flex; align-items: center; gap: 12px; } .fl-10__avatars { display: flex; } .fl-10__avatar { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--bg); margin-left: -8px; display: flex; align-items: center; justify-content: center; font-size: 0.6rem; font-weight: 800; color: #fff; } .fl-10__avatars .fl-10__avatar:first-child { margin-left: 0; } .fl-10__proof-text { font-size: 0.72rem; color: var(--muted); font-weight: 500; } .fl-10__proof-text strong { color: var(--text); } /* Flex annotation overlay */ .fl-10__annotation { position: absolute; bottom: 14px; right: 16px; font-size: 0.62rem; font-family: 'Courier New', monospace; color: rgba(168,85,247,0.4); text-align: right; line-height: 1.8; pointer-events: none; } /* Responsive stars decoration */ .fl-10__stars { position: absolute; inset: 0; pointer-events: none; overflow: hidden; } .fl-10__star { position: absolute; width: 2px; height: 2px; border-radius: 50%; background: rgba(255,255,255,0.6); animation: fl-10-twinkle 3s ease-in-out infinite; } @keyframes fl-10-twinkle { 0%,100% { opacity: 0.6; } 50% { opacity: 0.1; } } @media (prefers-reduced-motion: reduce) { .fl-10__bg-orb, .fl-10__eyebrow-dot, .fl-10__star { animation: none; } .fl-10__cta { transition: none; } } ``` ### 11. CSS Flexbox Timeline Layout **Type:** Pure CSS **Description:** A vertical event timeline where each entry is a flex row — a narrow connector column with a dot and line, and an expanding content card — creating a clean left-rail chronology. **HTML:** ```html
    Flexbox Pattern

    CSS Flexbox Timeline Layout

    Each row is a flex container: connector column + content area

    🚀
    Jan 2024
    Launch
    Project Kickoff
    Initial CSS Flexbox design system established. Team aligned on layout patterns and naming conventions for all 15 demo types.
    👥
    Team onboarded
    8 contributors
    8 devs
    Mar 2024
    Milestone
    v1.0 Layout System Released
    First stable release of the flexbox layout library. Included holy grail, sidebar dashboard, and card grid patterns.
    📦
    Components shipped
    npm install flexlayout
    24 patterns
    Today
    Jun 2025
    Current
    Flexbox Gallery Collection
    15 production-grade CSS Flexbox demos published. Covers every major layout pattern from holy grail to kanban board.
    🎨
    Demos live
    All SEO-targeted
    15 demos
    Q3 2025
    Planned
    Grid + Subgrid Expansion
    Next phase: 15 CSS Grid layout demos with subgrid, named areas, and masonry support.
    ``` **CSS:** ```css .fl-11, .fl-11 *, .fl-11 *::before, .fl-11 *::after { margin: 0; padding: 0; box-sizing: border-box; } .fl-11 ::selection { background: #059669; color: #fff; } .fl-11 { --bg: #fafdf9; --surface: #fff; --ink: #0a1f13; --muted: #6b7c74; --accent: #059669; --accent-light: #d1fae5; --accent2: #0284c7; --accent3: #d97706; --accent4: #7c3aed; --timeline-line: #d1fae5; --border: #e2f0ea; font-family: 'IBM Plex Sans', sans-serif; background: var(--bg); padding: 28px; border-radius: 16px; min-height: 500px; } .fl-11__header { margin-bottom: 28px; } .fl-11__eyebrow { font-size: 0.65rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); margin-bottom: 4px; } .fl-11__title { font-size: 1.2rem; font-weight: 700; color: var(--ink); } .fl-11__sub { font-size: 0.78rem; color: var(--muted); margin-top: 4px; } /* TIMELINE TECHNIQUE: Each event = flex row with: - connector column (dot + line): flex-shrink: 0 - content card: flex: 1 The vertical line is a ::before pseudo on the connector that grows to fill the item height. */ .fl-11__timeline { display: flex; flex-direction: column; gap: 0; } .fl-11__event { display: flex; gap: 16px; position: relative; } /* Connector column */ .fl-11__connector { display: flex; flex-direction: column; align-items: center; flex-shrink: 0; width: 32px; } .fl-11__dot { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.8rem; flex-shrink: 0; z-index: 1; border: 3px solid var(--bg); transition: transform 0.2s; } .fl-11__event:hover .fl-11__dot { transform: scale(1.15); } .fl-11__line { flex: 1; width: 2px; background: var(--timeline-line); margin-top: 4px; margin-bottom: 0; min-height: 16px; } .fl-11__event:last-child .fl-11__line { display: none; } /* Content */ .fl-11__content { flex: 1; padding-bottom: 24px; } .fl-11__event-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; } .fl-11__date { font-size: 0.68rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); } .fl-11__event-tag { font-size: 0.62rem; font-weight: 700; padding: 2px 7px; border-radius: 4px; text-transform: uppercase; letter-spacing: 0.06em; } .fl-11__event-title { font-size: 0.9rem; font-weight: 700; color: var(--ink); margin-bottom: 4px; } .fl-11__event-desc { font-size: 0.78rem; color: var(--muted); line-height: 1.6; margin-bottom: 8px; } .fl-11__event-card { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; } .fl-11__card-row { display: flex; align-items: center; gap: 10px; font-size: 0.78rem; } .fl-11__card-icon { width: 28px; height: 28px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 0.8rem; flex-shrink: 0; } .fl-11__card-text { color: var(--ink); font-weight: 500; flex: 1; } .fl-11__card-sub { font-size: 0.7rem; color: var(--muted); margin-top: 2px; } .fl-11__card-value { font-weight: 700; color: var(--accent); font-size: 0.82rem; } /* Today marker */ .fl-11__today { display: flex; align-items: center; gap: 10px; margin: 4px 0 0 0; } .fl-11__today-line { flex: 1; height: 1px; background: repeating-linear-gradient(90deg, var(--accent) 0, var(--accent) 5px, transparent 5px, transparent 10px); } .fl-11__today-label { font-size: 0.65rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); background: var(--accent-light); padding: 3px 8px; border-radius: 4px; flex-shrink: 0; } @media (prefers-reduced-motion: reduce) { .fl-11__dot { transition: none; } } ``` ### 12. CSS Flexbox Chat Interface Layout **Type:** Pure CSS **Description:** A messaging UI with a flex-row shell (contacts sidebar + message pane), scrollable message thread with pinned input bar, and live send interaction — all flex-driven. **HTML:** ```html
    💬
    FlexChat
    AI
    Alice Indigo
    flex: 1 is so clean
    now
    2
    BK
    Bob Kira
    checked the PR
    2m
    CW
    CSS Weekly
    New issue is out
    1h
    AI
    Alice Indigo
    ● Online
    📞
    🎥
    Today
    AI
    Hey! Have you tried the new flexbox chat layout demo? The message alignment is all done with flex-direction: row-reverse for outgoing bubbles 😍
    10:41
    Me
    Yes! The trick of using flex: 1 on the messages area and flex-shrink: 0 on the input bar is so elegant
    10:42 ✓✓
    AI
    Exactly. And the whole outer shell is just display: flex on the row axis — sidebar + pane side by side 💪
    10:43
    Type a message...
    ``` **CSS:** ```css .fl-12, .fl-12 *, .fl-12 *::before, .fl-12 *::after { margin: 0; padding: 0; box-sizing: border-box; } .fl-12 ::selection { background: #6366f1; color: #fff; } .fl-12 { --bg: #18181b; --sidebar: #111113; --surface: #1c1c1f; --border: rgba(255,255,255,0.07); --accent: #6366f1; --accent2: #f43f5e; --text: #e4e4e7; --muted: #71717a; --bubble-in: #27272a; --bubble-out: #4f46e5; font-family: 'Inter', sans-serif; background: var(--bg); border-radius: 16px; overflow: hidden; min-height: 500px; } /* Outer flex row: chat list + message pane */ .fl-12__shell { display: flex; height: 500px; } /* ── Contacts sidebar ── */ .fl-12__contacts { width: 220px; flex-shrink: 0; background: var(--sidebar); border-right: 1px solid var(--border); display: flex; flex-direction: column; } .fl-12__contacts-top { padding: 14px 14px 8px; border-bottom: 1px solid var(--border); } .fl-12__app-name { font-size: 0.82rem; font-weight: 700; color: var(--text); margin-bottom: 10px; display: flex; align-items: center; gap: 8px; } .fl-12__app-icon { width: 22px; height: 22px; border-radius: 6px; background: var(--accent); display: flex; align-items: center; justify-content: center; font-size: 0.7rem; } .fl-12__search { background: rgba(255,255,255,0.06); border: 1px solid var(--border); border-radius: 8px; padding: 6px 10px; font-size: 0.75rem; color: var(--muted); display: flex; align-items: center; gap: 6px; cursor: pointer; } .fl-12__contacts-list { flex: 1; overflow-y: auto; padding: 8px; display: flex; flex-direction: column; gap: 2px; } .fl-12__contact { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; cursor: pointer; transition: background 0.15s; } .fl-12__contact:hover { background: rgba(255,255,255,0.05); } .fl-12__contact.is-active { background: rgba(99,102,241,0.15); } .fl-12__contact-avatar { width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.72rem; font-weight: 700; color: #fff; flex-shrink: 0; position: relative; } .fl-12__contact-online { position: absolute; bottom: 1px; right: 1px; width: 8px; height: 8px; border-radius: 50%; background: #22c55e; border: 2px solid var(--sidebar); } .fl-12__contact-info { flex: 1; min-width: 0; } .fl-12__contact-name { font-size: 0.78rem; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .fl-12__contact-preview { font-size: 0.68rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .fl-12__contact-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; } .fl-12__contact-time { font-size: 0.62rem; color: var(--muted); } .fl-12__unread { width: 16px; height: 16px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 0.58rem; font-weight: 800; display: flex; align-items: center; justify-content: center; } /* ── Message pane ── */ .fl-12__pane { flex: 1; display: flex; flex-direction: column; min-width: 0; } /* Chat header */ .fl-12__chat-header { height: 52px; background: var(--surface); border-bottom: 1px solid var(--border); display: flex; align-items: center; padding: 0 16px; gap: 10px; flex-shrink: 0; } .fl-12__chat-avatar { width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg, #6366f1, #4f46e5); display: flex; align-items: center; justify-content: center; font-size: 0.72rem; font-weight: 700; color: #fff; flex-shrink: 0; } .fl-12__chat-name { font-size: 0.85rem; font-weight: 700; color: var(--text); } .fl-12__chat-status { font-size: 0.65rem; color: #22c55e; font-weight: 500; } .fl-12__spacer { flex: 1; } .fl-12__header-actions { display: flex; gap: 4px; } .fl-12__hbtn { width: 30px; height: 30px; border-radius: 6px; background: rgba(255,255,255,0.05); display: flex; align-items: center; justify-content: center; font-size: 0.8rem; cursor: pointer; color: var(--muted); transition: background 0.15s, color 0.15s; } .fl-12__hbtn:hover { background: rgba(255,255,255,0.1); color: var(--text); } /* Messages area: flex column, flex: 1 */ .fl-12__messages { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 12px; } /* Date divider */ .fl-12__date-divider { display: flex; align-items: center; gap: 10px; font-size: 0.65rem; font-weight: 600; color: var(--muted); letter-spacing: 0.06em; text-transform: uppercase; } .fl-12__date-divider::before, .fl-12__date-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); } /* Message row */ .fl-12__msg { display: flex; gap: 8px; max-width: 85%; } .fl-12__msg--out { flex-direction: row-reverse; /* bubble right, avatar right */ align-self: flex-end; } .fl-12__msg--in { align-self: flex-start; } .fl-12__msg-avatar { width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 0.65rem; font-weight: 700; color: #fff; align-self: flex-end; } .fl-12__msg-body { display: flex; flex-direction: column; gap: 4px; } .fl-12__msg--out .fl-12__msg-body { align-items: flex-end; } .fl-12__bubble { padding: 9px 13px; border-radius: 16px; font-size: 0.8rem; line-height: 1.5; color: var(--text); max-width: 260px; } .fl-12__msg--in .fl-12__bubble { background: var(--bubble-in); border-bottom-left-radius: 4px; } .fl-12__msg--out .fl-12__bubble { background: var(--bubble-out); border-bottom-right-radius: 4px; } .fl-12__msg-time { font-size: 0.62rem; color: var(--muted); padding: 0 4px; } /* Typing indicator */ .fl-12__typing { display: flex; gap: 4px; padding: 10px 14px; background: var(--bubble-in); border-radius: 16px; border-bottom-left-radius: 4px; align-items: center; align-self: flex-start; } .fl-12__typing-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: fl-12-bounce 1.2s ease-in-out infinite; } .fl-12__typing-dot:nth-child(2) { animation-delay: 0.2s; } .fl-12__typing-dot:nth-child(3) { animation-delay: 0.4s; } @keyframes fl-12-bounce { 0%,80%,100% { transform: translateY(0); opacity: 0.5; } 40% { transform: translateY(-4px); opacity: 1; } } /* Input bar */ .fl-12__input-bar { background: var(--surface); border-top: 1px solid var(--border); padding: 10px 14px; display: flex; align-items: center; gap: 8px; flex-shrink: 0; } .fl-12__input { flex: 1; background: rgba(255,255,255,0.06); border: 1px solid var(--border); border-radius: 20px; padding: 8px 14px; font-size: 0.78rem; color: var(--muted); display: flex; align-items: center; } .fl-12__send-btn { width: 34px; height: 34px; border-radius: 50%; background: var(--accent); display: flex; align-items: center; justify-content: center; font-size: 0.9rem; cursor: pointer; flex-shrink: 0; transition: background 0.15s, transform 0.15s; } .fl-12__send-btn:hover { background: #4f46e5; transform: scale(1.1); } @media (prefers-reduced-motion: reduce) { .fl-12__typing-dot { animation: none; } .fl-12__contact, .fl-12__hbtn, .fl-12__send-btn { transition: none; } } ``` ### 13. CSS Flexbox Mosaic Image Gallery **Type:** Pure CSS **Description:** A photo mosaic gallery with three flex columns of varying weights (flex: 2, flex: 1, flex: 1.5) and variable-height tiles, each captioned with a category tag and title — creating an asymmetric editorial grid like Unsplash or Pinterest. **HTML:** ```html

    Editorial Gallery

    126 photos
    Abstract

    Magenta Drift

    Aqua

    Deep Ocean Study

    14 images · Editorial

    Organic

    Green Burst

    Ember

    Solar Flare

    Cosmic

    Nebula Fragment

    Vermillion

    Crimson Study

    + 119 more
    ``` **CSS:** ```css .fl-13, .fl-13 *, .fl-13 *::before, .fl-13 *::after { margin: 0; padding: 0; box-sizing: border-box; } .fl-13 ::selection { background: #ec4899; color: #fff; } .fl-13 { --bg: #0c0a0e; --surface: #16131a; --ink: #fff; --muted: rgba(255,255,255,0.55); --accent: #ec4899; --border: rgba(255,255,255,0.08); font-family: 'Barlow', system-ui, sans-serif; background: var(--bg); padding: 20px; border-radius: 16px; min-height: 500px; } .fl-13__header { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 16px; } .fl-13__heading { display: flex; align-items: baseline; gap: 12px; min-width: 0; } .fl-13__title { font-size: 1.15rem; font-weight: 800; color: var(--ink); letter-spacing: -0.02em; } .fl-13__count { font-size: 0.72rem; font-weight: 600; color: var(--muted); letter-spacing: 0.04em; } .fl-13__view-toggle { display: flex; gap: 4px; flex-shrink: 0; } .fl-13__view-btn { width: 30px; height: 30px; border-radius: 6px; background: rgba(255,255,255,0.04); border: 1px solid var(--border); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; color: var(--muted); transition: background 0.15s, color 0.15s, border-color 0.15s; } .fl-13__view-btn:hover { color: var(--ink); background: rgba(255,255,255,0.08); } .fl-13__view-btn.is-active { background: rgba(236,72,153,0.12); color: var(--accent); border-color: rgba(236,72,153,0.45); } /* MOSAIC LAYOUT Outer container: flex row (3 columns) with proportional flex weights. Each column: flex column with two tiles of variable flex weight. Result: an asymmetric Pinterest-style grid where the LEFT column is widest (flex: 2), the MIDDLE narrowest (flex: 1), and the RIGHT in between (flex: 1.5). */ .fl-13__mosaic { display: flex; gap: 12px; height: 440px; } .fl-13__col { display: flex; flex-direction: column; gap: 12px; min-width: 0; } .fl-13__col--wide { flex: 2; } .fl-13__col--narrow { flex: 1; } .fl-13__col--mid { flex: 1.5; } .fl-13__tile { flex: 1; border-radius: 12px; overflow: hidden; position: relative; cursor: pointer; isolation: isolate; background: var(--surface); } .fl-13__tile--tall { flex: 1.8; } .fl-13__tile--short { flex: 1; } /* The "image": a gradient stand-in for a real photo. In production, replace .fl-13__tile-bg with at the same size + an object-fit: cover rule. The scale-on-hover effect still works. */ .fl-13__tile-bg { position: absolute; inset: 0; background: var(--tile-grad, linear-gradient(135deg, #6366f1, #1e1b4b)); transition: transform 0.45s cubic-bezier(0.2, 0.6, 0.2, 1); z-index: 0; } .fl-13__tile:hover .fl-13__tile-bg { transform: scale(1.05); } /* Caption scrim — sits above the image, persistent (not hover-only). Linear gradient fades the bottom of the image so white text reads cleanly without darkening the whole image. */ .fl-13__tile::after { content: ''; position: absolute; inset: auto 0 0 0; height: 65%; background: linear-gradient(to top, rgba(0,0,0,0.78) 0%, rgba(0,0,0,0.45) 35%, transparent 100%); z-index: 1; pointer-events: none; } .fl-13__tile-meta { position: absolute; left: 14px; right: 14px; bottom: 14px; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; z-index: 2; pointer-events: none; } .fl-13__tile-tag { display: inline-block; background: rgba(255,255,255,0.18); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); padding: 3px 10px; border-radius: 999px; font-size: 0.62rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: #fff; } .fl-13__tile-title { font-size: 0.92rem; font-weight: 700; color: #fff; line-height: 1.25; letter-spacing: -0.01em; text-shadow: 0 1px 4px rgba(0,0,0,0.3); } .fl-13__tile-sub { font-size: 0.7rem; color: rgba(255,255,255,0.78); font-weight: 500; } .fl-13__tile-more { display: inline-block; margin-top: 2px; padding: 3px 9px; border-radius: 999px; background: rgba(255,255,255,0.18); border: 1px solid rgba(255,255,255,0.25); font-size: 0.65rem; font-weight: 700; color: #fff; } /* Smaller tiles need lighter caption so we don't drown the image */ .fl-13__col--narrow .fl-13__tile-title { font-size: 0.78rem; } .fl-13__col--narrow .fl-13__tile-meta { left: 10px; right: 10px; bottom: 10px; gap: 4px; } @media (max-width: 720px) { .fl-13 { padding: 14px; } .fl-13__mosaic { height: 520px; } } @media (max-width: 520px) { /* Below 520px the three-column row gets too cramped. Stack the columns vertically — still a flexbox layout, just flipped axis. */ .fl-13__mosaic { flex-direction: column; height: auto; } .fl-13__col { flex-direction: row; flex: none; min-height: 180px; } .fl-13__col--wide .fl-13__tile--tall { flex: 1.6; } .fl-13__title { font-size: 1rem; } } @media (prefers-reduced-motion: reduce) { .fl-13__tile-bg, .fl-13__view-btn { transition: none; } .fl-13__tile:hover .fl-13__tile-bg { transform: none; } } ``` ### 14. CSS Flexbox Form Layout **Type:** Pure CSS **Description:** A structured form layout using flex for single-column fields, inline multi-column field rows, and input groups with prefix/suffix addons — all without tables or floats. **HTML:** ```html
    Flexbox Form Layout
    Create Your Account
    All field rows and input groups use CSS Flexbox
    Please enter a valid email address
    👁
    ✓ Password strength: Strong
    0 / 200 characters
    Send me weekly CSS layout tips and pattern updates
    I agree to the Terms of Service and Privacy Policy
    Step 2 of 3
    ``` **CSS:** ```css .fl-14, .fl-14 *, .fl-14 *::before, .fl-14 *::after { margin: 0; padding: 0; box-sizing: border-box; } .fl-14 ::selection { background: #2563eb; color: #fff; } .fl-14 { --bg: #f8fafc; --surface: #fff; --ink: #0f172a; --muted: #64748b; --accent: #2563eb; --accent-light: #dbeafe; --border: #cbd5e1; --border-focus: #2563eb; --error: #ef4444; --success: #22c55e; font-family: 'Lato', sans-serif; background: var(--bg); padding: 28px; border-radius: 16px; min-height: 500px; display: flex; align-items: flex-start; justify-content: center; } .fl-14__card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; width: 100%; max-width: 560px; } .fl-14__card-header { background: linear-gradient(135deg, #1e3a5f, #2563eb); padding: 20px 24px; } .fl-14__card-eyebrow { font-size: 0.65rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(255,255,255,0.55); margin-bottom: 4px; } .fl-14__card-title { font-size: 1.1rem; font-weight: 900; color: #fff; } .fl-14__card-sub { font-size: 0.75rem; color: rgba(255,255,255,0.55); margin-top: 4px; } .fl-14__form { padding: 24px; display: flex; flex-direction: column; gap: 16px; } /* ── Row patterns ── */ /* Single full-width field */ .fl-14__field { display: flex; flex-direction: column; gap: 5px; } /* Two-col row: flex row with gap */ .fl-14__row { display: flex; gap: 12px; } .fl-14__row .fl-14__field { flex: 1; } .fl-14__row .fl-14__field--narrow { flex: 0 0 100px; } .fl-14__row .fl-14__field--wide { flex: 2; } /* Input group: icon + input side by side */ .fl-14__input-group { display: flex; align-items: stretch; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; transition: border-color 0.2s, box-shadow 0.2s; } .fl-14__input-group:focus-within { border-color: var(--border-focus); box-shadow: 0 0 0 3px rgba(37,99,235,0.12); } .fl-14__input-prefix { background: #f8fafc; border-right: 1px solid var(--border); padding: 0 10px; display: flex; align-items: center; font-size: 0.78rem; color: var(--muted); flex-shrink: 0; white-space: nowrap; } .fl-14__input-suffix { background: #f8fafc; border-left: 1px solid var(--border); padding: 0 10px; display: flex; align-items: center; font-size: 0.78rem; color: var(--muted); flex-shrink: 0; } .fl-14__input { flex: 1; border: none; outline: none; padding: 9px 12px; font-size: 0.82rem; font-family: 'Lato', sans-serif; color: var(--ink); background: transparent; min-width: 0; } .fl-14__input::placeholder { color: #94a3b8; } /* Plain input (no group) */ .fl-14__plain-input { border: 1px solid var(--border); border-radius: 8px; padding: 9px 12px; font-size: 0.82rem; font-family: 'Lato', sans-serif; color: var(--ink); outline: none; width: 100%; transition: border-color 0.2s, box-shadow 0.2s; } .fl-14__plain-input:focus { border-color: var(--border-focus); box-shadow: 0 0 0 3px rgba(37,99,235,0.12); } .fl-14__plain-input::placeholder { color: #94a3b8; } /* Select */ .fl-14__select { border: 1px solid var(--border); border-radius: 8px; padding: 9px 12px; font-size: 0.82rem; font-family: 'Lato', sans-serif; color: var(--ink); outline: none; width: 100%; background: var(--surface); cursor: pointer; transition: border-color 0.2s; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2364748b' stroke-width='1.5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; } .fl-14__select:focus { border-color: var(--border-focus); box-shadow: 0 0 0 3px rgba(37,99,235,0.12); } /* Textarea */ .fl-14__textarea { border: 1px solid var(--border); border-radius: 8px; padding: 9px 12px; font-size: 0.82rem; font-family: 'Lato', sans-serif; color: var(--ink); outline: none; width: 100%; resize: vertical; min-height: 80px; transition: border-color 0.2s, box-shadow 0.2s; } .fl-14__textarea:focus { border-color: var(--border-focus); box-shadow: 0 0 0 3px rgba(37,99,235,0.12); } .fl-14__label { font-size: 0.75rem; font-weight: 700; color: var(--ink); display: flex; align-items: center; gap: 4px; } .fl-14__required { color: var(--error); } .fl-14__hint { font-size: 0.68rem; color: var(--muted); } .fl-14__hint.is-error { color: var(--error); } .fl-14__hint.is-success { color: var(--success); } /* Checkbox row */ .fl-14__check-group { display: flex; flex-direction: column; gap: 8px; } .fl-14__check-item { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; } .fl-14__checkbox { width: 16px; height: 16px; border: 2px solid var(--border); border-radius: 4px; flex-shrink: 0; margin-top: 1px; display: flex; align-items: center; justify-content: center; transition: background 0.15s, border-color 0.15s; } .fl-14__checkbox.is-checked { background: var(--accent); border-color: var(--accent); color: #fff; font-size: 0.6rem; font-weight: 800; } .fl-14__check-text { font-size: 0.78rem; color: var(--muted); line-height: 1.4; } /* Divider */ .fl-14__divider { height: 1px; background: #f1f5f9; margin: 4px 0; } /* Submit row */ .fl-14__submit-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 4px; } .fl-14__submit-btn { padding: 10px 24px; border-radius: 8px; background: var(--accent); color: #fff; font-size: 0.82rem; font-weight: 700; font-family: 'Lato', sans-serif; border: none; cursor: pointer; transition: background 0.2s, transform 0.15s; display: flex; align-items: center; gap: 6px; } .fl-14__submit-btn:hover { background: #1d4ed8; transform: translateY(-1px); } .fl-14__cancel-btn { padding: 10px 16px; border-radius: 8px; background: transparent; color: var(--muted); font-size: 0.82rem; font-weight: 600; font-family: 'Lato', sans-serif; border: 1px solid var(--border); cursor: pointer; transition: all 0.15s; } .fl-14__cancel-btn:hover { background: #f8fafc; color: var(--ink); } .fl-14__step-indicator { font-size: 0.7rem; color: var(--muted); } .fl-14__step-indicator strong { color: var(--ink); } @media (prefers-reduced-motion: reduce) { .fl-14__input-group, .fl-14__plain-input, .fl-14__select, .fl-14__textarea, .fl-14__submit-btn, .fl-14__cancel-btn { transition: none; } } ``` ### 15. CSS Flexbox Kanban Board Layout **Type:** CSS + JS **Description:** A dark-themed Kanban board with five status columns, draggable task cards, color-coded priority badges, avatar assignments, and a progress bar — built with a horizontal flex shell. **HTML:** ```html
    Sprint 14 · Q3 2025
    AJ
    SK
    MR
    Backlog
    3
    UX
    Redesign onboarding flow for new users
    #FL-108
    ● Low
    MR
    Backend
    Add Redis caching for API responses
    #FL-109
    ● Med
    SK
    Frontend
    Implement dark mode toggle
    #FL-110
    ● Low
    AJ
    +
    Add card
    To Do
    3
    Frontend
    Build flexbox grid component library
    #FL-101
    ● High
    AJ
    Backend
    Migrate auth service to JWT tokens
    #FL-102
    ● High
    SK
    QA
    Write E2E tests for checkout flow
    #FL-103
    ● Med
    MR
    +
    Add card
    In Progress
    3
    Frontend
    Implement responsive nav with flex
    #FL-104
    ● High
    AJ
    Backend
    Set up CI/CD pipeline for staging
    #FL-105
    ● Med
    SK
    Bug
    Fix overflow scroll on mobile sidebar
    #FL-106
    ● High
    MR
    +
    Add card
    Review
    2
    Frontend
    Pricing table with flex equal heights
    #FL-097
    ● Med
    AJ
    QA
    Cross-browser accessibility audit
    #FL-098
    ● Low
    SK
    +
    Add card
    Done
    2
    Frontend
    Holy grail layout with flex columns
    #FL-090
    ✓ Done
    MR
    Backend
    Database schema migrations v2.1
    #FL-091
    ✓ Done
    AJ
    +
    Add card
    + Add column
    ``` **CSS:** ```css .fl-15, .fl-15 *, .fl-15 *::before, .fl-15 *::after { margin: 0; padding: 0; box-sizing: border-box; } .fl-15 ::selection { background: #7c3aed; color: #fff; } .fl-15 { --bg: #0f0f13; --panel: #1a1a24; --col: #1e1e2a; --col-hover: #252533; --border: #2e2e40; --accent: #7c3aed; --accent2: #06b6d4; --accent3: #f59e0b; --accent4: #10b981; --danger: #ef4444; --ink: #e8e8f0; --muted: #6b6b80; --card-bg: #252535; --card-hover: #2d2d40; font-family: 'DM Sans', sans-serif; background: var(--bg); min-height: 520px; border-radius: 16px; overflow: hidden; border: 1px solid var(--border); display: flex; flex-direction: column; } /* ── Top Bar ── */ .fl-15__topbar { display: flex; align-items: center; justify-content: space-between; padding: 12px 20px; background: var(--panel); border-bottom: 1px solid var(--border); flex-shrink: 0; gap: 12px; } .fl-15__logo { display: flex; align-items: center; gap: 8px; } .fl-15__logo-icon { width: 28px; height: 28px; background: var(--accent); border-radius: 6px; display: flex; align-items: center; justify-content: center; } .fl-15__logo-icon svg { width: 16px; height: 16px; fill: #fff; } .fl-15__logo-name { font-family: 'Space Mono', monospace; font-size: 0.85rem; font-weight: 700; color: var(--ink); letter-spacing: -0.02em; } .fl-15__logo-name span { color: var(--accent); } .fl-15__project { font-size: 0.75rem; color: var(--muted); font-weight: 500; letter-spacing: 0.04em; text-transform: uppercase; } .fl-15__topbar-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; } .fl-15__avatar { width: 28px; height: 28px; border-radius: 50%; font-size: 0.65rem; font-weight: 700; display: flex; align-items: center; justify-content: center; color: #fff; flex-shrink: 0; } .fl-15__avatar--a { background: #7c3aed; } .fl-15__avatar--b { background: #06b6d4; } .fl-15__avatar--c { background: #f59e0b; } .fl-15__btn { padding: 5px 12px; border-radius: 6px; font-size: 0.75rem; font-weight: 600; cursor: pointer; border: none; font-family: 'DM Sans', sans-serif; transition: opacity 0.2s; } .fl-15__btn:hover { opacity: 0.85; } .fl-15__btn--primary { background: var(--accent); color: #fff; } .fl-15__btn--ghost { background: transparent; color: var(--muted); border: 1px solid var(--border); } /* ── Board ── */ .fl-15__board { display: flex; flex: 1; gap: 10px; padding: 14px; overflow-x: auto; align-items: flex-start; min-height: 0; position: relative; } .fl-15__board::-webkit-scrollbar { height: 6px; } .fl-15__board::-webkit-scrollbar-track { background: transparent; } .fl-15__board::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; } .fl-15__board::-webkit-scrollbar-thumb:hover { background: var(--accent); } /* ── Column ── */ .fl-15__col { display: flex; flex-direction: column; flex: 0 0 192px; min-width: 0; background: var(--col); border-radius: 10px; border: 1px solid var(--border); overflow: hidden; } .fl-15__col-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; flex-shrink: 0; border-bottom: 2px solid transparent; } .fl-15__col--backlog .fl-15__col-head { border-color: var(--muted); } .fl-15__col--todo .fl-15__col-head { border-color: var(--accent2); } .fl-15__col--doing .fl-15__col-head { border-color: var(--accent); } .fl-15__col--review .fl-15__col-head { border-color: var(--accent3); } .fl-15__col--done .fl-15__col-head { border-color: var(--accent4); } .fl-15__col-label { display: flex; align-items: center; gap: 6px; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; } .fl-15__col--backlog .fl-15__col-label { color: var(--muted); } .fl-15__col--todo .fl-15__col-label { color: var(--accent2); } .fl-15__col--doing .fl-15__col-label { color: var(--accent); } .fl-15__col--review .fl-15__col-label { color: var(--accent3); } .fl-15__col--done .fl-15__col-label { color: var(--accent4); } .fl-15__col-dot { width: 7px; height: 7px; border-radius: 50%; } .fl-15__col--backlog .fl-15__col-dot { background: var(--muted); } .fl-15__col--todo .fl-15__col-dot { background: var(--accent2); } .fl-15__col--doing .fl-15__col-dot { background: var(--accent); } .fl-15__col--review .fl-15__col-dot { background: var(--accent3); } .fl-15__col--done .fl-15__col-dot { background: var(--accent4); } .fl-15__col-count { font-size: 0.68rem; background: var(--border); color: var(--muted); border-radius: 20px; padding: 1px 7px; font-weight: 700; } /* ── Cards area ── */ .fl-15__cards { display: flex; flex-direction: column; gap: 8px; padding: 10px; flex: 1; overflow-y: auto; min-height: 80px; max-height: 360px; } .fl-15__cards::-webkit-scrollbar { width: 3px; } .fl-15__cards::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; } /* ── Card ── */ .fl-15__card { background: var(--card-bg); border-radius: 7px; border: 1px solid var(--border); padding: 10px; cursor: pointer; transition: background 0.15s, border-color 0.15s, transform 0.15s; display: flex; flex-direction: column; gap: 7px; } .fl-15__card:hover { background: var(--card-hover); border-color: #3a3a50; transform: translateY(-1px); } .fl-15__card--highlighted { border-color: var(--accent); } .fl-15__card-tag { display: inline-flex; align-items: center; gap: 4px; font-size: 0.62rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; padding: 2px 7px; border-radius: 4px; align-self: flex-start; } .fl-15__card-tag--fe { background: rgba(124,58,237,0.2); color: #a78bfa; } .fl-15__card-tag--be { background: rgba(6,182,212,0.2); color: #67e8f9; } .fl-15__card-tag--bug { background: rgba(239,68,68,0.2); color: #fca5a5; } .fl-15__card-tag--ux { background: rgba(245,158,11,0.2); color: #fcd34d; } .fl-15__card-tag--qa { background: rgba(16,185,129,0.2); color: #6ee7b7; } .fl-15__card-title { font-size: 0.78rem; font-weight: 500; color: var(--ink); line-height: 1.4; } .fl-15__card-meta { display: flex; align-items: center; justify-content: space-between; } .fl-15__card-id { font-family: 'Space Mono', monospace; font-size: 0.6rem; color: var(--muted); } .fl-15__card-foot { display: flex; align-items: center; gap: 5px; } .fl-15__card-prio { font-size: 0.6rem; font-weight: 600; } .fl-15__card-prio--high { color: var(--danger); } .fl-15__card-prio--medium { color: var(--accent3); } .fl-15__card-prio--low { color: var(--accent4); } .fl-15__card-avatar { width: 18px; height: 18px; border-radius: 50%; font-size: 0.5rem; font-weight: 700; display: flex; align-items: center; justify-content: center; color: #fff; margin-left: auto; } .fl-15__card-avatar--a { background: #7c3aed; } .fl-15__card-avatar--b { background: #06b6d4; } .fl-15__card-avatar--c { background: #f59e0b; } /* ── Progress bar on doing cards ── */ .fl-15__card-progress { height: 3px; background: var(--border); border-radius: 2px; overflow: hidden; } .fl-15__card-progress-fill { height: 100%; border-radius: 2px; background: var(--accent); animation: fl-15-pulse 2.5s ease-in-out infinite; } @keyframes fl-15-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.6; } } /* ── Add card button ── */ .fl-15__col-add { display: flex; align-items: center; gap: 6px; padding: 8px 12px; font-size: 0.72rem; color: var(--muted); cursor: pointer; border-top: 1px solid var(--border); flex-shrink: 0; transition: color 0.15s, background 0.15s; } .fl-15__col-add:hover { color: var(--ink); background: var(--col-hover); } .fl-15__col-add-icon { width: 16px; height: 16px; border: 1.5px solid currentColor; border-radius: 4px; display: flex; align-items: center; justify-content: center; font-size: 0.9rem; line-height: 1; } /* ── Add column ── */ .fl-15__col--add { flex: 0 0 140px; border: 1.5px dashed var(--border); background: transparent; border-radius: 10px; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: border-color 0.15s, background 0.15s; align-self: stretch; min-height: 120px; } .fl-15__col--add:hover { border-color: var(--accent); background: rgba(124,58,237,0.05); } .fl-15__col-add-label { display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--muted); font-size: 0.72rem; font-weight: 500; } .fl-15__col-add-label span { font-size: 1.2rem; line-height: 1; } /* ── Drag ghost (visual only) ── */ .fl-15__card.is-dragging { opacity: 0.4; transform: rotate(2deg) scale(0.97); } /* ── Responsive: narrow viewports ── */ @media (max-width: 520px) { .fl-15__project { display: none; } .fl-15__topbar { padding: 10px 14px; gap: 8px; } .fl-15__topbar-actions { gap: 6px; } .fl-15__btn--ghost { display: none; } .fl-15__avatar { width: 24px; height: 24px; font-size: 0.6rem; } } @media (max-width: 380px) { .fl-15__avatar { display: none; } .fl-15__avatar:last-of-type { display: flex; } } /* ── Reduced motion ── */ @media (prefers-reduced-motion: reduce) { .fl-15__card { transition: none; } .fl-15__card-progress-fill { animation: none; } } ``` **JS:** ```js (function() { const board = document.getElementById('fl-15-board'); if (!board) return; let dragCard = null; let dragSource = null; board.querySelectorAll('.fl-15__card[draggable]').forEach(card => { // Enable drag on all cards card.setAttribute('draggable', 'true'); }); // Enable drag on ALL cards board.querySelectorAll('.fl-15__card').forEach(card => { card.setAttribute('draggable', 'true'); card.addEventListener('dragstart', e => { dragCard = card; dragSource = card.closest('.fl-15__cards'); setTimeout(() => card.classList.add('is-dragging'), 0); e.dataTransfer.effectAllowed = 'move'; }); card.addEventListener('dragend', () => { card.classList.remove('is-dragging'); board.querySelectorAll('.fl-15__cards').forEach(z => z.classList.remove('fl-15__drop-zone')); dragCard = null; }); }); board.querySelectorAll('.fl-15__cards').forEach(zone => { zone.addEventListener('dragover', e => { e.preventDefault(); e.dataTransfer.dropEffect = 'move'; }); zone.addEventListener('drop', e => { e.preventDefault(); if (dragCard && zone !== dragSource) { zone.appendChild(dragCard); // Update counts updateCounts(); } }); }); function updateCounts() { board.querySelectorAll('.fl-15__col').forEach(col => { const count = col.querySelectorAll('.fl-15__card').length; const badge = col.querySelector('.fl-15__col-count'); if (badge) badge.textContent = count; }); } // Add card buttons — append a placeholder card board.querySelectorAll('.fl-15__col-add').forEach(btn => { btn.addEventListener('click', () => { const col = btn.closest('.fl-15__col'); const cardsZone = col.querySelector('.fl-15__cards'); if (!cardsZone) return; const card = document.createElement('div'); card.className = 'fl-15__card'; card.setAttribute('draggable', 'true'); card.innerHTML = ` Frontend
    New task…
    #FL-NEW
    `; cardsZone.appendChild(card); card.querySelector('[contenteditable]').focus(); updateCounts(); // Re-attach drag events card.addEventListener('dragstart', e => { dragCard = card; dragSource = card.closest('.fl-15__cards'); setTimeout(() => card.classList.add('is-dragging'), 0); e.dataTransfer.effectAllowed = 'move'; }); card.addEventListener('dragend', () => { card.classList.remove('is-dragging'); dragCard = null; }); }); }); })(); ``` --- ## 23 CSS Flip Cards URL: https://codefronts.com/components/css-flip-cards/ Description: 23 production-ready CSS 3D flip cards — product feature comparison, e-commerce pricing plans, gift card coupon reveal, bi-fold event ticket, team bio, skill rating, language flashcards, trivia Q&A, gaming trading cards, photo gallery overlay, video playlist thumbnails, testimonial reviews, digital business vCard, restaurant menu recipe, step-by-step process map, vertical rotateX flip, click-to-flip JavaScript toggle, dynamic-height auto-resize, responsive CSS Grid flip card matrix, luxury cube-unfold book-open flip, diagonal rotate3d travel postcard, clip-path iris aperture album reveal, and a clip-path diagonal peel scratch-card reward reveal. 21 pure CSS + 2 CSS + JS — copy, paste, ship. Demo count: 23 ### 01. Luxury Product Card with 3D Cube Unfold Flip **Type:** Pure CSS **Description:** A luxury watch product card that opens like a book — the back face hinges in from the right edge rather than the conventional spin-around-center flip. **HTML:** ```html
    M MERIDIAN
    MERIDIAN
    Heritage Chronograph 1957
    $12,400 Limited release
    Hover to open ›
    Specifications
    Heritage Chronograph 1957
    Case18k Rose Gold · 40 mm
    MovementCaliber M-29 Automatic
    Reserve72-hour power reserve
    Water100 m · screw-down crown
    CrystalDomed sapphire · AR coated
    StrapAlligator · pin buckle
    Reserve this piece ›
    12 / 200 cast · made in Switzerland
    ``` **CSS:** ```css .fc-19,.fc-19 *,.fc-19 *::before,.fc-19 *::after{box-sizing:border-box;margin:0;padding:0} .fc-19 ::selection{background:#d4af37;color:#0a0a0a} .fc-19{ --bg:#080806;--gold:#d4af37;--gold-light:#fef3c7;--ivory:#f5f1e8; --card-w:360px;--card-h:500px; font-family:'Cormorant Garamond','Playfair Display',Georgia,serif; background:radial-gradient(ellipse at 50% 30%,#1a1610,#080806 70%); min-height:100vh;display:flex;align-items:center;justify-content:center; padding:40px 20px;color:var(--ivory); } .fc-19__scene{width:var(--card-w);height:var(--card-h);perspective:1600px} .fc-19__card{width:100%;height:100%;position:relative} .fc-19__front,.fc-19__back{ position:absolute;inset:0;border-radius:6px;overflow:hidden; display:flex;flex-direction:column;align-items:center; padding:36px 32px; } .fc-19__front{ background:linear-gradient(160deg,#1a1610 0%,#0c0a07 100%); border:1px solid rgba(212,175,55,.25); box-shadow:inset 0 1px 0 rgba(254,243,199,.06),0 12px 30px rgba(0,0,0,.5); transition:opacity .8s cubic-bezier(.4,0,.2,1),transform .8s cubic-bezier(.4,0,.2,1); z-index:1; } .fc-19__back{ background:linear-gradient(160deg,#15110b 0%,#0a0805 100%); border:1px solid rgba(212,175,55,.4); box-shadow:0 16px 40px rgba(0,0,0,.6),inset 0 1px 0 rgba(254,243,199,.1); transform:rotateY(-90deg); transform-origin:left center; backface-visibility:visible; -webkit-backface-visibility:visible; transition:transform .9s cubic-bezier(.4,0,.2,1); z-index:2; } .fc-19__scene:hover .fc-19__back{transform:rotateY(0deg)} .fc-19__scene:hover .fc-19__front{opacity:.5;transform:translateX(-3%)} /* FRONT styling */ .fc-19__brand-row{display:flex;align-items:center;gap:8px;margin-bottom:8px} .fc-19__brand-mark{ width:32px;height:32px;border:1px solid var(--gold); display:flex;align-items:center;justify-content:center; font-family:serif;font-size:18px;color:var(--gold);font-weight:600; } .fc-19__brand-text{font-size:11px;letter-spacing:.45em;color:var(--gold);font-family:serif;font-weight:500} .fc-19__watch{margin:4px 0 16px} .fc-19__model-label{font-size:18px;color:var(--ivory);text-align:center;font-style:italic;letter-spacing:.02em} .fc-19__price-row{display:flex;flex-direction:column;align-items:center;gap:2px;margin-top:14px} .fc-19__price-amt{font-size:28px;font-weight:500;color:var(--gold);letter-spacing:.04em;font-family:serif} .fc-19__price-sub{font-size:10px;letter-spacing:.3em;text-transform:uppercase;color:rgba(245,241,232,.4)} .fc-19__hint{margin-top:auto;font-size:10px;letter-spacing:.25em;text-transform:uppercase;color:rgba(212,175,55,.5);font-family:system-ui,sans-serif} /* BACK styling */ .fc-19__back-tag{font-size:10px;letter-spacing:.4em;text-transform:uppercase;color:var(--gold);font-family:system-ui,sans-serif;font-weight:600;margin-bottom:8px} .fc-19__back-title{font-size:20px;font-style:italic;color:var(--ivory);text-align:center;margin-bottom:18px;line-height:1.2} .fc-19__spec-grid{display:flex;flex-direction:column;gap:10px;width:100%;margin-bottom:18px} .fc-19__spec{display:flex;flex-direction:column;gap:2px;padding-bottom:8px;border-bottom:1px solid rgba(212,175,55,.12)} .fc-19__spec:last-child{border-bottom:none} .fc-19__spec-key{font-size:9px;letter-spacing:.25em;text-transform:uppercase;color:rgba(212,175,55,.55);font-family:system-ui,sans-serif;font-weight:600} .fc-19__spec-val{font-size:13px;color:var(--ivory);font-family:serif} .fc-19__cta{ display:block;width:100%;padding:13px 0;text-align:center; background:linear-gradient(135deg,#d4af37,#b8941f);color:#0a0a0a; font-size:11px;letter-spacing:.3em;text-transform:uppercase;font-weight:600; font-family:system-ui,sans-serif;text-decoration:none; transition:filter .2s,box-shadow .2s; box-shadow:0 6px 18px rgba(212,175,55,.25); } .fc-19__cta:hover{filter:brightness(1.1);box-shadow:0 10px 28px rgba(212,175,55,.4)} .fc-19__back-foot{margin-top:14px;font-size:9px;letter-spacing:.25em;text-transform:uppercase;color:rgba(245,241,232,.3);font-family:system-ui,sans-serif;text-align:center} @media(prefers-reduced-motion:reduce){ .fc-19__front,.fc-19__back{transition:none} } ``` ### 02. Product Feature Comparison Flip Card **Type:** Pure CSS **Description:** Front shows a styled product render; back reveals a full technical specification grid with an Add to Cart CTA. **HTML:** ```html
    New 2025
    NovaTech
    ProVision X7 Monitor
    $649 / unit
    Hover to view specs
    Technical Specifications
    Display
    27" IPS
    Resolution
    4K UHD
    Refresh Rate
    165 Hz
    Response
    1 ms GTG
    Panel
    Nano IPS
    Ports
    2× DP 1.4
    HDR
    HDR 600
    Coverage
    98% DCI-P3
    ``` **CSS:** ```css .fc-01,.fc-01 *,.fc-01 *::before,.fc-01 *::after{box-sizing:border-box;margin:0;padding:0} .fc-01 ::selection{background:#6c63ff;color:#fff} .fc-01{ --bg:#0d0d14;--accent:#7c3aed;--accent2:#06b6d4;--gold:#f59e0b;--white:#f1f5f9;--card-w:340px;--card-h:480px; 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; color:var(--white); } .fc-01__scene{width:var(--card-w);height:var(--card-h);perspective:1200px} .fc-01__card{ width:100%;height:100%;position:relative; transform-style:preserve-3d; transition:transform .7s cubic-bezier(.4,0,.2,1); } .fc-01__scene:hover .fc-01__card{transform:rotateY(180deg)} .fc-01__front,.fc-01__back{ position:absolute;inset:0;border-radius:20px; backface-visibility:hidden;-webkit-backface-visibility:hidden; overflow:hidden; } .fc-01__front{ background:linear-gradient(145deg,#1a1a2e,#16213e); border:1px solid rgba(124,58,237,.3); display:flex;flex-direction:column; } .fc-01__back{ background:linear-gradient(145deg,#0f172a,#1e1b4b); border:1px solid rgba(6,182,212,.3); transform:rotateY(180deg); display:flex;flex-direction:column;padding:28px; } /* front */ .fc-01__badge{ position:absolute;top:16px;right:16px; background:var(--gold);color:#000; font-size:10px;font-weight:700;letter-spacing:.1em;text-transform:uppercase; padding:4px 10px;border-radius:20px; } .fc-01__img{ height:220px;background:linear-gradient(135deg,#1a0533,#0c1a4f); display:flex;align-items:center;justify-content:center;flex-shrink:0; overflow:hidden;position:relative; } .fc-01__img::before{ content:'';position:absolute;inset:0; background:radial-gradient(ellipse at 50% 70%,rgba(124,58,237,.4),transparent 70%); } .fc-01__product-svg{position:relative;z-index:1} .fc-01__info{padding:24px;flex:1;display:flex;flex-direction:column;gap:10px} .fc-01__brand{font-size:11px;letter-spacing:.15em;text-transform:uppercase;color:var(--accent2);font-weight:600} .fc-01__name{font-size:22px;font-weight:700;color:var(--white);line-height:1.2} .fc-01__price{font-size:28px;font-weight:800;color:var(--accent)} .fc-01__price span{font-size:14px;font-weight:400;color:rgba(241,245,249,.5)} .fc-01__hint{margin-top:auto;font-size:11px;color:rgba(241,245,249,.35);letter-spacing:.08em;text-align:center;display:flex;align-items:center;justify-content:center;gap:6px} .fc-01__hint svg{opacity:.5} /* back */ .fc-01__back-title{font-size:14px;font-weight:700;letter-spacing:.12em;text-transform:uppercase;color:var(--accent2);margin-bottom:16px} .fc-01__spec{display:grid;grid-template-columns:1fr 1fr;gap:14px;flex:1} .fc-01__spec-item{background:rgba(255,255,255,.04);border:1px solid rgba(255,255,255,.07);border-radius:12px;padding:14px} .fc-01__spec-label{font-size:10px;letter-spacing:.1em;text-transform:uppercase;color:rgba(241,245,249,.4);margin-bottom:4px} .fc-01__spec-val{font-size:15px;font-weight:600;color:var(--white)} .fc-01__spec-val--accent{color:var(--gold)} .fc-01__cta{ margin-top:20px;width:100%;padding:14px; background:linear-gradient(135deg,var(--accent),var(--accent2)); color:#fff;font-size:14px;font-weight:700;letter-spacing:.06em; border:none;border-radius:12px;cursor:pointer; transition:opacity .2s; } .fc-01__cta:hover{opacity:.85} @media(prefers-reduced-motion:reduce){.fc-01__card{transition:none}} ``` ### 03. E-commerce Pricing Plan Card **Type:** Pure CSS **Description:** Front displays tier name and monthly price with gradient text; back reveals the complete feature breakdown and a CTA button. **HTML:** ```html
    🚀
    Pro Plan
    $ 49
    per month, billed annually
    Includes
    Unlimited projects
    Advanced analytics
    Priority support
    Custom domains
    Hover for full feature breakdown
    Everything in Pro
    Unlimited projects & workspaces
    Advanced real-time analytics
    Custom domain mapping
    API access (10k req/day)
    Priority 4h support SLA
    AI content generation (50/mo)
    White-label exports
    ``` **CSS:** ```css .fc-02,.fc-02 *,.fc-02 *::before,.fc-02 *::after{box-sizing:border-box;margin:0;padding:0} .fc-02 ::selection{background:#10b981;color:#000} .fc-02{ --bg:#050d0a;--accent:#10b981;--accent2:#f59e0b;--purple:#8b5cf6;--white:#f0fdf4; --card-w:320px;--card-h:460px; font-family:'Segoe UI',system-ui,sans-serif; background:radial-gradient(ellipse at 50% 0%,#0a2e1e,#050d0a 70%); min-height:100vh;display:flex;align-items:center;justify-content:center; padding:40px 20px;gap:32px;flex-wrap:wrap;color:var(--white); } /* scene */ .fc-02__scene{width:var(--card-w);height:var(--card-h);perspective:1200px;cursor:pointer} .fc-02__card{ width:100%;height:100%;position:relative; transform-style:preserve-3d; transform-origin:center bottom; transition:transform .85s cubic-bezier(.34,1.2,.4,1); } /* Flip-UP from the base — the card's top edge appears to lift toward the camera while the bottom edge stays anchored. Rotating around the bottom would normally push the rendered card downward by its full height (because the top swings into the space below); the translateY(-100%) at the end keeps the visual position fixed by counter-translating the card by exactly its height. Reads as "lifting the curtain on the plan." */ .fc-02__scene:hover .fc-02__card{transform:translateY(-100%) rotateX(180deg)} .fc-02__front,.fc-02__back{ position:absolute;inset:0;border-radius:24px; backface-visibility:hidden;-webkit-backface-visibility:hidden;overflow:hidden; } /* FRONT */ .fc-02__front{ background:linear-gradient(160deg,#071a12,#0a2e1e); border:1px solid rgba(16,185,129,.25); display:flex;flex-direction:column; box-shadow:0 0 40px rgba(16,185,129,.08); } .fc-02__front-glow{ position:absolute;top:-60px;left:50%;transform:translateX(-50%); width:200px;height:200px; background:radial-gradient(circle,rgba(16,185,129,.25),transparent 70%); pointer-events:none; } .fc-02__front-head{padding:32px 28px 24px;text-align:center;position:relative} .fc-02__tier-icon{ width:56px;height:56px;border-radius:16px; background:linear-gradient(135deg,rgba(16,185,129,.2),rgba(16,185,129,.05)); border:1px solid rgba(16,185,129,.3); display:flex;align-items:center;justify-content:center; margin:0 auto 16px;font-size:24px; } .fc-02__tier{font-size:11px;letter-spacing:.2em;text-transform:uppercase;color:var(--accent);font-weight:700;margin-bottom:8px} .fc-02__price-wrap{display:flex;align-items:baseline;justify-content:center;gap:4px;margin-top:4px} .fc-02__price-cur{font-size:20px;font-weight:700;color:rgba(240,253,244,.6);margin-top:6px} .fc-02__price-num{font-size:52px;font-weight:900;background:linear-gradient(135deg,#10b981,#34d399);-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text;line-height:1} .fc-02__price-per{font-size:13px;color:rgba(240,253,244,.4);margin-top:6px} .fc-02__divider{height:1px;background:linear-gradient(90deg,transparent,rgba(16,185,129,.2),transparent);margin:0 28px} .fc-02__preview{padding:24px 28px;flex:1} .fc-02__preview-label{font-size:10px;letter-spacing:.12em;text-transform:uppercase;color:rgba(240,253,244,.35);margin-bottom:14px} .fc-02__dot-list{display:flex;flex-direction:column;gap:10px} .fc-02__dot{display:flex;align-items:center;gap:10px;font-size:13px;color:rgba(240,253,244,.6)} .fc-02__dot::before{content:'';width:6px;height:6px;border-radius:50%;background:var(--accent);flex-shrink:0} .fc-02__hint{padding:0 28px 24px;text-align:center;font-size:11px;color:rgba(240,253,244,.25);letter-spacing:.08em} /* BACK */ .fc-02__back{ background:linear-gradient(160deg,#0a0a1e,#0d1533); border:1px solid rgba(139,92,246,.25); /* Pre-rotated on X so the upward flip-from-base brings it forward. */ transform:rotateX(180deg); display:flex;flex-direction:column;padding:28px; box-shadow:0 0 40px rgba(139,92,246,.08); } .fc-02__back-title{font-size:13px;font-weight:700;letter-spacing:.12em;text-transform:uppercase;color:var(--purple);margin-bottom:20px} .fc-02__feature-list{display:flex;flex-direction:column;gap:11px;flex:1} .fc-02__feature{display:flex;align-items:center;gap:12px;padding:10px 14px;border-radius:10px;background:rgba(255,255,255,.03);border:1px solid rgba(255,255,255,.06);font-size:13px;color:rgba(240,253,244,.8)} .fc-02__feature-check{ width:20px;height:20px;border-radius:6px;flex-shrink:0;display:flex;align-items:center;justify-content:center; background:rgba(16,185,129,.15);border:1px solid rgba(16,185,129,.3); } .fc-02__feature-check svg{width:11px;height:11px;stroke:var(--accent);stroke-width:2.5;fill:none} .fc-02__feature--gold .fc-02__feature-check{background:rgba(245,158,11,.15);border-color:rgba(245,158,11,.3)} .fc-02__feature--gold .fc-02__feature-check svg{stroke:var(--accent2)} .fc-02__cta{ margin-top:20px;width:100%;padding:14px; background:linear-gradient(135deg,var(--accent),#059669); color:#000;font-size:14px;font-weight:800;letter-spacing:.04em; border:none;border-radius:12px;cursor:pointer;transition:transform .15s; } .fc-02__cta:hover{transform:translateY(-1px)} @media(prefers-reduced-motion:reduce){.fc-02__card{transition:none}} ``` ### 04. Interactive Gift Card Coupon Reveal **Type:** CSS + JS **Description:** Front displays a festive holiday gift card graphic with animated snowflakes; back reveals a copyable coupon code via the Clipboard API. **HTML:** ```html
    Holiday Gift Card
    $50
    Hover to reveal →
    Your Exclusive Coupon Code
    NOVA-XMAS-2025
    Click code to copy
    Expires December 31, 2025
    ``` **CSS:** ```css .fc-03,.fc-03 *,.fc-03 *::before,.fc-03 *::after{box-sizing:border-box;margin:0;padding:0} .fc-03 ::selection{background:#ec4899;color:#fff} .fc-03{ --bg:#0c0510;--pink:#ec4899;--gold:#f59e0b;--rose:#fb7185;--white:#fff1f5; --card-w:380px;--card-h:240px; font-family:'Segoe UI',system-ui,sans-serif; background:radial-gradient(ellipse at 30% 50%,#1a0520,#0c0510 70%); min-height:100vh;display:flex;align-items:center;justify-content:center; padding:40px 20px;color:var(--white); } .fc-03__scene{width:var(--card-w);height:var(--card-h);perspective:1200px;cursor:pointer} .fc-03__card{ width:100%;height:100%;position:relative; transform-style:preserve-3d; transition:transform .8s cubic-bezier(.4,0,.2,1); } .fc-03__scene:hover .fc-03__card{transform:rotateY(180deg)} .fc-03__front,.fc-03__back{ position:absolute;inset:0;border-radius:20px; backface-visibility:hidden;-webkit-backface-visibility:hidden;overflow:hidden; } /* FRONT — holiday gift card */ .fc-03__front{ background:linear-gradient(135deg,#3b0764,#831843,#7c2d12); border:1px solid rgba(236,72,153,.3); display:flex;flex-direction:column;align-items:center;justify-content:center; } .fc-03__front::before{ content:'';position:absolute;inset:0; background:radial-gradient(ellipse at 70% 30%,rgba(245,158,11,.15),transparent 60%), radial-gradient(ellipse at 30% 80%,rgba(236,72,153,.2),transparent 50%); } /* snowflake decorations */ .fc-03__flake{ position:absolute;font-size:20px;opacity:.25;animation:fc-03-drift 4s ease-in-out infinite; } .fc-03__flake:nth-child(1){top:10%;left:8%;animation-delay:0s} .fc-03__flake:nth-child(2){top:20%;right:10%;font-size:14px;animation-delay:.8s} .fc-03__flake:nth-child(3){bottom:15%;left:12%;font-size:16px;animation-delay:1.6s} .fc-03__flake:nth-child(4){bottom:10%;right:8%;animation-delay:2.4s} @keyframes fc-03-drift{0%,100%{transform:translateY(0) rotate(0)}50%{transform:translateY(-8px) rotate(15deg)}} .fc-03__logo{position:relative;z-index:1;font-size:12px;letter-spacing:.2em;text-transform:uppercase;color:rgba(255,241,245,.5);margin-bottom:8px;font-weight:600} .fc-03__gift-title{position:relative;z-index:1;font-size:28px;font-weight:900;text-align:center;line-height:1.1;background:linear-gradient(135deg,#fbbf24,#f472b6,#c084fc);-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text} .fc-03__amount{position:relative;z-index:1;margin-top:10px;font-size:42px;font-weight:900;color:var(--gold);text-shadow:0 0 30px rgba(245,158,11,.5)} .fc-03__front-hint{position:absolute;bottom:16px;right:16px;z-index:1;font-size:10px;letter-spacing:.1em;text-transform:uppercase;color:rgba(255,241,245,.3)} /* BACK — coupon code */ .fc-03__back{ background:linear-gradient(135deg,#0a1628,#1e0833); border:1px solid rgba(245,158,11,.25); transform:rotateY(180deg); display:flex;flex-direction:column;align-items:center;justify-content:center; padding:32px;gap:20px; } .fc-03__back::before{ content:'';position:absolute;inset:0; background:radial-gradient(ellipse at 50% 50%,rgba(245,158,11,.06),transparent 70%); } .fc-03__back-label{position:relative;z-index:1;font-size:10px;letter-spacing:.18em;text-transform:uppercase;color:rgba(255,241,245,.4);font-weight:600} .fc-03__code-box{ position:relative;z-index:1; background:rgba(245,158,11,.07); border:2px dashed rgba(245,158,11,.4); border-radius:12px;padding:14px 28px; font-size:22px;font-weight:900;letter-spacing:.2em; color:var(--gold);text-align:center; font-family:'Courier New',monospace; text-shadow:0 0 20px rgba(245,158,11,.4); cursor:pointer;transition:background .2s;width:100%; } .fc-03__code-box:hover{background:rgba(245,158,11,.14)} .fc-03__copy-tip{position:relative;z-index:1;font-size:10px;color:rgba(255,241,245,.3);letter-spacing:.08em} .fc-03__expiry{position:relative;z-index:1;font-size:11px;color:rgba(255,241,245,.4)} .fc-03__expiry span{color:var(--rose)} @media(prefers-reduced-motion:reduce){.fc-03__card{transition:none}.fc-03__flake{animation:none}} ``` **JS:** ```js document.querySelector('.fc-03__code-box')?.addEventListener('click',function(){ navigator.clipboard?.writeText('NOVA-XMAS-2025'); const orig=this.textContent;this.textContent='✓ Copied!'; setTimeout(()=>this.textContent=orig,2000); }); ``` ### 05. Booking Event Ticket Fold Card **Type:** Pure CSS **Description:** A concert ticket split into two halves that bi-fold inward like a book page, each half rotating around its centre edge to reveal the ticket details on the back. **HTML:** ```html
    Live Concert · 2025
    Neon Pulse
    World Tour
    The Meridian Arena · San Francisco
    Sat, Nov 29 · 8:00 PM
    Floor · General Admission
    Ticket Details
    Neon Pulse · SF
    Date
    Nov 29
    Doors
    6:30 PM
    Zone
    Floor A
    Price
    $149
    B14
    Seat
    Scan at entry
    4829-1104-B14
    B14
    Confirmed Seat
    Valid Entry
    Hover to unfold
    ``` **CSS:** ```css .fc-22,.fc-22 *,.fc-22 *::before,.fc-22 *::after{box-sizing:border-box;margin:0;padding:0} .fc-22 ::selection{background:#f97316;color:#fff} .fc-22{ --bg:#07080f; --orange:#f97316; --amber:#fbbf24; --sky:#38bdf8; --rose:#fb7185; --white:#fff7ed; --card-w:420px; --card-h:200px; font-family:'Segoe UI',system-ui,sans-serif; background:radial-gradient(ellipse at 50% 30%,#1a0e00,#07080f 65%); min-height:100vh; display:flex;flex-direction:column;align-items:center;justify-content:center; padding:40px 20px;gap:28px; color:var(--white); } /* ══════════════════════════════════════════ PAGE-FOLD MECHANISM The card is split into LEFT half and RIGHT half. Each half is a flex child inside the card wrapper. On hover: • Left half rotates rotateY(-180deg) around its RIGHT edge (transform-origin: right) • Right half rotates rotateY( 180deg) around its LEFT edge (transform-origin: left) Both use preserve-3d so their ::before back-faces show through. Result: a bi-fold page-turn that meets in the middle. ══════════════════════════════════════════ */ .fc-22__scene{ width:var(--card-w); height:var(--card-h); position:relative; /* perspective on the scene keeps both halves in one shared 3D space */ perspective:1400px; perspective-origin:50% 50%; cursor:pointer; } /* Outer wrapper — just a flex row holding the two halves */ .fc-22__book{ width:100%;height:100%; display:flex; position:relative; } /* ── shared half styles ── */ .fc-22__half{ width:50%;height:100%; position:relative; transform-style:preserve-3d; transition:transform .7s cubic-bezier(.4,0,.2,1); } /* LEFT half pivots around its right edge. Background/border now live on each face div (front/back) — keeping them on the half itself would show as a solid coloured rectangle through transparent regions when the half rotates 180°. */ .fc-22__half--left{ transform-origin:right center; } /* RIGHT half pivots around its left edge. Background/border on each face div (front/back) — see comment on --left above. */ .fc-22__half--right{ transform-origin:left center; } /* On hover: left folds away (rotates around right edge by -180deg), right folds away (rotates around left edge by +180deg) */ .fc-22__scene:hover .fc-22__half--left{transform:rotateY(-180deg)} .fc-22__scene:hover .fc-22__half--right{transform:rotateY(180deg)} /* ── FRONT content — lives on the element itself (z-index front face) ── */ .fc-22__front-left{ position:absolute;inset:0; background:linear-gradient(160deg,#1e1000,#120900); border:1px solid rgba(249,115,22,.25); border-right:none; border-radius:12px 0 0 12px; display:flex;flex-direction:column;justify-content:center;padding:20px 20px 20px 24px;gap:8px; backface-visibility:hidden;-webkit-backface-visibility:hidden; } .fc-22__front-right{ position:absolute;inset:0; background:linear-gradient(160deg,#120900,#0d0700); border:1px solid rgba(249,115,22,.25); border-left:1px dashed rgba(249,115,22,.3); border-radius:0 12px 12px 0; display:flex;flex-direction:column;justify-content:center;align-items:center; padding:16px;gap:10px; backface-visibility:hidden;-webkit-backface-visibility:hidden; } /* ── BACK content — ::before pseudo, pre-rotated 180deg so it faces inward ── */ /* Back content lives in .fc-22__back-* divs pre-rotated 180deg. */ .fc-22__back-left, .fc-22__back-right{ position:absolute;inset:0; backface-visibility:hidden;-webkit-backface-visibility:hidden; transform:rotateY(180deg); display:flex;flex-direction:column;justify-content:center; } .fc-22__back-left{ background:linear-gradient(160deg,#0a1a28,#061020); border-radius:12px 0 0 12px; padding:20px 18px 20px 24px;gap:8px; border-right:1px dashed rgba(56,189,248,.3); } .fc-22__back-right{ background:linear-gradient(160deg,#061020,#04090f); border-radius:0 12px 12px 0; padding:16px;gap:10px; align-items:center; } /* ── FRONT — left content ── */ .fc-22__event-cat{font-size:9px;letter-spacing:.18em;text-transform:uppercase;color:var(--orange);font-weight:700} .fc-22__event-name{font-size:19px;font-weight:900;color:var(--white);line-height:1.15} .fc-22__event-sub{font-size:11px;color:rgba(255,247,237,.5)} .fc-22__meta-row{display:flex;gap:14px;margin-top:4px} .fc-22__meta{display:flex;align-items:center;gap:5px;font-size:11px;color:rgba(255,247,237,.55)} .fc-22__meta svg{flex-shrink:0;opacity:.7} /* ── FRONT — right content (stub) ── */ .fc-22__qr-wrap{ width:68px;height:68px;background:#fff;border-radius:8px; padding:5px;display:flex;align-items:center;justify-content:center; } .fc-22__stub-label{font-size:9px;letter-spacing:.14em;text-transform:uppercase;color:rgba(255,247,237,.35);text-align:center} .fc-22__seat{font-size:22px;font-weight:900;color:var(--amber);text-align:center;line-height:1} .fc-22__seat-label{font-size:9px;color:rgba(255,247,237,.35);letter-spacing:.1em;text-transform:uppercase} .fc-22__fold-hint{ position:absolute;bottom:10px;left:50%;transform:translateX(-50%); font-size:9px;letter-spacing:.1em;text-transform:uppercase; color:rgba(255,247,237,.2);white-space:nowrap; } /* ── BACK — left content ── */ .fc-22__back-cat{font-size:9px;letter-spacing:.18em;text-transform:uppercase;color:var(--sky);font-weight:700} .fc-22__back-title{font-size:17px;font-weight:900;color:var(--white);line-height:1.2} .fc-22__detail-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:4px} .fc-22__detail-item{background:rgba(255,255,255,.04);border:1px solid rgba(255,255,255,.07);border-radius:8px;padding:8px 10px} .fc-22__di-label{font-size:9px;letter-spacing:.1em;text-transform:uppercase;color:rgba(255,247,237,.35);margin-bottom:2px} .fc-22__di-val{font-size:13px;font-weight:700;color:var(--white)} .fc-22__di-val--sky{color:var(--sky)} /* ── BACK — right content ── */ .fc-22__barcode{ display:flex;gap:2px;align-items:flex-end;height:52px; } .fc-22__bar{border-radius:1px;background:var(--white)} .fc-22__barcode-num{font-size:9px;letter-spacing:.08em;color:rgba(255,247,237,.35);font-family:'Courier New',monospace;margin-top:4px} .fc-22__back-seat{font-size:28px;font-weight:900;color:var(--sky);line-height:1} .fc-22__back-seat-label{font-size:9px;letter-spacing:.12em;text-transform:uppercase;color:rgba(255,247,237,.35)} .fc-22__valid-badge{ display:flex;align-items:center;gap:5px; background:rgba(56,189,248,.1);border:1px solid rgba(56,189,248,.25); border-radius:20px;padding:4px 10px; font-size:10px;font-weight:700;color:var(--sky); } .fc-22__valid-dot{width:6px;height:6px;border-radius:50%;background:var(--sky)} /* Centre join shadow — gives the fold a spine */ .fc-22__spine{ position:absolute;left:50%;top:0;bottom:0;width:2px; background:linear-gradient(180deg,transparent,rgba(249,115,22,.25),transparent); transform:translateX(-50%); pointer-events:none;z-index:10; } /* Perforations on the right half left edge */ .fc-22__perfs{ position:absolute;left:-1px;top:0;bottom:0; display:flex;flex-direction:column;justify-content:space-between;padding:10px 0; pointer-events:none;z-index:5; } .fc-22__perf{ width:10px;height:10px;border-radius:50%; background:var(--bg); border:1px solid rgba(249,115,22,.2); margin-left:-5px; } @media(max-width:480px){ .fc-22{--card-w:340px;--card-h:180px} .fc-22__event-name{font-size:15px} } @media(prefers-reduced-motion:reduce){ .fc-22__half--left,.fc-22__half--right{transition:none} } ``` ### 06. Meet the Team Bio Card **Type:** Pure CSS **Description:** Front shows avatar, role badge, name, and key stats; back reveals biography, social icon links, and a contact email action. **HTML:** ```html
    Lead Designer
    Aria Chen
    Product & UX
    120+
    Projects
    6 yrs
    Experience
    98%
    Rating
    Hover to connect →
    About Aria
    Aria leads design systems and cross-platform UX at NovaTech. She specialises in accessible, data-dense interfaces that scale from mobile to enterprise dashboards.
    aria@novatech.io
    ``` **CSS:** ```css .fc-04,.fc-04 *,.fc-04 *::before,.fc-04 *::after{box-sizing:border-box;margin:0;padding:0} .fc-04 ::selection{background:#3b82f6;color:#fff} .fc-04{ --bg:#08090f;--blue:#3b82f6;--cyan:#22d3ee;--white:#f8fafc; --card-w:300px;--card-h:400px; font-family:'Segoe UI',system-ui,sans-serif; background:radial-gradient(ellipse at 60% 0%,#0c1a3a,#08090f 60%); min-height:100vh;display:flex;align-items:center;justify-content:center; padding:40px 20px;color:var(--white); } .fc-04__scene{width:var(--card-w);height:var(--card-h);perspective:1200px;cursor:pointer} .fc-04__card{width:100%;height:100%;position:relative;transform-style:preserve-3d;transition:transform .85s cubic-bezier(.4,0,.2,1)} /* Scale-and-flip — card shrinks slightly, rotates, then settles to its resting size with a subtle bounce. Reads as "stepping forward to introduce themselves" rather than a mechanical spin. */ .fc-04__scene:hover .fc-04__card{animation:fc-04-scale-flip .85s cubic-bezier(.34,1.4,.5,1) forwards} @keyframes fc-04-scale-flip{ 0%{transform:rotateY(0deg) scale(1)} 40%{transform:rotateY(90deg) scale(.85)} 70%{transform:rotateY(160deg) scale(.92)} 100%{transform:rotateY(180deg) scale(1.03)} } .fc-04__front,.fc-04__back{position:absolute;inset:0;border-radius:20px;backface-visibility:hidden;-webkit-backface-visibility:hidden;overflow:hidden} /* FRONT */ .fc-04__front{background:linear-gradient(160deg,#0d1b3e,#0a1220);border:1px solid rgba(59,130,246,.2);display:flex;flex-direction:column;align-items:center;padding:36px 24px} .fc-04__avatar{ width:100px;height:100px;border-radius:50%;overflow:hidden; border:3px solid rgba(59,130,246,.4); box-shadow:0 0 30px rgba(59,130,246,.25); margin-bottom:18px;background:linear-gradient(135deg,#1e3a8a,#1e40af); display:flex;align-items:center;justify-content:center; } .fc-04__role-badge{font-size:10px;letter-spacing:.15em;text-transform:uppercase;color:var(--cyan);font-weight:700;margin-bottom:6px} .fc-04__member-name{font-size:22px;font-weight:800;color:var(--white);text-align:center} .fc-04__dept{margin-top:6px;font-size:12px;color:rgba(248,250,252,.4);background:rgba(59,130,246,.1);border:1px solid rgba(59,130,246,.2);padding:3px 12px;border-radius:20px} .fc-04__stat-row{display:flex;gap:24px;margin-top:24px} .fc-04__stat{text-align:center} .fc-04__stat-num{font-size:22px;font-weight:800;background:linear-gradient(135deg,var(--blue),var(--cyan));-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text} .fc-04__stat-lbl{font-size:10px;text-transform:uppercase;letter-spacing:.1em;color:rgba(248,250,252,.35);margin-top:2px} .fc-04__front-hint{margin-top:auto;font-size:10px;color:rgba(248,250,252,.25);letter-spacing:.08em} /* BACK */ .fc-04__back{background:linear-gradient(160deg,#0d1117,#111827);border:1px solid rgba(34,211,238,.2);transform:rotateY(180deg);display:flex;flex-direction:column;padding:28px;gap:16px} .fc-04__bio-title{font-size:11px;letter-spacing:.15em;text-transform:uppercase;color:var(--cyan);font-weight:700} .fc-04__bio{font-size:13px;color:rgba(248,250,252,.65);line-height:1.7} .fc-04__social{display:flex;gap:12px;margin-top:4px} .fc-04__social-btn{ flex:1;padding:10px 6px;border-radius:10px;border:1px solid rgba(255,255,255,.1); background:rgba(255,255,255,.04);font-size:11px;font-weight:700;letter-spacing:.06em; color:rgba(248,250,252,.7);cursor:pointer;text-align:center;text-decoration:none; transition:background .2s,border-color .2s;display:block; } .fc-04__social-btn:hover{background:rgba(59,130,246,.15);border-color:rgba(59,130,246,.3);color:var(--blue)} .fc-04__contact{ margin-top:auto;display:flex;align-items:center;gap:8px; padding:12px 16px;border-radius:12px; background:linear-gradient(135deg,rgba(59,130,246,.15),rgba(34,211,238,.08)); border:1px solid rgba(59,130,246,.2); font-size:12px;color:rgba(248,250,252,.7);text-decoration:none; } @media(prefers-reduced-motion:reduce){.fc-04__card{transition:none}} ``` ### 07. Skill Rating Portfolio Card **Type:** Pure CSS **Description:** Front shows a project preview with tech tags; back displays a tech stack breakdown with animated skill bar meters. **HTML:** ```html
    Case Study · 2025
    Orbit Dashboard
    A real-time analytics platform with customisable widget grids and live WebSocket feeds.
    React TypeScript D3.js
    Hover to see tech stack →
    Tech Stack & Proficiency
    React / Next.js96%
    TypeScript92%
    D3.js / Recharts85%
    Node / WebSocket88%
    PostgreSQL78%
    🟦
    📊
    🟢
    🐘
    ``` **CSS:** ```css .fc-05,.fc-05 *,.fc-05 *::before,.fc-05 *::after{box-sizing:border-box;margin:0;padding:0} .fc-05 ::selection{background:#f97316;color:#fff} .fc-05{ --bg:#0a0a0a;--orange:#f97316;--amber:#fbbf24;--white:#fef3e2; --card-w:340px;--card-h:440px; font-family:'Segoe UI',system-ui,sans-serif; background:radial-gradient(ellipse at 40% 60%,#1a0a00,#0a0a0a 65%); min-height:100vh;display:flex;align-items:center;justify-content:center; padding:40px 20px;color:var(--white); } .fc-05__scene{width:var(--card-w);height:var(--card-h);perspective:1200px;cursor:pointer} .fc-05__card{width:100%;height:100%;position:relative;transform-style:preserve-3d;transition:transform .7s cubic-bezier(.4,0,.2,1)} .fc-05__scene:hover .fc-05__card{transform:rotateY(180deg)} .fc-05__front,.fc-05__back{position:absolute;inset:0;border-radius:20px;backface-visibility:hidden;-webkit-backface-visibility:hidden;overflow:hidden} /* FRONT — project preview */ .fc-05__front{background:#111;border:1px solid rgba(249,115,22,.2);display:flex;flex-direction:column} .fc-05__preview-img{ height:200px;background:linear-gradient(135deg,#1c0a00,#0d1a2e); position:relative;overflow:hidden;flex-shrink:0; } .fc-05__preview-img::before{content:'';position:absolute;inset:0;background:radial-gradient(circle at 30% 40%,rgba(249,115,22,.2),transparent 60%)} .fc-05__preview-grid{ position:absolute;inset:20px;display:grid;grid-template-columns:1fr 1fr;grid-template-rows:1fr 1fr;gap:8px; } .fc-05__pg{border-radius:8px;background:rgba(255,255,255,.04);border:1px solid rgba(255,255,255,.07)} .fc-05__pg:nth-child(1){grid-column:1/3;background:linear-gradient(135deg,rgba(249,115,22,.12),rgba(251,191,36,.06))} .fc-05__project-info{padding:20px 22px} .fc-05__proj-cat{font-size:10px;letter-spacing:.15em;text-transform:uppercase;color:var(--orange);font-weight:700;margin-bottom:6px} .fc-05__proj-name{font-size:20px;font-weight:800;color:var(--white)} .fc-05__proj-desc{font-size:12px;color:rgba(254,243,226,.5);margin-top:6px;line-height:1.6} .fc-05__tags{display:flex;gap:6px;flex-wrap:wrap;margin-top:12px} .fc-05__tag{font-size:10px;padding:3px 9px;border-radius:20px;background:rgba(249,115,22,.1);border:1px solid rgba(249,115,22,.2);color:rgba(254,243,226,.7);letter-spacing:.06em} .fc-05__front-hint{padding:0 22px 16px;font-size:10px;color:rgba(254,243,226,.25);letter-spacing:.08em} /* BACK — tech stack + skill bars */ .fc-05__back{ background:linear-gradient(160deg,#111,#1a1008); border:1px solid rgba(251,191,36,.2); transform:rotateY(180deg); display:flex;flex-direction:column;padding:28px;gap:14px; } .fc-05__back-title{font-size:11px;letter-spacing:.15em;text-transform:uppercase;color:var(--amber);font-weight:700} .fc-05__skills{display:flex;flex-direction:column;gap:12px;flex:1} .fc-05__skill-item{display:flex;flex-direction:column;gap:5px} .fc-05__skill-row{display:flex;justify-content:space-between;align-items:center} .fc-05__skill-name{font-size:12px;font-weight:600;color:rgba(254,243,226,.8)} .fc-05__skill-pct{font-size:11px;font-weight:700;color:var(--orange)} .fc-05__skill-track{height:5px;background:rgba(255,255,255,.08);border-radius:3px;overflow:hidden} .fc-05__skill-bar{height:100%;border-radius:3px;background:linear-gradient(90deg,var(--orange),var(--amber));transition:width .6s ease} .fc-05__stack-icons{display:flex;gap:8px;flex-wrap:wrap;margin-top:4px} .fc-05__si{width:36px;height:36px;border-radius:8px;background:rgba(255,255,255,.05);border:1px solid rgba(255,255,255,.08);display:flex;align-items:center;justify-content:center;font-size:16px} .fc-05__view-btn{ margin-top:auto;width:100%;padding:12px; background:linear-gradient(135deg,var(--orange),var(--amber)); color:#000;font-size:13px;font-weight:800; border:none;border-radius:12px;cursor:pointer;letter-spacing:.04em; } @media(prefers-reduced-motion:reduce){.fc-05__card{transition:none}} ``` ### 08. Language Flashcard with Pronunciation **Type:** Pure CSS **Description:** Front shows a foreign-language word with phonetic transcription and an audio play button; back reveals definition, usage example, and a memory tip. **HTML:** ```html
    Card 7 of 24 · Japanese N3
    🇯🇵
    Japanese
    木漏れ日
    / ko·mo·re·bi /
    Hover to see definition →
    Definition
    noun · untranslatable
    Sunlight filtering through leaves; the interplay of light and shadow when sun shines through a canopy of trees.
    Example sentence
    「公園の木漏れ日の中で読書するのが好きです。」
    "I love reading in the komorebi of the park."
    Memory tip: 木 (ki = tree) + 漏れ (more = leaking) + 日 (hi = sun) → "sun leaking through trees" — paint the picture.
    ``` **CSS:** ```css .fc-06,.fc-06 *,.fc-06 *::before,.fc-06 *::after{box-sizing:border-box;margin:0;padding:0} .fc-06 ::selection{background:#a78bfa;color:#000} .fc-06{ --bg:#080612;--purple:#a78bfa;--indigo:#6366f1;--mint:#34d399;--white:#f5f3ff; --card-w:340px;--card-h:400px; font-family:'Segoe UI',system-ui,sans-serif; background:radial-gradient(ellipse at 50% 40%,#120b2e,#080612 65%); min-height:100vh;display:flex;flex-direction:column;align-items:center;justify-content:center; padding:40px 20px;gap:20px;color:var(--white); } .fc-06__nav{display:flex;gap:12px} .fc-06__nav-btn{ padding:8px 20px;border-radius:20px;border:1px solid rgba(163,139,250,.25); background:rgba(163,139,250,.08);color:rgba(245,243,255,.6); font-size:12px;font-weight:600;cursor:pointer;transition:background .2s; } .fc-06__nav-btn:hover{background:rgba(163,139,250,.18);color:var(--purple)} .fc-06__counter{font-size:12px;color:rgba(245,243,255,.35);letter-spacing:.08em} .fc-06__scene{width:var(--card-w);height:var(--card-h);perspective:1200px;cursor:pointer} .fc-06__card{width:100%;height:100%;position:relative;transform-style:preserve-3d;transition:transform .7s cubic-bezier(.4,0,.2,1)} .fc-06__scene:hover .fc-06__card{transform:rotateY(180deg)} .fc-06__front,.fc-06__back{position:absolute;inset:0;border-radius:24px;backface-visibility:hidden;-webkit-backface-visibility:hidden;overflow:hidden} /* FRONT */ .fc-06__front{ background:linear-gradient(145deg,#130d2e,#0e0a22); border:1px solid rgba(163,139,250,.25); display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px; padding:40px 32px; } .fc-06__front::before{content:'';position:absolute;inset:0;background:radial-gradient(circle at 50% 30%,rgba(163,139,250,.1),transparent 60%)} .fc-06__lang-flag{font-size:40px;position:relative;z-index:1} .fc-06__lang-label{font-size:10px;letter-spacing:.2em;text-transform:uppercase;color:rgba(245,243,255,.4);font-weight:600;position:relative;z-index:1} .fc-06__word{ font-size:52px;font-weight:900; background:linear-gradient(135deg,var(--purple),var(--indigo)); -webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text; text-align:center;position:relative;z-index:1; } .fc-06__phonetic{font-size:16px;color:rgba(245,243,255,.5);font-style:italic;position:relative;z-index:1;letter-spacing:.04em} .fc-06__sound-btn{ display:flex;align-items:center;gap:8px; padding:10px 20px;border-radius:20px; background:rgba(163,139,250,.1);border:1px solid rgba(163,139,250,.2); color:var(--purple);font-size:12px;font-weight:600;cursor:pointer; position:relative;z-index:1;transition:background .2s; } .fc-06__sound-btn:hover{background:rgba(163,139,250,.2)} .fc-06__front-hint{position:absolute;bottom:18px;font-size:10px;color:rgba(245,243,255,.2);letter-spacing:.08em} /* BACK */ .fc-06__back{ background:linear-gradient(145deg,#0a1a0e,#0d1f12); border:1px solid rgba(52,211,153,.2); transform:rotateY(180deg); display:flex;flex-direction:column;padding:30px;gap:14px; } .fc-06__def-label{font-size:10px;letter-spacing:.15em;text-transform:uppercase;color:var(--mint);font-weight:700} .fc-06__definition{font-size:16px;font-weight:700;color:var(--white);line-height:1.4} .fc-06__pos{display:inline-block;font-size:10px;padding:2px 10px;border-radius:20px;background:rgba(52,211,153,.1);border:1px solid rgba(52,211,153,.2);color:var(--mint);font-style:italic;margin-bottom:4px} .fc-06__example-label{font-size:10px;letter-spacing:.12em;text-transform:uppercase;color:rgba(245,243,255,.35);margin-top:4px} .fc-06__example{font-size:13px;color:rgba(245,243,255,.65);line-height:1.7;font-style:italic;border-left:2px solid rgba(52,211,153,.3);padding-left:12px} .fc-06__mnemonic{margin-top:auto;padding:12px;border-radius:12px;background:rgba(163,139,250,.06);border:1px solid rgba(163,139,250,.12);font-size:12px;color:rgba(245,243,255,.5);line-height:1.6} .fc-06__mnemonic strong{color:var(--purple)} @media(prefers-reduced-motion:reduce){.fc-06__card{transition:none}} ``` ### 09. Trivia Quiz Q&A Card **Type:** Pure CSS **Description:** Front states a challenging trivia question with multiple-choice options; back reveals the correct answer with a brief context paragraph and score indicator. **HTML:** ```html
    Q7
    Space & Astronomy
    Which planet in our solar system has the most known natural moons?
    AJupiter
    BSaturn
    CUranus
    DNeptune
    Hover to reveal the answer →
    ✓ Correct Answer
    B — Saturn
    Saturn holds the record with 146 confirmed moons as of 2025, edging past Jupiter's 95. Saturn's moon Titan has a thick atmosphere and lakes of liquid methane.
    +10
    Points
    7/10
    Progress
    ``` **CSS:** ```css .fc-07,.fc-07 *,.fc-07 *::before,.fc-07 *::after{box-sizing:border-box;margin:0;padding:0} .fc-07 ::selection{background:#eab308;color:#000} .fc-07{ --bg:#0c0c00;--yellow:#eab308;--amber:#f59e0b;--green:#22c55e;--white:#fefce8; --card-w:360px;--card-h:420px; font-family:'Segoe UI',system-ui,sans-serif; background:radial-gradient(ellipse at 50% 30%,#1a1500,#0c0c00 65%); min-height:100vh;display:flex;align-items:center;justify-content:center; padding:40px 20px;color:var(--white); } .fc-07__scene{width:var(--card-w);height:var(--card-h);perspective:1200px;cursor:pointer} .fc-07__card{width:100%;height:100%;position:relative;transform-style:preserve-3d;transition:transform .7s cubic-bezier(.4,0,.2,1)} .fc-07__scene:hover .fc-07__card{transform:rotateY(180deg)} .fc-07__front,.fc-07__back{position:absolute;inset:0;border-radius:24px;backface-visibility:hidden;-webkit-backface-visibility:hidden;overflow:hidden} /* FRONT */ .fc-07__front{ background:linear-gradient(145deg,#1a1400,#150f00); border:1px solid rgba(234,179,8,.25); display:flex;flex-direction:column;align-items:center;padding:36px 28px; } .fc-07__front::before{content:'';position:absolute;inset:0;background:radial-gradient(ellipse at 50% 0%,rgba(234,179,8,.12),transparent 60%)} .fc-07__category{display:flex;align-items:center;gap:6px;font-size:10px;letter-spacing:.15em;text-transform:uppercase;color:var(--amber);font-weight:700;position:relative;z-index:1} .fc-07__cat-dot{width:6px;height:6px;border-radius:50%;background:var(--amber)} .fc-07__difficulty{ position:relative;z-index:1;margin-top:6px; display:flex;gap:4px; } .fc-07__star{color:var(--yellow);font-size:14px} .fc-07__star.empty{opacity:.2} .fc-07__q-num{font-size:80px;font-weight:900;color:rgba(234,179,8,.07);position:absolute;top:20px;right:24px;line-height:1;font-style:italic} .fc-07__question{ position:relative;z-index:1;margin-top:24px; font-size:20px;font-weight:700;line-height:1.5;text-align:center;color:var(--white); } .fc-07__options{display:flex;flex-direction:column;gap:10px;width:100%;margin-top:28px;position:relative;z-index:1} .fc-07__opt{ padding:11px 16px;border-radius:12px; background:rgba(255,255,255,.04);border:1px solid rgba(234,179,8,.15); font-size:13px;color:rgba(254,252,232,.7);cursor:pointer; transition:background .2s,border-color .2s;display:flex;align-items:center;gap:10px; } .fc-07__opt:hover{background:rgba(234,179,8,.1);border-color:rgba(234,179,8,.35);color:var(--white)} .fc-07__opt-letter{width:22px;height:22px;border-radius:6px;background:rgba(234,179,8,.15);display:flex;align-items:center;justify-content:center;font-size:11px;font-weight:700;color:var(--amber);flex-shrink:0} .fc-07__front-hint{margin-top:auto;font-size:10px;color:rgba(254,252,232,.2);letter-spacing:.08em} /* BACK */ .fc-07__back{ background:linear-gradient(145deg,#051a08,#071a0e); border:1px solid rgba(34,197,94,.25); transform:rotateY(180deg); display:flex;flex-direction:column;align-items:center;padding:36px 28px;gap:16px; } .fc-07__back::before{content:'';position:absolute;inset:0;background:radial-gradient(ellipse at 50% 30%,rgba(34,197,94,.1),transparent 60%)} .fc-07__correct-label{position:relative;z-index:1;display:flex;align-items:center;gap:8px;font-size:11px;letter-spacing:.15em;text-transform:uppercase;color:var(--green);font-weight:700} .fc-07__tick-circle{width:48px;height:48px;border-radius:50%;background:rgba(34,197,94,.15);border:2px solid rgba(34,197,94,.35);display:flex;align-items:center;justify-content:center;position:relative;z-index:1} .fc-07__answer{position:relative;z-index:1;font-size:26px;font-weight:900;color:var(--white);text-align:center;line-height:1.2} .fc-07__divider-line{width:60px;height:2px;background:linear-gradient(90deg,transparent,rgba(34,197,94,.4),transparent);position:relative;z-index:1} .fc-07__context{position:relative;z-index:1;font-size:13px;color:rgba(254,252,232,.6);line-height:1.7;text-align:center} .fc-07__score-row{position:relative;z-index:1;display:flex;gap:20px;margin-top:4px} .fc-07__score-item{text-align:center} .fc-07__score-num{font-size:22px;font-weight:800;color:var(--green)} .fc-07__score-lbl{font-size:10px;text-transform:uppercase;letter-spacing:.1em;color:rgba(254,252,232,.3)} @media(prefers-reduced-motion:reduce){.fc-07__card{transition:none}} ``` ### 10. Gaming Trading Card Character Stats **Type:** Pure CSS **Description:** Front displays a stylised SVG character illustration with rarity and ability icons; back lists full competitive stats with type badges and a lore quote. **HTML:** ```html
    ★ Legendary
    CP 4800
    Vex Nightbane
    Dark Sorcerer · Elite
    🔥
    💀
    🛡
    Vex Nightbane
    CP 4800
    🔥 Fire ⚡ Dark
    Attack
    94
    Magic
    98
    Defense
    60
    Speed
    82
    "Born from shadow and flame, Vex commands armies of wraiths and bends reality itself. Few have witnessed his full power — fewer still survived."
    ``` **CSS:** ```css .fc-08,.fc-08 *,.fc-08 *::before,.fc-08 *::after{box-sizing:border-box;margin:0;padding:0} .fc-08 ::selection{background:#dc2626;color:#fff} .fc-08{ --bg:#0a0005;--red:#ef4444;--gold:#fbbf24;--violet:#8b5cf6;--white:#fff5f5; --card-w:280px;--card-h:440px; font-family:'Segoe UI',system-ui,sans-serif; background:radial-gradient(ellipse at 30% 50%,#1a0008,#0a0005 65%); min-height:100vh;display:flex;align-items:center;justify-content:center; padding:40px 20px;color:var(--white); } .fc-08__scene{width:var(--card-w);height:var(--card-h);perspective:1200px;cursor:pointer} .fc-08__card{width:100%;height:100%;position:relative;transform-style:preserve-3d;transition:transform .9s cubic-bezier(.4,0,.2,1)} /* Trading-card reveal — at the midpoint of the flip the card pops forward 60px on Z; the scene's box-shadow simultaneously expands into a gold glow burst (kept on the scene NOT the card, because applying filter to a transform-style:preserve-3d element disables backface-visibility in Chromium and breaks the flip). Reads as "card revealing its power" rather than a flat spin. */ .fc-08__scene{transition:box-shadow .45s ease} .fc-08__scene:hover{box-shadow:0 0 60px 8px rgba(251,191,36,.35)} .fc-08__scene:hover .fc-08__card{animation:fc-08-power-flip .9s cubic-bezier(.4,0,.2,1) forwards} @keyframes fc-08-power-flip{ 0%{transform:rotateY(0deg) translateZ(0)} 50%{transform:rotateY(90deg) translateZ(60px)} 100%{transform:rotateY(180deg) translateZ(0)} } .fc-08__front,.fc-08__back{position:absolute;inset:0;border-radius:20px;backface-visibility:hidden;-webkit-backface-visibility:hidden;overflow:hidden} /* FRONT */ .fc-08__front{ background:linear-gradient(160deg,#1a0010,#0d000a); border:2px solid rgba(251,191,36,.35); display:flex;flex-direction:column; box-shadow:0 0 30px rgba(251,191,36,.1),inset 0 1px 0 rgba(251,191,36,.2); } .fc-08__card-header{ padding:12px 16px;display:flex;justify-content:space-between;align-items:center; background:linear-gradient(90deg,rgba(251,191,36,.15),transparent); border-bottom:1px solid rgba(251,191,36,.15); } .fc-08__rarity{font-size:9px;letter-spacing:.2em;text-transform:uppercase;color:var(--gold);font-weight:800} .fc-08__power{font-size:20px;font-weight:900;color:var(--gold);text-shadow:0 0 15px rgba(251,191,36,.5)} .fc-08__art{ flex:1;background:linear-gradient(160deg,#2d0020,#0d0030,#1a000a); position:relative;overflow:hidden;display:flex;align-items:center;justify-content:center; } .fc-08__art::before{content:'';position:absolute;inset:0;background:radial-gradient(circle at 50% 60%,rgba(239,68,68,.2),transparent 60%)} /* character art via SVG */ .fc-08__char-svg{position:relative;z-index:1} .fc-08__name-plate{ padding:12px 16px; background:linear-gradient(90deg,rgba(239,68,68,.15),rgba(139,92,246,.1)); border-top:1px solid rgba(251,191,36,.2);border-bottom:1px solid rgba(251,191,36,.1); } .fc-08__char-name{font-size:17px;font-weight:900;letter-spacing:.04em;color:var(--white)} .fc-08__char-class{font-size:10px;letter-spacing:.15em;text-transform:uppercase;color:var(--red);font-weight:600;margin-top:2px} .fc-08__abilities{display:flex;gap:6px;padding:10px 16px} .fc-08__ability{width:28px;height:28px;border-radius:8px;background:rgba(251,191,36,.1);border:1px solid rgba(251,191,36,.2);display:flex;align-items:center;justify-content:center;font-size:14px} /* BACK */ .fc-08__back{ background:linear-gradient(160deg,#0d0020,#15001a); border:2px solid rgba(139,92,246,.35); transform:rotateY(180deg); display:flex;flex-direction:column;padding:20px;gap:10px; box-shadow:inset 0 1px 0 rgba(139,92,246,.2); } .fc-08__back-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:2px} .fc-08__back-name{font-size:16px;font-weight:900;color:var(--white)} .fc-08__back-cp{font-size:12px;font-weight:700;color:var(--gold)} .fc-08__stat-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px} .fc-08__stat-box{background:rgba(255,255,255,.04);border:1px solid rgba(255,255,255,.07);border-radius:10px;padding:10px 12px} .fc-08__stat-lbl{font-size:9px;letter-spacing:.12em;text-transform:uppercase;color:rgba(255,245,245,.35);margin-bottom:3px} .fc-08__stat-bar-row{display:flex;align-items:center;gap:6px} .fc-08__stat-num{font-size:15px;font-weight:800;color:var(--white);min-width:24px} .fc-08__stat-track{flex:1;height:4px;background:rgba(255,255,255,.08);border-radius:2px;overflow:hidden} .fc-08__stat-fill{height:100%;border-radius:2px} .fc-08__fill-red{background:linear-gradient(90deg,var(--red),#f97316)} .fc-08__fill-violet{background:linear-gradient(90deg,var(--violet),#a78bfa)} .fc-08__fill-gold{background:linear-gradient(90deg,var(--gold),#fde68a)} .fc-08__fill-green{background:linear-gradient(90deg,#22c55e,#86efac)} .fc-08__lore{margin-top:4px;font-size:11px;color:rgba(255,245,245,.45);line-height:1.6;font-style:italic;border-left:2px solid rgba(139,92,246,.3);padding-left:10px} .fc-08__type-badges{display:flex;gap:6px;flex-wrap:wrap} .fc-08__type{font-size:9px;padding:3px 8px;border-radius:20px;font-weight:700;letter-spacing:.06em} .fc-08__type--fire{background:rgba(239,68,68,.2);border:1px solid rgba(239,68,68,.3);color:var(--red)} .fc-08__type--dark{background:rgba(139,92,246,.2);border:1px solid rgba(139,92,246,.3);color:var(--violet)} @media(prefers-reduced-motion:reduce){.fc-08__card{transition:none}} ``` ### 11. Photo Gallery Overlay Card **Type:** Pure CSS **Description:** Front displays a full-bleed SVG aurora landscape scene; back reveals location metadata, camera EXIF settings, content tags, and a download CTA. **HTML:** ```html
    f/2.8 · 25s · ISO 3200
    Aurora at Jökulsárlón
    Hover for details & download →
    Location
    Iceland
    Date Captured
    Nov 12, 2024
    Camera
    Sony A7R V
    Resolution
    61 MP RAW
    Aurora Landscape Night Sky
    ``` **CSS:** ```css .fc-09,.fc-09 *,.fc-09 *::before,.fc-09 *::after{box-sizing:border-box;margin:0;padding:0} .fc-09 ::selection{background:#0ea5e9;color:#fff} .fc-09{ --bg:#080c10;--sky:#0ea5e9;--teal:#14b8a6;--white:#f0f9ff; --card-w:340px;--card-h:440px; font-family:'Segoe UI',system-ui,sans-serif; background:radial-gradient(ellipse at 50% 0%,#061020,#080c10 65%); min-height:100vh;display:flex;align-items:center;justify-content:center; padding:40px 20px;color:var(--white); } .fc-09__scene{width:var(--card-w);height:var(--card-h);perspective:1200px;cursor:pointer} .fc-09__card{width:100%;height:100%;position:relative;transform-style:preserve-3d;transform-origin:center top;transition:transform .85s cubic-bezier(.4,0,.2,1)} /* See note on translateY counter — same as fc-02 (flip-up) but inverted: rotating around top edge would push the card UP by its full height; the translateY(100%) at the end keeps the visual position fixed. */ /* Fold-out from the TOP edge — the card unfolds downward like peeling back a Polaroid, instead of spinning around centre. Preserves the photo's visual focus during the transition. */ .fc-09__scene:hover .fc-09__card{transform:translateY(100%) rotateX(-180deg)} .fc-09__front,.fc-09__back{position:absolute;inset:0;border-radius:20px;backface-visibility:hidden;-webkit-backface-visibility:hidden;overflow:hidden} /* FRONT — full-bleed photo */ .fc-09__front{display:flex;flex-direction:column;border:1px solid rgba(14,165,233,.2)} .fc-09__photo{ flex:1;position:relative;overflow:hidden; background:linear-gradient(160deg,#0c2340,#041520,#0d2a2a); } /* SVG landscape scene */ .fc-09__photo svg{position:absolute;inset:0;width:100%;height:100%} .fc-09__photo-meta{ position:absolute;bottom:0;inset-x:0; padding:20px; background:linear-gradient(to top,rgba(8,12,16,.9),transparent); } .fc-09__cam-icon{display:flex;align-items:center;gap:6px;font-size:10px;letter-spacing:.1em;text-transform:uppercase;color:rgba(240,249,255,.5)} .fc-09__photo-title{font-size:20px;font-weight:800;color:var(--white);margin-top:4px} .fc-09__front-hint{padding:14px;text-align:center;background:rgba(0,0,0,.4);font-size:10px;color:rgba(240,249,255,.3);letter-spacing:.08em} /* BACK */ .fc-09__back{ background:linear-gradient(160deg,#0a1520,#060e18); border:1px solid rgba(20,184,166,.25); /* Pre-rotated on X so the top-hinge fold-out brings it forward. */ transform:rotateX(180deg); display:flex;flex-direction:column;padding:28px;gap:16px; } .fc-09__back-img-thumb{ height:120px;border-radius:12px;overflow:hidden; background:linear-gradient(160deg,#0c2340,#041520,#0d2a2a); position:relative;flex-shrink:0; } .fc-09__back-img-thumb svg{position:absolute;inset:0;width:100%;height:100%} .fc-09__detail-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px} .fc-09__detail{background:rgba(255,255,255,.04);border:1px solid rgba(255,255,255,.07);border-radius:10px;padding:10px 12px} .fc-09__detail-lbl{font-size:9px;letter-spacing:.12em;text-transform:uppercase;color:rgba(240,249,255,.35);margin-bottom:3px} .fc-09__detail-val{font-size:13px;font-weight:600;color:var(--white)} .fc-09__tags-row{display:flex;gap:6px;flex-wrap:wrap} .fc-09__photo-tag{font-size:10px;padding:3px 10px;border-radius:20px;background:rgba(14,165,233,.1);border:1px solid rgba(14,165,233,.2);color:var(--sky)} .fc-09__download{ margin-top:auto;display:flex;align-items:center;justify-content:center;gap:8px; padding:13px;border-radius:12px; background:linear-gradient(135deg,var(--sky),var(--teal)); color:#000;font-size:13px;font-weight:800;cursor:pointer;border:none;letter-spacing:.04em; } @media(prefers-reduced-motion:reduce){.fc-09__card{transition:none}} ``` ### 12. Album Cover Iris Aperture Reveal Card **Type:** Pure CSS **Description:** Front face shrinks via clip-path circle while back expands from center — a camera-aperture reveal with zero 3D rotation, proving 'flip card' can mean visual swap, not just axis spin. **HTML:** ```html
    VANTABLACK
    After Midnight Drives
    SYNTHWAVE 2026 · LP
    Hover for the tracklist ◐
    SIDE A 38 : 12
    01Neon Highway4:18
    02Cassette Memory5:42
    03Static Bloom3:55
    042 AM in Tokyo6:08
    05Lavender Static4:33
    06After Midnight13:36
    ``` **CSS:** ```css .fc-21,.fc-21 *,.fc-21 *::before,.fc-21 *::after{box-sizing:border-box;margin:0;padding:0} .fc-21 ::selection{background:#ec4899;color:#0a0a0a} .fc-21{ --bg:#0a0612;--neon:#ec4899;--violet:#a21caf;--cream:#fef3c7;--ink:#f5e8ff; --card-w:360px;--card-h:500px; font-family:'Inter',system-ui,-apple-system,sans-serif; background:radial-gradient(ellipse at 30% 20%,#1e0b3b,#0a0612 70%); min-height:100vh;display:flex;align-items:center;justify-content:center; padding:40px 20px;color:var(--ink); } .fc-21__scene{width:var(--card-w);height:var(--card-h)} .fc-21__card{width:100%;height:100%;position:relative;border-radius:8px;overflow:hidden;box-shadow:0 24px 60px rgba(0,0,0,.6),0 0 0 1px rgba(236,72,153,.2)} .fc-21__front,.fc-21__back{ position:absolute;inset:0; display:flex;flex-direction:column;align-items:center; padding:30px 28px; transition:clip-path .65s cubic-bezier(.7,0,.3,1); } .fc-21__front{ background:linear-gradient(160deg,#1e0b3b 0%,#0a0612 100%); clip-path:circle(150% at 50% 50%); -webkit-clip-path:circle(150% at 50% 50%); z-index:1; } .fc-21__back{ background:linear-gradient(160deg,#0a0612 0%,#1e0b3b 100%); clip-path:circle(0% at 50% 50%); -webkit-clip-path:circle(0% at 50% 50%); z-index:2; } .fc-21__scene:hover .fc-21__front{clip-path:circle(0% at 50% 50%);-webkit-clip-path:circle(0% at 50% 50%)} .fc-21__scene:hover .fc-21__back{clip-path:circle(150% at 50% 50%);-webkit-clip-path:circle(150% at 50% 50%)} /* FRONT — album cover */ .fc-21__cover{margin-top:6px;border-radius:4px;overflow:hidden;box-shadow:0 14px 30px rgba(0,0,0,.5)} .fc-21__cover-meta{margin-top:22px;text-align:center;width:100%} .fc-21__artist{font-size:11px;letter-spacing:.45em;color:var(--neon);font-weight:700} .fc-21__album{font-size:23px;font-weight:800;color:var(--ink);margin-top:6px;letter-spacing:-.02em;font-family:'Playfair Display',Georgia,serif;font-style:italic} .fc-21__pill-row{display:flex;justify-content:center;gap:6px;margin-top:12px} .fc-21__pill{ padding:4px 11px;border:1px solid rgba(236,72,153,.4);border-radius:999px; font-size:9px;letter-spacing:.2em;text-transform:uppercase;color:rgba(245,232,255,.7);font-weight:600; } .fc-21__hint{margin-top:auto;font-size:10px;letter-spacing:.2em;text-transform:uppercase;color:rgba(245,232,255,.4)} /* BACK — tracklist */ .fc-21__back-head{ display:flex;justify-content:space-between;width:100%; padding-bottom:14px;margin-bottom:14px; border-bottom:1px solid rgba(236,72,153,.25); font-size:10px;letter-spacing:.3em;text-transform:uppercase;color:var(--neon);font-weight:700; } .fc-21__back-runtime{color:rgba(245,232,255,.55);font-family:ui-monospace,monospace;letter-spacing:.1em} .fc-21__tracklist{display:flex;flex-direction:column;gap:1px;width:100%;flex:1} .fc-21__track{ display:grid;grid-template-columns:28px 1fr auto;align-items:center;gap:12px; padding:10px 8px;border-radius:6px; transition:background .15s;cursor:pointer; } .fc-21__track:hover{background:rgba(236,72,153,.08)} .fc-21__t-num{font-family:ui-monospace,monospace;font-size:10px;color:rgba(245,232,255,.4);letter-spacing:.1em} .fc-21__t-name{font-size:13px;color:var(--ink);font-weight:500} .fc-21__t-time{font-family:ui-monospace,monospace;font-size:11px;color:rgba(245,232,255,.4);letter-spacing:.05em} .fc-21__play{ margin-top:14px;width:100%;padding:13px 0; border:1px solid rgba(236,72,153,.5);border-radius:8px; background:linear-gradient(135deg,rgba(236,72,153,.18),rgba(162,28,175,.12)); color:var(--neon);font-size:12px;letter-spacing:.25em;text-transform:uppercase;font-weight:700; cursor:pointer;transition:background .2s,box-shadow .2s; font-family:inherit; } .fc-21__play:hover{background:linear-gradient(135deg,rgba(236,72,153,.3),rgba(162,28,175,.2));box-shadow:0 8px 24px rgba(236,72,153,.25)} @media(prefers-reduced-motion:reduce){ .fc-21__front,.fc-21__back{transition:none} } ``` ### 13. Scratch Card Diagonal Peel Reveal **Type:** Pure CSS **Description:** A reward scratch card where the surface wipes away diagonally from top-left to bottom-right via an animated clip-path polygon — no rotateY, no rotateX, no 3D transforms at all. **HTML:** ```html
    🏆
    You Won!
    $250
    Store Credit · Valid 30 days
    Instant Win
    Scratch Card
    Hover to reveal your prize
    🪙 Scratch to reveal
    Hover to peel →
    ``` **CSS:** ```css .fc-23,.fc-23 *,.fc-23 *::before,.fc-23 *::after{box-sizing:border-box;margin:0;padding:0} .fc-23 ::selection{background:#8b5cf6;color:#fff} .fc-23{ --bg:#06040e; --violet:#8b5cf6; --purple:#a855f7; --gold:#f59e0b; --green:#22c55e; --white:#faf5ff; --card-w:380px; --card-h:240px; font-family:'Segoe UI',system-ui,sans-serif; background:radial-gradient(ellipse at 50% 40%,#100820,#06040e 65%); min-height:100vh; display:flex;flex-direction:column;align-items:center;justify-content:center; padding:40px 20px;gap:28px;color:var(--white); } /* ══════════════════════════════════════════ SCRATCH / PEEL MECHANISM No rotateY or rotateX at all. The card has two layers stacked with position:absolute. The TOP layer (scratch surface) uses: clip-path: polygon(...) which starts as a full rectangle covering the card. On hover, the clip-path animates to a zero-width diagonal slice that vanishes from bottom-right to top-left — revealing the prize layer underneath. The peel curl is simulated by a ::before pseudo on the top layer that shows a curling shadow/gradient on the leading edge of the shrinking clip region. This is 100% clip-path + CSS custom property animation. Zero transform-style, zero backface-visibility, zero rotateY. ══════════════════════════════════════════ */ .fc-23__scene{ width:var(--card-w); height:var(--card-h); position:relative; border-radius:18px; overflow:hidden; cursor:pointer; box-shadow:0 0 50px rgba(139,92,246,.12); } /* ── BOTTOM layer — the prize/reward ── */ .fc-23__prize{ position:absolute;inset:0; /* isolation:isolate creates a new stacking context so the z-index:1 on prize-icon/amount/cta children stays confined to this layer. Without it those children would promote into the scene's stacking context and render ABOVE the scratch surface, defeating the whole "scratch reveals the prize underneath" mechanic. */ isolation:isolate; background:linear-gradient(135deg,#0d0a20,#1a0d3a,#0a1a1a); display:flex;flex-direction:column;align-items:center;justify-content:center; gap:12px;padding:28px; border:1px solid rgba(139,92,246,.3); border-radius:18px; } .fc-23__prize::before{ content:'';position:absolute;inset:0;border-radius:18px; background:radial-gradient(ellipse at 50% 50%,rgba(245,158,11,.08),transparent 70%); pointer-events:none; } .fc-23__prize-icon{ width:72px;height:72px;border-radius:50%; background:linear-gradient(135deg,rgba(245,158,11,.2),rgba(245,158,11,.05)); border:2px solid rgba(245,158,11,.4); display:flex;align-items:center;justify-content:center; font-size:32px; box-shadow:0 0 30px rgba(245,158,11,.2); position:relative;z-index:1; } .fc-23__prize-label{font-size:11px;letter-spacing:.18em;text-transform:uppercase;color:rgba(250,245,255,.4);font-weight:700;position:relative;z-index:1} .fc-23__prize-amount{ font-size:42px;font-weight:900;line-height:1; background:linear-gradient(135deg,var(--gold),#fde68a,var(--gold)); -webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text; text-shadow:none; position:relative;z-index:1; } .fc-23__prize-sub{font-size:12px;color:rgba(250,245,255,.45);position:relative;z-index:1} .fc-23__prize-cta{ margin-top:4px;padding:10px 28px;border-radius:20px;border:none;cursor:pointer; background:linear-gradient(135deg,var(--gold),#d97706); color:#000;font-size:13px;font-weight:800;letter-spacing:.04em; position:relative;z-index:1;transition:transform .15s; } .fc-23__prize-cta:hover{filter:brightness(1.08);box-shadow:0 6px 18px rgba(245,158,11,.4)} /* ── TOP layer — the scratch surface ── */ .fc-23__scratch{ position:absolute;inset:0;border-radius:18px; /* clip-path polygon at rest = full card rectangle: top-left(0% 0%) → top-right(100% 0%) → bottom-right(100% 100%) → bottom-left(0% 100%) On hover it animates to a collapsed diagonal line then zero: all four points converge to top-left corner */ clip-path:polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%); transition:clip-path .9s cubic-bezier(.4,0,.2,1); overflow:hidden; } .fc-23__scene:hover .fc-23__scratch{ /* Wipe from bottom-right to top-left — all corners collapse to top-left */ clip-path:polygon(0% 0%, 0% 0%, 0% 0%, 0% 0%); } /* Scratch surface texture */ .fc-23__scratch-bg{ position:absolute;inset:0; background: /* sparkle noise */ radial-gradient(circle at 20% 30%,rgba(139,92,246,.15) 0%,transparent 40%), radial-gradient(circle at 80% 70%,rgba(168,85,247,.12) 0%,transparent 40%), linear-gradient(135deg,#1a0d38,#250f4a,#12082a); border:1px solid rgba(139,92,246,.3); border-radius:18px; } /* Crosshatch scratch marks */ .fc-23__scratch-bg::before{ content:'';position:absolute;inset:0; background-image: repeating-linear-gradient( 45deg, rgba(255,255,255,.025) 0px, rgba(255,255,255,.025) 1px, transparent 1px, transparent 8px ), repeating-linear-gradient( -45deg, rgba(255,255,255,.015) 0px, rgba(255,255,255,.015) 1px, transparent 1px, transparent 8px ); border-radius:18px; } /* Content on the scratch layer */ .fc-23__scratch-content{ position:relative;z-index:1; height:100%;display:flex;flex-direction:column; align-items:center;justify-content:center;gap:12px;padding:28px; } .fc-23__scratch-logo{ display:flex;align-items:center;gap:8px; font-size:15px;font-weight:800;letter-spacing:.06em; color:rgba(250,245,255,.9); } .fc-23__logo-dot{width:8px;height:8px;border-radius:50%;background:var(--violet)} .fc-23__scratch-title{ font-size:22px;font-weight:900;color:var(--white);text-align:center;line-height:1.2; } .fc-23__scratch-sub{font-size:12px;color:rgba(250,245,255,.45);text-align:center} .fc-23__scratch-area{ display:flex;align-items:center;gap:10px; padding:10px 20px;border-radius:12px; background:rgba(255,255,255,.06);border:1px solid rgba(255,255,255,.1); } .fc-23__scratch-icon{font-size:16px;animation:fc-23-wiggle 1.5s ease-in-out infinite} @keyframes fc-23-wiggle{ 0%,100%{transform:rotate(-8deg)} 50%{transform:rotate(8deg)} } .fc-23__scratch-cta-text{font-size:12px;color:rgba(250,245,255,.6);font-weight:600} /* ── The peel curl edge — ::after on the scratch layer ── This is a narrow gradient strip that sits at the clip-path boundary, simulating the curling shadow of a peeling sticker. We animate its position in sync with the clip-path using the same timing. */ .fc-23__scratch::after{ content:''; position:absolute; /* diagonal strip from bottom-right corner going to top-left */ top:-20%;left:-20%; width:60%;height:60%; background:linear-gradient( 135deg, transparent 40%, rgba(0,0,0,.35) 50%, rgba(139,92,246,.2) 55%, transparent 65% ); transform:rotate(0deg); transition:transform .9s cubic-bezier(.4,0,.2,1),opacity .9s; pointer-events:none; border-radius:0; } .fc-23__scene:hover .fc-23__scratch::after{ transform:translate(-60%,-60%); opacity:0; } /* Stars burst on the prize layer (pure CSS, no JS) */ .fc-23__star{ position:absolute; width:4px;height:4px;border-radius:50%; background:var(--gold); opacity:0; transition:opacity .3s .8s; } .fc-23__scene:hover .fc-23__star{opacity:1} .fc-23__star:nth-child(1){top:15%;left:12%;width:6px;height:6px;transition-delay:.8s} .fc-23__star:nth-child(2){top:22%;right:15%;width:4px;height:4px;transition-delay:.9s} .fc-23__star:nth-child(3){bottom:20%;left:18%;width:5px;height:5px;transition-delay:1s} .fc-23__star:nth-child(4){bottom:18%;right:12%;width:6px;height:6px;transition-delay:.85s} .fc-23__star:nth-child(5){top:50%;left:8%;width:3px;height:3px;transition-delay:1.1s} .fc-23__star:nth-child(6){top:45%;right:9%;width:4px;height:4px;transition-delay:.95s} /* Reveal label */ .fc-23__reveal-label{ position:absolute;bottom:10px;right:14px; font-size:9px;letter-spacing:.1em;text-transform:uppercase; color:rgba(250,245,255,.2); transition:opacity .3s .8s; pointer-events:none; } .fc-23__scene:hover .fc-23__reveal-label{opacity:0} @media(max-width:440px){ .fc-23{--card-w:320px;--card-h:210px} .fc-23__prize-amount{font-size:34px} } @media(prefers-reduced-motion:reduce){ .fc-23__scratch{transition:none} .fc-23__scratch::after{transition:none} .fc-23__scratch-icon{animation:none} .fc-23__star{transition:none} } ``` ### 14. Video Playlist Thumbnail Card **Type:** Pure CSS **Description:** Front shows a SVG video poster with play overlay and runtime badge; back reveals description, view stats, a mini playlist, and a Watch Now CTA. **HTML:** ```html
    18:42
    CF
    CodeFronts
    248K subscribers
    Build a Full-Stack Auth System in 18 Minutes
    1.4M views 3 months ago
    Hover for description →
    About this Video
    In 18 minutes you'll build a production-ready JWT auth system with refresh tokens, protected routes, and Postgres storage — fully from scratch, zero magic libraries.
    1.4M
    Views
    98K
    Likes
    18:42
    Runtime
    1Project setup & JWT basics4:12
    2Refresh token strategy6:30
    3Protected routes & middleware8:00
    ``` **CSS:** ```css .fc-10,.fc-10 *,.fc-10 *::before,.fc-10 *::after{box-sizing:border-box;margin:0;padding:0} .fc-10 ::selection{background:#dc2626;color:#fff} .fc-10{ --bg:#0c0800;--red:#ef4444;--orange:#f97316;--white:#fff7ed; --card-w:360px;--card-h:420px; font-family:'Segoe UI',system-ui,sans-serif; background:#0c0800; min-height:100vh;display:flex;align-items:center;justify-content:center; padding:40px 20px;color:var(--white); } .fc-10__scene{width:var(--card-w);height:var(--card-h);perspective:1200px;cursor:pointer} .fc-10__card{width:100%;height:100%;position:relative;transform-style:preserve-3d;transition:transform .75s cubic-bezier(.4,0,.2,1)} .fc-10__scene:hover .fc-10__card{transform:rotateY(180deg)} .fc-10__front,.fc-10__back{position:absolute;inset:0;border-radius:16px;backface-visibility:hidden;-webkit-backface-visibility:hidden;overflow:hidden} /* FRONT */ .fc-10__front{background:#111;border:1px solid rgba(239,68,68,.2);display:flex;flex-direction:column} .fc-10__thumb{ height:210px;background:linear-gradient(160deg,#1a0800,#0d0d0d,#0d1a2e); position:relative;overflow:hidden;flex-shrink:0; } .fc-10__thumb svg{position:absolute;inset:0;width:100%;height:100%} .fc-10__play-overlay{ position:absolute;inset:0;display:flex;align-items:center;justify-content:center; background:rgba(0,0,0,.3); } .fc-10__play-btn{ width:60px;height:60px;border-radius:50%; background:rgba(239,68,68,.9); display:flex;align-items:center;justify-content:center; box-shadow:0 0 30px rgba(239,68,68,.5); } .fc-10__duration{position:absolute;bottom:10px;right:10px;background:rgba(0,0,0,.8);color:var(--white);font-size:11px;font-weight:700;padding:2px 6px;border-radius:4px} .fc-10__channel-row{padding:16px 18px 8px;display:flex;align-items:center;gap:10px} .fc-10__channel-avatar{width:32px;height:32px;border-radius:50%;background:linear-gradient(135deg,var(--red),var(--orange));display:flex;align-items:center;justify-content:center;font-size:13px;font-weight:800;color:#fff;flex-shrink:0} .fc-10__channel-name{font-size:12px;font-weight:700;color:rgba(255,247,237,.7)} .fc-10__channel-subs{font-size:10px;color:rgba(255,247,237,.35)} .fc-10__video-title{padding:0 18px;font-size:16px;font-weight:800;color:var(--white);line-height:1.4} .fc-10__meta-row{padding:10px 18px;display:flex;gap:12px;align-items:center} .fc-10__views{font-size:11px;color:rgba(255,247,237,.4)} .fc-10__dot-sep{width:3px;height:3px;border-radius:50%;background:rgba(255,247,237,.3)} .fc-10__date{font-size:11px;color:rgba(255,247,237,.4)} .fc-10__front-hint{margin-top:auto;padding:14px 18px;font-size:10px;color:rgba(255,247,237,.2);letter-spacing:.08em;border-top:1px solid rgba(255,255,255,.05)} /* BACK */ .fc-10__back{ background:linear-gradient(160deg,#1a0400,#0e0e0e); border:1px solid rgba(249,115,22,.2); transform:rotateY(180deg); display:flex;flex-direction:column;padding:24px;gap:14px; } .fc-10__back-label{font-size:10px;letter-spacing:.15em;text-transform:uppercase;color:var(--orange);font-weight:700} .fc-10__desc{font-size:13px;color:rgba(255,247,237,.65);line-height:1.7} .fc-10__stats-row{display:flex;gap:12px} .fc-10__stat{flex:1;padding:12px;border-radius:10px;background:rgba(255,255,255,.04);border:1px solid rgba(255,255,255,.07);text-align:center} .fc-10__stat-n{font-size:20px;font-weight:800;background:linear-gradient(135deg,var(--red),var(--orange));-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text} .fc-10__stat-l{font-size:9px;text-transform:uppercase;letter-spacing:.1em;color:rgba(255,247,237,.35);margin-top:2px} .fc-10__playlist{margin-top:4px;display:flex;flex-direction:column;gap:8px} .fc-10__pl-item{display:flex;align-items:center;gap:10px;padding:8px 10px;border-radius:8px;background:rgba(255,255,255,.03);border:1px solid rgba(255,255,255,.05)} .fc-10__pl-num{width:20px;height:20px;border-radius:50%;background:rgba(239,68,68,.15);display:flex;align-items:center;justify-content:center;font-size:10px;font-weight:700;color:var(--red);flex-shrink:0} .fc-10__pl-name{font-size:11px;color:rgba(255,247,237,.65);flex:1} .fc-10__pl-dur{font-size:10px;color:rgba(255,247,237,.3)} .fc-10__watch-btn{ margin-top:auto;width:100%;padding:13px; background:linear-gradient(135deg,var(--red),var(--orange)); color:#fff;font-size:13px;font-weight:800; border:none;border-radius:12px;cursor:pointer;letter-spacing:.04em; display:flex;align-items:center;justify-content:center;gap:8px; } @media(prefers-reduced-motion:reduce){.fc-10__card{transition:none}} ``` ### 15. Testimonial Customer Review Card **Type:** Pure CSS **Description:** Front features a prominent client quote and star rating; back reveals the full client profile, company details, and a per-category rating breakdown. **HTML:** ```html
    "
    Switching to this platform cut our design-to-production time in half. The component library alone saved us three months of custom work.
    MK
    Marcus Klein
    VP of Engineering · Prism Labs
    Hover for full profile →
    Reviewer Profile
    MK
    Marcus Klein
    VP of Engineering · 12 years in SaaS infrastructure
    PL
    Prism Labs
    Series B · 340 employees
    Overall★★★★★
    Ease of use★★★★★
    Support★★★★★
    ``` **CSS:** ```css .fc-11,.fc-11 *,.fc-11 *::before,.fc-11 *::after{box-sizing:border-box;margin:0;padding:0} .fc-11 ::selection{background:#7c3aed;color:#fff} .fc-11{ --bg:#09050f;--violet:#7c3aed;--pink:#db2777;--gold:#f59e0b;--white:#fdf4ff; --card-w:360px;--card-h:420px; font-family:'Segoe UI',system-ui,sans-serif; background:radial-gradient(ellipse at 60% 40%,#12062a,#09050f 65%); min-height:100vh;display:flex;align-items:center;justify-content:center; padding:40px 20px;color:var(--white); } .fc-11__scene{width:var(--card-w);height:var(--card-h);perspective:1200px;cursor:pointer} .fc-11__card{width:100%;height:100%;position:relative;transform-style:preserve-3d;transition:transform .75s cubic-bezier(.4,0,.2,1)} .fc-11__scene:hover .fc-11__card{transform:rotateY(180deg)} .fc-11__front,.fc-11__back{position:absolute;inset:0;border-radius:24px;backface-visibility:hidden;-webkit-backface-visibility:hidden;overflow:hidden} /* FRONT */ .fc-11__front{ background:linear-gradient(145deg,#110822,#0d0518); border:1px solid rgba(124,58,237,.25); display:flex;flex-direction:column;padding:36px 32px;gap:16px; box-shadow:0 0 40px rgba(124,58,237,.06); } .fc-11__quote-mark{font-size:80px;line-height:.7;color:rgba(124,58,237,.25);font-family:Georgia,serif;font-weight:900;margin-bottom:-12px} .fc-11__quote{font-size:18px;font-weight:600;line-height:1.7;color:rgba(253,244,255,.85);flex:1} .fc-11__quote strong{background:linear-gradient(135deg,var(--violet),var(--pink));-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text} .fc-11__stars{display:flex;gap:4px;margin-top:auto} .fc-11__star{color:var(--gold);font-size:18px} .fc-11__client-preview{display:flex;align-items:center;gap:12px;padding-top:16px;border-top:1px solid rgba(255,255,255,.07)} .fc-11__avatar-mini{width:44px;height:44px;border-radius:50%;background:linear-gradient(135deg,var(--violet),var(--pink));display:flex;align-items:center;justify-content:center;font-size:16px;font-weight:800;color:#fff;flex-shrink:0} .fc-11__client-name{font-size:14px;font-weight:700;color:var(--white)} .fc-11__client-title{font-size:11px;color:rgba(253,244,255,.45)} .fc-11__front-hint{font-size:10px;color:rgba(253,244,255,.2);letter-spacing:.08em;text-align:right} /* BACK */ .fc-11__back{ background:linear-gradient(145deg,#0f0120,#14022a); border:1px solid rgba(219,39,119,.2); transform:rotateY(180deg); display:flex;flex-direction:column;padding:28px;gap:14px; } .fc-11__back-label{font-size:10px;letter-spacing:.15em;text-transform:uppercase;color:var(--pink);font-weight:700} .fc-11__profile-card{ display:flex;flex-direction:column;align-items:center;gap:10px; padding:20px;border-radius:16px; background:rgba(255,255,255,.03);border:1px solid rgba(255,255,255,.07); } .fc-11__avatar-lg{width:72px;height:72px;border-radius:50%;background:linear-gradient(135deg,var(--violet),var(--pink));display:flex;align-items:center;justify-content:center;font-size:28px;font-weight:900;color:#fff;border:3px solid rgba(124,58,237,.3)} .fc-11__full-name{font-size:18px;font-weight:800;color:var(--white)} .fc-11__full-title{font-size:12px;color:rgba(253,244,255,.5);text-align:center} .fc-11__company-row{display:flex;align-items:center;gap:8px;padding:8px 16px;border-radius:10px;background:rgba(124,58,237,.1);border:1px solid rgba(124,58,237,.2)} .fc-11__company-dot{width:28px;height:28px;border-radius:8px;background:linear-gradient(135deg,#4f46e5,#7c3aed);display:flex;align-items:center;justify-content:center;font-size:12px;font-weight:800;color:#fff;flex-shrink:0} .fc-11__company-name{font-size:13px;font-weight:700;color:rgba(253,244,255,.8)} .fc-11__company-size{font-size:10px;color:rgba(253,244,255,.4)} .fc-11__rating-detail{padding:14px;border-radius:12px;background:rgba(255,255,255,.03);border:1px solid rgba(255,255,255,.07)} .fc-11__rating-row{display:flex;justify-content:space-between;align-items:center;margin-bottom:6px} .fc-11__rating-lbl{font-size:11px;color:rgba(253,244,255,.5)} .fc-11__rating-stars{display:flex;gap:2px;font-size:13px} .fc-11__full-stars{color:var(--gold)} @media(prefers-reduced-motion:reduce){.fc-11__card{transition:none}} ``` ### 16. Digital Business Card VCard **Type:** Pure CSS **Description:** Front shows a minimalist corporate name card with a holographic accent strip; back provides structured phone, email, and location contacts plus a decorative QR code. **HTML:** ```html
    Digital Business Card · Hover to flip
    JD
    James Dorian
    Chief Technology Officer
    Nova Systems Inc.
    +1 (415) 555-0198
    j.dorian@novasys.io
    Hover →
    Phone+1 (415) 555-0198
    Emailj.dorian@novasys.io
    OfficeSF · Floor 22
    ``` **CSS:** ```css .fc-12,.fc-12 *,.fc-12 *::before,.fc-12 *::after{box-sizing:border-box;margin:0;padding:0} .fc-12 ::selection{background:#0891b2;color:#fff} .fc-12{ --bg:#04080c;--cyan:#06b6d4;--slate:#94a3b8;--white:#f0f9ff; --card-w:360px;--card-h:220px; font-family:'Segoe UI',system-ui,sans-serif; background:radial-gradient(ellipse at 50% 60%,#040e18,#04080c 65%); min-height:100vh;display:flex;flex-direction:column;align-items:center;justify-content:center; padding:40px 20px;gap:16px;color:var(--white); } .fc-12__label{font-size:10px;letter-spacing:.2em;text-transform:uppercase;color:rgba(148,163,184,.4);font-weight:600} .fc-12__scene{width:var(--card-w);height:var(--card-h);perspective:1200px;cursor:pointer} .fc-12__card{width:100%;height:100%;position:relative;transform-style:preserve-3d;transition:transform .7s cubic-bezier(.4,0,.2,1)} .fc-12__scene:hover .fc-12__card{transform:rotateY(180deg)} .fc-12__front,.fc-12__back{position:absolute;inset:0;border-radius:16px;backface-visibility:hidden;-webkit-backface-visibility:hidden;overflow:hidden} /* FRONT */ .fc-12__front{ background:linear-gradient(135deg,#0a1520,#040e18); border:1px solid rgba(6,182,212,.25); display:flex;align-items:center;padding:24px 28px;gap:20px; box-shadow:0 0 40px rgba(6,182,212,.06); } .fc-12__front::before{content:'';position:absolute;top:0;right:0;width:160px;height:100%;background:linear-gradient(to left,rgba(6,182,212,.05),transparent);pointer-events:none} /* holographic strip */ .fc-12__holo{position:absolute;top:0;right:60px;width:4px;height:100%;background:linear-gradient(180deg,transparent,rgba(6,182,212,.4),rgba(139,92,246,.4),rgba(236,72,153,.4),transparent)} .fc-12__logo-mark{ width:60px;height:60px;border-radius:14px;flex-shrink:0; background:linear-gradient(135deg,#0891b2,#0e7490); display:flex;align-items:center;justify-content:center; font-size:22px;font-weight:900;color:#fff; box-shadow:0 0 20px rgba(6,182,212,.3); } .fc-12__front-info{flex:1} .fc-12__person-name{font-size:20px;font-weight:800;color:var(--white)} .fc-12__person-role{font-size:11px;color:var(--cyan);font-weight:600;letter-spacing:.06em;margin-top:2px} .fc-12__divider-h{height:1px;background:rgba(255,255,255,.08);margin:10px 0} .fc-12__company{font-size:13px;color:rgba(240,249,255,.6)} .fc-12__contact-mini{display:flex;flex-direction:column;gap:4px;margin-top:8px} .fc-12__cm{font-size:11px;color:rgba(240,249,255,.4);display:flex;align-items:center;gap:5px} .fc-12__cm-dot{width:4px;height:4px;border-radius:50%;background:var(--cyan);opacity:.6} .fc-12__front-hint{position:absolute;bottom:12px;right:16px;font-size:9px;color:rgba(240,249,255,.2);letter-spacing:.08em} /* BACK */ .fc-12__back{ background:linear-gradient(135deg,#060e18,#040a12); border:1px solid rgba(6,182,212,.2); transform:rotateY(180deg); display:flex;align-items:center;padding:20px 24px;gap:20px; } .fc-12__contact-grid{flex:1;display:flex;flex-direction:column;gap:10px} .fc-12__contact-item{display:flex;align-items:center;gap:10px} .fc-12__ci-icon{width:32px;height:32px;border-radius:8px;background:rgba(6,182,212,.1);border:1px solid rgba(6,182,212,.2);display:flex;align-items:center;justify-content:center;flex-shrink:0} .fc-12__ci-icon svg{width:14px;height:14px;stroke:var(--cyan);stroke-width:1.8;fill:none} .fc-12__ci-text{display:flex;flex-direction:column} .fc-12__ci-label{font-size:9px;letter-spacing:.1em;text-transform:uppercase;color:rgba(240,249,255,.35)} .fc-12__ci-val{font-size:12px;color:rgba(240,249,255,.8);font-weight:600} .fc-12__qr{ width:100px;height:100px;border-radius:10px;flex-shrink:0; background:white;padding:6px; display:flex;align-items:center;justify-content:center; } .fc-12__qr svg{width:100%;height:100%} @media(prefers-reduced-motion:reduce){.fc-12__card{transition:none}} ``` ### 17. Restaurant Menu Item Recipe Card **Type:** Pure CSS **Description:** Front presents a dish SVG illustration with price tag; back breaks down key ingredients, allergen warnings, and a per-serving nutrition panel. **HTML:** ```html
    $24
    Italian · Pasta
    Spaghetti al Ragu
    House-made spaghetti with slow-cooked Bolognese, fresh parmesan, and wild basil.
    🌶 Medium Chef's Pick
    Hover for ingredients & nutrition →
    Key Ingredients
    Spaghetti pasta Beef mince (15%) San Marzano tomato Parmigiano 24mo Soffritto base Fresh basil Dry white wine Extra virgin olive oil
    Allergens
    ⚠ Gluten ⚠ Dairy ⚠ Sulphites
    Nutrition per serving
    620
    kcal
    42g
    Carbs
    38g
    Protein
    22g
    Fat
    ``` **CSS:** ```css .fc-13,.fc-13 *,.fc-13 *::before,.fc-13 *::after{box-sizing:border-box;margin:0;padding:0} .fc-13 ::selection{background:#dc2626;color:#fff} .fc-13{ --bg:#0c0400;--red:#dc2626;--amber:#d97706;--cream:#fef3c7; --card-w:340px;--card-h:460px; font-family:'Segoe UI',system-ui,sans-serif; background:radial-gradient(ellipse at 50% 40%,#1a0800,#0c0400 65%); min-height:100vh;display:flex;align-items:center;justify-content:center; padding:40px 20px;color:var(--cream); } .fc-13__scene{width:var(--card-w);height:var(--card-h);cursor:pointer;border-radius:20px;overflow:hidden;box-shadow:0 12px 30px rgba(0,0,0,.45)} .fc-13__card{width:100%;height:100%;position:relative} /* Sliding cover — no 3D rotation. Front slides left out, back slides in from the right at the same time. Reads as a menu card filing system, not a flip. */ .fc-13__front,.fc-13__back{position:absolute;inset:0;border-radius:20px;overflow:hidden;transition:transform .55s cubic-bezier(.4,0,.2,1)} .fc-13__back{transform:translateX(100%)} .fc-13__scene:hover .fc-13__front{transform:translateX(-100%)} .fc-13__scene:hover .fc-13__back{transform:translateX(0)} /* FRONT */ .fc-13__front{background:#111008;border:1px solid rgba(217,119,6,.2);display:flex;flex-direction:column} .fc-13__dish-img{ height:220px;flex-shrink:0; background:linear-gradient(160deg,#1a0800,#2d1200,#0d0800); position:relative;overflow:hidden;display:flex;align-items:center;justify-content:center; } .fc-13__dish-img::before{content:'';position:absolute;inset:0;background:radial-gradient(circle at 50% 60%,rgba(217,119,6,.3),transparent 65%)} .fc-13__dish-svg{position:relative;z-index:1} .fc-13__price-tag{ position:absolute;top:14px;right:14px;z-index:2; background:rgba(0,0,0,.7);backdrop-filter:blur(8px); border:1px solid rgba(217,119,6,.4); padding:6px 12px;border-radius:20px; font-size:16px;font-weight:800;color:var(--amber); } .fc-13__dish-info{padding:20px 22px;flex:1;display:flex;flex-direction:column;gap:8px} .fc-13__cuisine{font-size:10px;letter-spacing:.15em;text-transform:uppercase;color:var(--amber);font-weight:700} .fc-13__dish-name{font-size:22px;font-weight:800;color:var(--cream)} .fc-13__dish-desc{font-size:13px;color:rgba(254,243,199,.55);line-height:1.6} .fc-13__badges{display:flex;gap:6px;flex-wrap:wrap;margin-top:4px} .fc-13__badge{font-size:10px;padding:3px 9px;border-radius:20px;background:rgba(220,38,38,.1);border:1px solid rgba(220,38,38,.2);color:rgba(254,243,199,.7)} .fc-13__front-hint{padding:0 22px 16px;margin-top:auto;font-size:10px;color:rgba(254,243,199,.2);letter-spacing:.08em} /* BACK */ .fc-13__back{ background:linear-gradient(160deg,#0e0800,#12090a); border:1px solid rgba(220,38,38,.2); /* Initial off-canvas position set by the shared sliding rule above. */ display:flex;flex-direction:column;padding:24px;gap:12px; } .fc-13__back-section{font-size:10px;letter-spacing:.15em;text-transform:uppercase;font-weight:700;color:var(--amber)} .fc-13__ingredients{display:grid;grid-template-columns:1fr 1fr;gap:6px} .fc-13__ingredient{display:flex;align-items:center;gap:7px;font-size:12px;color:rgba(254,243,199,.7)} .fc-13__ingredient::before{content:'';width:5px;height:5px;border-radius:50%;background:var(--amber);flex-shrink:0} .fc-13__allergens{display:flex;gap:6px;flex-wrap:wrap} .fc-13__allergen{font-size:10px;padding:3px 8px;border-radius:6px;border:1px solid rgba(220,38,38,.3);background:rgba(220,38,38,.08);color:rgba(254,243,199,.6)} .fc-13__nutrition{display:grid;grid-template-columns:repeat(4,1fr);gap:6px} .fc-13__nut-item{text-align:center;padding:8px 4px;border-radius:8px;background:rgba(255,255,255,.04);border:1px solid rgba(255,255,255,.07)} .fc-13__nut-num{font-size:15px;font-weight:800;color:var(--cream)} .fc-13__nut-lbl{font-size:9px;text-transform:uppercase;letter-spacing:.08em;color:rgba(254,243,199,.35);margin-top:2px} .fc-13__add-btn{ margin-top:auto;width:100%;padding:13px; background:linear-gradient(135deg,var(--red),var(--amber)); color:#fff;font-size:13px;font-weight:800; border:none;border-radius:12px;cursor:pointer;letter-spacing:.04em; } @media(prefers-reduced-motion:reduce){.fc-13__card{transition:none}} ``` ### 18. Step-by-Step Process Map Card **Type:** Pure CSS **Description:** A four-card grid where each front marks a numbered process step; back outlines execution tasks, deliverables, and time estimates. **HTML:** ```html
    01
    🎯
    01 · Strategy
    Define Goals & Scope
    Hover for details →
    Step 01 · Strategy
    Define Goals & Scope
    Stakeholder interviews & alignment
    OKR definition & success metrics
    Risk & constraint mapping
    Project charter sign-off
    ⏱ 1–2 weeks
    02
    🔬
    02 · Research
    Discover & Validate
    Hover for details →
    Step 02 · Research
    Discover & Validate
    User interviews (12+ sessions)
    Competitive analysis matrix
    Journey & persona mapping
    Insights synthesis report
    ⏱ 2–3 weeks
    03
    ✏️
    03 · Design
    Prototype & Test
    Hover for details →
    Step 03 · Design
    Prototype & Test
    Information architecture
    Hi-fi Figma prototypes
    Usability test rounds
    Design system tokens
    ⏱ 3–4 weeks
    04
    🚀
    04 · Launch
    Ship & Measure
    Hover for details →
    Step 04 · Launch
    Ship & Measure
    Staged rollout & QA pass
    Analytics instrumentation
    30/60/90 day OKR review
    Retrospective & iteration
    ⏱ Ongoing
    ``` **CSS:** ```css .fc-14,.fc-14 *,.fc-14 *::before,.fc-14 *::after{box-sizing:border-box;margin:0;padding:0} .fc-14 ::selection{background:#6366f1;color:#fff} .fc-14{ --bg:#070710;--indigo:#6366f1;--sky:#38bdf8;--white:#eef2ff; font-family:'Segoe UI',system-ui,sans-serif; background:radial-gradient(ellipse at 50% 30%,#0e0e2e,#070710 65%); min-height:100vh;display:flex;align-items:center;justify-content:center; padding:40px 20px;color:var(--white);flex-direction:column;gap:20px; } .fc-14__grid{display:grid;grid-template-columns:repeat(4,200px);gap:20px} .fc-14__scene{width:200px;height:280px;perspective:1000px;cursor:pointer} .fc-14__card{width:100%;height:100%;position:relative;transform-style:preserve-3d;transition:transform .7s cubic-bezier(.4,0,.2,1)} .fc-14__scene:hover .fc-14__card{transform:rotateY(180deg)} .fc-14__front,.fc-14__back{position:absolute;inset:0;border-radius:16px;backface-visibility:hidden;-webkit-backface-visibility:hidden;overflow:hidden} /* FRONT */ .fc-14__front{ display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px; padding:24px 16px;border:1px solid rgba(99,102,241,.2); } .fc-14__step-num-bg{ position:absolute;bottom:-20px;right:-10px; font-size:80px;font-weight:900;color:rgba(99,102,241,.07);font-style:italic;line-height:1; pointer-events:none; } .fc-14__step-icon{ width:52px;height:52px;border-radius:14px; display:flex;align-items:center;justify-content:center; font-size:22px;position:relative;z-index:1; border:1px solid rgba(255,255,255,.12); } .fc-14__step-num{font-size:11px;font-weight:700;letter-spacing:.12em;text-transform:uppercase;position:relative;z-index:1} .fc-14__step-title{font-size:16px;font-weight:800;text-align:center;position:relative;z-index:1;line-height:1.3} .fc-14__step-hint{font-size:9px;color:rgba(238,242,255,.25);letter-spacing:.08em;position:absolute;bottom:12px;text-align:center} /* BACK */ .fc-14__back{ transform:rotateY(180deg); display:flex;flex-direction:column;padding:18px 16px;gap:10px;border:1px solid rgba(56,189,248,.2); background:linear-gradient(160deg,#0d0d22,#0a1020); } .fc-14__back-step{font-size:9px;letter-spacing:.15em;text-transform:uppercase;font-weight:700} .fc-14__back-title{font-size:15px;font-weight:800;color:var(--white);line-height:1.2} .fc-14__task-list{display:flex;flex-direction:column;gap:7px;flex:1} .fc-14__task{display:flex;align-items:flex-start;gap:7px;font-size:11px;color:rgba(238,242,255,.65);line-height:1.4} .fc-14__task-check{width:14px;height:14px;border-radius:4px;flex-shrink:0;margin-top:1px;display:flex;align-items:center;justify-content:center} .fc-14__task-check svg{width:9px;height:9px;fill:none;stroke:currentColor;stroke-width:2.5} .fc-14__duration{margin-top:auto;display:flex;align-items:center;gap:5px;font-size:10px;color:rgba(238,242,255,.4);padding-top:8px;border-top:1px solid rgba(255,255,255,.06)} /* per-step colors */ .fc-14__scene:nth-child(1) .fc-14__front{background:linear-gradient(160deg,#0f0f2e,#080820)} .fc-14__scene:nth-child(1) .fc-14__step-icon{background:rgba(99,102,241,.15)} .fc-14__scene:nth-child(1) .fc-14__step-num{color:#818cf8} .fc-14__scene:nth-child(1) .fc-14__step-title{color:#c7d2fe} .fc-14__scene:nth-child(2) .fc-14__front{background:linear-gradient(160deg,#0d1a10,#080e0a)} .fc-14__scene:nth-child(2) .fc-14__step-icon{background:rgba(34,197,94,.12)} .fc-14__scene:nth-child(2) .fc-14__step-num{color:#4ade80} .fc-14__scene:nth-child(2) .fc-14__step-title{color:#bbf7d0} .fc-14__scene:nth-child(3) .fc-14__front{background:linear-gradient(160deg,#1a0d0d,#0e0808)} .fc-14__scene:nth-child(3) .fc-14__step-icon{background:rgba(249,115,22,.12)} .fc-14__scene:nth-child(3) .fc-14__step-num{color:#fb923c} .fc-14__scene:nth-child(3) .fc-14__step-title{color:#fed7aa} .fc-14__scene:nth-child(4) .fc-14__front{background:linear-gradient(160deg,#0d0a20,#080614)} .fc-14__scene:nth-child(4) .fc-14__step-icon{background:rgba(168,85,247,.12)} .fc-14__scene:nth-child(4) .fc-14__step-num{color:#c084fc} .fc-14__scene:nth-child(4) .fc-14__step-title{color:#e9d5ff} .fc-14__scene:nth-child(1) .fc-14__back-step,.fc-14__scene:nth-child(1) .fc-14__task-check{color:#818cf8} .fc-14__scene:nth-child(2) .fc-14__back-step,.fc-14__scene:nth-child(2) .fc-14__task-check{color:#4ade80} .fc-14__scene:nth-child(3) .fc-14__back-step,.fc-14__scene:nth-child(3) .fc-14__task-check{color:#fb923c} .fc-14__scene:nth-child(4) .fc-14__back-step,.fc-14__scene:nth-child(4) .fc-14__task-check{color:#c084fc} @media(max-width:900px){.fc-14__grid{grid-template-columns:repeat(2,200px)}} @media(max-width:480px){.fc-14__grid{grid-template-columns:1fr}} @media(prefers-reduced-motion:reduce){.fc-14__card{transition:none}} ``` ### 19. Travel Postcard Diagonal 3D Flip Card **Type:** Pure CSS **Description:** A travel postcard that flips along the diagonal corner-to-corner axis — rotate3d(1,1,0,180deg) instead of the conventional rotateY spin. **HTML:** ```html
    Greetings from
    Lisbon
    Portugal · Postcards from the road
    Par
    Avion
    Hover to read ›
    Postcard · 02 June 14

    Dear friend,

    The pastel buildings climb every hill and at sunset the whole city turns the colour of warm bread. I am drinking ginjinha in a paper cup and listening to a man play fado outside the cathedral.

    Wish you were here.

    — V.

    ``` **CSS:** ```css .fc-20,.fc-20 *,.fc-20 *::before,.fc-20 *::after{box-sizing:border-box;margin:0;padding:0} .fc-20 ::selection{background:#dc2626;color:#fff5e6} .fc-20{ --bg:#f5f0e6;--ink:#3a2f24;--paper:#faf6ec;--paper-2:#fef9ec; --stamp-red:#dc2626;--airmail-blue:#1e40af;--accent:#c08552; --card-w:360px;--card-h:480px; font-family:Georgia,'Times New Roman',serif; background:repeating-linear-gradient(45deg,#f5f0e6,#f5f0e6 12px,#efe7d6 12px,#efe7d6 24px); min-height:100vh;display:flex;align-items:center;justify-content:center; padding:40px 20px;color:var(--ink); } .fc-20__scene{width:var(--card-w);height:var(--card-h);perspective:1200px} .fc-20__card{ width:100%;height:100%;position:relative; transform-style:preserve-3d; transition:transform 1s cubic-bezier(.4,0,.2,1); } .fc-20__scene:hover .fc-20__card{transform:rotate3d(1,1,0,180deg)} .fc-20__front,.fc-20__back{ position:absolute;inset:0; backface-visibility:hidden;-webkit-backface-visibility:hidden; overflow:hidden; box-shadow:0 18px 40px rgba(58,47,36,.25),0 4px 10px rgba(58,47,36,.12); } /* FRONT — sunset city */ .fc-20__front{ background:var(--paper); border:6px solid var(--paper); outline:2px dashed rgba(58,47,36,.25);outline-offset:-12px; display:flex;flex-direction:column; } .fc-20__sky{width:100%;height:160px;flex-shrink:0;border-bottom:1px solid rgba(58,47,36,.15)} .fc-20__title-block{padding:20px 24px 12px;text-align:center} .fc-20__greetings{font-size:13px;letter-spacing:.25em;text-transform:uppercase;color:var(--accent);font-weight:700;margin-bottom:6px} .fc-20__city{font-size:46px;font-weight:900;color:var(--ink);line-height:1;letter-spacing:-.02em;font-style:italic;font-family:'Brush Script MT','Lucida Handwriting',Georgia,cursive} .fc-20__sub{font-size:11px;letter-spacing:.15em;text-transform:uppercase;color:rgba(58,47,36,.5);margin-top:8px;font-family:Georgia,serif} .fc-20__stamp{ position:absolute;top:14px;right:14px; width:54px;height:64px; border:2px dashed var(--stamp-red); background:var(--paper-2); display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px; transform:rotate(6deg); box-shadow:0 2px 4px rgba(58,47,36,.18); } .fc-20__stamp-fig{font-size:18px;color:var(--stamp-red);line-height:1} .fc-20__stamp-text{font-size:8px;letter-spacing:.05em;text-transform:uppercase;color:var(--stamp-red);font-weight:700;line-height:1.1;text-align:center} .fc-20__hint{margin-top:auto;padding:14px 24px;text-align:center;font-size:10px;letter-spacing:.25em;text-transform:uppercase;color:rgba(58,47,36,.45);font-family:Georgia,serif;font-style:italic} /* BACK — handwritten note */ .fc-20__back{ background:var(--paper-2); transform:rotate3d(1,1,0,180deg); display:flex;flex-direction:column; padding:24px 26px; border:6px solid var(--paper-2); } .fc-20__back::before{ content:'';position:absolute;top:0;bottom:0;left:50%; width:1px;background:repeating-linear-gradient(to bottom,rgba(220,38,38,.35) 0 4px,transparent 4px 10px); pointer-events:none; } .fc-20__back::after{ content:'';position:absolute;top:8px;left:8px;right:8px;bottom:8px; border:2px solid transparent; background:repeating-linear-gradient(45deg,var(--airmail-blue) 0 8px,transparent 8px 16px,var(--stamp-red) 16px 24px,transparent 24px 32px); -webkit-mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0); -webkit-mask-composite:xor;mask-composite:exclude; padding:0;opacity:.5;pointer-events:none; } .fc-20__back-head{display:flex;justify-content:space-between;font-size:10px;letter-spacing:.2em;text-transform:uppercase;color:rgba(58,47,36,.55);margin-bottom:12px;font-family:Georgia,serif} .fc-20__back-eyebrow{font-weight:700;color:var(--accent)} .fc-20__note{flex:1;padding-right:18px;font-family:'Brush Script MT','Lucida Handwriting','Snell Roundhand',cursive;color:var(--ink);font-size:17px;line-height:1.5} .fc-20__note p{margin-bottom:8px} .fc-20__signoff{margin-top:10px;font-size:18px} .fc-20__address-block{position:absolute;right:22px;bottom:22px;width:42%;display:flex;flex-direction:column;gap:14px} .fc-20__address-line{height:1px;background:rgba(58,47,36,.3)} @media(prefers-reduced-motion:reduce){ .fc-20__card{transition:none} .fc-20__scene:hover .fc-20__card{transform:none} .fc-20__scene:hover .fc-20__front{opacity:0} .fc-20__scene:hover .fc-20__back{transform:rotate3d(1,1,0,0)} } ``` ### 20. Vertical Axis Top-to-Bottom Flip Card **Type:** Pure CSS **Description:** A layout variation using rotateX instead of rotateY to produce a top-to-bottom vertical card-flip interaction. **HTML:** ```html

    Vertical Axis (rotateX) Flip

    Card flips top-to-bottom instead of side-to-side

    transform: rotateX(180deg)
    Feature · Flip Axis
    Vertical Card Flip
    Hover to flip top-to-bottom via rotateX
    flip
    Back Face · Revealed
    rotateX Flip Complete
    rotateX(180deg) backface-visibility:hidden perspective:1200px
    ``` **CSS:** ```css .fc-15,.fc-15 *,.fc-15 *::before,.fc-15 *::after{box-sizing:border-box;margin:0;padding:0} .fc-15 ::selection{background:#0d9488;color:#fff} .fc-15{ --bg:#04100e;--teal:#0d9488;--emerald:#10b981;--white:#f0fdf4; --card-w:360px;--card-h:240px; font-family:'Segoe UI',system-ui,sans-serif; background:radial-gradient(ellipse at 50% 50%,#061a16,#04100e 65%); min-height:100vh;display:flex;flex-direction:column;align-items:center;justify-content:center; padding:40px 20px;gap:20px;color:var(--white); } .fc-15__heading{text-align:center} .fc-15__heading h2{font-size:18px;font-weight:800;color:var(--white)} .fc-15__heading p{font-size:12px;color:rgba(240,253,244,.4);margin-top:4px} .fc-15__code-tag{display:inline-block;font-family:'Courier New',monospace;font-size:11px;background:rgba(13,148,136,.15);border:1px solid rgba(13,148,136,.3);color:var(--teal);padding:2px 8px;border-radius:4px;margin-top:6px} .fc-15__scene{width:var(--card-w);height:var(--card-h);perspective:1200px;cursor:pointer} .fc-15__card{ width:100%;height:100%;position:relative;transform-style:preserve-3d; /* KEY: rotateX instead of rotateY = vertical flip */ transition:transform .7s cubic-bezier(.4,0,.2,1); } .fc-15__scene:hover .fc-15__card{transform:rotateX(180deg)} .fc-15__front,.fc-15__back{position:absolute;inset:0;border-radius:16px;backface-visibility:hidden;-webkit-backface-visibility:hidden;overflow:hidden} /* FRONT */ .fc-15__front{ background:linear-gradient(160deg,#071a16,#04100e); border:1px solid rgba(13,148,136,.25); display:flex;align-items:center;padding:28px 32px;gap:20px; } .fc-15__icon-box{ width:64px;height:64px;border-radius:18px;flex-shrink:0; background:linear-gradient(135deg,rgba(13,148,136,.2),rgba(16,185,129,.1)); border:1px solid rgba(13,148,136,.3); display:flex;align-items:center;justify-content:center; box-shadow:0 0 20px rgba(13,148,136,.15); } .fc-15__icon-box svg{stroke:var(--teal);stroke-width:1.8;fill:none;width:28px;height:28px} .fc-15__front-text{flex:1} .fc-15__front-label{font-size:10px;letter-spacing:.15em;text-transform:uppercase;color:var(--teal);font-weight:700;margin-bottom:6px} .fc-15__front-title{font-size:20px;font-weight:800;color:var(--white);line-height:1.2} .fc-15__front-sub{font-size:12px;color:rgba(240,253,244,.45);margin-top:6px} .fc-15__axis-arrow{position:absolute;right:16px;top:50%;transform:translateY(-50%);display:flex;flex-direction:column;align-items:center;gap:2px;opacity:.35} .fc-15__axis-arrow span{font-size:10px;color:var(--teal);letter-spacing:.08em} /* BACK — rotateX(180deg) on the element itself means it starts face-down */ .fc-15__back{ background:linear-gradient(160deg,#031a14,#040e0c); border:1px solid rgba(16,185,129,.25); transform:rotateX(180deg); display:flex;align-items:center;padding:28px 32px;gap:20px; } .fc-15__back-icon{ width:64px;height:64px;border-radius:18px;flex-shrink:0; background:linear-gradient(135deg,rgba(16,185,129,.2),rgba(13,148,136,.1)); border:1px solid rgba(16,185,129,.3); display:flex;align-items:center;justify-content:center;font-size:28px; } .fc-15__back-label{font-size:10px;letter-spacing:.15em;text-transform:uppercase;color:var(--emerald);font-weight:700;margin-bottom:6px} .fc-15__back-title{font-size:18px;font-weight:800;color:var(--white)} .fc-15__pill-list{display:flex;flex-wrap:wrap;gap:6px;margin-top:10px} .fc-15__pill{font-size:11px;padding:4px 10px;border-radius:20px;background:rgba(16,185,129,.1);border:1px solid rgba(16,185,129,.2);color:rgba(240,253,244,.7)} @media(prefers-reduced-motion:reduce){.fc-15__card{transition:none}} ``` ### 21. Click-to-Flip JavaScript Toggle Card **Type:** CSS + JS **Description:** A card that flips strictly on a click event using a JS-toggled helper class rather than a hover pseudo-class — ideal for touch and keyboard interfaces. **HTML:** ```html

    Click-to-Flip · JavaScript Toggle

    Uses a CSS class toggle — no hover required

    Click anywhere on the card
    Click Trigger · JS Toggle
    Click to Flip
    This card flips on click, not hover — great for mobile touch interfaces where hover states don't exist.
    Flip Complete ✓
    The JS toggles .is-flipped on the card element — no hover pseudo-class needed.
    // toggle flip on click
    card.classList.
      toggle('is-flipped');
    ``` **CSS:** ```css .fc-16,.fc-16 *,.fc-16 *::before,.fc-16 *::after{box-sizing:border-box;margin:0;padding:0} .fc-16 ::selection{background:#f97316;color:#fff} .fc-16{ --bg:#0c0800;--orange:#f97316;--yellow:#fbbf24;--white:#fffbf0; --card-w:340px;--card-h:420px; font-family:'Segoe UI',system-ui,sans-serif; background:radial-gradient(ellipse at 50% 40%,#1a0e00,#0c0800 65%); min-height:100vh;display:flex;flex-direction:column;align-items:center;justify-content:center; padding:40px 20px;gap:20px;color:var(--white); } .fc-16__meta{text-align:center} .fc-16__meta h2{font-size:16px;font-weight:700;color:var(--white)} .fc-16__meta p{font-size:11px;color:rgba(255,251,240,.4);margin-top:4px} .fc-16__click-pill{ display:inline-flex;align-items:center;gap:6px;margin-top:8px; padding:6px 14px;border-radius:20px; background:rgba(249,115,22,.12);border:1px solid rgba(249,115,22,.25); font-size:11px;color:var(--orange);cursor:default; } .fc-16__click-dot{width:7px;height:7px;border-radius:50%;background:var(--orange);animation:fc-16-pulse 1.5s ease-in-out infinite} @keyframes fc-16-pulse{0%,100%{opacity:.4;transform:scale(.8)}50%{opacity:1;transform:scale(1)}} /* Card */ .fc-16__scene{width:var(--card-w);height:var(--card-h);perspective:1200px;cursor:pointer;flex-shrink:0} .fc-16__card{ width:100%;height:100%;position:relative; transform-style:preserve-3d; transition:transform .7s cubic-bezier(.4,0,.2,1); } /* JS toggle via class */ .fc-16__card.is-flipped{transform:rotateY(180deg)} .fc-16__front,.fc-16__back{position:absolute;inset:0;border-radius:20px;backface-visibility:hidden;-webkit-backface-visibility:hidden;overflow:hidden} /* FRONT */ .fc-16__front{ background:linear-gradient(145deg,#1a0e00,#0f0900); border:1px solid rgba(249,115,22,.25); display:flex;flex-direction:column;align-items:center;justify-content:center; gap:16px;padding:36px 28px; } .fc-16__front::before{content:'';position:absolute;inset:0;background:radial-gradient(circle at 50% 40%,rgba(249,115,22,.08),transparent 60%)} .fc-16__click-icon{ width:80px;height:80px;border-radius:24px; background:linear-gradient(135deg,rgba(249,115,22,.15),rgba(251,191,36,.08)); border:1px solid rgba(249,115,22,.25); display:flex;align-items:center;justify-content:center; position:relative;z-index:1; box-shadow:0 0 30px rgba(249,115,22,.12); } .fc-16__click-icon svg{width:36px;height:36px;stroke:var(--orange);stroke-width:1.8;fill:none} .fc-16__label{font-size:10px;letter-spacing:.15em;text-transform:uppercase;color:var(--orange);font-weight:700;position:relative;z-index:1} .fc-16__title{font-size:24px;font-weight:900;color:var(--white);text-align:center;position:relative;z-index:1} .fc-16__sub{font-size:13px;color:rgba(255,251,240,.45);text-align:center;position:relative;z-index:1;line-height:1.6} .fc-16__click-cta{ position:relative;z-index:1; display:flex;align-items:center;gap:8px;margin-top:8px; padding:12px 24px;border-radius:12px;border:none;cursor:pointer; background:linear-gradient(135deg,var(--orange),var(--yellow)); color:#000;font-size:13px;font-weight:800;letter-spacing:.04em; transition:transform .15s,box-shadow .15s; box-shadow:0 4px 20px rgba(249,115,22,.3); } .fc-16__click-cta:hover{box-shadow:0 8px 30px rgba(249,115,22,.5);filter:brightness(1.08)} .fc-16__click-cta:active{filter:brightness(.95)} /* BACK */ .fc-16__back{ background:linear-gradient(145deg,#0e1a0a,#081008); border:1px solid rgba(74,222,128,.25); transform:rotateY(180deg); display:flex;flex-direction:column;align-items:center;justify-content:center; gap:16px;padding:36px 28px; } .fc-16__back::before{content:'';position:absolute;inset:0;background:radial-gradient(circle at 50% 40%,rgba(74,222,128,.06),transparent 60%)} .fc-16__back-icon{ width:80px;height:80px;border-radius:24px; background:rgba(74,222,128,.1);border:1px solid rgba(74,222,128,.2); display:flex;align-items:center;justify-content:center;position:relative;z-index:1; } .fc-16__back-title{font-size:22px;font-weight:900;color:var(--white);text-align:center;position:relative;z-index:1} .fc-16__back-sub{font-size:13px;color:rgba(255,251,240,.5);text-align:center;position:relative;z-index:1;line-height:1.6} .fc-16__code-block{ position:relative;z-index:1; background:rgba(0,0,0,.4);border:1px solid rgba(255,255,255,.08); border-radius:10px;padding:12px 16px; font-family:'Courier New',monospace;font-size:11px;color:rgba(255,251,240,.6); line-height:1.8;width:100%;text-align:left; } .fc-16__kw{color:#4ade80}.fc-16__str{color:#fb923c}.fc-16__cmt{color:rgba(255,251,240,.3)} .fc-16__flip-back-btn{ position:relative;z-index:1; padding:11px 24px;border-radius:12px;border:1px solid rgba(74,222,128,.3); background:rgba(74,222,128,.1);color:#4ade80;font-size:13px;font-weight:700; cursor:pointer;transition:background .2s; } .fc-16__flip-back-btn:hover{background:rgba(74,222,128,.18)} @media(prefers-reduced-motion:reduce){.fc-16__card{transition:none}.fc-16__click-dot{animation:none}} ``` **JS:** ```js (function(){ var card=document.getElementById('fc-16-card'); var scene=document.getElementById('fc-16-scene'); var backBtn=document.getElementById('fc-16-back-btn'); scene.addEventListener('click',function(){card.classList.toggle('is-flipped')}); backBtn.addEventListener('click',function(e){e.stopPropagation();card.classList.remove('is-flipped')}); })(); ``` ### 22. Dynamic Height Auto-Resizing Flip Card **Type:** Pure CSS **Description:** A card that adapts its height fluidly to varying content lengths on the front versus the back — no explicit pixel heights, no JavaScript. **HTML:** ```html

    Dynamic-Height Auto-Resizing Flip Card

    No fixed heights — adapts to any content length on front or back

    display:grid + opacity/rotateY cross-fade

    Dynamic Card A
    Short Front
    This front face has minimal content. The back has much more.
    Hover to expand →
    Full Detail · Back
    Extended Back Content
    The grid technique means this back face can contain as much content as needed and the card height will adapt automatically — no hardcoded pixel heights required.
    Both faces sit in the same CSS grid cell (1/1)
    Opacity + rotateY creates the cross-fade flip
    The tallest face dictates the wrapper height
    No JavaScript needed — pure CSS grid trick
    Dynamic Card B
    Longer Front Content
    This card has a lot more text on the front — multiple paragraphs, a list of items, and a closing note — and still no height is specified anywhere in the CSS.
    Point one with some detail
    Point two with some detail
    Point three with some detail
    Hover for brief summary →
    TL;DR · Back
    Short Summary
    The grid stacking approach lets each face own its natural height. No JS. No fixed pixels.
    Technique: both .front and .back use grid-area: 1/1 so they overlap in the same grid cell. The tallest visible face sets the wrapper height. On hover, opacity fades to 0 while rotateY(±90deg) adds depth — a CSS-only auto-height flip card.
    ``` **CSS:** ```css .fc-17,.fc-17 *,.fc-17 *::before,.fc-17 *::after{box-sizing:border-box;margin:0;padding:0} .fc-17 ::selection{background:#8b5cf6;color:#fff} .fc-17{ --bg:#08060e;--violet:#8b5cf6;--purple:#a855f7;--white:#faf5ff; font-family:'Segoe UI',system-ui,sans-serif; background:radial-gradient(ellipse at 50% 30%,#0f0820,#08060e 65%); min-height:100vh;display:flex;flex-direction:column;align-items:center;justify-content:center; padding:40px 20px;gap:24px;color:var(--white); } .fc-17__heading{text-align:center} .fc-17__heading h2{font-size:16px;font-weight:700;color:var(--white)} .fc-17__heading p{font-size:11px;color:rgba(250,245,255,.4);margin-top:4px} .fc-17__heading code{background:rgba(139,92,246,.15);border:1px solid rgba(139,92,246,.25);color:var(--violet);padding:1px 6px;border-radius:4px;font-size:11px} /* The key technique: grid with 1 column so both faces stack, only the visible one takes up height */ .fc-17__cards-row{display:flex;gap:20px;flex-wrap:wrap;justify-content:center} .fc-17__card-wrap{ width:280px; /* The magic: a grid container where both faces overlap in the same cell */ display:grid; grid-template-rows:1fr; } /* hover trigger on wrapper */ .fc-17__card-wrap:hover .fc-17__face--front{opacity:0;transform:rotateY(90deg)} .fc-17__card-wrap:hover .fc-17__face--back{opacity:1;transform:rotateY(0deg)} .fc-17__face--front,.fc-17__face--back{ /* overlap in same grid row */ grid-area:1/1; border-radius:16px; transition:opacity .35s ease, transform .5s cubic-bezier(.4,0,.2,1); overflow:hidden; } .fc-17__face--front{ background:linear-gradient(145deg,#130e28,#0a0718); border:1px solid rgba(139,92,246,.2); padding:24px; opacity:1;transform:rotateY(0deg); } .fc-17__face--back{ background:linear-gradient(145deg,#0e1a28,#080f18); border:1px solid rgba(56,189,248,.2); padding:24px; opacity:0;transform:rotateY(-90deg); /* back starts hidden — no explicit height needed */ } /* FRONT content — short */ .fc-17__f-label{font-size:9px;letter-spacing:.15em;text-transform:uppercase;color:var(--violet);font-weight:700;margin-bottom:10px} .fc-17__f-title{font-size:18px;font-weight:800;color:var(--white);margin-bottom:8px} .fc-17__f-teaser{font-size:13px;color:rgba(250,245,255,.5);line-height:1.6} .fc-17__f-hint{font-size:10px;color:rgba(250,245,255,.2);margin-top:14px;letter-spacing:.08em} /* BACK content — variable, longer */ .fc-17__b-label{font-size:9px;letter-spacing:.15em;text-transform:uppercase;color:#38bdf8;font-weight:700;margin-bottom:10px} .fc-17__b-title{font-size:16px;font-weight:800;color:var(--white);margin-bottom:10px} .fc-17__b-body{font-size:13px;color:rgba(250,245,255,.65);line-height:1.7} .fc-17__b-list{margin-top:10px;display:flex;flex-direction:column;gap:6px} .fc-17__b-item{display:flex;align-items:flex-start;gap:8px;font-size:12px;color:rgba(250,245,255,.6)} .fc-17__b-dot{width:5px;height:5px;border-radius:50%;background:#38bdf8;flex-shrink:0;margin-top:5px} /* card 2 has even more content */ .fc-17__card-wrap:nth-child(2) .fc-17__face--front{background:linear-gradient(145deg,#1a0e18,#0f0810)} .fc-17__card-wrap:nth-child(2) .fc-17__face--back{background:linear-gradient(145deg,#0a1a0e,#060e08)} .fc-17__card-wrap:nth-child(2) .fc-17__f-label{color:#f472b6} .fc-17__card-wrap:nth-child(2) .fc-17__b-label{color:#4ade80} .fc-17__card-wrap:nth-child(2) .fc-17__b-dot{background:#4ade80} /* technique note */ .fc-17__note{ max-width:580px;padding:16px 20px;border-radius:12px; background:rgba(139,92,246,.06);border:1px solid rgba(139,92,246,.15); font-size:12px;color:rgba(250,245,255,.5);line-height:1.7;text-align:center; } .fc-17__note code{color:var(--violet);background:rgba(139,92,246,.12);padding:0 4px;border-radius:3px} @media(prefers-reduced-motion:reduce){.fc-17__face--front,.fc-17__face--back{transition:none}} ``` ### 23. Responsive CSS Grid Flip Card Matrix **Type:** Pure CSS **Description:** A six-card portfolio grid that flips on hover, maintains correct 3D perspective at all breakpoints, and reflows from 3 columns to 2 to 1 via CSS Grid. **HTML:** ```html

    Responsive CSS Grid Flip Card Matrix

    3 columns desktop · 2 tablet · 1 mobile · perspective maintained per card at all breakpoints

    01
    Design Systems
    🎨
    Token Architecture
    Scalable design token system
    Hover for details →
    Design Systems
    Token Architecture
    Semantic color layers
    Typography scale (clamp)
    Multi-brand theming
    02
    Web Performance
    Core Web Vitals
    LCP under 1.2s in production
    Hover for details →
    Web Performance
    Core Web Vitals
    LCP: 1.1s (p75)
    INP: <60ms
    CLS: 0.01
    03
    Accessibility
    WCAG 2.2 AA Audit
    Full accessibility review
    Hover for details →
    Accessibility
    WCAG 2.2 AA Audit
    Colour contrast 4.5:1+
    Full keyboard flow
    ARIA landmark audit
    04
    Animation
    🎬
    Motion Library
    60fps CSS keyframe suite
    Hover for details →
    Animation
    Motion Library
    48 keyframe demos
    Reduced-motion safe
    Zero JS dependencies
    05
    Architecture
    🏗
    Micro-Frontend
    Module federation at scale
    Hover for details →
    Architecture
    Micro-Frontend
    Webpack 5 federation
    Shared runtime deps
    12 independent teams
    06
    Testing
    🧪
    E2E Test Suite
    Playwright + CI pipeline
    Hover for details →
    Testing
    E2E Test Suite
    98% critical path coverage
    Cross-browser parallel runs
    Visual regression gates
    ``` **CSS:** ```css .fc-18,.fc-18 *,.fc-18 *::before,.fc-18 *::after{box-sizing:border-box;margin:0;padding:0} .fc-18 ::selection{background:#6366f1;color:#fff} .fc-18{ --bg:#07080f;--indigo:#6366f1;--white:#eef2ff; font-family:'Segoe UI',system-ui,sans-serif; background:radial-gradient(ellipse at 50% 0%,#0d0f28,#07080f 65%); min-height:100vh;padding:40px 20px 60px;color:var(--white); } .fc-18__header{text-align:center;margin-bottom:36px} .fc-18__header h2{font-size:20px;font-weight:800;color:var(--white)} .fc-18__header p{font-size:12px;color:rgba(238,242,255,.4);margin-top:6px} /* Responsive grid — 3 cols desktop, 2 tablet, 1 mobile */ .fc-18__grid{ display:grid; grid-template-columns:repeat(3,1fr); gap:20px; max-width:960px;margin:0 auto; } /* Perspective must sit on the individual scene elements, not the grid */ .fc-18__scene{ height:260px;perspective:1000px;cursor:pointer; } .fc-18__card{ width:100%;height:100%;position:relative; transform-style:preserve-3d; transition:transform .7s cubic-bezier(.4,0,.2,1); } .fc-18__scene:hover .fc-18__card{transform:rotateY(180deg)} .fc-18__front,.fc-18__back{ position:absolute;inset:0;border-radius:16px; backface-visibility:hidden;-webkit-backface-visibility:hidden;overflow:hidden; } /* FRONT */ .fc-18__front{ display:flex;flex-direction:column;padding:24px; border:1px solid rgba(255,255,255,.08); } .fc-18__project-num{position:absolute;top:16px;right:18px;font-size:32px;font-weight:900;opacity:.07;font-style:italic;line-height:1} .fc-18__front-tag{font-size:9px;letter-spacing:.15em;text-transform:uppercase;font-weight:700;margin-bottom:10px} .fc-18__front-icon{font-size:28px;margin-bottom:10px} .fc-18__front-title{font-size:17px;font-weight:800;color:var(--white);line-height:1.2} .fc-18__front-sub{font-size:12px;margin-top:6px;line-height:1.5;opacity:.55} .fc-18__front-hint{margin-top:auto;font-size:9px;opacity:.25;letter-spacing:.08em} /* BACK */ .fc-18__back{ transform:rotateY(180deg); display:flex;flex-direction:column;padding:20px;gap:10px; border:1px solid rgba(255,255,255,.1); } .fc-18__back-label{font-size:9px;letter-spacing:.14em;text-transform:uppercase;font-weight:700} .fc-18__back-title{font-size:15px;font-weight:800;color:var(--white);line-height:1.2} .fc-18__back-list{display:flex;flex-direction:column;gap:6px;flex:1} .fc-18__back-item{display:flex;align-items:center;gap:8px;font-size:11px;opacity:.7} .fc-18__back-dot{width:4px;height:4px;border-radius:50%;flex-shrink:0} .fc-18__back-cta{ padding:10px;border-radius:10px;border:none;cursor:pointer; font-size:12px;font-weight:700;letter-spacing:.04em; transition:opacity .2s; } .fc-18__back-cta:hover{opacity:.85} /* Per-card color schemes */ /* 1 — indigo */ .fc-18__scene:nth-child(1) .fc-18__front{background:linear-gradient(145deg,#0e0f28,#07080f)} .fc-18__scene:nth-child(1) .fc-18__front-tag{color:#818cf8} .fc-18__scene:nth-child(1) .fc-18__front-sub{color:#c7d2fe} .fc-18__scene:nth-child(1) .fc-18__back{background:linear-gradient(145deg,#0d0f26,#090a1a)} .fc-18__scene:nth-child(1) .fc-18__back-label{color:#818cf8} .fc-18__scene:nth-child(1) .fc-18__back-dot{background:#6366f1} .fc-18__scene:nth-child(1) .fc-18__back-cta{background:linear-gradient(135deg,#6366f1,#4f46e5);color:#fff} /* 2 — emerald */ .fc-18__scene:nth-child(2) .fc-18__front{background:linear-gradient(145deg,#071a0e,#04100a)} .fc-18__scene:nth-child(2) .fc-18__front-tag{color:#4ade80} .fc-18__scene:nth-child(2) .fc-18__front-sub{color:#bbf7d0} .fc-18__scene:nth-child(2) .fc-18__back{background:linear-gradient(145deg,#071a0e,#030c07)} .fc-18__scene:nth-child(2) .fc-18__back-label{color:#4ade80} .fc-18__scene:nth-child(2) .fc-18__back-dot{background:#22c55e} .fc-18__scene:nth-child(2) .fc-18__back-cta{background:linear-gradient(135deg,#22c55e,#16a34a);color:#000} /* 3 — rose */ .fc-18__scene:nth-child(3) .fc-18__front{background:linear-gradient(145deg,#1a0710,#0e0408)} .fc-18__scene:nth-child(3) .fc-18__front-tag{color:#fb7185} .fc-18__scene:nth-child(3) .fc-18__front-sub{color:#fecdd3} .fc-18__scene:nth-child(3) .fc-18__back{background:linear-gradient(145deg,#1a0710,#0a0306)} .fc-18__scene:nth-child(3) .fc-18__back-label{color:#fb7185} .fc-18__scene:nth-child(3) .fc-18__back-dot{background:#f43f5e} .fc-18__scene:nth-child(3) .fc-18__back-cta{background:linear-gradient(135deg,#f43f5e,#e11d48);color:#fff} /* 4 — amber */ .fc-18__scene:nth-child(4) .fc-18__front{background:linear-gradient(145deg,#1a1000,#0e0900)} .fc-18__scene:nth-child(4) .fc-18__front-tag{color:#fbbf24} .fc-18__scene:nth-child(4) .fc-18__front-sub{color:#fde68a} .fc-18__scene:nth-child(4) .fc-18__back{background:linear-gradient(145deg,#1a1000,#0a0700)} .fc-18__scene:nth-child(4) .fc-18__back-label{color:#fbbf24} .fc-18__scene:nth-child(4) .fc-18__back-dot{background:#f59e0b} .fc-18__scene:nth-child(4) .fc-18__back-cta{background:linear-gradient(135deg,#f59e0b,#d97706);color:#000} /* 5 — cyan */ .fc-18__scene:nth-child(5) .fc-18__front{background:linear-gradient(145deg,#041618,#020e10)} .fc-18__scene:nth-child(5) .fc-18__front-tag{color:#22d3ee} .fc-18__scene:nth-child(5) .fc-18__front-sub{color:#a5f3fc} .fc-18__scene:nth-child(5) .fc-18__back{background:linear-gradient(145deg,#041618,#020c0e)} .fc-18__scene:nth-child(5) .fc-18__back-label{color:#22d3ee} .fc-18__scene:nth-child(5) .fc-18__back-dot{background:#06b6d4} .fc-18__scene:nth-child(5) .fc-18__back-cta{background:linear-gradient(135deg,#06b6d4,#0284c7);color:#fff} /* 6 — violet */ .fc-18__scene:nth-child(6) .fc-18__front{background:linear-gradient(145deg,#120820,#0a0414)} .fc-18__scene:nth-child(6) .fc-18__front-tag{color:#c084fc} .fc-18__scene:nth-child(6) .fc-18__front-sub{color:#e9d5ff} .fc-18__scene:nth-child(6) .fc-18__back{background:linear-gradient(145deg,#120820,#08031a)} .fc-18__scene:nth-child(6) .fc-18__back-label{color:#c084fc} .fc-18__scene:nth-child(6) .fc-18__back-dot{background:#a855f7} .fc-18__scene:nth-child(6) .fc-18__back-cta{background:linear-gradient(135deg,#a855f7,#7c3aed);color:#fff} @media(max-width:720px){.fc-18__grid{grid-template-columns:repeat(2,1fr)}} @media(max-width:480px){.fc-18__grid{grid-template-columns:1fr}} @media(prefers-reduced-motion:reduce){.fc-18__card{transition:none}} ``` --- ## 32 CSS Floating Action Button Designs URL: https://codefronts.com/components/css-floating-buttons/ Description: 32 hand-coded CSS floating action button templates covering every FAB pattern production apps actually ship in 2026 — Material Design gradient FAB with ripple, speed dial fan-out menu, morph-expand FAB, scroll-to-top with progress ring, floating chat widget, fan arc menu, squircle FAB, social share FAB, glassmorphism FAB, neon glow, compose+tooltip, draggable FAB, notification bell with badge, floating cart with item counter, magnetic hover FAB, theme toggle, classic plus, pulse ring, morphing FAB, labeled pill, neon cyber, brutalist stamp, loading spinner, drag handle, voice action, premium aurora, quick reply, square modern, and more. All use semantic Mini
    Regular
    Large
    Extended
    Rose
    Emerald
    Amber
    Shadow lift
    translateY −3px + 4× shadow depth
    Gloss source
    Radial gradient pseudo-element
    Ripple
    Pure CSS scale + opacity keyframe
    Sizes
    40 · 64 · 80px + extended pill
    ``` **CSS:** ```css .fb01, .fb01 *, .fb01 *::before, .fb01 *::after { box-sizing: border-box; margin: 0; padding: 0; } .fb01 { font-family: 'Inter', sans-serif; background: #0f0f13; min-height: 100vh; display: grid; place-items: center; padding: 40px 20px; color: #e2e2e8; } .fb01-stage { width: min(680px, 100%); display: flex; flex-direction: column; align-items: center; gap: 64px; } .fb01-label-block { text-align: center; } .fb01-label-block h1 { font-family: 'Syne', sans-serif; font-size: clamp(1.8rem, 6vw, 3rem); font-weight: 800; letter-spacing: -.02em; background: linear-gradient(135deg, #a78bfa, #818cf8, #38bdf8); -webkit-background-clip: text; background-clip: text; color: transparent; line-height: 1.05; } .fb01-label-block p { margin-top: 12px; font-size: .95rem; color: #71717a; max-width: 38ch; margin-inline: auto; line-height: 1.6; } /* ── Demo canvas ── */ .fb01-demo-card { width: 100%; background: #18181b; border: 1px solid #27272a; border-radius: 24px; padding: 56px 32px; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 48px; position: relative; overflow: hidden; } .fb01-demo-card::before { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse 60% 40% at 50% 0%, rgba(129,140,248,.07), transparent); pointer-events: none; } /* ── THE FAB ── */ .fb01-fab { position: relative; width: 64px; height: 64px; border-radius: 50%; border: none; cursor: pointer; display: grid; place-items: center; outline: none; transition: transform .22s cubic-bezier(.34,1.56,.64,1), box-shadow .22s ease; /* gradient background */ background: linear-gradient(135deg, #818cf8 0%, #a78bfa 50%, #c084fc 100%); box-shadow: 0 4px 16px rgba(129,140,248,.35), 0 1px 4px rgba(0,0,0,.4), inset 0 1px 0 rgba(255,255,255,.18); } .fb01-fab:hover { transform: scale(1.1) translateY(-3px); box-shadow: 0 12px 32px rgba(129,140,248,.55), 0 4px 8px rgba(0,0,0,.4), inset 0 1px 0 rgba(255,255,255,.22); } .fb01-fab:active { transform: scale(.97) translateY(1px); box-shadow: 0 2px 8px rgba(129,140,248,.3), 0 1px 3px rgba(0,0,0,.4), inset 0 1px 0 rgba(255,255,255,.12); } .fb01-fab::after { content: ''; position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(circle at 38% 28%, rgba(255,255,255,.22), transparent 65%); pointer-events: none; } .fb01-fab svg { width: 26px; height: 26px; fill: #fff; position: relative; z-index: 1; } /* ── size variants ── */ .fb01-fab--sm { width: 40px; height: 40px; box-shadow: 0 2px 10px rgba(129,140,248,.3), 0 1px 3px rgba(0,0,0,.4); } .fb01-fab--sm svg { width: 18px; height: 18px; } .fb01-fab--lg { width: 80px; height: 80px; } .fb01-fab--lg svg { width: 34px; height: 34px; } .fb01-fab--extended { width: auto; height: 56px; border-radius: 28px; padding: 0 24px; gap: 10px; display: flex; align-items: center; font-family: 'Inter', sans-serif; font-size: .9rem; font-weight: 600; letter-spacing: .02em; color: #fff; } .fb01-fab--extended::after { border-radius: 28px; } /* alternate color variants */ .fb01-fab--rose { background: linear-gradient(135deg, #fb7185, #f43f5e); box-shadow: 0 4px 16px rgba(244,63,94,.4), 0 1px 4px rgba(0,0,0,.4), inset 0 1px 0 rgba(255,255,255,.18); } .fb01-fab--rose:hover { box-shadow: 0 12px 32px rgba(244,63,94,.55), 0 4px 8px rgba(0,0,0,.4), inset 0 1px 0 rgba(255,255,255,.22); } .fb01-fab--emerald { background: linear-gradient(135deg, #34d399, #10b981); box-shadow: 0 4px 16px rgba(16,185,129,.4), 0 1px 4px rgba(0,0,0,.4), inset 0 1px 0 rgba(255,255,255,.18); } .fb01-fab--emerald:hover { box-shadow: 0 12px 32px rgba(16,185,129,.55), 0 4px 8px rgba(0,0,0,.4), inset 0 1px 0 rgba(255,255,255,.22); } .fb01-fab--amber { background: linear-gradient(135deg, #fbbf24, #f59e0b); box-shadow: 0 4px 16px rgba(245,158,11,.4), 0 1px 4px rgba(0,0,0,.4), inset 0 1px 0 rgba(255,255,255,.18); } .fb01-fab--amber:hover { box-shadow: 0 12px 32px rgba(245,158,11,.55), 0 4px 8px rgba(0,0,0,.4), inset 0 1px 0 rgba(255,255,255,.22); } /* label under each button */ .fb01-fab-wrap { display: flex; flex-direction: column; align-items: center; gap: 12px; } .fb01-fab-wrap span { font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; color: #52525b; font-weight: 500; } /* ── ripple effect (CSS only) ── */ .fb01-fab .fb01-ripple { position: absolute; inset: 0; border-radius: inherit; background: rgba(255,255,255,.2); transform: scale(0); opacity: 0; } .fb01-fab:active .fb01-ripple { animation: fb01-ripple-burst .4s ease-out forwards; } @keyframes fb01-ripple-burst { to { transform: scale(2.2); opacity: 0; } } /* ── spec callout ── */ .fb01-spec { width: 100%; background: #0f0f13; border: 1px solid #27272a; border-radius: 16px; padding: 20px 24px; display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; } .fb01-spec-item { display: flex; flex-direction: column; gap: 4px; } .fb01-spec-item dt { font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: #52525b; } .fb01-spec-item dd { font-size: .88rem; font-weight: 500; color: #a1a1aa; } @media (prefers-reduced-motion: reduce) { .fb01-fab { transition: none; } .fb01-fab:active .fb01-ripple { animation: none; } } ``` ### 02. Speed Dial FAB Menu **Type:** Pure CSS **Description:** CSS-only speed dial radial FAB menu using checkbox hack with vertical and horizontal expansion variants. **HTML:** ```html

    Speed Dial FAB Menu

    Pure CSS radial floating action button menu — checkbox hack, zero JavaScript, staggered reveal animation.

    Vertical · checkbox hack
    Share link
    Take photo
    Upload photo
    New document
    Horizontal · slide-in
    Share
    Camera
    Doc
    ``` **CSS:** ```css .fb02, .fb02 *, .fb02 *::before, .fb02 *::after { box-sizing: border-box; margin: 0; padding: 0; } .fb02 { font-family: 'Space Grotesk', sans-serif; background: #09090b; min-height: 100vh; display: grid; place-items: center; padding: 40px 20px; color: #e4e4e7; } h1 { font-size: clamp(1.6rem, 5vw, 2.6rem); font-weight: 700; text-align: center; letter-spacing: -.02em; color: #fafafa; margin-bottom: 8px; } p.fb02-sub { text-align: center; color: #52525b; font-size: .9rem; max-width: 40ch; margin: 0 auto 48px; line-height: 1.6; } /* ── page layout ── */ .fb02-demos { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; width: min(900px, 100%); } .fb02-demo-well { background: #141417; border: 1px solid #27272a; border-radius: 20px; height: 380px; position: relative; overflow: hidden; display: flex; align-items: flex-end; justify-content: flex-end; padding: 28px; } .fb02-demo-well-label { position: absolute; top: 16px; left: 20px; font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: #3f3f46; font-weight: 600; } /* ── SPEED DIAL (vertical, checkbox hack) ── */ .fb02-speed-dial { position: relative; display: flex; flex-direction: column; align-items: center; gap: 0; } /* hidden checkbox */ .fb02-sd-check { position: absolute; opacity: 0; pointer-events: none; width: 0; height: 0; } /* action items — hidden by default */ .fb02-sd-actions { display: flex; flex-direction: column-reverse; align-items: center; gap: 14px; margin-bottom: 16px; pointer-events: none; } .fb02-sd-item { display: flex; align-items: center; gap: 10px; opacity: 0; transform: translateY(16px) scale(.85); transition: opacity .22s ease, transform .22s cubic-bezier(.34,1.56,.64,1); pointer-events: none; flex-direction: row-reverse; } /* labels */ .fb02-sd-item-lbl { font-size: .78rem; font-weight: 600; color: #a1a1aa; background: #1f1f23; border: 1px solid #3f3f46; border-radius: 6px; padding: 4px 10px; white-space: nowrap; } /* mini sub-button */ .fb02-sd-btn { width: 46px; height: 46px; border-radius: 50%; border: none; display: grid; place-items: center; cursor: pointer; box-shadow: 0 4px 14px rgba(0,0,0,.45); transition: transform .15s ease, box-shadow .15s ease; } .fb02-sd-btn:hover { transform: scale(1.1); } .fb02-sd-btn svg { width: 20px; height: 20px; fill: #fff; } .fb02-sd-btn--share { background: linear-gradient(135deg, #6366f1, #8b5cf6); } .fb02-sd-btn--camera { background: linear-gradient(135deg, #06b6d4, #0ea5e9); } .fb02-sd-btn--photo { background: linear-gradient(135deg, #f43f5e, #e11d48); } .fb02-sd-btn--doc { background: linear-gradient(135deg, #f59e0b, #d97706); } /* staggered reveal when checked */ .fb02-sd-check:checked ~ .fb02-sd-actions { pointer-events: auto; } .fb02-sd-check:checked ~ .fb02-sd-actions .fb02-sd-item:nth-child(1) { opacity: 1; transform: none; transition-delay: .00s; pointer-events: auto; } .fb02-sd-check:checked ~ .fb02-sd-actions .fb02-sd-item:nth-child(2) { opacity: 1; transform: none; transition-delay: .06s; pointer-events: auto; } .fb02-sd-check:checked ~ .fb02-sd-actions .fb02-sd-item:nth-child(3) { opacity: 1; transform: none; transition-delay: .12s; pointer-events: auto; } .fb02-sd-check:checked ~ .fb02-sd-actions .fb02-sd-item:nth-child(4) { opacity: 1; transform: none; transition-delay: .18s; pointer-events: auto; } /* main trigger */ .fb02-sd-trigger { width: 60px; height: 60px; border-radius: 50%; background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%); border: none; cursor: pointer; display: grid; place-items: center; box-shadow: 0 6px 20px rgba(99,102,241,.45), inset 0 1px 0 rgba(255,255,255,.18); transition: transform .28s cubic-bezier(.34,1.56,.64,1), box-shadow .22s ease; position: relative; } .fb02-sd-trigger:hover { box-shadow: 0 10px 28px rgba(99,102,241,.6), inset 0 1px 0 rgba(255,255,255,.22); } /* plus → × morph */ .fb02-sd-trigger .fb02-icon-wrap { position: relative; width: 24px; height: 24px; } .fb02-sd-trigger .fb02-icon-wrap::before, .fb02-sd-trigger .fb02-icon-wrap::after { content: ''; position: absolute; inset: 50% 0; height: 2.5px; background: #fff; border-radius: 2px; margin-top: -1.25px; transition: transform .28s cubic-bezier(.34,1.56,.64,1); } .fb02-sd-trigger .fb02-icon-wrap::before { transform: rotate(0deg); } .fb02-sd-trigger .fb02-icon-wrap::after { transform: rotate(90deg); } /* vertical bar of the plus */ .fb02-sd-trigger .fb02-icon-bar { position: absolute; top: 0; bottom: 0; left: 50%; width: 2.5px; background: #fff; border-radius: 2px; margin-left: -1.25px; transition: transform .28s cubic-bezier(.34,1.56,.64,1), opacity .2s; } .fb02-sd-check:checked ~ .fb02-sd-trigger .fb02-icon-wrap::before { transform: rotate(45deg); } .fb02-sd-check:checked ~ .fb02-sd-trigger .fb02-icon-wrap::after { transform: rotate(-45deg); } .fb02-sd-check:checked ~ .fb02-sd-trigger .fb02-icon-bar { opacity: 0; } .fb02-sd-check:checked ~ .fb02-sd-trigger { transform: rotate(45deg); box-shadow: 0 8px 24px rgba(99,102,241,.5), inset 0 1px 0 rgba(255,255,255,.18); } /* overlay scrim (optional) */ .fb02-sd-scrim { position: absolute; inset: 0; background: rgba(0,0,0,0); pointer-events: none; transition: background .3s; border-radius: 20px; } .fb02-sd-check:checked ~ .fb02-sd-scrim { background: rgba(0,0,0,.4); pointer-events: auto; } /* ── HORIZONTAL speed dial ── */ .fb02-speed-dial--h { flex-direction: row; align-items: center; } .fb02-speed-dial--h .fb02-sd-actions { flex-direction: row; margin-bottom: 0; margin-right: 14px; } .fb02-speed-dial--h .fb02-sd-item { flex-direction: column; gap: 8px; transform: translateX(20px) scale(.85); } .fb02-sd-check--h:checked ~ .fb02-sd-actions--h { pointer-events: auto; } .fb02-sd-check--h:checked ~ .fb02-sd-actions--h .fb02-sd-item:nth-child(1) { opacity: 1; transform: none; transition-delay: .00s; pointer-events: auto; } .fb02-sd-check--h:checked ~ .fb02-sd-actions--h .fb02-sd-item:nth-child(2) { opacity: 1; transform: none; transition-delay: .07s; pointer-events: auto; } .fb02-sd-check--h:checked ~ .fb02-sd-actions--h .fb02-sd-item:nth-child(3) { opacity: 1; transform: none; transition-delay: .14s; pointer-events: auto; } .fb02-sd-check--h:checked ~ .fb02-sd-trigger--h { transform: rotate(45deg); } .fb02-sd-trigger--h { width: 60px; height: 60px; border-radius: 50%; background: linear-gradient(135deg, #f43f5e, #fb7185); border: none; cursor: pointer; display: grid; place-items: center; box-shadow: 0 6px 20px rgba(244,63,94,.4), inset 0 1px 0 rgba(255,255,255,.18); transition: transform .28s cubic-bezier(.34,1.56,.64,1); flex-shrink: 0; } .fb02-sd-trigger--h svg { width: 26px; height: 26px; fill: #fff; transition: transform .28s cubic-bezier(.34,1.56,.64,1); } @media (prefers-reduced-motion: reduce) { .fb02-sd-item, .fb02-sd-trigger, .fb02-sd-trigger--h { transition: none; } } ``` ### 03. Morph Expand FAB **Type:** Pure CSS **Description:** Morphing FAB that expands into an extended pill button on hover, with 4 direction variants and smooth shape transitions. **HTML:** ```html

    Morphing Floating Action Button

    FAB expands to an extended pill on hover — pure CSS width/height transition, no JavaScript. Four morph directions and shapes.

    Horizontal expand
    Green slide reveal
    Square → pill morph
    Vertical expand
    ``` **CSS:** ```css .fb03, .fb03 *, .fb03 *::before, .fb03 *::after { box-sizing: border-box; margin: 0; padding: 0; } .fb03 { font-family: 'Inter', sans-serif; background: #fafaf9; min-height: 100vh; display: grid; place-items: center; padding: 40px 20px; color: #1c1917; } h1 { font-size: clamp(1.6rem, 5vw, 2.4rem); font-weight: 700; text-align: center; letter-spacing: -.025em; color: #1c1917; margin-bottom: 8px; } p.fb03-sub { text-align: center; color: #78716c; font-size: .9rem; max-width: 42ch; margin: 0 auto 52px; line-height: 1.6; } .fb03-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; width: min(860px, 100%); } .fb03-well { background: #fff; border: 1px solid #e7e5e4; border-radius: 20px; height: 320px; display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden; box-shadow: 0 1px 4px rgba(0,0,0,.06); } .fb03-well-tag { position: absolute; top: 14px; left: 16px; font-size: .68rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: #a8a29e; } /* ── MORPH FAB (pure CSS hover width expand) ── */ .fb03-morph-fab { display: flex; align-items: center; justify-content: center; gap: 0; height: 60px; width: 60px; border-radius: 30px; border: none; cursor: pointer; overflow: hidden; /* gradient */ background: linear-gradient(135deg, #0ea5e9, #6366f1); box-shadow: 0 6px 20px rgba(99,102,241,.35), inset 0 1px 0 rgba(255,255,255,.2); transition: width .38s cubic-bezier(.4,0,.2,1), border-radius .38s cubic-bezier(.4,0,.2,1), box-shadow .22s ease, gap .38s ease; white-space: nowrap; } .fb03-morph-fab:hover { width: 180px; border-radius: 16px; gap: 10px; box-shadow: 0 8px 28px rgba(99,102,241,.45), inset 0 1px 0 rgba(255,255,255,.2); } .fb03-morph-fab .fb03-m-icon { flex-shrink: 0; width: 26px; height: 26px; fill: #fff; transition: transform .38s cubic-bezier(.4,0,.2,1); } .fb03-morph-fab:hover .fb03-m-icon { transform: translateX(-2px); } .fb03-morph-fab .fb03-m-label { font-size: .9rem; font-weight: 600; color: #fff; letter-spacing: .02em; max-width: 0; opacity: 0; overflow: hidden; transition: max-width .3s ease .05s, opacity .25s ease .08s; } .fb03-morph-fab:hover .fb03-m-label { max-width: 120px; opacity: 1; } /* ── variant: pill that slides text in from right ── */ .fb03-morph-fab--slide { background: linear-gradient(135deg, #10b981, #059669); box-shadow: 0 6px 20px rgba(16,185,129,.35), inset 0 1px 0 rgba(255,255,255,.2); } .fb03-morph-fab--slide:hover { box-shadow: 0 8px 28px rgba(16,185,129,.45), inset 0 1px 0 rgba(255,255,255,.2); } /* ── variant: square → pill morph ── */ .fb03-morph-fab--sq { width: 56px; height: 56px; border-radius: 14px; background: linear-gradient(135deg, #f59e0b, #ef4444); box-shadow: 0 6px 20px rgba(239,68,68,.32), inset 0 1px 0 rgba(255,255,255,.2); transition: width .38s cubic-bezier(.4,0,.2,1), height .38s cubic-bezier(.4,0,.2,1), border-radius .38s cubic-bezier(.4,0,.2,1), box-shadow .22s ease, gap .38s ease; } .fb03-morph-fab--sq:hover { width: 200px; height: 52px; border-radius: 26px; gap: 10px; box-shadow: 0 8px 28px rgba(239,68,68,.42), inset 0 1px 0 rgba(255,255,255,.2); } /* ── variant: bottom-right corner FAB that expands ── */ .fb03-corner-wrap { position: absolute; bottom: 20px; right: 20px; } .fb03-morph-fab--corner { background: linear-gradient(135deg, #8b5cf6, #d946ef); box-shadow: 0 6px 20px rgba(139,92,246,.4), inset 0 1px 0 rgba(255,255,255,.2); flex-direction: column; height: 60px; width: 60px; border-radius: 30px; transition: height .38s cubic-bezier(.4,0,.2,1), border-radius .38s cubic-bezier(.4,0,.2,1), box-shadow .22s ease, gap .38s ease; } .fb03-morph-fab--corner:hover { height: 160px; border-radius: 20px; gap: 8px; box-shadow: 0 8px 28px rgba(139,92,246,.5), inset 0 1px 0 rgba(255,255,255,.2); width: 60px; } .fb03-morph-fab--corner .fb03-m-label { max-width: none; max-height: 0; opacity: 0; font-size: .75rem; overflow: hidden; transition: max-height .3s ease .05s, opacity .25s ease .08s; writing-mode: horizontal-tb; white-space: nowrap; } .fb03-morph-fab--corner:hover .fb03-m-label { max-height: 60px; opacity: 1; } .fb03-morph-fab--corner:hover .fb03-m-icon { transform: none; } @media (prefers-reduced-motion: reduce) { .fb03-morph-fab, .fb03-morph-fab .fb03-m-label, .fb03-morph-fab .fb03-m-icon { transition: none; } } ``` ### 04. Scroll-to-Top Progress Ring **Type:** CSS + JS **Description:** Scroll-to-top floating button with SVG circular progress ring that tracks scroll depth and fades in via IntersectionObserver. **HTML:** ```html

    Scroll down to
    see the FAB appear

    A scroll-to-top floating button with an SVG progress ring that tracks your reading position — pure CSS styling, tiny vanilla JS for the scroll math.

    Scroll

    The anatomy of a great scroll-to-top button

    A scroll-to-top FAB earns its screen space by being invisible until the user has scrolled far enough that returning to the top would be a real chore — typically after 20–30% of page height.

    The progress ring wraps the button and fills as the user scrolls, giving a peripheral readout of reading progress without cluttering the layout with a separate indicator bar.

    Design principles at work

    The button enters with a spring scale-in so it feels physical, not merely functional. On hover it lifts slightly and reveals a percentage tooltip confirming the ring reading. On click, smooth scrolling returns the user to the top.

    Keep the button at least 60px from the edge on mobile to clear thumb-friendly zones. The mini variant in the bottom-left shows a minimal borderless square treatment — useful when the bottom-right is occupied by a chat widget or another FAB.

    Implementation notes

    The SVG ring uses stroke-dasharray and stroke-dashoffset to trace progress. The circumference of the circle (2πr = 2π×30 ≈ 188.5) defines dasharray; the JS maps scroll percentage to dashoffset between 188.5 and 0.

    Visibility is toggled by adding a .visible class via an IntersectionObserver on the hero section, avoiding scroll-event overhead for the show/hide trigger.

    Accessibility

    The button carries an aria-label="Back to top" and an id="fb04-top" anchor on the hero. It is focusable, keyboard-activatable, and hides from the tab order when not visible via pointer-events: none combined with CSS opacity.

    The ring SVG is marked aria-hidden so screen readers skip the decorative progress graphic. A prefers-reduced-motion query degrades the entrance animation to a simple fade.

    The compact square variant

    On the left side you'll see a minimal 44×44px borderless square FAB — same function, half the footprint. It suits content-dense dashboards where a 60px circular FAB with ring would feel heavy. No progress ring, just the arrow — simplicity as a deliberate choice.

    ``` **CSS:** ```css .fb04, .fb04 *, .fb04 *::before, .fb04 *::after { box-sizing: border-box; margin: 0; padding: 0; } .fb04 { scroll-behavior: smooth; } .fb04 { font-family: 'Inter', sans-serif; background: #f8f8f5; color: #2d2d2d; line-height: 1.7; } /* ── Long scrollable page content ── */ .fb04-hero { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 60px 24px; background: linear-gradient(160deg, #1e1b4b 0%, #312e81 50%, #4f46e5 100%); color: #fff; } .fb04-hero h1 { font-family: 'Instrument Serif', serif; font-size: clamp(2.4rem, 8vw, 5rem); line-height: 1.1; margin-bottom: 20px; font-style: italic; } .fb04-hero p { font-size: clamp(1rem, 2.5vw, 1.2rem); color: rgba(255,255,255,.7); max-width: 46ch; } .fb04-scroll-hint { margin-top: 48px; font-size: .82rem; letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.45); display: flex; flex-direction: column; align-items: center; gap: 8px; animation: fb04-hint-bob 2s ease-in-out infinite; } .fb04-scroll-hint::after { content: ''; width: 1.5px; height: 40px; background: rgba(255,255,255,.3); border-radius: 1px; } @keyframes fb04-hint-bob { 50% { transform: translateY(6px); } } .fb04-content-section { max-width: 720px; margin: 0 auto; padding: 80px 24px; } .fb04-content-section h2 { font-family: 'Instrument Serif', serif; font-size: clamp(1.8rem, 4vw, 2.6rem); margin-bottom: 20px; color: #1e1b4b; font-style: italic; } .fb04-content-section p { color: #555; margin-bottom: 18px; } .fb04-divider { height: 1px; background: #e5e5e0; margin: 60px 0; } /* ── SCROLL TO TOP FAB ── */ #fb04-stt-btn { position: fixed; bottom: 32px; right: 32px; width: 60px; height: 60px; border-radius: 50%; border: none; cursor: pointer; background: #1e1b4b; color: #fff; display: grid; place-items: center; box-shadow: 0 6px 24px rgba(30,27,75,.4); opacity: 0; transform: translateY(20px) scale(.85); transition: opacity .3s ease, transform .3s cubic-bezier(.34,1.56,.64,1), box-shadow .2s ease; z-index: 1000; /* prevent interaction when hidden */ pointer-events: none; } #fb04-stt-btn.fb04-visible { opacity: 1; transform: none; pointer-events: auto; } #fb04-stt-btn:hover { box-shadow: 0 10px 32px rgba(30,27,75,.55); background: #312e81; } #fb04-stt-btn:active { transform: scale(.95); } /* SVG progress ring */ #fb04-stt-btn svg.fb04-ring { position: absolute; inset: -4px; width: calc(100% + 8px); height: calc(100% + 8px); transform: rotate(-90deg); pointer-events: none; } #fb04-stt-btn .fb04-ring-track { fill: none; stroke: rgba(255,255,255,.12); stroke-width: 3; } #fb04-stt-btn .fb04-ring-progress { fill: none; stroke: #818cf8; stroke-width: 3; stroke-linecap: round; stroke-dasharray: 200; stroke-dashoffset: 200; transition: stroke-dashoffset .1s linear; } /* arrow icon */ #fb04-stt-btn .fb04-arrow-up { width: 22px; height: 22px; fill: #fff; position: relative; z-index: 1; transition: transform .2s ease; } #fb04-stt-btn:hover .fb04-arrow-up { transform: translateY(-2px); } /* percentage label (shows on hover) */ #fb04-stt-btn .fb04-pct-label { position: absolute; top: -38px; left: 50%; transform: translateX(-50%); background: #1e1b4b; color: #a5b4fc; font-size: .7rem; font-weight: 600; letter-spacing: .06em; padding: 4px 8px; border-radius: 6px; white-space: nowrap; opacity: 0; transition: opacity .2s; pointer-events: none; } #fb04-stt-btn:hover .fb04-pct-label { opacity: 1; } /* ── alternate compact variant shown in corner ── */ .fb04-mini-stt { position: fixed; bottom: 32px; left: 32px; width: 44px; height: 44px; border-radius: 12px; border: 1.5px solid #e5e7eb; background: #fff; cursor: pointer; display: grid; place-items: center; box-shadow: 0 2px 12px rgba(0,0,0,.1); opacity: 0; transform: translateY(16px); transition: opacity .3s ease, transform .3s ease, box-shadow .2s ease; pointer-events: none; z-index: 999; } .fb04-mini-stt.fb04-visible { opacity: 1; transform: none; pointer-events: auto; } .fb04-mini-stt:hover { box-shadow: 0 6px 20px rgba(0,0,0,.14); } .fb04-mini-stt svg { width: 18px; height: 18px; fill: #6366f1; } ``` **JS:** ```js const btn = document.getElementById('fb04-stt-btn'); const mini = document.getElementById('fb04-mini-stt'); const prog = document.getElementById('fb04-ring-prog'); const pctLabel = document.getElementById('fb04-stt-pct'); const CIRCUMFERENCE = 2 * Math.PI * 30; // ≈ 188.5 function update() { const scrollTop = window.scrollY; const maxScroll = document.documentElement.scrollHeight - window.innerHeight; const pct = maxScroll > 0 ? scrollTop / maxScroll : 0; const offset = CIRCUMFERENCE * (1 - pct); prog.style.strokeDasharray = CIRCUMFERENCE; prog.style.strokeDashoffset = offset; pctLabel.textContent = Math.round(pct * 100) + '%'; const show = scrollTop > window.innerHeight * 0.3; btn.classList.toggle('fb04-visible', show); mini.classList.toggle('fb04-visible', show); } window.addEventListener('scroll', update, { passive: true }); update(); btn.addEventListener('click', () => window.scrollTo({ top: 0, behavior: 'smooth' })); mini.addEventListener('click', () => window.scrollTo({ top: 0, behavior: 'smooth' })); ``` ### 05. Floating Chat Widget **Type:** CSS + JS **Description:** Floating chat widget FAB for WhatsApp and support chat with animated panel, notification badge, and smooth open/close transitions. **HTML:** ```html

    Floating Chat
    Support Button

    Click the green WhatsApp-style button in the bottom-right (or the indigo support button bottom-left) to open the live chat panel. Pure CSS panel animation, minimal JS for toggle state.

    Bottom-right = WhatsApp · Bottom-left = Support chat
    🧑

    Mia — Support

    ● Online now
    Hi there! 👋 How can I help you today?
    Just now
    🤖

    AI Assistant

    Replies instantly
    Hello! Ask me anything about our products.
    Just now
    ``` **CSS:** ```css .fb05, .fb05 *, .fb05 *::before, .fb05 *::after { box-sizing: border-box; margin: 0; padding: 0; } .fb05 { font-family: 'Inter', sans-serif; background: #f4f4f0; min-height: 100vh; display: grid; place-items: center; padding: 40px 20px; color: #1a1a1a; } .fb05-page-content { text-align: center; max-width: 560px; padding: 60px 24px; } .fb05-page-content h1 { font-size: clamp(1.8rem, 5vw, 2.8rem); font-weight: 700; letter-spacing: -.025em; line-height: 1.15; margin-bottom: 16px; } .fb05-page-content p { color: #64748b; line-height: 1.65; font-size: .95rem; } .fb05-page-content .fb05-note { display: inline-block; margin-top: 24px; font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; color: #94a3b8; border-top: 1px solid #e2e8f0; padding-top: 20px; } /* ══════════════════════════════ FLOATING CHAT WIDGET — VARIANT 1: WhatsApp green ══════════════════════════════ */ .fb05-chat-fab { position: fixed; bottom: 32px; right: 32px; z-index: 200; display: flex; flex-direction: column; align-items: flex-end; gap: 14px; } /* chat panel */ .fb05-chat-panel { background: #fff; border-radius: 18px; width: 300px; overflow: hidden; box-shadow: 0 8px 40px rgba(0,0,0,.16), 0 2px 8px rgba(0,0,0,.08); opacity: 0; transform: translateY(12px) scale(.96); pointer-events: none; transform-origin: bottom right; transition: opacity .28s ease, transform .32s cubic-bezier(.34,1.56,.64,1); } .fb05-chat-panel.fb05-open { opacity: 1; transform: none; pointer-events: auto; } .fb05-cp-header { background: linear-gradient(135deg, #25d366, #128c7e); padding: 18px 18px 24px; color: #fff; position: relative; } .fb05-cp-header .fb05-agent { display: flex; align-items: center; gap: 12px; } .fb05-cp-avatar { width: 46px; height: 46px; border-radius: 50%; background: rgba(255,255,255,.25); display: grid; place-items: center; font-size: 22px; flex-shrink: 0; position: relative; } .fb05-cp-avatar::after { content: ''; position: absolute; bottom: 1px; right: 1px; width: 11px; height: 11px; border-radius: 50%; background: #7fe87f; border: 2px solid #128c7e; } .fb05-cp-info h3 { font-size: .96rem; font-weight: 600; } .fb05-cp-info span { font-size: .76rem; opacity: .8; } .fb05-cp-body { padding: 18px; background: #ecfdf5; min-height: 100px; } .fb05-cp-bubble { background: #fff; border-radius: 0 12px 12px 12px; padding: 10px 14px; font-size: .85rem; line-height: 1.5; color: #1a1a1a; box-shadow: 0 1px 4px rgba(0,0,0,.08); max-width: 90%; position: relative; } .fb05-cp-bubble::before { content: ''; position: absolute; top: 0; left: -7px; border: 7px solid transparent; border-top-color: #fff; border-right-color: #fff; } .fb05-cp-time { text-align: right; font-size: .67rem; color: #94a3b8; margin-top: 4px; } .fb05-cp-footer { padding: 14px 18px; display: flex; gap: 8px; border-top: 1px solid #f0f0f0; } .fb05-cp-input { flex: 1; border: 1.5px solid #e2e8f0; border-radius: 24px; padding: 9px 16px; font-size: .85rem; font-family: inherit; outline: none; background: #f8fafc; } .fb05-cp-input:focus { border-color: #25d366; } .fb05-cp-send { width: 38px; height: 38px; border-radius: 50%; border: none; background: #25d366; cursor: pointer; display: grid; place-items: center; flex-shrink: 0; transition: transform .15s ease, background .15s; } .fb05-cp-send:hover { background: #22c55e; transform: scale(1.08); } .fb05-cp-send svg { width: 17px; height: 17px; fill: #fff; } /* trigger button */ .fb05-chat-trigger { width: 62px; height: 62px; border-radius: 50%; border: none; cursor: pointer; display: grid; place-items: center; background: linear-gradient(135deg, #25d366, #128c7e); box-shadow: 0 6px 24px rgba(37,211,102,.45), inset 0 1px 0 rgba(255,255,255,.2); transition: transform .22s cubic-bezier(.34,1.56,.64,1), box-shadow .2s ease; position: relative; } .fb05-chat-trigger:hover { transform: scale(1.1); box-shadow: 0 10px 32px rgba(37,211,102,.6), inset 0 1px 0 rgba(255,255,255,.2); } .fb05-chat-trigger svg { width: 32px; height: 32px; fill: #fff; } /* pulsing ring */ .fb05-chat-trigger::before { content: ''; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid rgba(37,211,102,.5); animation: fb05-pulse-ring 2.2s ease-out infinite; } @keyframes fb05-pulse-ring { 0% { transform: scale(.9); opacity: .7; } 70% { transform: scale(1.18); opacity: 0; } 100% { transform: scale(1.18); opacity: 0; } } /* notification badge */ .fb05-chat-badge { position: absolute; top: -4px; right: -4px; width: 22px; height: 22px; border-radius: 50%; background: #ef4444; color: #fff; font-size: .68rem; font-weight: 700; display: grid; place-items: center; border: 2px solid #f4f4f0; animation: fb05-badge-pop .4s cubic-bezier(.34,1.56,.64,1) both; } @keyframes fb05-badge-pop { from { transform: scale(0); } to { transform: scale(1); } } /* icon morph: chat → X */ .fb05-chat-trigger .fb05-icon-chat { transition: opacity .2s, transform .2s; } .fb05-chat-trigger .fb05-icon-close { position: absolute; opacity: 0; transition: opacity .2s, transform .2s; transform: rotate(-45deg); } .fb05-chat-trigger.fb05-open .fb05-icon-chat { opacity: 0; transform: rotate(45deg); } .fb05-chat-trigger.fb05-open .fb05-icon-close { opacity: 1; transform: rotate(0deg); } /* ══ VARIANT 2: Indigo support ══ */ .fb05-chat-fab--indigo { bottom: 32px; left: 32px; right: auto; } .fb05-chat-trigger--ind { background: linear-gradient(135deg, #6366f1, #4f46e5); box-shadow: 0 6px 24px rgba(99,102,241,.4), inset 0 1px 0 rgba(255,255,255,.2); } .fb05-chat-trigger--ind::before { border-color: rgba(99,102,241,.45); } .fb05-chat-trigger--ind:hover { box-shadow: 0 10px 32px rgba(99,102,241,.55), inset 0 1px 0 rgba(255,255,255,.2); } @media (prefers-reduced-motion: reduce) { .fb05-chat-trigger::before { animation: none; } .fb05-chat-panel, .fb05-chat-trigger { transition: none; } } @media (max-width: 480px) { .fb05-chat-panel { width: calc(100vw - 64px); } .fb05-chat-fab--indigo { display: none; } } ``` **JS:** ```js function setupChat(triggerId, panelId) { const trig = document.getElementById(triggerId); const panel = document.getElementById(panelId); let open = false; trig.addEventListener('click', () => { open = !open; trig.classList.toggle('fb05-open', open); panel.classList.toggle('fb05-open', open); trig.setAttribute('aria-expanded', open); // hide badge on first open const badge = trig.querySelector('.fb05-chat-badge'); if (badge && open) badge.style.display = 'none'; }); } setupChat('fb05-trig-wa', 'fb05-panel-wa'); setupChat('fb05-trig-ind', 'fb05-panel-ind'); ``` ### 06. Fan Arc FAB Menu **Type:** CSS + JS **Description:** Fan and arc style FAB menu with radial spread using JS angle math, available in two demo layouts. **HTML:** ```html

    Fan Arc FAB Menu

    Radial floating action button menu — actions spread in a configurable arc on click. CSS transitions + a tiny 15-line JS layout engine.

    Upward 90° arc · 5 items
    Share
    Camera
    Bookmark
    Like
    More
    Corner placement · 4 items · 120° arc
    Edit
    Attach
    Gallery
    Location
    ``` **CSS:** ```css .fb06, .fb06 *, .fb06 *::before, .fb06 *::after { box-sizing: border-box; margin: 0; padding: 0; } .fb06 { font-family: 'Plus Jakarta Sans', sans-serif; background: #0c0c10; min-height: 100vh; display: grid; place-items: center; padding: 40px 20px; color: #e4e4e7; } h1 { font-size: clamp(1.6rem, 5vw, 2.4rem); font-weight: 700; text-align: center; letter-spacing: -.022em; margin-bottom: 8px; } p.fb06-sub { text-align: center; color: #52525b; font-size: .9rem; max-width: 42ch; margin: 0 auto 60px; line-height: 1.6; } .fb06-demos { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 24px; width: min(880px, 100%); } .fb06-well { background: #141418; border: 1px solid #27272a; border-radius: 22px; height: 400px; position: relative; overflow: hidden; display: flex; align-items: flex-end; justify-content: center; padding: 40px; } .fb06-well-tag { position: absolute; top: 16px; left: 18px; font-size: .68rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: #3f3f46; } /* ══ FAN FAB ══ */ .fb06-fan-fab { position: relative; width: 62px; height: 62px; } /* main trigger */ .fb06-fan-trigger { position: relative; z-index: 10; width: 62px; height: 62px; border-radius: 50%; border: none; cursor: pointer; background: linear-gradient(135deg, #f97316, #ea580c); box-shadow: 0 6px 22px rgba(249,115,22,.45), inset 0 1px 0 rgba(255,255,255,.18); display: grid; place-items: center; transition: transform .25s cubic-bezier(.34,1.56,.64,1), box-shadow .2s; } .fb06-fan-trigger:hover { box-shadow: 0 10px 30px rgba(249,115,22,.6), inset 0 1px 0 rgba(255,255,255,.18); } .fb06-fan-trigger.fb06-open { transform: rotate(45deg); } .fb06-fan-trigger svg { width: 26px; height: 26px; fill: #fff; pointer-events: none; } /* action items */ .fb06-fan-item { position: absolute; bottom: 0; left: 50%; transform-origin: center 31px; /* half of 62px = pivot at btn center */ transition: transform .3s cubic-bezier(.34,1.56,.64,1), opacity .22s ease; opacity: 0; } /* closed: all stacked under trigger */ .fb06-fan-item.fb06-closed { transform: translateX(-50%) translateY(0) scale(.5); } /* open: spread via CSS custom properties set by JS */ .fb06-fan-item.fb06-open { opacity: 1; } .fb06-fan-btn { width: 50px; height: 50px; border-radius: 50%; border: none; cursor: pointer; display: grid; place-items: center; box-shadow: 0 4px 14px rgba(0,0,0,.5); transition: transform .15s ease; position: relative; transform: translateX(-50%); } .fb06-fan-btn:hover { transform: translateX(-50%) scale(1.15); } .fb06-fan-btn svg { width: 20px; height: 20px; fill: #fff; } /* label tooltip */ .fb06-fan-lbl { position: absolute; right: calc(100% + 10px); top: 50%; transform: translateY(-50%); background: #1f1f24; border: 1px solid #3f3f46; color: #a1a1aa; font-size: .72rem; font-weight: 600; padding: 4px 10px; border-radius: 6px; white-space: nowrap; pointer-events: none; opacity: 0; transition: opacity .15s ease; } .fb06-fan-btn:hover + .fb06-fan-lbl, .fb06-fan-btn:focus + .fb06-fan-lbl { opacity: 1; } /* color variants */ .fb06-fan-btn--a { background: linear-gradient(135deg, #6366f1, #8b5cf6); box-shadow: 0 4px 14px rgba(99,102,241,.5); } .fb06-fan-btn--b { background: linear-gradient(135deg, #06b6d4, #0ea5e9); box-shadow: 0 4px 14px rgba(6,182,212,.5); } .fb06-fan-btn--c { background: linear-gradient(135deg, #10b981, #059669); box-shadow: 0 4px 14px rgba(16,185,129,.5); } .fb06-fan-btn--d { background: linear-gradient(135deg, #f43f5e, #e11d48); box-shadow: 0 4px 14px rgba(244,63,94,.5); } .fb06-fan-btn--e { background: linear-gradient(135deg, #f59e0b, #d97706); box-shadow: 0 4px 14px rgba(245,158,11,.5); } /* ── Grid of demo variants ── */ .fb06-corner-well { position: relative; overflow: hidden; } .fb06-fan-fab--corner { position: absolute; bottom: 28px; right: 28px; } @media (prefers-reduced-motion: reduce) { .fb06-fan-item, .fb06-fan-trigger { transition: none; } } ``` **JS:** ```js document.querySelectorAll('.fb06-fan-fab').forEach(fab => { const arc = parseFloat(fab.dataset.arc); // total degrees const start = parseFloat(fab.dataset.start); // starting angle (deg) const radius = parseFloat(fab.dataset.radius); const items = Array.from(fab.querySelectorAll('.fb06-fan-item')); const trigger = fab.querySelector('.fb06-fan-trigger'); let isOpen = false; const count = items.length; function openFan() { items.forEach((item, i) => { const angleDeg = count > 1 ? start - (arc / (count - 1)) * i : start; const rad = angleDeg * Math.PI / 180; const x = Math.cos(rad) * radius; const y = Math.sin(rad) * radius; item.classList.remove('fb06-closed'); item.classList.add('fb06-open'); item.style.transitionDelay = (i * 0.04) + 's'; item.style.transform = `translateX(calc(-50% + ${x}px)) translateY(${-y}px) scale(1)`; }); } function closeFan() { items.forEach((item, i) => { item.classList.remove('fb06-open'); item.classList.add('fb06-closed'); item.style.transitionDelay = ((count - 1 - i) * 0.03) + 's'; item.style.transform = ''; }); } trigger.addEventListener('click', () => { isOpen = !isOpen; trigger.classList.toggle('fb06-open', isOpen); trigger.setAttribute('aria-expanded', isOpen); isOpen ? openFan() : closeFan(); }); }); ``` ### 07. Squircle FAB **Type:** Pure CSS **Description:** Apple-style squircle (superellipse) floating action button with clip-path, size scale variants, and iOS home screen simulation. **HTML:** ```html

    Squircle FAB — 2025 Design Trend

    Apple's superellipse icon shape applied to floating action buttons. The rounded square breaks from the ubiquitous circle while staying friendly and modern.

    Size scale — same shape
    Color variants — hover for tilt
    iOS-style home screen — squircle icons
    Messages
    Photos
    Maps
    Calendar
    Music
    Health
    Browser
    Settings
    ``` **CSS:** ```css .fb07, .fb07 *, .fb07 *::before, .fb07 *::after { box-sizing: border-box; margin: 0; padding: 0; } .fb07 { font-family: 'Inter', sans-serif; background: #f5f5f7; min-height: 100vh; display: grid; place-items: center; padding: 40px 20px; color: #1d1d1f; } .fb07-header { text-align: center; margin-bottom: 56px; } .fb07-header h1 { font-size: clamp(1.8rem, 6vw, 3rem); font-weight: 700; letter-spacing: -.03em; line-height: 1.1; color: #1d1d1f; } .fb07-header h1 em { font-style: italic; color: #6e6e73; } .fb07-header p { margin-top: 12px; color: #6e6e73; font-size: .95rem; max-width: 44ch; margin-inline: auto; line-height: 1.6; } /* ── squircle shape via clip-path (SVG superellipse) ── */ /* We approximate a squircle with a very high border-radius combined with aspect-ratio */ .fb07-sqfab { position: relative; border: none; cursor: pointer; display: grid; place-items: center; /* Squircle = border-radius ≈ 28-30% of size */ border-radius: 29%; /* The clip-path gives a tighter squircle than border-radius alone */ clip-path: path('M60 0 C88 0 120 32 120 60 C120 88 88 120 60 120 C32 120 0 88 0 60 C0 32 32 0 60 0Z'); width: 120px; height: 120px; outline: none; transition: transform .22s cubic-bezier(.34,1.56,.64,1), box-shadow .22s ease, filter .22s ease; } /* simpler squircle for smaller sizes using rounded rectangle with 28% radius */ .fb07-sqfab--sm { width: 52px; height: 52px; border-radius: 26%; clip-path: none; } .fb07-sqfab--md { width: 68px; height: 68px; border-radius: 27%; clip-path: none; } .fb07-sqfab--lg { width: 88px; height: 88px; border-radius: 28%; clip-path: none; } .fb07-sqfab--xl { width: 110px; height: 110px; border-radius: 29%; clip-path: none; } .fb07-sqfab--blue { background: linear-gradient(145deg, #007aff, #0055d4); box-shadow: 0 8px 28px rgba(0,122,255,.38), inset 0 1px 0 rgba(255,255,255,.22); } .fb07-sqfab--blue:hover { transform: scale(1.07) rotate(-3deg); box-shadow: 0 16px 40px rgba(0,122,255,.5), inset 0 1px 0 rgba(255,255,255,.22); filter: brightness(1.06); } .fb07-sqfab--blue:active { transform: scale(.96); } .fb07-sqfab--indigo { background: linear-gradient(145deg, #5856d6, #4240a8); box-shadow: 0 8px 28px rgba(88,86,214,.38), inset 0 1px 0 rgba(255,255,255,.2); } .fb07-sqfab--indigo:hover { transform: scale(1.07) rotate(3deg); box-shadow: 0 16px 40px rgba(88,86,214,.5), inset 0 1px 0 rgba(255,255,255,.22); } .fb07-sqfab--indigo:active { transform: scale(.96); } .fb07-sqfab--pink { background: linear-gradient(145deg, #ff375f, #d70015); box-shadow: 0 8px 28px rgba(255,55,95,.38), inset 0 1px 0 rgba(255,255,255,.2); } .fb07-sqfab--pink:hover { transform: scale(1.07) rotate(-3deg); box-shadow: 0 16px 40px rgba(255,55,95,.5), inset 0 1px 0 rgba(255,255,255,.22); } .fb07-sqfab--pink:active { transform: scale(.96); } .fb07-sqfab--green { background: linear-gradient(145deg, #34c759, #248a3d); box-shadow: 0 8px 28px rgba(52,199,89,.38), inset 0 1px 0 rgba(255,255,255,.2); } .fb07-sqfab--green:hover { transform: scale(1.07) rotate(3deg); box-shadow: 0 16px 40px rgba(52,199,89,.5), inset 0 1px 0 rgba(255,255,255,.22); } .fb07-sqfab--green:active { transform: scale(.96); } .fb07-sqfab--dark { background: linear-gradient(145deg, #3a3a3c, #1c1c1e); box-shadow: 0 8px 28px rgba(0,0,0,.4), inset 0 1px 0 rgba(255,255,255,.12); } .fb07-sqfab--dark:hover { transform: scale(1.07); box-shadow: 0 16px 40px rgba(0,0,0,.55), inset 0 1px 0 rgba(255,255,255,.14); } .fb07-sqfab--dark:active { transform: scale(.96); } .fb07-sqfab--glass { background: rgba(255,255,255,.65); backdrop-filter: blur(14px) saturate(180%); border: 1px solid rgba(255,255,255,.8); box-shadow: 0 8px 28px rgba(0,0,0,.1), inset 0 1px 0 rgba(255,255,255,.9); } .fb07-sqfab--glass:hover { transform: scale(1.07); box-shadow: 0 16px 40px rgba(0,0,0,.15), inset 0 1px 0 rgba(255,255,255,.9); } .fb07-sqfab svg { fill: #fff; pointer-events: none; } .fb07-sqfab--glass svg { fill: #1d1d1f; } /* gloss highlight on larger buttons */ .fb07-sqfab--xl::after, .fb07-sqfab--lg::after { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 46%; border-radius: inherit; background: linear-gradient(180deg, rgba(255,255,255,.22), rgba(255,255,255,0)); pointer-events: none; } /* ── layout ── */ .fb07-scene { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; width: min(860px, 100%); } .fb07-panel { background: #fff; border-radius: 22px; padding: 36px; display: flex; flex-direction: column; gap: 24px; box-shadow: 0 2px 20px rgba(0,0,0,.07); } .fb07-panel-title { font-size: .72rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: #aeaeb2; } .fb07-icon-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; justify-items: center; } .fb07-btn-row { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; } /* iOS-style home screen simulation */ .fb07-ios-screen { background: linear-gradient(145deg, #1a3a8f, #6b21a8); border-radius: 22px; padding: 28px 20px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; justify-items: center; } .fb07-app-icon-wrap { display: flex; flex-direction: column; align-items: center; gap: 7px; } .fb07-app-name { font-size: .65rem; color: rgba(255,255,255,.85); text-align: center; line-height: 1.2; } @media (max-width: 680px) { .fb07-scene { grid-template-columns: 1fr; } } @media (prefers-reduced-motion: reduce) { .fb07-sqfab { transition: none; } } ``` ### 08. Social Share FAB **Type:** CSS + JS **Description:** Floating social share button cluster for X, Facebook, LinkedIn, WhatsApp, and copy link with animated reveal. **HTML:** ```html
    CSS Design

    Building a Floating Share Button Cluster — Pure CSS

    A stacked share FAB that reveals Twitter/X, Facebook, LinkedIn, WhatsApp and copy-link buttons on click. Checkbox-hack driven with staggered spring transitions and branded icon buttons. Click the purple button →

    CodeFronts 5 min read 2,400 shares
    Share on X
    Share on Facebook
    Share on LinkedIn
    Share on WhatsApp
    Copy link
    ↑ Share
    ``` **CSS:** ```css .fb08, .fb08 *, .fb08 *::before, .fb08 *::after { box-sizing: border-box; margin: 0; padding: 0; } .fb08 { font-family: 'DM Sans', sans-serif; background: #111827; min-height: 100vh; display: grid; place-items: center; padding: 40px 20px; color: #f3f4f6; } /* article card mock */ .fb08-article { width: min(660px, 100%); background: #1f2937; border: 1px solid #374151; border-radius: 20px; overflow: hidden; position: relative; } .fb08-art-cover { height: 220px; background: linear-gradient(135deg, #1e3a5f, #2d6a9f, #3b82f6); display: flex; align-items: flex-end; padding: 20px 24px; position: relative; overflow: hidden; } .fb08-art-cover::before { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse 70% 60% at 30% 30%, rgba(255,255,255,.08), transparent); } .fb08-art-tag { background: rgba(59,130,246,.85); color: #fff; font-size: .72rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; padding: 5px 12px; border-radius: 6px; backdrop-filter: blur(8px); position: relative; z-index: 1; } .fb08-art-body { padding: 28px 28px 32px; } .fb08-art-body h2 { font-size: clamp(1.3rem, 3vw, 1.8rem); font-weight: 700; line-height: 1.3; margin-bottom: 12px; letter-spacing: -.01em; } .fb08-art-body p { color: #9ca3af; font-size: .9rem; line-height: 1.65; margin-bottom: 20px; } .fb08-art-meta { display: flex; align-items: center; gap: 14px; font-size: .78rem; color: #6b7280; } .fb08-art-meta strong { color: #d1d5db; } .fb08-art-meta span::before { content: '·'; margin-right: 14px; } /* ── SHARE FAB cluster ── */ .fb08-share-root { position: absolute; bottom: 24px; right: 24px; z-index: 30; } /* hidden checkbox */ .fb08-sh-check { position: absolute; opacity: 0; pointer-events: none; width: 0; height: 0; } /* social items */ .fb08-sh-items { position: absolute; bottom: 0; right: 0; pointer-events: none; } .fb08-sh-item { position: absolute; bottom: 0; right: 0; display: flex; align-items: center; gap: 8px; opacity: 0; transition: opacity .25s ease, transform .3s cubic-bezier(.34,1.56,.64,1); pointer-events: none; } .fb08-sh-lbl { font-size: .75rem; font-weight: 600; color: #f3f4f6; background: rgba(0,0,0,.6); backdrop-filter: blur(8px); padding: 4px 10px; border-radius: 6px; white-space: nowrap; opacity: 0; transform: translateX(6px); transition: opacity .18s ease, transform .18s ease; } .fb08-sh-btn { width: 46px; height: 46px; border-radius: 50%; border: none; cursor: pointer; display: grid; place-items: center; box-shadow: 0 4px 16px rgba(0,0,0,.45); transition: transform .15s ease; flex-shrink: 0; } .fb08-sh-btn:hover { transform: scale(1.12); } .fb08-sh-btn:hover ~ .fb08-sh-lbl { opacity: 1; transform: none; } .fb08-sh-btn svg { width: 20px; height: 20px; fill: #fff; } /* brand colors */ .fb08-sh-btn--x { background: #000; } .fb08-sh-btn--fb { background: #1877f2; } .fb08-sh-btn--li { background: #0a66c2; } .fb08-sh-btn--wa { background: #25d366; } .fb08-sh-btn--link { background: #374151; } /* open state: stagger upward */ .fb08-sh-check:checked ~ .fb08-sh-items { pointer-events: auto; } .fb08-sh-check:checked ~ .fb08-sh-items .fb08-sh-item:nth-child(1) { opacity: 1; pointer-events: auto; transform: translateY(-58px); transition-delay: 0s; } .fb08-sh-check:checked ~ .fb08-sh-items .fb08-sh-item:nth-child(2) { opacity: 1; pointer-events: auto; transform: translateY(-112px); transition-delay: .05s; } .fb08-sh-check:checked ~ .fb08-sh-items .fb08-sh-item:nth-child(3) { opacity: 1; pointer-events: auto; transform: translateY(-166px); transition-delay: .10s; } .fb08-sh-check:checked ~ .fb08-sh-items .fb08-sh-item:nth-child(4) { opacity: 1; pointer-events: auto; transform: translateY(-220px); transition-delay: .15s; } .fb08-sh-check:checked ~ .fb08-sh-items .fb08-sh-item:nth-child(5) { opacity: 1; pointer-events: auto; transform: translateY(-274px); transition-delay: .20s; } /* main share trigger */ .fb08-sh-trigger { position: relative; z-index: 10; width: 52px; height: 52px; border-radius: 50%; cursor: pointer; display: grid; place-items: center; border: none; background: linear-gradient(135deg, #6366f1, #8b5cf6); box-shadow: 0 6px 22px rgba(99,102,241,.5), inset 0 1px 0 rgba(255,255,255,.18); transition: transform .25s cubic-bezier(.34,1.56,.64,1), box-shadow .2s; } .fb08-sh-trigger:hover { transform: scale(1.08); box-shadow: 0 10px 30px rgba(99,102,241,.65), inset 0 1px 0 rgba(255,255,255,.2); } .fb08-sh-trigger svg { width: 22px; height: 22px; fill: #fff; transition: transform .28s cubic-bezier(.34,1.56,.64,1); } .fb08-sh-check:checked ~ .fb08-sh-trigger { transform: rotate(45deg); box-shadow: 0 8px 24px rgba(99,102,241,.5); } /* count bubble */ .fb08-sh-count { position: absolute; top: 0; left: 0; background: #1f2937; border: 2px solid #374151; border-radius: 20px; padding: 3px 10px; font-size: .72rem; font-weight: 700; color: #9ca3af; white-space: nowrap; transform: translateX(calc(-100% - 10px)) translateY(50%); bottom: auto; top: 50%; opacity: 0; pointer-events: none; transition: opacity .22s ease .25s; } .fb08-sh-check:checked ~ .fb08-sh-count { opacity: 1; } @media (prefers-reduced-motion: reduce) { .fb08-sh-item, .fb08-sh-trigger, .fb08-sh-btn { transition: none; } } ``` **JS:** ```js document.getElementById('fb08-copy-btn').addEventListener('click', () => { navigator.clipboard?.writeText(location.href).catch(()=>{}); const btn = document.getElementById('fb08-copy-btn'); btn.style.background = '#10b981'; setTimeout(() => { btn.style.background = ''; }, 1500); }); ``` ### 09. Glassmorphism FAB **Type:** Pure CSS **Description:** Glassmorphism floating action button with backdrop-filter blur, tinted color variants, animated background blobs, and pill shape. **HTML:** ```html

    Glassmorphism FAB

    Frosted glass floating action buttons — backdrop-filter blur with layered inset highlights, tinted variants and pill forms on a vivid gradient backdrop.

    Clear glass
    Blue tint
    Rose tint
    Cyan square
    Blue square
    Clear square
    ``` **CSS:** ```css .fb09, .fb09 *, .fb09 *::before, .fb09 *::after { box-sizing: border-box; margin: 0; padding: 0; } .fb09 { font-family: 'Inter', sans-serif; min-height: 100vh; display: grid; place-items: center; padding: 40px 20px; /* rich gradient background so glass blur is visible */ background: radial-gradient(ellipse 70% 55% at 25% 20%, #4f46e5, transparent), radial-gradient(ellipse 60% 50% at 75% 80%, #ec4899, transparent), radial-gradient(ellipse 60% 60% at 75% 20%, #0ea5e9, transparent), #0f0a1e; color: #fff; position: relative; overflow: hidden; } /* decorative blobs behind everything */ .fb09-blob { position: absolute; border-radius: 50%; filter: blur(60px); pointer-events: none; animation: fb09-float-blob 8s ease-in-out infinite; } .fb09-blob--a { width: 340px; height: 340px; background: rgba(99,102,241,.35); top: -80px; left: -80px; animation-delay: 0s; } .fb09-blob--b { width: 280px; height: 280px; background: rgba(236,72,153,.3); bottom: -60px; right: -60px; animation-delay: -4s; } .fb09-blob--c { width: 220px; height: 220px; background: rgba(14,165,233,.25); top: 40%; left: 60%; animation-delay: -2s; } @keyframes fb09-float-blob { 0%,100% { transform: translate(0,0); } 50% { transform: translate(20px, 15px); } } h1 { font-size: clamp(1.6rem, 5vw, 2.6rem); font-weight: 700; text-align: center; letter-spacing: -.025em; margin-bottom: 10px; position: relative; z-index: 2; } p.fb09-sub { text-align: center; color: rgba(255,255,255,.55); font-size: .9rem; max-width: 44ch; margin: 0 auto 52px; line-height: 1.6; position: relative; z-index: 2; } /* ── GLASS FAB mixins ── */ .fb09-glass-fab { border: none; cursor: pointer; display: grid; place-items: center; position: relative; outline: none; /* glass core */ background: rgba(255,255,255,.12); backdrop-filter: blur(18px) saturate(180%); -webkit-backdrop-filter: blur(18px) saturate(180%); border: 1px solid rgba(255,255,255,.22); box-shadow: 0 8px 32px rgba(0,0,0,.3), inset 0 1px 0 rgba(255,255,255,.35), inset 0 -1px 0 rgba(255,255,255,.08); transition: transform .22s cubic-bezier(.34,1.56,.64,1), box-shadow .22s ease, background .22s ease; } .fb09-glass-fab:hover { background: rgba(255,255,255,.18); transform: scale(1.08) translateY(-2px); box-shadow: 0 16px 48px rgba(0,0,0,.4), inset 0 1px 0 rgba(255,255,255,.4), inset 0 -1px 0 rgba(255,255,255,.1); } .fb09-glass-fab:active { transform: scale(.97); box-shadow: 0 4px 16px rgba(0,0,0,.3), inset 0 1px 0 rgba(255,255,255,.3); } .fb09-glass-fab::after { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 48%; background: linear-gradient(180deg, rgba(255,255,255,.22), transparent); pointer-events: none; border-radius: inherit; } .fb09-glass-fab svg { fill: #fff; position: relative; z-index: 1; } /* circle */ .fb09-glass-fab--circle { width: 64px; height: 64px; border-radius: 50%; } .fb09-glass-fab--circle::after { border-radius: 50% 50% 0 0; } .fb09-glass-fab--circle svg { width: 26px; height: 26px; } /* pill */ .fb09-glass-fab--pill { height: 54px; padding: 0 28px; border-radius: 27px; gap: 10px; display: flex; align-items: center; font-family: 'Inter', sans-serif; font-size: .9rem; font-weight: 600; color: #fff; letter-spacing: .01em; } .fb09-glass-fab--pill::after { border-radius: 27px 27px 0 0; } .fb09-glass-fab--pill svg { width: 20px; height: 20px; } /* square */ .fb09-glass-fab--sq { width: 64px; height: 64px; border-radius: 18px; } .fb09-glass-fab--sq::after { border-radius: 18px 18px 0 0; } .fb09-glass-fab--sq svg { width: 26px; height: 26px; } /* tinted variants */ .fb09-glass-fab--blue { background: rgba(99,102,241,.28); border-color: rgba(129,140,248,.4); box-shadow: 0 8px 32px rgba(99,102,241,.35), inset 0 1px 0 rgba(255,255,255,.3), inset 0 -1px 0 rgba(255,255,255,.06); } .fb09-glass-fab--blue:hover { background: rgba(99,102,241,.4); box-shadow: 0 16px 48px rgba(99,102,241,.5), inset 0 1px 0 rgba(255,255,255,.35); } .fb09-glass-fab--rose { background: rgba(236,72,153,.28); border-color: rgba(251,113,133,.4); box-shadow: 0 8px 32px rgba(236,72,153,.35), inset 0 1px 0 rgba(255,255,255,.3), inset 0 -1px 0 rgba(255,255,255,.06); } .fb09-glass-fab--rose:hover { background: rgba(236,72,153,.42); box-shadow: 0 16px 48px rgba(236,72,153,.5), inset 0 1px 0 rgba(255,255,255,.35); } .fb09-glass-fab--cyan { background: rgba(6,182,212,.25); border-color: rgba(34,211,238,.4); box-shadow: 0 8px 32px rgba(6,182,212,.35), inset 0 1px 0 rgba(255,255,255,.3), inset 0 -1px 0 rgba(255,255,255,.06); } .fb09-glass-fab--cyan:hover { background: rgba(6,182,212,.4); box-shadow: 0 16px 48px rgba(6,182,212,.5), inset 0 1px 0 rgba(255,255,255,.35); } /* ── layout ── */ .fb09-scene { position: relative; z-index: 2; width: min(760px, 100%); } .fb09-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-bottom: 24px; } .fb09-card { background: rgba(255,255,255,.06); backdrop-filter: blur(12px); border: 1px solid rgba(255,255,255,.12); border-radius: 20px; padding: 28px 24px; display: flex; flex-direction: column; align-items: center; gap: 16px; } .fb09-card-lbl { font-size: .68rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: rgba(255,255,255,.4); } .fb09-pill-row { background: rgba(255,255,255,.06); backdrop-filter: blur(12px); border: 1px solid rgba(255,255,255,.12); border-radius: 20px; padding: 28px 24px; display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; align-items: center; } @media (max-width: 560px) { .fb09-grid { grid-template-columns: 1fr 1fr; } } @media (prefers-reduced-motion: reduce) { .fb09-blob { animation: none; } .fb09-glass-fab { transition: none; } } ``` ### 10. Neon Glow FAB **Type:** Pure CSS **Description:** Neon glow floating button for dark cyberpunk UIs with animated border glow, scan-line overlay, and Orbitron display font. **HTML:** ```html

    Neon Glow FAB

    Cyberpunk dark UI floating action buttons — border glow, pulsing ring, fill and outline variants. Hover to intensify.

    Outline glow
    Filled · extended pill
    ``` **CSS:** ```css .fb10, .fb10 *, .fb10 *::before, .fb10 *::after { box-sizing: border-box; margin: 0; padding: 0; } .fb10 { font-family: 'Rajdhani', sans-serif; background: #050508; min-height: 100vh; display: grid; place-items: center; padding: 40px 20px; color: #c4c4c8; position: relative; overflow: hidden; } /* grid lines */ .fb10::before { content: ''; position: fixed; inset: 0; background-image: linear-gradient(rgba(255,255,255,.02) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.02) 1px, transparent 1px); background-size: 40px 40px; pointer-events: none; } h1 { font-family: 'Orbitron', monospace; font-size: clamp(1.4rem, 4vw, 2.2rem); font-weight: 700; text-align: center; letter-spacing: .05em; text-transform: uppercase; color: #fff; text-shadow: 0 0 20px rgba(99,102,241,.8), 0 0 60px rgba(99,102,241,.4); margin-bottom: 10px; position: relative; z-index: 2; } p.fb10-sub { text-align: center; color: rgba(196,196,200,.5); font-size: .92rem; max-width: 44ch; margin: 0 auto 52px; line-height: 1.6; z-index: 2; position: relative; } /* ── NEON FAB base ── */ .fb10-nfab { position: relative; border: none; cursor: pointer; display: grid; place-items: center; outline: none; background: transparent; transition: transform .2s cubic-bezier(.34,1.56,.64,1), box-shadow .2s ease, filter .2s ease; } /* neon circle */ .fb10-nfab--circle { width: 66px; height: 66px; border-radius: 50%; } .fb10-nfab--circle svg { width: 26px; height: 26px; position: relative; z-index: 1; } /* solid dark core + colored border + glow */ .fb10-nfab--violet { background: #0e0c1a; border: 2px solid #7c3aed; box-shadow: 0 0 16px rgba(124,58,237,.6), 0 0 40px rgba(124,58,237,.25), inset 0 0 14px rgba(124,58,237,.12); color: #c4b5fd; } .fb10-nfab--violet svg { fill: #c4b5fd; } .fb10-nfab--violet:hover { transform: scale(1.1); box-shadow: 0 0 28px rgba(124,58,237,1), 0 0 70px rgba(124,58,237,.5), inset 0 0 20px rgba(124,58,237,.2); filter: brightness(1.15); } .fb10-nfab--cyan { background: #021218; border: 2px solid #06b6d4; box-shadow: 0 0 16px rgba(6,182,212,.6), 0 0 40px rgba(6,182,212,.25), inset 0 0 14px rgba(6,182,212,.12); color: #67e8f9; } .fb10-nfab--cyan svg { fill: #67e8f9; } .fb10-nfab--cyan:hover { transform: scale(1.1); box-shadow: 0 0 28px rgba(6,182,212,1), 0 0 70px rgba(6,182,212,.5), inset 0 0 20px rgba(6,182,212,.2); filter: brightness(1.15); } .fb10-nfab--magenta { background: #180812; border: 2px solid #d946ef; box-shadow: 0 0 16px rgba(217,70,239,.6), 0 0 40px rgba(217,70,239,.25), inset 0 0 14px rgba(217,70,239,.12); color: #f0abfc; } .fb10-nfab--magenta svg { fill: #f0abfc; } .fb10-nfab--magenta:hover { transform: scale(1.1); box-shadow: 0 0 28px rgba(217,70,239,1), 0 0 70px rgba(217,70,239,.5), inset 0 0 20px rgba(217,70,239,.2); filter: brightness(1.15); } .fb10-nfab--green { background: #041208; border: 2px solid #22c55e; box-shadow: 0 0 16px rgba(34,197,94,.6), 0 0 40px rgba(34,197,94,.25), inset 0 0 14px rgba(34,197,94,.12); color: #86efac; } .fb10-nfab--green svg { fill: #86efac; } .fb10-nfab--green:hover { transform: scale(1.1); box-shadow: 0 0 28px rgba(34,197,94,1), 0 0 70px rgba(34,197,94,.5), inset 0 0 20px rgba(34,197,94,.2); filter: brightness(1.15); } .fb10-nfab--amber { background: #140e02; border: 2px solid #f59e0b; box-shadow: 0 0 16px rgba(245,158,11,.6), 0 0 40px rgba(245,158,11,.25), inset 0 0 14px rgba(245,158,11,.12); color: #fcd34d; } .fb10-nfab--amber svg { fill: #fcd34d; } .fb10-nfab--amber:hover { transform: scale(1.1); box-shadow: 0 0 28px rgba(245,158,11,1), 0 0 70px rgba(245,158,11,.5), inset 0 0 20px rgba(245,158,11,.2); filter: brightness(1.15); } /* pulse animation ring */ .fb10-nfab::before { content: ''; position: absolute; inset: -8px; border-radius: inherit; border: 1.5px solid currentColor; opacity: 0; animation: fb10-neon-pulse 2.8s ease-out infinite; } @keyframes fb10-neon-pulse { 0% { transform: scale(.88); opacity: .6; } 70% { transform: scale(1.22); opacity: 0; } 100% { transform: scale(1.22); opacity: 0; } } /* filled neon variants */ .fb10-nfab--filled-violet { background: linear-gradient(135deg, #7c3aed, #5b21b6); border: none; box-shadow: 0 0 24px rgba(124,58,237,.7), 0 0 60px rgba(124,58,237,.3), inset 0 1px 0 rgba(255,255,255,.15); } .fb10-nfab--filled-violet svg { fill: #fff; } .fb10-nfab--filled-violet:hover { transform: scale(1.1); box-shadow: 0 0 40px rgba(124,58,237,1), 0 0 90px rgba(124,58,237,.5), inset 0 1px 0 rgba(255,255,255,.2); } /* extended neon pill */ .fb10-nfab--pill { width: auto; height: 54px; padding: 0 26px; border-radius: 27px; gap: 10px; display: flex; align-items: center; font-family: 'Orbitron', monospace; font-size: .72rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; } .fb10-nfab--pill svg { width: 18px; height: 18px; } /* scanning line animation on hover */ .fb10-nfab--scanline::after { content: ''; position: absolute; left: -100%; top: 0; width: 60%; height: 100%; background: linear-gradient(90deg, transparent, rgba(255,255,255,.15), transparent); border-radius: inherit; transform: skewX(-15deg); transition: left 0s; } .fb10-nfab--scanline:hover::after { left: 160%; transition: left .5s ease; } /* ── layout ── */ .fb10-scene { position: relative; z-index: 2; width: min(760px, 100%); } .fb10-cluster { display: flex; flex-wrap: wrap; gap: 28px; justify-content: center; align-items: center; background: rgba(255,255,255,.02); border: 1px solid rgba(255,255,255,.06); border-radius: 24px; padding: 40px 32px; margin-bottom: 24px; } .fb10-cluster-title { width: 100%; text-align: center; font-family: 'Orbitron', monospace; font-size: .62rem; letter-spacing: .2em; text-transform: uppercase; color: rgba(196,196,200,.3); margin-bottom: 8px; } @media (prefers-reduced-motion: reduce) { .fb10-nfab, .fb10-nfab::before { animation: none; transition: none; } .fb10-nfab--scanline::after { display: none; } } ``` ### 11. Compose + Tooltip FAB **Type:** Pure CSS **Description:** Floating compose button with 3 tooltip styles: left hover tooltip, bottom fade tooltip, and slide-extend label. **HTML:** ```html

    Floating Compose Button

    Three label tooltip styles — hover reveal, bottom fade, and slide-extend. Each pattern for a different layout context.

    Inbox

    3 unread
    A
    Alex Chen
    Re: Q3 design system updates
    Here are the final tokens and component specs...
    9:41 AM
    M
    Mia Torres
    Figma handoff is ready
    I've published all the frames, you can access the...
    8:15 AM
    S
    Sam Rivera
    Can we ship the FAB by Friday?
    The client loved the tooltip direction, just wants...
    Yesterday
    J
    Jordan Kim
    Weekly standup notes
    Attached are the notes from today's call. Key...
    Mon
    L
    Lisa Park
    Invoice #2047 approved
    Payment will be processed within 5 business days...
    Sun
    Compose email
    New post

    Bottom label

    Compose

    Slide extend ← hover

    ``` **CSS:** ```css .fb11, .fb11 *, .fb11 *::before, .fb11 *::after { box-sizing: border-box; margin: 0; padding: 0; } .fb11 { font-family: 'Inter', sans-serif; background: #f9fafb; min-height: 100vh; display: grid; place-items: center; padding: 40px 20px; color: #111827; } h1 { font-size: clamp(1.6rem,5vw,2.4rem); font-weight: 700; text-align: center; letter-spacing: -.02em; margin-bottom: 8px; } p.fb11-sub { text-align: center; color: #6b7280; font-size: .9rem; max-width: 44ch; margin: 0 auto 52px; line-height: 1.6; } /* ── email app mockup ── */ .fb11-inbox { width: min(700px, 100%); background: #fff; border: 1px solid #e5e7eb; border-radius: 20px; overflow: hidden; box-shadow: 0 4px 32px rgba(0,0,0,.07); position: relative; min-height: 500px; } .fb11-inbox-header { background: #fff; border-bottom: 1px solid #f3f4f6; padding: 18px 24px; display: flex; align-items: center; justify-content: space-between; } .fb11-inbox-header h2 { font-size: 1.1rem; font-weight: 700; color: #111827; } .fb11-inbox-header span { font-size: .78rem; color: #9ca3af; } .fb11-mail-item { display: flex; align-items: center; gap: 14px; padding: 16px 24px; border-bottom: 1px solid #f9fafb; cursor: pointer; transition: background .12s; } .fb11-mail-item:hover { background: #f9fafb; } .fb11-mail-item.fb11-unread { background: #f0f9ff; border-left: 3px solid #3b82f6; padding-left: 21px; } .fb11-mail-avatar { width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center; font-weight: 700; font-size: .9rem; color: #fff; } .fb11-av--a { background: linear-gradient(135deg,#6366f1,#8b5cf6); } .fb11-av--b { background: linear-gradient(135deg,#06b6d4,#0ea5e9); } .fb11-av--c { background: linear-gradient(135deg,#10b981,#059669); } .fb11-av--d { background: linear-gradient(135deg,#f59e0b,#d97706); } .fb11-av--e { background: linear-gradient(135deg,#f43f5e,#e11d48); } .fb11-mail-info { flex: 1; min-width: 0; } .fb11-mail-from { font-size: .86rem; font-weight: 600; color: #111827; } .fb11-mail-subject { font-size: .82rem; color: #374151; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .fb11-mail-preview { font-size: .78rem; color: #9ca3af; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .fb11-mail-time { font-size: .72rem; color: #9ca3af; flex-shrink: 0; } .fb11-unread .fb11-mail-from, .fb11-unread .fb11-mail-subject { color: #1f2937; font-weight: 700; } /* ═══════════════════════════ FAB COMPOSE BUTTON VARIANTS ═══════════════════════════ */ /* ── 1: Tooltip on hover (left side) ── */ .fb11-fab-wrap { position: absolute; bottom: 28px; right: 28px; display: flex; align-items: center; gap: 0; } .fb11-fab-tooltip { background: #111827; color: #fff; font-size: .78rem; font-weight: 600; padding: 7px 14px; border-radius: 8px; white-space: nowrap; pointer-events: none; opacity: 0; transform: translateX(8px); transition: opacity .2s ease, transform .2s ease; position: absolute; right: calc(100% + 12px); /* arrow */ } .fb11-fab-tooltip::after { content: ''; position: absolute; left: 100%; top: 50%; transform: translateY(-50%); border: 5px solid transparent; border-left-color: #111827; } .fb11-fab-compose { width: 58px; height: 58px; border-radius: 50%; border: none; cursor: pointer; display: grid; place-items: center; background: linear-gradient(135deg, #3b82f6, #1d4ed8); box-shadow: 0 6px 22px rgba(59,130,246,.4), inset 0 1px 0 rgba(255,255,255,.2); transition: transform .22s cubic-bezier(.34,1.56,.64,1), box-shadow .22s ease; position: relative; z-index: 2; } .fb11-fab-compose:hover { transform: scale(1.1); box-shadow: 0 10px 32px rgba(59,130,246,.6), inset 0 1px 0 rgba(255,255,255,.2); } .fb11-fab-compose:hover + .fb11-fab-tooltip, .fb11-fab-compose:focus + .fb11-fab-tooltip { opacity: 1; transform: none; } .fb11-fab-compose svg { width: 24px; height: 24px; fill: #fff; } /* ── 2: Bottom label that fades in ── */ .fb11-fab-wrap--bottom { flex-direction: column; gap: 8px; align-items: center; } .fb11-fab-lbl-bottom { font-size: .7rem; font-weight: 600; letter-spacing: .05em; color: #6b7280; opacity: 0; transform: translateY(-4px); transition: opacity .2s ease, transform .2s ease; pointer-events: none; order: 2; } .fb11-fab-compose--b { order: 1; } .fb11-fab-compose--b:hover ~ .fb11-fab-lbl-bottom, .fb11-fab-compose--b:focus ~ .fb11-fab-lbl-bottom { opacity: 1; transform: none; } /* ── 3: Slide-in extended label ── */ .fb11-fab-wrap--slide { flex-direction: row-reverse; align-items: center; gap: 0; } .fb11-fab-slide-lbl { font-size: .88rem; font-weight: 600; color: #fff; background: #1d4ed8; border-radius: 30px 0 0 30px; padding: 0 20px 0 18px; height: 58px; display: flex; align-items: center; max-width: 0; overflow: hidden; white-space: nowrap; opacity: 0; transition: max-width .3s ease, opacity .25s ease, padding .3s ease; pointer-events: none; } .fb11-fab-compose--slide { border-radius: 50%; z-index: 2; flex-shrink: 0; } .fb11-fab-compose--slide:hover { border-radius: 0 30px 30px 0; } .fb11-fab-compose--slide:hover + .fb11-fab-slide-lbl, .fb11-fab-compose--slide:focus + .fb11-fab-slide-lbl { max-width: 140px; opacity: 1; } /* ── app corner badges ── */ .fb11-badge { position: absolute; top: -5px; right: -5px; width: 18px; height: 18px; border-radius: 50%; background: #ef4444; color: #fff; font-size: .6rem; font-weight: 700; display: grid; place-items: center; border: 2px solid #fff; } @media (prefers-reduced-motion: reduce) { .fb11-fab-compose, .fb11-fab-tooltip, .fb11-fab-lbl-bottom, .fb11-fab-slide-lbl { transition: none; } } ``` ### 12. Draggable FAB **Type:** CSS + JS **Description:** Fully draggable floating action button with corner snapping, touch and mouse support, particle trail effect, and position indicator. **HTML:** ```html
    TL
    TR
    BL
    BR

    Draggable
    Floating Button

    Grab the indigo FAB and drag it anywhere on screen. It snaps to the nearest corner when released. Touch and mouse supported.

    Drag anywhere on screen
    🎯
    Snaps to nearest corner
    📱
    Touch & mouse support
    ``` **CSS:** ```css .fb12, .fb12 *, .fb12 *::before, .fb12 *::after { box-sizing: border-box; margin: 0; padding: 0; } .fb12 { font-family: 'Inter', sans-serif; background: #f1f5f9; min-height: 100vh; overflow: hidden; color: #334155; display: grid; place-items: center; position: relative; } /* ── page mockup ── */ .fb12-page-mock { width: min(720px, 100%); padding: 32px 24px; text-align: center; } .fb12-page-mock h1 { font-size: clamp(1.8rem, 5vw, 2.6rem); font-weight: 700; letter-spacing: -.025em; color: #0f172a; margin-bottom: 14px; } .fb12-page-mock p { color: #64748b; font-size: .95rem; line-height: 1.65; max-width: 46ch; margin: 0 auto 32px; } .fb12-hint-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; max-width: 480px; margin: 0 auto; } .fb12-hint-card { background: #fff; border: 1px solid #e2e8f0; border-radius: 14px; padding: 16px 12px; text-align: center; box-shadow: 0 1px 4px rgba(0,0,0,.05); } .fb12-hint-card .fb12-icon { font-size: 1.6rem; margin-bottom: 8px; } .fb12-hint-card span { font-size: .76rem; color: #64748b; font-weight: 500; display: block; } /* ── DRAGGABLE FAB ── */ #fb12-drag-fab { position: fixed; bottom: 32px; right: 32px; z-index: 1000; touch-action: none; user-select: none; cursor: grab; } #fb12-drag-fab.fb12-dragging { cursor: grabbing; } .fb12-drag-btn { width: 64px; height: 64px; border-radius: 50%; background: linear-gradient(135deg, #6366f1, #4f46e5); border: none; display: grid; place-items: center; box-shadow: 0 8px 28px rgba(99,102,241,.45), inset 0 1px 0 rgba(255,255,255,.2); transition: transform .18s cubic-bezier(.34,1.56,.64,1), box-shadow .18s ease; pointer-events: none; position: relative; } #fb12-drag-fab:not(.fb12-dragging):hover .fb12-drag-btn { transform: scale(1.08); box-shadow: 0 12px 36px rgba(99,102,241,.6), inset 0 1px 0 rgba(255,255,255,.2); } #fb12-drag-fab.fb12-dragging .fb12-drag-btn { transform: scale(1.12); box-shadow: 0 18px 48px rgba(99,102,241,.55), 0 4px 8px rgba(0,0,0,.2), inset 0 1px 0 rgba(255,255,255,.2); cursor: grabbing; } .fb12-drag-btn svg { width: 26px; height: 26px; fill: #fff; pointer-events: none; } /* drag handle dots */ .fb12-drag-btn::before { content: '⋮⋮'; position: absolute; top: -5px; left: 50%; transform: translateX(-50%); font-size: .6rem; color: rgba(255,255,255,.5); letter-spacing: 2px; pointer-events: none; } /* ripple trail */ .fb12-trail { position: fixed; width: 12px; height: 12px; border-radius: 50%; background: rgba(99,102,241,.35); pointer-events: none; transform: translate(-50%,-50%); animation: fb12-trail-fade .6s ease-out forwards; z-index: 999; } @keyframes fb12-trail-fade { 0% { transform: translate(-50%,-50%) scale(1); opacity: .5; } 100% { transform: translate(-50%,-50%) scale(.1); opacity: 0; } } /* position indicator */ #fb12-pos-label { position: fixed; top: 16px; left: 50%; transform: translateX(-50%); background: rgba(15,23,42,.85); backdrop-filter: blur(8px); color: rgba(255,255,255,.7); font-size: .72rem; font-weight: 600; letter-spacing: .04em; padding: 7px 16px; border-radius: 20px; z-index: 1001; font-family: monospace; opacity: 0; transition: opacity .2s; } #fb12-pos-label.fb12-visible { opacity: 1; } /* snap zones hint (corners) */ .fb12-snap-zone { position: fixed; width: 80px; height: 80px; border: 2px dashed rgba(99,102,241,.2); border-radius: 50%; pointer-events: none; z-index: 998; display: flex; align-items: center; justify-content: center; font-size: .6rem; color: rgba(99,102,241,.3); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; transition: border-color .2s, color .2s; } .fb12-snap-zone.fb12-active { border-color: rgba(99,102,241,.6); color: rgba(99,102,241,.7); } #fb12-sz-tl { top: 16px; left: 16px; } #fb12-sz-tr { top: 16px; right: 16px; } #fb12-sz-bl { bottom: 16px; left: 16px; } #fb12-sz-br { bottom: 16px; right: 16px; } @media (prefers-reduced-motion: reduce) { .fb12-drag-btn { transition: none; } .fb12-trail { animation: none; } } ``` **JS:** ```js (function() { const fab = document.getElementById('fb12-drag-fab'); const posLabel = document.getElementById('fb12-pos-label'); const SNAP = 24; // px from edge const TRAIL = window.matchMedia('(prefers-reduced-motion: reduce)').matches; let isDragging = false, startX, startY, fabX, fabY, lastMoveX, lastMoveY; // Set initial position fabX = window.innerWidth - fab.offsetWidth - 32; fabY = window.innerHeight - fab.offsetHeight - 32; setPos(fabX, fabY); function setPos(x, y) { x = Math.max(SNAP, Math.min(x, window.innerWidth - fab.offsetWidth - SNAP)); y = Math.max(SNAP, Math.min(y, window.innerHeight - fab.offsetHeight - SNAP)); fab.style.left = x + 'px'; fab.style.top = y + 'px'; fab.style.right = 'auto'; fab.style.bottom = 'auto'; fabX = x; fabY = y; } function snapToCorner() { const cx = fabX + fab.offsetWidth / 2; const cy = fabY + fab.offsetHeight / 2; const W = window.innerWidth; const H = window.innerHeight; const PAD = 28; let tx = cx < W/2 ? PAD : W - fab.offsetWidth - PAD; let ty = cy < H/2 ? PAD : H - fab.offsetHeight - PAD; // animated spring to corner fab.style.transition = 'left .35s cubic-bezier(.34,1.56,.64,1), top .35s cubic-bezier(.34,1.56,.64,1)'; setPos(tx, ty); setTimeout(() => { fab.style.transition = ''; }, 400); } function spawnTrail(x, y) { if (TRAIL) return; const dot = document.createElement('div'); dot.className = 'fb12-trail'; dot.style.left = x + 'px'; dot.style.top = y + 'px'; document.body.appendChild(dot); setTimeout(() => dot.remove(), 700); } function highlightSnap() { const cx = fabX + fab.offsetWidth / 2; const cy = fabY + fab.offsetHeight / 2; const W = window.innerWidth, H = window.innerHeight; const isLeft = cx < W/2, isTop = cy < H/2; document.getElementById('fb12-sz-tl').classList.toggle('fb12-active', isLeft && isTop); document.getElementById('fb12-sz-tr').classList.toggle('fb12-active', !isLeft && isTop); document.getElementById('fb12-sz-bl').classList.toggle('fb12-active', isLeft && !isTop); document.getElementById('fb12-sz-br').classList.toggle('fb12-active', !isLeft && !isTop); } // Mouse fab.addEventListener('mousedown', e => { e.preventDefault(); isDragging = true; fab.classList.add('fb12-dragging'); startX = e.clientX - fabX; startY = e.clientY - fabY; posLabel.classList.add('fb12-visible'); }); window.addEventListener('mousemove', e => { if (!isDragging) return; setPos(e.clientX - startX, e.clientY - startY); highlightSnap(); posLabel.textContent = `x:${Math.round(fabX)} y:${Math.round(fabY)}`; if (Math.abs(e.clientX - (lastMoveX||e.clientX)) > 12 || Math.abs(e.clientY - (lastMoveY||e.clientY)) > 12) { spawnTrail(e.clientX, e.clientY); lastMoveX = e.clientX; lastMoveY = e.clientY; } }); window.addEventListener('mouseup', () => { if (!isDragging) return; isDragging = false; fab.classList.remove('fb12-dragging'); snapToCorner(); posLabel.classList.remove('fb12-visible'); document.querySelectorAll('.fb12-snap-zone').forEach(z => z.classList.remove('fb12-active')); }); // Touch fab.addEventListener('touchstart', e => { const t = e.touches[0]; isDragging = true; fab.classList.add('fb12-dragging'); startX = t.clientX - fabX; startY = t.clientY - fabY; posLabel.classList.add('fb12-visible'); }, { passive: true }); window.addEventListener('touchmove', e => { if (!isDragging) return; const t = e.touches[0]; setPos(t.clientX - startX, t.clientY - startY); highlightSnap(); posLabel.textContent = `x:${Math.round(fabX)} y:${Math.round(fabY)}`; }, { passive: true }); window.addEventListener('touchend', () => { if (!isDragging) return; isDragging = false; fab.classList.remove('fb12-dragging'); snapToCorner(); posLabel.classList.remove('fb12-visible'); document.querySelectorAll('.fb12-snap-zone').forEach(z => z.classList.remove('fb12-active')); }); })(); ``` ### 13. Notification Bell FAB **Type:** CSS + JS **Description:** Floating notification bell button with ring animation, multiple badge variants, and an interactive dropdown notification panel. **HTML:** ```html

    Floating Notification Bell

    Animated bell FAB with number badge, pulse ring, and an expandable notification dropdown. Hover any bell to hear it ring.

    Dark bordered Hover to ring
    Indigo filled
    Amber alert Auto-rings
    Green dot · muted
    Interactive dropdown — click the bell
    Notifications Mark all read
    Alex Chen mentioned you in a comment
    Deploy succeeded production · v2.4.1
    Payment received Invoice #2047 paid
    Mia Torres shared a file with you
    ``` **CSS:** ```css .fb13, .fb13 *, .fb13 *::before, .fb13 *::after { box-sizing: border-box; margin: 0; padding: 0; } .fb13 { font-family: 'Inter', sans-serif; background: #0f172a; min-height: 100vh; display: grid; place-items: center; padding: 40px 20px; color: #e2e8f0; } h1 { font-size: clamp(1.6rem, 5vw, 2.4rem); font-weight: 700; text-align: center; letter-spacing: -.022em; margin-bottom: 8px; } p.fb13-sub { text-align: center; color: #475569; font-size: .9rem; max-width: 44ch; margin: 0 auto 52px; line-height: 1.6; } .fb13-scene { width: min(780px, 100%); display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; } .fb13-card { background: #1e293b; border: 1px solid #334155; border-radius: 20px; padding: 36px 24px; display: flex; flex-direction: column; align-items: center; gap: 20px; position: relative; overflow: hidden; } .fb13-card::before { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse 80% 60% at 50% -10%, rgba(99,102,241,.06), transparent); pointer-events: none; } .fb13-card-tag { font-size: .66rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: #475569; } /* ── BELL FAB ── */ .fb13-bell-fab { position: relative; width: 66px; height: 66px; border-radius: 50%; border: none; cursor: pointer; display: grid; place-items: center; outline: none; transition: transform .22s cubic-bezier(.34,1.56,.64,1), box-shadow .2s; } /* Variant 1: Classic dark */ .fb13-bell-fab--dark { background: #1e293b; border: 1.5px solid #334155; box-shadow: 0 4px 16px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.06); } .fb13-bell-fab--dark:hover { transform: scale(1.1); box-shadow: 0 8px 28px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.08); border-color: #4f46e5; } /* Variant 2: Indigo filled */ .fb13-bell-fab--indigo { background: linear-gradient(135deg, #6366f1, #4f46e5); box-shadow: 0 6px 22px rgba(99,102,241,.45), inset 0 1px 0 rgba(255,255,255,.18); } .fb13-bell-fab--indigo:hover { transform: scale(1.1); box-shadow: 0 10px 32px rgba(99,102,241,.6), inset 0 1px 0 rgba(255,255,255,.2); } /* Variant 3: Amber alert */ .fb13-bell-fab--amber { background: linear-gradient(135deg, #f59e0b, #d97706); box-shadow: 0 6px 22px rgba(245,158,11,.45), inset 0 1px 0 rgba(255,255,255,.18); } .fb13-bell-fab--amber:hover { transform: scale(1.1); box-shadow: 0 10px 32px rgba(245,158,11,.6), inset 0 1px 0 rgba(255,255,255,.2); } /* Variant 4: Muted (no unread) */ .fb13-bell-fab--muted { background: #1e293b; border: 1.5px solid #2d3f55; box-shadow: 0 2px 8px rgba(0,0,0,.4); } .fb13-bell-fab--muted:hover { transform: scale(1.08); border-color: #64748b; } /* bell icon */ .fb13-bell-fab svg.fb13-bell-icon { width: 28px; height: 28px; position: relative; z-index: 1; } .fb13-bell-fab--dark svg.fb13-bell-icon, .fb13-bell-fab--muted svg.fb13-bell-icon { fill: #94a3b8; } .fb13-bell-fab--indigo svg.fb13-bell-icon, .fb13-bell-fab--amber svg.fb13-bell-icon { fill: #fff; } /* bell ring animation */ @keyframes fb13-bell-ring { 0% { transform: rotate(0deg); } 10% { transform: rotate(12deg); } 20% { transform: rotate(-10deg); } 30% { transform: rotate(8deg); } 40% { transform: rotate(-6deg); } 50% { transform: rotate(4deg); } 60% { transform: rotate(-2deg); } 70% { transform: rotate(0deg); } 100% { transform: rotate(0deg); } } .fb13-bell-fab:hover .fb13-bell-icon, .fb13-bell-fab:focus .fb13-bell-icon { animation: fb13-bell-ring .6s ease-in-out; } .fb13-bell-fab--auto .fb13-bell-icon { animation: fb13-bell-ring 1s ease-in-out 1s infinite; animation-play-state: running; } /* notification badge */ .fb13-bell-badge { position: absolute; top: 0; right: 0; min-width: 22px; height: 22px; border-radius: 11px; background: #ef4444; color: #fff; font-size: .65rem; font-weight: 700; display: grid; place-items: center; padding: 0 5px; border: 2.5px solid #0f172a; z-index: 2; transform: translate(4px, -4px); animation: fb13-badge-in .4s cubic-bezier(.34,1.56,.64,1) both; } @keyframes fb13-badge-in { from { transform: translate(4px,-4px) scale(0); } to { transform: translate(4px,-4px) scale(1); } } /* pulsing badge */ .fb13-bell-badge--pulse { animation: fb13-badge-in .4s cubic-bezier(.34,1.56,.64,1) both, fb13-badge-pulse 2s ease-in-out 1s infinite; } @keyframes fb13-badge-pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(239,68,68,.5); } 50% { box-shadow: 0 0 0 6px rgba(239,68,68,0); } } /* dot badge (no number) */ .fb13-bell-badge--dot { width: 13px; height: 13px; min-width: 0; padding: 0; border-radius: 50%; background: #22c55e; } /* notification dropdown panel (for the JS variant) */ .fb13-notif-panel { position: absolute; top: calc(100% + 10px); right: 0; width: 280px; background: #1e293b; border: 1px solid #334155; border-radius: 16px; box-shadow: 0 16px 48px rgba(0,0,0,.6); overflow: hidden; opacity: 0; transform: translateY(-8px) scale(.97); pointer-events: none; transform-origin: top right; transition: opacity .25s ease, transform .28s cubic-bezier(.34,1.56,.64,1); z-index: 20; } .fb13-notif-panel.fb13-open { opacity: 1; transform: none; pointer-events: auto; } .fb13-np-header { padding: 14px 16px; border-bottom: 1px solid #334155; display: flex; align-items: center; justify-content: space-between; } .fb13-np-header span { font-size: .8rem; font-weight: 600; color: #e2e8f0; } .fb13-np-header small { font-size: .7rem; color: #6366f1; cursor: pointer; } .fb13-np-item { padding: 12px 16px; border-bottom: 1px solid #1e293b; display: flex; gap: 10px; cursor: pointer; transition: background .1s; } .fb13-np-item:hover { background: #243449; } .fb13-np-item:last-child { border: 0; } .fb13-np-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; margin-top: 5px; } .fb13-np-dot--blue { background: #6366f1; } .fb13-np-dot--green { background: #22c55e; } .fb13-np-dot--amber { background: #f59e0b; } .fb13-np-dot--empty { background: transparent; border: 1px solid #334155; } .fb13-np-text { font-size: .78rem; line-height: 1.4; } .fb13-np-text strong { color: #e2e8f0; font-weight: 600; } .fb13-np-text span { color: #64748b; } .fb13-np-time { font-size: .66rem; color: #475569; margin-top: 3px; display: block; } /* wrapper for interactive demo */ .fb13-interactive-wrap { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; } @media (prefers-reduced-motion: reduce) { .fb13-bell-fab svg.fb13-bell-icon, .fb13-bell-fab--auto .fb13-bell-icon, .fb13-bell-badge--pulse { animation: none; } .fb13-notif-panel { transition: none; } } ``` **JS:** ```js const bell = document.getElementById('fb13-notif-bell'); const panel = document.getElementById('fb13-notif-panel'); const countBadge = document.getElementById('fb13-notif-count'); const markRead = document.getElementById('fb13-mark-read'); let open = false; bell.addEventListener('click', () => { open = !open; panel.classList.toggle('fb13-open', open); bell.setAttribute('aria-expanded', open); }); document.addEventListener('click', e => { if (!bell.contains(e.target) && !panel.contains(e.target)) { open = false; panel.classList.remove('fb13-open'); bell.setAttribute('aria-expanded', 'false'); } }); markRead.addEventListener('click', e => { e.stopPropagation(); countBadge.style.display = 'none'; document.querySelectorAll('.fb13-np-dot').forEach(d => d.className = 'fb13-np-dot fb13-np-dot--empty'); markRead.textContent = '✓ All read'; }); ``` ### 14. Floating Cart Badge **Type:** CSS + JS **Description:** Floating cart button with live badge counter, add-to-cart product grid, animated badge bump, and collapsible cart mini panel. **HTML:** ```html

    🛒 Floating Cart Button

    Add items — watch the live badge counter update

    3
    Red badge
    12
    Green badge
    5
    Pulse ring
    Dot only
    99+
    Round + overflow
    Your Cart
    Your cart is empty
    0
    ``` **CSS:** ```css .fb14, .fb14 *, .fb14 *::before, .fb14 *::after { box-sizing: border-box; margin: 0; padding: 0; } .fb14 { font-family: 'DM Sans', sans-serif; background: #f0f4f8; min-height: 100vh; display: flex; flex-direction: column; align-items: center; padding: 40px 20px 120px; gap: 32px; } h1 { font-size: 1.4rem; font-weight: 700; color: #1a202c; text-align: center; margin-bottom: 4px; } p.fb14-subtitle { color: #718096; font-size: 0.9rem; text-align: center; margin-bottom: 16px; } /* ── Product Grid ── */ .fb14-product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; width: 100%; max-width: 800px; } .fb14-product-card { background: #fff; border-radius: 16px; padding: 20px 16px 16px; display: flex; flex-direction: column; align-items: center; gap: 10px; box-shadow: 0 1px 4px rgba(0,0,0,.06); transition: transform .2s, box-shadow .2s; } .fb14-product-card:hover { transform: translateY(-3px); box-shadow: 0 6px 20px rgba(0,0,0,.1); } .fb14-product-icon { font-size: 2.6rem; line-height: 1; } .fb14-product-name { font-size: 0.82rem; font-weight: 600; color: #2d3748; text-align: center; } .fb14-product-price { font-size: 0.9rem; font-weight: 700; color: #4f46e5; } .fb14-add-btn { margin-top: 4px; padding: 7px 18px; background: #4f46e5; color: #fff; border: none; border-radius: 999px; font-family: inherit; font-size: 0.78rem; font-weight: 600; cursor: pointer; transition: background .15s, transform .1s; } .fb14-add-btn:hover { background: #4338ca; } .fb14-add-btn:active { transform: scale(.95); } /* ── Cart FAB ── */ .fb14-fab-cart-wrap { position: fixed; bottom: 28px; right: 28px; z-index: 100; } /* The FAB itself */ .fb14-fab-cart { position: relative; width: 60px; height: 60px; border-radius: 18px; background: #4f46e5; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 20px rgba(79,70,229,.45); transition: transform .2s cubic-bezier(.34,1.56,.64,1), box-shadow .2s; outline: none; } .fb14-fab-cart:hover { transform: scale(1.08); box-shadow: 0 8px 28px rgba(79,70,229,.55); } .fb14-fab-cart:active { transform: scale(.95); } .fb14-fab-cart svg { width: 26px; height: 26px; stroke: #fff; fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; } /* Badge */ .fb14-cart-badge { position: absolute; top: -8px; right: -8px; min-width: 22px; height: 22px; border-radius: 999px; background: #ef4444; color: #fff; font-family: 'DM Sans', sans-serif; font-size: 0.7rem; font-weight: 700; display: flex; align-items: center; justify-content: center; padding: 0 5px; border: 2.5px solid #f0f4f8; transform: scale(0); transition: transform .3s cubic-bezier(.34,1.56,.64,1); } .fb14-cart-badge.fb14-visible { transform: scale(1); } .fb14-cart-badge.fb14-bump { animation: fb14-badge-bump .35s cubic-bezier(.34,1.56,.64,1); } @keyframes fb14-badge-bump { 0% { transform: scale(1); } 40% { transform: scale(1.45); } 100% { transform: scale(1); } } /* Ripple burst on add */ .fb14-fab-cart-wrap::after { content: ''; position: absolute; inset: 0; border-radius: 18px; background: rgba(79,70,229,.3); transform: scale(1); opacity: 0; pointer-events: none; } .fb14-fab-cart-wrap.fb14-ripple::after { animation: fb14-cart-ripple .5s ease-out forwards; } @keyframes fb14-cart-ripple { 0% { transform: scale(1); opacity: .6; } 100% { transform: scale(2.2); opacity: 0; } } /* Mini panel */ .fb14-cart-panel { position: absolute; bottom: 72px; right: 0; width: 260px; background: #fff; border-radius: 16px; box-shadow: 0 8px 32px rgba(0,0,0,.14); overflow: hidden; transform-origin: bottom right; transform: scale(.85) translateY(12px); opacity: 0; pointer-events: none; transition: transform .25s cubic-bezier(.34,1.4,.64,1), opacity .2s; } .fb14-cart-panel.fb14-open { transform: scale(1) translateY(0); opacity: 1; pointer-events: auto; } .fb14-cart-panel-header { padding: 14px 16px 10px; font-size: 0.82rem; font-weight: 700; color: #1a202c; border-bottom: 1px solid #e8edf3; display: flex; justify-content: space-between; align-items: center; } .fb14-cart-panel-header span { color: #718096; font-weight: 400; } .fb14-cart-items-list { max-height: 200px; overflow-y: auto; padding: 8px 0; } .fb14-cart-item-row { display: flex; align-items: center; gap: 10px; padding: 8px 16px; font-size: 0.8rem; color: #2d3748; animation: fb14-item-slide .25s ease-out; } @keyframes fb14-item-slide { from { transform: translateX(16px); opacity: 0; } to { transform: translateX(0); opacity: 1; } } .fb14-cart-item-emoji { font-size: 1.2rem; } .fb14-cart-item-name { flex: 1; font-weight: 500; } .fb14-cart-item-qty { background: #eef2ff; color: #4f46e5; font-weight: 700; padding: 2px 8px; border-radius: 999px; font-size: 0.73rem; } .fb14-cart-item-price { color: #718096; min-width: 42px; text-align: right; } .fb14-cart-empty { padding: 24px; text-align: center; color: #a0aec0; font-size: 0.82rem; } .fb14-cart-panel-footer { padding: 12px 16px; border-top: 1px solid #e8edf3; display: flex; justify-content: space-between; align-items: center; } .fb14-cart-total { font-size: 0.85rem; font-weight: 700; color: #1a202c; } .fb14-checkout-btn { padding: 8px 16px; background: #4f46e5; color: #fff; border: none; border-radius: 999px; font-family: inherit; font-size: 0.78rem; font-weight: 700; cursor: pointer; transition: background .15s; } .fb14-checkout-btn:hover { background: #4338ca; } .fb14-clear-btn { background: none; border: none; color: #e53e3e; font-size: 0.73rem; font-weight: 600; cursor: pointer; font-family: inherit; padding: 0; text-decoration: underline; } .fb14-clear-btn:hover { color: #c53030; } /* ── Item count variants demo row ── */ .fb14-demo-row { display: flex; gap: 28px; align-items: flex-end; justify-content: center; flex-wrap: wrap; padding: 24px 32px; background: #fff; border-radius: 20px; box-shadow: 0 1px 4px rgba(0,0,0,.06); width: 100%; max-width: 800px; } .fb14-demo-col { display: flex; flex-direction: column; align-items: center; gap: 8px; } .fb14-demo-label { font-size: 0.72rem; color: #718096; font-weight: 500; } .fb14-fab-static { position: relative; width: 56px; height: 56px; border-radius: 16px; border: none; cursor: default; display: flex; align-items: center; justify-content: center; } .fb14-fab-static svg { width: 24px; height: 24px; stroke: #fff; fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; } .fb14-fab-indigo { background: #4f46e5; box-shadow: 0 4px 14px rgba(79,70,229,.4); } .fb14-fab-emerald { background: #10b981; box-shadow: 0 4px 14px rgba(16,185,129,.4); } .fb14-fab-rose { background: #f43f5e; box-shadow: 0 4px 14px rgba(244,63,94,.4); } .fb14-fab-amber { background: #f59e0b; box-shadow: 0 4px 14px rgba(245,158,11,.4); } .fb14-badge-static { position: absolute; top: -7px; right: -7px; min-width: 20px; height: 20px; border-radius: 999px; color: #fff; font-size: 0.67rem; font-weight: 700; display: flex; align-items: center; justify-content: center; padding: 0 4px; border: 2px solid #fff; } .fb14-badge-red { background: #ef4444; } .fb14-badge-green { background: #22c55e; } .fb14-badge-pulse { background: #ef4444; } .fb14-badge-pulse::before { content: ''; position: absolute; inset: -4px; border-radius: 999px; border: 2px solid #ef4444; animation: fb14-badge-pulse-ring 1.4s ease-out infinite; } @keyframes fb14-badge-pulse-ring { 0% { transform: scale(1); opacity: .7; } 100% { transform: scale(2.2); opacity: 0; } } .fb14-badge-dot { position: absolute; top: -3px; right: -3px; width: 12px; height: 12px; border-radius: 50%; background: #ef4444; border: 2px solid #fff; } @media (prefers-reduced-motion: reduce) { .fb14-cart-badge, .fb14-fab-cart, .fb14-cart-panel, .fb14-add-btn { transition: none; animation: none; } .fb14-fab-cart-wrap::after { animation: none !important; } .fb14-badge-pulse::before { animation: none; } } ``` **JS:** ```js const products = [ { name: 'Headphones', emoji: '🎧', price: 79.99 }, { name: 'Sneakers', emoji: '👟', price: 129.00 }, { name: 'Backpack', emoji: '🎒', price: 54.50 }, { name: 'Watch', emoji: '⌚', price: 199.00 }, { name: 'Sunglasses', emoji: '🕶️', price: 44.00 }, { name: 'Camera', emoji: '📷', price: 349.99 }, { name: 'Jacket', emoji: '🧥', price: 89.00 }, { name: 'Notebook', emoji: '📓', price: 12.99 }, ]; const cart = {}; const grid = document.getElementById('fb14-productGrid'); const badge = document.getElementById('fb14-cartBadge'); const fabWrap = document.getElementById('fb14-fabWrap'); const fabCart = document.getElementById('fb14-fabCart'); const panel = document.getElementById('fb14-cartPanel'); const itemsList = document.getElementById('fb14-cartItemsList'); const totalEl = document.getElementById('fb14-cartTotal'); const clearBtn = document.getElementById('fb14-clearBtn'); // Build product cards products.forEach((p, i) => { const card = document.createElement('div'); card.className = 'fb14-product-card'; card.innerHTML = `
    ${p.emoji}
    ${p.name}
    $${p.price.toFixed(2)}
    `; grid.appendChild(card); }); grid.addEventListener('click', e => { if (!e.target.matches('.fb14-add-btn')) return; const p = products[+e.target.dataset.idx]; const key = p.name; cart[key] = cart[key] ? { ...cart[key], qty: cart[key].qty + 1 } : { ...p, qty: 1 }; updateBadge(); renderCartPanel(); triggerRipple(); }); function updateBadge() { const total = Object.values(cart).reduce((s, v) => s + v.qty, 0); badge.textContent = total > 99 ? '99+' : total; if (total > 0) { badge.classList.add('fb14-visible'); badge.classList.remove('fb14-bump'); requestAnimationFrame(() => badge.classList.add('fb14-bump')); } else { badge.classList.remove('fb14-visible'); } } function renderCartPanel() { const items = Object.values(cart); if (!items.length) { itemsList.innerHTML = '
    Your cart is empty
    '; totalEl.textContent = 'Total: $0.00'; return; } itemsList.innerHTML = items.map(it => `
    ${it.emoji} ${it.name} ×${it.qty} $${(it.price * it.qty).toFixed(2)}
    `).join(''); const total = items.reduce((s, it) => s + it.price * it.qty, 0); totalEl.textContent = `Total: $${total.toFixed(2)}`; } function triggerRipple() { fabWrap.classList.remove('fb14-ripple'); requestAnimationFrame(() => fabWrap.classList.add('fb14-ripple')); } fabCart.addEventListener('click', () => { panel.classList.toggle('fb14-open'); }); clearBtn.addEventListener('click', () => { Object.keys(cart).forEach(k => delete cart[k]); updateBadge(); renderCartPanel(); }); document.addEventListener('click', e => { if (!fabWrap.contains(e.target)) panel.classList.remove('fb14-open'); }); ``` ### 15. Magnetic Hover FAB **Type:** CSS + JS **Description:** Magnetic hover floating action button using JS mouse tracking and lerp easing — the button pulls toward the cursor within a radius. **HTML:** ```html

    Magnetic Hover FAB

    Hover near each button — it pulls toward your cursor

    Circle — Purple
    hover me
    Circle — Blue
    hover me
    Circle — Emerald
    hover me
    Circle — Rose
    hover me
    Rounded Square
    hover me
    Pill Button
    hover me
    How It Works

    Magnetic Formula

    On mousemove, compute the cursor offset from the FAB center. Multiply by a strength factor (0–0.5) and ease toward that target using linear interpolation (lerp) each animation frame. Outside the attraction radius the offset snaps back to 0,0 via spring decay.

    Why it feels good

    The key is not snapping instantly. A lerp factor of ~0.12 per frame creates a subtle lag that reads as physical weight. Counter-rotating the inner icon by −30% of the translation adds depth without extra DOM elements.

    ``` **CSS:** ```css .fb15, .fb15 *, .fb15 *::before, .fb15 *::after { box-sizing: border-box; margin: 0; padding: 0; } .fb15 { font-family: 'Syne', sans-serif; background: #0d0d12; min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; padding: 48px 24px; gap: 48px; color: #e2e8f0; } h1 { font-size: 1.5rem; font-weight: 800; text-align: center; background: linear-gradient(135deg, #a78bfa, #60a5fa); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; } p.fb15-subtitle { color: #64748b; font-size: 0.85rem; text-align: center; margin-top: -36px; } /* ── Demo Grid ── */ .fb15-demo-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 24px; width: 100%; max-width: 860px; } .fb15-demo-cell { background: #14141e; border: 1px solid #1e1e2e; border-radius: 20px; padding: 40px 20px 28px; display: flex; flex-direction: column; align-items: center; gap: 18px; position: relative; overflow: visible; } .fb15-demo-cell-label { font-size: 0.72rem; font-weight: 600; color: #475569; letter-spacing: .05em; text-transform: uppercase; } /* ── Magnetic FAB base ── */ .fb15-mag-fab { position: relative; width: 64px; height: 64px; border-radius: 50%; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; outline: none; /* JS sets transform; CSS provides spring fallback */ transition: transform .08s linear, box-shadow .2s; will-change: transform; } /* Variant: Purple */ .fb15-mag-fab-purple { background: linear-gradient(135deg, #7c3aed, #a855f7); box-shadow: 0 6px 24px rgba(124,58,237,.5); } .fb15-mag-fab-purple:hover { box-shadow: 0 10px 36px rgba(168,85,247,.6); } /* Variant: Blue */ .fb15-mag-fab-blue { background: linear-gradient(135deg, #2563eb, #38bdf8); box-shadow: 0 6px 24px rgba(37,99,235,.5); } .fb15-mag-fab-blue:hover { box-shadow: 0 10px 36px rgba(56,189,248,.6); } /* Variant: Emerald */ .fb15-mag-fab-emerald { background: linear-gradient(135deg, #059669, #34d399); box-shadow: 0 6px 24px rgba(5,150,105,.5); } .fb15-mag-fab-emerald:hover { box-shadow: 0 10px 36px rgba(52,211,153,.6); } /* Variant: Rose */ .fb15-mag-fab-rose { background: linear-gradient(135deg, #e11d48, #fb7185); box-shadow: 0 6px 24px rgba(225,29,72,.5); } .fb15-mag-fab-rose:hover { box-shadow: 0 10px 36px rgba(251,113,133,.6); } /* Variant: Square */ .fb15-mag-fab-square { border-radius: 20px; background: linear-gradient(135deg, #d97706, #fbbf24); box-shadow: 0 6px 24px rgba(217,119,6,.5); } .fb15-mag-fab-square:hover { box-shadow: 0 10px 36px rgba(251,191,36,.6); } /* Variant: Pill */ .fb15-mag-fab-pill { width: 140px; border-radius: 999px; background: linear-gradient(135deg, #0f172a, #334155); border: 1px solid #475569; box-shadow: 0 4px 20px rgba(0,0,0,.4); gap: 8px; font-size: 0.8rem; font-weight: 700; color: #e2e8f0; letter-spacing: .04em; } .fb15-mag-fab svg { width: 24px; height: 24px; fill: none; stroke: #fff; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; /* The icon counter-rotates slightly for realism */ transition: transform .08s linear; } .fb15-mag-fab-pill svg { width: 20px; height: 20px; } /* Orbit ring that follows the magnet */ .fb15-mag-orbit { position: absolute; inset: -10px; border-radius: 50%; border: 1.5px dashed rgba(255,255,255,.15); pointer-events: none; transition: opacity .2s; opacity: 0; } .fb15-demo-cell:hover .fb15-mag-orbit { opacity: 1; } /* Cursor dot that sticks to FAB area */ .fb15-cursor-hint { position: absolute; bottom: 10px; right: 14px; font-size: 0.65rem; color: #334155; font-weight: 600; pointer-events: none; } /* ── Attraction zone visualization ── */ .fb15-zone-wrap { position: relative; width: 220px; height: 220px; display: flex; align-items: center; justify-content: center; } .fb15-zone-ring { position: absolute; border-radius: 50%; border: 1px dashed #1e293b; } .fb15-zone-ring-1 { width: 80px; height: 80px; border-color: #334155; } .fb15-zone-ring-2 { width: 130px; height: 130px; border-color: #1e293b; } .fb15-zone-ring-3 { width: 200px; height: 200px; border-color: #1a1a2a; } .fb15-zone-label-1, .fb15-zone-label-2, .fb15-zone-label-3 { position: absolute; font-size: 0.6rem; font-weight: 600; color: #334155; right: 0; transform: translateX(50%); white-space: nowrap; } .fb15-zone-label-1 { top: calc(50% - 40px); } .fb15-zone-label-2 { top: calc(50% - 65px); } .fb15-zone-label-3 { top: calc(50% - 100px); } /* ── Explainer card ── */ .fb15-explainer { background: #14141e; border: 1px solid #1e1e2e; border-radius: 20px; padding: 24px 28px; max-width: 860px; width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 24px; } .fb15-explainer-col h3 { font-size: 0.8rem; font-weight: 700; color: #a78bfa; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 10px; } .fb15-explainer-col p, .fb15-explainer-col code { font-size: 0.78rem; color: #64748b; line-height: 1.7; font-family: 'Syne', monospace; } .fb15-explainer-col code { background: #0d0d12; color: #7dd3fc; padding: 2px 6px; border-radius: 4px; font-size: 0.73rem; } @media (max-width: 600px) { .fb15-demo-grid { grid-template-columns: 1fr 1fr; } .fb15-explainer { grid-template-columns: 1fr; } } @media (prefers-reduced-motion: reduce) { .fb15-mag-fab { transition: none !important; } .fb15-mag-fab svg { transition: none !important; } } ``` **JS:** ```js // Magnetic button logic const ATTRACT_RADIUS = 90; // px from center to start pull const STRENGTH = 0.38; // how far it moves (0–1) const LERP = 0.12; // easing per frame const RELEASE_LERP = 0.08; // easing back to center const buttons = document.querySelectorAll('[data-mag-btn]'); buttons.forEach(btn => { let tx = 0, ty = 0; // target translation let cx = 0, cy = 0; // current (lerped) translation let rafId = null; let inside = false; const cell = btn.closest('[data-mag]'); function animate() { const lerpF = inside ? LERP : RELEASE_LERP; cx += (tx - cx) * lerpF; cy += (ty - cy) * lerpF; btn.style.transform = `translate(${cx.toFixed(2)}px, ${cy.toFixed(2)}px)`; // Counter-rotate icon const icon = btn.querySelector('svg'); if (icon) { icon.style.transform = `translate(${(-cx * .3).toFixed(2)}px, ${(-cy * .3).toFixed(2)}px)`; } const stillMoving = Math.abs(tx - cx) > 0.1 || Math.abs(ty - cy) > 0.1; if (stillMoving || inside) { rafId = requestAnimationFrame(animate); } else { cx = 0; cy = 0; btn.style.transform = ''; if (icon) icon.style.transform = ''; rafId = null; } } function onMove(e) { const rect = btn.getBoundingClientRect(); const bx = rect.left + rect.width / 2; const by = rect.top + rect.height / 2; const dx = e.clientX - bx; const dy = e.clientY - by; const dist = Math.hypot(dx, dy); if (dist < ATTRACT_RADIUS) { inside = true; // Falloff: full pull at center, zero at radius edge const falloff = 1 - dist / ATTRACT_RADIUS; tx = dx * STRENGTH * falloff; ty = dy * STRENGTH * falloff; } else { inside = false; tx = 0; ty = 0; } if (!rafId) rafId = requestAnimationFrame(animate); } function onLeave() { inside = false; tx = 0; ty = 0; if (!rafId) rafId = requestAnimationFrame(animate); } // Attach to entire cell for wider detection area if (cell) { cell.addEventListener('mousemove', onMove); cell.addEventListener('mouseleave', onLeave); } else { btn.addEventListener('mousemove', onMove); btn.addEventListener('mouseleave', onLeave); } }); // Respect reduced motion const mq = window.matchMedia('(prefers-reduced-motion: reduce)'); if (mq.matches) { document.querySelectorAll('[data-mag-btn]').forEach(btn => { btn.style.transition = 'none'; }); } ``` ### 16. Theme Toggle FAB **Type:** CSS + JS **Description:** Floating light/dark mode toggle button with 4 style variants: circle, pill slider, square, and orbit ring — all synced to CSS variables. **HTML:** ```html

    Floating Theme Toggle

    Toggle light / dark mode — all 4 styles sync together

    Circle
    Pill Slider
    Square
    Orbit Ring

    Design System Preview

    See how your UI adapts to the active theme

    This card updates its background, text, borders, and accent colors instantly as you toggle. Every token is a CSS variable — a single data-theme attribute on the root element switches the entire design.
    Light Mode Dark Mode CSS Tokens FAB Toggle
    Light Mode Active
    ``` **CSS:** ```css .fb16, .fb16 *, .fb16 *::before, .fb16 *::after { box-sizing: border-box; margin: 0; padding: 0; } /* ── Theme tokens ── */ :root { --bg: #f5f7fa; --surface: #ffffff; --surface-2: #eef1f6; --text: #1a202c; --text-2: #718096; --border: #e2e8f0; --shadow: rgba(0,0,0,.08); --accent: #4f46e5; --accent-2: #a78bfa; --fab-bg: #1a1a2e; --fab-icon: #f6e05e; --toggle-dur: .5s; } [data-theme="dark"] { --bg: #0d0d14; --surface: #14141f; --surface-2: #1e1e2e; --text: #e2e8f0; --text-2: #64748b; --border: #1e293b; --shadow: rgba(0,0,0,.35); --accent: #a78bfa; --accent-2: #4f46e5; --fab-bg: #fef9c3; --fab-icon: #1a1a2e; } .fb16 { transition: background var(--toggle-dur) ease; } .fb16 { font-family: 'Plus Jakarta Sans', sans-serif; background: var(--bg); min-height: 100vh; display: flex; flex-direction: column; align-items: center; padding: 48px 24px 120px; gap: 32px; color: var(--text); transition: background var(--toggle-dur) ease, color var(--toggle-dur) ease; } h1 { font-size: 1.5rem; font-weight: 800; text-align: center; color: var(--text); transition: color var(--toggle-dur); } p.fb16-subtitle { font-size: 0.85rem; color: var(--text-2); text-align: center; margin-top: -24px; transition: color var(--toggle-dur); } /* ── Variants row ── */ .fb16-variants-row { display: flex; gap: 32px; flex-wrap: wrap; justify-content: center; align-items: flex-end; } .fb16-variant-col { display: flex; flex-direction: column; align-items: center; gap: 10px; } .fb16-variant-label { font-size: 0.7rem; font-weight: 600; color: var(--text-2); text-transform: uppercase; letter-spacing: .06em; transition: color var(--toggle-dur); } /* ── Toggle FAB shared ── */ .fb16-toggle-fab { position: relative; cursor: pointer; border: none; outline: none; display: flex; align-items: center; justify-content: center; transition: transform .2s cubic-bezier(.34,1.56,.64,1), box-shadow .2s; } .fb16-toggle-fab:hover { transform: scale(1.1); } .fb16-toggle-fab:active { transform: scale(.93); } /* Style 1: Circle with animated sun/moon swap */ .fb16-fab-circle { width: 60px; height: 60px; border-radius: 50%; background: var(--fab-bg); box-shadow: 0 4px 18px var(--shadow); transition: background var(--toggle-dur), box-shadow .2s, transform .2s; overflow: hidden; } .fb16-fab-circle-inner { position: relative; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; } .fb16-icon-sun, .fb16-icon-moon { position: absolute; width: 24px; height: 24px; stroke: var(--fab-icon); fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: opacity var(--toggle-dur), transform var(--toggle-dur), stroke var(--toggle-dur); } /* Light mode: show sun, hide moon */ .fb16-icon-sun { opacity: 1; transform: rotate(0deg) scale(1); } .fb16-icon-moon { opacity: 0; transform: rotate(90deg) scale(.6); } [data-theme="dark"] .fb16-icon-sun { opacity: 0; transform: rotate(-90deg) scale(.6); } [data-theme="dark"] .fb16-icon-moon { opacity: 1; transform: rotate(0deg) scale(1); } /* Style 2: Pill toggle (iOS-style slider) */ .fb16-fab-pill-toggle { width: 64px; height: 34px; border-radius: 999px; background: #e2e8f0; position: relative; padding: 0; transition: background var(--toggle-dur); box-shadow: inset 0 1px 3px rgba(0,0,0,.15); } [data-theme="dark"] .fb16-fab-pill-toggle { background: #7c3aed; } .fb16-fab-pill-knob { position: absolute; top: 4px; left: 4px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.2); display: flex; align-items: center; justify-content: center; transition: transform var(--toggle-dur) cubic-bezier(.34,1.3,.64,1); } [data-theme="dark"] .fb16-fab-pill-knob { transform: translateX(30px); } .fb16-fab-pill-knob svg { width: 14px; height: 14px; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: stroke var(--toggle-dur), opacity var(--toggle-dur); } .fb16-knob-sun { stroke: #f59e0b; } .fb16-knob-moon { stroke: #7c3aed; position: absolute; opacity: 0; } [data-theme="dark"] .fb16-knob-sun { opacity: 0; } [data-theme="dark"] .fb16-knob-moon { opacity: 1; } /* Style 3: Square with morph icon */ .fb16-fab-square-toggle { width: 56px; height: 56px; border-radius: 16px; background: var(--surface); border: 1.5px solid var(--border); box-shadow: 0 2px 12px var(--shadow); transition: background var(--toggle-dur), border-color var(--toggle-dur), box-shadow .2s, transform .2s; } .fb16-fab-square-icon { font-size: 1.4rem; line-height: 1; display: block; transition: transform var(--toggle-dur), filter var(--toggle-dur); } [data-theme="dark"] .fb16-fab-square-icon { transform: rotate(360deg); } /* Style 4: Gradient orbit ring */ .fb16-fab-orbit { width: 68px; height: 68px; border-radius: 50%; background: var(--surface); position: relative; box-shadow: 0 4px 18px var(--shadow); transition: background var(--toggle-dur), box-shadow .2s, transform .2s; } .fb16-fab-orbit-ring { position: absolute; inset: -4px; border-radius: 50%; background: conic-gradient(from 0deg, #f59e0b, #a78bfa, #38bdf8, #f59e0b); z-index: -1; transition: opacity var(--toggle-dur); opacity: .7; animation: fb16-orbit-spin 4s linear infinite; } [data-theme="dark"] .fb16-fab-orbit-ring { opacity: 1; } @keyframes fb16-orbit-spin { to { transform: rotate(360deg); } } .fb16-fab-orbit-mask { position: absolute; inset: 2px; border-radius: 50%; background: var(--surface); display: flex; align-items: center; justify-content: center; transition: background var(--toggle-dur); } .fb16-orbit-sun, .fb16-orbit-moon { position: absolute; width: 26px; height: 26px; stroke: var(--text); fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: opacity var(--toggle-dur), transform var(--toggle-dur), stroke var(--toggle-dur); } .fb16-orbit-sun { opacity: 1; transform: scale(1); } .fb16-orbit-moon { opacity: 0; transform: scale(.5) rotate(45deg); } [data-theme="dark"] .fb16-orbit-sun { opacity: 0; transform: scale(.5) rotate(-45deg); } [data-theme="dark"] .fb16-orbit-moon { opacity: 1; transform: scale(1) rotate(0deg); } /* ── Live preview card ── */ .fb16-preview-card { background: var(--surface); border: 1px solid var(--border); border-radius: 24px; padding: 28px 32px; max-width: 500px; width: 100%; box-shadow: 0 4px 24px var(--shadow); transition: background var(--toggle-dur), border-color var(--toggle-dur), box-shadow var(--toggle-dur); display: flex; flex-direction: column; gap: 16px; } .fb16-preview-card-header { display: flex; align-items: center; gap: 12px; } .fb16-avatar { width: 44px; height: 44px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), var(--accent-2)); transition: background var(--toggle-dur); } .fb16-card-meta h3 { font-size: 0.92rem; font-weight: 700; color: var(--text); transition: color var(--toggle-dur); } .fb16-card-meta p { font-size: 0.75rem; color: var(--text-2); transition: color var(--toggle-dur); } .fb16-preview-body { font-size: 0.82rem; color: var(--text-2); line-height: 1.75; transition: color var(--toggle-dur); } .fb16-preview-tags { display: flex; gap: 8px; flex-wrap: wrap; } .fb16-tag { padding: 4px 12px; background: var(--surface-2); border-radius: 999px; font-size: 0.73rem; font-weight: 600; color: var(--accent); transition: background var(--toggle-dur), color var(--toggle-dur); } .fb16-theme-indicator { display: flex; align-items: center; gap: 6px; font-size: 0.75rem; font-weight: 700; color: var(--text-2); transition: color var(--toggle-dur); } .fb16-mode-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); transition: background var(--toggle-dur); } /* ── Fixed FAB (bottom-right) ── */ .fb16-fab-fixed-wrap { position: fixed; bottom: 28px; right: 28px; z-index: 200; } .fb16-fab-fixed { width: 60px; height: 60px; border-radius: 50%; background: var(--fab-bg); border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 24px var(--shadow); transition: background var(--toggle-dur), transform .2s cubic-bezier(.34,1.56,.64,1), box-shadow .2s; outline: none; overflow: hidden; } .fb16-fab-fixed:hover { transform: scale(1.1); } .fb16-fab-fixed:active { transform: scale(.93); } .fb16-fab-fixed .fb16-icon-sun { stroke: var(--fab-icon); } .fb16-fab-fixed .fb16-icon-moon { stroke: var(--fab-icon); } /* Burst overlay on toggle */ .fb16-fab-fixed-burst { position: absolute; inset: 0; border-radius: 50%; background: var(--fab-bg); transform: scale(1); opacity: 0; pointer-events: none; } .fb16-fab-fixed.fb16-bursting .fb16-fab-fixed-burst { animation: fb16-burst-out .5s ease-out forwards; } @keyframes fb16-burst-out { 0% { transform: scale(1); opacity: .5; } 100% { transform: scale(4); opacity: 0; } } @media (prefers-reduced-motion: reduce) { } ``` **JS:** ```js const root = document.documentElement; const squareIcon = document.getElementById('fb16-squareIcon'); const modeLabel = document.getElementById('fb16-modeLabel'); const fabFixed = document.getElementById('fb16-fabFixed'); function applyTheme(theme) { root.setAttribute('data-theme', theme); squareIcon.textContent = theme === 'dark' ? '🌙' : '☀️'; modeLabel.textContent = theme === 'dark' ? 'Dark Mode Active' : 'Light Mode Active'; try { localStorage.setItem('fab-theme', theme); } catch(_) {} } function toggle() { const next = root.getAttribute('data-theme') === 'dark' ? 'light' : 'dark'; applyTheme(next); // Burst on the fixed FAB fabFixed.classList.remove('fb16-bursting'); requestAnimationFrame(() => fabFixed.classList.add('fb16-bursting')); } // All toggle buttons trigger the same theme change document.querySelectorAll('[data-theme-toggle]').forEach(btn => { btn.addEventListener('click', toggle); }); // Restore saved preference try { const saved = localStorage.getItem('fab-theme'); if (saved) applyTheme(saved); } catch(_) {} // Respect OS preference if no saved value const osDark = window.matchMedia('(prefers-color-scheme: dark)'); try { if (!localStorage.getItem('fab-theme') && osDark.matches) applyTheme('dark'); } catch(_) { if (osDark.matches) applyTheme('dark'); } ``` ### 17. Classic Plus **Type:** Pure CSS **Description:** The benchmark FAB — a solid gradient circle with a + icon that lifts on hover with a deepening shadow. The pattern every Material design system reaches for first. **HTML:** ```html ``` **CSS:** ```css .cfb-classic { width: 56px; height: 56px; border: 0; border-radius: 50%; background: linear-gradient(135deg, #7c6cff, #a78bfa); color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 16px rgba(124,108,255,0.35); transition: transform 0.25s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.25s, filter 0.2s; } .cfb-classic:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(124,108,255,0.5); filter: brightness(1.05); } .cfb-classic:active { transform: translateY(-1px); } .cfb-classic:focus-visible { outline: 2px solid #fff; outline-offset: 3px; } .cfb-classic svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; } ``` ### 18. Speed Dial **Type:** Pure CSS **Description:** Hover or focus reveals 3 child actions arcing upward — the classic FAB speed-dial. Keyboard accessible because focus stays within the group via :focus-within. **HTML:** ```html
    ``` **CSS:** ```css .cfb-dial { position: relative; width: 56px; height: 56px; } .cfb-dial button { position: absolute; width: 48px; height: 48px; border-radius: 50%; border: 0; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 20px; transition: transform 0.35s cubic-bezier(0.34,1.56,0.64,1), background 0.2s, opacity 0.25s; } .cfb-dial-main { z-index: 2; bottom: 0; left: 0; background: linear-gradient(135deg, #ff6c8a, #ff9a76); color: #fff; font: 700 26px/1 system-ui, sans-serif; box-shadow: 0 6px 18px rgba(255,108,138,0.4); } .cfb-dial:hover .cfb-dial-main, .cfb-dial:focus-within .cfb-dial-main { transform: rotate(45deg); } .cfb-dial-c { z-index: 1; bottom: 0; left: 0; background: #1a1a28; border: 1px solid rgba(255,255,255,0.1); font-size: 16px; opacity: 0; pointer-events: none; } .cfb-dial:hover .cfb-dial-c, .cfb-dial:focus-within .cfb-dial-c { opacity: 1; pointer-events: auto; } .cfb-dial:hover .cfb-dial-c1, .cfb-dial:focus-within .cfb-dial-c1 { transform: translateY(-60px); } .cfb-dial:hover .cfb-dial-c2, .cfb-dial:focus-within .cfb-dial-c2 { transform: translate(48px, -42px); } .cfb-dial:hover .cfb-dial-c3, .cfb-dial:focus-within .cfb-dial-c3 { transform: translateX(60px); } .cfb-dial button:focus-visible { outline: 2px solid #fff; outline-offset: 3px; } ``` ### 19. Pulse Ring **Type:** Pure CSS **Description:** A continuous concentric pulse ring radiates outward — the attention-getter pattern for "new feature" or "tap me" prompts. Pure CSS via box-shadow keyframes. **HTML:** ```html ``` **CSS:** ```css .cfb-pulse { position: relative; width: 52px; height: 52px; border: 0; border-radius: 50%; background: linear-gradient(135deg, #ff6c8a, #f5a623); color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 14px rgba(255,108,138,0.4); } .cfb-pulse::before, .cfb-pulse::after { content: ''; position: absolute; inset: 0; border-radius: 50%; border: 2px solid rgba(255,108,138,0.55); animation: cfb-pulse-ring 1.8s ease-out infinite; } .cfb-pulse::after { animation-delay: 0.9s; } @keyframes cfb-pulse-ring { 0% { transform: scale(1); opacity: 1; } 100% { transform: scale(1.7); opacity: 0; } } .cfb-pulse:hover { filter: brightness(1.08); } .cfb-pulse:focus-visible { outline: 2px solid #fff; outline-offset: 4px; } .cfb-pulse svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; } @media (prefers-reduced-motion: reduce) { .cfb-pulse, .cfb-pulse * { animation: none !important; } } ``` ### 20. Morphing FAB **Type:** Pure CSS **Description:** The circle morphs into a search input on hover — width and border-radius animate together, the icon sliding to the left edge. Premium micro-interaction. **HTML:** ```html ``` **CSS:** ```css .cfb-morph { position: relative; display: inline-block; height: 52px; } .cfb-morph input { width: 52px; height: 52px; padding: 0 16px 0 48px; border: 0; outline: none; background: linear-gradient(135deg, #2eb88a, #06b6d4); border-radius: 26px; color: #fff; font: 500 14px/52px system-ui, sans-serif; box-shadow: 0 6px 16px rgba(46,184,138,0.35); cursor: pointer; transition: width 0.4s cubic-bezier(0.65,0,0.35,1), padding 0.4s, background 0.3s; } .cfb-morph input::placeholder { color: rgba(255,255,255,0.7); } .cfb-morph:hover input, .cfb-morph input:focus { width: 240px; cursor: text; } .cfb-morph-icon { position: absolute; top: 50%; left: 16px; transform: translateY(-50%); pointer-events: none; } .cfb-morph-icon svg { width: 20px; height: 20px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; } ``` ### 21. Labeled Pill **Type:** Pure CSS **Description:** Pill-shape with icon + text label ("+ New project") — wider than a circle, more discoverable for first-time users. Common pattern in modern dashboards. **HTML:** ```html ``` **CSS:** ```css .cfb-pill { display: inline-flex; align-items: center; gap: 8px; padding: 14px 22px 14px 18px; border: 0; border-radius: 999px; background: linear-gradient(135deg, #7c6cff, #ff6c8a); color: #fff; font: 600 14px/1 system-ui, sans-serif; cursor: pointer; box-shadow: 0 6px 18px rgba(124,108,255,0.35); transition: transform 0.25s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.25s, filter 0.2s; } .cfb-pill:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(124,108,255,0.45); filter: brightness(1.05); } .cfb-pill:active { transform: translateY(0); } .cfb-pill:focus-visible { outline: 2px solid #fff; outline-offset: 3px; } .cfb-pill svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; } ``` ### 22. Scroll to Top **Type:** Pure CSS **Description:** Up-arrow FAB with a subtle bounce on hover — the canonical "back to top" affordance. Keyboard accessible, focus-visible ring, semantic anchor. **HTML:** ```html ``` **CSS:** ```css .cfb-top { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; background: #1a1a28; border: 1px solid rgba(255,255,255,0.1); border-radius: 12px; color: #cbd5e1; text-decoration: none; cursor: pointer; box-shadow: 0 4px 14px rgba(0,0,0,0.4); transition: transform 0.25s, background 0.2s, border-color 0.2s, color 0.2s; } .cfb-top:hover { transform: translateY(-4px); background: rgba(124,108,255,0.12); border-color: rgba(124,108,255,0.4); color: #a78bfa; animation: cfb-top-bounce 0.6s ease-in-out infinite alternate; } .cfb-top:focus-visible { outline: 2px solid #7c6cff; outline-offset: 3px; } .cfb-top svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; } @keyframes cfb-top-bounce { from { transform: translateY(-4px); } to { transform: translateY(-7px); } } @media (prefers-reduced-motion: reduce) { .cfb-top, .cfb-top * { animation: none !important; } } ``` ### 23. Neon Cyber **Type:** Pure CSS **Description:** Synthwave neon outline FAB that intensifies on hover — perfect for cyberpunk, gaming, and developer-tool aesthetics. Dark backdrop assumed. **HTML:** ```html ``` **CSS:** ```css .cfb-neon { width: 56px; height: 56px; border: 1.5px solid #6cffff; border-radius: 50%; background: rgba(10,0,20,0.85); color: #6cffff; cursor: pointer; display: flex; align-items: center; justify-content: center; box-shadow: 0 0 12px rgba(108,255,255,0.4), inset 0 0 8px rgba(108,255,255,0.15); transition: box-shadow 0.25s, color 0.25s, border-color 0.25s, transform 0.2s; } .cfb-neon:hover { border-color: #ff6cff; color: #ff6cff; box-shadow: 0 0 24px rgba(255,108,255,0.7), 0 0 48px rgba(255,108,255,0.3), inset 0 0 12px rgba(255,108,255,0.2); transform: scale(1.05); } .cfb-neon:focus-visible { outline: 2px solid #ff6cff; outline-offset: 4px; } .cfb-neon svg { width: 22px; height: 22px; fill: currentColor; stroke: currentColor; stroke-width: 1; stroke-linejoin: round; } ``` ### 24. Glass FAB **Type:** Pure CSS **Description:** Frosted-glass FAB with backdrop blur — sits beautifully over hero images, gradients, and patterned backgrounds. Border softens on hover. **HTML:** ```html
    ``` **CSS:** ```css .cfb-glass-bg { display: flex; align-items: center; justify-content: center; padding: 24px; border-radius: 16px; background: linear-gradient(135deg, #2a1a4a 0%, #4a2a6a 50%, #ff6c8a 100%); min-height: 100vh; } .cfb-glass { width: 52px; height: 52px; border: 1px solid rgba(255,255,255,0.25); border-radius: 50%; background: rgba(255,255,255,0.12); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; box-shadow: 0 8px 24px rgba(0,0,0,0.25); transition: background 0.25s, border-color 0.25s, transform 0.25s; } .cfb-glass:hover { background: rgba(255,255,255,0.22); border-color: rgba(255,255,255,0.45); transform: translateY(-2px); } .cfb-glass:focus-visible { outline: 2px solid #fff; outline-offset: 3px; } .cfb-glass svg { width: 20px; height: 20px; fill: currentColor; } ``` ### 25. Brutalist Stamp **Type:** Pure CSS **Description:** Hard-edged offset shadow, monospace text, zero radius — the brutalist FAB. Press collapses into the shadow on focus / active for tactile feedback. **HTML:** ```html ``` **CSS:** ```css .cfb-brut { display: inline-flex; align-items: center; justify-content: center; padding: 16px 22px; border: 2.5px solid #1a1a2e; background: #f0eeff; color: #1a1a2e; font: 800 14px/1 'Courier New', monospace; letter-spacing: 0.14em; cursor: pointer; box-shadow: 6px 6px 0 #ff6c8a; transition: transform 0.1s, box-shadow 0.1s; } .cfb-brut:hover { transform: translate(-1px,-1px); box-shadow: 7px 7px 0 #ff6c8a; } .cfb-brut:active, .cfb-brut:focus-visible { transform: translate(6px,6px); box-shadow: 0 0 0 #ff6c8a; outline: none; } ``` ### 26. Notification Badge **Type:** Pure CSS **Description:** FAB with a pulsing red badge showing unread count — pure CSS. The badge uses a separate keyframe so the underlying button stays static. **HTML:** ```html ``` **CSS:** ```css .cfb-badge { position: relative; width: 52px; height: 52px; border: 0; border-radius: 50%; background: linear-gradient(135deg, #06b6d4, #0ea5e9); color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 16px rgba(6,182,212,0.35); transition: transform 0.25s, box-shadow 0.25s; } .cfb-badge:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(6,182,212,0.5); } .cfb-badge:focus-visible { outline: 2px solid #fff; outline-offset: 3px; } .cfb-badge svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; } .cfb-badge-dot { position: absolute; top: -4px; right: -4px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: #ff5d6c; color: #fff; font: 700 11px/22px 'JetBrains Mono', monospace; text-align: center; border: 2px solid #111118; box-shadow: 0 0 0 0 rgba(255,93,108,0.7); animation: cfb-badge-ping 1.6s ease-out infinite; } @keyframes cfb-badge-ping { 0%,100% { box-shadow: 0 0 0 0 rgba(255,93,108,0.6); } 50% { box-shadow: 0 0 0 8px rgba(255,93,108,0); } } @media (prefers-reduced-motion: reduce) { .cfb-badge, .cfb-badge * { animation: none !important; } } ``` ### 27. Loading Spinner **Type:** CSS + JS **Description:** Click triggers a loading state — the icon swaps for a spinner, button is disabled, returns to ready after 1.5s. Demonstrates the async-action FAB pattern. **HTML:** ```html ``` **CSS:** ```css .cfb-load { position: relative; width: 52px; height: 52px; border: 0; border-radius: 50%; background: linear-gradient(135deg, #2eb88a, #06b6d4); color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 16px rgba(46,184,138,0.35); transition: transform 0.2s, opacity 0.2s; } .cfb-load:hover { transform: translateY(-2px); } .cfb-load:focus-visible { outline: 2px solid #fff; outline-offset: 3px; } .cfb-load:disabled { cursor: wait; opacity: 0.85; } .cfb-load svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: opacity 0.2s; } .cfb-load-spin { position: absolute; inset: 14px; border: 2px solid rgba(255,255,255,0.3); border-top-color: #fff; border-radius: 50%; opacity: 0; animation: cfb-load-rot 0.7s linear infinite; } .cfb-load.is-loading .cfb-load-icon { opacity: 0; } .cfb-load.is-loading .cfb-load-spin { opacity: 1; } @keyframes cfb-load-rot { to { transform: rotate(360deg); } } @media (prefers-reduced-motion: reduce) { .cfb-load, .cfb-load * { animation: none !important; } } ``` **JS:** ```js // Loading FAB — click triggers spinner state, returns to ready after 1.5s document.querySelectorAll('[data-cfb-load]').forEach(function (btn) { btn.addEventListener('click', function () { if (btn.classList.contains('is-loading')) return; btn.classList.add('is-loading'); btn.disabled = true; setTimeout(function () { btn.classList.remove('is-loading'); btn.disabled = false; }, 1500); }); }); ``` ### 28. Drag Handle **Type:** Pure CSS **Description:** FAB with a 6-dot grip pattern signaling it\u2019s draggable. cursor: grab (and grabbing on :active) makes the affordance unmistakable. **HTML:** ```html ``` **CSS:** ```css .cfb-drag { width: 44px; height: 44px; border: 1px solid rgba(255,255,255,0.1); border-radius: 12px; background: #1a1a28; color: #b8b6d4; cursor: grab; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 12px rgba(0,0,0,0.3); transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.15s; } .cfb-drag:hover { background: rgba(124,108,255,0.1); border-color: rgba(124,108,255,0.4); color: #a78bfa; } .cfb-drag:active { cursor: grabbing; transform: scale(0.95); } .cfb-drag:focus-visible { outline: 2px solid #7c6cff; outline-offset: 3px; } .cfb-drag svg { width: 18px; height: 18px; fill: currentColor; } ``` ### 29. Voice Action **Type:** CSS + JS **Description:** Mic FAB that toggles a recording state on click — pulses a red halo while "listening". aria-pressed reflects state for screen readers. **HTML:** ```html ``` **CSS:** ```css .cfb-voice { position: relative; width: 56px; height: 56px; border: 0; border-radius: 50%; background: #1a1a28; border: 1px solid rgba(255,255,255,0.12); color: #a78bfa; cursor: pointer; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 14px rgba(0,0,0,0.35); transition: background 0.2s, border-color 0.2s, color 0.2s; } .cfb-voice:hover { background: #1f1f2e; border-color: rgba(167,139,250,0.4); } .cfb-voice:focus-visible { outline: 2px solid #7c6cff; outline-offset: 3px; } .cfb-voice svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; } .cfb-voice[aria-pressed="true"] { background: linear-gradient(135deg, #ff6c8a, #ff5d6c); border-color: transparent; color: #fff; } .cfb-voice[aria-pressed="true"]::before, .cfb-voice[aria-pressed="true"]::after { content: ''; position: absolute; inset: 0; border-radius: 50%; border: 2px solid rgba(255,108,138,0.6); animation: cfb-voice-pulse 1.4s ease-out infinite; } .cfb-voice[aria-pressed="true"]::after { animation-delay: 0.7s; } @keyframes cfb-voice-pulse { 0% { transform: scale(1); opacity: 1; } 100% { transform: scale(1.6); opacity: 0; } } @media (prefers-reduced-motion: reduce) { .cfb-voice, .cfb-voice * { animation: none !important; } } ``` **JS:** ```js // Voice FAB — toggle aria-pressed (mock recording state for the demo) document.querySelectorAll('[data-cfb-voice]').forEach(function (btn) { btn.addEventListener('click', function () { var on = btn.getAttribute('aria-pressed') === 'true'; btn.setAttribute('aria-pressed', on ? 'false' : 'true'); btn.setAttribute('aria-label', on ? 'Start voice input' : 'Stop voice input'); // Hook real Web Speech API here: // const rec = new (window.SpeechRecognition || window.webkitSpeechRecognition)(); }); }); ``` ### 30. Premium Aurora **Type:** Pure CSS **Description:** A soft aurora gradient drifts gently behind the FAB on a 14s loop — the "this is a premium product" floating button. Gentle motion, no chromatic spin. **HTML:** ```html ``` **CSS:** ```css .cfb-aurora { position: relative; width: 56px; height: 56px; border: 0; border-radius: 50%; background: #15151d; color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; overflow: hidden; isolation: isolate; box-shadow: 0 6px 18px rgba(0,0,0,0.5); } .cfb-aurora::before { content: ''; position: absolute; top: -40%; left: -20%; width: 140%; height: 220%; background: radial-gradient(ellipse 60px 50px at 20% 50%, rgba(124,108,255,0.7), transparent 60%), radial-gradient(ellipse 50px 40px at 60% 50%, rgba(255,108,138,0.6), transparent 60%), radial-gradient(ellipse 60px 50px at 100% 50%, rgba(46,204,138,0.45), transparent 60%); filter: blur(8px); z-index: -1; animation: cfb-aurora-drift 14s ease-in-out infinite; } .cfb-aurora:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(124,108,255,0.4); } .cfb-aurora:focus-visible { outline: 2px solid #fff; outline-offset: 3px; } .cfb-aurora svg { width: 22px; height: 22px; fill: currentColor; filter: drop-shadow(0 0 4px rgba(255,255,255,0.4)); } @keyframes cfb-aurora-drift { 0%, 100% { transform: translateX(0) translateY(0); } 50% { transform: translateX(-8%) translateY(2%); } } @media (prefers-reduced-motion: reduce) { .cfb-aurora, .cfb-aurora * { animation: none !important; } } ``` ### 31. Quick Reply **Type:** Pure CSS **Description:** Click expands into 4 emoji reactions — the messaging-app reaction picker pattern. Uses :focus-within for keyboard accessibility (focus a reaction without it disappearing). **HTML:** ```html
    ``` **CSS:** ```css .cfb-reply { position: relative; } .cfb-reply-main { width: 48px; height: 48px; border: 0; border-radius: 50%; background: linear-gradient(135deg, #f5a623, #ff6c8a); color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 14px rgba(245,166,35,0.35); transition: transform 0.2s; } .cfb-reply-main:hover { transform: scale(1.05); } .cfb-reply-main:focus-visible { outline: 2px solid #fff; outline-offset: 3px; } .cfb-reply-main svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; } .cfb-reply-pop { position: absolute; bottom: calc(100% + 10px); left: 50%; transform: translateX(-50%) scale(0.6); display: flex; gap: 4px; padding: 6px; background: #1a1a28; border: 1px solid rgba(255,255,255,0.12); border-radius: 999px; box-shadow: 0 8px 24px rgba(0,0,0,0.4); opacity: 0; pointer-events: none; transform-origin: center bottom; transition: opacity 0.2s, transform 0.25s cubic-bezier(0.34,1.56,0.64,1); } .cfb-reply:hover .cfb-reply-pop, .cfb-reply:focus-within .cfb-reply-pop { opacity: 1; pointer-events: auto; transform: translateX(-50%) scale(1); } .cfb-reply-pop button { width: 36px; height: 36px; border: 0; border-radius: 50%; background: transparent; font-size: 18px; cursor: pointer; transition: transform 0.15s, background 0.15s; } .cfb-reply-pop button:hover { transform: scale(1.25); background: rgba(255,255,255,0.08); } .cfb-reply-pop button:focus-visible { outline: 2px solid #f5a623; outline-offset: 2px; } ``` ### 32. Square Modern **Type:** Pure CSS **Description:** Squircle (rounded square) FAB with subtle hover tilt — the 2025 design trend that breaks from the always-circular FAB. Apple-inspired. **HTML:** ```html ``` **CSS:** ```css .cfb-square { width: 56px; height: 56px; border: 0; border-radius: 18px; background: linear-gradient(135deg, #1f1f2e, #15151d); color: #cbd5e1; cursor: pointer; display: flex; align-items: center; justify-content: center; border: 1px solid rgba(255,255,255,0.08); box-shadow: 0 8px 24px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.06); transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.25s, color 0.2s, border-color 0.2s; } .cfb-square:hover { transform: rotate(-6deg) translateY(-3px); color: #a78bfa; border-color: rgba(167,139,250,0.4); box-shadow: 0 12px 32px rgba(124,108,255,0.3), inset 0 1px 0 rgba(255,255,255,0.08); } .cfb-square:active { transform: rotate(0) translateY(0); } .cfb-square:focus-visible { outline: 2px solid #7c6cff; outline-offset: 3px; } .cfb-square svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; } ``` --- ## 15 CSS Footer Designs URL: https://codefronts.com/layouts/css-footer-designs/ Description: 15 hand-coded CSS footer designs — aurora-drift, newspaper masthead, mega multi-column, CTA stripe, trust badges, vinyl record, neon sign, FAQ drawer, language switcher, hover wave and more. Copy-paste ready. Demo count: 15 ### 01. Aurora Drift **Type:** Pure CSS **Description:** Modern SaaS footer with a slowly drifting aurora-band gradient behind a 4-column link grid. Brand block on the left, newsletter capture on the right, gradient meta line at the bottom. Pure CSS, no JS. **HTML:** ```html ``` **CSS:** ```css .cf01 { position: relative; width: 100%; padding: 56px 32px 0; background: #0a0a14; color: #d4d2e8; font-family: ui-sans-serif, system-ui, sans-serif; overflow: hidden; box-sizing: border-box; } .cf01::before { content: ""; position: absolute; top: -100px; left: -10%; width: 120%; height: 220px; background: radial-gradient(60% 100% at 30% 50%, #7c6cff 0%, transparent 70%), radial-gradient(50% 100% at 75% 50%, #ec4899 0%, transparent 70%); filter: blur(60px); opacity: 0.55; animation: cf01-drift 18s ease-in-out infinite alternate; pointer-events: none; } @keyframes cf01-drift { 0% { transform: translateX(-5%); } 100% { transform: translateX(5%); } } .cf01b { position: relative; display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr 1.5fr; gap: 40px; max-width: 1200px; margin: 0 auto; padding-bottom: 40px; border-bottom: 1px solid rgba(255, 255, 255, 0.08); } .cf01brand { min-width: 0; } .cf01logo { display: flex; align-items: center; gap: 8px; font: 800 22px/1 ui-sans-serif, system-ui; color: #fff; margin-bottom: 14px; } .cf01logo span { color: #a78bfa; font-size: 22px; } .cf01tag { margin: 0 0 18px; font-size: 13px; color: #9d9bbf; line-height: 1.5; max-width: 240px; } .cf01social { display: flex; gap: 8px; } .cf01social a { width: 32px; height: 32px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.12); display: flex; align-items: center; justify-content: center; color: #d4d2e8; text-decoration: none; font-size: 14px; transition: background 0.2s, border-color 0.2s; } .cf01social a:hover { background: rgba(167, 139, 250, 0.18); border-color: #a78bfa; color: #fff; } .cf01col { min-width: 0; display: flex; flex-direction: column; gap: 10px; } .cf01col h4 { margin: 0 0 6px; font: 600 12px/1 ui-sans-serif, system-ui; letter-spacing: 0.1em; text-transform: uppercase; color: #fff; } .cf01col a { font-size: 13px; color: #9d9bbf; text-decoration: none; transition: color 0.2s; } .cf01col a:hover { color: #fff; } .cf01news { min-width: 0; } .cf01news h4 { margin: 0 0 6px; font: 600 12px/1 ui-sans-serif, system-ui; letter-spacing: 0.1em; text-transform: uppercase; color: #fff; } .cf01news p { margin: 0 0 12px; font-size: 12px; color: #9d9bbf; } .cf01form { display: flex; gap: 6px; } .cf01form input { flex: 1; min-width: 0; padding: 9px 12px; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 6px; color: #fff; font: 13px ui-sans-serif, system-ui; outline: none; transition: border-color 0.2s, background 0.2s; } .cf01form input:focus { border-color: #a78bfa; background: rgba(255, 255, 255, 0.08); } .cf01form button { padding: 9px 14px; background: linear-gradient(135deg, #7c6cff 0%, #ec4899 100%); border: 0; border-radius: 6px; color: #fff; font: 600 12px ui-sans-serif, system-ui; cursor: pointer; transition: transform 0.15s; } .cf01form button:hover { transform: translateY(-1px); } .cf01meta { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 20px; max-width: 1200px; margin: 0 auto; padding: 18px 0 22px; font-size: 12px; color: #6a6890; flex-wrap: wrap; } .cf01legal { display: flex; gap: 18px; } .cf01legal a { color: #9d9bbf; text-decoration: none; transition: color 0.2s; } .cf01legal a:hover { color: #fff; } @media (max-width: 880px) { .cf01b { grid-template-columns: 1fr 1fr; } .cf01brand, .cf01news { grid-column: span 2; } } @media (max-width: 480px) { .cf01b { grid-template-columns: 1fr; } .cf01brand, .cf01news { grid-column: auto; } } @media (prefers-reduced-motion: reduce) { .cf01::before { animation: none; } } ``` ### 02. Newspaper Masthead **Type:** Pure CSS **Description:** Editorial publishing-house footer styled as a newspaper masthead. Serif drop-cap brand glyph on cream stock, gilt double rules, three-column section list. Pure CSS, no JS. **HTML:** ```html ``` **CSS:** ```css .cf02 { width: 100%; padding: 0 32px; background: #f5ead0; color: #1a1a1a; font-family: ui-serif, "Times New Roman", Georgia, serif; box-sizing: border-box; } .cf02rule { height: 5px; border-top: 1.5px solid #b8860b; border-bottom: 1.5px solid #b8860b; margin: 0; } .cf02b { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 36px; max-width: 1200px; margin: 0 auto; padding: 36px 0 32px; } .cf02brand { display: flex; align-items: flex-start; gap: 14px; min-width: 0; } .cf02drop { font-size: 64px; line-height: 0.85; font-weight: 700; color: #c43a32; padding: 4px 6px 2px; border: 2px solid #1a1a1a; flex-shrink: 0; } .cf02bn { min-width: 0; } .cf02name { font: 700 26px/1.05 ui-serif, "Times New Roman", Georgia, serif; letter-spacing: -0.01em; } .cf02tag { margin-top: 6px; font: italic 12px/1.5 ui-serif, Georgia, serif; color: #5c5240; } .cf02col { display: flex; flex-direction: column; gap: 6px; min-width: 0; } .cf02col h4 { margin: 0 0 8px; font: 700 11px/1 ui-sans-serif, system-ui; letter-spacing: 0.16em; text-transform: uppercase; color: #b8860b; padding-bottom: 6px; border-bottom: 1px solid rgba(26, 26, 26, 0.18); } .cf02col a { font: 14px/1.5 ui-serif, Georgia, serif; color: #1a1a1a; text-decoration: none; transition: color 0.2s; } .cf02col a:hover { color: #c43a32; text-decoration: underline; text-underline-offset: 3px; } .cf02foot { display: flex; align-items: center; justify-content: space-between; gap: 18px; max-width: 1200px; margin: 0 auto; padding: 14px 0 18px; font: italic 12px/1.5 ui-serif, Georgia, serif; color: #5c5240; flex-wrap: wrap; } .cf02legal a { color: #5c5240; text-decoration: none; transition: color 0.2s; } .cf02legal a:hover { color: #c43a32; } @media (max-width: 880px) { .cf02b { grid-template-columns: 1fr 1fr; } .cf02brand { grid-column: span 2; } } @media (max-width: 480px) { .cf02b { grid-template-columns: 1fr; } .cf02brand { grid-column: auto; } } ``` ### 03. Newsletter Hero **Type:** CSS + JS **Description:** Personal blog / creator footer dominated by a centered newsletter capture. Oversized email field, animated checkmark on submit, minimal nav strip below. JS handles the success-state checkmark animation. **HTML:** ```html

    Get one short essay every Friday.

    No promotions. No "growth hacks." Unsubscribe with one click.

    Joined by 4,128 readers
    © 2026 Mira Okafor — Personal corner of the internet.
    ``` **CSS:** ```css .cf05 { width: 100%; padding: 64px 24px 28px; background: #fdfaf3; color: #2a2520; font-family: ui-serif, Georgia, serif; box-sizing: border-box; text-align: center; } .cf05hero { max-width: 640px; margin: 0 auto 36px; } .cf05h { margin: 0 0 10px; font: 700 32px/1.2 ui-serif, Georgia, serif; color: #2a2520; letter-spacing: -0.02em; } .cf05p { margin: 0 0 24px; font: 16px/1.55 ui-serif, Georgia, serif; color: #6b6056; } .cf05f { display: flex; gap: 8px; max-width: 480px; margin: 0 auto 16px; } .cf05f input { flex: 1; min-width: 0; padding: 14px 18px; background: #fff; border: 2px solid #2a2520; border-radius: 10px; font: 15px ui-sans-serif, system-ui; color: #2a2520; outline: none; transition: border-color 0.2s; } .cf05f input:focus { border-color: #c43a32; } .cf05f button { position: relative; padding: 14px 22px; background: #2a2520; border: 2px solid #2a2520; border-radius: 10px; color: #fdfaf3; font: 600 14px ui-sans-serif, system-ui; cursor: pointer; transition: background 0.2s, transform 0.15s; min-width: 120px; } .cf05f button:hover { background: #c43a32; border-color: #c43a32; } .cf05f.cf05-ok button { background: #2d8a3e; border-color: #2d8a3e; } .cf05bt { transition: opacity 0.2s; } .cf05ck { position: absolute; top: 50%; left: 50%; width: 22px; height: 22px; transform: translate(-50%, -50%); color: #fdfaf3; opacity: 0; stroke-dasharray: 30; stroke-dashoffset: 30; transition: opacity 0.2s; } .cf05f.cf05-ok .cf05bt { opacity: 0; } .cf05f.cf05-ok .cf05ck { opacity: 1; animation: cf05-draw 0.45s 0.15s forwards ease-out; } @keyframes cf05-draw { to { stroke-dashoffset: 0; } } .cf05count { font: italic 13px ui-serif, Georgia, serif; color: #8a7d6f; } .cf05count strong { color: #2a2520; font-weight: 700; } .cf05n { display: flex; justify-content: center; flex-wrap: wrap; gap: 24px; padding: 22px 0; border-top: 1px solid rgba(42, 37, 32, 0.15); border-bottom: 1px solid rgba(42, 37, 32, 0.15); margin: 0 auto; max-width: 720px; } .cf05n a { font: 14px/1 ui-serif, Georgia, serif; color: #6b6056; text-decoration: none; transition: color 0.2s; } .cf05n a:hover { color: #c43a32; text-decoration: underline; text-underline-offset: 4px; } .cf05meta { margin-top: 18px; font: italic 12px ui-serif, Georgia, serif; color: #8a7d6f; } @media (prefers-reduced-motion: reduce) { .cf05ck { transition: none; animation: none; stroke-dashoffset: 0; } } ``` **JS:** ```js /* Newsletter Hero — submit shows checkmark draw + button color shift, then reverts after 2.6s. Demo only — no actual network call. */ (function () { var form = document.querySelector("[data-cf05]"); if (!form) return; form.addEventListener("submit", function (e) { e.preventDefault(); if (form.classList.contains("cf05-ok")) return; form.classList.add("cf05-ok"); setTimeout(function () { form.classList.remove("cf05-ok"); form.reset(); }, 2600); }); })(); ``` ### 04. Postcard **Type:** Pure CSS **Description:** Travel / lifestyle footer with a Polaroid-style brand card rotated 1.5° on the left, dotted-border "wish you were here" feel, and three column link blocks beside it. Pure CSS, no JS. **HTML:** ```html ``` **CSS:** ```css .cf06 { width: 100%; padding: 56px 32px 28px; background: #ebe3d3; color: #2a2520; font-family: ui-sans-serif, system-ui, sans-serif; box-sizing: border-box; } .cf06b { display: grid; grid-template-columns: 220px 1fr 1fr 1fr; gap: 32px; max-width: 1100px; margin: 0 auto; padding-bottom: 28px; border-bottom: 1.5px dashed rgba(42, 37, 32, 0.25); align-items: flex-start; } .cf06card { background: #fff; padding: 14px 14px 18px; box-shadow: 0 8px 22px rgba(42, 37, 32, 0.18), 0 2px 6px rgba(42, 37, 32, 0.08); transform: rotate(-1.5deg); transition: transform 0.3s; } .cf06card:hover { transform: rotate(0deg) translateY(-2px); } .cf06img { aspect-ratio: 1; background: #c8b89e; display: flex; align-items: center; justify-content: center; font-size: 60px; } .cf06cap { padding-top: 12px; text-align: center; } .cf06cn { font: 700 18px/1.1 "Bradley Hand", "Marker Felt", ui-serif, cursive; color: #2a2520; } .cf06ct { font: 11px/1.4 ui-sans-serif, system-ui; color: #6b6056; margin-top: 3px; letter-spacing: 0.04em; } .cf06col { display: flex; flex-direction: column; gap: 7px; min-width: 0; } .cf06col h4 { margin: 0 0 6px; font: 700 11px/1 ui-sans-serif, system-ui; letter-spacing: 0.18em; text-transform: uppercase; color: #c43a32; } .cf06col a { font-size: 14px; color: #2a2520; text-decoration: none; transition: color 0.2s; } .cf06col a:hover { color: #c43a32; text-decoration: underline; text-underline-offset: 3px; } .cf06meta { max-width: 1100px; margin: 18px auto 0; font: italic 12px ui-serif, Georgia, serif; color: #6b6056; text-align: center; } @media (max-width: 880px) { .cf06b { grid-template-columns: 1fr 1fr; } .cf06card { grid-column: span 2; max-width: 240px; margin: 0 auto; } } @media (max-width: 480px) { .cf06b { grid-template-columns: 1fr; } .cf06card { grid-column: auto; } } @media (prefers-reduced-motion: reduce) { .cf06card { transition: none; } } ``` ### 05. Brutalist Mono **Type:** Pure CSS **Description:** Agency / portfolio footer in brutalist mono — heavy 4px black borders, hard yellow background, hard offset shadows, all-caps labels. Aggressive, confident, and unmistakable. Pure CSS. **HTML:** ```html ``` **CSS:** ```css .cf07 { width: 100%; padding: 36px 32px 24px; background: #fef0c7; color: #0a0a0a; font-family: ui-sans-serif, "Inter", system-ui, sans-serif; box-sizing: border-box; border-top: 4px solid #0a0a0a; } .cf07b { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 24px; max-width: 1200px; margin: 0 auto 28px; padding-bottom: 28px; border-bottom: 4px solid #0a0a0a; } .cf07brand { min-width: 0; padding: 18px 20px; background: #0a0a0a; color: #fef0c7; box-shadow: 6px 6px 0 0 #c43a32; } .cf07mark { font: 900 36px/1 ui-monospace, "SF Mono", monospace; letter-spacing: -0.02em; } .cf07tag { margin-top: 10px; font: 700 11px/1.4 ui-monospace, monospace; letter-spacing: 0.08em; color: #fef0c7; opacity: 0.7; } .cf07col { padding: 18px 20px; background: #fff; border: 3px solid #0a0a0a; box-shadow: 4px 4px 0 0 #0a0a0a; min-width: 0; transition: transform 0.12s ease-out, box-shadow 0.12s ease-out; } .cf07col:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 0 #0a0a0a; } .cf07col h4 { margin: 0 0 12px; font: 900 13px/1 ui-sans-serif, system-ui; letter-spacing: 0.06em; color: #0a0a0a; padding-bottom: 8px; border-bottom: 2px solid #0a0a0a; } .cf07col a { display: block; padding: 4px 0; font: 600 13px/1.5 ui-sans-serif, system-ui; color: #0a0a0a; text-decoration: none; transition: color 0.2s, padding-left 0.2s; } .cf07col a:hover { color: #c43a32; padding-left: 4px; } .cf07cta { display: flex; align-items: center; justify-content: space-between; gap: 18px; max-width: 1200px; margin: 0 auto 24px; padding: 18px 22px; background: #c43a32; color: #fef0c7; border: 3px solid #0a0a0a; box-shadow: 6px 6px 0 0 #0a0a0a; flex-wrap: wrap; } .cf07cta span { font: 900 14px/1 ui-sans-serif, system-ui; letter-spacing: 0.04em; } .cf07cta a { font: 900 16px/1 ui-monospace, monospace; color: #fef0c7; text-decoration: none; letter-spacing: -0.01em; transition: color 0.2s; } .cf07cta a:hover { color: #fff; } .cf07meta { display: flex; justify-content: space-between; gap: 18px; max-width: 1200px; margin: 0 auto; font: 700 11px/1 ui-monospace, monospace; letter-spacing: 0.08em; flex-wrap: wrap; } @media (max-width: 880px) { .cf07b { grid-template-columns: 1fr 1fr; } .cf07brand { grid-column: span 2; } } @media (max-width: 480px) { .cf07b { grid-template-columns: 1fr; } .cf07brand { grid-column: auto; } .cf07cta { flex-direction: column; align-items: flex-start; } } @media (prefers-reduced-motion: reduce) { .cf07col { transition: none; } } ``` ### 06. Vinyl Record **Type:** Pure CSS **Description:** Music / podcast brand footer with a slowly spinning vinyl record on the left and a static tonearm resting on it. Three column link sections to the right. CSS animation drives the spin; respects prefers-reduced-motion. **HTML:** ```html ``` **CSS:** ```css .cf11 { width: 100%; padding: 48px 32px 24px; background: #1c1814; color: #e8d5a8; font-family: ui-serif, Georgia, serif; box-sizing: border-box; } .cf11b { display: grid; grid-template-columns: 220px 1fr; gap: 40px; max-width: 1100px; margin: 0 auto 24px; align-items: center; padding-bottom: 28px; border-bottom: 1px solid rgba(232, 213, 168, 0.15); } .cf11player { position: relative; width: 220px; height: 220px; } .cf11disc { width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(circle, #1c1814 0%, #1c1814 32%, #0a0807 33%, #0a0807 100%); position: relative; box-shadow: inset 0 0 0 1px rgba(232, 213, 168, 0.18), 0 6px 24px rgba(0, 0, 0, 0.6); animation: cf11-spin 5s linear infinite; } .cf11disc::before { content: ""; position: absolute; inset: 6px; border-radius: 50%; background: repeating-radial-gradient( circle, transparent 0 4px, rgba(232, 213, 168, 0.04) 4px 5px ); pointer-events: none; } .cf11disc::after { content: ""; position: absolute; top: 50%; left: 50%; width: 8px; height: 8px; transform: translate(-50%, -50%); background: #1c1814; border-radius: 50%; border: 1px solid rgba(232, 213, 168, 0.4); } .cf11label { position: absolute; top: 50%; left: 50%; width: 70px; height: 70px; transform: translate(-50%, -50%); background: #c43a32; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; } .cf11ln { font: 700 9px/1 ui-serif, Georgia, serif; color: #fef0c7; letter-spacing: 0.06em; } .cf11ld { font: 8px/1 ui-serif, Georgia, serif; color: rgba(254, 240, 199, 0.7); margin-top: 2px; letter-spacing: 0.04em; } @keyframes cf11-spin { to { transform: rotate(360deg); } } .cf11arm { position: absolute; top: -10px; right: -22px; width: 130px; height: 16px; transform-origin: right center; transform: rotate(-22deg); pointer-events: none; } .cf11pivot { position: absolute; right: 0; top: 0; width: 16px; height: 16px; background: #b8860b; border-radius: 50%; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.5); } .cf11needle { position: absolute; left: 0; top: 7px; width: 110px; height: 3px; background: #d4af37; border-radius: 1px; } .cf11needle::before { content: ""; position: absolute; left: -2px; top: -2px; width: 7px; height: 7px; background: #d4af37; border-radius: 50%; } .cf11side { min-width: 0; display: flex; flex-direction: column; gap: 22px; } .cf11brand { min-width: 0; } .cf11logo { font: 700 22px/1 ui-serif, Georgia, serif; color: #e8d5a8; margin-bottom: 8px; } .cf11brand p { margin: 0 0 12px; font: italic 14px/1.55 ui-serif, Georgia, serif; color: #c4ad7a; } .cf11platforms { font-size: 12px; } .cf11platforms a { color: #d4af37; text-decoration: none; transition: color 0.2s; } .cf11platforms a:hover { color: #fef0c7; text-decoration: underline; text-underline-offset: 3px; } .cf11platforms span { color: #6b5e3f; margin: 0 4px; } .cf11cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; } .cf11col { display: flex; flex-direction: column; gap: 7px; min-width: 0; } .cf11col h4 { margin: 0 0 4px; font: 700 11px/1 ui-sans-serif, system-ui; letter-spacing: 0.16em; text-transform: uppercase; color: #d4af37; } .cf11col a { font: 13px/1.5 ui-serif, Georgia, serif; color: #e8d5a8; text-decoration: none; transition: color 0.2s; } .cf11col a:hover { color: #fef0c7; } .cf11meta { max-width: 1100px; margin: 0 auto; font: italic 12px ui-serif, Georgia, serif; color: #6b5e3f; text-align: center; } @media (max-width: 880px) { .cf11b { grid-template-columns: 1fr; } .cf11player { margin: 0 auto; } .cf11cols { grid-template-columns: 1fr 1fr; } } @media (max-width: 480px) { .cf11cols { grid-template-columns: 1fr; } } @media (prefers-reduced-motion: reduce) { .cf11disc { animation: none; } } ``` ### 07. Neon Sign **Type:** Pure CSS **Description:** Nightlife / gaming brand footer with an animated neon-tube wordmark that flickers irregularly, hot-pink glow halo, dark-room backdrop. Three column link sections in muted neon. Pure CSS keyframes drive the flicker. **HTML:** ```html ``` **CSS:** ```css .cf12 { position: relative; width: 100%; padding: 56px 32px 26px; background: #0a0612; color: #e0c8e8; font-family: "Bebas Neue", "Oswald", ui-sans-serif, system-ui, sans-serif; overflow: hidden; box-sizing: border-box; text-align: center; } .cf12bg { position: absolute; inset: 0; background: radial-gradient(circle at 50% 30%, rgba(236, 72, 153, 0.25) 0%, transparent 50%), repeating-linear-gradient(180deg, transparent 0 1px, rgba(255, 255, 255, 0.02) 1px 2px); pointer-events: none; } .cf12brand { position: relative; padding-bottom: 32px; } .cf12sign { margin: 0; font: 800 60px/1 "Bebas Neue", "Oswald", ui-sans-serif, system-ui, sans-serif; color: #ff3df5; letter-spacing: 0.08em; text-shadow: 0 0 8px #ff3df5, 0 0 18px #ff3df5, 0 0 36px rgba(255, 61, 245, 0.6), 0 0 60px rgba(255, 61, 245, 0.3); animation: cf12-flicker 5s infinite; } .cf12sign span { color: #3df5ff; text-shadow: 0 0 8px #3df5ff, 0 0 18px #3df5ff, 0 0 36px rgba(61, 245, 255, 0.6); margin: 0 4px; } @keyframes cf12-flicker { 0%, 18%, 22%, 25%, 53%, 57%, 100% { opacity: 1; text-shadow: 0 0 8px #ff3df5, 0 0 18px #ff3df5, 0 0 36px rgba(255, 61, 245, 0.6), 0 0 60px rgba(255, 61, 245, 0.3); } 20%, 24%, 55% { opacity: 0.6; text-shadow: none; } } .cf12sub { position: relative; margin: 14px 0 0; font: 500 13px/1 ui-sans-serif, system-ui; color: #a78bfa; letter-spacing: 0.18em; text-transform: uppercase; } .cf12b { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px; max-width: 720px; margin: 0 auto 32px; padding-top: 32px; border-top: 1px solid rgba(167, 139, 250, 0.2); } .cf12col { display: flex; flex-direction: column; gap: 8px; min-width: 0; } .cf12col h4 { margin: 0 0 6px; font: 700 12px/1 ui-sans-serif, system-ui; letter-spacing: 0.18em; text-transform: uppercase; color: #ff3df5; text-shadow: 0 0 6px rgba(255, 61, 245, 0.5); } .cf12col a { font: 14px/1.5 ui-sans-serif, system-ui; color: #c4b5fd; text-decoration: none; letter-spacing: 0.04em; transition: color 0.2s, text-shadow 0.2s; } .cf12col a:hover { color: #fff; text-shadow: 0 0 6px rgba(255, 255, 255, 0.8); } .cf12meta { position: relative; font: 500 11px/1 ui-sans-serif, system-ui; color: #6a5a8a; letter-spacing: 0.12em; text-transform: uppercase; } @media (max-width: 480px) { .cf12sign { font-size: 44px; } .cf12b { grid-template-columns: 1fr; gap: 22px; } } @media (prefers-reduced-motion: reduce) { .cf12sign { animation: none; } } ``` ### 08. Editorial Centered **Type:** Pure CSS **Description:** Minimalist single-column footer anchored by an oversized centered wordmark. A single hairline rule sits above the brand; below it, five links separated by mid-dot dividers; below that, a small italic copyright. Personal-brand and boutique-studio aesthetic. Pure CSS, no JS. **HTML:** ```html ``` **CSS:** ```css .cf16 { width: 100%; padding: 64px 32px 48px; background: #fafaf7; color: #1a1a1a; font-family: ui-serif, Georgia, "Times New Roman", serif; box-sizing: border-box; text-align: center; } .cf16inner { max-width: 720px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; } .cf16rule { width: 64px; height: 1px; background: #1a1a1a; margin-bottom: 36px; opacity: 0.5; } .cf16wordmark { font-family: ui-serif, Georgia, "Times New Roman", serif; font-weight: 700; font-size: 48px; line-height: 1; letter-spacing: -0.02em; color: #1a1a1a; margin-bottom: 28px; } .cf16nav { display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: 14px; margin-bottom: 32px; } .cf16nav a { font-family: ui-sans-serif, system-ui, sans-serif; font-weight: 500; font-size: 14px; letter-spacing: 0.01em; color: #4a4a4a; text-decoration: none; transition: color 0.2s; } .cf16nav a:hover { color: #1a1a1a; } .cf16nav span { color: #c4c4c4; font-size: 14px; user-select: none; } .cf16meta { font-family: ui-serif, Georgia, "Times New Roman", serif; font-style: italic; font-size: 13px; color: #8a8a8a; } @media (max-width: 600px) { .cf16 { padding: 48px 24px 36px; } .cf16wordmark { font-size: 38px; } .cf16nav { gap: 10px; } .cf16nav a { font-size: 13px; } } ``` ### 09. Mega Footer **Type:** Pure CSS **Description:** Wide 5-column mega footer for content-heavy sites — Stripe / Shopify scale. Brand block, four link columns, newsletter, social rail, region/language picker, compliance badges, full meta line. Pure CSS, no JS. **HTML:** ```html ``` **CSS:** ```css .cf17 { width: 100%; padding: 56px 32px 22px; background: #0c1014; color: #c8cdd4; font-family: ui-sans-serif, "Inter", system-ui, sans-serif; box-sizing: border-box; } .cf17top { display: grid; grid-template-columns: 1.5fr 3fr; gap: 40px; max-width: 1280px; margin: 0 auto 36px; padding-bottom: 32px; border-bottom: 1px solid rgba(255, 255, 255, 0.08); } .cf17brand { min-width: 0; } .cf17logo { font: 800 24px/1 ui-sans-serif, system-ui; color: #fff; letter-spacing: -0.01em; margin-bottom: 12px; } .cf17brand p { margin: 0 0 18px; font-size: 14px; color: #8a93a0; line-height: 1.5; max-width: 320px; } .cf17nf { display: flex; gap: 6px; margin-bottom: 18px; max-width: 320px; } .cf17nf input { flex: 1; min-width: 0; padding: 9px 12px; background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 6px; color: #fff; font: 13px ui-sans-serif, system-ui; outline: none; transition: border-color 0.2s; } .cf17nf input:focus { border-color: #3b82f6; } .cf17nf button { padding: 9px 14px; background: #3b82f6; border: 0; border-radius: 6px; color: #fff; font: 600 12px ui-sans-serif, system-ui; cursor: pointer; transition: background 0.2s; white-space: nowrap; } .cf17nf button:hover { background: #2563eb; } .cf17social { display: flex; gap: 8px; flex-wrap: wrap; } .cf17social a { width: 32px; height: 32px; border-radius: 8px; background: rgba(255, 255, 255, 0.05); display: flex; align-items: center; justify-content: center; color: #c8cdd4; text-decoration: none; font-size: 14px; transition: background 0.2s, color 0.2s; } .cf17social a:hover { background: #3b82f6; color: #fff; } .cf17cols { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; min-width: 0; } .cf17col { display: flex; flex-direction: column; gap: 9px; min-width: 0; } .cf17col h4 { margin: 0 0 6px; font: 600 12px/1 ui-sans-serif, system-ui; letter-spacing: 0.06em; text-transform: uppercase; color: #fff; } .cf17col a { font-size: 13px; color: #8a93a0; text-decoration: none; transition: color 0.2s; display: flex; align-items: center; gap: 8px; } .cf17col a:hover { color: #fff; } .cf17badge { display: inline-block; padding: 1px 7px; background: #3b82f6; border-radius: 999px; font: 700 10px/1.4 ui-sans-serif, system-ui; color: #fff; } .cf17bot { display: flex; align-items: center; justify-content: space-between; gap: 18px; max-width: 1280px; margin: 0 auto 18px; padding-bottom: 16px; border-bottom: 1px solid rgba(255, 255, 255, 0.06); flex-wrap: wrap; } .cf17trust { display: flex; gap: 10px; flex-wrap: wrap; } .cf17b1 { padding: 5px 12px; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 999px; font: 700 11px/1 ui-sans-serif, system-ui; color: #c8cdd4; letter-spacing: 0.04em; } .cf17region { display: flex; align-items: center; gap: 8px; } .cf17region select { padding: 7px 10px; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 6px; color: #c8cdd4; font: 12px ui-sans-serif, system-ui; cursor: pointer; } .cf17meta { display: flex; justify-content: space-between; gap: 18px; max-width: 1280px; margin: 0 auto; font-size: 12px; color: #6a7280; flex-wrap: wrap; } .cf17legal { display: flex; gap: 16px; flex-wrap: wrap; } .cf17legal a { color: #8a93a0; text-decoration: none; transition: color 0.2s; } .cf17legal a:hover { color: #fff; } @media (max-width: 880px) { .cf17top { grid-template-columns: 1fr; } .cf17cols { grid-template-columns: 1fr 1fr; } } @media (max-width: 480px) { .cf17cols { grid-template-columns: 1fr; } } ``` ### 10. Contact Card **Type:** Pure CSS **Description:** Local-business / professional-services footer with prominent contact card. Address, phone, email, business hours, and a stylized SVG map block. Two-column layout with a quick-links column on the right. Pure CSS. **HTML:** ```html

    Architecture & interior design · Brooklyn NY

    📍
    Visit
    247 Atlantic Ave
    Brooklyn, NY 11217
    📞
    Call
    +1 (718) 555-0247
    Mon–Fri 9am–6pm
    Email
    hello@northway.studio
    press@northway.studio
    Hours
    Tue–Sat 10am–5pm
    Sun–Mon by appointment
    View directions →
    © 2026 Northway Studio LLC
    ``` **CSS:** ```css .cf18 { width: 100%; padding: 48px 32px 22px; background: #faf6ed; color: #2a2520; font-family: ui-serif, Georgia, serif; box-sizing: border-box; } .cf18b { display: grid; grid-template-columns: 2fr 1fr; gap: 36px; max-width: 1100px; margin: 0 auto 28px; padding-bottom: 28px; border-bottom: 1px solid rgba(42, 37, 32, 0.18); } .cf18contact { min-width: 0; } .cf18head { margin-bottom: 24px; } .cf18logo { font: 700 22px/1 ui-serif, Georgia, serif; color: #2a2520; margin-bottom: 6px; letter-spacing: -0.01em; } .cf18head p { margin: 0; font: italic 13px/1.4 ui-serif, Georgia, serif; color: #6b6056; } .cf18grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; min-width: 0; } .cf18item { display: flex; gap: 12px; align-items: flex-start; min-width: 0; } .cf18ico { font-size: 18px; flex-shrink: 0; line-height: 1.4; } .cf18item strong { display: block; font: 700 11px/1 ui-sans-serif, system-ui; letter-spacing: 0.14em; text-transform: uppercase; color: #c43a32; margin-bottom: 5px; } .cf18item div div { font: 14px/1.55 ui-serif, Georgia, serif; color: #2a2520; } .cf18map { min-width: 0; } .cf18map svg { width: 100%; height: auto; aspect-ratio: 1; border-radius: 8px; box-shadow: 0 4px 12px rgba(42, 37, 32, 0.18); } .cf18mc { margin-top: 10px; text-align: center; font: 600 13px/1 ui-sans-serif, system-ui; color: #c43a32; cursor: pointer; } .cf18mc:hover { text-decoration: underline; text-underline-offset: 3px; } .cf18foot { display: flex; align-items: center; justify-content: space-between; gap: 18px; max-width: 1100px; margin: 0 auto; flex-wrap: wrap; font: italic 12px ui-serif, Georgia, serif; color: #6b6056; } .cf18nav { display: flex; gap: 22px; flex-wrap: wrap; } .cf18nav a { font: 14px/1 ui-serif, Georgia, serif; color: #2a2520; text-decoration: none; transition: color 0.2s; } .cf18nav a:hover { color: #c43a32; } @media (max-width: 880px) { .cf18b { grid-template-columns: 1fr; } .cf18map svg { max-width: 280px; margin: 0 auto; display: block; } } @media (max-width: 480px) { .cf18grid { grid-template-columns: 1fr; } } ``` ### 11. Trust Badge Footer **Type:** Pure CSS **Description:** B2B credibility footer with a featured customer testimonial above the link grid, a horizontal customer-logo strip below, and SOC 2 / GDPR / ISO compliance badges. Pure CSS, no JS. **HTML:** ```html
    ★★★★★
    "Cut our deployment time from 2 hours to 7 minutes. The team has been responsive and the platform is rock-solid."
    SK
    Sarah Kim VP Engineering · Atlas Corp

    Trusted by teams at

    STRIPE NOTION LINEAR VERCEL RAYCAST
    SOC 2
    GDPR
    ISO 27001
    © 2026 Stack Inc. — Built in Berlin and Toronto.
    ``` **CSS:** ```css .cf19 { width: 100%; padding: 48px 32px 22px; background: #f8f8f5; color: #1a1a1a; font-family: ui-sans-serif, "Inter", system-ui, sans-serif; box-sizing: border-box; } .cf19top { display: grid; grid-template-columns: 1.2fr 1fr; gap: 36px; max-width: 1200px; margin: 0 auto 32px; padding-bottom: 32px; border-bottom: 1px solid rgba(26, 26, 26, 0.1); } .cf19quote { padding: 22px 24px; background: #fff; border: 1px solid rgba(26, 26, 26, 0.08); border-radius: 12px; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.03); } .cf19stars { color: #f59e0b; font-size: 14px; letter-spacing: 0.08em; margin-bottom: 10px; } .cf19quote blockquote { margin: 0 0 16px; font: 17px/1.55 ui-serif, Georgia, serif; color: #1a1a1a; } .cf19who { display: flex; align-items: center; gap: 12px; } .cf19avatar { width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(135deg, #7c6cff 0%, #ec4899 100%); display: flex; align-items: center; justify-content: center; color: #fff; font: 700 13px ui-sans-serif, system-ui; flex-shrink: 0; } .cf19who strong { display: block; font: 600 13px/1.2 ui-sans-serif, system-ui; } .cf19who span { font: 12px/1.4 ui-sans-serif, system-ui; color: #6a6a6a; } .cf19trust { display: flex; flex-direction: column; gap: 14px; min-width: 0; } .cf19trust h4 { margin: 0; font: 600 11px/1 ui-sans-serif, system-ui; letter-spacing: 0.12em; text-transform: uppercase; color: #6a6a6a; } .cf19logos { display: flex; gap: 22px; flex-wrap: wrap; align-items: center; } .cf19logos span { font: 800 14px/1 ui-sans-serif, "Inter", system-ui; color: #4a4a4a; letter-spacing: 0.04em; opacity: 0.65; transition: opacity 0.2s; } .cf19logos span:hover { opacity: 1; } .cf19badges { display: flex; gap: 10px; margin-top: 4px; flex-wrap: wrap; } .cf19b { padding: 6px 12px; background: #fff; border: 1px solid rgba(26, 26, 26, 0.12); border-radius: 6px; font: 700 11px/1 ui-sans-serif, system-ui; color: #1a1a1a; letter-spacing: 0.04em; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04); } .cf19links { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; max-width: 1200px; margin: 0 auto 24px; } .cf19col { display: flex; flex-direction: column; gap: 8px; min-width: 0; } .cf19col h4 { margin: 0 0 6px; font: 600 11px/1 ui-sans-serif, system-ui; letter-spacing: 0.12em; text-transform: uppercase; color: #1a1a1a; } .cf19col a { font-size: 13px; color: #4a4a4a; text-decoration: none; transition: color 0.2s; } .cf19col a:hover { color: #1a1a1a; text-decoration: underline; text-underline-offset: 3px; } .cf19meta { max-width: 1200px; margin: 0 auto; padding-top: 20px; border-top: 1px solid rgba(26, 26, 26, 0.06); font-size: 12px; color: #8a8a8a; text-align: center; } @media (max-width: 880px) { .cf19top { grid-template-columns: 1fr; } .cf19links { grid-template-columns: 1fr 1fr; } } @media (max-width: 480px) { .cf19links { grid-template-columns: 1fr; } } ``` ### 12. FAQ Drawer **Type:** Pure CSS **Description:** Footer that doubles as a quick-help panel. Top section holds 4 collapsible FAQ entries via native
    /; bottom row has a standard link grid. Pure CSS via the disclosure widget. **HTML:** ```html

    Need a hand?

    How do I get started?+
    Sign up for a free account, install the SDK with one command, and follow the 5-minute Quickstart in our docs.
    What does it cost?+
    The free tier covers up to 10,000 requests/month. Paid plans start at $29/month and scale by usage. See pricing.
    Is there an SLA?+
    Pro and Enterprise plans include a 99.9% uptime SLA with credits if we miss it. Status page lives at status.example.com.
    How do I cancel?+
    Cancel anytime from billing settings. We prorate refunds for annual plans and don't ask why — though we appreciate when you tell us.
    © 2026 Replica Software Read full FAQ →
    ``` **CSS:** ```css .cf20 { width: 100%; padding: 44px 32px 20px; background: #1a1d24; color: #c8cdd4; font-family: ui-sans-serif, system-ui, sans-serif; box-sizing: border-box; } .cf20faq { max-width: 760px; margin: 0 auto 36px; } .cf20h { margin: 0 0 20px; font: 700 22px/1.2 ui-sans-serif, system-ui; color: #fff; text-align: center; letter-spacing: -0.01em; } .cf20d { border-bottom: 1px solid rgba(255, 255, 255, 0.08); padding: 14px 0; } .cf20d:first-of-type { border-top: 1px solid rgba(255, 255, 255, 0.08); } .cf20d summary { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 4px 4px; font: 600 15px/1.4 ui-sans-serif, system-ui; color: #fff; cursor: pointer; list-style: none; } .cf20d summary::-webkit-details-marker { display: none; } .cf20d summary:focus-visible { outline: 2px solid #3b82f6; outline-offset: 4px; border-radius: 4px; } .cf20arr { width: 22px; height: 22px; display: flex; align-items: center; justify-content: center; background: rgba(255, 255, 255, 0.06); border-radius: 50%; font: 600 16px ui-sans-serif, system-ui; color: #c8cdd4; flex-shrink: 0; transition: transform 0.25s, background 0.2s; } .cf20d[open] .cf20arr { transform: rotate(45deg); background: #3b82f6; color: #fff; } .cf20a { padding: 12px 4px 4px; font: 14px/1.65 ui-sans-serif, system-ui; color: #8a93a0; max-width: 600px; } .cf20links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; max-width: 760px; margin: 0 auto 22px; padding-top: 22px; border-top: 1px solid rgba(255, 255, 255, 0.08); } .cf20col { display: flex; flex-direction: column; gap: 7px; min-width: 0; } .cf20col h4 { margin: 0 0 4px; font: 600 11px/1 ui-sans-serif, system-ui; letter-spacing: 0.1em; text-transform: uppercase; color: #fff; } .cf20col a { font-size: 13px; color: #8a93a0; text-decoration: none; transition: color 0.2s; } .cf20col a:hover { color: #fff; } .cf20meta { display: flex; align-items: center; justify-content: space-between; gap: 16px; max-width: 760px; margin: 0 auto; padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, 0.06); font-size: 12px; color: #6a7280; flex-wrap: wrap; } .cf20more { color: #3b82f6; text-decoration: none; font-weight: 600; transition: color 0.2s; } .cf20more:hover { color: #60a5fa; } @media (max-width: 600px) { .cf20links { grid-template-columns: 1fr 1fr; } } @media (max-width: 400px) { .cf20links { grid-template-columns: 1fr; } } ``` ### 13. CTA Stripe **Type:** Pure CSS **Description:** Conversion-driven footer with a bold full-bleed CTA stripe ("Ready to ship?") above a compact link footer. Coral CTA stripe contrasts with the dark base. Pure CSS, no JS. **HTML:** ```html ``` **CSS:** ```css .cf21 { width: 100%; background: #0e0e14; color: #c8cdd4; font-family: ui-sans-serif, "Inter", system-ui, sans-serif; box-sizing: border-box; } .cf21cta { background: linear-gradient(135deg, #ec4899 0%, #f97316 100%); padding: 40px 32px; } .cf21ctab { display: flex; align-items: center; justify-content: space-between; gap: 32px; max-width: 1200px; margin: 0 auto; flex-wrap: wrap; } .cf21ctah h2 { margin: 0 0 8px; font: 800 30px/1.1 ui-sans-serif, "Inter", system-ui; color: #fff; letter-spacing: -0.02em; } .cf21ctah p { margin: 0; font: 16px/1.5 ui-sans-serif, system-ui; color: rgba(255, 255, 255, 0.85); } .cf21btns { display: flex; gap: 12px; flex-wrap: wrap; } .cf21prim { padding: 12px 22px; background: #fff; border-radius: 8px; color: #1a1a1a; font: 700 14px ui-sans-serif, system-ui; text-decoration: none; transition: transform 0.15s, box-shadow 0.15s; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); } .cf21prim:hover { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(0, 0, 0, 0.25); } .cf21sec { padding: 12px 22px; background: rgba(255, 255, 255, 0.12); border: 1px solid rgba(255, 255, 255, 0.3); border-radius: 8px; color: #fff; font: 700 14px ui-sans-serif, system-ui; text-decoration: none; transition: background 0.2s; backdrop-filter: blur(8px); } .cf21sec:hover { background: rgba(255, 255, 255, 0.22); } .cf21foot { padding: 36px 32px 22px; } .cf21b { display: grid; grid-template-columns: 1fr 2fr; gap: 36px; max-width: 1200px; margin: 0 auto; padding-bottom: 24px; border-bottom: 1px solid rgba(255, 255, 255, 0.08); } .cf21brand { min-width: 0; } .cf21logo { font: 800 20px/1 ui-sans-serif, system-ui; color: #fff; letter-spacing: -0.01em; margin-bottom: 8px; } .cf21brand p { margin: 0; font-size: 13px; color: #8a93a0; line-height: 1.5; max-width: 240px; } .cf21cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; min-width: 0; } .cf21col { display: flex; flex-direction: column; gap: 7px; min-width: 0; } .cf21col h4 { margin: 0 0 4px; font: 600 11px/1 ui-sans-serif, system-ui; letter-spacing: 0.1em; text-transform: uppercase; color: #fff; } .cf21col a { font-size: 13px; color: #8a93a0; text-decoration: none; transition: color 0.2s; } .cf21col a:hover { color: #fff; } .cf21meta { display: flex; align-items: center; justify-content: space-between; gap: 18px; max-width: 1200px; margin: 0 auto; padding-top: 18px; font-size: 12px; color: #6a7280; flex-wrap: wrap; } .cf21legal { display: flex; gap: 18px; } .cf21legal a { color: #8a93a0; text-decoration: none; transition: color 0.2s; } .cf21legal a:hover { color: #fff; } @media (max-width: 880px) { .cf21b { grid-template-columns: 1fr; } .cf21cols { grid-template-columns: 1fr 1fr; } } @media (max-width: 480px) { .cf21cols { grid-template-columns: 1fr; } .cf21ctah h2 { font-size: 24px; } } ``` ### 14. Globe Switcher **Type:** Pure CSS **Description:** Global-SaaS footer featuring language, currency, and region pickers above a standard 4-column link grid. Region pills for quick selection. Pure CSS via native
    US EU APAC LATAM
    © 2026 Meridian Payments — Available in 47 countries
    ``` **CSS:** ```css .cf22 { width: 100%; padding: 48px 32px 22px; background: #0a1628; color: #c8d4e8; font-family: ui-sans-serif, "Inter", system-ui, sans-serif; box-sizing: border-box; } .cf22b { max-width: 1200px; margin: 0 auto 28px; padding-bottom: 28px; border-bottom: 1px solid rgba(255, 255, 255, 0.08); } .cf22cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr 1fr; gap: 28px; margin-bottom: 32px; } .cf22brand { min-width: 0; } .cf22logo { font: 800 22px/1 ui-sans-serif, system-ui; color: #fff; letter-spacing: -0.01em; margin-bottom: 10px; } .cf22brand p { margin: 0; font-size: 13px; color: #8a98b8; line-height: 1.5; } .cf22col { display: flex; flex-direction: column; gap: 8px; min-width: 0; } .cf22col h4 { margin: 0 0 4px; font: 600 11px/1 ui-sans-serif, system-ui; letter-spacing: 0.1em; text-transform: uppercase; color: #fff; } .cf22col a { font-size: 13px; color: #8a98b8; text-decoration: none; transition: color 0.2s; } .cf22col a:hover { color: #fff; } .cf22pickers { display: grid; grid-template-columns: 1fr 1fr 1.4fr; gap: 18px; padding: 20px 22px; background: rgba(255, 255, 255, 0.03); border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 12px; } .cf22pick { display: flex; flex-direction: column; gap: 7px; min-width: 0; } .cf22pick label { font: 600 11px/1 ui-sans-serif, system-ui; letter-spacing: 0.06em; color: #c8d4e8; } .cf22pick select { padding: 9px 12px; background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 7px; color: #fff; font: 13px ui-sans-serif, system-ui; cursor: pointer; outline: none; transition: border-color 0.2s; } .cf22pick select:focus { border-color: #60a5fa; } .cf22pills { display: flex; gap: 6px; flex-wrap: wrap; } .cf22pill { padding: 7px 14px; background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 999px; font: 700 12px/1 ui-sans-serif, system-ui; color: #c8d4e8; cursor: pointer; transition: background 0.2s, border-color 0.2s, color 0.2s; } .cf22pill:hover { background: rgba(255, 255, 255, 0.08); color: #fff; } .cf22-on { background: #60a5fa; border-color: #60a5fa; color: #0a1628; } .cf22-on:hover { background: #3b82f6; color: #fff; } .cf22meta { display: flex; justify-content: space-between; gap: 18px; max-width: 1200px; margin: 0 auto; font-size: 12px; color: #6a7a99; flex-wrap: wrap; } .cf22legal { display: flex; gap: 18px; } .cf22legal a { color: #8a98b8; text-decoration: none; transition: color 0.2s; } .cf22legal a:hover { color: #fff; } @media (max-width: 880px) { .cf22cols { grid-template-columns: 1fr 1fr; } .cf22brand { grid-column: span 2; } .cf22pickers { grid-template-columns: 1fr; } } @media (max-width: 480px) { .cf22cols { grid-template-columns: 1fr; } .cf22brand { grid-column: auto; } } ``` ### 15. Hover Wave **Type:** CSS + JS **Description:** Interactive footer where every link grows a smooth wave underline on hover, plus a floating back-to-top button anchored to the corner. JS handles only the back-to-top scroll behavior; the underline is pure CSS. **HTML:** ```html ``` **CSS:** ```css .cf23 { position: relative; width: 100%; padding: 56px 32px 22px; background: #fef9f0; color: #2a2520; font-family: ui-serif, Georgia, serif; box-sizing: border-box; } .cf23top { position: absolute; top: -22px; right: 32px; width: 44px; height: 44px; border-radius: 50%; background: #c43a32; color: #fef9f0; display: flex; align-items: center; justify-content: center; text-decoration: none; box-shadow: 0 6px 18px rgba(196, 58, 50, 0.35); transition: transform 0.2s, box-shadow 0.2s; cursor: pointer; } .cf23top:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(196, 58, 50, 0.45); } .cf23top span { font: 700 22px/1 ui-sans-serif, system-ui; } .cf23b { display: grid; grid-template-columns: 1fr 3fr; gap: 36px; max-width: 1200px; margin: 0 auto 28px; padding-bottom: 28px; border-bottom: 1px solid rgba(42, 37, 32, 0.18); } .cf23brand { min-width: 0; } .cf23logo { font: 700 22px/1 ui-serif, Georgia, serif; color: #2a2520; margin-bottom: 8px; letter-spacing: -0.01em; } .cf23brand p { margin: 0; font: italic 14px/1.55 ui-serif, Georgia, serif; color: #6b6056; max-width: 240px; } .cf23cols { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; min-width: 0; } .cf23col { display: flex; flex-direction: column; gap: 9px; min-width: 0; } .cf23col h4 { margin: 0 0 4px; font: 700 11px/1 ui-sans-serif, system-ui; letter-spacing: 0.14em; text-transform: uppercase; color: #c43a32; } .cf23col a { position: relative; padding-bottom: 4px; font: 14px/1.4 ui-serif, Georgia, serif; color: #2a2520; text-decoration: none; transition: color 0.25s; align-self: flex-start; } .cf23col a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 6px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 6'%3E%3Cpath d='M0 3 Q 3 0 6 3 T 12 3 T 18 3 T 24 3' stroke='%23c43a32' stroke-width='1.5' fill='none'/%3E%3C/svg%3E"); background-repeat: repeat-x; background-size: 12px 6px; background-position: 0 100%; transform-origin: left center; transform: scaleX(0); transition: transform 0.35s cubic-bezier(0.65, 0, 0.35, 1); } .cf23col a:hover { color: #c43a32; } .cf23col a:hover::after { transform: scaleX(1); } .cf23meta { display: flex; align-items: center; justify-content: space-between; gap: 18px; max-width: 1200px; margin: 0 auto; font: italic 12px/1.5 ui-serif, Georgia, serif; color: #8a7d6f; flex-wrap: wrap; } .cf23legal { display: flex; gap: 18px; } .cf23legal a { color: #6b6056; text-decoration: none; transition: color 0.2s; font-style: normal; } .cf23legal a:hover { color: #c43a32; } @media (max-width: 880px) { .cf23b { grid-template-columns: 1fr; } .cf23cols { grid-template-columns: 1fr 1fr; } } @media (max-width: 480px) { .cf23cols { grid-template-columns: 1fr; } } @media (prefers-reduced-motion: reduce) { .cf23col a::after { transition: none; } .cf23top { transition: none; } } ``` **JS:** ```js /* Hover Wave + Back-to-Top — handles only the scroll-to-top behavior; the wave underline is pure CSS. */ (function () { var btn = document.querySelector("[data-cf23-top]"); if (!btn) return; btn.addEventListener("click", function (e) { e.preventDefault(); window.scrollTo({ top: 0, behavior: "smooth" }); }); })(); ``` --- ## 12 CSS Glassmorphism Designs URL: https://codefronts.com/design-styles/css-glassmorphism/ Description: 12 free CSS glassmorphism designs — cards, modals, navigation, form surfaces and layered effects with copy-paste HTML and CSS. Demo count: 12 ### 01. Glass Card **Type:** Pure CSS **Description:** The canonical glass surface — translucent white over a vivid aurora gradient. Backdrop-filter blur is what sells the effect. **HTML:** ```html

    Aurora Pass

    All collections, every generator, premium tools.

    ``` **CSS:** ```css .gm-card-bg { position: relative; padding: 32px; border-radius: 18px; overflow: hidden; background: radial-gradient(ellipse at 18% 20%, #8b5cf6 0%, transparent 55%), radial-gradient(ellipse at 82% 30%, #ec4899 0%, transparent 55%), radial-gradient(ellipse at 50% 90%, #06b6d4 0%, transparent 55%), #0f0f1a; min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; } .gm-card { background: rgba(255, 255, 255, 0.08); -webkit-backdrop-filter: blur(20px) saturate(160%); backdrop-filter: blur(20px) saturate(160%); border: 1px solid rgba(255, 255, 255, 0.18); border-radius: 14px; padding: 22px 24px; color: #f8fafc; box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18); } .gm-card__icon { width: 38px; height: 38px; background: rgba(255, 255, 255, 0.12); border: 1px solid rgba(255, 255, 255, 0.2); border-radius: 10px; display: grid; place-items: center; font-size: 18px; margin-bottom: 14px; } .gm-card__title { margin: 0 0 6px; font: 700 16px/1.2 system-ui, sans-serif; } .gm-card__body { margin: 0 0 14px; font: 12px/1.55 system-ui, sans-serif; opacity: 0.78; } .gm-card__btn { background: rgba(255, 255, 255, 0.16); border: 1px solid rgba(255, 255, 255, 0.25); color: #fff; padding: 8px 16px; border-radius: 8px; font: 600 12px system-ui, sans-serif; cursor: pointer; transition: background 0.2s; } .gm-card__btn:hover { background: rgba(255, 255, 255, 0.28); } ``` ### 02. Frosted Modal **Type:** Pure CSS **Description:** A heavy-blur dialog floating over a busy backdrop — the modal pattern that finally makes sense in 2024+ browsers. **HTML:** ```html

    Confirm action

    Delete this collection? This action cannot be undone.

    ``` **CSS:** ```css .gm-modal-bg { position: relative; padding: 28px; border-radius: 18px; overflow: hidden; background: radial-gradient(circle at 20% 30%, #f97316 0%, transparent 45%), radial-gradient(circle at 80% 70%, #ef4444 0%, transparent 45%), #1a0a0a; min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; } .gm-modal { background: rgba(255, 255, 255, 0.1); -webkit-backdrop-filter: blur(28px) saturate(180%); backdrop-filter: blur(28px) saturate(180%); border: 1px solid rgba(255, 255, 255, 0.22); border-radius: 14px; padding: 18px 20px; color: #fff; box-shadow: 0 16px 48px rgba(0, 0, 0, 0.3); } .gm-modal__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; } .gm-modal__head h3 { margin: 0; font: 700 14px system-ui, sans-serif; } .gm-modal__close { background: none; border: none; color: rgba(255, 255, 255, 0.6); font: 600 22px system-ui; line-height: 1; cursor: pointer; padding: 0; } .gm-modal__close:hover { color: #fff; } .gm-modal__body { margin: 0 0 14px; font: 12px/1.55 system-ui, sans-serif; opacity: 0.78; } .gm-modal__row { display: flex; gap: 8px; justify-content: flex-end; } .gm-modal__btn { background: rgba(255, 255, 255, 0.12); border: 1px solid rgba(255, 255, 255, 0.2); color: #fff; padding: 7px 14px; border-radius: 7px; font: 600 11px system-ui, sans-serif; cursor: pointer; } .gm-modal__btn:hover { background: rgba(255, 255, 255, 0.2); } .gm-modal__btn--danger { background: rgba(239, 68, 68, 0.3); border-color: rgba(239, 68, 68, 0.5); } .gm-modal__btn--danger:hover { background: rgba(239, 68, 68, 0.5); } ``` ### 03. Pricing Glass **Type:** Pure CSS **Description:** Tiered pricing card with featured glass treatment — the middle plan reads "premium" through stronger glass + brighter rim. **HTML:** ```html
    Pro
    $19/mo
    • Unlimited projects
    • Priority support
    • Custom domains
    ``` **CSS:** ```css .gm-price-bg { position: relative; padding: 28px; border-radius: 18px; overflow: hidden; background: radial-gradient(circle at 30% 20%, #14b8a6 0%, transparent 50%), radial-gradient(circle at 80% 80%, #06b6d4 0%, transparent 50%), #042f2e; min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; } .gm-price { background: rgba(255, 255, 255, 0.1); -webkit-backdrop-filter: blur(24px) saturate(180%); backdrop-filter: blur(24px) saturate(180%); border: 1.5px solid rgba(255, 255, 255, 0.28); border-radius: 14px; padding: 18px 20px; color: #fff; box-shadow: 0 12px 36px rgba(20, 184, 166, 0.25); } .gm-price__tag { display: inline-block; background: rgba(255, 255, 255, 0.18); border: 1px solid rgba(255, 255, 255, 0.3); padding: 4px 10px; border-radius: 12px; font: 600 10px system-ui, sans-serif; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 10px; } .gm-price__amount { font: 800 28px/1 system-ui, sans-serif; margin-bottom: 14px; } .gm-price__amount span { font-size: 12px; opacity: 0.65; font-weight: 500; } .gm-price__list { list-style: none; padding: 0; margin: 0 0 14px; font: 12px/1.8 system-ui, sans-serif; opacity: 0.85; } .gm-price__list li::before { content: '✓ '; color: #5eead4; font-weight: 700; } .gm-price__btn { width: 100%; background: rgba(255, 255, 255, 0.18); border: 1px solid rgba(255, 255, 255, 0.32); color: #fff; padding: 9px; border-radius: 8px; font: 600 12px system-ui, sans-serif; cursor: pointer; } .gm-price__btn:hover { background: rgba(255, 255, 255, 0.3); } ``` ### 04. Glass Navbar **Type:** Pure CSS **Description:** Sticky navbar that stays translucent over any page background — backdrop-filter saturate boosts the colors behind to keep contrast. **HTML:** ```html
    ``` **CSS:** ```css .gm-nav-bg { position: relative; padding: 8px; border-radius: 18px; overflow: hidden; background: radial-gradient(circle at 25% 50%, #6366f1 0%, transparent 50%), radial-gradient(circle at 75% 50%, #ec4899 0%, transparent 50%), #1a1426; min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; } .gm-nav { display: flex; align-items: center; gap: 4px; background: rgba(255, 255, 255, 0.08); -webkit-backdrop-filter: blur(18px) saturate(180%); backdrop-filter: blur(18px) saturate(180%); border: 1px solid rgba(255, 255, 255, 0.15); border-radius: 12px; padding: 6px 10px; } .gm-nav__logo { font: 700 13px system-ui, sans-serif; color: #fff; margin-right: 12px; } .gm-nav__link { font: 500 12px system-ui, sans-serif; color: rgba(255, 255, 255, 0.7); text-decoration: none; padding: 6px 12px; border-radius: 7px; transition: background 0.2s, color 0.2s; } .gm-nav__link:hover { background: rgba(255, 255, 255, 0.1); color: #fff; } .gm-nav__link--active { background: rgba(255, 255, 255, 0.18); color: #fff; } .gm-nav__cta { margin-left: auto; background: rgba(255, 255, 255, 0.2); border: 1px solid rgba(255, 255, 255, 0.3); color: #fff; padding: 6px 14px; border-radius: 7px; font: 600 12px system-ui, sans-serif; cursor: pointer; } .gm-nav__cta:hover { background: rgba(255, 255, 255, 0.32); } ``` ### 05. Glass Tab Bar **Type:** Pure CSS **Description:** Bottom navigation bar (mobile-app pattern) where the active pill is a brighter glass surface inside a darker glass container. **HTML:** ```html
    ``` **CSS:** ```css .gm-tabbar-bg { position: relative; padding: 24px; border-radius: 18px; overflow: hidden; background: radial-gradient(ellipse at 50% 20%, #fb923c 0%, transparent 55%), radial-gradient(ellipse at 30% 80%, #f43f5e 0%, transparent 55%), #1f0a14; min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; } .gm-tabbar { display: flex; gap: 4px; background: rgba(20, 20, 30, 0.5); -webkit-backdrop-filter: blur(24px) saturate(160%); backdrop-filter: blur(24px) saturate(160%); border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 16px; padding: 6px; } .gm-tabbar__tab { flex: 1; background: none; border: none; color: rgba(255, 255, 255, 0.55); padding: 8px 4px; display: flex; flex-direction: column; align-items: center; gap: 4px; font: 600 10px system-ui, sans-serif; border-radius: 10px; cursor: pointer; transition: background 0.2s, color 0.2s; } .gm-tabbar__icon { font-size: 18px; line-height: 1; } .gm-tabbar__tab:hover { color: rgba(255, 255, 255, 0.85); } .gm-tabbar__tab--active { background: rgba(255, 255, 255, 0.18); border: 1px solid rgba(255, 255, 255, 0.25); color: #fff; } ``` ### 06. Glass Sidebar **Type:** Pure CSS **Description:** Vertical glass sidebar with active-item highlight — the classic dashboard chrome reimagined as a single semi-transparent panel. **HTML:** ```html ``` **CSS:** ```css .gm-side-bg { position: relative; padding: 14px; border-radius: 18px; overflow: hidden; background: radial-gradient(ellipse at 80% 20%, #84cc16 0%, transparent 50%), radial-gradient(ellipse at 20% 80%, #06b6d4 0%, transparent 50%), #061a14; min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; } .gm-side { display: flex; flex-direction: column; gap: 4px; background: rgba(255, 255, 255, 0.08); -webkit-backdrop-filter: blur(24px) saturate(160%); backdrop-filter: blur(24px) saturate(160%); border: 1px solid rgba(255, 255, 255, 0.15); border-radius: 12px; padding: 12px 8px; width: 180px; } .gm-side__brand { font-size: 18px; color: #fff; text-align: center; padding: 6px 0 12px; border-bottom: 1px solid rgba(255, 255, 255, 0.12); margin-bottom: 8px; } .gm-side__item { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 8px; font: 500 12px system-ui, sans-serif; color: rgba(255, 255, 255, 0.65); text-decoration: none; transition: background 0.2s, color 0.2s; } .gm-side__item span { width: 18px; text-align: center; font-size: 13px; opacity: 0.7; } .gm-side__item:hover { background: rgba(255, 255, 255, 0.08); color: #fff; } .gm-side__item--active { background: rgba(255, 255, 255, 0.18); color: #fff; } .gm-side__item--active span { opacity: 1; } ``` ### 07. Glass Input **Type:** Pure CSS **Description:** Translucent text input with a subtle inner glow on focus — useful when a form sits over imagery or a video background. **HTML:** ```html
    ``` **CSS:** ```css .gm-input-bg { position: relative; padding: 32px; border-radius: 18px; overflow: hidden; background: radial-gradient(ellipse at 30% 30%, #a855f7 0%, transparent 55%), radial-gradient(ellipse at 70% 70%, #6366f1 0%, transparent 55%), #1a0a2e; min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; } .gm-input { display: block; } .gm-input__lbl { display: block; font: 600 11px system-ui, sans-serif; color: rgba(255, 255, 255, 0.65); letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 8px; } .gm-input__field { width: 100%; box-sizing: border-box; background: rgba(255, 255, 255, 0.08); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); border: 1px solid rgba(255, 255, 255, 0.18); border-radius: 10px; padding: 11px 14px; color: #fff; font: 13px system-ui, sans-serif; transition: border-color 0.25s, box-shadow 0.25s; } .gm-input__field::placeholder { color: rgba(255, 255, 255, 0.55); } .gm-input__field:focus { outline: none; border-color: rgba(255, 255, 255, 0.55); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18), 0 0 24px rgba(168, 85, 247, 0.25); } ``` ### 08. Glass Toggle **Type:** Pure CSS **Description:** Frosted iOS-style toggle switch sitting over a vivid backdrop — the thumb is a brighter glass island inside the track. **HTML:** ```html
    ``` **CSS:** ```css .gm-toggle-bg { position: relative; padding: 32px 28px; border-radius: 18px; overflow: hidden; background: radial-gradient(ellipse at 20% 30%, #f59e0b 0%, transparent 50%), radial-gradient(ellipse at 80% 70%, #ec4899 0%, transparent 55%), #2a0a1f; min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; } .gm-toggle { display: inline-flex; align-items: center; gap: 12px; cursor: pointer; } .gm-toggle__input { position: absolute; opacity: 0; pointer-events: none; } .gm-toggle__track { position: relative; display: inline-block; width: 48px; height: 28px; background: rgba(255, 255, 255, 0.1); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border: 1px solid rgba(255, 255, 255, 0.2); border-radius: 999px; transition: background 0.25s, border-color 0.25s; } .gm-toggle__thumb { position: absolute; top: 2px; left: 2px; width: 22px; height: 22px; background: rgba(255, 255, 255, 0.85); border-radius: 50%; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18); transition: left 0.25s cubic-bezier(.3, 1.3, .5, 1), background 0.25s; } .gm-toggle__input:checked + .gm-toggle__track { background: rgba(34, 197, 94, 0.4); border-color: rgba(34, 197, 94, 0.6); } .gm-toggle__input:checked + .gm-toggle__track .gm-toggle__thumb { left: 22px; background: #fff; } .gm-toggle__label { font: 600 13px system-ui, sans-serif; color: #fff; } ``` ### 09. Glass Search **Type:** Pure CSS **Description:** A frosted search field with a built-in icon — the kind of search bar that hovers over a hero image or video without competing. **HTML:** ```html
    ``` **CSS:** ```css .gm-search-bg { position: relative; padding: 28px; border-radius: 18px; overflow: hidden; background: radial-gradient(ellipse at 30% 50%, #0ea5e9 0%, transparent 50%), radial-gradient(ellipse at 70% 50%, #8b5cf6 0%, transparent 50%), #0a1428; min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; } .gm-search { display: flex; align-items: center; gap: 10px; background: rgba(255, 255, 255, 0.08); -webkit-backdrop-filter: blur(22px) saturate(160%); backdrop-filter: blur(22px) saturate(160%); border: 1px solid rgba(255, 255, 255, 0.18); border-radius: 12px; padding: 10px 14px; } .gm-search__icon { color: rgba(255, 255, 255, 0.55); flex-shrink: 0; } .gm-search__field { flex: 1; background: none; border: none; outline: none; color: #fff; font: 13px system-ui, sans-serif; } .gm-search__field::placeholder { color: rgba(255, 255, 255, 0.55); } .gm-search__kbd { font: 600 10px ui-monospace, monospace; color: rgba(255, 255, 255, 0.55); background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.18); border-radius: 5px; padding: 3px 6px; } ``` ### 10. Refraction Card **Type:** Pure CSS **Description:** Glass card with a fake refraction edge — a brighter rim on one side simulates how real glass bends light at its boundary. **HTML:** ```html

    Optical illusion

    An inset linear-gradient on the border channel mimics how light bends at the edge of real glass.

    ``` **CSS:** ```css .gm-refr-bg { position: relative; padding: 32px; border-radius: 18px; overflow: hidden; background: radial-gradient(circle at 10% 20%, #f43f5e 0%, transparent 50%), radial-gradient(circle at 90% 80%, #8b5cf6 0%, transparent 50%), radial-gradient(circle at 50% 50%, #06b6d4 0%, transparent 60%), #0e0a1a; min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; } .gm-refr { position: relative; background: rgba(255, 255, 255, 0.08); -webkit-backdrop-filter: blur(28px) saturate(180%); backdrop-filter: blur(28px) saturate(180%); border-radius: 14px; padding: 18px 22px; color: #fff; /* Refractive rim — gradient border via background-clip */ border: 1.5px solid transparent; background-clip: padding-box; } .gm-refr::before { content: ''; position: absolute; inset: -1.5px; border-radius: 15.5px; background: linear-gradient(135deg, rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0.1) 40%, transparent 60%, rgba(255, 255, 255, 0.3)); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; padding: 1.5px; pointer-events: none; } .gm-refr h4 { margin: 0 0 6px; font: 700 14px/1.2 system-ui, sans-serif; } .gm-refr p { margin: 0; font: 12px/1.55 system-ui, sans-serif; opacity: 0.78; } ``` ### 11. Tinted Glass **Type:** Pure CSS **Description:** Each glass surface tints subtly with its own brand hue while sharing the same blur — useful for color-coded categories. **HTML:** ```html
    Components13 collections
    Motion4 collections
    Tools11 utilities
    ``` **CSS:** ```css .gm-tint-bg { position: relative; padding: 22px; border-radius: 18px; overflow: hidden; display: flex; flex-direction: column; gap: 8px; background: radial-gradient(circle at 50% 50%, #e2e8f0 0%, transparent 60%), linear-gradient(135deg, #475569, #1e293b); min-height: 100vh; align-items: center; justify-content: center; } .gm-tint { display: flex; align-items: center; gap: 12px; -webkit-backdrop-filter: blur(20px) saturate(180%); backdrop-filter: blur(20px) saturate(180%); border: 1px solid rgba(255, 255, 255, 0.2); border-radius: 10px; padding: 10px 14px; color: #fff; } .gm-tint b { display: block; font: 700 12px system-ui, sans-serif; } .gm-tint small { font: 11px system-ui, sans-serif; opacity: 0.7; } .gm-tint__dot { width: 10px; height: 10px; border-radius: 50%; } .gm-tint--violet { background: rgba(139, 92, 246, 0.22); } .gm-tint--violet .gm-tint__dot { background: #c4b5fd; box-shadow: 0 0 8px rgba(196, 181, 253, 0.6); } .gm-tint--rose { background: rgba(244, 63, 94, 0.22); } .gm-tint--rose .gm-tint__dot { background: #fda4af; box-shadow: 0 0 8px rgba(253, 164, 175, 0.6); } .gm-tint--cyan { background: rgba(6, 182, 212, 0.22); } .gm-tint--cyan .gm-tint__dot { background: #67e8f9; box-shadow: 0 0 8px rgba(103, 232, 249, 0.6); } ``` ### 12. Stacked Glass **Type:** Pure CSS **Description:** Three glass layers stacked at offset depths — each pane blurs the panes behind it, creating a dimensional sandwich effect. **HTML:** ```html

    Layered depth

    Each pane blurs the surfaces beneath it.

    ``` **CSS:** ```css .gm-stack-bg { position: relative; padding: 28px; border-radius: 18px; overflow: hidden; min-height: 100vh; background: radial-gradient(circle at 25% 30%, #f59e0b 0%, transparent 45%), radial-gradient(circle at 75% 70%, #06b6d4 0%, transparent 45%), radial-gradient(circle at 50% 90%, #ec4899 0%, transparent 45%), #1a0a1a; display: flex; flex-direction: column; align-items: center; justify-content: center; } .gm-stack__pane { position: absolute; -webkit-backdrop-filter: blur(16px) saturate(160%); backdrop-filter: blur(16px) saturate(160%); background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.18); border-radius: 12px; color: #fff; } .gm-stack__pane--3 { top: 18px; right: 18px; width: 140px; height: 100px; background: rgba(255, 255, 255, 0.05); } .gm-stack__pane--2 { top: 42px; right: 50px; width: 160px; height: 110px; background: rgba(255, 255, 255, 0.07); } .gm-stack__pane--1 { top: 70px; left: 28px; width: 200px; padding: 14px 18px; background: rgba(255, 255, 255, 0.12); border: 1px solid rgba(255, 255, 255, 0.25); } .gm-stack__pane--1 h4 { margin: 0 0 4px; font: 700 13px system-ui, sans-serif; } .gm-stack__pane--1 p { margin: 0; font: 11px/1.5 system-ui, sans-serif; opacity: 0.78; } ``` --- ## 16 CSS Gradient Animations URL: https://codefronts.com/motion/css-gradient-animation/ Description: 16 hand-coded CSS gradient animations with live demos — aurora mesh hero background, diagonal sweeping linear gradient, radial glow split, dark-mode subtle mesh pulse, glow-on-hover accent button, animated gradient border card, metallic shimmer skeleton loader, neon flowing underline link, infinite gradient text animation, hover-reveal text fill, glassmorphism moving backdrop, retro vaporwave cyberpunk mesh, liquid lava lamp blob, striped progress bar loader, file upload streaming state, and animated toggle switch track glow. 4 pure CSS + 12 with a small vanilla JS snippet — no framework. Modern @property typed-angle + conic-gradient + animation-timeline techniques, prefers-reduced-motion honoured, WCAG 2.2 AA compliant, MIT licensed. Demo count: 16 ### 01. CSS Infinite Loop Aurora Background **Type:** CSS + JS **Description:** A slow-moving, organic multi-color aurora mesh background built from blurred radial-gradient blobs that rotate and scale on infinite CSS keyframes — ideal for SaaS landing page heroes. **HTML:** ```html
    ✦ New — Now in Beta

    The AI Platform
    Built for Teams

    Ship faster with AI-powered workflows, real-time collaboration, and intelligent automation that adapts to how your team actually works.

    ``` **CSS:** ```css .ga-01, .ga-01 *, .ga-01 *::before, .ga-01 *::after { margin: 0; padding: 0; box-sizing: border-box; } .ga-01 ::selection { background: rgba(139,92,246,.45); color: #fff; } .ga-01 { --c1: #0d0d1a; --c2: #6d28d9; --c3: #0ea5e9; --c4: #10b981; --c5: #7c3aed; --dur: 12s; position: relative; width: 100%; min-height: 100vh; overflow: hidden; background: var(--c1); font-family: system-ui, -apple-system, sans-serif; display: flex; align-items: center; justify-content: center; } /* Aurora mesh layers */ .ga-01__aurora { position: absolute; inset: 0; filter: blur(60px); opacity: .75; } .ga-01__blob { position: absolute; border-radius: 60% 40% 70% 30% / 50% 60% 40% 50%; animation: ga-01-drift linear infinite; mix-blend-mode: screen; } .ga-01__blob:nth-child(1) { width: 65%; height: 70%; top: -15%; left: -10%; background: radial-gradient(ellipse at center, var(--c2) 0%, transparent 65%); animation-duration: var(--dur); animation-delay: 0s; } .ga-01__blob:nth-child(2) { width: 55%; height: 60%; bottom: -20%; right: -10%; background: radial-gradient(ellipse at center, var(--c3) 0%, transparent 65%); animation-duration: calc(var(--dur) * 1.3); animation-delay: calc(var(--dur) * -.4); animation-direction: reverse; } .ga-01__blob:nth-child(3) { width: 50%; height: 55%; top: 20%; left: 30%; background: radial-gradient(ellipse at center, var(--c4) 0%, transparent 65%); animation-duration: calc(var(--dur) * 1.6); animation-delay: calc(var(--dur) * -.7); } .ga-01__blob:nth-child(4) { width: 45%; height: 50%; top: -10%; right: 10%; background: radial-gradient(ellipse at center, var(--c5) 0%, transparent 65%); animation-duration: calc(var(--dur) * 1.1); animation-delay: calc(var(--dur) * -.2); animation-direction: reverse; } @keyframes ga-01-drift { 0% { transform: translate(0, 0) rotate(0deg) scale(1); } 25% { transform: translate(8%, 12%) rotate(90deg) scale(1.08); } 50% { transform: translate(-5%, 8%) rotate(180deg) scale(.95); } 75% { transform: translate(10%, -6%) rotate(270deg) scale(1.05); } 100% { transform: translate(0, 0) rotate(360deg) scale(1); } } /* Content */ .ga-01__content { position: relative; z-index: 2; text-align: center; padding: 48px 32px; max-width: 640px; } .ga-01__badge { display: inline-block; padding: 5px 14px; border-radius: 999px; background: rgba(139,92,246,.18); border: 1px solid rgba(139,92,246,.4); color: #a78bfa; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 20px; } .ga-01__title { font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 800; line-height: 1.12; color: #fff; margin-bottom: 16px; letter-spacing: -.02em; } .ga-01__title span { background: linear-gradient(135deg, #a78bfa 0%, #38bdf8 50%, #34d399 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; } .ga-01__sub { font-size: 1.05rem; color: rgba(255,255,255,.6); line-height: 1.65; margin-bottom: 32px; } .ga-01__cta { display: inline-flex; gap: 12px; flex-wrap: wrap; justify-content: center; } .ga-01__btn { padding: 12px 28px; border-radius: 10px; font-size: .95rem; font-weight: 600; cursor: pointer; border: none; transition: transform .2s, box-shadow .2s; } .ga-01__btn:hover { transform: translateY(-2px); } .ga-01__btn--primary { background: linear-gradient(135deg, #7c3aed, #0ea5e9); color: #fff; box-shadow: 0 4px 24px rgba(124,58,237,.4); } .ga-01__btn--primary:hover { box-shadow: 0 8px 32px rgba(124,58,237,.6); } .ga-01__btn--ghost { background: rgba(255,255,255,.08); color: #fff; border: 1px solid rgba(255,255,255,.15); } .ga-01__btn--ghost:hover { background: rgba(255,255,255,.13); } /* Speed toggle */ .ga-01__speed { position: absolute; bottom: 16px; right: 16px; z-index: 3; display: flex; gap: 6px; } .ga-01__speed-btn { padding: 5px 12px; border-radius: 6px; font-size: 11px; font-weight: 600; cursor: pointer; border: 1px solid rgba(255,255,255,.15); background: rgba(255,255,255,.06); color: rgba(255,255,255,.55); transition: all .2s; } .ga-01__speed-btn.active, .ga-01__speed-btn:hover { background: rgba(139,92,246,.25); border-color: rgba(139,92,246,.5); color: #c4b5fd; } @media (prefers-reduced-motion: reduce) { .ga-01__blob { animation: none; } } ``` **JS:** ```js (function() { const wrapper = document.querySelector('.ga-01'); const btns = wrapper.querySelectorAll('.ga-01__speed-btn'); const speeds = { slow: '22s', normal: '12s', fast: '5s' }; btns.forEach(btn => { btn.addEventListener('click', () => { btns.forEach(b => b.classList.remove('active')); btn.classList.add('active'); wrapper.style.setProperty('--dur', speeds[btn.dataset.speed]); }); }); })(); ``` ### 02. CSS Diagonal Shifting Linear Gradient **Type:** CSS + JS **Description:** A continuously sweeping diagonal linear gradient background that animates its background-position across a 300% × 300% canvas to simulate uninterrupted color flow across the full page. **HTML:** ```html
    Live Platform

    Design Without
    Limits

    A professional-grade design suite that moves as fast as your ideas. Collaborate, prototype, and ship — all from one place.

    4M+ Creators
    98% Uptime
    12ms Latency
    Angle:
    ``` **CSS:** ```css .ga-02, .ga-02 *, .ga-02 *::before, .ga-02 *::after { margin: 0; padding: 0; box-sizing: border-box; } .ga-02 ::selection { background: rgba(236,72,153,.4); color: #fff; } .ga-02 { --dur: 8s; --angle: 135deg; --c1: #1e0533; --c2: #312e81; --c3: #0c4a6e; --c4: #831843; --c5: #1e0533; position: relative; width: 100%; min-height: 100vh; overflow: hidden; font-family: system-ui, -apple-system, sans-serif; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 40px; padding: 48px 24px; } /* The animated background sits on a pseudo-element so background-size can be animated */ .ga-02::before { content: ''; position: absolute; inset: 0; background: linear-gradient(var(--angle), var(--c1) 0%, var(--c2) 20%, var(--c3) 40%, var(--c4) 60%, var(--c2) 80%, var(--c5) 100% ); background-size: 300% 300%; animation: ga-02-sweep var(--dur) ease-in-out infinite; } @keyframes ga-02-sweep { 0% { background-position: 0% 0%; } 25% { background-position: 100% 0%; } 50% { background-position: 100% 100%; } 75% { background-position: 0% 100%; } 100% { background-position: 0% 0%; } } /* Noise overlay for depth */ .ga-02::after { content: ''; position: absolute; inset: 0; opacity: .04; 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)'/%3E%3C/svg%3E"); background-size: 200px 200px; pointer-events: none; } /* Content */ .ga-02__content { position: relative; z-index: 2; text-align: center; max-width: 680px; } .ga-02__eyebrow { display: flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 20px; } .ga-02__dot { width: 8px; height: 8px; border-radius: 50%; background: #f472b6; animation: ga-02-pulse-dot 2s ease-in-out infinite; } @keyframes ga-02-pulse-dot { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .5; transform: scale(.7); } } .ga-02__eyebrow-text { color: #f9a8d4; font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; } .ga-02__title { font-size: clamp(2.2rem, 5.5vw, 3.6rem); font-weight: 900; line-height: 1.08; letter-spacing: -.03em; color: #fff; margin-bottom: 18px; text-shadow: 0 2px 30px rgba(0,0,0,.4); } .ga-02__sub { font-size: 1.05rem; color: rgba(255,255,255,.65); line-height: 1.7; margin-bottom: 36px; } .ga-02__stats { display: flex; gap: 0; justify-content: center; border: 1px solid rgba(255,255,255,.1); border-radius: 14px; overflow: hidden; backdrop-filter: blur(12px); background: rgba(0,0,0,.2); max-width: 460px; margin: 0 auto; } .ga-02__stat { flex: 1; padding: 16px 8px; text-align: center; border-right: 1px solid rgba(255,255,255,.1); } .ga-02__stat:last-child { border-right: none; } .ga-02__stat-num { font-size: 1.5rem; font-weight: 800; color: #fff; display: block; } .ga-02__stat-label { font-size: .7rem; font-weight: 600; color: rgba(255,255,255,.45); text-transform: uppercase; letter-spacing: .07em; margin-top: 2px; } /* Angle control */ .ga-02__controls { position: relative; z-index: 2; display: flex; align-items: center; gap: 10px; } .ga-02__ctrl-label { font-size: 11px; font-weight: 600; color: rgba(255,255,255,.4); text-transform: uppercase; letter-spacing: .08em; } .ga-02__angle-btn { padding: 5px 12px; border-radius: 6px; font-size: 11px; font-weight: 700; cursor: pointer; border: 1px solid rgba(255,255,255,.15); background: rgba(255,255,255,.07); color: rgba(255,255,255,.5); transition: all .2s; } .ga-02__angle-btn.active, .ga-02__angle-btn:hover { background: rgba(244,114,182,.2); border-color: rgba(244,114,182,.5); color: #f9a8d4; } @media (prefers-reduced-motion: reduce) { .ga-02::before { animation: none; background-position: 50% 50%; } .ga-02__dot { animation: none; } } ``` **JS:** ```js (function() { const wrapper = document.querySelector('.ga-02'); const btns = wrapper.querySelectorAll('.ga-02__angle-btn'); btns.forEach(btn => { btn.addEventListener('click', () => { btns.forEach(b => b.classList.remove('active')); btn.classList.add('active'); wrapper.style.setProperty('--angle', btn.dataset.angle); }); }); })(); ``` ### 03. CSS Animated Radial Glow Split **Type:** Pure CSS **Description:** A two-panel feature layout where independently pulsing radial gradient orbs shift position and scale on infinite keyframes, creating atmospheric lighting that draws the eye to each side's content. **HTML:** ```html
    Infrastructure

    Edge Network
    Performance

    Requests routed to the nearest PoP automatically. Sub-10ms response times across 190 regions with zero configuration.

    9.4ms Avg. global latency
    Analytics

    Real-Time
    Intelligence

    Stream millions of events per second into queryable dashboards. No sampling. No delays. Full fidelity at any scale.

    3.2B Events processed today
    ``` **CSS:** ```css .ga-03, .ga-03 *, .ga-03 *::before, .ga-03 *::after { margin: 0; padding: 0; box-sizing: border-box; } .ga-03 ::selection { background: rgba(249,115,22,.4); color: #fff; } .ga-03 { --bg: #070d1a; --glow-a: #f97316; --glow-b: #8b5cf6; --dur-a: 7s; --dur-b: 9s; position: relative; width: 100%; min-height: 100vh; overflow: hidden; background: var(--bg); font-family: system-ui, -apple-system, sans-serif; display: grid; grid-template-columns: 1fr 1fr; align-items: center; } /* Radial glow A — left, orange */ .ga-03__glow-a { position: absolute; width: 560px; height: 560px; border-radius: 50%; background: radial-gradient(circle at center, color-mix(in srgb, var(--glow-a) 40%, transparent), transparent 70%); top: 50%; left: 0; transform: translate(-30%, -50%); animation: ga-03-pulse-a var(--dur-a) ease-in-out infinite; pointer-events: none; } @keyframes ga-03-pulse-a { 0%, 100% { transform: translate(-30%, -50%) scale(1); opacity: .7; } 40% { transform: translate(-15%, -60%) scale(1.2); opacity: 1; } 70% { transform: translate(-40%, -40%) scale(.85); opacity: .5; } } /* Radial glow B — right, violet */ .ga-03__glow-b { position: absolute; width: 520px; height: 520px; border-radius: 50%; background: radial-gradient(circle at center, color-mix(in srgb, var(--glow-b) 40%, transparent), transparent 70%); top: 50%; right: 0; transform: translate(30%, -50%); animation: ga-03-pulse-b var(--dur-b) ease-in-out infinite; pointer-events: none; } @keyframes ga-03-pulse-b { 0%, 100% { transform: translate(30%, -50%) scale(1); opacity: .65; } 35% { transform: translate(20%, -65%) scale(1.15); opacity: .9; } 65% { transform: translate(40%, -35%) scale(.9); opacity: .5; } } /* Thin divider */ .ga-03__divider { position: absolute; left: 50%; top: 10%; width: 1px; height: 80%; background: linear-gradient(to bottom, transparent, rgba(255,255,255,.1) 30%, rgba(255,255,255,.1) 70%, transparent); z-index: 1; } /* Left panel */ .ga-03__panel { position: relative; z-index: 2; padding: 52px 44px; display: flex; flex-direction: column; gap: 16px; } .ga-03__panel--left { padding-right: 52px; } .ga-03__panel--right { padding-left: 52px; } .ga-03__tag { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; width: fit-content; } .ga-03__tag--a { background: rgba(249,115,22,.12); border: 1px solid rgba(249,115,22,.3); color: #fb923c; } .ga-03__tag--b { background: rgba(139,92,246,.12); border: 1px solid rgba(139,92,246,.3); color: #a78bfa; } .ga-03__tag-dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; animation: ga-03-blink 2s ease-in-out infinite; } .ga-03__panel--right .ga-03__tag-dot { animation-delay: -.8s; } @keyframes ga-03-blink { 0%, 100% { opacity: 1; } 50% { opacity: .3; } } .ga-03__heading { font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 800; line-height: 1.18; color: #fff; letter-spacing: -.025em; } .ga-03__body { font-size: .9rem; color: rgba(255,255,255,.55); line-height: 1.72; } .ga-03__metric { display: flex; flex-direction: column; gap: 2px; margin-top: 8px; } .ga-03__metric-val { font-size: 2.4rem; font-weight: 900; color: #fff; line-height: 1; } .ga-03__panel--left .ga-03__metric-val { color: #fb923c; } .ga-03__panel--right .ga-03__metric-val { color: #a78bfa; } .ga-03__metric-label { font-size: .75rem; font-weight: 600; color: rgba(255,255,255,.4); text-transform: uppercase; letter-spacing: .08em; } /* Hover to intensify */ .ga-03:hover .ga-03__glow-a, .ga-03:hover .ga-03__glow-b { opacity: 1 !important; filter: blur(0px); } @media (max-width: 640px) { .ga-03 { grid-template-columns: 1fr; } .ga-03__divider { display: none; } .ga-03__panel--left { padding-right: 44px; } .ga-03__panel--right { padding-left: 44px; border-top: 1px solid rgba(255,255,255,.07); } } @media (prefers-reduced-motion: reduce) { .ga-03__glow-a, .ga-03__glow-b { animation: none; } .ga-03__tag-dot { animation: none; } } ``` ### 04. CSS Dark Mode Subtle Mesh Pulse **Type:** CSS + JS **Description:** A low-contrast dark-mode background built from layered radial gradients on pseudo-elements that slowly translate and rotate, replacing flat pure-black with breathing, atmospheric depth. **HTML:** ```html
    Built for dark mode

    Your workflow,
    beautifully dark

    Subtle ambient gradients that breathe with your UI. No harsh blacks. No eye strain. Just clean, deep dark-mode done right.

    Zero Config
    Works out of the box. No build steps, no config files.
    🔒
    Secure by Default
    End-to-end encryption on every request, every time.
    🌐
    Global Edge
    190 PoPs. Sub-10ms latency worldwide.
    ``` **CSS:** ```css .ga-04, .ga-04 *, .ga-04 *::before, .ga-04 *::after { margin: 0; padding: 0; box-sizing: border-box; } .ga-04 ::selection { background: rgba(99,102,241,.5); color: #fff; } .ga-04 { --bg: #0a0a0f; --m1: #1a1040; --m2: #0f1f30; --m3: #1a0e28; --m4: #0d1e1a; --accent: #6366f1; --dur: 14s; position: relative; width: 100%; min-height: 100vh; overflow: hidden; background: var(--bg); font-family: system-ui, -apple-system, sans-serif; display: flex; flex-direction: column; justify-content: space-between; padding: 36px; } /* Mesh layer: overlapping soft radial gradients on one pseudo-element */ .ga-04::before { content: ''; position: absolute; inset: -30%; background: radial-gradient(ellipse 60% 55% at 20% 20%, var(--m1) 0%, transparent 70%), radial-gradient(ellipse 55% 50% at 80% 75%, var(--m2) 0%, transparent 70%), radial-gradient(ellipse 50% 60% at 75% 15%, var(--m3) 0%, transparent 70%), radial-gradient(ellipse 60% 45% at 25% 80%, var(--m4) 0%, transparent 70%); animation: ga-04-mesh var(--dur) ease-in-out infinite alternate; opacity: .95; } @keyframes ga-04-mesh { 0% { transform: translate(0, 0) rotate(0deg); } 33% { transform: translate(5%, 4%) rotate(3deg); } 66% { transform: translate(-4%, 6%) rotate(-2deg); } 100% { transform: translate(3%, -3%) rotate(1.5deg); } } /* Second mesh layer offset */ .ga-04::after { content: ''; position: absolute; inset: -30%; background: radial-gradient(ellipse 45% 55% at 55% 50%, rgba(99,102,241,.06) 0%, transparent 65%), radial-gradient(ellipse 35% 45% at 30% 60%, rgba(16,185,129,.05) 0%, transparent 60%); animation: ga-04-mesh2 calc(var(--dur) * 1.4) ease-in-out infinite alternate-reverse; } @keyframes ga-04-mesh2 { 0% { transform: translate(0, 0); } 50% { transform: translate(-6%, 5%); } 100% { transform: translate(4%, -4%); } } /* Topbar */ .ga-04__bar { position: relative; z-index: 3; display: flex; align-items: center; justify-content: space-between; } .ga-04__logo { display: flex; align-items: center; gap: 10px; } .ga-04__logo-mark { width: 30px; height: 30px; border-radius: 8px; background: linear-gradient(135deg, #6366f1, #8b5cf6); display: flex; align-items: center; justify-content: center; font-size: 14px; } .ga-04__logo-name { font-size: .9rem; font-weight: 700; color: #fff; letter-spacing: -.01em; } .ga-04__nav { display: flex; gap: 6px; } .ga-04__nav-item { padding: 5px 12px; font-size: .78rem; color: rgba(255,255,255,.4); border-radius: 6px; cursor: pointer; transition: color .2s, background .2s; } .ga-04__nav-item:hover { color: rgba(255,255,255,.8); background: rgba(255,255,255,.06); } .ga-04__nav-item--active { color: rgba(255,255,255,.85); background: rgba(255,255,255,.07); } /* Center hero */ .ga-04__hero { position: relative; z-index: 3; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px; padding: 24px 0; } .ga-04__kicker { display: inline-flex; align-items: center; gap: 8px; padding: 4px 14px; border-radius: 999px; border: 1px solid rgba(99,102,241,.25); background: rgba(99,102,241,.08); font-size: 11.5px; color: #818cf8; font-weight: 600; letter-spacing: .06em; } .ga-04__kicker-ring { width: 7px; height: 7px; border-radius: 50%; border: 1.5px solid #818cf8; position: relative; } .ga-04__kicker-ring::after { content: ''; position: absolute; inset: 1.5px; border-radius: 50%; background: #818cf8; animation: ga-04-ring-fill 2.5s ease-in-out infinite; } @keyframes ga-04-ring-fill { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(0); opacity: 0; } } .ga-04__title { font-size: clamp(2rem, 5vw, 3rem); font-weight: 900; line-height: 1.1; letter-spacing: -.03em; color: #f1f5f9; max-width: 600px; } .ga-04__title em { font-style: normal; background: linear-gradient(90deg, #818cf8, #a78bfa, #c084fc); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; } .ga-04__sub { font-size: .95rem; color: rgba(255,255,255,.4); line-height: 1.72; max-width: 440px; } .ga-04__actions { display: flex; gap: 10px; margin-top: 6px; } .ga-04__btn { padding: 10px 24px; border-radius: 8px; font-size: .875rem; font-weight: 600; cursor: pointer; border: none; transition: all .2s; } .ga-04__btn--fill { background: linear-gradient(135deg, #6366f1, #8b5cf6); color: #fff; box-shadow: 0 0 0 0 rgba(99,102,241,0); } .ga-04__btn--fill:hover { box-shadow: 0 0 24px rgba(99,102,241,.45); transform: translateY(-1px); } .ga-04__btn--outline { background: transparent; color: rgba(255,255,255,.5); border: 1px solid rgba(255,255,255,.1); } .ga-04__btn--outline:hover { border-color: rgba(255,255,255,.2); color: rgba(255,255,255,.75); } /* Bottom card row */ .ga-04__cards { position: relative; z-index: 3; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; } .ga-04__card { padding: 16px; border-radius: 12px; background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.06); backdrop-filter: blur(8px); transition: border-color .25s, background .25s; } .ga-04__card:hover { background: rgba(255,255,255,.055); border-color: rgba(99,102,241,.2); } .ga-04__card-icon { font-size: 1.3rem; margin-bottom: 8px; } .ga-04__card-title { font-size: .8rem; font-weight: 700; color: rgba(255,255,255,.75); margin-bottom: 4px; } .ga-04__card-body { font-size: .72rem; color: rgba(255,255,255,.35); line-height: 1.55; } /* Palette toggle */ .ga-04__palette { position: absolute; top: 36px; right: 36px; z-index: 10; display: flex; gap: 6px; } .ga-04__swatch { width: 16px; height: 16px; border-radius: 50%; cursor: pointer; border: 2px solid transparent; transition: border-color .2s, transform .2s; } .ga-04__swatch:hover, .ga-04__swatch.active { border-color: #fff; transform: scale(1.2); } .ga-04__swatch--indigo { background: linear-gradient(135deg, #1a1040, #0f1f30); } .ga-04__swatch--teal { background: linear-gradient(135deg, #0f2420, #0a2030); } .ga-04__swatch--rose { background: linear-gradient(135deg, #2a0a18, #1a0a30); } @media (max-width: 600px) { .ga-04__cards { grid-template-columns: 1fr; } .ga-04__nav { display: none; } .ga-04__palette { display: none; } } @media (prefers-reduced-motion: reduce) { .ga-04::before, .ga-04::after { animation: none; } .ga-04__kicker-ring::after { animation: none; opacity: 1; } } ``` **JS:** ```js (function() { const wrapper = document.querySelector('.ga-04'); wrapper.querySelectorAll('.ga-04__swatch').forEach(sw => { sw.addEventListener('click', () => { wrapper.querySelectorAll('.ga-04__swatch').forEach(s => s.classList.remove('active')); sw.classList.add('active'); ['m1','m2','m3','m4','acc'].forEach(k => { const val = sw.dataset[k]; if (val) wrapper.style.setProperty('--' + k, val); }); }); }); })(); ``` ### 05. CSS Glow on Hover Accent Button **Type:** Pure CSS **Description:** Three button variants — gradient-fill shift, gradient border glow, and flood fill — where the colour palette activates and shifts only on hover, using pseudo-elements and CSS transitions for zero-JS interactivity. **HTML:** ```html
    Gradient Fill Shift
    Gradient Border Glow
    Flood Fill on Hover
    ``` **CSS:** ```css .ga-05, .ga-05 *, .ga-05 *::before, .ga-05 *::after { margin: 0; padding: 0; box-sizing: border-box; } .ga-05 ::selection { background: rgba(139,92,246,.4); color: #fff; } .ga-05 { --c1: #7c3aed; --c2: #06b6d4; --c3: #ec4899; --bg: #0d0d18; --dur: .5s; width: 100%; min-height: 100vh; background: var(--bg); font-family: system-ui, -apple-system, sans-serif; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 48px; padding: 48px 24px; } /* ── Variant A: gradient background shifts on hover ── */ .ga-05__btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 14px 32px; border-radius: 12px; border: none; cursor: pointer; font-size: 1rem; font-weight: 700; letter-spacing: .01em; overflow: hidden; transition: transform var(--dur) ease, box-shadow var(--dur) ease; z-index: 0; } /* Shared gradient layer that slides in */ .ga-05__btn::before { content: ''; position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(135deg, var(--c1), var(--c2), var(--c3)); background-size: 200% 200%; background-position: 0% 50%; transition: background-position .6s ease, opacity var(--dur) ease; z-index: -1; } /* Glow halo */ .ga-05__btn::after { content: ''; position: absolute; inset: -2px; border-radius: 14px; background: linear-gradient(135deg, var(--c1), var(--c2), var(--c3)); background-size: 200% 200%; background-position: 0% 50%; filter: blur(16px); opacity: 0; transition: opacity var(--dur) ease, background-position .6s ease; z-index: -2; } .ga-05__btn:hover::before { background-position: 100% 50%; } .ga-05__btn:hover::after { opacity: .65; background-position: 100% 50%; } .ga-05__btn:hover { transform: translateY(-2px); box-shadow: 0 8px 32px rgba(124,58,237,.3); } .ga-05__btn:active { transform: translateY(0); } /* Variant A — filled */ .ga-05__btn--filled { background: linear-gradient(135deg, var(--c1), var(--c1)); color: #fff; } .ga-05__btn--filled::before { opacity: 0; } .ga-05__btn--filled:hover::before { opacity: 1; } /* Variant B — ghost with gradient border */ .ga-05__btn--ghost { background: transparent; color: #fff; padding: 13px 31px; /* 1px less to account for border */ } .ga-05__btn--ghost::before { /* Gradient border trick: wrapper with gradient bg, inner mask */ background: linear-gradient(var(--bg), var(--bg)) padding-box, linear-gradient(135deg, rgba(124,58,237,.35), rgba(6,182,212,.35)) border-box; border: 1px solid transparent; opacity: 1; transition: background var(--dur) ease; } .ga-05__btn--ghost:hover::before { background: linear-gradient(var(--bg), var(--bg)) padding-box, linear-gradient(135deg, var(--c1), var(--c2), var(--c3)) border-box; } .ga-05__btn--ghost:hover { box-shadow: 0 0 0 3px rgba(124,58,237,.15); } /* Variant C — outline that floods with gradient fill */ .ga-05__btn--flood { background: transparent; color: #fff; border: 1.5px solid rgba(255,255,255,.15); overflow: hidden; } .ga-05__btn--flood::before { opacity: 0; background: linear-gradient(135deg, var(--c1), var(--c2)); background-size: 100% 100%; transform: scaleX(0); transform-origin: left; transition: transform .4s cubic-bezier(.22,1,.36,1), opacity .1s; } .ga-05__btn--flood:hover::before { opacity: 1; transform: scaleX(1); } .ga-05__btn--flood:hover { border-color: transparent; } /* Row layout */ .ga-05__row { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: center; } .ga-05__label { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: rgba(255,255,255,.3); text-align: center; margin-bottom: -32px; width: 100%; } @media (prefers-reduced-motion: reduce) { .ga-05__btn, .ga-05__btn::before, .ga-05__btn::after { transition: none; animation: none; } } ``` ### 06. CSS Animated Gradient Border Card **Type:** Pure CSS **Description:** A pricing card trio where the featured tier sports a razor-thin rotating conic-gradient border driven by the CSS @property Houdini API, creating a continuously spinning rainbow ring that highlights premium tiers. **HTML:** ```html
    Starter Free
    $0 /mo
    • 3 projects
    • 5GB storage
    • Team access
    • Priority support
    Pro Most Popular
    $29 /mo
    • Unlimited projects
    • 100GB storage
    • Team access (5 seats)
    • Priority support
    Elite Enterprise
    $99 /mo
    • Unlimited everything
    • 1TB storage
    • Unlimited seats
    • Dedicated SLA
    ``` **CSS:** ```css .ga-06, .ga-06 *, .ga-06 *::before, .ga-06 *::after { margin: 0; padding: 0; box-sizing: border-box; } .ga-06 ::selection { background: rgba(168,85,247,.4); color: #fff; } .ga-06 { --bg: #0c0c14; --card-bg: #13131f; --dur: 3s; width: 100%; min-height: 100vh; background: var(--bg); font-family: system-ui, -apple-system, sans-serif; display: flex; align-items: center; justify-content: center; gap: 24px; flex-wrap: wrap; padding: 48px 24px; } /* ── Rotating gradient border using conic-gradient on ::before ── */ .ga-06__card { position: relative; width: 240px; border-radius: 18px; padding: 2px; /* border width */ background: var(--card-bg); isolation: isolate; } /* The spinning gradient ring */ .ga-06__card::before { content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 1.5px; background: conic-gradient( from var(--a, 0deg), #a855f7, #ec4899, #f97316, #eab308, #22d3ee, #6366f1, #a855f7 ); -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0); -webkit-mask-composite: xor; mask-composite: exclude; animation: ga-06-spin var(--dur) linear infinite; opacity: 0; transition: opacity .4s ease; } /* Static subtle border at rest */ .ga-06__card::after { content: ''; position: absolute; inset: 0; border-radius: inherit; border: 1.5px solid rgba(255,255,255,.07); pointer-events: none; } /* Spin via CSS custom property (Houdini) with JS fallback */ @keyframes ga-06-spin { to { --a: 360deg; } } /* Always-on card shows border always */ .ga-06__card--active::before { opacity: 1; } /* Hover reveals border on non-active cards */ .ga-06__card:not(.ga-06__card--active):hover::before { opacity: .7; } /* Glow behind active card */ .ga-06__card--active { filter: drop-shadow(0 0 18px rgba(168,85,247,.25)); } /* Inner content */ .ga-06__inner { background: var(--card-bg); border-radius: 16px; padding: 28px 24px; display: flex; flex-direction: column; gap: 16px; } .ga-06__tier { display: flex; align-items: center; justify-content: space-between; } .ga-06__tier-name { font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .12em; color: rgba(255,255,255,.4); } .ga-06__badge { font-size: .6rem; font-weight: 700; text-transform: uppercase; letter-spacing: .09em; padding: 3px 9px; border-radius: 999px; } .ga-06__badge--free { background: rgba(255,255,255,.07); color: rgba(255,255,255,.4); } .ga-06__badge--pro { background: rgba(168,85,247,.15); color: #c084fc; border: 1px solid rgba(168,85,247,.25); } .ga-06__badge--elite { background: rgba(234,179,8,.12); color: #fbbf24; border: 1px solid rgba(234,179,8,.2); } .ga-06__price { display: flex; align-items: baseline; gap: 3px; } .ga-06__price-amt { font-size: 2.2rem; font-weight: 900; color: #fff; line-height: 1; } .ga-06__price-per { font-size: .75rem; color: rgba(255,255,255,.35); } .ga-06__divider { height: 1px; background: rgba(255,255,255,.06); } .ga-06__features { list-style: none; display: flex; flex-direction: column; gap: 10px; } .ga-06__feature { display: flex; align-items: center; gap: 10px; font-size: .8rem; color: rgba(255,255,255,.55); } .ga-06__feature-icon { font-size: .85rem; flex-shrink: 0; } .ga-06__card--active .ga-06__feature { color: rgba(255,255,255,.72); } .ga-06__cta { margin-top: 4px; width: 100%; padding: 11px; border-radius: 10px; border: none; font-size: .85rem; font-weight: 700; cursor: pointer; transition: all .25s; } .ga-06__cta--free { background: rgba(255,255,255,.07); color: rgba(255,255,255,.5); } .ga-06__cta--free:hover { background: rgba(255,255,255,.11); color: rgba(255,255,255,.75); } .ga-06__cta--pro { background: linear-gradient(135deg, #7c3aed, #a855f7); color: #fff; } .ga-06__cta--pro:hover { box-shadow: 0 4px 20px rgba(168,85,247,.4); transform: translateY(-1px); } .ga-06__cta--elite { background: linear-gradient(135deg, #92400e, #b45309); color: #fef3c7; } .ga-06__cta--elite:hover { box-shadow: 0 4px 20px rgba(234,179,8,.3); transform: translateY(-1px); } @property --a { syntax: ''; inherits: false; initial-value: 0deg; } @media (prefers-reduced-motion: reduce) { .ga-06__card::before { animation: none; } } ``` ### 07. CSS Metallic Shimmer Skeleton Loader **Type:** CSS + JS **Description:** Three skeleton loader patterns — a social card, a list component, and a data table — all sharing a single shimmer keyframe that sweeps a diagonal highlight across each bone element to indicate an active loading state. **HTML:** ```html
    ``` **CSS:** ```css .ga-07, .ga-07 *, .ga-07 *::before, .ga-07 *::after { margin: 0; padding: 0; box-sizing: border-box; } .ga-07 ::selection { background: rgba(99,102,241,.4); color: #fff; } .ga-07 { --bg: #0f111a; --skel: #1c1e2e; --shine-from: rgba(255,255,255,0); --shine-mid: rgba(255,255,255,.07); --shine-to: rgba(255,255,255,0); --dur: 1.6s; width: 100%; min-height: 100vh; background: var(--bg); font-family: system-ui, -apple-system, sans-serif; display: flex; align-items: center; justify-content: center; gap: 24px; flex-wrap: wrap; padding: 48px 24px; } /* ── Base skeleton bone ── */ .ga-07__bone { position: relative; background: var(--skel); border-radius: 6px; overflow: hidden; } /* Shimmer wave — single pseudo-element slides across */ .ga-07__bone::after { content: ''; position: absolute; inset: 0; background: linear-gradient( 105deg, var(--shine-from) 0%, var(--shine-from) 35%, var(--shine-mid) 50%, var(--shine-to) 65%, var(--shine-to) 100% ); background-size: 300% 100%; background-position: 100% 0; animation: ga-07-shimmer var(--dur) ease-in-out infinite; } @keyframes ga-07-shimmer { 0% { background-position: 150% 0; } 100% { background-position: -50% 0; } } /* ── Card skeleton ── */ .ga-07__card { width: 280px; background: #13151f; border: 1px solid rgba(255,255,255,.05); border-radius: 16px; padding: 20px; display: flex; flex-direction: column; gap: 14px; } .ga-07__avatar { width: 44px; height: 44px; border-radius: 50%; } .ga-07__line { height: 10px; } .ga-07__line--lg { width: 70%; } .ga-07__line--md { width: 50%; } .ga-07__line--sm { width: 35%; } .ga-07__thumb { width: 100%; height: 140px; border-radius: 10px; } .ga-07__tag { width: 60px; height: 22px; border-radius: 999px; } .ga-07__header { display: flex; align-items: center; gap: 12px; } .ga-07__header-lines { flex: 1; display: flex; flex-direction: column; gap: 8px; } /* ── List skeleton ── */ .ga-07__list { width: 280px; background: #13151f; border: 1px solid rgba(255,255,255,.05); border-radius: 16px; padding: 20px; display: flex; flex-direction: column; gap: 18px; } .ga-07__list-row { display: flex; align-items: center; gap: 12px; } .ga-07__icon { width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0; } .ga-07__list-lines { flex: 1; display: flex; flex-direction: column; gap: 7px; } /* ── Table skeleton ── */ .ga-07__table { width: 560px; max-width: 100%; background: #13151f; border: 1px solid rgba(255,255,255,.05); border-radius: 16px; overflow: hidden; } .ga-07__thead { background: rgba(255,255,255,.03); padding: 14px 20px; display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 16px; border-bottom: 1px solid rgba(255,255,255,.05); } .ga-07__tbody-row { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 16px; padding: 14px 20px; border-bottom: 1px solid rgba(255,255,255,.04); align-items: center; } .ga-07__tbody-row:last-child { border-bottom: none; } .ga-07__th { height: 8px; border-radius: 4px; } .ga-07__td { height: 9px; border-radius: 4px; } .ga-07__td--name { display: flex; align-items: center; gap: 10px; } .ga-07__td--avatar { width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0; } /* Toggle loaded state */ .ga-07__controls { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; z-index: 10; } .ga-07 { position: relative; } .ga-07__toggle { padding: 6px 16px; border-radius: 8px; font-size: .78rem; font-weight: 700; cursor: pointer; border: 1px solid rgba(255,255,255,.1); background: rgba(255,255,255,.06); color: rgba(255,255,255,.5); transition: all .2s; } .ga-07__toggle:hover, .ga-07__toggle.active { background: rgba(99,102,241,.2); border-color: rgba(99,102,241,.4); color: #a5b4fc; } /* Fast/slow speed variants */ .ga-07[data-speed="fast"] { --dur: .9s; } .ga-07[data-speed="slow"] { --dur: 2.8s; } @media (prefers-reduced-motion: reduce) { .ga-07__bone::after { animation: none; background-position: -50% 0; } } ``` **JS:** ```js (function() { const w = document.querySelector('.ga-07'); w.querySelectorAll('.ga-07__toggle').forEach(btn => { btn.addEventListener('click', () => { w.querySelectorAll('.ga-07__toggle').forEach(b => b.classList.remove('active')); btn.classList.add('active'); w.dataset.speed = btn.dataset.s; }); }); })(); ``` ### 08. CSS Neon Flowing Underline Link **Type:** CSS + JS **Description:** Navigation links and inline prose anchors where hover activates a flowing multi-colour gradient underline that sweeps in from the left and then animates infinitely, replacing the static underline with a living neon ribbon. **HTML:** ```html

    Links that feel alive

    Hover the navigation above to see each link reveal its own unique flowing gradient underline. In body copy, the same technique works at a smaller scale — try hovering this inline link or this one to see the neon line slide in from the left and animate infinitely.

    Flow speed:
    ``` **CSS:** ```css .ga-08, .ga-08 *, .ga-08 *::before, .ga-08 *::after { margin: 0; padding: 0; box-sizing: border-box; } .ga-08 ::selection { background: rgba(6,182,212,.4); color: #fff; } .ga-08 { --bg: #080c12; --dur: 2s; width: 100%; min-height: 100vh; background: var(--bg); font-family: system-ui, -apple-system, sans-serif; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; padding: 48px 24px; } /* ── Realistic nav bar ── */ .ga-08__nav { display: flex; align-items: center; gap: 4px; padding: 12px 24px; background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.06); border-radius: 14px; margin-bottom: 56px; } /* ── Core underline link technique ── */ .ga-08__link { position: relative; display: inline-block; padding: 6px 14px; font-size: .9rem; font-weight: 500; color: rgba(255,255,255,.45); text-decoration: none; cursor: pointer; transition: color .3s ease; border-radius: 8px; white-space: nowrap; } /* Underline via ::after using gradient background-size trick */ .ga-08__link::after { content: ''; position: absolute; bottom: 2px; left: 14px; right: 14px; height: 2px; border-radius: 999px; background: linear-gradient( 90deg, var(--ul-c1, #06b6d4), var(--ul-c2, #818cf8), var(--ul-c3, #ec4899), var(--ul-c1, #06b6d4) ); background-size: 200% 100%; background-position: 100% 0; transform: scaleX(0); transform-origin: right; transition: transform .35s cubic-bezier(.22,1,.36,1), background-position var(--dur) linear; } .ga-08__link:hover { color: rgba(255,255,255,.92); } .ga-08__link:hover::after { transform: scaleX(1); transform-origin: left; background-position: -100% 0; animation: ga-08-flow var(--dur) linear infinite; } @keyframes ga-08-flow { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } } /* Active nav item — always underlined */ .ga-08__link--active { color: rgba(255,255,255,.9); } .ga-08__link--active::after { transform: scaleX(1); animation: ga-08-flow var(--dur) linear infinite; } /* Custom colour variants per link */ .ga-08__link:nth-child(2) { --ul-c1: #a855f7; --ul-c2: #ec4899; --ul-c3: #f97316; } .ga-08__link:nth-child(3) { --ul-c1: #10b981; --ul-c2: #06b6d4; --ul-c3: #6366f1; } .ga-08__link:nth-child(4) { --ul-c1: #f97316; --ul-c2: #eab308; --ul-c3: #ef4444; } .ga-08__link:nth-child(5) { --ul-c1: #ec4899; --ul-c2: #a855f7; --ul-c3: #6366f1; } /* ── Prose section showing links in copy ── */ .ga-08__prose { max-width: 560px; text-align: center; } .ga-08__prose-head { font-size: clamp(1.6rem, 3.5vw, 2.2rem); font-weight: 800; color: #f1f5f9; letter-spacing: -.025em; margin-bottom: 20px; line-height: 1.2; } .ga-08__prose-body { font-size: .95rem; color: rgba(255,255,255,.45); line-height: 1.8; } /* Inline prose links */ .ga-08__inline { position: relative; display: inline; color: rgba(255,255,255,.8); text-decoration: none; cursor: pointer; padding-bottom: 2px; } .ga-08__inline::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 1.5px; border-radius: 999px; background: linear-gradient(90deg, #06b6d4, #818cf8, #ec4899, #06b6d4); background-size: 300% 100%; transform: scaleX(0); transform-origin: right; transition: transform .3s cubic-bezier(.22,1,.36,1); } .ga-08__inline:hover { color: #fff; } .ga-08__inline:hover::after { transform: scaleX(1); transform-origin: left; animation: ga-08-flow-inline 1.8s linear infinite; } @keyframes ga-08-flow-inline { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } } /* Speed control */ .ga-08__speed { margin-top: 40px; display: flex; align-items: center; gap: 8px; } .ga-08__speed-label { font-size: .7rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.25); } .ga-08__speed-btn { padding: 4px 12px; font-size: .72rem; font-weight: 700; border-radius: 6px; border: 1px solid rgba(255,255,255,.1); background: transparent; color: rgba(255,255,255,.35); cursor: pointer; transition: all .2s; } .ga-08__speed-btn.active, .ga-08__speed-btn:hover { background: rgba(6,182,212,.15); border-color: rgba(6,182,212,.35); color: #67e8f9; } @media (prefers-reduced-motion: reduce) { .ga-08__link:hover::after, .ga-08__link--active::after, .ga-08__inline:hover::after { animation: none; } .ga-08__link::after, .ga-08__inline::after { transition: transform .3s ease; } } ``` **JS:** ```js (function() { const w = document.querySelector('.ga-08'); w.querySelectorAll('.ga-08__speed-btn').forEach(btn => { btn.addEventListener('click', () => { w.querySelectorAll('.ga-08__speed-btn').forEach(b => b.classList.remove('active')); btn.classList.add('active'); w.style.setProperty('--dur', btn.dataset.dur); }); }); })(); ``` ### 09. CSS Animated Infinite Gradient Text **Type:** CSS + JS **Description:** Multiple gradient text variants — a hero headline, sentence-level accents, animated stat counters, and a badge tag — all using background-clip: text with a sliding background-position keyframe to create a continuously flowing colour palette across the lettering. **HTML:** ```html
    CSS background-clip gradient animation
    Build the future one pixel at a time.

    Gradient text is great for hero headlines, key statistics, and call-to-action words that need to pop without colour conflicts.

    4.2M Monthly users
    99.98% Uptime SLA
    18ms Avg. latency
    ``` **CSS:** ```css .ga-09, .ga-09 *, .ga-09 *::before, .ga-09 *::after { margin: 0; padding: 0; box-sizing: border-box; } .ga-09 ::selection { background: rgba(168,85,247,.4); color: #fff; } .ga-09 { --bg: #060912; --dur: 5s; width: 100%; min-height: 100vh; background: var(--bg); font-family: system-ui, -apple-system, sans-serif; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 48px; padding: 48px 24px; } /* ── Core gradient text technique ── */ .ga-09__text { background-clip: text; -webkit-background-clip: text; -webkit-text-fill-color: transparent; color: transparent; background-size: 300% 100%; animation: ga-09-slide var(--dur) linear infinite; } @keyframes ga-09-slide { 0% { background-position: 0% 50%; } 100% { background-position: -200% 50%; } } /* ── Variant A: hero headline ── */ .ga-09__hero { text-align: center; display: flex; flex-direction: column; gap: 8px; } .ga-09__pre { font-size: clamp(2.4rem, 6vw, 4rem); font-weight: 900; line-height: 1.08; letter-spacing: -.035em; color: rgba(255,255,255,.9); } .ga-09__gradient-a { font-size: clamp(2.4rem, 6vw, 4rem); font-weight: 900; line-height: 1.08; letter-spacing: -.035em; background-image: linear-gradient(90deg, #a855f7, #ec4899, #f97316, #eab308, #10b981, #06b6d4, #6366f1, #a855f7 ); } .ga-09__gradient-a.ga-09__text { animation-duration: calc(var(--dur) * 1.4); } /* ── Variant B: word-level accents in a sentence ── */ .ga-09__sentence { font-size: clamp(1.15rem, 2.5vw, 1.5rem); font-weight: 600; color: rgba(255,255,255,.55); line-height: 1.6; text-align: center; max-width: 580px; } .ga-09__accent-b { font-weight: 800; background-image: linear-gradient(90deg, #06b6d4, #818cf8, #ec4899, #f97316, #06b6d4 ); display: inline; } .ga-09__accent-b.ga-09__text { animation-duration: calc(var(--dur) * .8); } /* ── Variant C: display counters / stats ── */ .ga-09__stats { display: flex; gap: 40px; flex-wrap: wrap; justify-content: center; } .ga-09__stat { text-align: center; display: flex; flex-direction: column; gap: 4px; } .ga-09__stat-num { font-size: clamp(2rem, 4vw, 2.8rem); font-weight: 900; letter-spacing: -.03em; line-height: 1; } .ga-09__stat-c1 { background-image: linear-gradient(90deg, #06b6d4, #6366f1, #a855f7, #06b6d4); } .ga-09__stat-c2 { background-image: linear-gradient(90deg, #10b981, #06b6d4, #818cf8, #10b981); animation-delay: -.8s; } .ga-09__stat-c3 { background-image: linear-gradient(90deg, #f97316, #ec4899, #a855f7, #f97316); animation-delay: -1.6s; } .ga-09__stat-label { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: rgba(255,255,255,.3); } /* ── Variant D: large display tag ── */ .ga-09__tag-display { display: inline-flex; align-items: center; gap: 10px; padding: 8px 20px; border-radius: 999px; border: 1px solid rgba(255,255,255,.08); background: rgba(255,255,255,.03); } .ga-09__tag-icon { font-size: .9rem; } .ga-09__tag-text { font-size: .8rem; font-weight: 700; letter-spacing: .05em; background-image: linear-gradient(90deg, #c084fc, #818cf8, #67e8f9, #34d399, #c084fc); } /* Speed palette buttons */ .ga-09__controls { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; } .ga-09__ctrl-btn { padding: 5px 14px; border-radius: 7px; font-size: .73rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; border: 1px solid rgba(255,255,255,.1); background: rgba(255,255,255,.05); color: rgba(255,255,255,.4); cursor: pointer; transition: all .2s; } .ga-09__ctrl-btn.active, .ga-09__ctrl-btn:hover { background: rgba(168,85,247,.15); border-color: rgba(168,85,247,.3); color: #d8b4fe; } @media (prefers-reduced-motion: reduce) { .ga-09__text { animation: none; background-position: 0% 50%; } } ``` **JS:** ```js (function() { const w = document.querySelector('.ga-09'); w.querySelectorAll('.ga-09__ctrl-btn').forEach(btn => { btn.addEventListener('click', () => { w.querySelectorAll('.ga-09__ctrl-btn').forEach(b => b.classList.remove('active')); btn.classList.add('active'); w.style.setProperty('--dur', btn.dataset.dur); }); }); })(); ``` ### 10. CSS Hover Reveal Text Fill **Type:** Pure CSS **Description:** Plain text that reveals a flowing gradient fill on hover — using background-clip: text with a CSS transition that expands background-size from 0% to full width, plus a per-character stagger variant where each letter fills individually. **HTML:** ```html

    ↓ Hover each line to reveal the gradient fill

    Ship Faster. Build Smarter. Scale Effortlessly. Design Better.

    Character stagger — hover the word below

    I N N O V A T I O N
    ``` **CSS:** ```css .ga-10, .ga-10 *, .ga-10 *::before, .ga-10 *::after { margin: 0; padding: 0; box-sizing: border-box; } .ga-10 ::selection { background: rgba(245,158,11,.35); color: #fff; } .ga-10 { --bg: #09090f; --plain: rgba(255,255,255,.25); --dur: 3s; width: 100%; min-height: 100vh; background: var(--bg); font-family: system-ui, -apple-system, sans-serif; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 56px; padding: 56px 24px; } /* ── Core technique: layered backgrounds, clip to text ── The gradient is always there but background-size is 0% → 100% driven by a CSS transition on hover, revealing the fill left-to-right. */ /* Variant A — reveal fill sweeps left to right on hover */ .ga-10__reveal { position: relative; display: inline-block; font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 900; letter-spacing: -.03em; line-height: 1.1; cursor: default; /* Base colour */ color: var(--plain); /* Gradient overlay via background-clip */ background-image: linear-gradient(var(--grad-angle, 90deg), var(--g1, #f97316), var(--g2, #ec4899), var(--g3, #a855f7), var(--g4, #06b6d4) ); background-size: var(--fill, 0%) 100%; background-clip: text; -webkit-background-clip: text; /* The text colour itself is not transparent yet — we use a clip-path on a pseudo-element to overlay the gradient version */ -webkit-text-fill-color: var(--plain); } /* Gradient layer rides on the parent's background-clip */ .ga-10__reveal:hover { --fill: 100%; -webkit-text-fill-color: transparent; transition: background-size .55s cubic-bezier(.22,1,.36,1); animation: ga-10-flow var(--dur) linear infinite; background-size: 300% 100%; } @keyframes ga-10-flow { 0% { background-position: 0% 50%; } 100% { background-position: -200% 50%; } } /* Reset when not hovered */ .ga-10__reveal { transition: background-size .4s ease, -webkit-text-fill-color .1s .38s; background-position: 0% 50%; } /* Variant styles */ .ga-10__v2 { --g1: #10b981; --g2: #06b6d4; --g3: #818cf8; --g4: #a855f7; } .ga-10__v3 { --g1: #eab308; --g2: #f97316; --g3: #ef4444; --g4: #ec4899; } .ga-10__v4 { --g1: #c084fc; --g2: #818cf8; --g3: #38bdf8; --g4: #34d399; } /* ── Variant B — character-split stagger ── */ .ga-10__stagger { display: flex; gap: 0; flex-wrap: wrap; justify-content: center; } .ga-10__char { display: inline-block; font-size: clamp(2.6rem, 6vw, 4rem); font-weight: 900; letter-spacing: -.025em; color: rgba(255,255,255,.18); background-image: linear-gradient(90deg, #a855f7, #ec4899, #f97316, #eab308); background-size: 200% 100%; background-position: 0% 0; background-clip: text; -webkit-background-clip: text; -webkit-text-fill-color: inherit; transition: color .01s, -webkit-text-fill-color .01s; } .ga-10__stagger:hover .ga-10__char { -webkit-text-fill-color: transparent; animation: ga-10-char-fill .4s forwards, ga-10-flow-char 2s .4s linear infinite; } @keyframes ga-10-char-fill { to { background-position: -100% 0; } } @keyframes ga-10-flow-char { 0% { background-position: 0% 0; } 100% { background-position: -200% 0; } } /* Stagger delay */ .ga-10__stagger:hover .ga-10__char:nth-child(1) { animation-delay: 0s, .4s; } .ga-10__stagger:hover .ga-10__char:nth-child(2) { animation-delay: .04s, .44s; } .ga-10__stagger:hover .ga-10__char:nth-child(3) { animation-delay: .08s, .48s; } .ga-10__stagger:hover .ga-10__char:nth-child(4) { animation-delay: .12s, .52s; } .ga-10__stagger:hover .ga-10__char:nth-child(5) { animation-delay: .16s, .56s; } .ga-10__stagger:hover .ga-10__char:nth-child(6) { animation-delay: .20s, .60s; } .ga-10__stagger:hover .ga-10__char:nth-child(7) { animation-delay: .24s, .64s; } .ga-10__stagger:hover .ga-10__char:nth-child(8) { animation-delay: .28s, .68s; } .ga-10__stagger:hover .ga-10__char:nth-child(9) { animation-delay: .32s, .72s; } .ga-10__stagger:hover .ga-10__char:nth-child(10) { animation-delay: .36s, .76s; } .ga-10__stagger:hover .ga-10__char:nth-child(11) { animation-delay: .40s, .80s; } /* Space character */ .ga-10__char--sp { background: none !important; -webkit-text-fill-color: transparent !important; } /* Sub-hint */ .ga-10__hint { font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; color: rgba(255,255,255,.2); } @media (prefers-reduced-motion: reduce) { .ga-10__reveal:hover, .ga-10__stagger:hover .ga-10__char { animation: none; } .ga-10__reveal:hover { background-size: 100% 100%; } } ``` ### 11. CSS Glassmorphism Moving Backdrop **Type:** CSS + JS **Description:** Four animated radial-gradient blobs drift behind a frosted-glass modal card that uses backdrop-filter: blur(28px), magnifying the depth illusion as the colourful layer shifts continuously beneath the transparency. **HTML:** ```html
    Secure
    Email address
    Password

    The blobs behind the glass card are pure CSS animated gradients. The glass card uses backdrop-filter: blur(28px).

    ``` **CSS:** ```css .ga-11, .ga-11 *, .ga-11 *::before, .ga-11 *::after { margin: 0; padding: 0; box-sizing: border-box; } .ga-11 ::selection { background: rgba(99,102,241,.5); color: #fff; } .ga-11 { --bg: #080a12; --dur: 10s; position: relative; width: 100%; min-height: 100vh; overflow: hidden; background: var(--bg); font-family: system-ui, -apple-system, sans-serif; display: flex; align-items: center; justify-content: center; padding: 48px 24px; } /* ── Animated gradient backdrop blobs ── */ .ga-11__blob { position: absolute; border-radius: 50%; filter: blur(50px); will-change: transform; } .ga-11__blob--1 { width: 420px; height: 420px; background: radial-gradient(circle, rgba(124,58,237,.7), transparent 65%); top: -80px; left: -80px; animation: ga-11-b1 var(--dur) ease-in-out infinite alternate; } .ga-11__blob--2 { width: 380px; height: 380px; background: radial-gradient(circle, rgba(6,182,212,.6), transparent 65%); bottom: -60px; right: -60px; animation: ga-11-b2 calc(var(--dur) * 1.3) ease-in-out infinite alternate; } .ga-11__blob--3 { width: 300px; height: 300px; background: radial-gradient(circle, rgba(236,72,153,.55), transparent 65%); top: 40%; left: 50%; transform: translate(-50%, -50%); animation: ga-11-b3 calc(var(--dur) * 1.6) ease-in-out infinite alternate; } .ga-11__blob--4 { width: 250px; height: 250px; background: radial-gradient(circle, rgba(16,185,129,.5), transparent 65%); bottom: 10%; left: 10%; animation: ga-11-b4 calc(var(--dur) * .9) ease-in-out infinite alternate; } @keyframes ga-11-b1 { 0% { transform: translate(0, 0) scale(1); } 100% { transform: translate(180px, 130px) scale(1.2); } } @keyframes ga-11-b2 { 0% { transform: translate(0, 0) scale(1); } 100% { transform: translate(-150px, -120px) scale(1.1); } } @keyframes ga-11-b3 { 0% { transform: translate(-50%, -50%) scale(1); } 100% { transform: translate(-30%, -70%) scale(.85); } } @keyframes ga-11-b4 { 0% { transform: translate(0, 0); } 100% { transform: translate(100px, -80px) scale(1.15); } } /* ── Glass card ── */ .ga-11__glass { position: relative; z-index: 2; width: 100%; max-width: 440px; border-radius: 24px; padding: 36px; background: rgba(255,255,255,.055); border: 1px solid rgba(255,255,255,.1); backdrop-filter: blur(28px) saturate(180%); -webkit-backdrop-filter: blur(28px) saturate(180%); box-shadow: 0 0 0 1px rgba(255,255,255,.04) inset, 0 24px 60px rgba(0,0,0,.4); display: flex; flex-direction: column; gap: 22px; } /* Card inner content */ .ga-11__card-head { display: flex; align-items: center; justify-content: space-between; } .ga-11__logo { display: flex; align-items: center; gap: 10px; } .ga-11__logo-box { width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(135deg, #7c3aed, #06b6d4); display: flex; align-items: center; justify-content: center; font-size: 15px; } .ga-11__logo-name { font-size: .9rem; font-weight: 700; color: rgba(255,255,255,.9); } .ga-11__status { display: flex; align-items: center; gap: 6px; font-size: .72rem; font-weight: 700; color: #34d399; text-transform: uppercase; letter-spacing: .08em; } .ga-11__status-dot { width: 7px; height: 7px; border-radius: 50%; background: #34d399; animation: ga-11-blink 2s ease-in-out infinite; } @keyframes ga-11-blink { 0%, 100% { opacity: 1; } 50% { opacity: .3; } } .ga-11__divider { height: 1px; background: rgba(255,255,255,.07); } .ga-11__form-field { display: flex; flex-direction: column; gap: 6px; } .ga-11__form-label { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .09em; color: rgba(255,255,255,.35); } .ga-11__form-input { padding: 11px 14px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1); border-radius: 10px; font-size: .88rem; color: rgba(255,255,255,.8); outline: none; transition: border-color .2s, background .2s; } .ga-11__form-input:focus { border-color: rgba(124,58,237,.5); background: rgba(124,58,237,.07); } .ga-11__form-input::placeholder { color: rgba(255,255,255,.2); } .ga-11__btn-row { display: flex; gap: 10px; } .ga-11__btn { flex: 1; padding: 11px; border-radius: 10px; font-size: .85rem; font-weight: 700; cursor: pointer; border: none; transition: all .2s; } .ga-11__btn--fill { background: linear-gradient(135deg, #7c3aed, #06b6d4); color: #fff; } .ga-11__btn--fill:hover { box-shadow: 0 4px 20px rgba(124,58,237,.4); transform: translateY(-1px); } .ga-11__btn--ghost { background: rgba(255,255,255,.06); color: rgba(255,255,255,.5); border: 1px solid rgba(255,255,255,.1); } .ga-11__btn--ghost:hover { background: rgba(255,255,255,.1); color: rgba(255,255,255,.75); } .ga-11__note { font-size: .72rem; color: rgba(255,255,255,.25); text-align: center; line-height: 1.5; } /* Speed control */ .ga-11__ctrl { position: absolute; bottom: 16px; right: 16px; z-index: 10; display: flex; gap: 6px; } .ga-11__ctrl-btn { padding: 4px 10px; font-size: .7rem; font-weight: 700; border-radius: 6px; border: 1px solid rgba(255,255,255,.1); background: rgba(255,255,255,.05); color: rgba(255,255,255,.35); cursor: pointer; transition: all .2s; backdrop-filter: blur(4px); } .ga-11__ctrl-btn.active, .ga-11__ctrl-btn:hover { background: rgba(124,58,237,.2); border-color: rgba(124,58,237,.4); color: #c4b5fd; } @media (prefers-reduced-motion: reduce) { .ga-11__blob { animation: none; } .ga-11__status-dot { animation: none; } } ``` **JS:** ```js (function() { const w = document.querySelector('.ga-11'); w.querySelectorAll('.ga-11__ctrl-btn').forEach(btn => { btn.addEventListener('click', () => { w.querySelectorAll('.ga-11__ctrl-btn').forEach(b => b.classList.remove('active')); btn.classList.add('active'); w.style.setProperty('--dur', btn.dataset.dur); }); }); })(); ``` ### 12. CSS Retro Vaporwave Cyberpunk Mesh **Type:** CSS + JS **Description:** A high-contrast, fast-rotating mesh gradient in neon magenta, cyan, and violet layered with a CSS grid overlay and CRT scanlines, creating a brutalist retro-futuristic aesthetic popular in vaporwave and cyberpunk design. **HTML:** ```html
    ∴ 1989 — 2089 ∴

    VAPORWAVE

    Aesthetics · Interface · Future · Retro

    Neon Magenta Cyber Cyan Deep Violet
    ``` **CSS:** ```css .ga-12, .ga-12 *, .ga-12 *::before, .ga-12 *::after { margin: 0; padding: 0; box-sizing: border-box; } .ga-12 ::selection { background: rgba(236,72,153,.5); color: #fff; } .ga-12 { --bg: #06010f; --c1: #ff00ff; --c2: #00ffff; --c3: #bf00ff; --c4: #ff006e; --dur: 6s; position: relative; width: 100%; min-height: 100vh; overflow: hidden; background: var(--bg); font-family: system-ui, -apple-system, sans-serif; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 32px; padding: 48px 24px; } /* ── Fast-moving high-contrast mesh ── */ .ga-12::before { content: ''; position: absolute; inset: -20%; background: radial-gradient(ellipse 50% 40% at 20% 30%, color-mix(in srgb, var(--c1) 35%, transparent), transparent 60%), radial-gradient(ellipse 45% 45% at 80% 70%, color-mix(in srgb, var(--c2) 30%, transparent), transparent 60%), radial-gradient(ellipse 40% 50% at 60% 20%, color-mix(in srgb, var(--c3) 28%, transparent), transparent 55%), radial-gradient(ellipse 55% 35% at 30% 80%, color-mix(in srgb, var(--c4) 25%, transparent), transparent 55%); animation: ga-12-mesh var(--dur) linear infinite; mix-blend-mode: screen; } /* Second mesh layer — faster, different direction */ .ga-12::after { content: ''; position: absolute; inset: -20%; background: radial-gradient(ellipse 30% 50% at 70% 40%, color-mix(in srgb, var(--c2) 20%, transparent), transparent 55%), radial-gradient(ellipse 40% 30% at 15% 60%, color-mix(in srgb, var(--c1) 18%, transparent), transparent 50%); animation: ga-12-mesh2 calc(var(--dur) * .7) linear infinite reverse; mix-blend-mode: screen; } @keyframes ga-12-mesh { 0% { transform: rotate(0deg) scale(1); } 100% { transform: rotate(360deg) scale(1.05); } } @keyframes ga-12-mesh2 { 0% { transform: rotate(0deg) translate(0, 0); } 33% { transform: rotate(120deg) translate(5%, -5%); } 66% { transform: rotate(240deg) translate(-5%, 5%); } 100% { transform: rotate(360deg) translate(0, 0); } } /* Scan-line grid overlay */ .ga-12__grid { position: absolute; inset: 0; background-image: linear-gradient(rgba(0,255,255,.03) 1px, transparent 1px), linear-gradient(90deg, rgba(0,255,255,.03) 1px, transparent 1px); background-size: 40px 40px; pointer-events: none; z-index: 1; } /* CRT scanline overlay */ .ga-12__scan { position: absolute; inset: 0; background: repeating-linear-gradient( to bottom, transparent 0px, transparent 2px, rgba(0,0,0,.08) 2px, rgba(0,0,0,.08) 4px ); pointer-events: none; z-index: 2; } /* Content */ .ga-12__content { position: relative; z-index: 3; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; } .ga-12__year { font-size: .72rem; font-weight: 900; letter-spacing: .3em; text-transform: uppercase; color: var(--c2); text-shadow: 0 0 10px var(--c2), 0 0 20px var(--c2); animation: ga-12-flicker 4s ease-in-out infinite; } @keyframes ga-12-flicker { 0%, 95%, 100% { opacity: 1; } 96% { opacity: .6; } 97% { opacity: 1; } 98% { opacity: .4; } } .ga-12__title { font-size: clamp(2.4rem, 7vw, 5rem); font-weight: 900; line-height: 1; letter-spacing: -.02em; text-transform: uppercase; background: linear-gradient(180deg, var(--c1) 0%, var(--c2) 55%, var(--c3) 100%); background-clip: text; -webkit-background-clip: text; -webkit-text-fill-color: transparent; filter: drop-shadow(0 0 16px rgba(255,0,255,.6)) drop-shadow(0 0 32px rgba(0,255,255,.3)); } .ga-12__sub { font-size: .95rem; font-weight: 600; color: rgba(0,255,255,.7); letter-spacing: .08em; text-shadow: 0 0 8px rgba(0,255,255,.5); } .ga-12__divider { width: 200px; height: 1px; background: linear-gradient(90deg, transparent, var(--c1), var(--c2), transparent); position: relative; } .ga-12__divider::after { content: ''; position: absolute; inset: 0; background: inherit; filter: blur(4px); opacity: .7; } /* Stat pills */ .ga-12__pills { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin-top: 4px; } .ga-12__pill { padding: 6px 16px; border-radius: 4px; font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; border: 1px solid; cursor: pointer; transition: all .2s; } .ga-12__pill--m { color: var(--c1); border-color: rgba(255,0,255,.35); background: rgba(255,0,255,.07); } .ga-12__pill--m:hover { background: rgba(255,0,255,.15); box-shadow: 0 0 12px rgba(255,0,255,.3); } .ga-12__pill--c { color: var(--c2); border-color: rgba(0,255,255,.35); background: rgba(0,255,255,.06); } .ga-12__pill--c:hover { background: rgba(0,255,255,.12); box-shadow: 0 0 12px rgba(0,255,255,.25); } .ga-12__pill--p { color: var(--c3); border-color: rgba(191,0,255,.3); background: rgba(191,0,255,.06); } .ga-12__pill--p:hover { background: rgba(191,0,255,.13); box-shadow: 0 0 12px rgba(191,0,255,.25); } /* Speed control */ .ga-12__ctrl { position: absolute; bottom: 14px; right: 14px; z-index: 10; display: flex; gap: 5px; } .ga-12__ctrl-btn { padding: 4px 10px; font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; border-radius: 3px; border: 1px solid rgba(0,255,255,.2); background: rgba(0,0,0,.4); color: rgba(0,255,255,.4); cursor: pointer; transition: all .15s; } .ga-12__ctrl-btn.active, .ga-12__ctrl-btn:hover { border-color: var(--c2); color: var(--c2); text-shadow: 0 0 6px var(--c2); } @media (prefers-reduced-motion: reduce) { .ga-12::before, .ga-12::after { animation: none; } .ga-12__year { animation: none; } } ``` **JS:** ```js (function() { const w = document.querySelector('.ga-12'); w.querySelectorAll('.ga-12__ctrl-btn').forEach(btn => { btn.addEventListener('click', () => { w.querySelectorAll('.ga-12__ctrl-btn').forEach(b => b.classList.remove('active')); btn.classList.add('active'); w.style.setProperty('--dur', btn.dataset.dur); }); }); })(); ``` ### 13. CSS Liquid Lava Lamp Blob Animation **Type:** CSS + JS **Description:** Three themed lava lamps — Ember (orange-pink), Aether (cyan-violet), and Growth (green-yellow) — each containing morphing radial-gradient blobs that simultaneously change shape via border-radius keyframes and float vertically, simulating fluid droplets in a heated lamp. **HTML:** ```html
    Ember
    Aether
    Growth
    ``` **CSS:** ```css .ga-13, .ga-13 *, .ga-13 *::before, .ga-13 *::after { margin: 0; padding: 0; box-sizing: border-box; } .ga-13 ::selection { background: rgba(249,115,22,.4); color: #fff; } .ga-13 { --bg: #0a0510; --dur: 8s; width: 100%; min-height: 100vh; background: var(--bg); font-family: system-ui, -apple-system, sans-serif; display: flex; align-items: center; justify-content: center; gap: 32px; flex-wrap: wrap; padding: 48px 24px; position: relative; } /* ── Single lava blob ── */ .ga-13__lamp { position: relative; width: 180px; height: 260px; border-radius: 16px; overflow: hidden; background: #100820; border: 1px solid rgba(255,255,255,.06); flex-shrink: 0; } /* Container label */ .ga-13__lamp-label { position: absolute; bottom: 14px; left: 0; right: 0; text-align: center; font-size: .7rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; z-index: 3; } /* Each blob is a div with morphing border-radius + position animation */ .ga-13__blob { position: absolute; border-radius: 50%; filter: blur(2px); } /* ── Lamp A: Orange-pink ── */ .ga-13__lamp--a { background: #0d060a; } .ga-13__lamp--a .ga-13__blob:nth-child(1) { width: 100px; height: 100px; background: radial-gradient(circle at 35% 40%, #ff6b2b, #ff2d7f); animation: ga-13-morph-a1 var(--dur) ease-in-out infinite, ga-13-float-a1 var(--dur) ease-in-out infinite; top: 60%; left: 40px; } .ga-13__lamp--a .ga-13__blob:nth-child(2) { width: 70px; height: 70px; background: radial-gradient(circle at 40% 35%, #ffab40, #ff5252); animation: ga-13-morph-a2 calc(var(--dur) * 1.3) ease-in-out infinite, ga-13-float-a2 calc(var(--dur) * 1.3) ease-in-out infinite; top: 20%; left: 55px; animation-delay: calc(var(--dur) * -.4); } .ga-13__lamp--a .ga-13__blob:nth-child(3) { width: 50px; height: 50px; background: radial-gradient(circle, #ff9d00, #ff3d00); animation: ga-13-morph-a2 calc(var(--dur) * .9) ease-in-out infinite, ga-13-float-a3 calc(var(--dur) * .9) ease-in-out infinite; top: 40%; left: 70px; animation-delay: calc(var(--dur) * -.65); } .ga-13__lamp--a .ga-13__lamp-label { color: #ff7b3a; } /* ── Lamp B: Cyan-violet ── */ .ga-13__lamp--b { background: #050a12; } .ga-13__lamp--b .ga-13__blob:nth-child(1) { width: 110px; height: 90px; background: radial-gradient(circle at 40% 45%, #00e5ff, #6c63ff); animation: ga-13-morph-b1 calc(var(--dur) * 1.1) ease-in-out infinite, ga-13-float-b1 calc(var(--dur) * 1.1) ease-in-out infinite; top: 55%; left: 35px; } .ga-13__lamp--b .ga-13__blob:nth-child(2) { width: 75px; height: 85px; background: radial-gradient(circle at 45% 35%, #18ffff, #7c4dff); animation: ga-13-morph-b2 calc(var(--dur) * .85) ease-in-out infinite, ga-13-float-b2 calc(var(--dur) * .85) ease-in-out infinite; top: 15%; left: 50px; animation-delay: calc(var(--dur) * -.3); } .ga-13__lamp--b .ga-13__blob:nth-child(3) { width: 45px; height: 55px; background: radial-gradient(circle, #64ffda, #536dfe); animation: ga-13-morph-b1 calc(var(--dur) * 1.4) ease-in-out infinite, ga-13-float-a3 calc(var(--dur) * 1.4) ease-in-out infinite; top: 35%; left: 60px; animation-delay: calc(var(--dur) * -.55); } .ga-13__lamp--b .ga-13__lamp-label { color: #00e5ff; } /* ── Lamp C: Green-yellow ── */ .ga-13__lamp--c { background: #030d07; } .ga-13__lamp--c .ga-13__blob:nth-child(1) { width: 95px; height: 105px; background: radial-gradient(circle at 38% 42%, #00e676, #ffea00); animation: ga-13-morph-c1 calc(var(--dur) * .95) ease-in-out infinite, ga-13-float-c1 calc(var(--dur) * .95) ease-in-out infinite; top: 58%; left: 42px; } .ga-13__lamp--c .ga-13__blob:nth-child(2) { width: 65px; height: 75px; background: radial-gradient(circle at 42% 38%, #b2ff59, #69f0ae); animation: ga-13-morph-c2 calc(var(--dur) * 1.2) ease-in-out infinite, ga-13-float-c2 calc(var(--dur) * 1.2) ease-in-out infinite; top: 18%; left: 58px; animation-delay: calc(var(--dur) * -.45); } .ga-13__lamp--c .ga-13__blob:nth-child(3) { width: 42px; height: 48px; background: radial-gradient(circle, #ccff90, #00c853); animation: ga-13-morph-c1 calc(var(--dur) * 1.5) ease-in-out infinite, ga-13-float-a1 calc(var(--dur) * 1.5) ease-in-out infinite; top: 38%; left: 68px; animation-delay: calc(var(--dur) * -.7); } .ga-13__lamp--c .ga-13__lamp-label { color: #69f0ae; } /* Morph keyframes (border-radius) */ @keyframes ga-13-morph-a1 { 0% { border-radius: 60% 40% 70% 30% / 50% 60% 40% 50%; } 25% { border-radius: 30% 70% 40% 60% / 60% 40% 70% 30%; } 50% { border-radius: 50% 50% 30% 70% / 40% 60% 50% 60%; } 75% { border-radius: 70% 30% 60% 40% / 30% 70% 40% 60%; } 100% { border-radius: 60% 40% 70% 30% / 50% 60% 40% 50%; } } @keyframes ga-13-morph-a2 { 0% { border-radius: 40% 60% 50% 50% / 60% 40% 60% 40%; } 33% { border-radius: 60% 40% 70% 30% / 40% 60% 30% 70%; } 66% { border-radius: 30% 70% 40% 60% / 70% 30% 60% 40%; } 100% { border-radius: 40% 60% 50% 50% / 60% 40% 60% 40%; } } @keyframes ga-13-morph-b1 { 0% { border-radius: 55% 45% 65% 35% / 45% 55% 45% 55%; } 30% { border-radius: 35% 65% 45% 55% / 65% 35% 65% 35%; } 60% { border-radius: 65% 35% 55% 45% / 35% 65% 35% 65%; } 100% { border-radius: 55% 45% 65% 35% / 45% 55% 45% 55%; } } @keyframes ga-13-morph-b2 { 0% { border-radius: 45% 55% 35% 65% / 55% 45% 65% 35%; } 40% { border-radius: 65% 35% 55% 45% / 35% 65% 45% 55%; } 80% { border-radius: 35% 65% 45% 55% / 65% 35% 55% 45%; } 100% { border-radius: 45% 55% 35% 65% / 55% 45% 65% 35%; } } @keyframes ga-13-morph-c1 { 0% { border-radius: 50% 50% 60% 40% / 40% 60% 50% 50%; } 35% { border-radius: 70% 30% 40% 60% / 60% 40% 70% 30%; } 70% { border-radius: 40% 60% 70% 30% / 30% 70% 40% 60%; } 100% { border-radius: 50% 50% 60% 40% / 40% 60% 50% 50%; } } @keyframes ga-13-morph-c2 { 0% { border-radius: 60% 40% 50% 50% / 50% 50% 40% 60%; } 45% { border-radius: 40% 60% 60% 40% / 60% 40% 50% 50%; } 90% { border-radius: 50% 50% 40% 60% / 40% 60% 60% 40%; } 100% { border-radius: 60% 40% 50% 50% / 50% 50% 40% 60%; } } /* Float keyframes (position) */ @keyframes ga-13-float-a1 { 0%, 100% { top: 60%; } 30% { top: 10%; } 60% { top: 40%; } } @keyframes ga-13-float-a2 { 0%, 100% { top: 18%; } 40% { top: 65%; } 70% { top: 25%; } } @keyframes ga-13-float-a3 { 0%, 100% { top: 42%; } 25% { top: 5%; } 55% { top: 70%; } 80% { top: 30%; } } @keyframes ga-13-float-b1 { 0%, 100% { top: 55%; left: 35px; } 35% { top: 8%; left: 45px; } 65% { top: 35%; left: 25px; } } @keyframes ga-13-float-b2 { 0%, 100% { top: 15%; left: 50px; } 45% { top: 62%; left: 40px; } 75% { top: 22%; left: 55px; } } @keyframes ga-13-float-c1 { 0%, 100% { top: 58%; } 28% { top: 6%; } 58% { top: 38%; } } @keyframes ga-13-float-c2 { 0%, 100% { top: 18%; } 38% { top: 62%; } 72% { top: 28%; } } /* Speed toggle */ .ga-13__ctrl { position: absolute; bottom: 14px; right: 14px; display: flex; gap: 5px; } .ga-13__ctrl-btn { padding: 4px 10px; font-size: .7rem; font-weight: 700; border-radius: 6px; border: 1px solid rgba(255,255,255,.1); background: rgba(255,255,255,.05); color: rgba(255,255,255,.35); cursor: pointer; transition: all .2s; } .ga-13__ctrl-btn.active, .ga-13__ctrl-btn:hover { background: rgba(249,115,22,.15); border-color: rgba(249,115,22,.35); color: #fb923c; } @media (prefers-reduced-motion: reduce) { .ga-13__blob { animation: none !important; border-radius: 50%; top: 50% !important; left: 50% !important; transform: translate(-50%, -50%); } } ``` **JS:** ```js (function() { const w = document.querySelector('.ga-13'); w.querySelectorAll('.ga-13__ctrl-btn').forEach(btn => { btn.addEventListener('click', () => { w.querySelectorAll('.ga-13__ctrl-btn').forEach(b => b.classList.remove('active')); btn.classList.add('active'); w.style.setProperty('--dur', btn.dataset.dur); }); }); })(); ``` ### 14. CSS Striped Progress Bar Loader **Type:** CSS + JS **Description:** Five progress bar variants — indigo deploy, emerald storage, amber CPU, rose queue, plus an indeterminate loader — all using repeating-linear-gradient diagonal stripes that scroll infinitely across the fill to signal active loading status. **HTML:** ```html
    Deploying to production 72%
    Storage used 45 / 100 GB
    CPU utilisation 88%
    Request queue 31%
    Syncing cloud data…
    Build Test Package Deploy Verify
    Stripe speed:
    ``` **CSS:** ```css .ga-14, .ga-14 *, .ga-14 *::before, .ga-14 *::after { margin: 0; padding: 0; box-sizing: border-box; } .ga-14 ::selection { background: rgba(99,102,241,.4); color: #fff; } .ga-14 { --bg: #0c0d16; --track: #1a1c2e; --dur-stripe: .7s; width: 100%; min-height: 100vh; background: var(--bg); font-family: system-ui, -apple-system, sans-serif; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 36px; padding: 48px 32px; } /* ── Progress bar shell ── */ .ga-14__bar { width: 100%; max-width: 540px; display: flex; flex-direction: column; gap: 8px; } .ga-14__bar-meta { display: flex; justify-content: space-between; align-items: baseline; } .ga-14__bar-label { font-size: .78rem; font-weight: 700; color: rgba(255,255,255,.55); } .ga-14__bar-pct { font-size: .7rem; font-weight: 800; color: rgba(255,255,255,.4); font-variant-numeric: tabular-nums; } /* Track */ .ga-14__track { width: 100%; height: 14px; background: var(--track); border-radius: 999px; overflow: hidden; position: relative; } /* Fill */ .ga-14__fill { height: 100%; border-radius: 999px; position: relative; overflow: hidden; transition: width .4s ease; } /* Stripe overlay on fill using repeating-linear-gradient */ .ga-14__fill::after { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient( -45deg, rgba(255,255,255,.12) 0px, rgba(255,255,255,.12) 8px, transparent 8px, transparent 16px ); background-size: 22.63px 22.63px; /* √(16²+16²) for perfect diagonal tiling */ animation: ga-14-stripe var(--dur-stripe) linear infinite; } @keyframes ga-14-stripe { to { background-position: 22.63px 0; } } /* Colour variants */ .ga-14__fill--indigo { background: linear-gradient(90deg, #6366f1, #818cf8); width: 72%; } .ga-14__fill--emerald { background: linear-gradient(90deg, #059669, #34d399); width: 45%; } .ga-14__fill--amber { background: linear-gradient(90deg, #d97706, #fbbf24); width: 88%; } .ga-14__fill--rose { background: linear-gradient(90deg, #e11d48, #fb7185); width: 31%; } .ga-14__fill--cyan { background: linear-gradient(90deg, #0891b2, #22d3ee); width: 60%; } /* Thin track variant */ .ga-14__track--thin { height: 8px; } .ga-14__track--thick { height: 20px; border-radius: 6px; } .ga-14__fill--thick { border-radius: 4px; } /* Indeterminate / infinite fill variant */ .ga-14__fill--indeterminate { width: 40%; position: absolute; animation: ga-14-indeterminate 1.8s ease-in-out infinite; background: linear-gradient(90deg, #6366f1, #a855f7, #ec4899); } @keyframes ga-14-indeterminate { 0% { left: -40%; } 100% { left: 110%; } } .ga-14__fill--indeterminate::after { animation: none; } .ga-14__track--indeterminate { overflow: hidden; position: relative; height: 10px; } /* Step labels under bar */ .ga-14__steps { display: flex; justify-content: space-between; max-width: 540px; width: 100%; } .ga-14__step { font-size: .62rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: rgba(255,255,255,.2); } .ga-14__step--done { color: #818cf8; } /* Section label */ .ga-14__section-label { font-size: .65rem; font-weight: 800; text-transform: uppercase; letter-spacing: .12em; color: rgba(255,255,255,.2); width: 100%; max-width: 540px; margin-bottom: -20px; } /* speed control */ .ga-14__ctrl { display: flex; align-items: center; gap: 8px; } .ga-14__ctrl-label { font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .09em; color: rgba(255,255,255,.2); } .ga-14__ctrl-btn { padding: 4px 12px; font-size: .7rem; font-weight: 700; border-radius: 6px; border: 1px solid rgba(255,255,255,.1); background: rgba(255,255,255,.05); color: rgba(255,255,255,.35); cursor: pointer; transition: all .2s; } .ga-14__ctrl-btn.active, .ga-14__ctrl-btn:hover { background: rgba(99,102,241,.15); border-color: rgba(99,102,241,.35); color: #a5b4fc; } @media (prefers-reduced-motion: reduce) { .ga-14__fill::after { animation: none; } .ga-14__fill--indeterminate { animation: none; left: 30%; } } ``` **JS:** ```js (function() { const w = document.querySelector('.ga-14'); w.querySelectorAll('.ga-14__ctrl-btn').forEach(btn => { btn.addEventListener('click', () => { w.querySelectorAll('.ga-14__ctrl-btn').forEach(b => b.classList.remove('active')); btn.classList.add('active'); w.style.setProperty('--dur-stripe', btn.dataset.dur); }); }); })(); ``` ### 15. CSS Active File Upload Streaming State **Type:** CSS + JS **Description:** A file upload UI showing three upload states — active uploading with a spinning conic-gradient border and shimmer progress fill, completed with a green fill, and failed with a red fill — plus a styled drop zone. **HTML:** ```html
    🖼
    hero-banner-v3.png
    4.2 MB
    ⟳ Uploading… 63%
    📄
    proposal-final.pdf
    1.8 MB
    ✓ Complete 100%
    📦
    assets-bundle.zip
    92.4 MB
    ⚠ Failed 40%
    Drop files here PNG, JPG, PDF, ZIP — max 100 MB
    ``` **CSS:** ```css .ga-15, .ga-15 *, .ga-15 *::before, .ga-15 *::after { margin: 0; padding: 0; box-sizing: border-box; } .ga-15 ::selection { background: rgba(6,182,212,.4); color: #fff; } .ga-15 { --bg: #080d14; --card-bg: #0e1520; --dur: 2s; width: 100%; min-height: 100vh; background: var(--bg); font-family: system-ui, -apple-system, sans-serif; display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 20px; padding: 48px 24px; } /* ── Upload card ── */ .ga-15__card { width: 280px; background: var(--card-bg); border-radius: 16px; padding: 20px; display: flex; flex-direction: column; gap: 14px; position: relative; overflow: hidden; } /* Glowing border pulse on uploading card */ .ga-15__card--uploading::before { content: ''; position: absolute; inset: -2px; border-radius: 18px; background: conic-gradient( from var(--r, 0deg), transparent 0deg, #06b6d4 60deg, #818cf8 120deg, transparent 180deg, transparent 360deg ); animation: ga-15-spin var(--dur) linear infinite; z-index: 0; } .ga-15__card--uploading::after { content: ''; position: absolute; inset: 2px; background: var(--card-bg); border-radius: 14px; z-index: 1; } @property --r { syntax: ''; inherits: false; initial-value: 0deg; } @keyframes ga-15-spin { to { --r: 360deg; } } /* Idle card — static border */ .ga-15__card--idle { border: 1px solid rgba(255,255,255,.06); } /* Done card */ .ga-15__card--done { border: 1px solid rgba(16,185,129,.2); } .ga-15__card--error { border: 1px solid rgba(239,68,68,.2); } .ga-15__card-inner { position: relative; z-index: 2; display: flex; flex-direction: column; gap: 14px; } /* File row */ .ga-15__file { display: flex; align-items: center; gap: 12px; } .ga-15__file-icon { width: 38px; height: 38px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 1rem; flex-shrink: 0; } .ga-15__file-icon--img { background: rgba(99,102,241,.15); } .ga-15__file-icon--pdf { background: rgba(239,68,68,.12); } .ga-15__file-icon--zip { background: rgba(245,158,11,.12); } .ga-15__file-info { flex: 1; min-width: 0; } .ga-15__file-name { font-size: .82rem; font-weight: 700; color: rgba(255,255,255,.75); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .ga-15__file-size { font-size: .7rem; color: rgba(255,255,255,.3); margin-top: 2px; } .ga-15__file-action { font-size: .9rem; cursor: pointer; color: rgba(255,255,255,.25); transition: color .2s; flex-shrink: 0; } .ga-15__file-action:hover { color: rgba(255,255,255,.6); } /* Progress row */ .ga-15__prog-row { display: flex; justify-content: space-between; align-items: baseline; } .ga-15__prog-status { font-size: .7rem; font-weight: 700; display: flex; align-items: center; gap: 5px; } .ga-15__prog-status--up { color: #67e8f9; } .ga-15__prog-status--done { color: #34d399; } .ga-15__prog-status--err { color: #f87171; } .ga-15__prog-status--idle { color: rgba(255,255,255,.3); } .ga-15__prog-pct { font-size: .7rem; font-weight: 800; font-variant-numeric: tabular-nums; color: rgba(255,255,255,.35); } /* Track */ .ga-15__track { width: 100%; height: 5px; border-radius: 999px; background: rgba(255,255,255,.07); overflow: hidden; position: relative; } .ga-15__fill { height: 100%; border-radius: 999px; position: relative; overflow: hidden; } .ga-15__fill--up { background: linear-gradient(90deg, #0891b2, #22d3ee, #818cf8); width: 63%; animation: ga-15-fill-pulse var(--dur) ease-in-out infinite; } @keyframes ga-15-fill-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .7; } } /* Shimmer on uploading fill */ .ga-15__fill--up::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,.25) 50%, transparent 100%); animation: ga-15-shimmer 1.2s linear infinite; } @keyframes ga-15-shimmer { from { transform: translateX(-100%); } to { transform: translateX(200%); } } .ga-15__fill--done { background: #10b981; width: 100%; } .ga-15__fill--err { background: #ef4444; width: 40%; } .ga-15__fill--idle { background: rgba(255,255,255,.12); width: 0%; } /* Upload dropzone */ .ga-15__drop { width: 280px; height: 160px; border-radius: 14px; border: 1.5px dashed rgba(255,255,255,.1); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; cursor: pointer; transition: all .25s; position: relative; overflow: hidden; } .ga-15__drop::before { content: ''; position: absolute; inset: 0; background: linear-gradient(135deg, rgba(6,182,212,.06), rgba(99,102,241,.06)); opacity: 0; transition: opacity .25s; } .ga-15__drop:hover { border-color: rgba(6,182,212,.35); } .ga-15__drop:hover::before { opacity: 1; } .ga-15__drop-icon { font-size: 1.6rem; } .ga-15__drop-text { font-size: .8rem; font-weight: 600; color: rgba(255,255,255,.45); } .ga-15__drop-sub { font-size: .68rem; color: rgba(255,255,255,.2); } /* Speed control */ .ga-15__ctrl { position: absolute; bottom: 12px; right: 12px; display: flex; gap: 5px; } .ga-15 { position: relative; } .ga-15__ctrl-btn { padding: 4px 10px; font-size: .68rem; font-weight: 700; border-radius: 6px; border: 1px solid rgba(255,255,255,.08); background: rgba(255,255,255,.04); color: rgba(255,255,255,.3); cursor: pointer; transition: all .2s; } .ga-15__ctrl-btn.active, .ga-15__ctrl-btn:hover { background: rgba(6,182,212,.12); border-color: rgba(6,182,212,.3); color: #67e8f9; } @media (prefers-reduced-motion: reduce) { .ga-15__card--uploading::before { animation: none; } .ga-15__fill--up, .ga-15__fill--up::after { animation: none; } } ``` **JS:** ```js (function() { const w = document.querySelector('.ga-15'); w.querySelectorAll('.ga-15__ctrl-btn').forEach(btn => { btn.addEventListener('click', () => { w.querySelectorAll('.ga-15__ctrl-btn').forEach(b => b.classList.remove('active')); btn.classList.add('active'); w.style.setProperty('--dur', btn.dataset.dur); }); }); })(); ``` ### 16. CSS Toggle Switch Track Glow **Type:** CSS + JS **Description:** A settings panel with five checkbox-driven toggle switches where activating each switch floods the track with a continuously flowing gradient stream and emits a soft outer glow — all driven by the CSS :checked pseudo-class with zero JavaScript in the toggle logic. **HTML:** ```html
    Notification Settings
    App v4.2
    Push notifications Get alerts on your device in real time
    Activity digest Weekly summary of your workspace
    Security alerts Notify on login from new devices
    Usage reports Monthly billing and quota updates
    Product updates New features and release notes
    Flow speed:
    ``` **CSS:** ```css .ga-16, .ga-16 *, .ga-16 *::before, .ga-16 *::after { margin: 0; padding: 0; box-sizing: border-box; } .ga-16 ::selection { background: rgba(99,102,241,.4); color: #fff; } .ga-16 { --bg: #090b12; --card-bg: #0f1120; --dur: 2s; width: 100%; min-height: 100vh; background: var(--bg); font-family: system-ui, -apple-system, sans-serif; display: flex; align-items: center; justify-content: center; padding: 48px 24px; } /* Settings card */ .ga-16__card { width: 100%; max-width: 440px; background: var(--card-bg); border: 1px solid rgba(255,255,255,.06); border-radius: 20px; overflow: hidden; } .ga-16__card-head { padding: 20px 24px; border-bottom: 1px solid rgba(255,255,255,.05); display: flex; align-items: center; justify-content: space-between; } .ga-16__card-title { font-size: .88rem; font-weight: 800; color: rgba(255,255,255,.8); } .ga-16__card-sub { font-size: .7rem; font-weight: 600; color: rgba(255,255,255,.25); letter-spacing: .04em; } .ga-16__card-body { display: flex; flex-direction: column; } /* ── Row ── */ .ga-16__row { display: flex; align-items: center; justify-content: space-between; padding: 18px 24px; border-bottom: 1px solid rgba(255,255,255,.04); transition: background .2s; } .ga-16__row:last-child { border-bottom: none; } .ga-16__row:hover { background: rgba(255,255,255,.02); } .ga-16__row-info { display: flex; flex-direction: column; gap: 3px; } .ga-16__row-label { font-size: .85rem; font-weight: 600; color: rgba(255,255,255,.7); } .ga-16__row-desc { font-size: .7rem; color: rgba(255,255,255,.28); line-height: 1.4; } /* ── Toggle switch ── */ .ga-16__toggle { position: relative; width: 52px; height: 28px; flex-shrink: 0; cursor: pointer; } /* Hidden checkbox */ .ga-16__toggle input { opacity: 0; width: 0; height: 0; position: absolute; } /* Track */ .ga-16__track { position: absolute; inset: 0; border-radius: 999px; background: rgba(255,255,255,.1); transition: background .3s ease; overflow: hidden; } /* Flowing gradient inside track — visible when checked */ .ga-16__track::before { content: ''; position: absolute; inset: 0; background: linear-gradient( 90deg, var(--tc1, #6366f1), var(--tc2, #a855f7), var(--tc3, #06b6d4), var(--tc1, #6366f1) ); background-size: 200% 100%; opacity: 0; transition: opacity .35s ease; animation: ga-16-flow var(--dur) linear infinite; } @keyframes ga-16-flow { 0% { background-position: 0% 0; } 100% { background-position: -200% 0; } } /* Glow behind track */ .ga-16__track::after { content: ''; position: absolute; inset: -4px; border-radius: 999px; background: linear-gradient(90deg, var(--tc1, #6366f1), var(--tc2, #a855f7), var(--tc3, #06b6d4)); filter: blur(8px); opacity: 0; transition: opacity .35s ease; z-index: -1; } /* Knob */ .ga-16__knob { position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.4); transition: transform .35s cubic-bezier(.34,1.56,.64,1), box-shadow .3s; z-index: 1; } /* Checked state */ input:checked ~ .ga-16__track::before { opacity: 1; } input:checked ~ .ga-16__track::after { opacity: .4; } input:checked ~ .ga-16__knob { transform: translateX(24px); box-shadow: 0 1px 8px rgba(0,0,0,.4), 0 0 0 2px rgba(255,255,255,.1); } /* Colour themes per row */ .ga-16__toggle--emerald { --tc1: #059669; --tc2: #10b981; --tc3: #34d399; } .ga-16__toggle--rose { --tc1: #e11d48; --tc2: #f43f5e; --tc3: #fb7185; } .ga-16__toggle--amber { --tc1: #d97706; --tc2: #f59e0b; --tc3: #fbbf24; } .ga-16__toggle--cyan { --tc1: #0891b2; --tc2: #06b6d4; --tc3: #22d3ee; } /* Focus ring */ .ga-16__toggle input:focus-visible ~ .ga-16__knob { outline: 2px solid rgba(99,102,241,.7); outline-offset: 2px; } /* Speed control */ .ga-16__ctrl { margin-top: 8px; padding: 14px 24px; display: flex; align-items: center; gap: 8px; border-top: 1px solid rgba(255,255,255,.05); } .ga-16__ctrl-label { font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: rgba(255,255,255,.2); margin-right: 4px; } .ga-16__ctrl-btn { padding: 4px 11px; font-size: .7rem; font-weight: 700; border-radius: 6px; border: 1px solid rgba(255,255,255,.08); background: rgba(255,255,255,.04); color: rgba(255,255,255,.3); cursor: pointer; transition: all .2s; } .ga-16__ctrl-btn.active, .ga-16__ctrl-btn:hover { background: rgba(99,102,241,.15); border-color: rgba(99,102,241,.35); color: #a5b4fc; } @media (prefers-reduced-motion: reduce) { .ga-16__track::before { animation: none; background-position: 0% 0; } .ga-16__knob { transition: transform .2s, box-shadow .2s; } } ``` **JS:** ```js (function() { const w = document.querySelector('.ga-16'); w.querySelectorAll('.ga-16__ctrl-btn').forEach(btn => { btn.addEventListener('click', () => { w.querySelectorAll('.ga-16__ctrl-btn').forEach(b => b.classList.remove('active')); btn.classList.add('active'); w.style.setProperty('--dur', btn.dataset.dur); }); }); })(); ``` --- ## 20 CSS Gradient Text Designs URL: https://codefronts.com/design-styles/css-gradient-text/ Description: 20 hand-coded CSS gradient text effects with live demos — animated flow with @property typed angle, aurora borealis sweep, conic hue spin, per-letter rainbow wave, lava lamp radial, neon pulse glow, outline stroke with transparent fill, metallic chrome/gold/copper, holographic iridescent foil, duotone two-colour fill, texture fills (sunset, starfield, ocean), liquid mercury, hover reveal, checkbox toggle picker, scroll reveal, click ripple, cursor-tracked radial, typewriter loop, glitter sparkle, and crystalline prism. 16 pure CSS + 4 with a tiny vanilla JS snippet — no framework. Modern background-clip text technique with -webkit-prefix fallback, prefers-reduced-motion honoured, MIT licensed. Demo count: 20 ### 01. CSS Animated Gradient Text Flow **Type:** Pure CSS **Description:** A flowing rainbow gradient sweeps across bold display text using a horizontally-extended linear-gradient and background-position animation for a seamless loop. **HTML:** ```html
    Animated gradient text

    CHROMATIC

    Infinite colour in motion

    Design Create Inspire Build Ship
    ``` **CSS:** ```css .gt-01, .gt-01 *, .gt-01 *::before, .gt-01 *::after { margin: 0; padding: 0; box-sizing: border-box; } .gt-01 { --bg: #0a0a0f; --c1: #ff6b6b; --c2: #ffd93d; --c3: #6bcb77; --c4: #4d96ff; --c5: #ff6bcd; font-family: 'Syne', sans-serif; background: var(--bg); min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3rem; padding: 3rem 2rem; } .gt-01__label { font-size: .75rem; letter-spacing: .2em; text-transform: uppercase; color: #444; } .gt-01__hero { font-size: clamp(3rem, 12vw, 8rem); font-weight: 800; line-height: 1; background: linear-gradient(90deg, var(--c1), var(--c2), var(--c3), var(--c4), var(--c5), var(--c1)); background-size: 300% 100%; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; animation: gt-01-flow 4s linear infinite; } .gt-01__subtitle { font-size: clamp(1rem, 3vw, 1.5rem); font-weight: 700; background: linear-gradient(90deg, var(--c4), var(--c5), var(--c1), var(--c2)); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; animation: gt-01-flow 6s linear infinite reverse; letter-spacing: .05em; } .gt-01__words { display: flex; flex-wrap: wrap; gap: 1rem 2rem; justify-content: center; } .gt-01__word { font-size: clamp(1.4rem, 4vw, 2.2rem); font-weight: 800; background: linear-gradient(90deg, var(--c1), var(--c2), var(--c3), var(--c4), var(--c5), var(--c1)); background-size: 300% 100%; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; animation: gt-01-flow 4s linear infinite; } .gt-01__word:nth-child(2) { animation-delay: -.8s; } .gt-01__word:nth-child(3) { animation-delay: -1.6s; } .gt-01__word:nth-child(4) { animation-delay: -2.4s; } .gt-01__word:nth-child(5) { animation-delay: -3.2s; } @keyframes gt-01-flow { 0% { background-position: 0% center; } 100% { background-position: 300% center; } } @media (prefers-reduced-motion: reduce) { .gt-01__hero, .gt-01__subtitle, .gt-01__word { animation: none; background-position: 0% center; } } ``` ### 02. CSS Aurora Borealis Gradient Text Sweep **Type:** Pure CSS **Description:** An aurora-inspired diagonal gradient sweeps across a headline using animated background-position on a multi-stop linear-gradient with teal, violet, and emerald hues. **HTML:** ```html
    Aurora sweep effect

    AURORA

    Northern lights typography

    TEAL VIOLET EMERALD
    ``` **CSS:** ```css .gt-02, .gt-02 *, .gt-02 *::before, .gt-02 *::after { margin: 0; padding: 0; box-sizing: border-box; } .gt-02 { --bg: #020b18; --a1: #00ffe7; --a2: #7b2fff; --a3: #00c3ff; --a4: #52ff7d; font-family: 'Orbitron', sans-serif; background: var(--bg); min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2.5rem; padding: 3rem 2rem; overflow: hidden; position: relative; } .gt-02__bg-glow { position: absolute; width: 60vw; height: 40vh; background: radial-gradient(ellipse at center, #7b2fff22 0%, transparent 70%); top: 20%; left: 20%; animation: gt-02-bgmove 8s ease-in-out infinite alternate; pointer-events: none; } .gt-02__label { font-size: .65rem; letter-spacing: .25em; text-transform: uppercase; color: #00ffe740; position: relative; } .gt-02__headline { font-size: clamp(2.5rem, 10vw, 7rem); font-weight: 900; line-height: 1; letter-spacing: .05em; background: linear-gradient(135deg, var(--a1) 0%, var(--a2) 40%, var(--a3) 70%, var(--a4) 100%); background-size: 200% 200%; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; animation: gt-02-aurora 5s ease-in-out infinite alternate; position: relative; } .gt-02__sub { font-size: clamp(.8rem, 2.5vw, 1.1rem); font-weight: 700; letter-spacing: .3em; background: linear-gradient(90deg, var(--a4), var(--a1)); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; animation: gt-02-slide 3s linear infinite; } .gt-02__row { display: flex; gap: 2rem; position: relative; } .gt-02__chip { font-size: clamp(1rem, 3vw, 1.6rem); font-weight: 700; padding: .4em .8em; border: 1px solid #00ffe720; border-radius: 4px; background: linear-gradient(135deg, var(--a1), var(--a2), var(--a3)); background-size: 300% 300%; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; animation: gt-02-aurora 4s ease-in-out infinite alternate; } .gt-02__chip:nth-child(2) { animation-delay: -.8s; } .gt-02__chip:nth-child(3) { animation-delay: -1.6s; } @keyframes gt-02-aurora { 0% { background-position: 0% 0%; } 100% { background-position: 100% 100%; } } @keyframes gt-02-slide { 0% { background-position: 0% center; } 100% { background-position: 200% center; } } @keyframes gt-02-bgmove { 0% { transform: translate(0, 0) scale(1); } 100% { transform: translate(15%, 10%) scale(1.3); } } @media (prefers-reduced-motion: reduce) { .gt-02__headline, .gt-02__sub, .gt-02__chip, .gt-02__bg-glow { animation: none; } } ``` ### 03. CSS Conic Gradient Text Hue Spin **Type:** Pure CSS **Description:** Full-spectrum hue rotation applied to conic-gradient-filled text, creating a continuously spinning rainbow prism effect driven by a CSS filter animation. **HTML:** ```html
    Conic gradient text

    PRISM

    Full-spectrum hue rotation

    RED
    GREEN 120°
    BLUE 240°
    ``` **CSS:** ```css .gt-03, .gt-03 *, .gt-03 *::before, .gt-03 *::after { margin: 0; padding: 0; box-sizing: border-box; } .gt-03 { --bg: #111118; font-family: 'Plus Jakarta Sans', sans-serif; background: var(--bg); min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3rem; padding: 3rem 2rem; } .gt-03__label { font-size: .7rem; letter-spacing: .2em; text-transform: uppercase; color: #555; } .gt-03__conic { font-size: clamp(3rem, 12vw, 8rem); font-weight: 900; line-height: 1; background: conic-gradient( from 0deg, #ff0080, #ff8c00, #ffe100, #40ff00, #00cfff, #8000ff, #ff0080 ); background-size: 100% 100%; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; animation: gt-03-spin 3s linear infinite; } .gt-03__sub { font-size: clamp(1rem, 3vw, 1.6rem); font-weight: 800; background: conic-gradient(from 180deg, #ff8c00, #ffe100, #40ff00, #00cfff, #8000ff, #ff8c00); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; animation: gt-03-spin 5s linear infinite reverse; letter-spacing: .04em; } .gt-03__trio { display: flex; gap: 2.5rem; flex-wrap: wrap; justify-content: center; } .gt-03__item { display: flex; flex-direction: column; align-items: center; gap: .5rem; } .gt-03__big { font-size: clamp(2rem, 6vw, 4rem); font-weight: 900; background: conic-gradient(from 90deg, #ff0080, #ff8c00, #ffe100, #40ff00, #00cfff, #ff0080); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; animation: gt-03-spin 4s linear infinite; } .gt-03__item:nth-child(2) .gt-03__big { animation-delay: -1.3s; } .gt-03__item:nth-child(3) .gt-03__big { animation-delay: -2.6s; } .gt-03__caption { font-size: .65rem; letter-spacing: .15em; text-transform: uppercase; color: #555; } @keyframes gt-03-spin { 0% { filter: hue-rotate(0deg); } 100% { filter: hue-rotate(360deg); } } @media (prefers-reduced-motion: reduce) { .gt-03__conic, .gt-03__sub, .gt-03__big { animation: none; } } ``` ### 04. CSS Rainbow Wave Per-Letter Gradient Text **Type:** Pure CSS **Description:** Each letter bounces on its own phase-offset translateY wave while carrying a unique hue-stop pair, producing a travelling rainbow wave entirely in CSS. **HTML:** ```html
    Rainbow wave per-letter
    R A I N B O W

    Per-letter hue offset animation

    ``` **CSS:** ```css .gt-04, .gt-04 *, .gt-04 *::before, .gt-04 *::after { margin: 0; padding: 0; box-sizing: border-box; } .gt-04 { --bg: #f8f4f0; font-family: 'DM Sans', sans-serif; background: var(--bg); min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2.5rem; padding: 3rem 2rem; } .gt-04__label { font-size: .7rem; letter-spacing: .2em; text-transform: uppercase; color: #bbb; } .gt-04__wave-wrap { display: flex; gap: 0; } .gt-04__letter { font-size: clamp(3rem, 11vw, 7.5rem); font-weight: 900; line-height: 1; display: inline-block; background: linear-gradient(180deg, hsl(calc(var(--hue) + 0deg), 90%, 55%) 0%, hsl(calc(var(--hue) + 60deg), 90%, 45%) 100% ); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; animation: gt-04-wave 2.4s ease-in-out infinite; } /* stagger each letter's hue + delay */ .gt-04__letter:nth-child(1) { --hue: 0deg; animation-delay: 0s; } .gt-04__letter:nth-child(2) { --hue: 30deg; animation-delay: -.2s; } .gt-04__letter:nth-child(3) { --hue: 60deg; animation-delay: -.4s; } .gt-04__letter:nth-child(4) { --hue: 90deg; animation-delay: -.6s; } .gt-04__letter:nth-child(5) { --hue: 120deg; animation-delay: -.8s; } .gt-04__letter:nth-child(6) { --hue: 150deg; animation-delay: -1s; } .gt-04__letter:nth-child(7) { --hue: 180deg; animation-delay: -1.2s; } .gt-04__subtitle { font-size: clamp(1rem, 2.5vw, 1.3rem); font-weight: 700; color: #ccc; letter-spacing: .1em; } .gt-04__bar { width: min(500px, 80vw); height: 6px; border-radius: 3px; background: linear-gradient(90deg, #ff595e, #ffca3a, #6a4c93, #1982c4, #8ac926, #ff595e); background-size: 200% 100%; animation: gt-04-barscroll 3s linear infinite; } @keyframes gt-04-wave { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-14px); } } @keyframes gt-04-barscroll { 0% { background-position: 0% center; } 100% { background-position: 200% center; } } @media (prefers-reduced-motion: reduce) { .gt-04__letter, .gt-04__bar { animation: none; transform: none; } } ``` ### 05. CSS Lava Lamp Radial Gradient Text **Type:** Pure CSS **Description:** A slowly drifting radial gradient simulates molten lava inside the text glyphs, using animated CSS custom properties to move the gradient hotspot. **HTML:** ```html
    Lava lamp radial gradient

    MAGMA

    Molten radial gradient text

    radial motion
    ``` **CSS:** ```css .gt-05, .gt-05 *, .gt-05 *::before, .gt-05 *::after { margin: 0; padding: 0; box-sizing: border-box; } .gt-05 { --bg: #0d0208; --hot1: #ff3b00; --hot2: #ff8800; --hot3: #ffcc00; --cool: #3b0a0a; font-family: 'Syne', sans-serif; background: var(--bg); min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2.5rem; padding: 3rem 2rem; } .gt-05__label { font-family: 'Syne Mono', monospace; font-size: .65rem; letter-spacing: .25em; text-transform: uppercase; color: #ff330040; } .gt-05__blob { font-size: clamp(3rem, 12vw, 8rem); font-weight: 800; line-height: 1; background: radial-gradient( circle at var(--x, 30%) var(--y, 40%), var(--hot3) 0%, var(--hot2) 25%, var(--hot1) 55%, #6b0000 100% ); background-size: 200% 200%; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; animation: gt-05-blob 6s ease-in-out infinite; } .gt-05__tagline { font-family: 'Syne Mono', monospace; font-size: clamp(.7rem, 2vw, 1rem); background: linear-gradient(90deg, var(--hot1), var(--hot2), var(--hot3)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; animation: gt-05-pulse 3s ease-in-out infinite alternate; letter-spacing: .15em; } .gt-05__orbs { display: flex; gap: 1.5rem; align-items: flex-end; } .gt-05__orb { width: 60px; height: 60px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, var(--hot3), var(--hot1)); animation: gt-05-rise 3s ease-in-out infinite; position: relative; } .gt-05__orb::after { content: ''; position: absolute; inset: 15% 20% 40% 20%; background: rgba(255,255,255,.25); border-radius: 50%; transform: rotate(-30deg); } .gt-05__orb:nth-child(1) { width: 40px; height: 40px; animation-delay: -.5s; } .gt-05__orb:nth-child(2) { width: 70px; height: 70px; animation-delay: -1s; } .gt-05__orb:nth-child(3) { width: 50px; height: 50px; animation-delay: -1.8s; } .gt-05__orb-label { font-family: 'Syne Mono', monospace; font-size: .6rem; letter-spacing: .1em; color: var(--hot2); background: linear-gradient(90deg, var(--hot1), var(--hot3)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; } @keyframes gt-05-blob { 0% { --x: 30%; --y: 40%; } 25% { --x: 60%; --y: 70%; } 50% { --x: 70%; --y: 30%; } 75% { --x: 40%; --y: 60%; } 100% { --x: 30%; --y: 40%; } } @keyframes gt-05-pulse { 0% { opacity: .6; } 100% { opacity: 1; } } @keyframes gt-05-rise { 0%, 100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-20px) scale(1.05); } } @media (prefers-reduced-motion: reduce) { .gt-05__blob, .gt-05__tagline, .gt-05__orb { animation: none; } } ``` ### 06. CSS Neon Pulse Gradient Text Glow **Type:** Pure CSS **Description:** A scrolling cyan-magenta-lime gradient combined with a pulsing drop-shadow glow recreates the flickering neon sign aesthetic entirely in CSS. **HTML:** ```html
    Neon pulse gradient

    NEON

    Glowing gradient pulse

    ``` **CSS:** ```css .gt-06, .gt-06 *, .gt-06 *::before, .gt-06 *::after { margin: 0; padding: 0; box-sizing: border-box; } .gt-06 { --bg: #030a10; --n1: #00f5ff; --n2: #ff00e4; --n3: #b8ff00; font-family: 'Exo 2', sans-serif; background: var(--bg); min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2.5rem; padding: 3rem 2rem; position: relative; overflow: hidden; } .gt-06::before { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse 60% 40% at 20% 50%, #00f5ff0a, transparent), radial-gradient(ellipse 60% 40% at 80% 50%, #ff00e40a, transparent); pointer-events: none; } .gt-06__label { font-family: 'Rajdhani', sans-serif; font-size: .7rem; letter-spacing: .3em; text-transform: uppercase; color: #00f5ff30; } .gt-06__neon { font-size: clamp(3rem, 12vw, 8rem); font-weight: 900; line-height: 1; background: linear-gradient(90deg, var(--n1), var(--n2), var(--n3), var(--n1)); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; filter: drop-shadow(0 0 20px #00f5ff80) drop-shadow(0 0 40px #ff00e440); animation: gt-06-neonflow 4s linear infinite, gt-06-pulse 2s ease-in-out infinite; letter-spacing: .08em; } .gt-06__bar { display: flex; gap: .5rem; align-items: center; } .gt-06__seg { height: 4px; border-radius: 2px; background: linear-gradient(90deg, var(--n1), var(--n2)); animation: gt-06-barpulse 1.5s ease-in-out infinite; } .gt-06__seg:nth-child(1) { width: 40px; animation-delay: 0s; } .gt-06__seg:nth-child(2) { width: 80px; animation-delay: -.3s; } .gt-06__seg:nth-child(3) { width: 120px; animation-delay: -.6s; background: linear-gradient(90deg, var(--n2), var(--n3)); } .gt-06__seg:nth-child(4) { width: 80px; animation-delay: -.9s; } .gt-06__seg:nth-child(5) { width: 40px; animation-delay: -1.2s; } .gt-06__tagline { font-family: 'Rajdhani', sans-serif; font-size: clamp(.9rem, 2.5vw, 1.2rem); font-weight: 700; letter-spacing: .25em; text-transform: uppercase; background: linear-gradient(90deg, var(--n2), var(--n3)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; animation: gt-06-fade 2s ease-in-out infinite alternate; } @keyframes gt-06-neonflow { 0% { background-position: 0% center; } 100% { background-position: 200% center; } } @keyframes gt-06-pulse { 0%, 100% { filter: drop-shadow(0 0 20px #00f5ff80) drop-shadow(0 0 40px #ff00e440); } 50% { filter: drop-shadow(0 0 35px #00f5ffcc) drop-shadow(0 0 70px #ff00e460); } } @keyframes gt-06-barpulse { 0%, 100% { opacity: .4; } 50% { opacity: 1; } } @keyframes gt-06-fade { 0% { opacity: .6; } 100% { opacity: 1; } } @media (prefers-reduced-motion: reduce) { .gt-06__neon, .gt-06__seg, .gt-06__tagline { animation: none; filter: none; } } ``` ### 07. CSS Gradient Text Outline Stroke Effect **Type:** Pure CSS **Description:** A gradient is applied as the stroke colour of outlined text using -webkit-text-stroke combined with background-clip:text, creating crisp gradient-coloured letterform outlines. **HTML:** ```html
    Gradient text stroke / outline
    OUTLINED
    GRADIENT FILL
    Purple Pink Orange
    ``` **CSS:** ```css .gt-07, .gt-07 *, .gt-07 *::before, .gt-07 *::after { margin: 0; padding: 0; box-sizing: border-box; } .gt-07 { --bg: #fff; --g1: #7c3aed; --g2: #db2777; --g3: #ea580c; font-family: 'Space Grotesk', sans-serif; background: var(--bg); min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3rem; padding: 3rem 2rem; } .gt-07__label { font-size: .7rem; letter-spacing: .2em; text-transform: uppercase; color: #ddd; } /* Stroke via SVG text linearGradient inside an inline SVG */ .gt-07__svg-wrap { width: 100%; max-width: 700px; overflow: visible; } .gt-07__stroke { font-family: 'Space Grotesk', sans-serif; font-size: clamp(3rem, 12vw, 7rem); font-weight: 700; } /* CSS-only outline technique using -webkit-text-stroke + transparent fill */ .gt-07__css-stroke { font-size: clamp(3rem, 12vw, 7rem); font-weight: 700; line-height: 1; -webkit-text-stroke: 3px transparent; background: linear-gradient(135deg, var(--g1), var(--g2), var(--g3)); background-size: 200% 200%; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; /* Paint background behind the text-stroke so stroke uses gradient */ paint-order: stroke fill; animation: gt-07-shift 5s ease-in-out infinite alternate; } .gt-07__outlined { font-size: clamp(3rem, 12vw, 7rem); font-weight: 700; line-height: 1; -webkit-text-stroke: 4px; -webkit-text-stroke-color: transparent; background: linear-gradient(90deg, var(--g1), var(--g2), var(--g3), var(--g1)); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; animation: gt-07-scroll 4s linear infinite; letter-spacing: .05em; } .gt-07__row { display: flex; gap: 2rem; flex-wrap: wrap; justify-content: center; } .gt-07__pill { font-size: clamp(1.2rem, 4vw, 2rem); font-weight: 700; line-height: 1; -webkit-text-stroke: 2px; -webkit-text-stroke-color: transparent; background: linear-gradient(135deg, var(--g1), var(--g2), var(--g3)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; padding: .4em .8em; border: 2px solid; border-image: linear-gradient(135deg, var(--g1), var(--g2), var(--g3)) 1; border-radius: 999px; /* Compat: border-image doesn't work with border-radius, use outline trick */ border: none; box-shadow: 0 0 0 2px var(--g1); } @keyframes gt-07-shift { 0% { background-position: 0% 0%; } 100% { background-position: 100% 100%; } } @keyframes gt-07-scroll { 0% { background-position: 0% center; } 100% { background-position: 200% center; } } @media (prefers-reduced-motion: reduce) { .gt-07__css-stroke, .gt-07__outlined { animation: none; } } ``` ### 08. CSS Metallic Chrome Gold Copper Gradient Text **Type:** Pure CSS **Description:** Vertical multi-stop linear gradients mimic the specular highlights of chrome, gold, and copper metal surfaces clipped to display text. **HTML:** ```html
    Metallic gradient text
    CHROME
    GOLD
    COPPER
    ``` **CSS:** ```css .gt-08, .gt-08 *, .gt-08 *::before, .gt-08 *::after { margin: 0; padding: 0; box-sizing: border-box; } .gt-08 { --bg: #0c0c0c; font-family: 'Bebas Neue', sans-serif; background: var(--bg); min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3rem; padding: 3rem 2rem; } .gt-08__label { font-size: .65rem; letter-spacing: .3em; text-transform: uppercase; color: #333; font-family: monospace; } .gt-08__chrome { font-size: clamp(4rem, 15vw, 10rem); font-weight: 400; line-height: 1; letter-spacing: .08em; background: linear-gradient(180deg, #ffffff 0%, #e8e8e8 15%, #a0a0a0 30%, #ffffff 45%, #707070 55%, #c8c8c8 70%, #404040 85%, #b0b0b0 100% ); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; animation: gt-08-shimmer 3s ease-in-out infinite; } .gt-08__gold { font-size: clamp(2rem, 8vw, 5rem); font-weight: 400; line-height: 1; letter-spacing: .1em; background: linear-gradient(180deg, #fff4d0 0%, #f5c842 15%, #c8962a 30%, #ffe680 50%, #b07c20 65%, #e6b830 80%, #7a5010 100% ); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; animation: gt-08-shimmer 4s ease-in-out infinite reverse; } .gt-08__copper { font-size: clamp(1.5rem, 5vw, 3rem); font-weight: 400; line-height: 1; letter-spacing: .12em; background: linear-gradient(180deg, #ffcba4 0%, #cd7a3a 20%, #a0522d 40%, #e8955a 55%, #7a3a18 70%, #d4814a 85%, #8b4513 100% ); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; animation: gt-08-shimmer 5s ease-in-out infinite; } .gt-08__divider { width: 200px; height: 1px; background: linear-gradient(90deg, transparent, #ffffff30, transparent); } @keyframes gt-08-shimmer { 0%, 100% { background-position: center 0%; } 50% { background-position: center 100%; } } @media (prefers-reduced-motion: reduce) { .gt-08__chrome, .gt-08__gold, .gt-08__copper { animation: none; } } ``` ### 09. CSS Holographic Foil Iridescent Gradient Text **Type:** Pure CSS **Description:** A dense multi-stop rainbow gradient animating diagonally across text and card surfaces recreates the colour-shifting prismatic effect of holographic foil stickers. **HTML:** ```html
    Holographic foil gradient

    HOLOFX

    Prismatic iridescent text

    SHIMMER
    GLIMMER
    REFLECT
    ``` **CSS:** ```css .gt-09, .gt-09 *, .gt-09 *::before, .gt-09 *::after { margin: 0; padding: 0; box-sizing: border-box; } .gt-09 { --bg: #0a0a12; font-family: 'Outfit', sans-serif; background: var(--bg); min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3rem; padding: 3rem 2rem; } .gt-09__label { font-size: .7rem; letter-spacing: .2em; text-transform: uppercase; color: #333; } .gt-09__holo { font-size: clamp(3rem, 12vw, 8rem); font-weight: 900; line-height: 1; letter-spacing: .05em; background: linear-gradient( 135deg, #ff0080 0%, #ff8c00 10%, #ffe100 20%, #40ff00 30%, #00cfff 40%, #8000ff 50%, #ff0080 60%, #ff8c00 70%, #ffe100 80%, #40ff00 90%, #00cfff 100% ); background-size: 300% 300%; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; animation: gt-09-holo 4s ease infinite; filter: drop-shadow(0 2px 20px rgba(255,0,128,.3)); } .gt-09__sub { font-size: clamp(1rem, 3vw, 1.5rem); font-weight: 800; background: linear-gradient(90deg, #00cfff, #8000ff, #ff0080, #ff8c00, #ffe100 ); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; animation: gt-09-scroll 3s linear infinite; letter-spacing: .12em; } .gt-09__cards { display: flex; gap: 1.5rem; flex-wrap: wrap; justify-content: center; } .gt-09__card { padding: 1.5rem 2rem; border-radius: 12px; background: linear-gradient(135deg, #ffffff08, #ffffff03); border: 1px solid #ffffff15; backdrop-filter: blur(8px); position: relative; overflow: hidden; } .gt-09__card::before { content: ''; position: absolute; inset: 0; background: linear-gradient(135deg, #ff008020, #00cfff20, #8000ff20 ); background-size: 200% 200%; animation: gt-09-holo 6s ease infinite; border-radius: 12px; } .gt-09__card-text { font-size: 1.3rem; font-weight: 900; position: relative; background: linear-gradient(135deg, #ff0080, #00cfff, #8000ff, #ff0080); background-size: 200% 200%; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; animation: gt-09-holo 3s ease infinite; } .gt-09__card:nth-child(2) .gt-09__card-text { animation-delay: -.7s; } .gt-09__card:nth-child(3) .gt-09__card-text { animation-delay: -1.4s; } @keyframes gt-09-holo { 0% { background-position: 0% 0%; } 50% { background-position: 100% 100%; } 100% { background-position: 0% 0%; } } @keyframes gt-09-scroll { 0% { background-position: 0% center; } 100% { background-position: 200% center; } } @media (prefers-reduced-motion: reduce) { .gt-09__holo, .gt-09__sub, .gt-09__card-text, .gt-09__card::before { animation: none; } } ``` ### 10. CSS Duotone Gradient Text Two-Colour Fill **Type:** Pure CSS **Description:** Bold typography filled with two-stop duotone linear gradients, with animated letter-spacing expansion that makes each pairing feel alive and cinematic. **HTML:** ```html
    Duotone gradient text
    DUOTONE
    BLEND MODE
    TWO COLOUR GRADIENT
    Two-stop linear gradient fills
    ``` **CSS:** ```css .gt-10, .gt-10 *, .gt-10 *::before, .gt-10 *::after { margin: 0; padding: 0; box-sizing: border-box; } .gt-10 { --bg: #f5f5f0; font-family: 'Inter', sans-serif; background: var(--bg); min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3rem; padding: 3rem 2rem; } .gt-10__label { font-size: .7rem; letter-spacing: .2em; text-transform: uppercase; color: #ccc; } .gt-10__pair { display: flex; flex-direction: column; align-items: center; gap: 1.5rem; width: 100%; } .gt-10__duo { font-size: clamp(3rem, 12vw, 8rem); font-weight: 900; line-height: 1; letter-spacing: -.02em; } .gt-10__duo--blue-red { background: linear-gradient(90deg, #003fff 0%, #ff003f 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; animation: gt-10-expand 5s ease-in-out infinite alternate; } .gt-10__duo--green-violet { background: linear-gradient(90deg, #00c896 0%, #6600ff 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; font-size: clamp(2rem, 8vw, 5rem); animation: gt-10-expand 5s ease-in-out infinite alternate reverse; } .gt-10__duo--yellow-magenta { background: linear-gradient(90deg, #f5c800 0%, #ff00aa 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; font-size: clamp(1.5rem, 5vw, 3rem); animation: gt-10-expand 5s ease-in-out infinite alternate; } .gt-10__caption { font-size: .65rem; letter-spacing: .15em; text-transform: uppercase; color: #bbb; } .gt-10__swatch-row { display: flex; gap: 1rem; align-items: center; } .gt-10__swatch { width: 60px; height: 8px; border-radius: 4px; } .gt-10__swatch:nth-child(1) { background: linear-gradient(90deg, #003fff, #ff003f); } .gt-10__swatch:nth-child(2) { background: linear-gradient(90deg, #00c896, #6600ff); } .gt-10__swatch:nth-child(3) { background: linear-gradient(90deg, #f5c800, #ff00aa); } @keyframes gt-10-expand { 0% { letter-spacing: -.02em; } 100% { letter-spacing: .08em; } } @media (prefers-reduced-motion: reduce) { .gt-10__duo { animation: none; } } ``` ### 11. CSS Gradient Text Texture Fill — Sunset Starfield Ocean **Type:** Pure CSS **Description:** Multi-stop gradients simulate natural texture fills — a sunset sky, a star-dotted night, and an ocean depth — each clipped to large display text. **HTML:** ```html
    Texture gradient fill
    SUNSET
    STARFIELD
    OCEAN DEPTH
    ``` **CSS:** ```css .gt-11, .gt-11 *, .gt-11 *::before, .gt-11 *::after { margin: 0; padding: 0; box-sizing: border-box; } .gt-11 { --bg: #111; font-family: 'Syne', sans-serif; background: var(--bg); min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3rem; padding: 3rem 2rem; } .gt-11__label { font-size: .7rem; letter-spacing: .2em; text-transform: uppercase; color: #444; } /* Sunset gradient acting as "image" fill */ .gt-11__sunset { font-size: clamp(3rem, 13vw, 9rem); font-weight: 900; line-height: 1; letter-spacing: .02em; background: linear-gradient(180deg, #1a0533 0%, #5c0a7c 15%, #c0273a 35%, #e8612a 55%, #f5a623 75%, #ffd700 100% ); background-size: 100% 200%; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; animation: gt-11-sunrise 6s ease-in-out infinite alternate; } /* Night sky gradient fill */ .gt-11__night { font-size: clamp(2rem, 8vw, 5rem); font-weight: 800; line-height: 1; letter-spacing: .06em; background: radial-gradient(ellipse at 20% 30%, #ffffff 1px, transparent 1px), radial-gradient(ellipse at 70% 20%, #ffffff 1px, transparent 1px), radial-gradient(ellipse at 50% 60%, #ffffff 1px, transparent 1px), radial-gradient(ellipse at 85% 50%, #ffffff 1px, transparent 1px), linear-gradient(180deg, #03001e 0%, #7303c0 50%, #ec38bc 100%); background-size: 80px 80px, 120px 120px, 60px 60px, 100px 100px, 100% 100%; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; animation: gt-11-star 4s ease-in-out infinite; } /* Ocean gradient fill */ .gt-11__ocean { font-size: clamp(1.5rem, 5vw, 3rem); font-weight: 800; line-height: 1; letter-spacing: .1em; background: linear-gradient(135deg, #006994 0%, #0099cc 25%, #00d4ff 50%, #40e0ff 75%, #a0f0ff 100% ); background-size: 200% 200%; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; animation: gt-11-ocean 3s ease-in-out infinite alternate; } .gt-11__divider { width: 3px; height: 40px; background: linear-gradient(180deg, transparent, #ffffff20, transparent); border-radius: 2px; } @keyframes gt-11-sunrise { 0% { background-position: center 100%; } 100% { background-position: center 0%; } } @keyframes gt-11-star { 0%, 100% { background-position: 0 0, 0 0, 0 0, 0 0, 0 0; } 50% { background-position: 10px 5px, -10px 8px, 5px -5px, -8px 3px, 0 0; } } @keyframes gt-11-ocean { 0% { background-position: 0% 0%; } 100% { background-position: 100% 100%; } } @media (prefers-reduced-motion: reduce) { .gt-11__sunset, .gt-11__night, .gt-11__ocean { animation: none; } } ``` ### 12. CSS Liquid Mercury Metallic Gradient Text **Type:** Pure CSS **Description:** A cool blue-grey metallic gradient with rippling background-position animation and teardrop orbs below the headline evoke the look of flowing liquid mercury. **HTML:** ```html
    liquid mercury gradient
    MERCURY

    reflective metallic shimmer

    ``` **CSS:** ```css .gt-12, .gt-12 *, .gt-12 *::before, .gt-12 *::after { margin: 0; padding: 0; box-sizing: border-box; } .gt-12 { --bg: #080808; --m1: #c8d8e8; --m2: #e8eff8; --m3: #8090a0; --m4: #404858; font-family: 'Bebas Neue', sans-serif; background: var(--bg); min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3rem; padding: 3rem 2rem; } .gt-12__label { font-family: 'Space Mono', monospace; font-size: .6rem; letter-spacing: .3em; text-transform: uppercase; color: #2a3040; } .gt-12__mercury { font-size: clamp(4rem, 15vw, 10rem); line-height: 1; letter-spacing: .1em; background: linear-gradient(180deg, var(--m2) 0%, var(--m1) 20%, var(--m3) 35%, var(--m2) 50%, var(--m4) 65%, var(--m1) 80%, var(--m3) 100% ); background-size: 100% 300%; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; animation: gt-12-liquid 4s ease-in-out infinite; filter: drop-shadow(0 4px 12px rgba(200,216,232,.15)); } .gt-12__drops { display: flex; gap: .8rem; align-items: center; } .gt-12__drop { border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; background: linear-gradient(180deg, var(--m2), var(--m3)); animation: gt-12-drip 2.5s ease-in-out infinite; filter: drop-shadow(0 2px 6px rgba(200,216,232,.2)); } .gt-12__drop:nth-child(1) { width: 14px; height: 18px; animation-delay: 0s; } .gt-12__drop:nth-child(2) { width: 22px; height: 28px; animation-delay: -.5s; } .gt-12__drop:nth-child(3) { width: 18px; height: 22px; animation-delay: -1s; } .gt-12__drop:nth-child(4) { width: 14px; height: 18px; animation-delay: -1.5s; } .gt-12__sub { font-family: 'Space Mono', monospace; font-size: clamp(.7rem, 2vw, .9rem); letter-spacing: .2em; background: linear-gradient(90deg, var(--m3), var(--m2), var(--m3)); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; animation: gt-12-flow 5s linear infinite; } @keyframes gt-12-liquid { 0%, 100% { background-position: center 0%; } 50% { background-position: center 100%; } } @keyframes gt-12-drip { 0%, 100% { transform: scaleY(1) translateY(0); } 50% { transform: scaleY(1.2) translateY(4px); } } @keyframes gt-12-flow { 0% { background-position: 0% center; } 100% { background-position: 200% center; } } @media (prefers-reduced-motion: reduce) { .gt-12__mercury, .gt-12__drop, .gt-12__sub { animation: none; } } ``` ### 13. CSS Hover Reveal Gradient Text Effect **Type:** Pure CSS **Description:** Each line of text sits in a muted grey state until hovered, triggering a smooth transition that unveils a distinct gradient per line using -webkit-text-fill-color toggling. **HTML:** ```html
    Hover to reveal gradient ↓ mouse over each line ↓
    CREATIVITY
    EXPLORATION
    INNOVATION
    EXPRESSION
    INSPIRATION
    MOMENTUM
    ``` **CSS:** ```css .gt-13, .gt-13 *, .gt-13 *::before, .gt-13 *::after { margin: 0; padding: 0; box-sizing: border-box; } .gt-13 { --bg: #0f0f14; --plain: #888; font-family: 'Plus Jakarta Sans', sans-serif; background: var(--bg); min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.5rem; padding: 3rem 2rem; cursor: default; } .gt-13__label { font-size: .7rem; letter-spacing: .2em; text-transform: uppercase; color: #333; margin-bottom: 1rem; } .gt-13__hint { font-size: .75rem; letter-spacing: .1em; color: #444; margin-bottom: 1rem; } /* Each line transitions from plain → gradient on hover */ .gt-13__line { font-size: clamp(2.5rem, 9vw, 6rem); font-weight: 800; line-height: 1.05; letter-spacing: -.01em; position: relative; display: inline-block; cursor: pointer; /* Plain state */ color: var(--plain); transition: color .4s ease; /* Gradient hidden under colour */ background: linear-gradient(90deg, #f093fb, #f5576c, #fda085); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; } .gt-13__line:hover { -webkit-text-fill-color: transparent; color: transparent; background-position: 100% center; transition: background-position .6s ease, color .1s; animation: gt-13-flow .6s ease forwards; } .gt-13__line--b { background-image: linear-gradient(90deg, #43e97b, #38f9d7, #4facfe); } .gt-13__line--c { background-image: linear-gradient(90deg, #fa709a, #fee140, #a18cd1); } .gt-13__line--d { background-image: linear-gradient(90deg, #30cfd0, #330867, #e0c3fc); } .gt-13__line--e { background-image: linear-gradient(90deg, #ff9a9e, #fecfef, #ffecd2); } .gt-13__line--f { background-image: linear-gradient(90deg, #a1c4fd, #c2e9fb, #d4fc79); } @keyframes gt-13-flow { 0% { background-position: 0% center; } 100% { background-position: 100% center; } } @media (prefers-reduced-motion: reduce) { .gt-13__line:hover { animation: none; background-position: 0% center; } } ``` ### 14. CSS Toggle Switch Gradient Text Colour Picker **Type:** Pure CSS **Description:** Three checkbox-driven toggle switches independently enable gradient fills on individual words, demonstrating CSS state-driven gradient text with zero JavaScript. **HTML:** ```html
    Toggle gradient fills
    VIVID
    COLOUR
    CONTROL
    ``` **CSS:** ```css .gt-14, .gt-14 *, .gt-14 *::before, .gt-14 *::after { margin: 0; padding: 0; box-sizing: border-box; } .gt-14 { --bg: #f0ede8; font-family: 'Manrope', sans-serif; background: var(--bg); min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2rem; padding: 3rem 2rem; } .gt-14__label { font-size: .7rem; letter-spacing: .2em; text-transform: uppercase; color: #bbb; } /* Hidden checkboxes drive the toggling */ .gt-14__chk-a { display: none; } .gt-14__chk-b { display: none; } .gt-14__chk-c { display: none; } /* Toggle switch UI */ .gt-14__controls { display: flex; flex-direction: column; gap: 1rem; align-items: flex-start; } .gt-14__toggle-row { display: flex; align-items: center; gap: 1rem; } .gt-14__toggle-label { display: flex; align-items: center; gap: .6rem; cursor: pointer; user-select: none; } .gt-14__track { width: 44px; height: 24px; border-radius: 12px; background: #ddd; position: relative; transition: background .3s; } .gt-14__track::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: white; transition: transform .3s; box-shadow: 0 1px 4px rgba(0,0,0,.2); } /* Checked states */ #gt-14-chk-a:checked ~ .gt-14__stage .gt-14__track-a { background: #f093fb; } #gt-14-chk-a:checked ~ .gt-14__stage .gt-14__track-a::after { transform: translateX(20px); } #gt-14-chk-b:checked ~ .gt-14__stage .gt-14__track-b { background: #43e97b; } #gt-14-chk-b:checked ~ .gt-14__stage .gt-14__track-b::after { transform: translateX(20px); } #gt-14-chk-c:checked ~ .gt-14__stage .gt-14__track-c { background: #4facfe; } #gt-14-chk-c:checked ~ .gt-14__stage .gt-14__track-c::after { transform: translateX(20px); } .gt-14__name { font-size: .75rem; font-weight: 700; color: #888; } /* Main text — default plain */ .gt-14__stage { width: 100%; display: flex; flex-direction: column; align-items: center; gap: .5rem; } .gt-14__word { font-size: clamp(3rem, 10vw, 6rem); font-weight: 800; line-height: 1; color: #ccc; transition: color .4s; -webkit-text-fill-color: currentColor; } .gt-14__word-a { -webkit-text-fill-color: #ccc; background: linear-gradient(90deg, #f093fb, #f5576c); -webkit-background-clip: text; background-clip: text; transition: -webkit-text-fill-color .4s; } .gt-14__word-b { -webkit-text-fill-color: #ccc; background: linear-gradient(90deg, #43e97b, #38f9d7); -webkit-background-clip: text; background-clip: text; } .gt-14__word-c { -webkit-text-fill-color: #ccc; background: linear-gradient(90deg, #4facfe, #00f2fe); -webkit-background-clip: text; background-clip: text; } #gt-14-chk-a:checked ~ .gt-14__stage .gt-14__word-a { -webkit-text-fill-color: transparent; } #gt-14-chk-b:checked ~ .gt-14__stage .gt-14__word-b { -webkit-text-fill-color: transparent; } #gt-14-chk-c:checked ~ .gt-14__stage .gt-14__word-c { -webkit-text-fill-color: transparent; } @media (prefers-reduced-motion: reduce) { .gt-14__track, .gt-14__track::after { transition: none; } } ``` ### 15. CSS Scroll Gradient Text Reveal on Scroll **Type:** CSS + JS **Description:** Each section's headline fades in from below with a gradient fill sliding from washed-out to vivid, triggered by IntersectionObserver as the element enters the viewport. **HTML:** ```html

    Scroll to reveal gradient text

    DISCOVER
    YOUR
    POTENTIAL
    THROUGH COLOUR
    ``` **CSS:** ```css .gt-15, .gt-15 *, .gt-15 *::before, .gt-15 *::after { margin: 0; padding: 0; box-sizing: border-box; } .gt-15 { --bg: #0c0c0c; font-family: 'Syne', sans-serif; background: var(--bg); min-height: 300vh; display: flex; flex-direction: column; align-items: center; padding: 0 2rem; } .gt-15__top { height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1rem; } .gt-15__hint { font-size: .8rem; letter-spacing: .2em; text-transform: uppercase; color: #555; animation: gt-15-bounce 2s ease-in-out infinite; } .gt-15__arrow { font-size: 1.5rem; color: #444; animation: gt-15-bounce 2s ease-in-out infinite .3s; } .gt-15__section { min-height: 60vh; display: flex; align-items: center; justify-content: center; width: 100%; max-width: 900px; } .gt-15__reveal { font-size: clamp(3rem, 10vw, 7rem); font-weight: 800; line-height: 1; letter-spacing: -.01em; color: #2a2a2a; background: linear-gradient(90deg, #ff6b6b, #ffd93d, #6bcb77, #4d96ff); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; opacity: 0; transform: translateY(40px); transition: opacity .8s ease, transform .8s ease; background-position: 100% center; } .gt-15__reveal.is-visible { opacity: 1; transform: translateY(0); background-position: 0% center; transition: opacity .8s ease, transform .8s ease, background-position 1.2s ease; } .gt-15__reveal:nth-child(1) { transition-delay: 0s; } .gt-15__reveal:nth-child(2) { transition-delay: .1s; } @keyframes gt-15-bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(8px); } } @media (prefers-reduced-motion: reduce) { .gt-15__reveal { opacity: 1; transform: none; transition: none; background-position: 0% center; } .gt-15__hint, .gt-15__arrow { animation: none; } } ``` **JS:** ```js (function() { const items = document.querySelectorAll('.gt-15 .gt-15__reveal'); if (!items.length) return; const io = new IntersectionObserver((entries) => { entries.forEach(e => { if (e.isIntersecting) { e.target.classList.add('is-visible'); } }); }, { threshold: 0.3 }); items.forEach(el => io.observe(el)); })(); ``` ### 16. CSS Click Ripple Gradient Text Interaction **Type:** CSS + JS **Description:** Clicking the gradient headline spawns a ripple ring at the click point while the headline flashes brighter, demonstrating CSS keyframe injection via JavaScript. **HTML:** ```html
    Click / tap gradient text ↓ click the word ↓
    CLICK
    Clicks: 0
    ``` **CSS:** ```css .gt-16, .gt-16 *, .gt-16 *::before, .gt-16 *::after { margin: 0; padding: 0; box-sizing: border-box; } .gt-16 { --bg: #f8f8f4; font-family: 'Outfit', sans-serif; background: var(--bg); min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2rem; padding: 3rem 2rem; user-select: none; } .gt-16__label { font-size: .7rem; letter-spacing: .2em; text-transform: uppercase; color: #ddd; } .gt-16__hint { font-size: .75rem; color: #ccc; letter-spacing: .1em; } .gt-16__btn { font-size: clamp(3rem, 12vw, 8rem); font-weight: 900; line-height: 1; letter-spacing: .02em; background: linear-gradient(90deg, #ff6b6b, #ffd93d, #6bcb77, #4d96ff, #a855f7, #ff6b6b); background-size: 300% 100%; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; cursor: pointer; position: relative; transition: transform .15s ease; background-position: 0% center; animation: gt-16-drift 8s linear infinite; } .gt-16__btn:active { transform: scale(.97); } .gt-16__btn.is-burst { animation: gt-16-burst .5s ease forwards; } .gt-16__ripples { position: absolute; inset: 0; pointer-events: none; overflow: visible; } .gt-16__ripple { position: absolute; border-radius: 50%; transform: translate(-50%, -50%) scale(0); animation: gt-16-ripple .8s ease-out forwards; pointer-events: none; opacity: .5; } .gt-16__score { font-size: 1rem; font-weight: 800; color: #ddd; letter-spacing: .1em; } .gt-16__score span { background: linear-gradient(90deg, #ff6b6b, #a855f7); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; } .gt-16__palette { display: flex; gap: .5rem; } .gt-16__swatch { width: 20px; height: 20px; border-radius: 50%; cursor: pointer; transition: transform .2s; border: 2px solid white; } .gt-16__swatch:hover { transform: scale(1.2); } .gt-16__swatch:nth-child(1) { background: linear-gradient(135deg, #ff6b6b, #ffd93d); } .gt-16__swatch:nth-child(2) { background: linear-gradient(135deg, #6bcb77, #4d96ff); } .gt-16__swatch:nth-child(3) { background: linear-gradient(135deg, #a855f7, #ec4899); } .gt-16__swatch:nth-child(4) { background: linear-gradient(135deg, #00f5a0, #00d9f5); } @keyframes gt-16-drift { 0% { background-position: 0% center; } 100% { background-position: 300% center; } } @keyframes gt-16-burst { 0% { transform: scale(1); filter: brightness(1); } 30% { transform: scale(1.06); filter: brightness(1.3); } 100% { transform: scale(1); filter: brightness(1); } } @keyframes gt-16-ripple { 0% { transform: translate(-50%, -50%) scale(0); opacity: .6; } 100% { transform: translate(-50%, -50%) scale(6); opacity: 0; } } @media (prefers-reduced-motion: reduce) { .gt-16__btn { animation: none; } .gt-16__btn.is-burst { animation: none; } .gt-16__ripple { animation: none; display: none; } } ``` **JS:** ```js (function() { const btn = document.getElementById('gt-16-main'); const ripples = document.getElementById('gt-16-ripples'); const countEl = document.getElementById('gt-16-count'); const palette = document.getElementById('gt-16-palette'); let count = 0; const colors = ['#ff6b6b','#ffd93d','#6bcb77','#4d96ff','#a855f7','#ec4899','#00f5a0']; btn.addEventListener('click', (e) => { count++; countEl.textContent = count; const rect = btn.getBoundingClientRect(); const x = e.clientX - rect.left; const y = e.clientY - rect.top; const r = document.createElement('div'); r.className = 'gt-16__ripple'; const c = colors[Math.floor(Math.random() * colors.length)]; r.style.cssText = `left:${x}px;top:${y}px;width:80px;height:80px;background:${c};`; ripples.appendChild(r); btn.classList.remove('is-burst'); void btn.offsetWidth; btn.classList.add('is-burst'); r.addEventListener('animationend', () => r.remove()); }); palette.querySelectorAll('.gt-16__swatch').forEach(sw => { sw.addEventListener('click', () => { btn.style.backgroundImage = sw.dataset.grad; }); }); })(); ``` ### 17. CSS Cursor-Tracked Radial Gradient Text **Type:** CSS + JS **Description:** A radial gradient spotlight follows the cursor position inside the demo, illuminating text from the exact point the mouse hovers, driven by CSS custom properties updated in JavaScript. **HTML:** ```html
    Cursor-tracked gradient

    FOLLOW

    Move your cursor

    TRACK LIGHT FOCUS
    ``` **CSS:** ```css .gt-17, .gt-17 *, .gt-17 *::before, .gt-17 *::after { margin: 0; padding: 0; box-sizing: border-box; } .gt-17 { --bg: #08080e; --cx: 50%; --cy: 50%; font-family: 'Space Grotesk', sans-serif; background: var(--bg); min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2.5rem; padding: 3rem 2rem; cursor: none; } .gt-17__cursor { position: fixed; top: 0; left: 0; width: 12px; height: 12px; border-radius: 50%; background: white; mix-blend-mode: exclusion; pointer-events: none; transform: translate(-50%, -50%); transition: transform .1s; z-index: 9999; } .gt-17__label { font-size: .7rem; letter-spacing: .2em; text-transform: uppercase; color: #333; } .gt-17__main { font-size: clamp(3rem, 12vw, 8rem); font-weight: 800; line-height: 1; letter-spacing: -.01em; background: radial-gradient( circle at var(--cx) var(--cy), #a855f7 0%, #ec4899 25%, #f43f5e 50%, #fb923c 75%, #fbbf24 100% ); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; transition: --cx .05s, --cy .05s; } .gt-17__sub { font-size: clamp(.9rem, 2.5vw, 1.3rem); font-weight: 700; background: radial-gradient( circle at var(--cx) var(--cy), #00f5a0 0%, #00d9f5 50%, #4d96ff 100% ); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; letter-spacing: .1em; } .gt-17__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; } .gt-17__cell { font-size: clamp(1rem, 3vw, 1.6rem); font-weight: 800; padding: .6em 1em; text-align: center; border: 1px solid #ffffff0d; border-radius: 8px; background: radial-gradient( circle at var(--cx) var(--cy), #a855f720 0%, transparent 70% ); color: #333; background-clip: padding-box; -webkit-text-fill-color: transparent; background-image: radial-gradient( circle at var(--cx) var(--cy), #a855f7 0%, #ec4899 40%, #4d96ff 80%, #00f5a0 100% ); -webkit-background-clip: text; } @media (prefers-reduced-motion: reduce) { .gt-17__cursor { display: none; } } ``` **JS:** ```js (function() { const root = document.getElementById('gt-17-root'); const cursor = document.getElementById('gt-17-cursor'); if (!root) return; root.addEventListener('mousemove', (e) => { const rect = root.getBoundingClientRect(); const x = ((e.clientX - rect.left) / rect.width * 100).toFixed(1) + '%'; const y = ((e.clientY - rect.top) / rect.height * 100).toFixed(1) + '%'; root.style.setProperty('--cx', x); root.style.setProperty('--cy', y); cursor.style.left = e.clientX + 'px'; cursor.style.top = e.clientY + 'px'; }); })(); ``` ### 18. CSS Typewriter Loop Gradient Text Animation **Type:** CSS + JS **Description:** A typewriter loop cycles through a curated list of words letter by letter, each rendered in a continuously scrolling gradient, with a blinking cursor and word chip indicators. **HTML:** ```html
    Typewriter gradient loop

    We design   →

    WEBSITES
    ``` **CSS:** ```css .gt-18, .gt-18 *, .gt-18 *::before, .gt-18 *::after { margin: 0; padding: 0; box-sizing: border-box; } .gt-18 { --bg: #0a0e18; font-family: 'JetBrains Mono', monospace; background: var(--bg); min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3rem; padding: 3rem 2rem; } .gt-18__label { font-size: .65rem; letter-spacing: .3em; text-transform: uppercase; color: #1a2a4a; } .gt-18__prefix { font-size: clamp(1rem, 3vw, 1.5rem); font-weight: 700; color: #3a5a8a; letter-spacing: .05em; } .gt-18__stage { display: flex; align-items: baseline; gap: .5rem; flex-wrap: wrap; justify-content: center; } .gt-18__typed { font-size: clamp(3rem, 11vw, 7rem); font-weight: 800; line-height: 1; background: linear-gradient(90deg, #4facfe 0%, #00f2fe 50%, #a855f7 100%); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; animation: gt-18-gradshift 3s linear infinite; min-width: 2ch; display: inline-block; } .gt-18__cursor { font-size: clamp(3rem, 11vw, 7rem); font-weight: 800; line-height: 1; color: #4facfe; animation: gt-18-blink .8s step-end infinite; display: inline-block; margin-left: 2px; } .gt-18__words-display { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; justify-content: center; } .gt-18__word-chip { font-size: .7rem; letter-spacing: .1em; padding: .3em .7em; border-radius: 4px; border: 1px solid #1a3060; color: #3a5a8a; transition: border-color .3s, color .3s; } .gt-18__word-chip.is-active { border-color: #4facfe; color: #4facfe; background: #4facfe10; } @keyframes gt-18-gradshift { 0% { background-position: 0% center; } 100% { background-position: 200% center; } } @keyframes gt-18-blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } } @media (prefers-reduced-motion: reduce) { .gt-18__typed { animation: none; background-position: 0% center; } .gt-18__cursor { animation: none; } } ``` **JS:** ```js (function() { const words = ['WEBSITES', 'PRODUCTS', 'SYSTEMS', 'BRANDS', 'FUTURES', 'MOTION']; const typed = document.getElementById('gt-18-typed'); const chipsEl = document.getElementById('gt-18-chips'); if (!typed) return; // Build chips words.forEach((w, i) => { const chip = document.createElement('span'); chip.className = 'gt-18__word-chip' + (i === 0 ? ' is-active' : ''); chip.textContent = w; chip.id = 'gt-18-chip-' + i; chipsEl.appendChild(chip); }); let cur = 0; function setActive(idx) { document.querySelectorAll('.gt-18 .gt-18__word-chip').forEach((c,i) => { c.classList.toggle('is-active', i === idx); }); } async function sleep(ms) { return new Promise(r => setTimeout(r, ms)); } async function typeWord(word) { for (let i = 1; i <= word.length; i++) { typed.textContent = word.slice(0, i); await sleep(80); } await sleep(1400); for (let i = word.length; i > 0; i--) { typed.textContent = word.slice(0, i - 1); await sleep(50); } } async function loop() { while (true) { setActive(cur); await typeWord(words[cur]); cur = (cur + 1) % words.length; } } loop(); })(); ``` ### 19. CSS Glitter Sparkle Gradient Text Effect **Type:** Pure CSS **Description:** Gold-pink-violet gradient text paired with animating spark particles via absolute-positioned siblings and staggered scale/opacity keyframes recreates the glitter foil aesthetic. **HTML:** ```html
    Glitter sparkle gradient
    SPARKLE

    GLITTER · SHIMMER · GLOW

    ✦ GOLD ✦ ✦ PINK ✦ ✦ VIOLET ✦
    ``` **CSS:** ```css .gt-19, .gt-19 *, .gt-19 *::before, .gt-19 *::after { margin: 0; padding: 0; box-sizing: border-box; } .gt-19 { --bg: #0d0015; --g1: #ffd700; --g2: #ff69b4; --g3: #da70d6; --g4: #ff6347; font-family: 'Paytone One', sans-serif; background: var(--bg); min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3rem; padding: 3rem 2rem; position: relative; overflow: hidden; } .gt-19__label { font-size: .7rem; letter-spacing: .2em; text-transform: uppercase; color: #3a1040; font-family: monospace; } .gt-19__glitter { font-size: clamp(3rem, 12vw, 8rem); line-height: 1; letter-spacing: .04em; position: relative; display: inline-block; background: linear-gradient(135deg, var(--g1) 0%, var(--g2) 25%, var(--g3) 50%, var(--g4) 75%, var(--g1) 100% ); background-size: 200% 200%; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; animation: gt-19-glitter 3s ease-in-out infinite; filter: drop-shadow(0 0 6px #ffd70060) drop-shadow(0 0 20px #ff69b440); } /* Sparkle particles via pseudo elements on sibling spans */ .gt-19__sparks { position: absolute; inset: 0; pointer-events: none; } .gt-19__spark { position: absolute; width: 4px; height: 4px; border-radius: 50%; background: radial-gradient(circle, #fff 40%, #ffd70060 100%); animation: gt-19-spark 2s ease-in-out infinite; } /* Position sparks around the text area */ .gt-19__spark:nth-child(1) { top: 10%; left: 5%; animation-delay: 0s; width:6px; height:6px; } .gt-19__spark:nth-child(2) { top: 20%; left: 80%; animation-delay: -.4s; } .gt-19__spark:nth-child(3) { top: 70%; left: 15%; animation-delay: -.8s; width:5px; height:5px; } .gt-19__spark:nth-child(4) { top: 80%; left: 90%; animation-delay: -1.2s; } .gt-19__spark:nth-child(5) { top: 40%; left: 95%; animation-delay: -1.6s; width:3px; height:3px; } .gt-19__spark:nth-child(6) { top: 50%; left: 2%; animation-delay: -0.2s; } .gt-19__spark:nth-child(7) { top: 5%; left: 50%; animation-delay: -0.6s; width:5px; height:5px; } .gt-19__spark:nth-child(8) { top: 90%; left: 50%; animation-delay: -1s; } .gt-19__spark:nth-child(9) { top: 30%; left: 30%; animation-delay: -1.4s; width:3px; height:3px; } .gt-19__spark:nth-child(10) { top: 60%; left: 70%; animation-delay: -1.8s; width:6px; height:6px; } .gt-19__sub { font-family: monospace; font-size: clamp(.7rem, 2vw, 1rem); letter-spacing: .25em; background: linear-gradient(90deg, var(--g1), var(--g3), var(--g2)); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; animation: gt-19-flow 4s linear infinite; } .gt-19__row { display: flex; gap: 2rem; flex-wrap: wrap; justify-content: center; } .gt-19__gem { font-size: clamp(1.2rem, 4vw, 2rem); background: linear-gradient(135deg, var(--g1), var(--g3)); background-size: 200% 200%; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; animation: gt-19-glitter 2.5s ease-in-out infinite; filter: drop-shadow(0 0 4px #ffd70050); } .gt-19__gem:nth-child(2) { animation-delay: -.6s; background-image: linear-gradient(135deg, var(--g2), var(--g4)); } .gt-19__gem:nth-child(3) { animation-delay: -1.2s; background-image: linear-gradient(135deg, var(--g3), var(--g1)); } @keyframes gt-19-glitter { 0%, 100% { background-position: 0% 0%; filter: drop-shadow(0 0 6px #ffd70060) drop-shadow(0 0 20px #ff69b440); } 50% { background-position: 100% 100%; filter: drop-shadow(0 0 12px #ffd700a0) drop-shadow(0 0 40px #ff69b480); } } @keyframes gt-19-spark { 0%, 100% { transform: scale(1); opacity: .8; } 50% { transform: scale(1.8) rotate(45deg); opacity: 0; } } @keyframes gt-19-flow { 0% { background-position: 0% center; } 100% { background-position: 200% center; } } @media (prefers-reduced-motion: reduce) { .gt-19__glitter, .gt-19__spark, .gt-19__sub, .gt-19__gem { animation: none; filter: none; } } ``` ### 20. CSS Crystalline Prism Gradient Text **Type:** Pure CSS **Description:** A pastel multi-stop gradient mimics the delicate refractive colours of crystal or cut glass, with animated background-position movement and complementary facet stripe accents. **HTML:** ```html
    Crystalline prism gradient
    CRYSTAL

    Refractive light spectrum

    QUARTZ AGATE JASPER OPAL
    ``` **CSS:** ```css .gt-20, .gt-20 *, .gt-20 *::before, .gt-20 *::after { margin: 0; padding: 0; box-sizing: border-box; } .gt-20 { --bg: #e8f0fa; font-family: 'Syncopate', sans-serif; background: var(--bg); min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3rem; padding: 3rem 2rem; } .gt-20__label { font-size: .6rem; letter-spacing: .3em; text-transform: uppercase; color: #c0cce0; } .gt-20__crystal { font-size: clamp(2.5rem, 10vw, 7rem); font-weight: 700; line-height: 1; letter-spacing: .12em; background: linear-gradient( 120deg, #b8d4f0 0%, #d0e8ff 8%, #f0f8ff 15%, #c8e0f8 22%, #e8d0f8 30%, #f0c8e0 38%, #f8e0d0 46%, #f0f0c8 54%, #d0f0d8 62%, #c8f0f0 70%, #d0d8f8 78%, #e8d0f8 86%, #f0e8ff 93%, #b8d4f0 100% ); background-size: 300% 300%; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; animation: gt-20-prism 6s ease-in-out infinite; } .gt-20__facets { display: flex; gap: 1px; justify-content: center; } .gt-20__facet { width: 60px; height: 3px; background: linear-gradient(90deg, #c8e0f8, #e8d0f8, #f0c8e0, #f8e0d0, #d0f0d8 ); background-size: 400% 100%; animation: gt-20-fscroll 4s linear infinite; opacity: .7; } .gt-20__facet:nth-child(odd) { animation-direction: reverse; } .gt-20__facet:nth-child(2) { transform: scaleX(.8); opacity: .5; } .gt-20__facet:nth-child(4) { transform: scaleX(.6); opacity: .4; } .gt-20__facet:nth-child(5) { transform: scaleX(.8); opacity: .5; } .gt-20__sub { font-size: clamp(.6rem, 1.8vw, .9rem); font-weight: 700; letter-spacing: .3em; text-transform: uppercase; background: linear-gradient(90deg, #8ab4d4 0%, #c090c0 33%, #a0c8a0 66%, #8ab4d4 100% ); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; animation: gt-20-fscroll 5s linear infinite; } .gt-20__gems { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; } .gt-20__gem-word { font-size: clamp(.8rem, 2.5vw, 1.1rem); font-weight: 700; letter-spacing: .1em; text-align: center; padding: .6em .8em; border-radius: 6px; background: linear-gradient(135deg, #d0e8ff, #e8d0f8, #d0f0d8, #f8e0d0 ); background-size: 200% 200%; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; border: 1px solid #c8d8e8; animation: gt-20-prism 4s ease-in-out infinite; } .gt-20__gem-word:nth-child(2) { animation-delay: -.8s; } .gt-20__gem-word:nth-child(3) { animation-delay: -1.6s; } .gt-20__gem-word:nth-child(4) { animation-delay: -2.4s; } @keyframes gt-20-prism { 0%, 100% { background-position: 0% 0%; } 50% { background-position: 100% 100%; } } @keyframes gt-20-fscroll { 0% { background-position: 0% center; } 100% { background-position: 200% center; } } @media (prefers-reduced-motion: reduce) { .gt-20__crystal, .gt-20__facet, .gt-20__sub, .gt-20__gem-word { animation: none; } } ``` --- ## 24 CSS Grid Layouts URL: https://codefronts.com/layouts/css-grid-layouts/ Description: 24 hand-coded CSS grid layouts — holy grail, 12-column, bento, masonry, subgrid, dashboard, kanban, container queries and more. Pure CSS, copy-paste ready. Demo count: 24 ### 01. Holy Grail **Type:** Pure CSS **Description:** The classic five-region web layout — header, sidebar, main, aside, footer — built with `grid-template-areas` so the markup reads like the visual. Three named columns let you swap left/right widths in one place. **HTML:** ```html
    Header grid-area: h
    Main content grid-area: m
    Footer grid-area: f
    ``` **CSS:** ```css .gl-hg { display: grid; grid-template-columns: 180px 1fr 180px; grid-template-rows: 72px 1fr 56px; grid-template-areas: "h h h" "l m r" "f f f"; gap: 12px; width: 100%; min-height: 480px; padding: 18px; background: radial-gradient(60% 80% at 80% 0%, rgba(16,185,129,0.12), transparent 60%), #051512; font-family: 'Inter', system-ui, sans-serif; font-size: 12px; color: #d1fae5; box-sizing: border-box; } .gl-hg > * { background: #0d2620; border: 1px solid rgba(52,211,153,0.22); border-radius: 10px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 12px; text-align: center; } .gl-hg-name { font-size: 13px; font-weight: 600; color: #ecfdf5; } .gl-hg-tag { font-family: 'JetBrains Mono', monospace; font-size: 10px; letter-spacing: 0.04em; padding: 3px 8px; border-radius: 999px; background: rgba(16,185,129,0.14); color: #34d399; } .gl-hg-h { grid-area: h; background: linear-gradient(135deg, #10b981, #34d399); border-color: transparent; } .gl-hg-h .gl-hg-name { color: #051512; } .gl-hg-h .gl-hg-tag { background: rgba(5,21,18,0.25); color: #051512; } .gl-hg-l { grid-area: l; } .gl-hg-m { grid-area: m; background: #14302a; } .gl-hg-r { grid-area: r; } .gl-hg-f { grid-area: f; background: rgba(16,185,129,0.12); } @media (max-width: 720px) { .gl-hg { grid-template-columns: 1fr; grid-template-rows: auto auto auto auto auto; grid-template-areas: "h" "l" "m" "r" "f"; } } ``` ### 02. 12-Column Grid **Type:** Pure CSS **Description:** A Bootstrap-style 12-column track with `repeat(12, minmax(0, 1fr))`. Cells span any number of columns via `grid-column: span N`, giving you the familiar `col-6 / col-3 / col-9` rhythm without a framework. **HTML:** ```html
    12span 12
    6span 6
    6span 6
    4span 4
    4span 4
    4span 4
    3span 3
    3span 3
    3span 3
    3span 3
    8span 8
    4span 4
    ``` **CSS:** ```css .gl-12 { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 10px; width: 100%; min-height: 480px; padding: 22px; background: repeating-linear-gradient(90deg, transparent 0, transparent calc(100%/12 - 1px), rgba(245,158,11,0.06) calc(100%/12 - 1px), rgba(245,158,11,0.06) calc(100%/12)), #1a1206; font-family: 'Inter', system-ui, sans-serif; color: #fef3c7; box-sizing: border-box; align-content: start; } .gl-12 > div { background: linear-gradient(135deg, rgba(245,158,11,0.18), rgba(217,119,6,0.1)); border: 1px solid rgba(245,158,11,0.32); border-radius: 10px; padding: 14px 10px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 64px; } .gl-12 > div strong { font-size: 22px; font-weight: 800; color: #fef3c7; letter-spacing: -0.02em; } .gl-12 > div em { font-style: normal; font-family: 'JetBrains Mono', monospace; font-size: 10px; color: #fbbf24; letter-spacing: 0.04em; } .gl-12-c12 { grid-column: span 12; background: linear-gradient(90deg, #f59e0b, #fbbf24) !important; } .gl-12-c12 strong { color: #1a1206; } .gl-12-c12 em { color: #1a1206; opacity: 0.6; } .gl-12-c8 { grid-column: span 8; } .gl-12-c6 { grid-column: span 6; } .gl-12-c4 { grid-column: span 4; } .gl-12-c3 { grid-column: span 3; } @media (max-width: 720px) { .gl-12 { grid-template-columns: repeat(6, minmax(0, 1fr)); } .gl-12-c12, .gl-12-c8, .gl-12-c6 { grid-column: span 6; } .gl-12-c4, .gl-12-c3 { grid-column: span 3; } } ``` ### 03. Bento Box **Type:** Pure CSS **Description:** Apple-keynote bento grid — six tiles of asymmetric sizes orchestrated with `grid-template-areas`. Each tile name reads like English, so swapping the layout means renaming areas, not rewriting math. **HTML:** ```html
    Hero grid-area: hero
    Stat grid-area: stat
    Feature grid-area: feat
    Quote grid-area: quote
    CTA grid-area: cta
    Info grid-area: info
    ``` **CSS:** ```css .gl-bb { display: grid; grid-template-columns: repeat(4, 1fr); grid-template-rows: repeat(3, minmax(0, 1fr)); grid-template-areas: "hero hero stat feat" "hero hero info feat" "quote cta cta feat"; gap: 12px; width: 100%; min-height: 480px; padding: 18px; background: radial-gradient(80% 60% at 0% 100%, rgba(251,113,133,0.16), transparent 60%), radial-gradient(60% 60% at 100% 0%, rgba(249,115,22,0.16), transparent 60%), #1a0d0a; font-family: 'Inter', system-ui, sans-serif; color: #ffe4e6; box-sizing: border-box; } .gl-bb > article { background: #2a1410; border: 1px solid rgba(251,113,133,0.18); border-radius: 14px; padding: 16px; display: flex; flex-direction: column; justify-content: space-between; gap: 8px; min-height: 0; } .gl-bb-name { font-size: 15px; font-weight: 700; color: #fff; } .gl-bb-tag { font-family: 'JetBrains Mono', monospace; font-size: 10px; letter-spacing: 0.04em; align-self: flex-start; padding: 3px 8px; border-radius: 999px; background: rgba(251,113,133,0.14); color: #fb7185; } .gl-bb-hero { grid-area: hero; background: linear-gradient(135deg, #fb7185, #f97316) !important; border: 0 !important; } .gl-bb-hero .gl-bb-name { color: #1a0d0a; font-size: 24px; } .gl-bb-hero .gl-bb-tag { background: rgba(26,13,10,0.25); color: #1a0d0a; } .gl-bb-stat { grid-area: stat; } .gl-bb-feat { grid-area: feat; background: linear-gradient(180deg, #2a1410, #4a1a14); } .gl-bb-quote { grid-area: quote; } .gl-bb-cta { grid-area: cta; background: rgba(251,113,133,0.14); } .gl-bb-info { grid-area: info; } @media (max-width: 720px) { .gl-bb { grid-template-columns: 1fr 1fr; grid-template-rows: repeat(4, 1fr); grid-template-areas: "hero hero" "stat info" "feat feat" "quote cta"; } } ``` ### 04. Magazine Editorial **Type:** Pure CSS **Description:** Editorial spread layout — a wide hero column anchors the page while side rails hold pull quotes, captions, and image plates. Built on a 6-column track with named areas; reads like a print magazine. **HTML:** ```html
    Issue 47 · Spring grid-area: eye

    The Long Read grid-area: title

    Lead paragraph grid-area: lead
    Photo plate grid-area: fig
    Body column grid-area: body
    Footer · byline grid-area: foot
    ``` **CSS:** ```css .gl-mag { display: grid; grid-template-columns: repeat(6, 1fr); grid-template-rows: 56px auto 1fr auto 48px; grid-template-areas: "eye eye eye eye eye eye" "title title title title fig fig" "lead lead body body fig fig" "pull pull body body fig fig" "foot foot foot foot foot foot"; gap: 14px; width: 100%; min-height: 480px; padding: 22px; background: #f5f1ea; font-family: 'Playfair Display', Georgia, serif; color: #1c1c1e; box-sizing: border-box; } .gl-mag > * { background: #fff; border: 1px solid #d8d2c5; border-radius: 4px; padding: 14px; display: flex; flex-direction: column; justify-content: center; gap: 6px; } .gl-mag-name { font-size: 16px; font-weight: 700; color: #1c1c1e; } .gl-mag-tag { font-family: 'JetBrains Mono', monospace; font-size: 10px; font-weight: 500; align-self: flex-start; padding: 2px 8px; border: 1px solid #1c1c1e; color: #1c1c1e; background: transparent; } .gl-mag-eyebrow { grid-area: eye; background: #1c1c1e !important; border: 0 !important; min-height: 36px; padding: 8px 14px; } .gl-mag-eyebrow .gl-mag-name { color: #f5f1ea; font-family: 'JetBrains Mono', monospace; font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase; } .gl-mag-eyebrow .gl-mag-tag { color: #f5f1ea; border-color: #f5f1ea; } .gl-mag-title { grid-area: title; margin: 0; } .gl-mag-title .gl-mag-name { font-size: 36px; line-height: 1; letter-spacing: -0.02em; } .gl-mag-fig { grid-area: fig; background: linear-gradient(160deg, #d4af37, #b89238) !important; border: 0 !important; color: #1c1c1e; } .gl-mag-fig .gl-mag-name { color: #1c1c1e; } .gl-mag-fig .gl-mag-tag { color: #1c1c1e; border-color: #1c1c1e; } .gl-mag-lead { grid-area: lead; } .gl-mag-pull { grid-area: pull; background: #1c1c1e !important; border: 0 !important; } .gl-mag-pull .gl-mag-name { color: #f5f1ea; font-style: italic; } .gl-mag-pull .gl-mag-tag { color: #f5f1ea; border-color: #f5f1ea; } .gl-mag-body { grid-area: body; } .gl-mag-foot { grid-area: foot; background: #f5f1ea !important; padding: 10px 14px; } .gl-mag-foot .gl-mag-name { font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: 0.12em; } @media (max-width: 720px) { .gl-mag { grid-template-columns: 1fr; grid-template-rows: repeat(7, auto); grid-template-areas: "eye" "title" "fig" "lead" "body" "pull" "foot"; } } ``` ### 05. RAM Auto-Fit **Type:** Pure CSS **Description:** The "RAM" pattern — `repeat(auto-fit, minmax(220px, 1fr))` — gives you a grid that wraps as many columns as the container allows, never overflows, and never goes below the minimum. The single most useful one-liner in CSS Grid. **HTML:** ```html
    Card 1auto-fit · minmax(220px, 1fr)
    Card 2auto-fit
    Card 3auto-fit
    Card 4auto-fit
    Card 5auto-fit
    Card 6auto-fit
    Card 7auto-fit
    Card 8auto-fit
    ``` **CSS:** ```css .gl-ram { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; width: 100%; min-height: 480px; padding: 22px; background: radial-gradient(60% 80% at 50% 0%, rgba(56,189,248,0.16), transparent 60%), #051324; font-family: 'Inter', system-ui, sans-serif; color: #e0f2fe; box-sizing: border-box; align-content: start; } .gl-ram-cell { background: linear-gradient(160deg, rgba(56,189,248,0.16), rgba(14,165,233,0.06)); border: 1px solid rgba(56,189,248,0.28); border-radius: 12px; padding: 22px 18px; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 6px; min-height: 90px; } .gl-ram-cell strong { font-size: 16px; font-weight: 700; color: #fff; } .gl-ram-cell em { font-style: normal; font-family: 'JetBrains Mono', monospace; font-size: 10.5px; color: #38bdf8; letter-spacing: 0.02em; } .gl-ram-cell:nth-child(1) { background: linear-gradient(135deg, #0ea5e9, #38bdf8); border: 0; } .gl-ram-cell:nth-child(1) strong { color: #051324; } .gl-ram-cell:nth-child(1) em { color: #051324; opacity: 0.7; } ``` ### 06. Quantity Query **Type:** Pure CSS **Description:** Layout that adapts to *how many* children it has using `:has()` and `:nth-child()` — one item gets a hero treatment, two split 50/50, three become a 3-column row, four become a 2×2. No JS. **HTML:** ```html
    Three children → 3-column row :has(:nth-child(3):last-child)
    1nth-child(1)
    2nth-child(2)
    3nth-child(3)
    ``` **CSS:** ```css .gl-qq { display: flex; flex-direction: column; gap: 16px; width: 100%; min-height: 480px; padding: 22px; background: radial-gradient(60% 80% at 100% 0%, rgba(217,70,239,0.16), transparent 60%), #1a0820; font-family: 'Inter', system-ui, sans-serif; color: #fae8ff; box-sizing: border-box; } .gl-qq-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding: 14px 18px; background: linear-gradient(135deg, #d946ef, #a21caf); border-radius: 12px; color: #fff; } .gl-qq-head strong { font-size: 14px; font-weight: 700; } .gl-qq-coord { font-family: 'JetBrains Mono', monospace; font-size: 11px; background: rgba(26,8,32,0.4); color: #fff; padding: 4px 10px; border-radius: 6px; } .gl-qq-grid { display: grid; gap: 12px; flex: 1; grid-template-columns: 1fr; } /* Single child → hero */ .gl-qq-grid:has(> div:only-child) { grid-template-columns: 1fr; } /* Two children → 50/50 */ .gl-qq-grid:has(> div:nth-child(2):last-child) { grid-template-columns: 1fr 1fr; } /* Three children → three columns */ .gl-qq-grid:has(> div:nth-child(3):last-child) { grid-template-columns: repeat(3, 1fr); } /* Four+ children → 2×2 */ .gl-qq-grid:has(> div:nth-child(4)) { grid-template-columns: repeat(2, 1fr); } .gl-qq-grid > div { background: linear-gradient(160deg, rgba(217,70,239,0.14), rgba(126,34,206,0.06)); border: 1px solid rgba(217,70,239,0.32); border-radius: 12px; padding: 22px 18px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 120px; } .gl-qq-grid > div strong { font-size: 32px; font-weight: 800; color: #fff; letter-spacing: -0.02em; } .gl-qq-grid > div em { font-style: normal; font-family: 'JetBrains Mono', monospace; font-size: 10.5px; color: #d946ef; } .gl-qq-grid > div:nth-child(2) { background: linear-gradient(160deg, rgba(217,70,239,0.28), rgba(126,34,206,0.1)); } .gl-qq-grid > div:nth-child(3) { background: linear-gradient(135deg, #d946ef, #a21caf); border: 0; } .gl-qq-grid > div:nth-child(3) em { color: rgba(255,255,255,0.6); } @media (max-width: 720px) { .gl-qq-grid:has(> div:nth-child(3):last-child) { grid-template-columns: 1fr; } } ``` ### 07. Pinterest Masonry **Type:** Pure CSS **Description:** Masonry-style brick layout using `grid-template-rows: masonry` (with `grid-auto-flow: dense` fallback). Cards of varying heights pack tightly without gaps — the Pinterest pattern, native CSS. **HTML:** ```html
    Card 1row 1 · h: 1.5×
    Card 2row 1 · h: 1×
    Card 3row 2 · h: 2×
    Card 4row 2 · h: 1×
    Card 5row 3 · h: 1.5×
    Card 6row 3 · h: 1×
    Card 7row 4 · h: 1×
    ``` **CSS:** ```css .gl-mas { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); grid-auto-flow: dense; grid-auto-rows: 60px; gap: 12px; width: 100%; min-height: 480px; padding: 22px; background: radial-gradient(50% 80% at 50% 0%, rgba(244,63,94,0.14), transparent 60%), #1a060c; font-family: 'Inter', system-ui, sans-serif; color: #ffe4e6; box-sizing: border-box; align-content: start; } .gl-mas > article { background: linear-gradient(160deg, rgba(244,63,94,0.16), rgba(190,18,60,0.06)); border: 1px solid rgba(244,63,94,0.28); border-radius: 14px; padding: 16px; display: flex; flex-direction: column; justify-content: space-between; gap: 6px; } .gl-mas > article strong { font-size: 14px; font-weight: 700; color: #fff; } .gl-mas > article em { font-style: normal; font-family: 'JetBrains Mono', monospace; font-size: 10px; color: #fb7185; align-self: flex-start; padding: 2px 8px; border-radius: 999px; background: rgba(244,63,94,0.12); } .gl-mas-c1 { grid-row: span 3; background: linear-gradient(180deg, #f43f5e, #e11d48) !important; border: 0 !important; } .gl-mas-c1 em { color: #fff; background: rgba(26,6,12,0.3); } .gl-mas-c2 { grid-row: span 2; } .gl-mas-c3 { grid-row: span 4; background: linear-gradient(180deg, rgba(244,63,94,0.32), rgba(190,18,60,0.14)); } .gl-mas-c4 { grid-row: span 2; } .gl-mas-c5 { grid-row: span 3; } .gl-mas-c6 { grid-row: span 2; background: linear-gradient(180deg, #fb7185, #f43f5e) !important; border: 0 !important; } .gl-mas-c6 em { color: #fff; background: rgba(26,6,12,0.3); } .gl-mas-c7 { grid-row: span 2; } ``` ### 08. Hexagonal Honeycomb **Type:** Pure CSS **Description:** Hexagon honeycomb tiling — alternating offset rows on a CSS Grid base, each cell shaped with `clip-path: polygon()`. The math falls out of the grid track widths; no transforms needed. **HTML:** ```html
    A1row 1 A2row 1 A3row 1 A4row 1
    B1row 2 B2row 2 B3row 2
    C1row 3 C2row 3 C3row 3 C4row 3
    D1row 4 D2row 4 D3row 4
    ``` **CSS:** ```css .gl-hex { display: flex; flex-direction: column; gap: 6px; width: 100%; min-height: 480px; padding: 28px 18px; background: radial-gradient(60% 60% at 50% 50%, rgba(217,119,6,0.14), transparent 60%), #14110a; font-family: 'Inter', system-ui, sans-serif; color: #fef3c7; box-sizing: border-box; align-items: center; justify-content: center; overflow: hidden; } .gl-hex-row { display: grid; grid-template-columns: repeat(4, 100px); gap: 8px; width: 424px; margin-left: 0; } .gl-hex-shift { grid-template-columns: repeat(3, 100px); padding-left: 54px; width: 424px; } .gl-hex-row + .gl-hex-row { margin-top: -28px; } .gl-hex-cell { width: 100px; height: 110px; clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%); background: linear-gradient(160deg, #d97706, #f59e0b); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: #14110a; cursor: pointer; transition: transform 0.22s cubic-bezier(.22,1,.36,1), filter 0.22s ease; will-change: transform, filter; } .gl-hex-cell:hover, .gl-hex-cell:focus-visible { transform: translateY(-4px) scale(1.06); filter: drop-shadow(0 6px 14px rgba(251, 191, 36, 0.55)) drop-shadow(0 2px 4px rgba(217, 119, 6, 0.4)) brightness(1.15); z-index: 2; outline: none; } .gl-hex-cell strong { font-size: 16px; font-weight: 800; letter-spacing: -0.01em; } .gl-hex-cell em { font-style: normal; font-family: 'JetBrains Mono', monospace; font-size: 9.5px; letter-spacing: 0.02em; color: rgba(20,17,10,0.65); } .gl-hex-row:nth-child(1) .gl-hex-cell { background: linear-gradient(160deg, #f59e0b, #fbbf24); } .gl-hex-row:nth-child(2) .gl-hex-cell { background: linear-gradient(160deg, #d97706, #f59e0b); } .gl-hex-row:nth-child(3) .gl-hex-cell { background: linear-gradient(160deg, #b45309, #d97706); } .gl-hex-row:nth-child(4) .gl-hex-cell { background: linear-gradient(160deg, #92400e, #b45309); color: #fef3c7; } .gl-hex-row:nth-child(4) .gl-hex-cell em { color: rgba(254,243,199,0.7); } .gl-hex-row { position: relative; } .gl-hex-cell:hover { position: relative; } @media (prefers-reduced-motion: reduce) { .gl-hex-cell { transition: none; } .gl-hex-cell:hover, .gl-hex-cell:focus-visible { transform: none; } } @media (max-width: 720px) { .gl-hex-row { grid-template-columns: repeat(3, 80px); width: 256px; padding-left: 0; } .gl-hex-shift { grid-template-columns: repeat(2, 80px); padding-left: 44px; width: 256px; } .gl-hex-cell { width: 80px; height: 90px; } .gl-hex-row + .gl-hex-row { margin-top: -22px; } } ``` ### 09. Subgrid Card **Type:** Pure CSS **Description:** A row of cards whose internal sections (title / body / footer) line up across all cards using `grid-template-rows: subgrid`. The titles align even when one is two lines; same for the footer baseline. **HTML:** ```html

    Compact titlesubgrid

    Body copy of variable length sits on its own subgrid row so titles always align.

    Footerrow 3

    A longer two-line card title heresubgrid

    Subgrid lets this card inherit the parent's row tracks. Bodies stay aligned regardless of title height.

    Footerrow 3

    Compact titlesubgrid

    Without subgrid these would drift. With subgrid each card's three rows lock to the parent.

    Footerrow 3
    ``` **CSS:** ```css .gl-sg { display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: auto 1fr auto; gap: 14px; width: 100%; min-height: 480px; padding: 22px; background: radial-gradient(60% 80% at 50% 0%, rgba(34,211,238,0.14), transparent 60%), #061a1f; font-family: 'Inter', system-ui, sans-serif; color: #e0f7fa; box-sizing: border-box; } .gl-sg-card { display: grid; grid-row: 1 / -1; grid-template-rows: subgrid; background: linear-gradient(180deg, rgba(34,211,238,0.12), rgba(8,145,178,0.04)); border: 1px solid rgba(34,211,238,0.28); border-radius: 14px; padding: 18px; gap: 12px; } .gl-sg-mid { background: linear-gradient(180deg, #06b6d4, #0891b2); border: 0; color: #061a1f; } .gl-sg-mid .gl-sg-pill, .gl-sg-mid .gl-sg-coord { background: rgba(6,26,31,0.2); color: #061a1f; } .gl-sg-mid .gl-sg-body { color: #061a1f; opacity: 0.85; } .gl-sg-title { margin: 0; font-size: 16px; font-weight: 700; line-height: 1.3; display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; } .gl-sg-title span:first-child { color: inherit; } .gl-sg-pill, .gl-sg-coord { font-family: 'JetBrains Mono', monospace; font-size: 10px; letter-spacing: 0.04em; padding: 2px 8px; border-radius: 999px; background: rgba(34,211,238,0.16); color: #22d3ee; flex-shrink: 0; } .gl-sg-body { font-size: 13px; line-height: 1.55; margin: 0; color: #b6d8df; } .gl-sg-foot { display: flex; align-items: center; justify-content: space-between; font-size: 12px; padding-top: 10px; border-top: 1px dashed rgba(34,211,238,0.25); } .gl-sg-mid .gl-sg-foot { border-top-color: rgba(6,26,31,0.25); } @media (max-width: 720px) { .gl-sg { grid-template-columns: 1fr; grid-template-rows: none; } .gl-sg-card { grid-row: auto; grid-template-rows: auto auto auto; } } ``` ### 10. Dashboard Skeleton **Type:** Pure CSS **Description:** Admin dashboard skeleton — sticky sidebar, top bar, KPI row, main chart area, and a feed rail. Six named areas on a 12-column track so any region can grow without rebreaking the others. **HTML:** ```html
    Top bargrid-area: bar
    KPIkpi · 1/4
    KPIkpi · 2/4
    KPIkpi · 3/4
    KPIkpi · 4/4
    Main chartgrid-area: main
    ``` **CSS:** ```css .gl-dash { display: grid; grid-template-columns: 200px repeat(4, 1fr) 200px; grid-template-rows: 56px 86px 1fr; grid-template-areas: "nav bar bar bar bar bar" "nav k1 k2 k3 k4 feed" "nav main main main main feed"; gap: 10px; width: 100%; min-height: 480px; padding: 14px; background: #0a0a1a; font-family: 'Inter', system-ui, sans-serif; color: #e0e7ff; box-sizing: border-box; } .gl-dash > * { background: #1a1a2e; border: 1px solid rgba(99,102,241,0.22); border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; justify-content: center; gap: 4px; } .gl-dash > * strong { font-size: 13px; font-weight: 700; color: #c7d2fe; } .gl-dash-coord { font-family: 'JetBrains Mono', monospace; font-size: 10px; color: #818cf8; letter-spacing: 0.04em; align-self: flex-start; } .gl-dash-bar { grid-area: bar; background: linear-gradient(90deg, #4f46e5, #6366f1); border: 0; } .gl-dash-bar strong, .gl-dash-bar .gl-dash-coord { color: #fff; } .gl-dash-bar .gl-dash-coord { color: rgba(255,255,255,0.7); } .gl-dash-nav { grid-area: nav; background: #14142b; } .gl-dash-k1 { grid-area: k1; background: linear-gradient(160deg, rgba(99,102,241,0.28), rgba(99,102,241,0.06)); } .gl-dash-k2 { grid-area: k2; } .gl-dash-k3 { grid-area: k3; background: linear-gradient(160deg, rgba(168,85,247,0.28), rgba(168,85,247,0.06)); } .gl-dash-k4 { grid-area: k4; } .gl-dash-main { grid-area: main; background: linear-gradient(180deg, #1a1a2e, #14142b); min-height: 200px; } .gl-dash-feed { grid-area: feed; background: rgba(99,102,241,0.08); } @media (max-width: 720px) { .gl-dash { grid-template-columns: 1fr 1fr; grid-template-rows: auto auto auto auto; grid-template-areas: "bar bar" "nav nav" "k1 k2" "k3 k4" "main main" "feed feed"; } } ``` ### 11. Pricing Table **Type:** Pure CSS **Description:** Three-column pricing tier on a CSS Grid base. The middle tier scales up using `transform: scale()` while staying in the same grid track — the baseline pricing pattern with consistent header / price / feature / CTA rows. **HTML:** ```html

    Free

    $0column 1

    Personal projects · 1 user

    Choose
    Recommended

    Pro

    $24column 2 · scaled

    Teams · unlimited projects

    Choose
    ``` **CSS:** ```css .gl-pri { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; width: 100%; min-height: 480px; padding: 22px; background: radial-gradient(60% 80% at 50% 0%, rgba(34,197,94,0.14), transparent 60%), #07140e; font-family: 'Inter', system-ui, sans-serif; color: #ecfdf5; box-sizing: border-box; align-items: center; } .gl-pri-tier { position: relative; background: #0d2018; border: 1px solid rgba(34,197,94,0.22); border-radius: 14px; padding: 22px 18px; display: flex; flex-direction: column; gap: 10px; text-align: center; } .gl-pri-tier h4 { margin: 0; font-size: 12px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: #34d399; } .gl-pri-tier strong { font-size: 36px; font-weight: 800; letter-spacing: -0.02em; color: #fff; } .gl-pri-coord { font-family: 'JetBrains Mono', monospace; font-size: 10.5px; letter-spacing: 0.04em; color: #34d399; background: rgba(34,197,94,0.14); border-radius: 999px; padding: 3px 10px; align-self: center; } .gl-pri-tier p { margin: 0; font-size: 13px; color: #a7d8b9; } .gl-pri-tier a { display: block; padding: 10px; border-radius: 8px; background: rgba(34,197,94,0.14); color: #34d399; text-decoration: none; font-weight: 600; font-size: 13px; cursor: default; } .gl-pri-pop { background: linear-gradient(180deg, #16a34a, #15803d); border-color: #34d399; transform: scale(1.04); box-shadow: 0 14px 40px rgba(34,197,94,0.25); color: #07140e; } .gl-pri-pop h4, .gl-pri-pop strong { color: #07140e; } .gl-pri-pop p { color: rgba(7,20,14,0.8); } .gl-pri-pop a { background: #07140e; color: #34d399; } .gl-pri-pop .gl-pri-coord { background: rgba(7,20,14,0.25); color: #07140e; } .gl-pri-badge { position: absolute; top: -10px; left: 50%; transform: translateX(-50%); background: #07140e; color: #34d399; font-size: 10px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; } @media (max-width: 720px) { .gl-pri { grid-template-columns: 1fr; } .gl-pri-pop { transform: none; } } ``` ### 12. Kanban Board **Type:** Pure CSS **Description:** Three-column kanban — Todo / In Progress / Done — with each column scrolling independently. Cards stack with `grid-auto-rows: min-content` so columns of different lengths still align at the top. **HTML:** ```html
    To-docolumn 1
    Sketch onboarding
    Brand audit
    Set up CI
    In progresscolumn 2
    Refactor auth
    Email templates
    Donecolumn 3
    Spec sign-off
    Vendor selected
    Wire-frames
    Kick-off call
    ``` **CSS:** ```css .gl-kb { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; width: 100%; min-height: 480px; padding: 18px; background: #0f172a; font-family: 'Inter', system-ui, sans-serif; color: #e2e8f0; box-sizing: border-box; align-items: start; } .gl-kb-col { background: #1e293b; border: 1px solid rgba(148,163,184,0.18); border-radius: 14px; padding: 14px; display: grid; grid-auto-rows: min-content; gap: 8px; } .gl-kb-col header { display: flex; align-items: center; justify-content: space-between; padding: 6px 10px; border-radius: 8px; margin-bottom: 4px; } .gl-kb-col header strong { font-size: 13px; font-weight: 700; } .gl-kb-coord { font-family: 'JetBrains Mono', monospace; font-size: 10px; letter-spacing: 0.04em; padding: 2px 8px; border-radius: 999px; } .gl-kb-todo header { background: rgba(148,163,184,0.18); color: #cbd5e1; } .gl-kb-todo .gl-kb-coord { background: rgba(15,23,42,0.5); color: #94a3b8; } .gl-kb-prog header { background: rgba(245,158,11,0.18); color: #fbbf24; } .gl-kb-prog .gl-kb-coord { background: rgba(15,23,42,0.5); color: #fbbf24; } .gl-kb-done header { background: rgba(34,197,94,0.18); color: #34d399; } .gl-kb-done .gl-kb-coord { background: rgba(15,23,42,0.5); color: #34d399; } .gl-kb-col article { background: #334155; border: 1px solid rgba(148,163,184,0.18); border-left: 3px solid currentColor; border-radius: 8px; padding: 10px 12px; font-size: 13px; color: #e2e8f0; } .gl-kb-todo article { color: #94a3b8; } .gl-kb-prog article { color: #fbbf24; } .gl-kb-done article { color: #34d399; } .gl-kb-col article { color: #e2e8f0; } .gl-kb-todo article { border-left-color: #94a3b8; } .gl-kb-prog article { border-left-color: #fbbf24; } .gl-kb-done article { border-left-color: #34d399; } @media (max-width: 720px) { .gl-kb { grid-template-columns: 1fr; } } ``` ### 13. Aspect-Ratio Tiles **Type:** Pure CSS **Description:** Photo-grid where every tile keeps a perfect 1:1 ratio via `aspect-ratio: 1`. Combined with `auto-fill`, tiles wrap responsively without breaking aspect or causing layout shift on image load. **HTML:** ```html
    2:1span 2 rows
    1:1aspect-ratio: 1
    1:1aspect-ratio: 1
    1:1aspect-ratio: 1
    1:1aspect-ratio: 1
    1:1aspect-ratio: 1
    1:1aspect-ratio: 1
    1:1aspect-ratio: 1
    1:1aspect-ratio: 1
    1:1aspect-ratio: 1
    1:1aspect-ratio: 1
    ``` **CSS:** ```css .gl-ar { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; width: 100%; min-height: 480px; padding: 22px; background: radial-gradient(60% 80% at 50% 0%, rgba(192,38,211,0.16), transparent 60%), #1a0820; font-family: 'Inter', system-ui, sans-serif; color: #f5d0fe; box-sizing: border-box; align-content: start; } .gl-ar-tile { aspect-ratio: 1; background: linear-gradient(160deg, rgba(192,38,211,0.18), rgba(126,34,206,0.06)); border: 1px solid rgba(192,38,211,0.32); border-radius: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; } .gl-ar-tile[style*="span 2"] { aspect-ratio: 1 / 2; } .gl-ar-tile strong { font-size: 22px; font-weight: 800; color: #fff; letter-spacing: -0.02em; } .gl-ar-tile em { font-style: normal; font-family: 'JetBrains Mono', monospace; font-size: 9.5px; color: #c026d3; } .gl-ar-tile:nth-child(3n+1) { background: linear-gradient(160deg, #c026d3, #a21caf); border: 0; } .gl-ar-tile:nth-child(3n+1) em { color: rgba(255,255,255,0.7); } .gl-ar-tile:nth-child(5n+2) { background: linear-gradient(160deg, #a21caf, #86198f); border: 0; } .gl-ar-tile:nth-child(5n+2) em { color: rgba(255,255,255,0.7); } ``` ### 14. Container-Query Card **Type:** Pure CSS **Description:** A card whose internal layout adapts to its *container* width using `@container` queries — not the viewport. Below 320px it stacks vertically; above 320px it splits horizontal. Modern responsive design without media queries. **HTML:** ```html
    Container ≥ 320px
    Image img · col 1

    Card with container queries

    Resize the card and the layout switches — no media query, no JS.

    body · col 2 · @container ≥ 320px
    Container < 320px
    Image img · row 1

    Stacks below 320px

    Same component. Different container width.

    body · row 2 · @container < 320px
    ``` **CSS:** ```css .gl-cq { display: grid; grid-template-columns: 1fr 260px; gap: 18px; width: 100%; min-height: 480px; padding: 22px; background: radial-gradient(60% 80% at 50% 0%, rgba(20,184,166,0.14), transparent 60%), #042022; font-family: 'Inter', system-ui, sans-serif; color: #ccfbf1; box-sizing: border-box; align-items: stretch; } .gl-cq-card { container-type: inline-size; background: #0d3030; border: 1px solid rgba(20,184,166,0.28); border-radius: 14px; padding: 16px; } .gl-cq-inner { display: grid; gap: 14px; grid-template-columns: 1fr; grid-template-rows: auto auto 1fr; grid-template-areas: "name" "img" "body"; } .gl-cq-name { grid-area: name; font-family: 'JetBrains Mono', monospace; font-size: 11px; font-weight: 600; letter-spacing: 0.08em; color: #2dd4bf; background: rgba(20,184,166,0.14); padding: 4px 10px; border-radius: 999px; align-self: flex-start; justify-self: flex-start; } .gl-cq-img { grid-area: img; background: linear-gradient(135deg, #14b8a6, #0d9488); min-height: 120px; border-radius: 10px; padding: 14px; display: flex; flex-direction: column; justify-content: space-between; color: #042022; margin: 0; } .gl-cq-img strong { font-size: 16px; font-weight: 700; } .gl-cq-coord { font-family: 'JetBrains Mono', monospace; font-size: 10px; letter-spacing: 0.04em; align-self: flex-start; padding: 2px 8px; border-radius: 999px; background: rgba(4,32,34,0.25); color: #042022; } .gl-cq-coord-light { color: #2dd4bf; background: rgba(20,184,166,0.14); } .gl-cq-body { grid-area: body; padding: 4px 2px; display: flex; flex-direction: column; gap: 6px; } .gl-cq-body h4 { margin: 0; font-size: 14px; font-weight: 700; color: #fff; } .gl-cq-body p { margin: 0; font-size: 12.5px; color: #99d4cb; line-height: 1.5; } .gl-cq-body .gl-cq-coord { align-self: flex-start; } @container (min-width: 320px) { .gl-cq-inner { grid-template-columns: 180px 1fr; grid-template-rows: auto 1fr; grid-template-areas: "name name" "img body"; } .gl-cq-inner .gl-cq-img { min-height: 200px; } .gl-cq-inner .gl-cq-body { justify-content: center; } } .gl-cq-narrow { max-width: 260px; } @media (max-width: 720px) { .gl-cq { grid-template-columns: 1fr; } .gl-cq-narrow { max-width: 100%; } } ``` ### 15. Diagonal Skew Grid **Type:** Pure CSS **Description:** Grid cells skewed with `transform: skewY()` while their content counter-skews to stay readable. The brutalist diagonal-cut layout, all done at the grid layer. **HTML:** ```html
    01skewY(-6deg)
    02skewY(-6deg)
    03skewY(-6deg)
    04skewY(-6deg)
    05skewY(-6deg)
    06skewY(-6deg)
    ``` **CSS:** ```css .gl-sk { display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(2, 1fr); gap: 14px; width: 100%; min-height: 480px; padding: 30px 22px; background: #1a0a05; font-family: 'JetBrains Mono', monospace; color: #fff7ed; box-sizing: border-box; overflow: hidden; } .gl-sk-cell { transform: skewY(-6deg); background: linear-gradient(135deg, #ea580c, #c2410c); border: 2px solid #1a0a05; border-radius: 6px; display: flex; align-items: center; justify-content: center; min-height: 140px; } .gl-sk-cell > div { transform: skewY(6deg); text-align: center; display: flex; flex-direction: column; gap: 6px; } .gl-sk-cell strong { font-size: 36px; font-weight: 800; color: #1a0a05; } .gl-sk-cell em { font-size: 10px; color: rgba(26,10,5,0.7); font-style: normal; } .gl-sk-1 { background: linear-gradient(135deg, #ea580c, #f97316); } .gl-sk-2 { background: linear-gradient(135deg, #f97316, #fb923c); } .gl-sk-3 { background: linear-gradient(135deg, #c2410c, #ea580c); } .gl-sk-4 { background: linear-gradient(135deg, #fb923c, #fed7aa); } .gl-sk-4 strong { color: #1a0a05; } .gl-sk-5 { background: linear-gradient(135deg, #9a3412, #c2410c); } .gl-sk-5 strong, .gl-sk-5 em { color: #fff7ed; } .gl-sk-6 { background: linear-gradient(135deg, #ea580c, #c2410c); } @media (max-width: 720px) { .gl-sk { grid-template-columns: 1fr 1fr; grid-template-rows: repeat(3, 1fr); } } ``` ### 16. Asymmetric Splash **Type:** Pure CSS **Description:** Asymmetric magazine splash — one massive hero block, one tall column, three small thumbnails. Built with explicit `grid-row` / `grid-column` spans so every region has its coordinates visible. **HTML:** ```html
    Hero1 / 1 / 3 / 4
    Tall1 / 4 / 4 / 5
    Thumb 13 / 1 / 4 / 2
    Thumb 23 / 2 / 4 / 3
    Thumb 33 / 3 / 4 / 4
    ``` **CSS:** ```css .gl-as { display: grid; grid-template-columns: repeat(4, 1fr); grid-template-rows: repeat(3, 1fr); gap: 12px; width: 100%; min-height: 480px; padding: 22px; background: radial-gradient(60% 80% at 80% 0%, rgba(236,72,153,0.16), transparent 60%), #1a0617; font-family: 'Inter', system-ui, sans-serif; color: #fce7f3; box-sizing: border-box; } .gl-as > div { border-radius: 14px; padding: 16px; display: flex; flex-direction: column; justify-content: space-between; gap: 6px; } .gl-as > div strong { font-size: 16px; font-weight: 700; color: #fff; } .gl-as-coord { font-family: 'JetBrains Mono', monospace; font-size: 10.5px; letter-spacing: 0.04em; align-self: flex-start; padding: 3px 8px; border-radius: 999px; } .gl-as-hero { grid-area: 1 / 1 / 3 / 4; background: linear-gradient(135deg, #ec4899, #be185d); } .gl-as-hero .gl-as-coord { background: rgba(26,6,23,0.3); color: #fce7f3; } .gl-as-tall { grid-area: 1 / 4 / 4 / 5; background: linear-gradient(180deg, #be185d, #831843); } .gl-as-tall .gl-as-coord { background: rgba(26,6,23,0.3); color: #fce7f3; } .gl-as-t1 { grid-area: 3 / 1 / 4 / 2; background: rgba(236,72,153,0.14); border: 1px solid rgba(236,72,153,0.32); } .gl-as-t1 .gl-as-coord, .gl-as-t2 .gl-as-coord, .gl-as-t3 .gl-as-coord { background: rgba(236,72,153,0.18); color: #f472b6; } .gl-as-t2 { grid-area: 3 / 2 / 4 / 3; background: rgba(236,72,153,0.22); border: 1px solid rgba(236,72,153,0.4); } .gl-as-t3 { grid-area: 3 / 3 / 4 / 4; background: rgba(236,72,153,0.32); border: 1px solid rgba(236,72,153,0.5); } @media (max-width: 720px) { .gl-as { grid-template-columns: 1fr 1fr; grid-template-rows: auto auto auto; } .gl-as-hero { grid-area: 1 / 1 / 2 / 3; min-height: 160px; } .gl-as-tall { grid-area: 2 / 1 / 3 / 3; min-height: 120px; } .gl-as-t1 { grid-area: 3 / 1 / 4 / 2; } .gl-as-t2 { grid-area: 3 / 2 / 4 / 3; } .gl-as-t3 { display: none; } } ``` ### 17. Mosaic Photo Wall **Type:** Pure CSS **Description:** Mosaic of mixed-size cells — a 4×4 base with hero / wide / tall / square shapes spanning multiple tracks. The "feature wall" pattern from photography sites and gallery landings. **HTML:** ```html
    Herospan 2 × 2
    Widespan 2 × 1
    Tallspan 1 × 2
    11 × 1
    21 × 1
    Bannerspan 4 × 1
    ``` **CSS:** ```css .gl-ms { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 100px; gap: 12px; width: 100%; min-height: 480px; padding: 22px; background: #1a0e0a; font-family: 'Inter', system-ui, sans-serif; color: #fff; box-sizing: border-box; align-content: start; } .gl-ms > div { border-radius: 14px; padding: 16px; display: flex; flex-direction: column; justify-content: space-between; gap: 6px; } .gl-ms > div strong { font-size: 16px; font-weight: 700; } .gl-ms-coord { font-family: 'JetBrains Mono', monospace; font-size: 10px; letter-spacing: 0.04em; align-self: flex-start; padding: 2px 8px; border-radius: 999px; background: rgba(0,0,0,0.25); color: #fff; } .gl-ms-1 { grid-column: span 2; grid-row: span 2; background: linear-gradient(135deg, #f97316, #dc2626); } .gl-ms-2 { grid-column: span 2; background: linear-gradient(135deg, #fbbf24, #f97316); } .gl-ms-3 { grid-row: span 2; background: linear-gradient(180deg, #ec4899, #be185d); } .gl-ms-4 { background: linear-gradient(135deg, #f43f5e, #ec4899); } .gl-ms-5 { background: linear-gradient(135deg, #d946ef, #a21caf); } .gl-ms-6 { grid-column: span 4; background: linear-gradient(90deg, #c026d3, #ec4899, #f97316); } ``` ### 18. Dense Packing **Type:** Pure CSS **Description:** Dense packing with `grid-auto-flow: dense` — items fill earlier holes when later items are smaller, reducing whitespace. The "Tetris" mode of CSS Grid. **HTML:** ```html
    1span 2
    2span 1
    3span 3
    4span 1
    5span 2
    6span 1
    7span 1
    8span 2
    9span 1
    ``` **CSS:** ```css .gl-de { display: grid; grid-template-columns: repeat(6, 1fr); grid-auto-flow: dense; grid-auto-rows: 90px; gap: 10px; width: 100%; min-height: 480px; padding: 22px; background: radial-gradient(60% 80% at 50% 0%, rgba(132,204,22,0.14), transparent 60%), #0a1408; font-family: 'Inter', system-ui, sans-serif; color: #ecfccb; box-sizing: border-box; align-content: start; } .gl-de > div { background: linear-gradient(160deg, rgba(132,204,22,0.18), rgba(101,163,13,0.06)); border: 1px solid rgba(132,204,22,0.32); border-radius: 10px; padding: 12px; display: flex; flex-direction: column; justify-content: space-between; gap: 4px; } .gl-de > div strong { font-size: 22px; font-weight: 800; color: #fff; letter-spacing: -0.02em; } .gl-de > div em { font-style: normal; font-family: 'JetBrains Mono', monospace; font-size: 10px; color: #84cc16; letter-spacing: 0.04em; } .gl-de-c1 { grid-column: span 2; } .gl-de-c3 { grid-column: span 3; background: linear-gradient(135deg, #84cc16, #65a30d) !important; border: 0 !important; } .gl-de-c3 em { color: rgba(255,255,255,0.7); } .gl-de-c5 { grid-column: span 2; } .gl-de-c8 { grid-column: span 2; background: linear-gradient(135deg, #a3e635, #84cc16) !important; border: 0 !important; color: #0a1408; } .gl-de-c8 strong { color: #0a1408; } .gl-de-c8 em { color: rgba(10,20,8,0.7); } @media (max-width: 720px) { .gl-de { grid-template-columns: repeat(3, 1fr); } .gl-de-c3 { grid-column: span 3; } .gl-de-c1, .gl-de-c5, .gl-de-c8 { grid-column: span 2; } } ``` ### 19. Numbered Steps Track **Type:** Pure CSS **Description:** Horizontal stepper track — five circular nodes connected by a thin progress rail using grid columns and a `::before` pseudo-element. The onboarding / checkout step indicator. **HTML:** ```html
    1. 1Sign upstep 1 / 5
    2. 2Verify emailstep 2 / 5
    3. 3Pick planstep 3 / 5
    4. 4Add billingstep 4 / 5
    5. 5Donestep 5 / 5
    ``` **CSS:** ```css .gl-st { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; width: 100%; min-height: 480px; padding: 22px; background: radial-gradient(60% 60% at 50% 50%, rgba(163,148,77,0.14), transparent 60%), #1a1608; font-family: 'Inter', system-ui, sans-serif; color: #fef9c3; box-sizing: border-box; align-content: center; list-style: none; margin: 0; position: relative; } .gl-st-step { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 8px; text-align: center; padding: 14px 8px; z-index: 1; } .gl-st-step::before { content: ''; position: absolute; top: 38px; left: 0; right: 0; height: 4px; background: rgba(163,148,77,0.2); z-index: 0; } .gl-st-step:first-child::before { left: 50%; } .gl-st-step:last-child::before { right: 50%; } .gl-st-num { position: relative; width: 48px; height: 48px; border-radius: 50%; background: #2a2410; border: 2px solid rgba(163,148,77,0.3); display: flex; align-items: center; justify-content: center; font-family: 'JetBrains Mono', monospace; font-weight: 700; font-size: 16px; color: #a3944d; z-index: 2; } .gl-st-done .gl-st-num { background: linear-gradient(135deg, #a3944d, #ca8a04); border-color: #ca8a04; color: #1a1608; } .gl-st-done::before { background: linear-gradient(90deg, #a3944d, #ca8a04); } .gl-st-active .gl-st-num { background: linear-gradient(135deg, #facc15, #eab308); border-color: #facc15; color: #1a1608; box-shadow: 0 0 0 6px rgba(250,204,21,0.18); } .gl-st-step strong { font-size: 13px; font-weight: 700; color: #fef9c3; } .gl-st-active strong, .gl-st-done strong { color: #facc15; } .gl-st-step em { font-style: normal; font-family: 'JetBrains Mono', monospace; font-size: 10px; color: #a3944d; letter-spacing: 0.04em; } @media (max-width: 720px) { .gl-st { grid-template-columns: 1fr; gap: 14px; } .gl-st-step::before { display: none; } } ``` ### 20. Mac App Sidebar **Type:** Pure CSS **Description:** Two-pane macOS-style app — narrow source list on the left, content pane on the right. The classic Finder / Mail layout, built with two grid columns and named areas. **HTML:** ```html
    Toolbargrid-area: tb
    Content pane grid-area: main

    The right-hand pane scrolls independently. The sidebar source list stays sticky.

    ``` **CSS:** ```css .gl-mac { display: grid; grid-template-columns: 220px 1fr; grid-template-rows: 48px 1fr; grid-template-areas: "tb tb" "side main"; gap: 0; width: 100%; min-height: 480px; background: #1c1c1e; font-family: -apple-system, 'SF Pro Text', 'Inter', system-ui, sans-serif; color: #f5f5f7; border: 1px solid #2a2a2e; border-radius: 12px; overflow: hidden; box-sizing: border-box; } .gl-mac-tb { grid-area: tb; background: linear-gradient(180deg, #2a2a2e, #1c1c1e); border-bottom: 1px solid #0a0a0a; padding: 0 16px; display: flex; align-items: center; justify-content: space-between; gap: 8px; } .gl-mac-tb strong { font-size: 13px; font-weight: 600; color: #f5f5f7; } .gl-mac-coord { font-family: 'SF Mono', 'JetBrains Mono', monospace; font-size: 10.5px; letter-spacing: 0.04em; color: #007aff; background: rgba(0,122,255,0.12); padding: 2px 8px; border-radius: 999px; } .gl-mac-side { grid-area: side; background: #18181b; border-right: 1px solid #2a2a2e; padding: 14px; display: flex; flex-direction: column; gap: 8px; } .gl-mac-side strong { font-size: 11px; font-weight: 600; color: #98989d; letter-spacing: 0.06em; text-transform: uppercase; } .gl-mac-side .gl-mac-coord { align-self: flex-start; } .gl-mac-side ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 2px; } .gl-mac-side li { padding: 6px 10px; border-radius: 6px; font-size: 13px; color: #f5f5f7; cursor: default; } .gl-mac-side li:nth-child(2) { background: linear-gradient(90deg, #007aff, #0a84ff); } .gl-mac-main { grid-area: main; background: #1c1c1e; padding: 18px; display: flex; flex-direction: column; gap: 8px; } .gl-mac-main strong { font-size: 15px; font-weight: 700; color: #f5f5f7; } .gl-mac-main p { margin: 0; font-size: 13px; color: #98989d; line-height: 1.55; max-width: 480px; } .gl-mac-main .gl-mac-coord { align-self: flex-start; } @media (max-width: 720px) { .gl-mac { grid-template-columns: 1fr; grid-template-rows: 48px auto 1fr; grid-template-areas: "tb" "side" "main"; } .gl-mac-side { border-right: 0; border-bottom: 1px solid #2a2a2e; } } ``` ### 21. Scroll-Snap Slider **Type:** Pure CSS **Description:** Horizontal slider with `scroll-snap-type: x mandatory` so each pane locks into place after a swipe. Pure CSS, native scroll, no JS — the gallery / carousel pattern done right. **HTML:** ```html
    Slide 01scroll-snap-align: start
    Slide 02scroll-snap-align: start
    Slide 03scroll-snap-align: start
    Slide 04scroll-snap-align: start
    Slide 05scroll-snap-align: start

    ← swipe / scroll horizontally →

    ``` **CSS:** ```css .gl-ss { display: flex; flex-direction: column; gap: 14px; width: 100%; min-height: 480px; padding: 22px; background: radial-gradient(80% 60% at 50% 100%, rgba(251,146,60,0.16), transparent 60%), #1a0e06; font-family: 'Inter', system-ui, sans-serif; color: #fff7ed; box-sizing: border-box; justify-content: center; } .gl-ss-track { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(70%, 1fr); gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; padding-bottom: 14px; } .gl-ss-pane { scroll-snap-align: start; border-radius: 16px; padding: 24px 22px; min-height: 280px; display: flex; flex-direction: column; justify-content: space-between; gap: 10px; } .gl-ss-pane strong { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; color: #fff; } .gl-ss-coord { font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: 0.04em; color: #1a0e06; background: rgba(255,247,237,0.85); padding: 4px 10px; border-radius: 999px; align-self: flex-start; } .gl-ss-1 { background: linear-gradient(135deg, #fb923c, #f97316); } .gl-ss-2 { background: linear-gradient(135deg, #f97316, #ea580c); } .gl-ss-3 { background: linear-gradient(135deg, #ea580c, #c2410c); } .gl-ss-4 { background: linear-gradient(135deg, #fbbf24, #fb923c); } .gl-ss-5 { background: linear-gradient(135deg, #c2410c, #9a3412); } .gl-ss-hint { margin: 0; text-align: center; font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: 0.1em; color: #fb923c; } .gl-ss-track::-webkit-scrollbar { height: 6px; } .gl-ss-track::-webkit-scrollbar-track { background: rgba(251,146,60,0.1); border-radius: 999px; } .gl-ss-track::-webkit-scrollbar-thumb { background: rgba(251,146,60,0.4); border-radius: 999px; } ``` ### 22. Aurora Map **Type:** Pure CSS **Description:** A landing-page region map where each block is sized by its importance and tinted with an aurora gradient. Combines `grid-template-areas` with conic and radial backgrounds for a dreamy, layered surface. **HTML:** ```html
    Herogrid-area: hero
    Featuregrid-area: feat
    Statgrid-area: stat
    Sidebargrid-area: side
    CTAgrid-area: cta
    ``` **CSS:** ```css .gl-au { position: relative; display: grid; grid-template-columns: 2fr 1fr 1fr; grid-template-rows: 200px 1fr 80px; grid-template-areas: "hero hero side" "feat stat side" "cta cta cta"; gap: 14px; width: 100%; min-height: 480px; padding: 18px; background: radial-gradient(circle at 10% 0%, #0ea5e9 0%, transparent 45%), radial-gradient(circle at 95% 25%, #a855f7 0%, transparent 50%), radial-gradient(circle at 50% 110%, #06b6d4 0%, transparent 50%), radial-gradient(circle at 75% 90%, #ec4899 0%, transparent 45%), #050a1a; font-family: 'Inter', system-ui, sans-serif; color: #fff; box-sizing: border-box; overflow: hidden; contain: layout paint; } .gl-au-blobs { position: absolute; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; } .gl-au-blobs span { position: absolute; border-radius: 50%; filter: blur(50px); animation: gl-au-drift 22s ease-in-out infinite alternate; } .gl-au-blobs span:nth-child(1) { top: 10%; left: 15%; width: 320px; height: 320px; background: radial-gradient(circle, #38bdf8 0%, transparent 70%); opacity: 0.7; } .gl-au-blobs span:nth-child(2) { top: 30%; right: 15%; width: 320px; height: 320px; background: radial-gradient(circle, #c084fc 0%, transparent 70%); animation-delay: -6s; opacity: 0.7; } .gl-au-blobs span:nth-child(3) { bottom: 5%; left: 40%; width: 360px; height: 360px; background: radial-gradient(circle, #22d3ee 0%, transparent 70%); animation-delay: -12s; opacity: 0.7; } @keyframes gl-au-drift { 0% { transform: translate(0,0) scale(1); } 50% { transform: translate(40px,-30px) scale(1.08); } 100% { transform: translate(-40px,40px) scale(0.94); } } .gl-au > div { position: relative; z-index: 1; background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.25); border-radius: 14px; padding: 16px; display: flex; flex-direction: column; justify-content: space-between; gap: 6px; backdrop-filter: blur(20px) saturate(180%); -webkit-backdrop-filter: blur(20px) saturate(180%); box-shadow: 0 1px 0 rgba(255,255,255,0.08) inset; } .gl-au > div strong { font-size: 16px; font-weight: 700; color: #fff; } .gl-au-coord { font-family: 'JetBrains Mono', monospace; font-size: 10px; letter-spacing: 0.04em; align-self: flex-start; padding: 3px 8px; border-radius: 999px; background: rgba(56,189,248,0.18); color: #93c5fd; } .gl-au-hero { grid-area: hero; background: linear-gradient(135deg, rgba(56,189,248,0.32), rgba(129,140,248,0.18)); } .gl-au-feat { grid-area: feat; } .gl-au-stat { grid-area: stat; background: linear-gradient(160deg, rgba(34,211,238,0.28), rgba(34,211,238,0.06)); } .gl-au-side { grid-area: side; background: linear-gradient(180deg, rgba(129,140,248,0.28), rgba(129,140,248,0.06)); } .gl-au-cta { grid-area: cta; background: linear-gradient(90deg, #38bdf8, #818cf8); } .gl-au-cta strong { color: #050a1a; } .gl-au-cta .gl-au-coord { background: rgba(5,10,26,0.25); color: #050a1a; } @media (max-width: 720px) { .gl-au { grid-template-columns: 1fr; grid-template-rows: auto auto auto auto auto; grid-template-areas: "hero" "feat" "stat" "side" "cta"; } } @media (prefers-reduced-motion: reduce) { .gl-au-blobs span { animation: none; } } ``` ### 23. Logo Wall **Type:** Pure CSS **Description:** A trusted-by logo wall — even-spaced grid of monochrome logos using `repeat(auto-fit, minmax(120px, 1fr))`. Hover lifts a single tile to its colour version. **HTML:** ```html
    Trusted by 14,000+ teams repeat(auto-fit, minmax(140px, 1fr))
    ◇ NORTHWIND
    ▲ APEX.IO
    ★ PULSE
    ⬣ HEXLAB
    ◯ ORBITA
    ◤ FLINT
    ⬢ MERIDIAN
    ◇ NIMBUS
    ▼ DRIFT
    ◎ ATLAS
    ``` **CSS:** ```css .gl-lw { display: flex; flex-direction: column; gap: 16px; width: 100%; min-height: 480px; padding: 22px; background: radial-gradient(60% 80% at 50% 0%, rgba(148,163,184,0.12), transparent 60%), #0c1220; font-family: 'Inter', system-ui, sans-serif; color: #e2e8f0; box-sizing: border-box; justify-content: center; } .gl-lw-head { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; margin-bottom: 8px; } .gl-lw-head strong { font-size: 16px; font-weight: 700; color: #fff; } .gl-lw-coord { font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: 0.04em; padding: 4px 10px; border-radius: 999px; background: rgba(148,163,184,0.14); color: #94a3b8; } .gl-lw-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; } .gl-lw-cell { background: rgba(148,163,184,0.06); border: 1px solid rgba(148,163,184,0.18); border-radius: 10px; padding: 22px 14px; text-align: center; font-family: 'JetBrains Mono', monospace; font-size: 13px; font-weight: 700; letter-spacing: 0.12em; color: #94a3b8; transition: color 0.18s, background 0.18s, border-color 0.18s; } .gl-lw-cell:hover { color: #38bdf8; border-color: #38bdf8; background: rgba(56,189,248,0.08); } @media (prefers-reduced-motion: reduce) { .gl-lw-cell { transition: none; } } ``` ### 24. Periodic Table **Type:** Pure CSS **Description:** A small periodic-table-style grid where elements are placed by explicit `grid-column` + `grid-row` coordinates and colored by category — the most explicit-coordinates demo in the set. **HTML:** ```html
    H1 / 1
    He8 / 1
    Li1 / 2
    Be2 / 2
    C5 / 2
    N6 / 2
    O7 / 2
    Ne8 / 2
    Na1 / 3
    Mg2 / 3
    Al3 / 3
    Si4 / 3
    P5 / 3
    S6 / 3
    Cl7 / 3
    Ar8 / 3
    ``` **CSS:** ```css .gl-pt { display: grid; grid-template-columns: repeat(8, 1fr); grid-template-rows: repeat(3, 1fr); gap: 8px; width: 100%; min-height: 480px; padding: 22px; background: #0a0a14; font-family: 'Inter', system-ui, sans-serif; color: #fff; box-sizing: border-box; } .gl-pt-cell { border-radius: 8px; padding: 10px 6px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; text-align: center; text-shadow: 0 1px 2px rgba(0,0,0,0.3); min-height: 64px; } .gl-pt-cell strong { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; } .gl-pt-cell em { font-style: normal; font-family: 'JetBrains Mono', monospace; font-size: 9.5px; opacity: 0.7; letter-spacing: 0.04em; } .gl-pt-alkmet { background: linear-gradient(135deg, #f87171, #ef4444); } .gl-pt-alkear { background: linear-gradient(135deg, #fbbf24, #f59e0b); color: #1a1a14; } .gl-pt-met { background: linear-gradient(135deg, #94a3b8, #64748b); } .gl-pt-mtl { background: linear-gradient(135deg, #34d399, #10b981); } .gl-pt-non { background: linear-gradient(135deg, #38bdf8, #0ea5e9); } .gl-pt-hal { background: linear-gradient(135deg, #c084fc, #a855f7); } .gl-pt-noble { background: linear-gradient(135deg, #f472b6, #ec4899); } @media (max-width: 720px) { .gl-pt { grid-template-columns: repeat(4, 1fr); grid-template-rows: repeat(6, 1fr); } .gl-pt-cell strong { font-size: 18px; } } ``` --- ## 20 CSS Hamburger Menus URL: https://codefronts.com/navigation/css-hamburger-menus/ Description: 20 hand-coded CSS hamburger menus with live demos — pure-CSS checkbox-hack toggle (no JavaScript), morphing icon animations, full-screen overlay, slide-out sidebar with push-canvas, responsive navbar, floating FAB radial menu, Tailwind CDN build, Bootstrap 5 navbar, WCAG-accessible aria pattern, grid-template-rows accordion, blur overlay, mobile bottom nav, multi-level nested dropdown, flexbox right-aligned, circular ripple expand, sticky shrinking header, neumorphic toggle, brutalist border, and a 3D rotating canvas push. 16 with a small vanilla JS snippet, 4 truly pure CSS. prefers-reduced-motion respected, scoped class names, WCAG 2.2 aria-expanded + aria-controls patterns demonstrated, MIT-licensed. Demo count: 20 ### 01. Pure CSS Hamburger Menu (No JavaScript) **Type:** Pure CSS **Description:** Zero-JS checkbox state machine driving a circular clip-path reveal. Bricolage Grotesque display type over an ambient gradient grid with grain overlay, staggered link reveals, and a bars→X morph — all powered by CSS sibling selectors. **HTML:** ```html

    ZERO
    JAVASCRIPT

    Checkbox state machine · CSS sibling logic

    PURE_CSS // 2030
    ``` **CSS:** ```css @import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,300..800&family=Space+Mono:wght@400;700&display=swap'); .chm-01, .chm-01 *, .chm-01 *::before, .chm-01 *::after { box-sizing: border-box; margin: 0; padding: 0; } .chm-01 { --ink:#0a0a0f; --paper:#f4f1ea; --accent:#ff3d2e; --accent2:#00e0c6; --glass:rgba(244,241,234,0.04); min-height: 460px;display:grid;place-items:stretch; font-family:'Bricolage Grotesque',sans-serif; background:var(--ink); color:var(--paper); position:relative; } .chm-01__scene{position:relative;width:100%;min-height:460px;height:100%;overflow:hidden} .chm-01__field{position:absolute;inset:0;z-index:0; background: radial-gradient(circle at 18% 22%, rgba(255,61,46,0.18), transparent 42%), radial-gradient(circle at 82% 78%, rgba(0,224,198,0.16), transparent 45%), var(--ink); } .chm-01__grid{position:absolute;inset:0;z-index:0;opacity:.5; background-image: linear-gradient(rgba(244,241,234,0.04) 1px,transparent 1px), linear-gradient(90deg,rgba(244,241,234,0.04) 1px,transparent 1px); background-size:54px 54px; -webkit-mask-image:radial-gradient(circle at 50% 50%,black,transparent 80%); mask-image:radial-gradient(circle at 50% 50%,black,transparent 80%); } .chm-01__grain{position:absolute;inset:0;z-index:1;pointer-events:none;opacity:.06;mix-blend-mode:overlay; background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");} .chm-01__stage{position:relative;z-index:2;min-height:460px;display:grid;place-items:center} .chm-01__toggle{position:absolute;opacity:0;pointer-events:none} .chm-01__trigger{ position:absolute;top:24px;right:24px;z-index:40; width:64px;height:64px;border-radius:50%; display:grid;place-items:center;cursor:pointer; background:var(--glass); border:1px solid rgba(244,241,234,0.12); backdrop-filter:blur(14px); transition:transform .5s cubic-bezier(.16,1,.3,1),border-color .4s; } .chm-01__trigger:hover{transform:scale(1.06);border-color:var(--accent)} .chm-01__bars{width:26px;height:16px;position:relative;display:block} .chm-01__bars span{position:absolute;left:0;height:2px;width:100%;background:var(--paper);border-radius:2px; transition:transform .5s cubic-bezier(.7,0,.2,1),width .5s,opacity .35s,background .4s} .chm-01__bars span:nth-child(1){top:0} .chm-01__bars span:nth-child(2){top:7px;width:70%} .chm-01__bars span:nth-child(3){top:14px} .chm-01__toggle:checked ~ .chm-01__trigger .chm-01__bars span:nth-child(1){transform:translateY(7px) rotate(45deg);background:var(--accent)} .chm-01__toggle:checked ~ .chm-01__trigger .chm-01__bars span:nth-child(2){opacity:0;width:0} .chm-01__toggle:checked ~ .chm-01__trigger .chm-01__bars span:nth-child(3){transform:translateY(-7px) rotate(-45deg);background:var(--accent)} .chm-01__toggle:checked ~ .chm-01__trigger{border-color:var(--accent)} .chm-01__panel{ position:absolute;inset:0;z-index:30; display:flex;flex-direction:column;justify-content:center; padding:0 9%; background:rgba(10,10,15,0.82); backdrop-filter:blur(26px) saturate(140%); -webkit-clip-path:circle(0% at calc(100% - 56px) 56px); clip-path:circle(0% at calc(100% - 56px) 56px); transition:clip-path .8s cubic-bezier(.76,0,.24,1),-webkit-clip-path .8s cubic-bezier(.76,0,.24,1); pointer-events:none; } .chm-01__toggle:checked ~ .chm-01__panel{ -webkit-clip-path:circle(160% at calc(100% - 56px) 56px); clip-path:circle(160% at calc(100% - 56px) 56px); pointer-events:auto; } .chm-01__eyebrow{font-family:'Space Mono',monospace;font-size:11px;letter-spacing:.5em;text-transform:uppercase;color:var(--accent2);margin-bottom:24px;opacity:0;transition:opacity .4s} .chm-01__toggle:checked ~ .chm-01__panel .chm-01__eyebrow{opacity:1;transition-delay:.45s} .chm-01__menu{list-style:none} .chm-01__menu li{overflow:hidden} .chm-01__menu a{ font-size:clamp(1.4rem,4.5vw,2.8rem);font-weight:300;line-height:1.05; color:var(--paper);text-decoration:none;display:inline-block; transform:translateY(120%);transition:transform .7s cubic-bezier(.16,1,.3,1),color .3s; } .chm-01__menu a .chm-01__idx{font-family:'Space Mono',monospace;font-size:.7rem;vertical-align:super;color:var(--accent);margin-right:.6em;font-weight:700} .chm-01__menu a:hover{color:var(--accent)} .chm-01__toggle:checked ~ .chm-01__panel .chm-01__menu li:nth-child(1) a{transform:translateY(0);transition-delay:.42s} .chm-01__toggle:checked ~ .chm-01__panel .chm-01__menu li:nth-child(2) a{transform:translateY(0);transition-delay:.50s} .chm-01__toggle:checked ~ .chm-01__panel .chm-01__menu li:nth-child(3) a{transform:translateY(0);transition-delay:.58s} .chm-01__toggle:checked ~ .chm-01__panel .chm-01__menu li:nth-child(4) a{transform:translateY(0);transition-delay:.66s} .chm-01__toggle:checked ~ .chm-01__panel .chm-01__menu li:nth-child(5) a{transform:translateY(0);transition-delay:.74s} .chm-01__foot{margin-top:30px;font-family:'Space Mono',monospace;font-size:11px;color:rgba(244,241,234,0.5);display:flex;gap:18px;flex-wrap:wrap;opacity:0;transition:opacity .4s} .chm-01__toggle:checked ~ .chm-01__panel .chm-01__foot{opacity:1;transition-delay:.85s} .chm-01__foot a{color:inherit;text-decoration:none} .chm-01__foot a:hover{color:var(--accent2)} .chm-01__hero{text-align:center;padding:0 24px} .chm-01__hero h1{font-size:clamp(2.2rem,8vw,5rem);font-weight:800;letter-spacing:-.04em;line-height:.9} .chm-01__hero h1 em{font-style:normal;color:var(--accent);font-weight:300} .chm-01__hero p{font-family:'Space Mono',monospace;margin-top:18px;letter-spacing:.3em;text-transform:uppercase;font-size:10px;color:rgba(244,241,234,0.55)} .chm-01__zero{font-family:'Space Mono',monospace;position:absolute;bottom:18px;left:24px;z-index:5;font-size:10px;letter-spacing:.3em;color:rgba(244,241,234,0.4)} @media (prefers-reduced-motion: reduce){ .chm-01__trigger,.chm-01__bars span,.chm-01__panel,.chm-01__eyebrow,.chm-01__menu a,.chm-01__foot{transition:none !important} } ``` ### 02. Hamburger Menu with Morphing Icon Animations **Type:** CSS + JS **Description:** An icon gallery showcasing three distinct morph personalities (bars→X, fold, pinch) with different spring/easing curves. Animated aurora backdrop, glassmorphic triggers, and a sliding drawer — tap any icon to feel its unique transition. **HTML:** ```html
    BARS → X
    FOLD
    PINCH

    MORPH
    STATE

    Tap any icon · three easing personalities

    ANIMATED_ICONS // 2030
    ``` **CSS:** ```css @import url('https://fonts.googleapis.com/css2?family=Syne:wght@400..800&family=JetBrains+Mono:wght@400;600&display=swap'); .chm-02, .chm-02 *, .chm-02 *::before, .chm-02 *::after { box-sizing: border-box; margin: 0; padding: 0; } .chm-02{ --bg:#070b14;--bg2:#0d1424;--foam:#e8f4ff;--plasma:#7afcff;--magenta:#ff4ecd;--gold:#ffd166; min-height:460px;display:grid;place-items:stretch; font-family:'Syne',sans-serif;background:var(--bg);color:var(--foam); position:relative; } .chm-02__scene{position:relative;width:100%;min-height:460px;height:100%;overflow:hidden} .chm-02__aurora{position:absolute;inset:-20%;z-index:0;filter:blur(70px);opacity:.55; background: radial-gradient(40% 40% at 25% 30%,var(--plasma),transparent 70%), radial-gradient(45% 45% at 75% 65%,var(--magenta),transparent 70%), radial-gradient(35% 35% at 55% 20%,var(--gold),transparent 70%); animation:chm-02-drift 16s ease-in-out infinite alternate;} @keyframes chm-02-drift{to{transform:translate(4%,-4%) scale(1.12) rotate(8deg)}} .chm-02__veil{position:absolute;inset:0;z-index:1;background:linear-gradient(180deg,rgba(7,11,20,.4),rgba(7,11,20,.85))} .chm-02__stage{position:relative;z-index:2;min-height:460px;display:grid;place-items:center;text-align:center;padding:24px} .chm-02__hero h1{font-size:clamp(2rem,7vw,5rem);font-weight:800;letter-spacing:-.03em;line-height:.92; background:linear-gradient(120deg,var(--foam),var(--plasma) 60%,var(--magenta));-webkit-background-clip:text;background-clip:text;color:transparent} .chm-02__hero p{font-family:'JetBrains Mono',monospace;margin-top:18px;font-size:11px;letter-spacing:.35em;text-transform:uppercase;color:rgba(232,244,255,.55)} .chm-02__dock{position:absolute;top:24px;right:24px;z-index:50;display:flex;gap:10px} .chm-02__morph{ width:54px;height:54px;border-radius:16px;cursor:pointer; background:rgba(232,244,255,0.05); border:1px solid rgba(232,244,255,0.12); backdrop-filter:blur(12px); display:grid;place-items:center;position:relative; transition:transform .4s cubic-bezier(.34,1.56,.64,1),border-color .3s,background .3s; } .chm-02__morph:hover{transform:translateY(-3px);border-color:var(--plasma)} .chm-02__morph.is-active{border-color:var(--magenta);background:rgba(255,78,205,0.08)} .chm-02__morph svg{width:26px;height:26px;overflow:visible} .chm-02__morph line, .chm-02__morph path{stroke:var(--foam);stroke-width:2.4;stroke-linecap:round; transition:all .55s cubic-bezier(.68,-.4,.27,1.4); /* transform-box: fill-box anchors transform-origin to the SHAPE's own bounding box. Without it, transform-origin:center on an SVG resolves to the SVG viewport center (15,15) — which means lines at y=8 and y=22 rotate around (15,15) instead of their own centers, producing a scattered look instead of a clean bars→X morph. With transform-box:fill-box, each line rotates around its own center, and the translateY adjustments correctly carry it to the X-formation. */ transform-box: fill-box; transform-origin: center;} #chm-02-ma.is-active .chm-02__a1{transform:translateY(7px) rotate(45deg)} #chm-02-ma.is-active .chm-02__a2{opacity:0;transform:scaleX(0)} #chm-02-ma.is-active .chm-02__a3{transform:translateY(-7px) rotate(-45deg)} /* FOLD morph: top bar tilts down + bottom bar tilts up to meet at the middle bar, forming a "<" / arrow / fold-back shape. With transform-box:fill-box each line rotates around its own center, and the translateY moves the rotated line vertically toward y=15. */ #chm-02-mb.is-active .chm-02__b1{transform:translateY(7px) rotate(-30deg) scaleX(.7)} #chm-02-mb.is-active .chm-02__b2{transform:translateY(-7px) rotate(30deg) scaleX(.7)} #chm-02-mb.is-active .chm-02__b3{transform:scaleX(.5)} #chm-02-mc .chm-02__c1,#chm-02-mc .chm-02__c2,#chm-02-mc .chm-02__c3{stroke-dasharray:24;} #chm-02-mc.is-active .chm-02__c1{transform:rotate(45deg)} #chm-02-mc.is-active .chm-02__c3{transform:rotate(-45deg)} #chm-02-mc.is-active .chm-02__c2{opacity:0} .chm-02__tag{font-family:'JetBrains Mono',monospace;position:absolute;bottom:-18px;left:50%;transform:translateX(-50%);font-size:8px;letter-spacing:.2em;color:rgba(232,244,255,.4);white-space:nowrap} .chm-02__drawer{position:absolute;top:0;right:0;height:100%;width:min(340px,86%);z-index:40; background:linear-gradient(160deg,rgba(13,20,36,.9),rgba(7,11,20,.96)); backdrop-filter:blur(28px);border-left:1px solid rgba(122,252,255,0.18); transform:translateX(110%);transition:transform .7s cubic-bezier(.16,1,.3,1); padding:96px 32px 32px;display:flex;flex-direction:column} .chm-02__drawer.is-open{transform:translateX(0)} .chm-02__lbl{font-family:'JetBrains Mono',monospace;font-size:10px;letter-spacing:.4em;color:var(--plasma);margin-bottom:24px} .chm-02__drawer nav a{display:flex;align-items:baseline;gap:12px;font-size:1.4rem;font-weight:700;color:var(--foam);text-decoration:none;padding:12px 0;border-bottom:1px solid rgba(232,244,255,0.07);transition:color .3s,padding-left .3s;opacity:0;transform:translateX(30px)} .chm-02__drawer.is-open nav a{opacity:1;transform:translateX(0)} .chm-02__drawer nav a:nth-child(1){transition:.5s .15s} .chm-02__drawer nav a:nth-child(2){transition:.5s .22s} .chm-02__drawer nav a:nth-child(3){transition:.5s .29s} .chm-02__drawer nav a:nth-child(4){transition:.5s .36s} .chm-02__drawer nav a span{font-family:'JetBrains Mono',monospace;font-size:.7rem;color:var(--magenta)} .chm-02__drawer nav a:hover{color:var(--plasma);padding-left:8px} .chm-02__scrim{position:absolute;inset:0;z-index:35;background:rgba(7,11,20,.5);opacity:0;pointer-events:none;transition:opacity .5s;backdrop-filter:blur(2px)} .chm-02__scrim.is-show{opacity:1;pointer-events:auto} .chm-02__note{font-family:'JetBrains Mono',monospace;position:absolute;bottom:18px;left:24px;z-index:5;font-size:10px;letter-spacing:.3em;color:rgba(232,244,255,.4)} @media (prefers-reduced-motion: reduce){ .chm-02__aurora{animation:none !important} .chm-02__morph,.chm-02__morph line,.chm-02__morph path,.chm-02__drawer,.chm-02__drawer nav a,.chm-02__scrim{transition:none !important} } ``` **JS:** ```js (() => { const root = document.querySelector('.chm-02'); if (!root) return; const morphs = root.querySelectorAll('.chm-02__morph'); const drawer = root.querySelector('#chm-02-drawer'); const scrim = root.querySelector('#chm-02-scrim'); function closeAll(){ morphs.forEach(m => m.classList.remove('is-active')); drawer.classList.remove('is-open'); scrim.classList.remove('is-show'); } morphs.forEach(el => { el.addEventListener('click', () => { const wasActive = el.classList.contains('is-active'); morphs.forEach(m => m.classList.remove('is-active')); if (wasActive) { closeAll(); return; } el.classList.add('is-active'); drawer.classList.add('is-open'); scrim.classList.add('is-show'); }); }); scrim.addEventListener('click', closeAll); })(); ``` ### 03. Full-Screen Overlay Mobile Navigation **Type:** CSS + JS **Description:** Editorial agency aesthetic in warm cream/charcoal/burnt-orange. The trigger fires an inset clip-path that wipes a full-viewport overlay upward, revealing oversized Fraunces serif links with rotating staggered entrances. **HTML:** ```html
    Creative Direction · 2030

    Cover the
    whole world.

    FULLSCREEN_OVERLAY
    ``` **CSS:** ```css @import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,300..900&family=Archivo:wght@400;600;800&display=swap'); .chm-03, .chm-03 *, .chm-03 *::before, .chm-03 *::after { box-sizing: border-box; margin: 0; padding: 0; } .chm-03{ --cream:#f3ede3;--char:#16130f;--burnt:#d9501e;--olive:#5d6b3f; min-height:460px;display:grid;place-items:stretch; font-family:'Archivo',sans-serif;background:var(--cream);color:var(--char); position:relative; } .chm-03__scene{position:relative;width:100%;min-height:460px;height:100%;overflow:hidden} .chm-03__stage{position:relative;z-index:2;min-height:460px;display:flex;align-items:flex-end;padding:5%} .chm-03__hero{max-width:900px} .chm-03__kick{font-size:11px;letter-spacing:.45em;text-transform:uppercase;color:var(--burnt);font-weight:800;margin-bottom:14px} .chm-03__hero h1{font-family:'Fraunces',serif;font-weight:300;font-size:clamp(2.4rem,9vw,6rem);line-height:.86;letter-spacing:-.02em} .chm-03__hero h1 b{font-weight:900;font-style:italic} .chm-03__bgtype{position:absolute;top:-2%;left:-1%;z-index:0;font-family:'Fraunces',serif;font-weight:900;font-size:30vw;color:rgba(22,19,15,0.035);line-height:.8;pointer-events:none;user-select:none} .chm-03__burger{position:absolute;top:24px;right:28px;z-index:60;display:flex;align-items:center;gap:12px;cursor:pointer;background:none;border:none} .chm-03__word{font-weight:800;letter-spacing:.2em;font-size:11px;text-transform:uppercase;color:var(--char);transition:color .4s} .chm-03__stack{width:30px;height:13px;position:relative} .chm-03__stack i{position:absolute;left:0;width:100%;height:2.5px;background:var(--char);border-radius:3px;transition:transform .55s cubic-bezier(.7,0,.2,1),background .4s,width .4s} .chm-03__stack i:nth-child(1){top:0} .chm-03__stack i:nth-child(2){top:10px;width:60%} .chm-03.is-open .chm-03__stack i:nth-child(1){transform:translateY(5px) rotate(45deg);background:var(--cream)} .chm-03.is-open .chm-03__stack i:nth-child(2){transform:translateY(-5px) rotate(-45deg);width:100%;background:var(--cream)} .chm-03.is-open .chm-03__word{color:var(--cream)} .chm-03__overlay{position:absolute;inset:0;z-index:50;background:var(--char);display:flex;flex-direction:column;justify-content:center;padding:0 8%; -webkit-clip-path:inset(0 0 100% 0);clip-path:inset(0 0 100% 0);transition:clip-path .85s cubic-bezier(.76,0,.24,1),-webkit-clip-path .85s cubic-bezier(.76,0,.24,1);pointer-events:none} .chm-03.is-open .chm-03__overlay{-webkit-clip-path:inset(0 0 0% 0);clip-path:inset(0 0 0% 0);pointer-events:auto} .chm-03__overlay::after{content:"";position:absolute;inset:0;pointer-events:none; background:radial-gradient(60% 80% at 80% 30%,rgba(217,80,30,0.22),transparent 60%)} .chm-03__over-kick{position:relative;font-size:11px;letter-spacing:.4em;text-transform:uppercase;color:var(--burnt);font-weight:800;margin-bottom:30px;opacity:0;transition:.4s .5s} .chm-03.is-open .chm-03__over-kick{opacity:1} .chm-03__overlay nav{position:relative} .chm-03__overlay nav a{display:block;font-family:'Fraunces',serif;font-weight:300;font-size:clamp(2rem,7vw,4.6rem);line-height:1.02;color:var(--cream);text-decoration:none;transition:color .3s,transform .3s; opacity:0;transform:translateY(60px) rotate(2deg)} .chm-03__overlay nav a .chm-03__num{font-family:'Archivo',sans-serif;font-weight:800;font-size:.7rem;vertical-align:top;color:var(--olive);margin-right:14px} .chm-03.is-open .chm-03__overlay nav a{opacity:1;transform:none} .chm-03.is-open .chm-03__overlay nav a:nth-child(1){transition:.7s cubic-bezier(.16,1,.3,1) .50s} .chm-03.is-open .chm-03__overlay nav a:nth-child(2){transition:.7s cubic-bezier(.16,1,.3,1) .58s} .chm-03.is-open .chm-03__overlay nav a:nth-child(3){transition:.7s cubic-bezier(.16,1,.3,1) .66s} .chm-03.is-open .chm-03__overlay nav a:nth-child(4){transition:.7s cubic-bezier(.16,1,.3,1) .74s} .chm-03__overlay nav a:hover{color:var(--burnt);font-style:italic} .chm-03__over-foot{position:relative;margin-top:30px;display:flex;gap:24px;flex-wrap:wrap;font-size:11px;letter-spacing:.15em;color:rgba(243,237,227,.55);opacity:0;transition:.4s .85s} .chm-03.is-open .chm-03__over-foot{opacity:1} .chm-03__over-foot a{color:inherit;text-decoration:none} .chm-03__over-foot a:hover{color:var(--olive)} .chm-03__tag{position:absolute;bottom:18px;right:24px;z-index:5;font-size:10px;letter-spacing:.3em;color:rgba(22,19,15,.4);font-weight:600} @media (prefers-reduced-motion: reduce){ .chm-03__stack i,.chm-03__overlay,.chm-03__overlay nav a,.chm-03__over-foot,.chm-03__over-kick,.chm-03__word{transition:none !important} } ``` **JS:** ```js (() => { const root = document.querySelector('.chm-03'); if (!root) return; const btn = root.querySelector('.chm-03__burger'); btn.addEventListener('click', () => root.classList.toggle('is-open')); })(); ``` ### 04. Slide-out Sidebar / Off-Canvas Navigation **Type:** CSS + JS **Description:** Dashboard/web-app shell with a true "push" effect — the content canvas slides, scales, dims and rounds as a mint-on-void sidebar glides in. Includes iconography, grouped nav sections, and an active state. **HTML:** ```html
    App Shell · Off-Canvas

    Slide. Push.
    Breathe.

    The sidebar nudges the content instead of covering it.

    OFF_CANVAS // 2030
    ``` **CSS:** ```css @import url('https://fonts.googleapis.com/css2?family=Sora:wght@300;400;600;700&family=IBM+Plex+Mono:wght@400;500&display=swap'); .chm-04, .chm-04 *, .chm-04 *::before, .chm-04 *::after { box-sizing: border-box; margin: 0; padding: 0; } .chm-04{ --void:#0b0e0d;--panel:#11201c;--mint:#3ef0a8;--lime:#c6ff4a;--fog:#dfe9e5;--muted:rgba(223,233,229,.55); min-height:460px;display:grid;place-items:stretch; font-family:'Sora',sans-serif;background:var(--void);color:var(--fog); position:relative; } .chm-04__scene{position:relative;width:100%;min-height:460px;height:100%;overflow:hidden} .chm-04__shell{position:relative;min-height:460px;transition:transform .65s cubic-bezier(.16,1,.3,1),filter .65s;will-change:transform} .chm-04.is-pushed .chm-04__shell{transform:translateX(230px) scale(.94);border-radius:24px;overflow:hidden;filter:brightness(.6)} .chm-04__canvas{position:relative;min-height:460px;background: radial-gradient(circle at 80% 18%,rgba(62,240,168,.14),transparent 45%), radial-gradient(circle at 12% 88%,rgba(198,255,74,.1),transparent 45%), var(--void); display:grid;place-items:center;text-align:center;padding:24px} .chm-04__dots{position:absolute;inset:0;opacity:.4;background-image:radial-gradient(rgba(223,233,229,.12) 1px,transparent 1px);background-size:28px 28px} .chm-04__hero{position:relative;z-index:2} .chm-04__pill{display:inline-block;font-family:'IBM Plex Mono',monospace;font-size:10px;letter-spacing:.3em;text-transform:uppercase;color:var(--mint);border:1px solid rgba(62,240,168,.4);padding:6px 14px;border-radius:99px;margin-bottom:20px} .chm-04__hero h1{font-size:clamp(2rem,7vw,4.4rem);font-weight:700;letter-spacing:-.03em;line-height:.92} .chm-04__hero h1 em{font-style:normal;color:var(--lime)} .chm-04__hero p{font-family:'IBM Plex Mono',monospace;margin-top:14px;color:var(--muted);font-size:12px;letter-spacing:.1em} .chm-04__trg{position:absolute;top:22px;left:22px;z-index:60;width:52px;height:52px;border-radius:14px;cursor:pointer; display:grid;place-items:center;background:rgba(223,233,229,.06);border:1px solid rgba(223,233,229,.12);backdrop-filter:blur(10px); transition:transform .5s,border-color .4s} .chm-04__trg:hover{border-color:var(--mint)} .chm-04.is-pushed .chm-04__trg{transform:translateX(230px)} .chm-04__b{width:24px;height:14px;position:relative} .chm-04__b i{position:absolute;left:0;height:2.4px;width:100%;background:var(--fog);border-radius:3px;transition:transform .5s cubic-bezier(.7,0,.2,1),opacity .3s,background .4s} .chm-04__b i:nth-child(1){top:0}.chm-04__b i:nth-child(2){top:6px}.chm-04__b i:nth-child(3){top:12px} .chm-04.is-pushed .chm-04__b i:nth-child(1){transform:translateY(6px) rotate(45deg);background:var(--mint)} .chm-04.is-pushed .chm-04__b i:nth-child(2){opacity:0} .chm-04.is-pushed .chm-04__b i:nth-child(3){transform:translateY(-6px) rotate(-45deg);background:var(--mint)} .chm-04__sidebar{position:absolute;top:0;left:0;height:100%;width:230px;z-index:40; background:linear-gradient(170deg,var(--panel),#0a1512); border-right:1px solid rgba(62,240,168,.16); transform:translateX(-100%);transition:transform .65s cubic-bezier(.16,1,.3,1); padding:24px 18px;display:flex;flex-direction:column} .chm-04.is-pushed .chm-04__sidebar{transform:translateX(0)} .chm-04__brand{display:flex;align-items:center;gap:10px;margin-bottom:28px} .chm-04__glyph{width:30px;height:30px;border-radius:9px;background:linear-gradient(135deg,var(--mint),var(--lime));display:grid;place-items:center;color:var(--void);font-weight:700} .chm-04__brand span{font-weight:700;letter-spacing:.04em;font-size:.95rem} .chm-04__grp{font-family:'IBM Plex Mono',monospace;font-size:9px;letter-spacing:.3em;text-transform:uppercase;color:var(--muted);margin:6px 0 8px} .chm-04__sidebar a{display:flex;align-items:center;gap:12px;padding:10px 12px;border-radius:10px;color:var(--fog);text-decoration:none;font-weight:400;font-size:.88rem;transition:background .3s,color .3s,transform .3s;margin-bottom:2px} .chm-04__sidebar a svg{width:17px;height:17px;flex-shrink:0;opacity:.8} .chm-04__sidebar a:hover{background:rgba(62,240,168,.1);color:var(--mint);transform:translateX(4px)} .chm-04__sidebar a.chm-04__on{background:linear-gradient(90deg,rgba(62,240,168,.16),transparent);color:var(--mint)} .chm-04__spacer{flex:1} .chm-04__card{background:rgba(223,233,229,.04);border:1px solid rgba(223,233,229,.08);border-radius:14px;padding:12px} .chm-04__card b{display:block;font-size:.78rem;margin-bottom:4px} .chm-04__card p{font-size:.66rem;color:var(--muted);line-height:1.5;font-family:'IBM Plex Mono',monospace} .chm-04__tag{position:absolute;bottom:18px;right:24px;z-index:5;font-family:'IBM Plex Mono',monospace;font-size:10px;letter-spacing:.3em;color:rgba(223,233,229,.4)} @media (prefers-reduced-motion: reduce){ .chm-04__shell,.chm-04__sidebar,.chm-04__trg,.chm-04__b i{transition:none !important} } ``` **JS:** ```js (() => { const root = document.querySelector('.chm-04'); if (!root) return; const btn = root.querySelector('.chm-04__trg'); btn.addEventListener('click', () => root.classList.toggle('is-pushed')); })(); ``` ### 05. Responsive Navbar with Mobile-Only Hamburger Toggle **Type:** CSS + JS **Description:** Complete sticky glass header. Full link row + CTA on desktop; below the 860px media-query breakpoint links collapse into an animated slide-in sheet. Resize the window to watch it transform live. **HTML:** ```html
    Meridian
    Responsive Navigation

    One navbar,
    every screen.

    Full link row on desktop. Below 860px the links fold into a hamburger sheet — pure media-query logic, no layout shift.

    Resize the window past 860px to watch it transform
    RESPONSIVE_NAVBAR // 2030
    ``` **CSS:** ```css @import url('https://fonts.googleapis.com/css2?family=Inter+Tight:wght@400;500;600&display=swap'); .chm-05, .chm-05 *, .chm-05 *::before, .chm-05 *::after { box-sizing: border-box; margin: 0; padding: 0; } .chm-05{ --ink:#101014;--snow:#fbfaf7;--grape:#5b3df5;--coral:#ff5d73;--sun:#ffc24b;--line:rgba(16,16,20,.1); min-height:460px;display:grid;place-items:stretch; font-family:'Inter Tight',sans-serif;background:var(--snow);color:var(--ink); position:relative; } .chm-05__scene{position:relative;width:100%;min-height:460px;height:100%;overflow:hidden} .chm-05__header{position:absolute;top:0;left:0;right:0;z-index:60;display:flex;align-items:center;justify-content:space-between; padding:14px clamp(16px,4vw,40px); background:rgba(251,250,247,.7);backdrop-filter:blur(16px) saturate(140%);border-bottom:1px solid var(--line)} .chm-05__brand{display:flex;align-items:center;gap:10px;font-weight:600;font-size:1.15rem;letter-spacing:-.01em} .chm-05__mk{width:26px;height:26px;border-radius:8px;background:conic-gradient(from 120deg,var(--grape),var(--coral),var(--sun),var(--grape));} .chm-05__links{display:flex;align-items:center;gap:6px} .chm-05__links a{position:relative;text-decoration:none;color:var(--ink);font-weight:500;font-size:.88rem;padding:8px 14px;border-radius:99px;transition:background .3s,color .3s} .chm-05__links a:hover{background:rgba(91,61,245,.08);color:var(--grape)} .chm-05__links .chm-05__cta{background:var(--ink);color:var(--snow);font-weight:600} .chm-05__links .chm-05__cta:hover{background:var(--grape);color:#fff} .chm-05__burger{display:none;width:42px;height:42px;border:1px solid var(--line);border-radius:12px;background:transparent;cursor:pointer;place-items:center} .chm-05__b{width:20px;height:13px;position:relative} .chm-05__b i{position:absolute;left:0;height:2.2px;width:100%;background:var(--ink);border-radius:3px;transition:transform .45s cubic-bezier(.7,0,.2,1),opacity .3s} .chm-05__b i:nth-child(1){top:0}.chm-05__b i:nth-child(2){top:5.5px}.chm-05__b i:nth-child(3){top:11px} .chm-05.is-open .chm-05__b i:nth-child(1){transform:translateY(5.5px) rotate(45deg)} .chm-05.is-open .chm-05__b i:nth-child(2){opacity:0} .chm-05.is-open .chm-05__b i:nth-child(3){transform:translateY(-5.5px) rotate(-45deg)} .chm-05__sheet{position:absolute;top:0;right:0;height:100%;width:min(300px,80%);z-index:55; background:var(--ink);color:var(--snow);padding:80px 28px 28px; transform:translateX(110%);transition:transform .6s cubic-bezier(.16,1,.3,1);display:none;flex-direction:column} .chm-05__sheet a{font-weight:500;font-size:1.3rem;color:var(--snow);text-decoration:none;padding:12px 0;border-bottom:1px solid rgba(251,250,247,.1);transition:color .3s,padding-left .3s;opacity:0;transform:translateX(24px)} .chm-05.is-open .chm-05__sheet a{opacity:1;transform:none} .chm-05__sheet a:nth-child(1){transition:.5s .12s} .chm-05__sheet a:nth-child(2){transition:.5s .18s} .chm-05__sheet a:nth-child(3){transition:.5s .24s} .chm-05__sheet a:nth-child(4){transition:.5s .30s} .chm-05__sheet a:nth-child(5){transition:.5s .36s} .chm-05__sheet a:hover{color:var(--sun);padding-left:8px} .chm-05__badge{margin-top:auto;font-size:10px;letter-spacing:.3em;text-transform:uppercase;color:rgba(251,250,247,.5)} .chm-05__scrim{position:absolute;inset:0;z-index:50;background:rgba(16,16,20,.4);opacity:0;pointer-events:none;transition:.4s;backdrop-filter:blur(2px)} .chm-05.is-open .chm-05__sheet{transform:translateX(0)} .chm-05.is-open .chm-05__scrim{opacity:1;pointer-events:auto} .chm-05__hero{min-height:460px;display:flex;flex-direction:column;justify-content:center;padding:80px clamp(16px,4vw,40px) 40px;max-width:1100px} .chm-05__eyebrow{display:flex;align-items:center;gap:10px;font-size:11px;letter-spacing:.2em;text-transform:uppercase;color:var(--grape);font-weight:600;margin-bottom:18px} .chm-05__eyebrow::before{content:"";width:24px;height:2px;background:var(--coral)} .chm-05__hero h1{font-weight:600;font-size:clamp(2rem,6vw,4rem);line-height:.96;letter-spacing:-.02em} .chm-05__hero h1 span{background:linear-gradient(100deg,var(--grape),var(--coral));-webkit-background-clip:text;background-clip:text;color:transparent} .chm-05__hero p{margin-top:16px;max-width:480px;font-size:.95rem;line-height:1.6;color:#444} .chm-05__resize-hint{margin-top:22px;display:inline-flex;align-items:center;gap:10px;font-size:11px;color:#666;background:#fff;border:1px solid var(--line);padding:8px 14px;border-radius:99px;align-self:flex-start} .chm-05__resize-hint b{color:var(--grape)} @media(max-width:860px){ .chm-05 .chm-05__links{display:none} .chm-05 .chm-05__burger{display:grid} .chm-05 .chm-05__sheet{display:flex} } .chm-05__tag{position:absolute;bottom:18px;left:clamp(16px,4vw,40px);z-index:5;font-size:10px;letter-spacing:.3em;color:rgba(16,16,20,.4);font-weight:600} @media (prefers-reduced-motion: reduce){ .chm-05__b i,.chm-05__sheet,.chm-05__sheet a,.chm-05__scrim{transition:none !important} } ``` **JS:** ```js (() => { const root = document.querySelector('.chm-05'); if (!root) return; const btn = root.querySelector('.chm-05__burger'); const scrim = root.querySelector('.chm-05__scrim'); btn.addEventListener('click', () => root.classList.toggle('is-open')); scrim.addEventListener('click', () => root.classList.remove('is-open')); })(); ``` ### 06. Minimalist / Floating Hamburger Button **Type:** CSS + JS **Description:** A fixed corner FAB that stays accessible through a long multi-section scroll. Tapping it blooms a radial micro-menu with spring easing — no header bar, pure minimalist landing-page style. **HTML:** ```html
    Floating · Always reachable

    Scroll
    as far as you like.

    The button stays pinned to the corner — no header bar, no clutter. Tap it any time to bloom the menu.

    01
    Section Two

    Still here.

    Hundreds of pixels down the page and the control hasn't moved. Minimalism that never abandons the user.

    02
    Section Three

    Tap to bloom.

    A radial micro-menu unfurls from the button with spring easing — playful, fast, out of the way.

    03
    ↓ Scroll · button stays
    ``` **CSS:** ```css @import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=Geist:wght@300;400;500;600&display=swap'); .chm-06, .chm-06 *, .chm-06 *::before, .chm-06 *::after { box-sizing: border-box; margin: 0; padding: 0; } .chm-06{ --paper:#ece8e1;--ink:#1a1a1a;--blush:#e8826b;--sage:#8a9b6e; min-height:460px;display:grid;place-items:stretch; font-family:'Geist',sans-serif;background:var(--paper);color:var(--ink); position:relative; } .chm-06__scene{position:relative;width:100%;min-height:460px;height:100%;overflow:hidden} .chm-06__scroller{position:relative;width:100%;height:460px;overflow-y:auto;scroll-behavior:smooth} .chm-06__scroller section{min-height:460px;display:flex;flex-direction:column;justify-content:center;padding:0 clamp(20px,6vw,80px);position:relative} .chm-06__idx{font-size:11px;letter-spacing:.4em;text-transform:uppercase;color:var(--blush);font-weight:500;margin-bottom:16px} .chm-06__scroller section h2{font-family:'Instrument Serif',serif;font-weight:400;font-size:clamp(2rem,7vw,4.4rem);line-height:.98;letter-spacing:-.01em} .chm-06__scroller section h2 i{color:var(--blush)} .chm-06__scroller section p{margin-top:16px;max-width:380px;font-size:.95rem;line-height:1.6;color:#555} .chm-06__s1{background:radial-gradient(120% 100% at 70% 0%,rgba(232,130,107,.14),transparent 55%),var(--paper)} .chm-06__s2{background:var(--ink);color:var(--paper)} .chm-06__s2 h2 i{color:var(--sage)}.chm-06__s2 p{color:rgba(236,232,225,.6)}.chm-06__s2 .chm-06__idx{color:var(--sage)} .chm-06__s3{background:linear-gradient(160deg,#ddd6cb,var(--paper))} .chm-06__bigmark{position:absolute;right:-2%;bottom:-6%;font-family:'Instrument Serif',serif;font-style:italic;font-size:20vw;line-height:.7;opacity:.05;pointer-events:none;user-select:none} .chm-06__fab{position:absolute;bottom:24px;right:24px;z-index:80;width:60px;height:60px;border-radius:50%;cursor:pointer; background:var(--ink);color:var(--paper);display:grid;place-items:center; box-shadow:0 16px 40px rgba(26,26,26,.28); transition:transform .5s cubic-bezier(.34,1.56,.64,1),background .4s;border:none} .chm-06__fab:hover{transform:scale(1.08) rotate(-4deg)} .chm-06__b{width:22px;height:13px;position:relative} .chm-06__b i{position:absolute;left:0;height:2.2px;width:100%;background:var(--paper);border-radius:3px;transition:transform .5s cubic-bezier(.7,0,.2,1),opacity .3s,width .4s} .chm-06__b i:nth-child(1){top:0}.chm-06__b i:nth-child(2){top:5.5px;width:65%}.chm-06__b i:nth-child(3){top:11px} .chm-06.is-open .chm-06__fab{background:var(--blush)} .chm-06.is-open .chm-06__b i:nth-child(1){transform:translateY(5.5px) rotate(45deg)} .chm-06.is-open .chm-06__b i:nth-child(2){opacity:0;width:0} .chm-06.is-open .chm-06__b i:nth-child(3){transform:translateY(-5.5px) rotate(-45deg)} .chm-06__bloom{position:absolute;bottom:24px;right:24px;z-index:75;width:60px;height:60px;pointer-events:none} .chm-06__bloom a{position:absolute;bottom:0;right:0;width:50px;height:50px;border-radius:50%;display:grid;place-items:center;text-decoration:none; background:rgba(236,232,225,.95);backdrop-filter:blur(10px);border:1px solid rgba(26,26,26,.08); color:var(--ink);font-size:10px;font-weight:600;letter-spacing:.04em;text-align:center; box-shadow:0 8px 22px rgba(26,26,26,.16); transform:scale(.2);opacity:0;pointer-events:none; transition:transform .55s cubic-bezier(.34,1.56,.64,1),opacity .4s} .chm-06.is-open .chm-06__bloom{pointer-events:auto} .chm-06.is-open .chm-06__bloom a{opacity:1;pointer-events:auto;transform:scale(1)} .chm-06.is-open .chm-06__bloom a:nth-child(1){bottom:78px;right:5px;transition-delay:.05s} .chm-06.is-open .chm-06__bloom a:nth-child(2){bottom:66px;right:72px;transition-delay:.11s} .chm-06.is-open .chm-06__bloom a:nth-child(3){bottom:5px;right:78px;transition-delay:.17s} .chm-06.is-open .chm-06__bloom a:nth-child(4){bottom:120px;right:50px;transition-delay:.23s} .chm-06__bloom a:hover{background:var(--ink);color:var(--paper)} .chm-06__scrim{position:absolute;inset:0;z-index:70;background:rgba(26,26,26,.12);backdrop-filter:blur(3px);opacity:0;pointer-events:none;transition:.4s} .chm-06.is-open .chm-06__scrim{opacity:1;pointer-events:auto} .chm-06__scrollhint{position:absolute;top:24px;left:24px;z-index:5;font-size:10px;letter-spacing:.3em;text-transform:uppercase;color:rgba(26,26,26,.4);font-weight:500} @media (prefers-reduced-motion: reduce){ .chm-06__fab,.chm-06__b i,.chm-06__bloom a,.chm-06__scrim,.chm-06__scroller{transition:none !important;scroll-behavior:auto !important} } ``` **JS:** ```js (() => { const root = document.querySelector('.chm-06'); if (!root) return; const btn = root.querySelector('.chm-06__fab'); const scrim = root.querySelector('.chm-06__scrim'); btn.addEventListener('click', () => root.classList.toggle('is-open')); scrim.addEventListener('click', () => root.classList.remove('is-open')); })(); ``` ### 07. Tailwind CSS Hamburger Menu **Type:** CSS + JS **Description:** Utility-first build via the Tailwind CDN with a custom config (acid/sky/plum palette). Glass trigger morphs bars→X, slides in a right panel with staggered links — all flexbox, transition, and absolute-positioning utilities. **HTML:** ```html
    UTILITY CLASSES ONLY

    tailwind
    toggle

    Flexbox · transitions · absolute positioning

    TAILWIND // 2030
    ``` **CSS:** ```css .chm-07, .chm-07 *, .chm-07 *::before, .chm-07 *::after { box-sizing: border-box; } .chm-07{font-family:'Space Grotesk',sans-serif;min-height:460px;display:grid;place-items:stretch} .chm-07 .chm-07__scene{min-height:460px;height:100%} @media (prefers-reduced-motion: reduce){ .chm-07 *{transition:none !important} } ``` **JS:** ```js (() => { const root = document.querySelector('.chm-07'); if (!root) return; const btn = root.querySelector('#chm-07-btn'); const panel = root.querySelector('#chm-07-panel'); const l1 = root.querySelector('#chm-07-l1'); const l2 = root.querySelector('#chm-07-l2'); const l3 = root.querySelector('#chm-07-l3'); let o = false; btn.addEventListener('click', () => { o = !o; panel.classList.toggle('translate-x-full', !o); l1.style.transform = o ? 'translateY(8px) rotate(45deg)' : ''; l2.style.opacity = o ? '0' : '1'; l2.style.width = o ? '0' : '100%'; l3.style.transform = o ? 'translateY(-8px) rotate(-45deg)' : ''; [l1, l3].forEach(l => l.style.background = o ? '#d4ff3d' : '#fff'); btn.style.borderColor = o ? '#d4ff3d' : ''; }); })(); ``` ### 08. Bootstrap 5 Responsive Navbar with Hamburger **Type:** Pure CSS **Description:** Real Bootstrap 5 with a heavily reskinned .navbar-toggler — themed conic-gradient mark, morphing icon, glass collapse panel. Native collapse functionality intact, default look gone. **HTML:** ```html
    Bootstrap 5 · Customized

    Framework speed,
    zero default look.

    A native .navbar-toggler reskinned with a morphing icon, themed colors, and a glass collapse panel — functionality intact, defaults gone.

    BOOTSTRAP_5 // 2030
    ``` **CSS:** ```css .chm-08, .chm-08 *, .chm-08 *::before, .chm-08 *::after { box-sizing: border-box; } .chm-08{ --bsx-ink:#0e1020;--bsx-amber:#ffb454;--bsx-rose:#ff5c8a;--bsx-cyan:#36d7e3; min-height:460px;display:grid;place-items:stretch; font-family:'Sora',sans-serif;background:var(--bsx-ink);color:#f4f5fb; position:relative; } .chm-08__scene{position:relative;width:100%;min-height:460px;height:100%;overflow:hidden; background-image:radial-gradient(60% 50% at 80% 0%,rgba(255,92,138,.16),transparent 55%),radial-gradient(50% 50% at 10% 100%,rgba(54,215,227,.14),transparent 55%)} .chm-08 .chm-08__navbar{background:rgba(14,16,32,.7)!important;backdrop-filter:blur(16px);border-bottom:1px solid rgba(255,255,255,.08);position:absolute;top:0;left:0;right:0;z-index:60} .chm-08 .chm-08__brand{font-weight:800;letter-spacing:-.02em;font-size:1.25rem;display:flex;align-items:center;gap:.5rem;color:#f4f5fb} .chm-08 .chm-08__mk{width:28px;height:28px;border-radius:9px;background:conic-gradient(from 120deg,var(--bsx-amber),var(--bsx-rose),var(--bsx-cyan),var(--bsx-amber))} .chm-08 .chm-08__nav-link{color:rgba(244,245,251,.8)!important;font-weight:500;border-radius:99px;padding:.45rem 1rem!important;transition:.3s} .chm-08 .chm-08__nav-link:hover,.chm-08 .chm-08__nav-link.active{color:var(--bsx-ink)!important;background:var(--bsx-amber)} .chm-08 .chm-08__btn-glow{background:var(--bsx-rose);color:#fff;font-weight:600;border-radius:99px;padding:.45rem 1.2rem;border:none;transition:.3s;text-decoration:none;display:inline-block} .chm-08 .chm-08__btn-glow:hover{background:var(--bsx-cyan);color:var(--bsx-ink);transform:translateY(-2px)} .chm-08 .chm-08__toggler{border:1px solid rgba(255,255,255,.18)!important;border-radius:14px;padding:.5rem .6rem;box-shadow:none!important;background:transparent} .chm-08 .chm-08__tg{width:22px;height:14px;position:relative;display:block} .chm-08 .chm-08__tg i{position:absolute;left:0;height:2.2px;width:100%;background:var(--bsx-amber);border-radius:3px;transition:transform .45s cubic-bezier(.7,0,.2,1),opacity .3s} .chm-08 .chm-08__tg i:nth-child(1){top:0}.chm-08 .chm-08__tg i:nth-child(2){top:6px}.chm-08 .chm-08__tg i:nth-child(3){top:12px} .chm-08 .chm-08__toggler:not(.collapsed) .chm-08__tg i:nth-child(1){transform:translateY(6px) rotate(45deg)} .chm-08 .chm-08__toggler:not(.collapsed) .chm-08__tg i:nth-child(2){opacity:0} .chm-08 .chm-08__toggler:not(.collapsed) .chm-08__tg i:nth-child(3){transform:translateY(-6px) rotate(-45deg)} .chm-08__hero{padding:7rem 0 3rem;position:relative;z-index:1} .chm-08__hero h1{font-weight:800;font-size:clamp(2rem,6vw,3.6rem);line-height:.98;letter-spacing:-.02em} .chm-08__hero h1 span{background:linear-gradient(100deg,var(--bsx-amber),var(--bsx-rose));-webkit-background-clip:text;background-clip:text;color:transparent} .chm-08__hero p{color:rgba(244,245,251,.6);max-width:520px;font-size:.95rem;margin-top:1rem} .chm-08__chip{font-family:'Roboto Mono',monospace;font-size:.65rem;letter-spacing:.3em;text-transform:uppercase;color:var(--bsx-cyan);border:1px solid rgba(54,215,227,.4);border-radius:99px;padding:.35rem .9rem;display:inline-block;margin-bottom:1rem} .chm-08__tag{position:absolute;bottom:1.2rem;right:1.4rem;font-family:'Roboto Mono',monospace;font-size:.65rem;letter-spacing:.3em;color:rgba(244,245,251,.4);z-index:5} @media(max-width:991px){.chm-08 .chm-08__collapse{background:rgba(14,16,32,.96);border-radius:18px;padding:1rem;margin-top:.6rem;border:1px solid rgba(255,255,255,.08)}} @media (prefers-reduced-motion: reduce){ .chm-08 .chm-08__tg i,.chm-08 .chm-08__nav-link,.chm-08 .chm-08__btn-glow{transition:none !important} } ``` ### 09. Accessible Hamburger Menu (WCAG Compliant) **Type:** CSS + JS **Description:** Full audit-ready pattern: aria-expanded, aria-controls, aria-label, skip link, visible focus rings, focus trap, Escape-to-close, and focus return. Editorial Newsreader serif on warm paper. **HTML:** ```html
    Skip to content
    WCAG 2.2 AA

    Navigation everyone can actually use.

    Full keyboard support, focus trapping, Escape to close, and screen-reader semantics baked in. Try it: Tab to the button, Enter to open, Esc to close.

    aria-expanded="false → true" aria-controls="menu" aria-label="Toggle navigation menu" Esc key + focus return + scrim dismiss
    ACCESSIBLE // 2030
    ``` **CSS:** ```css @import url('https://fonts.googleapis.com/css2?family=Newsreader:opsz,wght@6..72,400;6..72,500&family=IBM+Plex+Sans:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500&display=swap'); .chm-09, .chm-09 *, .chm-09 *::before, .chm-09 *::after { box-sizing: border-box; margin: 0; padding: 0; } .chm-09{ --bg:#fcfbf8;--ink:#1b1b1b;--blue:#1d4ed8;--green:#15803d;--line:#e4e1d8; min-height:460px;display:grid;place-items:stretch; font-family:'IBM Plex Sans',sans-serif;background:var(--bg);color:var(--ink); position:relative; } .chm-09__scene{position:relative;width:100%;min-height:460px;height:100%;overflow:hidden} .chm-09 a:focus-visible,.chm-09 button:focus-visible{outline:3px solid var(--blue);outline-offset:3px;border-radius:6px} .chm-09__skip{position:absolute;left:-999px;top:12px;z-index:99;background:var(--ink);color:#fff;padding:8px 14px;border-radius:8px;text-decoration:none;font-weight:600;font-size:.85rem} .chm-09__skip:focus{left:12px} .chm-09__trigger{position:absolute;top:22px;right:22px;z-index:50;display:flex;align-items:center;gap:10px; background:#fff;border:2px solid var(--ink);border-radius:14px;padding:10px 14px;cursor:pointer;font-family:inherit;font-weight:600;font-size:.8rem;color:var(--ink); transition:transform .3s,box-shadow .3s} .chm-09__trigger:hover{transform:translateY(-2px);box-shadow:4px 4px 0 var(--ink)} .chm-09__bars{width:20px;height:13px;position:relative;display:inline-block} .chm-09__bars i{position:absolute;left:0;height:2.4px;width:100%;background:var(--ink);border-radius:3px;transition:transform .45s cubic-bezier(.7,0,.2,1),opacity .3s} .chm-09__bars i:nth-child(1){top:0}.chm-09__bars i:nth-child(2){top:5.5px}.chm-09__bars i:nth-child(3){top:11px} .chm-09__trigger[aria-expanded="true"] .chm-09__bars i:nth-child(1){transform:translateY(5.5px) rotate(45deg)} .chm-09__trigger[aria-expanded="true"] .chm-09__bars i:nth-child(2){opacity:0} .chm-09__trigger[aria-expanded="true"] .chm-09__bars i:nth-child(3){transform:translateY(-5.5px) rotate(-45deg)} .chm-09__lbl-open{display:inline}.chm-09__lbl-close{display:none} .chm-09__trigger[aria-expanded="true"] .chm-09__lbl-open{display:none} .chm-09__trigger[aria-expanded="true"] .chm-09__lbl-close{display:inline} .chm-09__menu{position:absolute;top:0;right:0;height:100%;width:min(320px,84%);z-index:45;background:#fff;border-left:2px solid var(--ink); transform:translateX(100%);transition:transform .5s cubic-bezier(.16,1,.3,1);padding:88px 24px 24px;display:flex;flex-direction:column} .chm-09__menu[data-open="true"]{transform:translateX(0)} .chm-09__grp{font-family:'IBM Plex Mono',monospace;font-size:10px;letter-spacing:.2em;text-transform:uppercase;color:#777;margin-bottom:12px} .chm-09__menu a{display:block;font-family:'Newsreader',serif;font-size:1.3rem;color:var(--ink);text-decoration:none;padding:10px 8px;border-radius:8px;transition:background .2s,color .2s} .chm-09__menu a:hover{background:#eef2ff;color:var(--blue)} .chm-09__menu a[aria-current="page"]{color:var(--green);font-weight:500} .chm-09__scrim{position:absolute;inset:0;z-index:40;background:rgba(27,27,27,.35);opacity:0;pointer-events:none;transition:.4s} .chm-09__scrim[data-show="true"]{opacity:1;pointer-events:auto} .chm-09__wrap{max-width:700px;margin:0 auto;padding:80px 24px 60px} .chm-09__eyebrow{display:inline-flex;align-items:center;gap:8px;font-family:'IBM Plex Mono',monospace;font-size:11px;letter-spacing:.2em;text-transform:uppercase;color:var(--green);font-weight:500;margin-bottom:14px} .chm-09__eyebrow::before{content:"✓";display:grid;place-items:center;width:20px;height:20px;border-radius:50%;background:var(--green);color:#fff;font-size:11px} .chm-09 h1{font-family:'Newsreader',serif;font-weight:400;font-size:clamp(1.8rem,5vw,3rem);line-height:1.04;letter-spacing:-.01em} .chm-09__lead{margin-top:16px;font-size:.95rem;line-height:1.65;color:#444;max-width:540px} .chm-09__specs{margin-top:24px;display:grid;gap:8px;font-family:'IBM Plex Mono',monospace;font-size:11px} .chm-09__specs code{background:#f0eee7;border:1px solid var(--line);border-radius:6px;padding:7px 11px;color:var(--blue);display:block} .chm-09__tag{position:absolute;bottom:18px;left:22px;font-family:'IBM Plex Mono',monospace;font-size:10px;letter-spacing:.3em;color:#999;z-index:5} @media (prefers-reduced-motion: reduce){ .chm-09__bars i,.chm-09__menu,.chm-09__scrim,.chm-09__trigger{transition:none !important} } ``` **JS:** ```js (() => { const root = document.querySelector('.chm-09'); if (!root) return; const trg = root.querySelector('#chm-09-trigger'); const menu = root.querySelector('#chm-09-menu'); const scrim = root.querySelector('#chm-09-scrim'); let open = false; function setState(s){ open = s; trg.setAttribute('aria-expanded', s); menu.dataset.open = s; menu.setAttribute('aria-hidden', !s); scrim.dataset.show = s; if (s) { menu.querySelector('a').focus(); } else { trg.focus(); } } function toggle(){ setState(!open); } trg.addEventListener('click', toggle); scrim.addEventListener('click', toggle); root.addEventListener('keydown', e => { if (e.key === 'Escape' && open) toggle(); if (e.key === 'Tab' && open) { const f = [...menu.querySelectorAll('a')]; const first = f[0], last = f[f.length - 1]; if (e.shiftKey && document.activeElement === first) { e.preventDefault(); last.focus(); } else if (!e.shiftKey && document.activeElement === last) { e.preventDefault(); first.focus(); } } }); })(); ``` ### 10. CSS Slide Down Dropdown Hamburger Menu **Type:** Pure CSS **Description:** Zero JavaScript. Checkbox hack drives the modern grid-template-rows: 0fr → 1fr trick for buttery vertical expansion below the bar, with staggered link reveals. **HTML:** ```html

    Slides down. Pushes nothing aside.

    Pure CSS · grid-template-rows: 0fr → 1fr

    SLIDE_DOWN // 2030
    ``` **CSS:** ```css @import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;700&family=Spline+Sans+Mono:wght@400;500&display=swap'); .chm-10, .chm-10 *, .chm-10 *::before, .chm-10 *::after { box-sizing: border-box; margin: 0; padding: 0; } .chm-10{ --bg:#0f1310;--card:#161d18;--lime:#aef359;--peach:#ffb27a;--fog:#e9efe7; min-height:460px;display:grid;place-items:stretch; font-family:'Outfit',sans-serif;background:var(--bg);color:var(--fog); position:relative; } .chm-10__scene{position:relative;width:100%;min-height:460px;height:100%;overflow:hidden} .chm-10__bg{position:absolute;inset:0;background:radial-gradient(50% 40% at 50% -5%,rgba(174,243,89,.16),transparent 60%),radial-gradient(40% 40% at 90% 100%,rgba(255,178,122,.12),transparent 55%)} .chm-10__shell{position:relative;z-index:2;max-width:520px;margin:0 auto;padding:40px 20px;min-height:460px;display:flex;flex-direction:column;justify-content:center} .chm-10__bar{display:flex;align-items:center;justify-content:space-between;background:rgba(22,29,24,.8);backdrop-filter:blur(14px);border:1px solid rgba(233,239,231,.08);border-radius:20px 20px 0 0;padding:16px 22px} .chm-10__logo{font-weight:700;letter-spacing:-.01em;display:flex;align-items:center;gap:9px} .chm-10__dot{width:10px;height:10px;border-radius:50%;background:var(--lime);box-shadow:0 0 14px var(--lime)} .chm-10__sd{position:absolute;opacity:0;pointer-events:none} .chm-10__toggle{width:42px;height:28px;position:relative;cursor:pointer} .chm-10__toggle i{position:absolute;left:8px;right:8px;height:2.4px;background:var(--fog);border-radius:3px;transition:transform .5s cubic-bezier(.7,0,.2,1),opacity .3s,background .4s} .chm-10__toggle i:nth-child(1){top:7px}.chm-10__toggle i:nth-child(2){top:13px}.chm-10__toggle i:nth-child(3){top:19px} .chm-10__sd:checked ~ .chm-10__shell .chm-10__toggle i:nth-child(1){transform:translateY(6px) rotate(45deg);background:var(--lime)} .chm-10__sd:checked ~ .chm-10__shell .chm-10__toggle i:nth-child(2){opacity:0} .chm-10__sd:checked ~ .chm-10__shell .chm-10__toggle i:nth-child(3){transform:translateY(-6px) rotate(-45deg);background:var(--lime)} .chm-10__drop{display:grid;grid-template-rows:0fr;background:rgba(22,29,24,.92);backdrop-filter:blur(14px);border:1px solid rgba(233,239,231,.08);border-top:none;border-radius:0 0 20px 20px;transition:grid-template-rows .6s cubic-bezier(.16,1,.3,1)} .chm-10__sd:checked ~ .chm-10__shell .chm-10__drop{grid-template-rows:1fr} .chm-10__inner{overflow:hidden} .chm-10__drop a{display:flex;align-items:center;justify-content:space-between;padding:14px 22px;text-decoration:none;color:var(--fog);font-size:1rem;font-weight:400;border-top:1px solid rgba(233,239,231,.06); opacity:0;transform:translateY(-8px);transition:opacity .4s,transform .4s,background .3s,padding-left .3s,color .3s} .chm-10__sd:checked ~ .chm-10__shell .chm-10__drop a{opacity:1;transform:none} .chm-10__sd:checked ~ .chm-10__shell .chm-10__drop a:nth-child(1){transition-delay:.18s} .chm-10__sd:checked ~ .chm-10__shell .chm-10__drop a:nth-child(2){transition-delay:.24s} .chm-10__sd:checked ~ .chm-10__shell .chm-10__drop a:nth-child(3){transition-delay:.30s} .chm-10__sd:checked ~ .chm-10__shell .chm-10__drop a:nth-child(4){transition-delay:.36s} .chm-10__drop a:hover{background:rgba(174,243,89,.08);padding-left:30px;color:var(--lime)} .chm-10__drop a span{font-family:'Spline Sans Mono',monospace;font-size:.7rem;color:var(--peach)} .chm-10__cap{text-align:center;margin-top:24px} .chm-10__cap h1{font-weight:700;font-size:clamp(1.4rem,4vw,2rem);letter-spacing:-.02em} .chm-10__cap p{font-family:'Spline Sans Mono',monospace;margin-top:10px;font-size:10px;letter-spacing:.1em;color:rgba(233,239,231,.5)} .chm-10__cap code{color:var(--lime)} .chm-10__tag{position:absolute;bottom:18px;left:50%;transform:translateX(-50%);z-index:5;font-family:'Spline Sans Mono',monospace;font-size:10px;letter-spacing:.3em;color:rgba(233,239,231,.4)} @media (prefers-reduced-motion: reduce){ .chm-10__toggle i,.chm-10__drop,.chm-10__drop a{transition:none !important} } ``` ### 11. Minimalist 3-Line CSS Menu Icon with Hover Effects **Type:** Pure CSS **Description:** A gallery of six pure-CSS hover micro-interactions — stretch, converge, color-shift cascade, tilt, squash, grow — using transitions and transforms on a tidy card grid. **HTML:** ```html

    Hover the icons.

    six micro-interactions · pure css

    stretch
    converge
    color shift
    tilt
    squash
    grow
    HOVER_ICONS // 2030
    ``` **CSS:** ```css @import url('https://fonts.googleapis.com/css2?family=Hanken+Grotesk:wght@300;400;500;700&family=Major+Mono+Display&display=swap'); .chm-11, .chm-11 *, .chm-11 *::before, .chm-11 *::after { box-sizing: border-box; margin: 0; padding: 0; } .chm-11{ --bg:#f6f4ef;--ink:#171514;--red:#e23b2e;--blue:#2b4cf0;--ground:#dcd7cc; min-height:460px;display:grid;place-items:stretch; font-family:'Hanken Grotesk',sans-serif;background:var(--bg);color:var(--ink); position:relative; } .chm-11__scene{position:relative;width:100%;min-height:460px;height:100%;overflow:hidden} .chm-11__bg{position:absolute;inset:0;background-image:radial-gradient(rgba(23,21,20,.06) 1px,transparent 1px);background-size:26px 26px;-webkit-mask-image:radial-gradient(circle at 50% 50%,#000,transparent 85%);mask-image:radial-gradient(circle at 50% 50%,#000,transparent 85%)} .chm-11__stage{position:relative;z-index:2;min-height:460px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:16px;padding:24px} .chm-11__intro{text-align:center;margin-bottom:18px} .chm-11__intro h1{font-size:clamp(1.5rem,4vw,2.4rem);font-weight:700;letter-spacing:-.02em} .chm-11__intro p{font-family:'Major Mono Display',monospace;margin-top:8px;font-size:10px;letter-spacing:.2em;color:#777} .chm-11__row{display:flex;flex-wrap:wrap;gap:14px;justify-content:center;max-width:680px} .chm-11__cell{width:130px;background:#fff;border:1px solid var(--ground);border-radius:16px;padding:22px 14px 14px;display:flex;flex-direction:column;align-items:center;gap:16px;box-shadow:0 6px 20px rgba(23,21,20,.04)} .chm-11__name{font-family:'Major Mono Display',monospace;font-size:9px;letter-spacing:.15em;color:#999} .chm-11__ic{width:38px;height:28px;position:relative;cursor:pointer} .chm-11__ic span{position:absolute;left:0;height:3px;width:100%;background:var(--ink);border-radius:4px;transition:all .35s ease} .chm-11__ic span:nth-child(1){top:2px}.chm-11__ic span:nth-child(2){top:12px}.chm-11__ic span:nth-child(3){top:22px} .chm-11__stretch:hover span:nth-child(1){width:60%} .chm-11__stretch:hover span:nth-child(2){width:100%} .chm-11__stretch:hover span:nth-child(3){width:75%} .chm-11__converge:hover span:nth-child(1){transform:translateY(10px)} .chm-11__converge:hover span:nth-child(3){transform:translateY(-10px)} .chm-11__converge:hover span:nth-child(2){background:var(--red)} .chm-11__cascade:hover span:nth-child(1){background:var(--red);transform:translateX(4px)} .chm-11__cascade:hover span:nth-child(2){background:var(--blue);transform:translateX(-4px)} .chm-11__cascade:hover span:nth-child(3){background:var(--red);transform:translateX(4px)} .chm-11__tilt:hover span:nth-child(1){transform:rotate(-6deg)} .chm-11__tilt:hover span:nth-child(2){transform:scaleX(.6)} .chm-11__tilt:hover span:nth-child(3){transform:rotate(6deg)} .chm-11__bounce span{transform-origin:left} .chm-11__bounce:hover span:nth-child(1){transform:scaleX(1.1)} .chm-11__bounce:hover span:nth-child(2){transform:scaleX(.7);background:var(--blue)} .chm-11__bounce:hover span:nth-child(3){transform:scaleX(.9)} .chm-11__grow:hover span{height:6px;border-radius:2px} .chm-11__grow:hover span:nth-child(1){top:4px}.chm-11__grow:hover span:nth-child(2){top:11px;background:var(--red)}.chm-11__grow:hover span:nth-child(3){top:18px} .chm-11__tag{position:absolute;bottom:18px;right:22px;font-family:'Major Mono Display',monospace;font-size:10px;letter-spacing:.2em;color:#999;z-index:5} @media (prefers-reduced-motion: reduce){ .chm-11__ic span{transition:none !important} } ``` ### 12. Full Screen Blur Overlay Hamburger Menu **Type:** CSS + JS **Description:** Glassmorphism showcase: animated colored orbs behind, and on open a full-screen backdrop-filter: blur() overlay with layered z-indexing and fading large links. **HTML:** ```html
    // glassmorphism nav
    Studio Projects Process Contact

    FROSTED
    FOCUS

    Backdrop-filter blur on open

    BLUR_OVERLAY // 2030
    ``` **CSS:** ```css @import url('https://fonts.googleapis.com/css2?family=Unbounded:wght@300;400;600;800&family=Azeret+Mono:wght@400;500&display=swap'); .chm-12, .chm-12 *, .chm-12 *::before, .chm-12 *::after { box-sizing: border-box; margin: 0; padding: 0; } .chm-12{ --bg:#0a0612;--glow1:#ff4d9d;--glow2:#5b8cff;--glow3:#43f5c4;--white:#f4eefb; min-height:460px;display:grid;place-items:stretch; font-family:'Unbounded',sans-serif;background:var(--bg);color:var(--white); position:relative; } .chm-12__scene{position:relative;width:100%;min-height:460px;height:100%;overflow:hidden} .chm-12__scape{position:absolute;inset:0;z-index:0} .chm-12__orb{position:absolute;border-radius:50%;filter:blur(10px);opacity:.9;animation:chm-12-float 14s ease-in-out infinite alternate} .chm-12__o1{width:46%;height:46%;background:radial-gradient(circle,var(--glow1),transparent 70%);top:-8%;left:-6%} .chm-12__o2{width:40%;height:40%;background:radial-gradient(circle,var(--glow2),transparent 70%);bottom:-10%;right:-4%;animation-delay:-4s} .chm-12__o3{width:34%;height:34%;background:radial-gradient(circle,var(--glow3),transparent 70%);top:38%;left:42%;animation-delay:-8s} @keyframes chm-12-float{to{transform:translate(6%,-6%) scale(1.15)}} .chm-12__scapegrid{position:absolute;inset:0;z-index:1;background-image:linear-gradient(rgba(244,238,251,.06) 1px,transparent 1px),linear-gradient(90deg,rgba(244,238,251,.06) 1px,transparent 1px);background-size:64px 64px} .chm-12__stage{position:relative;z-index:3;min-height:460px;display:grid;place-items:center;text-align:center;padding:24px} .chm-12__hero h1{font-size:clamp(1.8rem,6vw,4rem);font-weight:800;letter-spacing:-.02em;line-height:.95;text-shadow:0 8px 50px rgba(0,0,0,.4)} .chm-12__hero p{font-family:'Azeret Mono',monospace;margin-top:14px;font-size:10px;letter-spacing:.3em;text-transform:uppercase;color:rgba(244,238,251,.7)} .chm-12__trg{position:absolute;top:22px;right:22px;z-index:60;width:56px;height:56px;border-radius:18px;cursor:pointer;display:grid;place-items:center; background:rgba(244,238,251,.08);border:1px solid rgba(244,238,251,.22);backdrop-filter:blur(14px);transition:transform .5s,border-color .4s} .chm-12__trg:hover{transform:scale(1.07);border-color:var(--white)} .chm-12__b{width:24px;height:14px;position:relative} .chm-12__b i{position:absolute;left:0;height:2.4px;width:100%;background:var(--white);border-radius:3px;transition:transform .5s cubic-bezier(.7,0,.2,1),opacity .3s} .chm-12__b i:nth-child(1){top:0}.chm-12__b i:nth-child(2){top:6px}.chm-12__b i:nth-child(3){top:12px} .chm-12.is-open .chm-12__b i:nth-child(1){transform:translateY(6px) rotate(45deg)} .chm-12.is-open .chm-12__b i:nth-child(2){opacity:0} .chm-12.is-open .chm-12__b i:nth-child(3){transform:translateY(-6px) rotate(-45deg)} .chm-12__overlay{position:absolute;inset:0;z-index:50;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:6px; background:rgba(10,6,18,.28);backdrop-filter:blur(0px) saturate(100%); opacity:0;pointer-events:none;transition:backdrop-filter .7s,opacity .5s,background .7s} .chm-12.is-open .chm-12__overlay{opacity:1;pointer-events:auto;backdrop-filter:blur(30px) saturate(160%);background:rgba(10,6,18,.42)} .chm-12__lbl{font-family:'Azeret Mono',monospace;font-size:10px;letter-spacing:.4em;text-transform:uppercase;color:var(--glow3);margin-bottom:24px;opacity:0;transition:.4s .4s} .chm-12.is-open .chm-12__lbl{opacity:1} .chm-12__overlay a{font-size:clamp(1.6rem,5vw,3.4rem);font-weight:300;color:var(--white);text-decoration:none;line-height:1.1;letter-spacing:-.01em;transition:color .3s,letter-spacing .3s;opacity:0;transform:translateY(30px)} .chm-12.is-open .chm-12__overlay a{opacity:1;transform:none} .chm-12.is-open .chm-12__overlay a:nth-child(2){transition:.6s .42s} .chm-12.is-open .chm-12__overlay a:nth-child(3){transition:.6s .50s} .chm-12.is-open .chm-12__overlay a:nth-child(4){transition:.6s .58s} .chm-12.is-open .chm-12__overlay a:nth-child(5){transition:.6s .66s} .chm-12__overlay a:hover{color:var(--glow1);letter-spacing:.02em} .chm-12__tag{position:absolute;bottom:20px;left:24px;z-index:5;font-family:'Azeret Mono',monospace;font-size:10px;letter-spacing:.3em;color:rgba(244,238,251,.45)} @media (prefers-reduced-motion: reduce){ .chm-12__orb{animation:none !important} .chm-12__trg,.chm-12__b i,.chm-12__overlay,.chm-12__overlay a,.chm-12__lbl{transition:none !important} } ``` **JS:** ```js (() => { const root = document.querySelector('.chm-12'); if (!root) return; const btn = root.querySelector('.chm-12__trg'); btn.addEventListener('click', () => root.classList.toggle('is-open')); })(); ``` ### 13. Mobile Bottom Nav Bar with Floating Hamburger **Type:** CSS + JS **Description:** PWA-style phone frame with a fixed bottom tab bar, a centered floating hamburger launcher, and a slide-up bottom sheet grid. Safe-area-inset aware. **HTML:** ```html
    Good evening

    Your space,
    at a glance.

    Balance
    $4,820.50
    Activity
    38 +12%
    Saved
    $1,240
    Streak
    14 days
    BOTTOM_NAV // 2030
    ``` **CSS:** ```css @import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Fragment+Mono&display=swap'); .chm-13, .chm-13 *, .chm-13 *::before, .chm-13 *::after { box-sizing: border-box; margin: 0; padding: 0; } .chm-13{ --bg:#0d0f17;--surface:#171a26;--violet:#8b7bff;--mint:#4fe3b0;--amber:#ffc15e;--fog:#eef0f7;--muted:#8b90a3; min-height:460px;display:grid;place-items:stretch; font-family:'Plus Jakarta Sans',sans-serif;background:#05060a;color:var(--fog); position:relative; } .chm-13__scene{position:relative;width:100%;min-height:460px;height:100%;overflow:hidden;display:grid;place-items:center;padding:18px} .chm-13__phone{position:relative;width:300px;max-width:94%;height:424px;border-radius:36px;overflow:hidden;background:var(--bg);box-shadow:0 40px 90px rgba(0,0,0,.6),inset 0 0 0 1px rgba(255,255,255,.05)} .chm-13__screen{position:absolute;inset:0;overflow-y:auto;padding:30px 18px 110px;background:radial-gradient(60% 40% at 50% 0%,rgba(139,123,255,.18),transparent 60%)} .chm-13__screen::-webkit-scrollbar{display:none} .chm-13__welcome{font-family:'Fragment Mono',monospace;font-size:10px;letter-spacing:.2em;color:var(--mint);text-transform:uppercase} .chm-13__screen h1{font-size:1.5rem;font-weight:800;letter-spacing:-.02em;margin-top:6px;line-height:1.05} .chm-13__cards{margin-top:20px;display:grid;gap:10px} .chm-13__card{background:var(--surface);border:1px solid rgba(255,255,255,.06);border-radius:18px;padding:14px} .chm-13__t{font-family:'Fragment Mono',monospace;font-size:9px;letter-spacing:.15em;color:var(--muted);text-transform:uppercase} .chm-13__v{font-size:1.3rem;font-weight:700;margin-top:6px} .chm-13__v small{font-size:.75rem;color:var(--mint);font-weight:600} .chm-13__wide{background:linear-gradient(130deg,var(--violet),#5c4ad6)} .chm-13__wide .chm-13__t{color:rgba(255,255,255,.7)}.chm-13__wide .chm-13__v{color:#fff} .chm-13__tabbar{position:absolute;left:14px;right:14px;bottom:14px;height:56px;border-radius:22px; background:rgba(23,26,38,.85);backdrop-filter:blur(18px);border:1px solid rgba(255,255,255,.08); display:flex;align-items:center;justify-content:space-around;padding:0 12px;z-index:30} .chm-13__tab{display:flex;flex-direction:column;align-items:center;gap:3px;color:var(--muted);text-decoration:none;font-size:9px;font-weight:600;transition:color .3s} .chm-13__tab svg{width:18px;height:18px} .chm-13__active{color:var(--violet)} .chm-13__spacer-fab{width:54px} .chm-13__fab{position:absolute;left:50%;bottom:46px;transform:translateX(-50%);z-index:40;width:54px;height:54px;border-radius:50%;cursor:pointer;border:none; background:linear-gradient(140deg,var(--violet),var(--amber));display:grid;place-items:center; box-shadow:0 12px 30px rgba(139,123,255,.5)} .chm-13__b{width:22px;height:13px;position:relative} .chm-13__b i{position:absolute;left:0;height:2.2px;width:100%;background:#fff;border-radius:3px;transition:transform .5s cubic-bezier(.7,0,.2,1),opacity .3s} .chm-13__b i:nth-child(1){top:0}.chm-13__b i:nth-child(2){top:5.5px}.chm-13__b i:nth-child(3){top:11px} .chm-13__phone.is-open .chm-13__b i:nth-child(1){transform:translateY(5.5px) rotate(45deg)} .chm-13__phone.is-open .chm-13__b i:nth-child(2){opacity:0} .chm-13__phone.is-open .chm-13__b i:nth-child(3){transform:translateY(-5.5px) rotate(-45deg)} .chm-13__sheet{position:absolute;left:0;right:0;bottom:0;z-index:35;background:var(--surface);border-radius:26px 26px 0 0;border-top:1px solid rgba(255,255,255,.08); padding:22px 18px 100px;transform:translateY(100%);transition:transform .55s cubic-bezier(.16,1,.3,1)} .chm-13__phone.is-open .chm-13__sheet{transform:translateY(0)} .chm-13__grab{width:36px;height:4px;border-radius:3px;background:rgba(255,255,255,.18);margin:0 auto 18px} .chm-13__sheet h3{font-family:'Fragment Mono',monospace;font-size:10px;letter-spacing:.2em;text-transform:uppercase;color:var(--muted);margin-bottom:12px} .chm-13__grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px} .chm-13__sheet a{display:flex;flex-direction:column;align-items:center;gap:6px;padding:14px 6px;border-radius:14px;background:rgba(255,255,255,.04);color:var(--fog);text-decoration:none;font-size:10px;font-weight:600;transition:background .3s,transform .3s} .chm-13__sheet a:hover{background:rgba(139,123,255,.16);transform:translateY(-3px)} .chm-13__em{width:30px;height:30px;border-radius:10px;display:grid;place-items:center;background:rgba(139,123,255,.18);font-size:14px} .chm-13__scrim{position:absolute;inset:0;z-index:33;background:rgba(5,6,10,.55);opacity:0;pointer-events:none;transition:.4s} .chm-13__phone.is-open .chm-13__scrim{opacity:1;pointer-events:auto} .chm-13__tag{position:absolute;bottom:14px;right:18px;font-family:'Fragment Mono',monospace;font-size:10px;letter-spacing:.3em;color:rgba(238,240,247,.4)} @media (prefers-reduced-motion: reduce){ .chm-13__sheet,.chm-13__scrim,.chm-13__b i,.chm-13__tab,.chm-13__sheet a{transition:none !important} } ``` **JS:** ```js (() => { const root = document.querySelector('.chm-13'); if (!root) return; const phone = root.querySelector('#chm-13-phone'); const btn = root.querySelector('.chm-13__fab'); const scrim = root.querySelector('.chm-13__scrim'); btn.addEventListener('click', () => phone.classList.toggle('is-open')); scrim.addEventListener('click', () => phone.classList.remove('is-open')); })(); ``` ### 14. Multi-Level Dropdown Hamburger Menu (Nested Accordion) **Type:** CSS + JS **Description:** E-commerce flyout using native
    accordions nested three levels deep (Shop → Men's → Shoes), animated chevrons, contained hierarchy. **HTML:** ```html

    Tap. Expand.
    Go deeper.

    Nested accordion · Shop → Men's → Shoes

    NESTED_ACCORDION // 2030
    ``` **CSS:** ```css @import url('https://fonts.googleapis.com/css2?family=Epilogue:wght@400;500;600;700;800&family=Spline+Sans+Mono:wght@400;500&display=swap'); .chm-14, .chm-14 *, .chm-14 *::before, .chm-14 *::after { box-sizing: border-box; margin: 0; padding: 0; } .chm-14{ --bg:#faf7f2;--panel:#ffffff;--ink:#1c1a17;--brand:#c0392b;--brand2:#d98324;--line:#ece7dd;--muted:#8a8378; min-height:460px;display:grid;place-items:stretch; font-family:'Epilogue',sans-serif;background:var(--bg);color:var(--ink); position:relative; } .chm-14__scene{position:relative;width:100%;min-height:460px;height:100%;overflow:hidden} .chm-14__bg{position:absolute;inset:0;background:radial-gradient(50% 40% at 85% 10%,rgba(217,131,36,.1),transparent 60%)} .chm-14__stage{position:relative;z-index:2;min-height:460px;display:flex;align-items:center;padding:0 6%} .chm-14__hero h1{font-size:clamp(2rem,7vw,4.4rem);font-weight:800;letter-spacing:-.03em;line-height:.95} .chm-14__hero h1 em{font-style:normal;color:var(--brand)} .chm-14__hero p{font-family:'Spline Sans Mono',monospace;margin-top:14px;font-size:11px;letter-spacing:.1em;color:var(--muted)} .chm-14__trg{position:absolute;top:22px;right:22px;z-index:60;width:54px;height:54px;border-radius:16px;cursor:pointer;display:grid;place-items:center; background:var(--ink);border:none;transition:transform .4s,background .4s} .chm-14__trg:hover{transform:scale(1.05)} .chm-14__b{width:22px;height:13px;position:relative;display:inline-block} .chm-14__b i{position:absolute;left:0;height:2.4px;width:100%;background:#fff;border-radius:3px;transition:transform .5s cubic-bezier(.7,0,.2,1),opacity .3s} .chm-14__b i:nth-child(1){top:0}.chm-14__b i:nth-child(2){top:5.5px}.chm-14__b i:nth-child(3){top:11px} .chm-14.is-open .chm-14__trg{background:var(--brand)} .chm-14.is-open .chm-14__b i:nth-child(1){transform:translateY(5.5px) rotate(45deg)} .chm-14.is-open .chm-14__b i:nth-child(2){opacity:0} .chm-14.is-open .chm-14__b i:nth-child(3){transform:translateY(-5.5px) rotate(-45deg)} .chm-14__flyout{position:absolute;top:0;right:0;height:100%;width:min(340px,90%);z-index:50;background:var(--panel);border-left:1px solid var(--line); transform:translateX(100%);transition:transform .55s cubic-bezier(.16,1,.3,1);padding:84px 0 20px;overflow-y:auto} .chm-14__flyout::-webkit-scrollbar{width:6px}.chm-14__flyout::-webkit-scrollbar-thumb{background:var(--line);border-radius:6px} .chm-14.is-open .chm-14__flyout{transform:translateX(0)} .chm-14__lbl{font-family:'Spline Sans Mono',monospace;font-size:10px;letter-spacing:.25em;text-transform:uppercase;color:var(--brand2);padding:0 24px 14px} .chm-14__acc details{border-bottom:1px solid var(--line)} .chm-14__acc summary{list-style:none;cursor:pointer;display:flex;align-items:center;justify-content:space-between;padding:14px 24px;font-size:1rem;font-weight:600;transition:background .25s,color .25s} .chm-14__acc summary::-webkit-details-marker{display:none} .chm-14__acc summary:hover{background:#faf7f2;color:var(--brand)} .chm-14__chev{width:9px;height:9px;border-right:2px solid currentColor;border-bottom:2px solid currentColor;transform:rotate(45deg);transition:transform .35s;display:inline-block} .chm-14__acc details[open]>summary .chm-14__chev{transform:rotate(-135deg)} .chm-14__acc details[open]>summary{color:var(--brand)} .chm-14__sub{background:#fbf9f5} .chm-14__sub summary{padding-left:40px;font-size:.9rem;font-weight:500} .chm-14__sub a{display:block;padding:10px 24px 10px 54px;text-decoration:none;color:var(--ink);font-size:.85rem;font-weight:400;transition:background .25s,padding-left .25s,color .25s} .chm-14__sub a:hover{background:#f3efe7;padding-left:62px;color:var(--brand)} .chm-14__leaf a{padding-left:68px;font-size:.8rem;color:var(--muted)} .chm-14__leaf a::before{content:"–";margin-right:8px} .chm-14__leaf a:hover{padding-left:76px} .chm-14__scrim{position:absolute;inset:0;z-index:45;background:rgba(28,26,23,.3);opacity:0;pointer-events:none;transition:.4s} .chm-14.is-open .chm-14__scrim{opacity:1;pointer-events:auto} .chm-14__tag{position:absolute;bottom:18px;left:22px;font-family:'Spline Sans Mono',monospace;font-size:10px;letter-spacing:.3em;color:var(--muted);z-index:5} @media (prefers-reduced-motion: reduce){ .chm-14__flyout,.chm-14__scrim,.chm-14__b i,.chm-14__trg,.chm-14__chev,.chm-14__acc summary,.chm-14__sub a{transition:none !important} } ``` **JS:** ```js (() => { const root = document.querySelector('.chm-14'); if (!root) return; const btn = root.querySelector('.chm-14__trg'); const scrim = root.querySelector('.chm-14__scrim'); btn.addEventListener('click', () => root.classList.toggle('is-open')); scrim.addEventListener('click', () => root.classList.remove('is-open')); })(); ``` ### 15. Flexbox Navbar with Right-Aligned Hamburger Icon **Type:** CSS + JS **Description:** Textbook justify-content: space-between + align-items: center — logo locked left, hamburger snapped hard right, with a desktop link cluster that hides on mobile. **HTML:** ```html
    Flexbox Layout

    Logo left.
    Icon hard right.

    A reliable justify-content: space-between bar with align-items: center — the hamburger snaps perfectly to the right edge, cross-browser.

    .navbar { display:flex; justify-content:space-between }
    FLEXBOX_NAVBAR // 2030
    ``` **CSS:** ```css @import url('https://fonts.googleapis.com/css2?family=Onest:wght@400;500;600;700;800&family=Geist+Mono:wght@400;500&display=swap'); .chm-15, .chm-15 *, .chm-15 *::before, .chm-15 *::after { box-sizing: border-box; margin: 0; padding: 0; } .chm-15{ --bg:#101418;--surface:#1a2026;--cyan:#36e0d4;--coral:#ff7a59;--fog:#eef2f3;--muted:#8a96a0;--line:rgba(238,242,243,.08); min-height:460px;display:grid;place-items:stretch; font-family:'Onest',sans-serif;background:var(--bg);color:var(--fog); position:relative; } .chm-15__scene{position:relative;width:100%;min-height:460px;height:100%;overflow:hidden} .chm-15__navbar{display:flex;align-items:center;justify-content:space-between; padding:14px clamp(18px,4vw,40px);position:absolute;top:0;left:0;right:0;z-index:60; background:rgba(16,20,24,.72);backdrop-filter:blur(16px);border-bottom:1px solid var(--line)} .chm-15__logo{display:flex;align-items:center;gap:10px;font-weight:800;letter-spacing:-.02em;font-size:1.1rem} .chm-15__mk{width:26px;height:26px;border-radius:8px;background:linear-gradient(135deg,var(--cyan),var(--coral));display:grid;place-items:center;color:#0d1014;font-weight:800} .chm-15__right{display:flex;align-items:center;gap:14px} .chm-15__desk{display:flex;gap:4px} .chm-15__desk a{color:var(--muted);text-decoration:none;font-weight:500;font-size:.85rem;padding:6px 12px;border-radius:8px;transition:color .3s,background .3s} .chm-15__desk a:hover{color:var(--cyan);background:rgba(54,224,212,.08)} .chm-15__burger{display:grid;place-items:center;width:42px;height:42px;border-radius:12px;background:var(--surface);border:1px solid var(--line);cursor:pointer;flex-shrink:0} .chm-15__b{width:20px;height:13px;position:relative;display:inline-block} .chm-15__b i{position:absolute;right:0;height:2.2px;background:var(--fog);border-radius:3px;transition:transform .45s cubic-bezier(.7,0,.2,1),opacity .3s,width .4s} .chm-15__b i:nth-child(1){top:0;width:100%}.chm-15__b i:nth-child(2){top:5.5px;width:70%}.chm-15__b i:nth-child(3){top:11px;width:100%} .chm-15.is-open .chm-15__b i:nth-child(1){transform:translateY(5.5px) rotate(45deg)} .chm-15.is-open .chm-15__b i:nth-child(2){opacity:0;width:0} .chm-15.is-open .chm-15__b i:nth-child(3){transform:translateY(-5.5px) rotate(-45deg)} .chm-15__sheet{position:absolute;top:0;right:0;height:100%;width:min(300px,82%);z-index:55;background:var(--surface);border-left:1px solid var(--line); transform:translateX(100%);transition:transform .55s cubic-bezier(.16,1,.3,1);padding:80px 22px 22px;display:flex;flex-direction:column;gap:3px} .chm-15.is-open .chm-15__sheet{transform:translateX(0)} .chm-15__sheet a{display:flex;align-items:center;justify-content:space-between;font-size:1.05rem;font-weight:600;color:var(--fog);text-decoration:none;padding:12px 10px;border-radius:10px;transition:background .3s,padding-left .3s,color .3s} .chm-15__sheet a:hover{background:rgba(54,224,212,.1);padding-left:18px;color:var(--cyan)} .chm-15__sheet a span{font-family:'Geist Mono',monospace;font-size:.7rem;color:var(--coral)} .chm-15__scrim{position:absolute;inset:0;z-index:50;background:rgba(16,20,24,.5);opacity:0;pointer-events:none;transition:.4s} .chm-15.is-open .chm-15__scrim{opacity:1;pointer-events:auto} .chm-15__hero{max-width:1000px;margin:0 auto;padding:90px 24px 60px} .chm-15__eyebrow{display:inline-flex;align-items:center;gap:8px;font-family:'Geist Mono',monospace;font-size:11px;letter-spacing:.2em;text-transform:uppercase;color:var(--cyan);margin-bottom:16px} .chm-15__eyebrow::before{content:"";width:24px;height:2px;background:var(--coral)} .chm-15__hero h1{font-weight:800;font-size:clamp(2rem,6vw,4rem);line-height:.95;letter-spacing:-.03em} .chm-15__hero h1 em{font-style:normal;background:linear-gradient(100deg,var(--cyan),var(--coral));-webkit-background-clip:text;background-clip:text;color:transparent} .chm-15__hero p{margin-top:16px;max-width:500px;font-size:.95rem;color:var(--muted);line-height:1.6} .chm-15__code{margin-top:22px;display:inline-block;font-family:'Geist Mono',monospace;font-size:11px;background:var(--surface);border:1px solid var(--line);border-radius:10px;padding:11px 14px;color:var(--cyan)} .chm-15__tag{position:absolute;bottom:18px;left:clamp(18px,4vw,40px);font-family:'Geist Mono',monospace;font-size:10px;letter-spacing:.3em;color:var(--muted);z-index:5} @media(max-width:760px){.chm-15 .chm-15__desk{display:none}} @media (prefers-reduced-motion: reduce){ .chm-15__sheet,.chm-15__scrim,.chm-15__b i,.chm-15__sheet a{transition:none !important} } ``` **JS:** ```js (() => { const root = document.querySelector('.chm-15'); if (!root) return; const btn = root.querySelector('.chm-15__burger'); const scrim = root.querySelector('.chm-15__scrim'); btn.addEventListener('click', () => root.classList.toggle('is-open')); scrim.addEventListener('click', () => root.classList.remove('is-open')); })(); ``` ### 16. Circular Expand / Radial Ripple Mobile Menu **Type:** CSS + JS **Description:** A floating circular button whose clip-path: circle() grows outward like an expanding bubble from the corner, with spring easing and sliding links. **HTML:** ```html
    // radial reveal
    Home Drops Lookbook Contact

    Pop the
    bubble.

    clip-path circle expands from the button

    RADIAL_RIPPLE // 2030
    ``` **CSS:** ```css @import url('https://fonts.googleapis.com/css2?family=Familjen+Grotesk:wght@400;500;700&family=Martian+Mono:wght@400;500&display=swap'); .chm-16, .chm-16 *, .chm-16 *::before, .chm-16 *::after { box-sizing: border-box; margin: 0; padding: 0; } .chm-16{ --bg:#0b0a14;--bubble:#ff3e6c;--bubble2:#7c3aff;--mint:#2ff5c8;--fog:#f3f0ff; min-height:460px;display:grid;place-items:stretch; font-family:'Familjen Grotesk',sans-serif;background:var(--bg);color:var(--fog); position:relative; } .chm-16__scene{position:relative;width:100%;min-height:460px;height:100%;overflow:hidden} .chm-16__bg{position:absolute;inset:0;background:radial-gradient(40% 40% at 18% 82%,rgba(124,58,255,.2),transparent 60%),radial-gradient(40% 40% at 82% 20%,rgba(47,245,200,.14),transparent 60%)} .chm-16__stage{position:relative;z-index:2;min-height:460px;display:grid;place-items:center;text-align:center;padding:24px} .chm-16__hero h1{font-size:clamp(2rem,7vw,4.4rem);font-weight:700;letter-spacing:-.03em;line-height:.92} .chm-16__hero h1 em{font-style:normal;color:var(--bubble)} .chm-16__hero p{font-family:'Martian Mono',monospace;margin-top:14px;font-size:10px;letter-spacing:.25em;text-transform:uppercase;color:rgba(243,240,255,.55)} .chm-16__fab{position:absolute;bottom:26px;right:26px;z-index:60;width:60px;height:60px;border-radius:50%;cursor:pointer;border:none; background:linear-gradient(140deg,var(--bubble),var(--bubble2));display:grid;place-items:center; box-shadow:0 14px 38px rgba(255,62,108,.5);transition:transform .5s cubic-bezier(.34,1.56,.64,1)} .chm-16__fab:hover{transform:scale(1.08)} .chm-16__b{width:22px;height:14px;position:relative;display:inline-block} .chm-16__b i{position:absolute;left:0;height:2.6px;width:100%;background:#fff;border-radius:3px;transition:transform .5s cubic-bezier(.7,0,.2,1),opacity .3s} .chm-16__b i:nth-child(1){top:0}.chm-16__b i:nth-child(2){top:6px}.chm-16__b i:nth-child(3){top:12px} .chm-16.is-open .chm-16__fab{transform:scale(1.05) rotate(90deg)} .chm-16.is-open .chm-16__b i:nth-child(1){transform:translateY(6px) rotate(45deg)} .chm-16.is-open .chm-16__b i:nth-child(2){opacity:0} .chm-16.is-open .chm-16__b i:nth-child(3){transform:translateY(-6px) rotate(-45deg)} .chm-16__ripple{position:absolute;inset:0;z-index:50; background:radial-gradient(circle at bottom right,var(--bubble2),var(--bubble) 55%,#1c0f2e); -webkit-clip-path:circle(0px at calc(100% - 56px) calc(100% - 56px)); clip-path:circle(0px at calc(100% - 56px) calc(100% - 56px)); transition:clip-path .8s cubic-bezier(.76,0,.24,1),-webkit-clip-path .8s cubic-bezier(.76,0,.24,1);pointer-events:none; display:flex;flex-direction:column;justify-content:center;align-items:flex-start;padding:0 10%;gap:4px} .chm-16.is-open .chm-16__ripple{-webkit-clip-path:circle(150% at calc(100% - 56px) calc(100% - 56px));clip-path:circle(150% at calc(100% - 56px) calc(100% - 56px));pointer-events:auto} .chm-16__lbl{font-family:'Martian Mono',monospace;font-size:10px;letter-spacing:.4em;text-transform:uppercase;color:var(--mint);margin-bottom:22px;opacity:0;transition:.4s .4s} .chm-16.is-open .chm-16__lbl{opacity:1} .chm-16__ripple a{font-size:clamp(1.8rem,6vw,3.4rem);font-weight:700;color:#fff;text-decoration:none;line-height:1.1;letter-spacing:-.02em;transition:transform .3s,opacity .3s;opacity:0;transform:translateX(-40px)} .chm-16.is-open .chm-16__ripple a{opacity:1;transform:none} .chm-16.is-open .chm-16__ripple a:nth-child(2){transition:.5s .42s} .chm-16.is-open .chm-16__ripple a:nth-child(3){transition:.5s .5s} .chm-16.is-open .chm-16__ripple a:nth-child(4){transition:.5s .58s} .chm-16.is-open .chm-16__ripple a:nth-child(5){transition:.5s .66s} .chm-16__ripple a:hover{color:var(--mint)} .chm-16__tag{position:absolute;bottom:18px;left:24px;z-index:5;font-family:'Martian Mono',monospace;font-size:10px;letter-spacing:.3em;color:rgba(243,240,255,.45)} @media (prefers-reduced-motion: reduce){ .chm-16__fab,.chm-16__b i,.chm-16__ripple,.chm-16__ripple a,.chm-16__lbl{transition:none !important} } ``` **JS:** ```js (() => { const root = document.querySelector('.chm-16'); if (!root) return; const btn = root.querySelector('.chm-16__fab'); btn.addEventListener('click', () => root.classList.toggle('is-open')); })(); ``` ### 17. Fixed Sticky Header with Shrinking Hamburger Icon **Type:** CSS + JS **Description:** Scroll-linked sticky header that compresses padding, shrinks the logo mark, and scales the hamburger down smoothly past a scroll threshold — scroll up to expand again. **HTML:** ```html
    Sticky · Scroll-linked

    Scroll down — watch it shrink.

    Header compresses, icon scales down

    The header stayed pinned. The hamburger got smaller and tighter the moment you scrolled.

    Still here, still compact. Smooth scroll-linked transitions — no layout jump.

    Scroll back up and everything expands again.

    STICKY_SHRINK // 2030
    ``` **CSS:** ```css @import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,400..800&family=Overpass+Mono:wght@400;600&display=swap'); .chm-17, .chm-17 *, .chm-17 *::before, .chm-17 *::after { box-sizing: border-box; margin: 0; padding: 0; } .chm-17{ --bg:#0f1218;--accent:#ff5a3c;--gold:#ffd23f;--fog:#f1f0ec;--muted:#8b909c;--line:rgba(241,240,236,.08); min-height:460px;display:grid;place-items:stretch; font-family:'Bricolage Grotesque',sans-serif;background:var(--bg);color:var(--fog); position:relative; } .chm-17__scene{position:relative;width:100%;min-height:460px;height:100%;overflow:hidden} .chm-17__scroller{position:relative;width:100%;height:460px;overflow-y:auto;scroll-behavior:smooth} .chm-17__header{position:absolute;top:0;left:0;right:0;z-index:60;display:flex;align-items:center;justify-content:space-between; padding:20px clamp(18px,4vw,40px); background:rgba(15,18,24,0);backdrop-filter:blur(0px);border-bottom:1px solid transparent; transition:padding .4s ease,background .4s,backdrop-filter .4s,border-color .4s} .chm-17__header.is-scrolled{padding:10px clamp(18px,4vw,40px);background:rgba(15,18,24,.82);backdrop-filter:blur(16px);border-bottom:1px solid var(--line)} .chm-17__logo{display:flex;align-items:center;gap:10px;font-weight:800;letter-spacing:-.02em;font-size:1.25rem;transition:font-size .4s} .chm-17__header.is-scrolled .chm-17__logo{font-size:1rem} .chm-17__mk{width:30px;height:30px;border-radius:9px;background:linear-gradient(135deg,var(--accent),var(--gold));transition:width .4s,height .4s} .chm-17__header.is-scrolled .chm-17__mk{width:22px;height:22px} .chm-17__burger{width:52px;height:52px;border-radius:14px;background:rgba(241,240,236,.05);border:1px solid var(--line);cursor:pointer;display:grid;place-items:center; transition:width .4s,height .4s,border-radius .4s} .chm-17__header.is-scrolled .chm-17__burger{width:38px;height:38px;border-radius:11px} .chm-17__b{width:22px;height:14px;position:relative;transition:transform .4s;display:inline-block} .chm-17__header.is-scrolled .chm-17__b{transform:scale(.78)} .chm-17__b i{position:absolute;left:0;height:2.4px;width:100%;background:var(--fog);border-radius:3px;transition:transform .45s cubic-bezier(.7,0,.2,1),opacity .3s,background .4s} .chm-17__b i:nth-child(1){top:0}.chm-17__b i:nth-child(2){top:6px}.chm-17__b i:nth-child(3){top:12px} .chm-17.is-open .chm-17__b i:nth-child(1){transform:translateY(6px) rotate(45deg);background:var(--accent)} .chm-17.is-open .chm-17__b i:nth-child(2){opacity:0} .chm-17.is-open .chm-17__b i:nth-child(3){transform:translateY(-6px) rotate(-45deg);background:var(--accent)} .chm-17__sheet{position:absolute;top:0;right:0;height:100%;width:min(300px,84%);z-index:55;background:#141821;border-left:1px solid var(--line); transform:translateX(100%);transition:transform .55s cubic-bezier(.16,1,.3,1);padding:90px 24px 24px} .chm-17.is-open .chm-17__sheet{transform:translateX(0)} .chm-17__sheet a{display:block;font-size:1.3rem;font-weight:600;color:var(--fog);text-decoration:none;padding:12px 0;border-bottom:1px solid var(--line);transition:color .3s,padding-left .3s} .chm-17__sheet a:hover{color:var(--accent);padding-left:10px} .chm-17__scrim{position:absolute;inset:0;z-index:50;background:rgba(15,18,24,.5);opacity:0;pointer-events:none;transition:.4s} .chm-17.is-open .chm-17__scrim{opacity:1;pointer-events:auto} .chm-17__scroller section{padding:0 clamp(18px,4vw,40px)} .chm-17__hero{min-height:460px;display:flex;flex-direction:column;justify-content:center} .chm-17__eyebrow{font-family:'Overpass Mono',monospace;font-size:11px;letter-spacing:.3em;text-transform:uppercase;color:var(--gold);margin-bottom:16px} .chm-17__hero h1{font-size:clamp(2rem,7vw,4.4rem);font-weight:800;line-height:.92;letter-spacing:-.03em;max-width:14ch} .chm-17__hero h1 em{font-style:normal;color:var(--accent)} .chm-17__scrolltip{margin-top:24px;font-family:'Overpass Mono',monospace;font-size:11px;color:var(--muted);display:flex;align-items:center;gap:8px} .chm-17__scrolltip::before{content:"↓";animation:chm-17-b 1.4s infinite} @keyframes chm-17-b{50%{transform:translateY(5px)}} .chm-17__block{min-height:360px;display:flex;align-items:center;border-top:1px solid var(--line)} .chm-17__block h2{font-size:clamp(1.4rem,4vw,2.2rem);font-weight:700;max-width:18ch;color:var(--muted)} .chm-17__block h2 b{color:var(--fog)} .chm-17__tag{position:absolute;bottom:18px;left:clamp(18px,4vw,40px);z-index:5;font-family:'Overpass Mono',monospace;font-size:10px;letter-spacing:.3em;color:var(--muted)} @media (prefers-reduced-motion: reduce){ .chm-17__header,.chm-17__logo,.chm-17__mk,.chm-17__burger,.chm-17__b,.chm-17__b i,.chm-17__sheet,.chm-17__sheet a,.chm-17__scrim,.chm-17__scroller{transition:none !important;scroll-behavior:auto !important} .chm-17__scrolltip::before{animation:none !important} } ``` **JS:** ```js (() => { const root = document.querySelector('.chm-17'); if (!root) return; const hd = root.querySelector('#chm-17-hd'); const scroller = root.querySelector('.chm-17__scroller'); const btn = root.querySelector('.chm-17__burger'); const scrim = root.querySelector('.chm-17__scrim'); scroller.addEventListener('scroll', () => { hd.classList.toggle('is-scrolled', scroller.scrollTop > 60); }, { passive: true }); btn.addEventListener('click', () => root.classList.toggle('is-open')); scrim.addEventListener('click', () => root.classList.remove('is-open')); })(); ``` ### 18. Neumorphic Hamburger Menu Toggle Button **Type:** CSS + JS **Description:** Soft-UI on the classic #e0e5ec surface — dual light/dark box-shadow for the raised state flipping to inset (sunken) on toggle, with an extruded menu card. **HTML:** ```html

    Soft UI toggle.

    raised → sunken box-shadow states

    NEUMORPHIC // 2030
    ``` **CSS:** ```css @import url('https://fonts.googleapis.com/css2?family=Quicksand:wght@400;500;600;700&family=Spline+Sans+Mono:wght@400;500&display=swap'); .chm-18, .chm-18 *, .chm-18 *::before, .chm-18 *::after { box-sizing: border-box; margin: 0; padding: 0; } .chm-18{ --bg:#e0e5ec;--text:#5a6474;--accent:#6d7cff;--light:#ffffff;--dark:#a3b1c6; min-height:460px;display:grid;place-items:stretch; font-family:'Quicksand',sans-serif;background:var(--bg);color:var(--text); position:relative; } .chm-18__scene{position:relative;width:100%;min-height:460px;height:100%;overflow:hidden} .chm-18__stage{min-height:460px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:34px;padding:24px;text-align:center} .chm-18__intro h1{font-size:clamp(1.6rem,5vw,2.6rem);font-weight:700;color:#4a5468;letter-spacing:-.01em} .chm-18__intro p{font-family:'Spline Sans Mono',monospace;margin-top:10px;font-size:11px;letter-spacing:.1em;color:#8a94a6} .chm-18__neu{width:84px;height:84px;border-radius:26px;cursor:pointer;border:none;background:var(--bg);display:grid;place-items:center; box-shadow:10px 10px 22px var(--dark), -10px -10px 22px var(--light); transition:box-shadow .4s ease} .chm-18__neu:hover{box-shadow:8px 8px 18px var(--dark), -8px -8px 18px var(--light)} .chm-18.is-open .chm-18__neu{box-shadow:inset 8px 8px 16px var(--dark), inset -8px -8px 16px var(--light)} .chm-18__b{width:34px;height:22px;position:relative;display:inline-block} .chm-18__b i{position:absolute;left:0;height:4px;width:100%;background:var(--accent);border-radius:4px;transition:transform .5s cubic-bezier(.7,0,.2,1),opacity .3s} .chm-18__b i:nth-child(1){top:0}.chm-18__b i:nth-child(2){top:9px}.chm-18__b i:nth-child(3){top:18px} .chm-18.is-open .chm-18__b i:nth-child(1){transform:translateY(9px) rotate(45deg)} .chm-18.is-open .chm-18__b i:nth-child(2){opacity:0} .chm-18.is-open .chm-18__b i:nth-child(3){transform:translateY(-9px) rotate(-45deg)} .chm-18__card{width:min(320px,86%);border-radius:30px;background:var(--bg);padding:16px; box-shadow:12px 12px 28px var(--dark), -12px -12px 28px var(--light); display:grid;gap:6px; max-height:0;opacity:0;transform:translateY(-12px);overflow:hidden;pointer-events:none; transition:max-height .5s ease,opacity .4s,transform .5s,padding .4s} .chm-18.is-open .chm-18__card{max-height:380px;opacity:1;transform:none;pointer-events:auto} .chm-18__card a{display:flex;align-items:center;gap:14px;padding:12px 16px;border-radius:18px;text-decoration:none;color:var(--text);font-weight:600;font-size:.95rem; transition:box-shadow .3s,color .3s} .chm-18__card a:hover{color:var(--accent);box-shadow:inset 5px 5px 10px var(--dark), inset -5px -5px 10px var(--light)} .chm-18__ico{width:36px;height:36px;border-radius:12px;display:grid;place-items:center;background:var(--bg);color:var(--accent);font-size:16px; box-shadow:5px 5px 10px var(--dark), -5px -5px 10px var(--light)} .chm-18__tag{position:absolute;bottom:18px;right:24px;font-family:'Spline Sans Mono',monospace;font-size:10px;letter-spacing:.2em;color:#9aa4b6} @media (prefers-reduced-motion: reduce){ .chm-18__neu,.chm-18__b i,.chm-18__card,.chm-18__card a{transition:none !important} } ``` **JS:** ```js (() => { const root = document.querySelector('.chm-18'); if (!root) return; const btn = root.querySelector('.chm-18__neu'); btn.addEventListener('click', () => root.classList.toggle('is-open')); })(); ``` ### 19. Brutalist CSS Bordered Hamburger Menu **Type:** CSS + JS **Description:** Indie-hacker brutalism: hot-yellow ground, hard border: 4px solid #000, rigid offset box-shadow that collapses on press, Archivo Black, zero radius. **HTML:** ```html

    RAW
    EDGES

    HARD BORDERS · OFFSET SHADOWS · NO RADIUS

    BRUTALIST // 2030
    ``` **CSS:** ```css @import url('https://fonts.googleapis.com/css2?family=Archivo+Black&family=DM+Mono:wght@400;500&family=Space+Grotesk:wght@500;700&display=swap'); .chm-19, .chm-19 *, .chm-19 *::before, .chm-19 *::after { box-sizing: border-box; margin: 0; padding: 0; } .chm-19{ --paper:#f7f200;--ink:#000;--white:#fff;--pink:#ff4ec7;--blue:#2d5bff; min-height:460px;display:grid;place-items:stretch; font-family:'Space Grotesk',sans-serif;background:var(--paper);color:var(--ink); position:relative; } .chm-19__scene{position:relative;width:100%;min-height:460px;height:100%;overflow:hidden} .chm-19__bg{position:absolute;inset:0;background-image:linear-gradient(var(--ink) 2px,transparent 2px),linear-gradient(90deg,var(--ink) 2px,transparent 2px);background-size:70px 70px;opacity:.06} .chm-19__stage{position:relative;z-index:2;min-height:460px;display:flex;flex-direction:column;justify-content:center;padding:0 7%} .chm-19__hero h1{font-family:'Archivo Black',sans-serif;font-size:clamp(2rem,8vw,5.5rem);line-height:.86;text-transform:uppercase;letter-spacing:-.02em; -webkit-text-stroke:2px var(--ink)} .chm-19__fill{color:var(--ink)} .chm-19__out{color:var(--paper);-webkit-text-stroke:3px var(--ink)} .chm-19__hero p{font-family:'DM Mono',monospace;margin-top:18px;font-size:11px;letter-spacing:.05em;background:var(--ink);color:var(--paper);display:inline-block;padding:6px 12px} .chm-19__burger{position:absolute;top:24px;right:24px;z-index:60;width:64px;height:64px;background:var(--white);border:4px solid var(--ink);cursor:pointer;display:grid;place-items:center; box-shadow:7px 7px 0 var(--ink);transition:transform .12s,box-shadow .12s,background .2s} .chm-19__burger:hover{background:var(--pink)} .chm-19__burger:active{transform:translate(7px,7px);box-shadow:0 0 0 var(--ink)} .chm-19__b{width:30px;height:20px;position:relative;display:inline-block} .chm-19__b i{position:absolute;left:0;height:4px;width:100%;background:var(--ink);transition:transform .4s cubic-bezier(.7,0,.2,1),opacity .25s} .chm-19__b i:nth-child(1){top:0}.chm-19__b i:nth-child(2){top:8px}.chm-19__b i:nth-child(3){top:16px} .chm-19.is-open .chm-19__burger{background:var(--blue)} .chm-19.is-open .chm-19__b i{background:var(--white)} .chm-19.is-open .chm-19__b i:nth-child(1){transform:translateY(8px) rotate(45deg)} .chm-19.is-open .chm-19__b i:nth-child(2){opacity:0} .chm-19.is-open .chm-19__b i:nth-child(3){transform:translateY(-8px) rotate(-45deg)} .chm-19__panel{position:absolute;top:0;right:0;height:100%;width:min(340px,90%);z-index:50;background:var(--white);border-left:5px solid var(--ink); transform:translateX(100%);transition:transform .4s cubic-bezier(.7,0,.2,1);padding:96px 24px 24px} .chm-19.is-open .chm-19__panel{transform:translateX(0)} .chm-19__h{font-family:'DM Mono',monospace;font-size:11px;letter-spacing:.2em;background:var(--ink);color:var(--paper);padding:5px 10px;display:inline-block;margin-bottom:22px} .chm-19__panel a{display:block;font-family:'Archivo Black',sans-serif;font-size:1.3rem;text-transform:uppercase;text-decoration:none;color:var(--ink); border:4px solid var(--ink);padding:14px 18px;margin-bottom:14px;background:var(--white);box-shadow:6px 6px 0 var(--ink); transition:transform .12s,box-shadow .12s,background .2s,color .2s} .chm-19__panel a:nth-child(2):hover{background:var(--pink)} .chm-19__panel a:nth-child(3):hover{background:var(--blue);color:var(--white)} .chm-19__panel a:nth-child(4):hover{background:var(--paper)} .chm-19__panel a:nth-child(5):hover{background:var(--pink)} .chm-19__panel a:hover{transform:translate(6px,6px);box-shadow:0 0 0 var(--ink)} .chm-19__scrim{position:absolute;inset:0;z-index:45;background:rgba(0,0,0,.2);opacity:0;pointer-events:none;transition:.3s} .chm-19.is-open .chm-19__scrim{opacity:1;pointer-events:auto} .chm-19__tag{position:absolute;bottom:24px;left:7%;z-index:5;font-family:'DM Mono',monospace;font-size:11px;letter-spacing:.15em;background:var(--ink);color:var(--paper);padding:4px 8px} @media (prefers-reduced-motion: reduce){ .chm-19__burger,.chm-19__b i,.chm-19__panel,.chm-19__panel a,.chm-19__scrim{transition:none !important} } ``` **JS:** ```js (() => { const root = document.querySelector('.chm-19'); if (!root) return; const btn = root.querySelector('.chm-19__burger'); const scrim = root.querySelector('.chm-19__scrim'); btn.addEventListener('click', () => root.classList.toggle('is-open')); scrim.addEventListener('click', () => root.classList.remove('is-open')); })(); ``` ### 20. 3D Rotating Canvas Mobile Hamburger Menu **Type:** CSS + JS **Description:** Advanced showcase — opening the menu pushes the entire page canvas back in 3D with perspective + rotateY() + scale, revealing the navigation sitting behind it. **HTML:** ```html
    // behind the canvas
    Home Universe Archive Contact

    Fold the
    whole page.

    3D perspective · rotateY · scale

    3D_CANVAS // 2030
    ``` **CSS:** ```css @import url('https://fonts.googleapis.com/css2?family=Syne:wght@500;700;800&family=JetBrains+Mono:wght@400;500&display=swap'); .chm-20, .chm-20 *, .chm-20 *::before, .chm-20 *::after { box-sizing: border-box; margin: 0; padding: 0; } .chm-20{ --bg:#06070d;--canvas:#10131f;--cyan:#39e6ff;--magenta:#ff48b0;--gold:#ffd84d;--fog:#eef1fb; min-height:460px;display:grid;place-items:stretch; font-family:'Syne',sans-serif;background:var(--bg);color:var(--fog); position:relative; } .chm-20__scene{position:relative;width:100%;min-height:460px;height:100%;overflow:hidden} .chm-20__perspective{position:absolute;inset:0;perspective:1600px;perspective-origin:50% 50%} .chm-20__behind{position:absolute;inset:0;z-index:1;display:flex;flex-direction:column;justify-content:center;padding:0 12%; background:radial-gradient(60% 60% at 30% 40%,rgba(57,230,255,.18),transparent 60%),radial-gradient(50% 50% at 80% 70%,rgba(255,72,176,.16),transparent 60%),#0a0c16} .chm-20__lbl{font-family:'JetBrains Mono',monospace;font-size:10px;letter-spacing:.4em;text-transform:uppercase;color:var(--cyan);margin-bottom:22px;opacity:0;transition:.4s .5s} .chm-20.is-open .chm-20__lbl{opacity:1} .chm-20__behind a{font-size:clamp(1.6rem,5vw,3rem);font-weight:800;color:var(--fog);text-decoration:none;line-height:1.15;letter-spacing:-.02em;transition:color .3s,transform .3s;opacity:0;transform:translateX(-30px)} .chm-20.is-open .chm-20__behind a{opacity:1;transform:none} .chm-20.is-open .chm-20__behind a:nth-child(2){transition:.5s .55s} .chm-20.is-open .chm-20__behind a:nth-child(3){transition:.5s .63s} .chm-20.is-open .chm-20__behind a:nth-child(4){transition:.5s .71s} .chm-20.is-open .chm-20__behind a:nth-child(5){transition:.5s .79s} .chm-20__behind a:hover{color:var(--magenta)} .chm-20__canvas{position:absolute;inset:0;z-index:10;background:var(--canvas);transform-origin:right center; transition:transform .9s cubic-bezier(.76,0,.24,1),border-radius .9s,box-shadow .9s; background-image:radial-gradient(50% 40% at 50% 0%,rgba(255,216,77,.12),transparent 60%)} .chm-20.is-open .chm-20__canvas{transform:translateX(-58%) scale(.74) rotateY(38deg);border-radius:30px;box-shadow:-40px 40px 100px rgba(0,0,0,.6)} .chm-20__inner{height:100%;display:flex;flex-direction:column;justify-content:center;padding:0 9%} .chm-20__inner h1{font-size:clamp(2rem,7vw,4.4rem);font-weight:800;line-height:.9;letter-spacing:-.03em} .chm-20__inner h1 em{font-style:normal;background:linear-gradient(100deg,var(--cyan),var(--magenta));-webkit-background-clip:text;background-clip:text;color:transparent} .chm-20__inner p{font-family:'JetBrains Mono',monospace;margin-top:16px;font-size:11px;letter-spacing:.2em;text-transform:uppercase;color:rgba(238,241,251,.55)} .chm-20__burger{position:absolute;top:22px;right:22px;z-index:40;width:54px;height:54px;border-radius:16px;cursor:pointer;border:none;display:grid;place-items:center; background:rgba(238,241,251,.07);border:1px solid rgba(238,241,251,.16);backdrop-filter:blur(12px);transition:transform .5s} .chm-20__burger:hover{transform:scale(1.06)} .chm-20__b{width:22px;height:14px;position:relative;display:inline-block} .chm-20__b i{position:absolute;left:0;height:2.6px;width:100%;background:var(--fog);border-radius:3px;transition:transform .5s cubic-bezier(.7,0,.2,1),opacity .3s,background .4s} .chm-20__b i:nth-child(1){top:0}.chm-20__b i:nth-child(2){top:6px}.chm-20__b i:nth-child(3){top:12px} .chm-20.is-open .chm-20__b i:nth-child(1){transform:translateY(6px) rotate(45deg);background:var(--cyan)} .chm-20.is-open .chm-20__b i:nth-child(2){opacity:0} .chm-20.is-open .chm-20__b i:nth-child(3){transform:translateY(-6px) rotate(-45deg);background:var(--cyan)} .chm-20__tag{position:absolute;bottom:20px;left:24px;z-index:40;font-family:'JetBrains Mono',monospace;font-size:10px;letter-spacing:.3em;color:rgba(238,241,251,.45)} @media (prefers-reduced-motion: reduce){ .chm-20__canvas,.chm-20__behind a,.chm-20__lbl,.chm-20__b i,.chm-20__burger{transition:none !important} } ``` **JS:** ```js (() => { const root = document.querySelector('.chm-20'); if (!root) return; const btn = root.querySelector('.chm-20__burger'); btn.addEventListener('click', () => root.classList.toggle('is-open')); })(); ``` --- ## 11 CSS Header Designs URL: https://codefronts.com/layouts/css-header-designs/ Description: 11 hand-coded CSS header designs covering the patterns search demand actually targets — pure-CSS sticky header that solidifies on scroll using scroll-timeline (no JavaScript, no scroll listener, zero impact on Core Web Vitals), CSS Grid mega menu with :focus-within keyboard accessibility, performance-first flexbox 3-column navbar, full-screen overlay hamburger header via checkbox hack, glassmorphism transparent bar with backdrop-filter, sticky announcement bar with grid-template-rows dismiss animation, two-tier double-decker enterprise header, animated link hover effects (scaleX underline, clip-up fill, gradient sweep, dual-layer swap, bracket reveal), vertical sidebar navigation with persistent rail, three-level multi-level dropdown menu via :focus-within, and a shrinking header on scroll using animation-timeline. 10 truly pure-CSS, 1 with a tiny optional vanilla JS snippet. WCAG-aware, prefers-reduced-motion respected, scoped class names that never collide with your existing styles, MIT-licensed. Demo count: 11 ### 01. Pure CSS Fixed Navigation (Sticky Header) **Type:** Pure CSS **Description:** A semantic
    that locks to the top with position:sticky and frosts over on scroll — driven by a scroll-linked CSS animation timeline, not a JS scroll listener, so Core Web Vitals stay clean. Clash Display type over a lime/coral gradient-grid hero with isolated z-index stacking and a graceful mobile collapse. **HTML:** ```html
    position: sticky · top: 0

    Locked to the
    viewport.

    SCROLL TO WATCH THE BAR FROST OVER — ZERO JS LISTENERS

    ↓ SCROLL ↓
    01 / CORE WEB VITALS

    No scroll handlers, no jank

    The solidify effect rides a scroll-driven CSS animation timeline instead of a JavaScript scroll listener — so the main thread stays free and Cumulative Layout Shift stays at zero.

    02 / Z-INDEX STACKING

    A clean stacking context

    The header owns an isolated z-index layer above the scroll content, so dropdowns, hero gradients, and grid overlays never fight for paint order.

    03 / SEMANTICS

    Real <header> & <nav>

    Semantic landmarks keep the bar accessible to screen readers and assistive tech while the sticky positioning is handled entirely in CSS.

    04 / RESPONSIVE

    Graceful on every width

    Below the mobile breakpoint the link cluster collapses to the primary call-to-action, keeping the bar tidy without a single media-query hack.

    ``` **CSS:** ```css @import url('https://fonts.googleapis.com/css2?family=Clash+Display:wght@400;600;700&family=Space+Mono:wght@400;700&display=swap'); @import url('https://fonts.cdnfonts.com/css/clash-display'); .csh-01, .csh-01 *, .csh-01 *::before, .csh-01 *::after { box-sizing: border-box; margin: 0; padding: 0; } .csh-01 ::selection{background:var(--lime);color:var(--ink)} .csh-01 ::-moz-selection{background:var(--lime);color:var(--ink)} .csh-01 { --ink:#0b0d12; --paper:#f3efe6; --lime:#c8ff00; --coral:#ff5436; --glass:rgba(243,239,230,0.05); font-family:'Clash Display','Space Mono',sans-serif; background:var(--ink); color:var(--paper); min-height:100vh; position:relative; } /* scroll-snap container drives a PURE-CSS background swap via the sticky header's own scroll position — no JS scroll listeners. The sentinel + container query pattern keeps Core Web Vitals clean. */ .csh-01__scroll{height:100vh;overflow-y:scroll;scroll-behavior:smooth;position:relative} .csh-01__scroll::-webkit-scrollbar{width:0} .csh-01__header{ position:sticky;top:0;z-index:50; display:flex;align-items:center;justify-content:space-between; padding:20px clamp(20px,5vw,56px); background:transparent; border-bottom:1px solid transparent; transition:background .5s cubic-bezier(.16,1,.3,1),backdrop-filter .5s,padding .5s,border-color .5s; } /* The sentinel sits flush under the header. Once it scrolls out of view the header "sticks" — we detect the transition with an animation-timeline-free trick: the header background fades in as the page-top gradient scrolls away beneath the translucent bar, reading as a frosted solidify. */ .csh-01__scroll{animation:csh-01-solidify linear;animation-timeline:scroll(self);} @keyframes csh-01-solidify{ 0%,4%{--bgop:0;--blur:0px;--pad:20px} 9%,100%{--bgop:.72;--blur:18px;--pad:12px} } .csh-01__header{ background:rgba(11,13,18,var(--bgop,0)); backdrop-filter:blur(var(--blur,0px)) saturate(140%); -webkit-backdrop-filter:blur(var(--blur,0px)) saturate(140%); padding-top:var(--pad,20px);padding-bottom:var(--pad,20px); border-bottom-color:rgba(243,239,230,calc(var(--bgop,0) * .16)); } .csh-01__logo{display:flex;align-items:center;gap:12px;font-weight:700;font-size:1.35rem;letter-spacing:-.02em;text-decoration:none;color:var(--paper)} .csh-01__mark{width:34px;height:34px;border-radius:10px;background:var(--lime);display:grid;place-items:center;color:var(--ink);font-weight:700; box-shadow:0 0 0 0 rgba(200,255,0,.5);animation:csh-01-pulse 3s ease-in-out infinite} @keyframes csh-01-pulse{50%{box-shadow:0 0 0 8px rgba(200,255,0,0)}} .csh-01__logo b{font-family:'Space Mono',monospace;font-size:.62rem;letter-spacing:.3em;color:var(--lime);align-self:flex-start;margin-top:2px} .csh-01__nav{display:flex;gap:6px;align-items:center} .csh-01__nav a{position:relative;text-decoration:none;color:rgba(243,239,230,.78);font-size:.95rem;font-weight:500;padding:8px 14px;border-radius:8px;transition:color .3s,background .3s} .csh-01__nav a::after{content:'';position:absolute;left:14px;right:14px;bottom:4px;height:1.5px;background:var(--lime);transform:scaleX(0);transform-origin:left;transition:transform .35s cubic-bezier(.7,0,.2,1)} .csh-01__nav a:hover{color:var(--paper)} .csh-01__nav a:hover::after{transform:scaleX(1)} .csh-01__nav a.csh-01__cta{font-family:'Space Mono',monospace;font-size:.78rem;letter-spacing:.08em;text-transform:uppercase;background:var(--paper);color:var(--ink);padding:11px 20px;border-radius:30px;text-decoration:none;font-weight:700;transition:transform .3s cubic-bezier(.34,1.56,.64,1),background .3s,color .3s} .csh-01__nav a.csh-01__cta::after{display:none} .csh-01__nav a.csh-01__cta:hover{transform:translateY(-2px);background:var(--lime);color:var(--ink)} .csh-01__hero{min-height:100vh;display:grid;place-items:center;text-align:center;padding:0 24px;position:relative; background: radial-gradient(60% 70% at 50% 0%,rgba(200,255,0,.12),transparent 60%), radial-gradient(50% 50% at 85% 90%,rgba(255,84,54,.14),transparent 60%), var(--ink);} .csh-01__hero::before{content:'';position:absolute;inset:0;opacity:.5;pointer-events:none; background-image:linear-gradient(rgba(243,239,230,.04) 1px,transparent 1px),linear-gradient(90deg,rgba(243,239,230,.04) 1px,transparent 1px); background-size:60px 60px;-webkit-mask-image:radial-gradient(circle at 50% 40%,black,transparent 75%);mask-image:radial-gradient(circle at 50% 40%,black,transparent 75%)} .csh-01__eyebrow{font-family:'Space Mono',monospace;font-size:.72rem;letter-spacing:.45em;text-transform:uppercase;color:var(--lime);margin-bottom:24px;position:relative} .csh-01__hero h1{font-size:clamp(2.6rem,9vw,6.5rem);font-weight:700;line-height:.92;letter-spacing:-.04em;position:relative} .csh-01__hero h1 em{font-style:normal;color:var(--coral)} .csh-01__hero p{font-family:'Space Mono',monospace;margin-top:24px;font-size:11px;letter-spacing:.2em;color:rgba(243,239,230,.5);position:relative} .csh-01__scrollhint{position:absolute;bottom:36px;left:50%;transform:translateX(-50%);font-family:'Space Mono',monospace;font-size:10px;letter-spacing:.3em;color:rgba(243,239,230,.4);animation:csh-01-bob 2s ease-in-out infinite} @keyframes csh-01-bob{50%{transform:translateX(-50%) translateY(8px)}} .csh-01__content{padding:8vh clamp(24px,8vw,120px);max-width:1100px;margin:0 auto;display:grid;gap:48px} .csh-01__block{border-left:2px solid var(--lime);padding-left:28px} .csh-01__block span{font-family:'Space Mono',monospace;font-size:10px;letter-spacing:.3em;color:var(--coral)} .csh-01__block h2{font-size:clamp(1.6rem,4vw,2.8rem);font-weight:600;letter-spacing:-.02em;margin:10px 0 12px} .csh-01__block p{color:rgba(243,239,230,.62);line-height:1.7;max-width:60ch;font-family:'Space Mono',monospace;font-size:.9rem} @media (max-width:680px){.csh-01__nav a:not(.csh-01__cta){display:none}} @media (prefers-reduced-motion: reduce){ .csh-01__scroll{animation:none !important} .csh-01__header{background:rgba(11,13,18,.72);backdrop-filter:blur(18px)} .csh-01__mark,.csh-01__scrollhint{animation:none !important} } ``` ### 02. CSS Grid Mega Menu Header **Type:** Pure CSS **Description:** A multi-column mega menu built with CSS Grid inside a panel that fades and lifts via opacity/visibility, triggered purely by :hover and :focus-within. Editorial Fraunces serif, warm cream palette, gradient feature cards and grain texture — keyboard-accessible and zero-JS, ideal for e-commerce and content-heavy navs. **HTML:** ```html ``` **CSS:** ```css @import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,600;9..144,900&family=DM+Mono:wght@400;500&display=swap'); .csh-02, .csh-02 *, .csh-02 *::before, .csh-02 *::after { box-sizing: border-box; margin: 0; padding: 0; } .csh-02 ::selection{background:var(--plum);color:#fff} .csh-02 ::-moz-selection{background:var(--plum);color:#fff} .csh-02{ --bg:#faf6f0; --ink:#1a1410; --plum:#6d28d9; --rust:#c2410c; --sage:#3f6212; --card:#fffdf9; font-family:'Fraunces',serif; background:var(--bg);color:var(--ink); min-height:100vh;position:relative;overflow-x:hidden; } .csh-02__noise{position:fixed;inset:0;z-index:0;pointer-events:none;opacity:.04;mix-blend-mode:multiply; background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E")} .csh-02__header{position:sticky;top:0;z-index:50;background:rgba(250,246,240,.85);backdrop-filter:blur(16px);border-bottom:1px solid rgba(26,20,16,.08)} .csh-02__bar{display:flex;align-items:center;justify-content:space-between;padding:0 clamp(20px,5vw,56px);height:74px;max-width:1280px;margin:0 auto} .csh-02__logo{font-weight:900;font-size:1.5rem;letter-spacing:-.03em;text-decoration:none;color:var(--ink);font-variation-settings:'opsz' 144} .csh-02__logo em{font-style:italic;color:var(--plum)} .csh-02__nav{display:flex;align-items:stretch;height:74px} .csh-02__item{position:relative;display:flex;align-items:center} .csh-02__item>a{display:flex;align-items:center;gap:6px;height:100%;padding:0 20px;text-decoration:none;color:var(--ink);font-weight:600;font-size:1rem;font-family:'DM Mono',monospace;letter-spacing:-.01em} .csh-02__item>a svg{width:12px;height:12px;transition:transform .35s cubic-bezier(.7,0,.2,1)} .csh-02__item:hover>a svg,.csh-02__item:focus-within>a svg{transform:rotate(180deg)} .csh-02__item>a::after{content:'';position:absolute;left:20px;right:20px;bottom:18px;height:2px;background:var(--rust);transform:scaleX(0);transform-origin:left;transition:transform .3s} .csh-02__item:hover>a::after,.csh-02__item:focus-within>a::after{transform:scaleX(1)} /* MEGA PANEL — CSS Grid inside a container that fades + lifts via opacity/visibility, triggered purely by :hover and :focus-within. No JS. */ .csh-02__mega{ position:absolute;top:74px;left:50%;transform:translateX(-50%) translateY(14px); width:min(880px,92vw); background:var(--card); border:1px solid rgba(26,20,16,.08); border-radius:22px; box-shadow:0 40px 80px -30px rgba(26,20,16,.35),0 0 0 1px rgba(255,255,255,.6) inset; padding:28px; display:grid;grid-template-columns:1.3fr 1fr 1fr;gap:8px; opacity:0;visibility:hidden;pointer-events:none; transition:opacity .4s cubic-bezier(.16,1,.3,1),transform .45s cubic-bezier(.16,1,.3,1),visibility .4s; } .csh-02__item:hover .csh-02__mega,.csh-02__item:focus-within .csh-02__mega{ opacity:1;visibility:visible;pointer-events:auto;transform:translateX(-50%) translateY(0); } .csh-02__col h4{font-family:'DM Mono',monospace;font-size:.66rem;letter-spacing:.25em;text-transform:uppercase;color:var(--rust);padding:10px 14px 8px} .csh-02__link{display:block;padding:11px 14px;border-radius:12px;text-decoration:none;color:var(--ink);transition:background .25s,transform .25s} .csh-02__link strong{display:block;font-weight:600;font-size:1.02rem;letter-spacing:-.01em} .csh-02__link span{font-family:'DM Mono',monospace;font-size:.72rem;color:rgba(26,20,16,.5)} .csh-02__link:hover{background:rgba(109,40,217,.06);transform:translateX(4px)} .csh-02__feature{grid-column:span 1;background:linear-gradient(150deg,var(--plum),#9333ea);border-radius:16px;padding:20px;color:#fff;display:flex;flex-direction:column;justify-content:space-between;min-height:180px} .csh-02__feature span{font-family:'DM Mono',monospace;font-size:.62rem;letter-spacing:.25em;opacity:.8} .csh-02__feature h3{font-size:1.5rem;line-height:1.05;font-weight:600;font-style:italic} .csh-02__feature a{align-self:flex-start;background:#fff;color:var(--plum);font-family:'DM Mono',monospace;font-size:.72rem;font-weight:500;padding:8px 16px;border-radius:30px;text-decoration:none;letter-spacing:.05em} .csh-02__nav a.csh-02__cta{font-family:'DM Mono',monospace;font-weight:500;font-size:.82rem;background:var(--ink);color:var(--bg);padding:11px 22px;border-radius:30px;text-decoration:none;transition:transform .3s cubic-bezier(.34,1.56,.64,1),color .3s} .csh-02__nav a.csh-02__cta::after{display:none} .csh-02__nav a.csh-02__cta:hover{transform:translateY(-2px);color:var(--bg)} .csh-02__hero{position:relative;z-index:1;min-height:calc(100vh - 74px);display:grid;place-items:center;text-align:center;padding:0 24px} .csh-02__hero h1{font-size:clamp(2.8rem,10vw,7rem);font-weight:900;line-height:.92;letter-spacing:-.04em;font-variation-settings:'opsz' 144} .csh-02__hero h1 em{font-style:italic;color:var(--rust)} .csh-02__hero p{font-family:'DM Mono',monospace;margin-top:22px;font-size:.78rem;letter-spacing:.2em;text-transform:uppercase;color:rgba(26,20,16,.5)} @media (max-width:860px){.csh-02__nav .csh-02__item:not(:last-child){display:none}.csh-02__mega{display:none}} @media (prefers-reduced-motion: reduce){.csh-02__mega,.csh-02__item>a svg,.csh-02__link,.csh-02__cta{transition:none !important}} ``` ### 03. Flexbox 3-Column Navbar Header **Type:** CSS + JS **Description:** The classic performance-first blueprint: logo left, centred navigation, CTA plus search right — held together by display:flex and justify-content:space-between. A floating pill bar on a dark mint/amber stage with stat counters; the fastest, lightest layout with no JS required for the layout itself. **HTML:** ```html
    display: flex · space-between

    Three columns,
    perfectly aligned.

    The fastest-loading blueprint — logo, centred nav, and a call-to-action, balanced by flexbox alone.

    0kbJS for layout
    100Lighthouse
    1flex container
    ``` **CSS:** ```css @import url('https://fonts.googleapis.com/css2?family=Sora:wght@400;600;700;800&family=IBM+Plex+Mono:wght@400;500&display=swap'); .csh-03, .csh-03 *, .csh-03 *::before, .csh-03 *::after { box-sizing: border-box; margin: 0; padding: 0; } .csh-03{ --bg:#0a0e0d; --panel:#0f1513; --mint:#4ade80; --ice:#e6fff4; --amber:#fbbf24; font-family:'Sora',sans-serif; background: radial-gradient(70% 50% at 50% -10%,rgba(74,222,128,.1),transparent 60%), var(--bg); color:var(--ice); min-height:100vh;position:relative;overflow-x:hidden; } .csh-03__beam{position:absolute;top:0;left:50%;transform:translateX(-50%);width:1px;height:100%; background:linear-gradient(180deg,rgba(74,222,128,.4),transparent 40%);opacity:.5;z-index:0} .csh-03__header{position:sticky;top:0;z-index:50;padding:16px clamp(16px,4vw,40px)} /* THREE-COLUMN FLEX: logo left · nav centred · actions right. space-between handles outer alignment, the centre column flexes to fill. */ .csh-03__bar{ display:flex;align-items:center;justify-content:space-between; max-width:1240px;margin:0 auto; background:rgba(15,21,19,.7); backdrop-filter:blur(14px); border:1px solid rgba(74,222,128,.14); border-radius:18px; padding:10px 12px 10px 18px; box-shadow:0 20px 50px -20px rgba(0,0,0,.6); } .csh-03__left{display:flex;align-items:center;gap:11px;flex:0 0 auto} .csh-03__logo{width:32px;height:32px;border-radius:9px;background:linear-gradient(135deg,var(--mint),#22c55e);display:grid;place-items:center;color:#04150c;font-weight:800;font-size:1rem} .csh-03__name{font-weight:700;font-size:1.1rem;letter-spacing:-.02em} .csh-03__name b{font-family:'IBM Plex Mono',monospace;font-weight:400;font-size:.6rem;color:var(--mint);display:block;letter-spacing:.18em;margin-top:-2px} .csh-03__center{display:flex;gap:4px;flex:1 1 auto;justify-content:center} .csh-03__center a{position:relative;text-decoration:none;color:rgba(230,255,244,.7);font-size:.92rem;font-weight:500;padding:9px 16px;border-radius:10px;transition:color .3s,background .3s} .csh-03__center a:hover{color:var(--ice);background:rgba(74,222,128,.08)} .csh-03__center a.is-on{color:var(--ice);background:rgba(74,222,128,.12)} .csh-03__right{display:flex;align-items:center;gap:8px;flex:0 0 auto} .csh-03__icon{width:40px;height:40px;border-radius:11px;display:grid;place-items:center;background:rgba(230,255,244,.05);border:1px solid rgba(230,255,244,.1);color:var(--ice);cursor:pointer;transition:transform .3s cubic-bezier(.34,1.56,.64,1),border-color .3s} .csh-03__icon:hover{transform:translateY(-2px);border-color:var(--mint)} .csh-03__icon svg{width:18px;height:18px} .csh-03__cta{font-family:'IBM Plex Mono',monospace;font-size:.78rem;font-weight:500;letter-spacing:.04em;background:var(--mint);color:#04150c;padding:11px 20px;border-radius:11px;text-decoration:none;transition:transform .3s cubic-bezier(.34,1.56,.64,1),box-shadow .3s} .csh-03__cta:hover{transform:translateY(-2px);box-shadow:0 8px 24px -6px rgba(74,222,128,.6)} .csh-03__hero{position:relative;z-index:1;min-height:calc(100vh - 80px);display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:0 24px} .csh-03__tagline{font-family:'IBM Plex Mono',monospace;font-size:.72rem;letter-spacing:.4em;text-transform:uppercase;color:var(--mint);margin-bottom:26px;padding:7px 16px;border:1px solid rgba(74,222,128,.25);border-radius:30px} .csh-03__hero h1{font-size:clamp(2.6rem,9vw,6rem);font-weight:800;line-height:.95;letter-spacing:-.04em} .csh-03__hero h1 em{font-style:normal;background:linear-gradient(120deg,var(--mint),var(--amber));-webkit-background-clip:text;background-clip:text;color:transparent} .csh-03__hero p{font-family:'IBM Plex Mono',monospace;margin-top:24px;font-size:.8rem;letter-spacing:.15em;color:rgba(230,255,244,.5);max-width:46ch} .csh-03__specs{display:flex;gap:28px;margin-top:44px;flex-wrap:wrap;justify-content:center} .csh-03__spec{font-family:'IBM Plex Mono',monospace;font-size:.72rem;color:rgba(230,255,244,.55)} .csh-03__spec b{display:block;font-family:'Sora',sans-serif;font-size:1.5rem;color:var(--ice);font-weight:700} @media (max-width:760px){.csh-03__center{display:none}.csh-03__name b{display:none}} @media (prefers-reduced-motion: reduce){.csh-03__icon,.csh-03__cta,.csh-03__center a{transition:none !important}} ``` **JS:** ```js (() => { const root = document.querySelector('.csh-03'); if (!root) return; const links = root.querySelectorAll('.csh-03__center a'); links.forEach(a => a.addEventListener('click', (e) => { e.preventDefault(); links.forEach(l => l.classList.remove('is-on')); a.classList.add('is-on'); })); const icon = root.querySelector('.csh-03__icon'); if (icon) icon.addEventListener('click', () => { icon.style.transform = 'translateY(0) scale(.92)'; setTimeout(() => { icon.style.transform = ''; }, 150); }); })(); ``` ### 04. Full-Screen Overlay Hamburger Header **Type:** Pure CSS **Description:** A full-viewport overlay opened with the checkbox hack ( + :checked + sibling selectors) — no JavaScript at all. A circular clip-path reveal, animated aurora backdrop, bars-to-X morph and staggered oversized link entrances on a violet/pink/cyan scheme. **HTML:** ```html

    Tap the icon.
    Full screen.

    The checkbox hack — zero javascript

    ``` **CSS:** ```css @import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,400..800&family=Azeret+Mono:wght@400;500&display=swap'); .csh-04, .csh-04 *, .csh-04 *::before, .csh-04 *::after { box-sizing: border-box; margin: 0; padding: 0; } .csh-04{ --ink:#120c1a; --paper:#f7f0ff; --violet:#a855f7; --pink:#f472b6; --cyan:#22d3ee; font-family:'Bricolage Grotesque',sans-serif; background:var(--ink);color:var(--paper); min-height:100vh;position:relative;overflow:hidden; } .csh-04__aura{position:absolute;inset:-20%;z-index:0;filter:blur(80px);opacity:.5; background:radial-gradient(40% 40% at 25% 30%,var(--violet),transparent 70%),radial-gradient(45% 45% at 78% 70%,var(--pink),transparent 70%),radial-gradient(35% 35% at 60% 25%,var(--cyan),transparent 70%); animation:csh-04-drift 18s ease-in-out infinite alternate} @keyframes csh-04-drift{to{transform:translate(3%,-4%) scale(1.1)}} .csh-04__header{position:relative;z-index:60;display:flex;align-items:center;justify-content:space-between;padding:22px clamp(20px,5vw,48px)} .csh-04__logo{font-weight:800;font-size:1.4rem;letter-spacing:-.03em;text-decoration:none;color:var(--paper);position:relative;z-index:60} .csh-04__logo em{font-style:normal;color:var(--cyan)} /* CHECKBOX HACK: hidden input + label trigger + :checked sibling selector toggle a full-viewport overlay — entirely without JavaScript. */ .csh-04__toggle{position:absolute;opacity:0;pointer-events:none} .csh-04__trigger{position:relative;z-index:60;width:56px;height:56px;border-radius:50%;display:grid;place-items:center;cursor:pointer; background:rgba(247,240,255,.06);border:1px solid rgba(247,240,255,.16);backdrop-filter:blur(12px); transition:transform .5s cubic-bezier(.16,1,.3,1),border-color .4s} .csh-04__trigger:hover{transform:scale(1.06);border-color:var(--violet)} .csh-04__bars{width:24px;height:14px;position:relative;display:block} .csh-04__bars span{position:absolute;left:0;height:2px;width:100%;background:var(--paper);border-radius:2px;transition:transform .5s cubic-bezier(.7,0,.2,1),opacity .35s,background .4s} .csh-04__bars span:nth-child(1){top:0} .csh-04__bars span:nth-child(2){top:6px} .csh-04__bars span:nth-child(3){top:12px} .csh-04__toggle:checked ~ .csh-04__header .csh-04__bars span:nth-child(1){transform:translateY(6px) rotate(45deg);background:var(--cyan)} .csh-04__toggle:checked ~ .csh-04__header .csh-04__bars span:nth-child(2){opacity:0} .csh-04__toggle:checked ~ .csh-04__header .csh-04__bars span:nth-child(3){transform:translateY(-6px) rotate(-45deg);background:var(--cyan)} .csh-04__overlay{ position:absolute;inset:0;z-index:50; display:flex;flex-direction:column;justify-content:center;padding:0 clamp(24px,9vw,120px); background:rgba(18,12,26,.78);backdrop-filter:blur(28px) saturate(150%); -webkit-clip-path:circle(0% at calc(100% - 48px) 50px);clip-path:circle(0% at calc(100% - 48px) 50px); transition:clip-path .8s cubic-bezier(.76,0,.24,1),-webkit-clip-path .8s cubic-bezier(.76,0,.24,1); pointer-events:none} .csh-04__toggle:checked ~ .csh-04__overlay{-webkit-clip-path:circle(170% at calc(100% - 48px) 50px);clip-path:circle(170% at calc(100% - 48px) 50px);pointer-events:auto} .csh-04__eyebrow{font-family:'Azeret Mono',monospace;font-size:11px;letter-spacing:.5em;text-transform:uppercase;color:var(--cyan);margin-bottom:28px;opacity:0;transition:opacity .4s} .csh-04__toggle:checked ~ .csh-04__overlay .csh-04__eyebrow{opacity:1;transition-delay:.45s} .csh-04__menu{list-style:none} .csh-04__menu li{overflow:hidden} .csh-04__menu a{font-size:clamp(2rem,9vw,4.5rem);font-weight:700;line-height:1.02;letter-spacing:-.03em;color:var(--paper);text-decoration:none;display:inline-block;transform:translateY(120%);transition:transform .7s cubic-bezier(.16,1,.3,1),color .3s} .csh-04__menu a .csh-04__num{font-family:'Azeret Mono',monospace;font-size:.7rem;vertical-align:super;color:var(--pink);margin-right:.5em;font-weight:500} .csh-04__menu a:hover{color:var(--violet)} .csh-04__toggle:checked ~ .csh-04__overlay .csh-04__menu li:nth-child(1) a{transform:translateY(0);transition-delay:.42s} .csh-04__toggle:checked ~ .csh-04__overlay .csh-04__menu li:nth-child(2) a{transform:translateY(0);transition-delay:.5s} .csh-04__toggle:checked ~ .csh-04__overlay .csh-04__menu li:nth-child(3) a{transform:translateY(0);transition-delay:.58s} .csh-04__toggle:checked ~ .csh-04__overlay .csh-04__menu li:nth-child(4) a{transform:translateY(0);transition-delay:.66s} .csh-04__toggle:checked ~ .csh-04__overlay .csh-04__menu li:nth-child(5) a{transform:translateY(0);transition-delay:.74s} .csh-04__foot{margin-top:38px;font-family:'Azeret Mono',monospace;font-size:11px;color:rgba(247,240,255,.5);display:flex;gap:20px;flex-wrap:wrap;opacity:0;transition:opacity .4s} .csh-04__toggle:checked ~ .csh-04__overlay .csh-04__foot{opacity:1;transition-delay:.85s} .csh-04__foot a{color:inherit;text-decoration:none} .csh-04__foot a:hover{color:var(--cyan)} .csh-04__hero{position:relative;z-index:10;min-height:calc(100vh - 100px);display:grid;place-items:center;text-align:center;padding:0 24px;pointer-events:none} .csh-04__hero h1{font-size:clamp(2.4rem,9vw,5.5rem);font-weight:800;letter-spacing:-.04em;line-height:.92} .csh-04__hero h1 em{font-style:normal;color:var(--pink)} .csh-04__hero p{font-family:'Azeret Mono',monospace;margin-top:20px;font-size:11px;letter-spacing:.25em;text-transform:uppercase;color:rgba(247,240,255,.55)} @media (prefers-reduced-motion: reduce){ .csh-04__aura{animation:none !important} .csh-04__trigger,.csh-04__bars span,.csh-04__overlay,.csh-04__eyebrow,.csh-04__menu a,.csh-04__foot{transition:none !important} } ``` ### 05. Glassmorphism Transparent Header **Type:** Pure CSS **Description:** A floating frosted bar using background:rgba() with backdrop-filter:blur(20px) saturate(160%) and inner highlight strokes, blurring against a vibrant animated hero gradient with noise. High-end SaaS aesthetic with Outfit type and a soft mobile collapse. **HTML:** ```html
    backdrop-filter: blur(20px)

    Frosted glass,
    floating free.

    A header that melts into the hero behind it

    ``` **CSS:** ```css @import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;800&family=Spline+Sans+Mono:wght@400;500&display=swap'); .csh-05, .csh-05 *, .csh-05 *::before, .csh-05 *::after { box-sizing: border-box; margin: 0; padding: 0; } .csh-05 ::selection{background:#fff;color:#5f27cd} .csh-05 ::-moz-selection{background:#fff;color:#5f27cd} .csh-05{ --white:#ffffff; --glass:rgba(255,255,255,0.12); --stroke:rgba(255,255,255,0.28); font-family:'Outfit',sans-serif; min-height:100vh;position:relative;overflow:hidden;color:var(--white); background:#0a0a18; } /* Vibrant animated hero "image" the glass blurs against */ .csh-05__hero-bg{position:absolute;inset:0;z-index:0; background: radial-gradient(45% 55% at 18% 25%,#ff6b9d,transparent 65%), radial-gradient(50% 50% at 82% 30%,#feca57,transparent 60%), radial-gradient(55% 60% at 50% 95%,#48dbfb,transparent 60%), radial-gradient(40% 45% at 70% 75%,#a55eea,transparent 60%), linear-gradient(135deg,#5f27cd,#ee5253); animation:csh-05-shift 22s ease-in-out infinite alternate} @keyframes csh-05-shift{50%{filter:hue-rotate(28deg)}to{transform:scale(1.12) translate(-2%,2%)}} .csh-05__hero-bg::after{content:'';position:absolute;inset:0; background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");opacity:.07;mix-blend-mode:overlay} .csh-05__header{position:fixed;top:18px;left:50%;transform:translateX(-50%);z-index:50;width:min(1180px,calc(100% - 36px))} /* GLASSMORPHISM: translucent fill + backdrop blur + inner highlight */ .csh-05__bar{ display:flex;align-items:center;justify-content:space-between; padding:12px 14px 12px 22px; background:var(--glass); backdrop-filter:blur(20px) saturate(160%); -webkit-backdrop-filter:blur(20px) saturate(160%); border:1px solid var(--stroke); border-radius:22px; box-shadow:0 8px 40px -8px rgba(0,0,0,.35),inset 0 1px 0 rgba(255,255,255,.5),inset 0 -1px 0 rgba(255,255,255,.08); } .csh-05__logo{display:flex;align-items:center;gap:10px;font-weight:800;font-size:1.25rem;letter-spacing:-.02em;text-decoration:none;color:var(--white)} .csh-05__dot{width:30px;height:30px;border-radius:50%;background:radial-gradient(circle at 30% 30%,#fff,rgba(255,255,255,.4));box-shadow:0 0 18px rgba(255,255,255,.6)} .csh-05__nav{display:flex;gap:4px;align-items:center} .csh-05__nav a{position:relative;text-decoration:none;color:rgba(255,255,255,.82);font-size:.92rem;font-weight:400;padding:9px 16px;border-radius:12px;transition:color .3s,background .3s} .csh-05__nav a:hover{color:#fff;background:rgba(255,255,255,.14)} .csh-05__nav a.csh-05__cta{font-family:'Spline Sans Mono',monospace;font-size:.78rem;font-weight:500;letter-spacing:.02em;background:rgba(255,255,255,.92);color:#5f27cd;padding:11px 22px;border-radius:14px;text-decoration:none;transition:transform .3s cubic-bezier(.34,1.56,.64,1),box-shadow .3s,color .3s,background .3s} .csh-05__nav a.csh-05__cta:hover{transform:translateY(-2px);color:#5f27cd;background:#fff;box-shadow:0 10px 28px -8px rgba(255,255,255,.6)} .csh-05__hero{position:relative;z-index:10;min-height:100vh;display:grid;place-items:center;text-align:center;padding:0 24px} .csh-05__eyebrow{font-family:'Spline Sans Mono',monospace;font-size:.72rem;letter-spacing:.4em;text-transform:uppercase;color:rgba(255,255,255,.85);margin-bottom:24px;padding:8px 18px;background:var(--glass);backdrop-filter:blur(10px);border:1px solid var(--stroke);border-radius:30px;display:inline-block} .csh-05__hero h1{font-size:clamp(2.8rem,11vw,7.5rem);font-weight:800;line-height:.9;letter-spacing:-.045em;text-shadow:0 4px 40px rgba(0,0,0,.25)} .csh-05__hero h1 em{font-style:normal;font-weight:300} .csh-05__hero p{font-family:'Spline Sans Mono',monospace;margin-top:24px;font-size:.82rem;letter-spacing:.18em;color:rgba(255,255,255,.78)} @media (max-width:720px){.csh-05__nav a:not(.csh-05__cta){display:none}} @media (prefers-reduced-motion: reduce){.csh-05__hero-bg{animation:none !important}.csh-05__nav a,.csh-05__cta{transition:none !important}} ``` ### 06. Header with Announcement Bar **Type:** Pure CSS **Description:** A marketing alert banner stacked above the nav inside one sticky flex-direction:column wrapper, so banner and nav move as a single unit. Dismissing the banner smoothly collapses it via a grid-template-rows 1fr to 0fr checkbox-hack transition. Bold cream/tomato store aesthetic with Cabinet Grotesk, a shimmer sweep and a cart badge. **HTML:** ```html
    FREE SHIP Free shipping on orders over $50 — ends Sunday. Shop the sale →

    One sticky stack.
    Banner + nav.

    flex-direction: column · they move as one · tap ✕ to dismiss

    ``` **CSS:** ```css @import url('https://fonts.googleapis.com/css2?family=Cabinet+Grotesk:wght@400;700;800;900&family=Martian+Mono:wght@400;500&display=swap'); @import url('https://api.fontshare.com/v2/css?f[]=cabinet-grotesk@400,700,800,900&display=swap'); .csh-06, .csh-06 *, .csh-06 *::before, .csh-06 *::after { box-sizing: border-box; margin: 0; padding: 0; } .csh-06 ::selection{background:var(--tomato);color:#fff} .csh-06 ::-moz-selection{background:var(--tomato);color:#fff} .csh-06{ --cream:#fff8ee; --ink:#181410; --tomato:#e8420c; --berry:#b91c5c; --gold:#d4a017; font-family:'Cabinet Grotesk','Martian Mono',sans-serif; background:var(--cream);color:var(--ink); min-height:100vh;position:relative;overflow-x:hidden; } /* The announcement bar + nav live in ONE vertical flex wrapper that is sticky as a unit, so they always move together and content never gets covered. Dismissing the bar slides the whole stack up smoothly. */ .csh-06__stack{position:sticky;top:0;z-index:50;display:flex;flex-direction:column} .csh-06__announce{ background:linear-gradient(90deg,var(--tomato),var(--berry)); color:#fff;overflow:hidden; display:grid;grid-template-rows:1fr; transition:grid-template-rows .5s cubic-bezier(.76,0,.24,1); } .csh-06__announce-inner{min-height:0;display:flex;align-items:center;justify-content:center;gap:14px;padding:11px 48px 11px 20px;position:relative;font-family:'Martian Mono',monospace;font-size:.74rem;letter-spacing:.04em} .csh-06__announce-inner b{font-family:'Cabinet Grotesk',sans-serif;font-weight:800;background:#fff;color:var(--tomato);padding:2px 8px;border-radius:4px;font-size:.72rem;letter-spacing:0} .csh-06__announce-inner a{color:#fff;text-decoration:underline;text-underline-offset:3px;font-weight:500} .csh-06__spark{position:absolute;left:0;top:0;height:100%;width:100%;pointer-events:none; background:linear-gradient(90deg,transparent,rgba(255,255,255,.18),transparent); background-size:50% 100%;background-repeat:no-repeat;animation:csh-06-sweep 4s linear infinite} @keyframes csh-06-sweep{0%{background-position:-60% 0}100%{background-position:160% 0}} .csh-06__close{position:absolute;right:14px;top:50%;transform:translateY(-50%);width:26px;height:26px;border-radius:7px;border:none;background:rgba(255,255,255,.18);color:#fff;cursor:pointer;display:grid;place-items:center;transition:background .25s} .csh-06__close:hover{background:rgba(255,255,255,.32)} /* dismissed state — checkbox hack collapses the announcement row to 0 */ .csh-06__dismiss{position:absolute;opacity:0;pointer-events:none} .csh-06__dismiss:checked ~ .csh-06__stack .csh-06__announce{grid-template-rows:0fr} .csh-06__nav{background:rgba(255,248,238,.9);backdrop-filter:blur(14px);border-bottom:2px solid var(--ink)} .csh-06__bar{display:flex;align-items:center;justify-content:space-between;padding:0 clamp(20px,5vw,48px);height:72px;max-width:1280px;margin:0 auto} .csh-06__logo{font-weight:900;font-size:1.5rem;letter-spacing:-.03em;text-decoration:none;color:var(--ink);display:flex;align-items:center;gap:9px} .csh-06__logo span{width:30px;height:30px;background:var(--ink);color:var(--gold);display:grid;place-items:center;border-radius:8px;font-size:1rem;transform:rotate(-6deg)} .csh-06__links{display:flex;gap:6px;align-items:center} .csh-06__links a{position:relative;text-decoration:none;color:var(--ink);font-weight:700;font-size:.95rem;padding:8px 14px;transition:color .25s} .csh-06__links a::after{content:'';position:absolute;left:14px;right:14px;bottom:2px;height:3px;background:var(--gold);transform:scaleX(0);transform-origin:left;transition:transform .3s cubic-bezier(.7,0,.2,1)} .csh-06__links a:hover::after{transform:scaleX(1)} .csh-06__links a.csh-06__cart{font-family:'Martian Mono',monospace;font-size:.78rem;font-weight:500;background:var(--ink);color:var(--cream);padding:11px 20px;border-radius:30px;text-decoration:none;display:flex;align-items:center;gap:8px;transition:transform .3s cubic-bezier(.34,1.56,.64,1),color .3s} .csh-06__links a.csh-06__cart::after{display:none} .csh-06__links a.csh-06__cart:hover{transform:translateY(-2px);color:var(--cream)} .csh-06__cart b{background:var(--tomato);color:#fff;width:18px;height:18px;border-radius:50%;display:grid;place-items:center;font-size:.6rem} .csh-06__hero{position:relative;z-index:1;min-height:80vh;display:grid;place-items:center;text-align:center;padding:8vh 24px} .csh-06__hero h1{font-size:clamp(2.6rem,10vw,6.5rem);font-weight:900;line-height:.92;letter-spacing:-.04em} .csh-06__hero h1 em{font-style:normal;color:var(--tomato)} .csh-06__hero p{font-family:'Martian Mono',monospace;margin-top:22px;font-size:.78rem;letter-spacing:.18em;text-transform:uppercase;color:rgba(24,20,16,.55)} .csh-06__grid{position:absolute;inset:0;z-index:0;opacity:.5;pointer-events:none; background-image:linear-gradient(rgba(24,20,16,.05) 1px,transparent 1px),linear-gradient(90deg,rgba(24,20,16,.05) 1px,transparent 1px);background-size:48px 48px; -webkit-mask-image:radial-gradient(circle at 50% 40%,black,transparent 75%);mask-image:radial-gradient(circle at 50% 40%,black,transparent 75%)} @media (max-width:720px){.csh-06__links a:not(.csh-06__cart){display:none}.csh-06__announce-inner{font-size:.66rem;padding-right:44px}} @media (prefers-reduced-motion: reduce){.csh-06__spark{animation:none !important}.csh-06__announce,.csh-06__cart,.csh-06__links a::after{transition:none !important}} ``` ### 07. Two-Tier Double-Decker Header **Type:** Pure CSS **Description:** A double-decker layout: a dark utility bar (support, docs, login, language/currency) stacked directly above a larger primary navigation row, grouped inside a single
    via CSS Grid. The top tier collapses on mobile to reclaim space. Cool cobalt-on-fog enterprise aesthetic with Familjen Grotesk. **HTML:** ```html
    Enterprise portal 24/7 support

    Two tiers,
    one header.

    Utility bar + primary nav · collapses on mobile

    ``` **CSS:** ```css @import url('https://fonts.googleapis.com/css2?family=Familjen+Grotesk:wght@400;500;700&family=Spline+Sans+Mono:wght@400;500&display=swap'); .csh-07, .csh-07 *, .csh-07 *::before, .csh-07 *::after { box-sizing: border-box; margin: 0; padding: 0; } .csh-07 ::selection{background:var(--cobalt);color:#fff} .csh-07 ::-moz-selection{background:var(--cobalt);color:#fff} .csh-07{ --bg:#f0f2f7; --ink:#10141f; --cobalt:#1f3df0; --steel:#5b6478; --line:rgba(16,20,31,.1); font-family:'Familjen Grotesk',sans-serif; background:var(--bg);color:var(--ink); min-height:100vh;position:relative;overflow-x:hidden; } /* ONE
    parent, TWO stacked container rows (utility + primary). Grid handles the vertical stack; the top tier collapses on mobile. */ .csh-07__header{position:sticky;top:0;z-index:50;display:grid;grid-template-rows:auto auto; background:#fff;border-bottom:1px solid var(--line);box-shadow:0 1px 0 var(--line)} .csh-07__utility{background:var(--ink);color:rgba(255,255,255,.78)} .csh-07__utility-inner{max-width:1280px;margin:0 auto;height:38px;display:flex;align-items:center;justify-content:space-between;padding:0 clamp(16px,4vw,40px);font-family:'Spline Sans Mono',monospace;font-size:.72rem;letter-spacing:.02em} .csh-07__utility-left{display:flex;gap:18px;align-items:center} .csh-07__utility-left span{display:flex;align-items:center;gap:6px} .csh-07__utility-left svg{width:12px;height:12px;opacity:.7} .csh-07__utility-right{display:flex;gap:4px;align-items:center} .csh-07__utility-right a{color:rgba(255,255,255,.78);text-decoration:none;padding:5px 10px;border-radius:6px;transition:color .25s,background .25s} .csh-07__utility-right a:hover{color:#fff;background:rgba(255,255,255,.1)} .csh-07__lang{display:flex;align-items:center;gap:5px;color:var(--cobalt);font-weight:500} .csh-07__lang b{width:5px;height:5px;border-radius:50%;background:var(--cobalt)} .csh-07__primary{max-width:1280px;margin:0 auto;width:100%;height:70px;display:flex;align-items:center;justify-content:space-between;padding:0 clamp(16px,4vw,40px)} .csh-07__logo{display:flex;align-items:center;gap:11px;font-weight:700;font-size:1.5rem;letter-spacing:-.03em;text-decoration:none;color:var(--ink)} .csh-07__logo span{width:34px;height:34px;border-radius:9px;background:var(--cobalt);color:#fff;display:grid;place-items:center;font-size:1rem;font-weight:700} .csh-07__nav{display:flex;gap:2px;align-items:center} .csh-07__nav>a{position:relative;text-decoration:none;color:var(--ink);font-weight:500;font-size:.96rem;padding:10px 16px;border-radius:9px;transition:background .25s} .csh-07__nav>a:hover{background:rgba(31,61,240,.07)} .csh-07__nav>a::after{content:'';position:absolute;left:16px;right:16px;bottom:5px;height:2px;background:var(--cobalt);transform:scaleX(0);transform-origin:left;transition:transform .3s cubic-bezier(.7,0,.2,1)} .csh-07__nav>a:hover::after{transform:scaleX(1)} .csh-07__search{display:flex;align-items:center;gap:9px;background:var(--bg);border:1px solid var(--line);border-radius:30px;padding:9px 16px;color:var(--steel);font-family:'Spline Sans Mono',monospace;font-size:.78rem;min-width:200px;cursor:text;transition:border-color .25s} .csh-07__search:hover{border-color:var(--cobalt)} .csh-07__search svg{width:15px;height:15px} .csh-07__hero{position:relative;z-index:1;min-height:calc(100vh - 108px);display:grid;place-items:center;text-align:center;padding:0 24px} .csh-07__hero h1{font-size:clamp(2.6rem,9vw,6rem);font-weight:700;line-height:.94;letter-spacing:-.04em} .csh-07__hero h1 em{font-style:normal;color:var(--cobalt)} .csh-07__hero p{font-family:'Spline Sans Mono',monospace;margin-top:22px;font-size:.78rem;letter-spacing:.18em;text-transform:uppercase;color:var(--steel)} .csh-07__rule{position:absolute;inset:0;z-index:0;pointer-events:none;opacity:.6; background-image:linear-gradient(90deg,var(--line) 1px,transparent 1px);background-size:80px 100%; -webkit-mask-image:linear-gradient(90deg,transparent,black 30%,black 70%,transparent);mask-image:linear-gradient(90deg,transparent,black 30%,black 70%,transparent)} @media (max-width:820px){ .csh-07__utility{display:none} /* top tier collapses to save space */ .csh-07__search{display:none} .csh-07__nav>a:nth-child(n+4){display:none} } @media (prefers-reduced-motion: reduce){.csh-07__nav>a,.csh-07__nav>a::after,.csh-07__search,.csh-07__utility-right a{transition:none !important}} ``` ### 08. Animated Link Hover Effects Header **Type:** Pure CSS **Description:** A micro-interaction showcase where every nav link demonstrates a different hardware-accelerated hover effect: scaleX underline wipe, clip-up text fill, background-size gradient sweep, dual-layer label swap and a bracket reveal. Acid-on-charcoal palette, all transform/opacity based for 100/100 Core Web Vitals. **HTML:** ```html

    Hover every
    link.

    Five distinct micro-interactions — scaleX, clip-up fill, background-size sweep, layer swap, and bracket reveal. All GPU-accelerated.

    ``` **CSS:** ```css @import url('https://fonts.googleapis.com/css2?family=Hanken+Grotesk:wght@400;500;700;800&family=Fragment+Mono&display=swap'); .csh-08, .csh-08 *, .csh-08 *::before, .csh-08 *::after { box-sizing: border-box; margin: 0; padding: 0; } .csh-08 ::selection{background:var(--acid);color:var(--ink)} .csh-08 ::-moz-selection{background:var(--acid);color:var(--ink)} .csh-08{ --ink:#0d0f0e; --paper:#ecebe4; --acid:#d6f034; --hot:#ff4d6d; --sky:#4cc9f0; font-family:'Hanken Grotesk',sans-serif; background:var(--ink);color:var(--paper); min-height:100vh;position:relative;overflow-x:hidden; } .csh-08__glow{position:absolute;inset:0;z-index:0;opacity:.4;pointer-events:none; background:radial-gradient(50% 50% at 50% 0%,rgba(214,240,52,.16),transparent 60%)} .csh-08__header{position:sticky;top:0;z-index:50;display:flex;align-items:center;justify-content:space-between; padding:20px clamp(20px,5vw,52px);background:rgba(13,15,14,.7);backdrop-filter:blur(16px);border-bottom:1px solid rgba(236,235,228,.08)} .csh-08__logo{font-weight:800;font-size:1.4rem;letter-spacing:-.03em;text-decoration:none;color:var(--paper)} .csh-08__logo em{font-style:normal;color:var(--acid)} .csh-08__nav{display:flex;gap:6px;align-items:center} /* Each link demonstrates a DIFFERENT hardware-accelerated hover micro-interaction. All transform/opacity based — no layout thrash, 100/100 CWV friendly. */ .csh-08__nav a{position:relative;text-decoration:none;color:var(--paper);font-weight:500;font-size:.98rem;padding:8px 4px;margin:0 12px;display:inline-block;font-family:'Fragment Mono',monospace} /* 1 — underline wipe via scaleX */ .csh-08__fx-underline::after{content:'';position:absolute;left:4px;right:4px;bottom:4px;height:2px;background:var(--acid);transform:scaleX(0);transform-origin:right;transition:transform .4s cubic-bezier(.7,0,.2,1)} .csh-08__fx-underline:hover::after{transform:scaleX(1);transform-origin:left} /* 2 — text fill: a colored duplicate clips up from below. The mask wrapper is sized exactly to the text (overflow:hidden, line-height:1) so the second layer is hidden at rest instead of peeking into the link's padding. */ .csh-08__mask{display:inline-block;position:relative;overflow:hidden;line-height:1;vertical-align:top} .csh-08__fx-fill .csh-08__mask span{display:block;transition:transform .45s cubic-bezier(.7,0,.2,1)} .csh-08__fx-fill .csh-08__mask span::before{content:attr(data-t);position:absolute;left:0;top:100%;color:var(--hot)} .csh-08__fx-fill:hover .csh-08__mask span{transform:translateY(-100%)} /* 3 — background gradient sweep via background-size */ .csh-08__fx-sweep{background-image:linear-gradient(var(--sky),var(--sky));background-repeat:no-repeat;background-position:0 82%;background-size:0% 30%;transition:background-size .4s cubic-bezier(.7,0,.2,1);border-radius:3px} .csh-08__fx-sweep:hover{background-size:100% 30%} /* 4 — label swap: two stacked labels inside the tight mask trade places */ .csh-08__fx-swap .csh-08__mask span{display:block;transition:transform .4s cubic-bezier(.7,0,.2,1)} .csh-08__fx-swap .csh-08__mask span:nth-child(2){position:absolute;left:0;top:0;color:var(--acid);transform:translateY(110%)} .csh-08__fx-swap:hover .csh-08__mask span:nth-child(1){transform:translateY(-110%)} .csh-08__fx-swap:hover .csh-08__mask span:nth-child(2){transform:translateY(0)} /* 5 — bracket reveal */ .csh-08__fx-bracket::before,.csh-08__fx-bracket::after{position:absolute;color:var(--hot);opacity:0;transition:opacity .3s,transform .3s} .csh-08__fx-bracket::before{content:'[';left:-4px;transform:translateX(6px)} .csh-08__fx-bracket::after{content:']';right:-4px;transform:translateX(-6px)} .csh-08__fx-bracket:hover{color:var(--acid)} .csh-08__fx-bracket:hover::before,.csh-08__fx-bracket:hover::after{opacity:1;transform:translateX(0)} .csh-08__nav a.csh-08__cta{font-family:'Fragment Mono',monospace;font-size:.8rem;background:var(--acid);color:var(--ink);padding:11px 20px;border-radius:8px;text-decoration:none;font-weight:700;margin-left:10px;overflow:visible;transition:transform .3s cubic-bezier(.34,1.56,.64,1),color .3s} .csh-08__nav a.csh-08__cta:hover{transform:translateY(-2px);color:var(--ink)} .csh-08__hero{position:relative;z-index:1;min-height:calc(100vh - 80px);display:grid;place-items:center;text-align:center;padding:0 24px} .csh-08__hero h1{font-size:clamp(2.4rem,9vw,5.5rem);font-weight:800;line-height:.94;letter-spacing:-.04em} .csh-08__hero h1 em{font-style:normal;color:var(--acid)} .csh-08__hint{font-family:'Fragment Mono',monospace;margin-top:24px;font-size:.74rem;letter-spacing:.15em;color:rgba(236,235,228,.5);max-width:52ch} .csh-08__hint b{color:var(--sky)} @media (max-width:860px){.csh-08__nav a:not(.csh-08__cta){display:none}} @media (prefers-reduced-motion: reduce){.csh-08__nav a,.csh-08__nav a *,.csh-08__nav a::after,.csh-08__nav a::before{transition:none !important}} ``` ### 09. Vertical Sidebar Navigation Header **Type:** Pure CSS **Description:** A persistent left rail using position:fixed, left:0 and height:100vh, with the page content offset cleanly by a matching grid track so nothing overlaps. Animated active-state indicator bar, profile footer and icon links. On mobile it gracefully reflows into a bottom bar. Warm flame/moss portfolio aesthetic with Syne. **HTML:** ```html
    Lumen
    // portfolio · 2030

    Pinned to
    the left.

    position: fixed · height: 100vh · grid offset

    ``` **CSS:** ```css @import url('https://fonts.googleapis.com/css2?family=Syne:wght@500;700;800&family=Space+Mono:wght@400;700&display=swap'); .csh-09, .csh-09 *, .csh-09 *::before, .csh-09 *::after { box-sizing: border-box; margin: 0; padding: 0; } .csh-09 ::selection{background:var(--flame);color:var(--bone)} .csh-09 ::-moz-selection{background:var(--flame);color:var(--bone)} .csh-09{ --bg:#16110d; --bone:#f5ede1; --flame:#ff6b2c; --moss:#9ab33d; --dim:rgba(245,237,225,.5); font-family:'Syne',sans-serif; background:var(--bg);color:var(--bone); min-height:100vh;position:relative;overflow:hidden; } /* Parent uses a grid track: [sidebar] [main]. The fixed sidebar is mirrored by a matching column so main content offsets cleanly without overlap. */ .csh-09__layout{display:grid;grid-template-columns:264px 1fr;min-height:100vh} .csh-09__side{position:fixed;left:0;top:0;height:100vh;width:264px;z-index:50; display:flex;flex-direction:column;padding:30px 26px; background:linear-gradient(180deg,#1c1610,#15100b);border-right:1px solid rgba(245,237,225,.1)} .csh-09__brand{display:flex;align-items:center;gap:11px;font-weight:800;font-size:1.4rem;letter-spacing:-.02em;text-decoration:none;color:var(--bone);margin-bottom:8px} .csh-09__brand span{width:34px;height:34px;border-radius:10px;background:var(--flame);color:#16110d;display:grid;place-items:center;font-weight:800} .csh-09__tagline{font-family:'Space Mono',monospace;font-size:.62rem;letter-spacing:.25em;text-transform:uppercase;color:var(--dim);margin-bottom:38px;padding-left:2px} .csh-09__nav{display:flex;flex-direction:column;gap:3px;flex:1} .csh-09__nav a{position:relative;display:flex;align-items:center;gap:13px;text-decoration:none;color:var(--dim);font-weight:500;font-size:1rem;padding:12px 14px;border-radius:11px;transition:color .25s,background .25s,padding-left .25s} .csh-09__nav a svg{width:18px;height:18px;flex:0 0 auto} .csh-09__nav a::before{content:'';position:absolute;left:0;top:50%;transform:translateY(-50%) scaleY(0);width:3px;height:60%;background:var(--flame);border-radius:3px;transition:transform .3s cubic-bezier(.7,0,.2,1)} .csh-09__nav a:hover{color:var(--bone);background:rgba(245,237,225,.04);padding-left:18px} .csh-09__nav a.is-on{color:var(--bone);background:rgba(255,107,44,.12)} .csh-09__nav a.is-on::before{transform:translateY(-50%) scaleY(1)} .csh-09__foot{margin-top:auto;padding-top:22px;border-top:1px solid rgba(245,237,225,.1)} .csh-09__profile{display:flex;align-items:center;gap:11px;text-decoration:none} .csh-09__avatar{width:38px;height:38px;border-radius:50%;background:linear-gradient(135deg,var(--moss),var(--flame));flex:0 0 auto} .csh-09__profile b{display:block;color:var(--bone);font-size:.9rem;font-weight:700} .csh-09__profile span{font-family:'Space Mono',monospace;font-size:.66rem;color:var(--dim)} .csh-09__main{grid-column:2;position:relative;display:grid;place-items:center;text-align:center;padding:0 24px;min-height:100vh} .csh-09__main::before{content:'';position:absolute;inset:0;opacity:.5;pointer-events:none; background:radial-gradient(55% 55% at 70% 30%,rgba(255,107,44,.1),transparent 60%),radial-gradient(45% 45% at 30% 80%,rgba(154,179,61,.08),transparent 60%)} .csh-09__main h1{position:relative;font-size:clamp(2.4rem,8vw,5.5rem);font-weight:800;line-height:.92;letter-spacing:-.04em} .csh-09__main h1 em{font-style:normal;color:var(--flame)} .csh-09__main p{position:relative;font-family:'Space Mono',monospace;margin-top:22px;font-size:.78rem;letter-spacing:.18em;text-transform:uppercase;color:var(--dim)} @media (max-width:760px){ .csh-09__layout{grid-template-columns:1fr} .csh-09__side{position:fixed;left:0;right:0;top:auto;bottom:0;height:auto;width:100%;flex-direction:row;align-items:center;padding:12px 16px;border-right:none;border-top:1px solid rgba(245,237,225,.12)} .csh-09__brand{margin:0}.csh-09__tagline,.csh-09__foot,.csh-09__nav a span:not(svg){display:none} .csh-09__nav{flex-direction:row;justify-content:flex-end;gap:2px} .csh-09__nav a{padding:10px}.csh-09__nav a::before{display:none} .csh-09__main{grid-column:1;padding-bottom:90px} } @media (prefers-reduced-motion: reduce){.csh-09__nav a,.csh-09__nav a::before{transition:none !important}} ``` ### 10. Multi-Level Dropdown Menu Header **Type:** Pure CSS **Description:** A three-level nested dropdown built from semantic ul/li/ul markup. Sub-lists are absolutely positioned and hidden via opacity/visibility, flying out on li:hover>ul and :focus-within for full keyboard accessibility — level three flies to the right of its level-two parent. A transparent hover bridge spans the gap between trigger and panel so the menu never closes mid-traverse. Editorial Newsreader serif on cream with a hard-shadow editorial look. **HTML:** ```html ``` **CSS:** ```css @import url('https://fonts.googleapis.com/css2?family=Newsreader:opsz,wght@6..72,400;6..72,500;6..72,600&family=DM+Mono:wght@400;500&display=swap'); .csh-10, .csh-10 *, .csh-10 *::before, .csh-10 *::after { box-sizing: border-box; margin: 0; padding: 0; } .csh-10 ::selection{background:var(--ink);color:var(--cream)} .csh-10 ::-moz-selection{background:var(--ink);color:var(--cream)} .csh-10{ --cream:#f6f1e7; --ink:#1d1a14; --wine:#7c2d3a; --gold:#b08442; --line:rgba(29,26,20,.12); font-family:'Newsreader',serif; background:var(--cream);color:var(--ink); min-height:100vh;position:relative; } .csh-10__header{position:sticky;top:0;z-index:50;background:var(--cream);border-bottom:1px solid var(--ink)} .csh-10__bar{max-width:1180px;margin:0 auto;height:72px;display:flex;align-items:center;justify-content:space-between;padding:0 clamp(18px,4vw,40px)} .csh-10__logo{font-weight:600;font-size:1.7rem;letter-spacing:-.02em;text-decoration:none;color:var(--ink);font-variation-settings:'opsz' 72} .csh-10__logo em{font-style:italic;color:var(--wine)} /* Semantic nested
      /
    • /
        . Sub-lists are absolutely positioned and hidden via opacity/visibility, revealed on li:hover>ul AND :focus-within. */ .csh-10__nav>ul{list-style:none;display:flex;gap:2px} .csh-10__nav li{position:relative} .csh-10__nav a{display:flex;align-items:center;gap:7px;text-decoration:none;color:var(--ink);font-size:1.02rem;font-weight:500;padding:10px 15px;border-radius:7px;white-space:nowrap;transition:background .2s,color .2s} .csh-10__nav a .csh-10__chev{width:9px;height:9px;transition:transform .3s} .csh-10__nav a:hover,.csh-10__nav a:focus-visible{background:rgba(124,45,58,.08);color:var(--wine)} .csh-10__nav ul ul{ list-style:none;position:absolute;min-width:230px; background:var(--cream);border:1px solid var(--ink);border-radius:12px; padding:7px;box-shadow:8px 10px 0 -2px var(--ink),0 24px 40px -22px rgba(29,26,20,.5); opacity:0;visibility:hidden;transform:translateY(8px);pointer-events:none; transition:opacity .3s cubic-bezier(.16,1,.3,1),transform .3s cubic-bezier(.16,1,.3,1),visibility .3s;z-index:10} /* Transparent hover bridge fills the visual gap between trigger and panel so the mouse never crosses an un-hoverable dead zone (which would drop :hover). It lives on the parent li (always present) and only activates on hover so it never blocks neighbouring items at rest. */ .csh-10__nav li::after{content:'';position:absolute;display:none} .csh-10__nav>ul>li:hover::after,.csh-10__nav>ul>li:focus-within::after{display:block;top:100%;left:0;right:0;height:10px} .csh-10__nav ul ul li:hover::after,.csh-10__nav ul ul li:focus-within::after{display:block;top:0;bottom:0;left:100%;width:10px;right:auto} /* LEVEL 2 — sits flush under the top item with an 8px breathing offset */ .csh-10__nav>ul>li>ul{top:100%;left:0;margin-top:8px} /* LEVEL 3 — flies to the right of its level-2 parent */ .csh-10__nav ul ul ul{top:-8px;left:100%;margin-left:8px} .csh-10__nav li:hover>ul,.csh-10__nav li:focus-within>ul{opacity:1;visibility:visible;transform:translateY(0);pointer-events:auto} .csh-10__nav li:hover>a>.csh-10__chev,.csh-10__nav li:focus-within>a>.csh-10__chev{transform:rotate(180deg)} .csh-10__nav ul ul a{justify-content:space-between;width:100%;font-size:.96rem;padding:9px 13px} .csh-10__nav ul ul a .csh-10__chev{transform:rotate(-90deg)} .csh-10__nav li:hover>a>.csh-10__chev.csh-10__chev--side,.csh-10__nav li:focus-within>a>.csh-10__chev.csh-10__chev--side{transform:rotate(-90deg)} .csh-10__nav ul ul a small{display:block;font-family:'DM Mono',monospace;font-size:.62rem;color:var(--gold);letter-spacing:.05em;margin-top:2px} .csh-10__cta{font-family:'DM Mono',monospace;font-size:.78rem;background:var(--ink);color:var(--cream);padding:11px 20px;border-radius:30px;text-decoration:none;font-weight:500;transition:transform .3s cubic-bezier(.34,1.56,.64,1),color .3s} .csh-10__bar a.csh-10__cta:hover{transform:translateY(-2px);color:var(--cream)} .csh-10__hero{position:relative;z-index:1;min-height:calc(100vh - 72px);display:grid;place-items:center;text-align:center;padding:0 24px} .csh-10__hero h1{font-size:clamp(2.6rem,9vw,6rem);font-weight:600;line-height:.96;letter-spacing:-.03em;font-variation-settings:'opsz' 72} .csh-10__hero h1 em{font-style:italic;color:var(--wine)} .csh-10__hero p{font-family:'DM Mono',monospace;margin-top:22px;font-size:.76rem;letter-spacing:.18em;text-transform:uppercase;color:rgba(29,26,20,.5)} @media (max-width:820px){.csh-10__nav{display:none}} @media (prefers-reduced-motion: reduce){.csh-10__nav ul ul,.csh-10__nav a,.csh-10__chev,.csh-10__cta{transition:none !important}} ``` ### 11. Shrinking Header on Scroll **Type:** Pure CSS **Description:** A large expressive bar on load that smoothly compacts into a floating pill as you scroll, powered by CSS scroll-driven animation (animation-timeline:scroll()) interpolating height, padding, logo size, blur and corner radius — no JS scroll listeners, with an @supports fallback to a compact bar. Voltage/aqua space aesthetic with Unbounded. **HTML:** ```html
        animation-timeline: scroll()

        Big on load.
        Compact on scroll.

        PURE CSS SCROLL-DRIVEN ANIMATION — NO LISTENERS

        ↓ SCROLL ↓
        01 / SCROLL TIMELINE

        The bar consumes a scroll() timeline

        As the scroller advances through its first 220px, the header animation interpolates height, padding, logo size, blur and corner radius — collapsing the expressive bar into a floating pill.

        02 / NO JANK

        Off the main thread

        Because there is no scroll event handler, the shrink runs on the compositor and never blocks interaction or trips Cumulative Layout Shift.

        03 / GRACEFUL FALLBACK

        @supports safety net

        Browsers without scroll-driven animation simply render the compact bar by default, so the layout stays correct everywhere.

        ``` **CSS:** ```css @import url('https://fonts.googleapis.com/css2?family=Unbounded:wght@400;600;800&family=Azeret+Mono:wght@400;500&display=swap'); .csh-11, .csh-11 *, .csh-11 *::before, .csh-11 *::after { box-sizing: border-box; margin: 0; padding: 0; } .csh-11 ::selection{background:var(--volt);color:var(--abyss)} .csh-11 ::-moz-selection{background:var(--volt);color:var(--abyss)} .csh-11{ --abyss:#070a16; --foam:#eaf2ff; --volt:#7c5cff; --aqua:#22e0c4; --rose:#ff5e8a; font-family:'Unbounded',sans-serif; background:var(--abyss);color:var(--foam); min-height:100vh;position:relative; } /* Scroll-driven shrink: the inner scroller exposes a scroll() timeline that an animation on the header consumes — big expressive bar collapses into a compact pill in the first slice of scroll. No JS scroll listeners. */ .csh-11__scroll{height:100vh;overflow-y:scroll;position:relative;scroll-behavior:smooth; animation:csh-11-shrink linear both;animation-timeline:scroll(self);animation-range:0 220px} .csh-11__scroll::-webkit-scrollbar{width:0} @keyframes csh-11-shrink{ 0% {--h:108px;--pad:0px;--logo:2rem;--bg:0;--blur:0px;--radius:0px;--mx:0px;--bar:1} 100%{--h:62px; --pad:14px;--logo:1.25rem;--bg:.8;--blur:18px;--radius:18px;--mx:18px;--bar:0} } .csh-11{--h:108px;--pad:0px;--logo:2rem;--bg:0;--blur:0px;--radius:0px;--mx:0px;--bar:1} .csh-11__header{position:sticky;top:0;z-index:50;padding:var(--pad) var(--mx)} .csh-11__bar{ height:var(--h);display:flex;align-items:center;justify-content:space-between; padding:0 clamp(20px,5vw,48px);max-width:1280px;margin:0 auto; background:rgba(7,10,22,var(--bg));backdrop-filter:blur(var(--blur)) saturate(150%); border-radius:var(--radius);border:1px solid rgba(234,242,255,calc(var(--bg) * .14)); transition:none} .csh-11__logo{display:flex;align-items:center;gap:12px;font-weight:800;letter-spacing:-.03em;text-decoration:none;color:var(--foam);font-size:var(--logo)} .csh-11__mark{width:calc(var(--logo) * 1.5);height:calc(var(--logo) * 1.5);border-radius:30%;background:linear-gradient(135deg,var(--volt),var(--aqua));display:grid;place-items:center;color:var(--abyss);font-size:calc(var(--logo) * .7);flex:0 0 auto} .csh-11__logo small{font-family:'Azeret Mono',monospace;font-size:.55rem;letter-spacing:.3em;color:var(--aqua);opacity:var(--bar);transition:opacity .2s;display:block} .csh-11__nav{display:flex;gap:4px;align-items:center} .csh-11__nav a{position:relative;text-decoration:none;color:rgba(234,242,255,.78);font-size:.92rem;font-weight:400;padding:9px 15px;border-radius:9px;transition:color .25s,background .25s;font-family:'Azeret Mono',monospace} .csh-11__nav a::after{content:'';position:absolute;left:15px;right:15px;bottom:5px;height:2px;background:var(--aqua);transform:scaleX(0);transform-origin:left;transition:transform .3s} .csh-11__nav a:hover{color:var(--foam)} .csh-11__nav a:hover::after{transform:scaleX(1)} .csh-11__cta{background:var(--volt);color:var(--foam);padding:10px 20px;border-radius:30px;text-decoration:none;font-family:'Azeret Mono',monospace;font-size:.8rem;font-weight:500;transition:transform .3s cubic-bezier(.34,1.56,.64,1),color .3s} .csh-11__nav a.csh-11__cta::after{display:none} .csh-11__nav a.csh-11__cta:hover{transform:translateY(-2px);color:var(--foam)} .csh-11__hero{min-height:100vh;display:grid;place-items:center;text-align:center;padding:0 24px;position:relative; background:radial-gradient(60% 60% at 50% 0%,rgba(124,92,255,.16),transparent 60%),radial-gradient(40% 50% at 85% 90%,rgba(34,224,196,.12),transparent 60%)} .csh-11__eyebrow{font-family:'Azeret Mono',monospace;font-size:.72rem;letter-spacing:.4em;text-transform:uppercase;color:var(--aqua);margin-bottom:24px} .csh-11__hero h1{font-size:clamp(2.4rem,8vw,5.5rem);font-weight:800;line-height:.96;letter-spacing:-.03em} .csh-11__hero h1 em{font-style:normal;background:linear-gradient(120deg,var(--volt),var(--rose));-webkit-background-clip:text;background-clip:text;color:transparent} .csh-11__hero p{font-family:'Azeret Mono',monospace;margin-top:22px;font-size:.76rem;letter-spacing:.18em;color:rgba(234,242,255,.5)} .csh-11__bob{position:absolute;bottom:34px;left:50%;transform:translateX(-50%);font-family:'Azeret Mono',monospace;font-size:10px;letter-spacing:.3em;color:rgba(234,242,255,.45);animation:csh-11-bob 2s ease-in-out infinite} @keyframes csh-11-bob{50%{transform:translateX(-50%) translateY(8px)}} .csh-11__content{padding:6vh clamp(24px,8vw,140px);max-width:1000px;margin:0 auto;display:grid;gap:30px} .csh-11__card{background:rgba(234,242,255,.03);border:1px solid rgba(234,242,255,.08);border-radius:18px;padding:30px} .csh-11__card span{font-family:'Azeret Mono',monospace;font-size:10px;letter-spacing:.25em;color:var(--rose)} .csh-11__card h2{font-size:clamp(1.4rem,3.5vw,2.2rem);font-weight:600;margin:10px 0 10px;letter-spacing:-.02em} .csh-11__card p{font-family:'Azeret Mono',monospace;color:rgba(234,242,255,.6);line-height:1.7;font-size:.86rem} /* Fallback for browsers without scroll-driven animations: a smaller fixed bar */ @supports not (animation-timeline: scroll()){ .csh-11{--h:72px;--bg:.8;--blur:18px;--radius:18px;--mx:14px;--pad:10px;--logo:1.4rem} .csh-11__bar{transition:none} } @media (max-width:720px){.csh-11__nav a:not(.csh-11__cta){display:none}} @media (prefers-reduced-motion: reduce){ .csh-11__scroll{animation:none !important;--h:72px;--bg:.8;--blur:18px;--radius:18px;--mx:14px;--pad:10px;--logo:1.4rem} .csh-11__bob{animation:none !important} } ``` --- ## 30 CSS Hero Sections URL: https://codefronts.com/layouts/css-hero-sections/ Description: 30 hand-coded CSS hero sections — gradient mesh, glassmorphism, bento, terminal, parallax, 3D card stack, conic orbit and more. No images, copy-paste ready. Demo count: 30 ### 01. Centered Classic **Type:** Pure CSS **Description:** The artisanal SaaS hero — eyebrow, serif headline, prose subhead, a single deep-terracotta primary CTA flanked by a quiet ghost button. Sage on warm cream, the small-batch tools-for-makers aesthetic. **HTML:** ```html
        — A new kind of workspace

        Make small things that matter.

        The toolkit for craftspeople who treat the work, the customer, and the calendar with the same care.

        Free for 14 days · no card · cancel any time

        ``` **CSS:** ```css .hs-cls { display: grid; place-items: center; width: 100%; min-height: 480px; padding: clamp(32px, 6vw, 80px) clamp(20px, 5vw, 56px); background: radial-gradient(60% 80% at 50% 0%, rgba(200,160,120,0.18), transparent 70%), #f5f1e6; font-family: 'Cormorant Garamond', 'Georgia', serif; color: #2d3a2e; box-sizing: border-box; } .hs-cls-inner { max-width: 640px; text-align: center; } .hs-cls-eye { display: inline-block; font-family: 'JetBrains Mono', monospace; font-size: 12px; letter-spacing: 0.18em; color: #6b7d5a; margin-bottom: 18px; } .hs-cls h2 { margin: 0 0 18px; font-size: clamp(36px, 6vw, 60px); font-weight: 600; letter-spacing: -0.02em; line-height: 1.05; color: #1a2418; } .hs-cls h2 em { color: #c8553d; font-style: italic; } .hs-cls p { margin: 0 auto 28px; font-family: 'Inter', system-ui, sans-serif; font-size: 16px; line-height: 1.6; color: #4a5447; max-width: 460px; } .hs-cls-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-bottom: 18px; } .hs-cls-btn { display: inline-block; padding: 13px 22px; border-radius: 4px; font-family: 'Inter', sans-serif; font-size: 14px; font-weight: 600; letter-spacing: 0.01em; text-decoration: none; transition: transform 0.18s, background 0.18s; } .hs-cls-btn-pri { background: #c8553d; color: #fff8ed; box-shadow: 0 2px 0 #8d3a25; } .hs-cls-btn-pri:hover { transform: translateY(-1px); background: #b94a32; } .hs-cls-btn { background: transparent; color: #2d3a2e; border: 1px solid #2d3a2e; } .hs-cls-btn:hover { background: #2d3a2e; color: #f5f1e6; } .hs-cls-foot { font-family: 'JetBrains Mono', monospace !important; font-size: 11px !important; color: #8a9080 !important; margin: 0 !important; max-width: none !important; letter-spacing: 0.04em; } @media (prefers-reduced-motion: reduce) { .hs-cls-btn { transition: none; } } ``` ### 02. Split with Mockup **Type:** Pure CSS **Description:** Two-column hero with copy left, an SVG-painted dashboard mockup right. Rust red and ochre on deep brown — the heritage industrial / workshop aesthetic. **HTML:** ```html
        EST. 2024

        Inventory that actually adds up.

        Stock, batches, suppliers — one ledger, no spreadsheets, no Sundays at the laptop.

        Get started →
        ``` **CSS:** ```css .hs-spm { display: grid; grid-template-columns: 1.05fr 1fr; width: 100%; min-height: 480px; padding: clamp(28px, 5vw, 56px) clamp(20px, 5vw, 56px); gap: clamp(24px, 4vw, 64px); align-items: center; background: #2c1f15; font-family: 'Inter', system-ui, sans-serif; color: #f5e6d3; box-sizing: border-box; } .hs-spm-eye { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: 0.2em; color: #d97742; padding: 4px 10px; border: 1px solid #d97742; margin-bottom: 18px; } .hs-spm h2 { margin: 0 0 16px; font-family: 'Playfair Display', Georgia, serif; font-size: clamp(32px, 5vw, 52px); font-weight: 800; letter-spacing: -0.02em; line-height: 1.05; color: #fff8ed; } .hs-spm h2 em { color: #d97742; font-style: italic; font-weight: 700; } .hs-spm p { margin: 0 0 26px; font-size: 15.5px; line-height: 1.6; color: #c9b5a0; max-width: 460px; } .hs-spm-cta { display: inline-block; padding: 12px 22px; background: #d97742; color: #2c1f15; text-decoration: none; font-weight: 700; font-size: 14px; border: 0; border-radius: 0; box-shadow: 4px 4px 0 #8a4520; transition: transform 0.15s, box-shadow 0.15s; } .hs-spm-cta:hover { transform: translate(2px,2px); box-shadow: 2px 2px 0 #8a4520; } .hs-spm-mock { background: #1a120a; border: 2px solid #6b4427; border-radius: 4px; padding: 12px; box-shadow: 8px 8px 0 #d97742; } .hs-spm-window header { display: flex; gap: 6px; padding-bottom: 12px; border-bottom: 1px dashed #6b4427; } .hs-spm-window header span { width: 10px; height: 10px; border-radius: 50%; background: #6b4427; } .hs-spm-window header span:nth-child(1) { background: #d97742; } .hs-spm-window header span:nth-child(2) { background: #b8943f; } .hs-spm-bars { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; height: 120px; align-items: end; margin: 14px 0; } .hs-spm-bars span { background: linear-gradient(180deg, #d97742, #b85a2c); border-radius: 2px 2px 0 0; } .hs-spm-bars span:nth-child(2n) { background: linear-gradient(180deg, #b8943f, #8a6c1f); } .hs-spm-line { height: 60px; } .hs-spm-line svg { width: 100%; height: 100%; } @media (max-width: 720px) { .hs-spm { grid-template-columns: 1fr; } } @media (prefers-reduced-motion: reduce) { .hs-spm-cta { transition: none; } } ``` ### 03. Gradient Mesh **Type:** Pure CSS **Description:** Tropical mesh gradient — overlapping radial blobs in mango, papaya, and dragon fruit on a warm coral base. The Stripe / Linear gradient hero, but turned up to a sunset. **HTML:** ```html
        launch · summer collection

        Make your weekends feel like vacation.

        The mood-board planner that turns scattered Pinterest tabs into the trip you actually take.

        Plan a trip →
        ``` **CSS:** ```css .hs-grm { position: relative; overflow: hidden; display: grid; place-items: center; width: 100%; min-height: 480px; padding: clamp(32px, 6vw, 80px) clamp(20px, 5vw, 56px); background: #ff5e62; font-family: 'Inter', system-ui, sans-serif; color: #fff; box-sizing: border-box; contain: layout paint; } .hs-grm-blobs { position: absolute; inset: 0; } .hs-grm-blobs span { position: absolute; border-radius: 50%; filter: blur(60px); animation: hs-grm-drift 16s ease-in-out infinite alternate; } .hs-grm-blobs span:nth-child(1) { top: -10%; left: 10%; width: 460px; height: 460px; background: radial-gradient(circle, #ffd23f 0%, transparent 70%); } .hs-grm-blobs span:nth-child(2) { top: 20%; right: 0; width: 420px; height: 420px; background: radial-gradient(circle, #ee4266 0%, transparent 70%); animation-delay: -4s; } .hs-grm-blobs span:nth-child(3) { bottom: 0; left: 30%; width: 460px; height: 460px; background: radial-gradient(circle, #ff7e5f 0%, transparent 70%); animation-delay: -8s; } .hs-grm-blobs span:nth-child(4) { top: 30%; left: -8%; width: 360px; height: 360px; background: radial-gradient(circle, #ffa552 0%, transparent 70%); animation-delay: -12s; } @keyframes hs-grm-drift { 0% { transform: translate(0,0) scale(1); } 50% { transform: translate(40px,-30px) scale(1.08); } 100% { transform: translate(-40px,40px) scale(0.96); } } .hs-grm-inner { position: relative; z-index: 1; max-width: 640px; text-align: center; } .hs-grm-eye { display: inline-block; padding: 5px 14px; background: rgba(255,255,255,0.18); border: 1px solid rgba(255,255,255,0.4); border-radius: 999px; font-size: 11px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: 22px; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); } .hs-grm h2 { margin: 0 0 18px; font-size: clamp(34px, 6vw, 60px); font-weight: 900; letter-spacing: -0.025em; line-height: 1.02; text-shadow: 0 2px 24px rgba(238,66,102,0.25); } .hs-grm h2 em { font-style: italic; font-weight: 800; color: #fff5d2; } .hs-grm p { margin: 0 auto 28px; font-size: 17px; line-height: 1.55; max-width: 480px; opacity: 0.95; } .hs-grm-cta { display: inline-block; padding: 14px 26px; background: #fff; color: #ee4266; border-radius: 999px; text-decoration: none; font-weight: 700; font-size: 15px; box-shadow: 0 12px 30px rgba(238,66,102,0.35); transition: transform 0.18s; } .hs-grm-cta:hover { transform: translateY(-2px); } @media (prefers-reduced-motion: reduce) { .hs-grm-blobs span { animation: none; } .hs-grm-cta { transition: none; } } ``` ### 04. Glass over Aurora **Type:** Pure CSS **Description:** Frosted-glass card floating over a calm spa aurora — pale mint, champagne gold, soft rose. The wellness / luxury beauty editorial treatment. **HTML:** ```html
        A daily ritual

        Skincare without the homework.

        Three minutes. Two products. One routine that fits the life you actually live.

        Find your routine
        ``` **CSS:** ```css .hs-gla { position: relative; overflow: hidden; display: grid; place-items: center; width: 100%; min-height: 480px; padding: clamp(28px, 5vw, 64px) clamp(20px, 5vw, 56px); background: radial-gradient(circle at 20% 20%, #d6f0e0 0%, transparent 50%), radial-gradient(circle at 85% 30%, #f9d4c8 0%, transparent 55%), radial-gradient(circle at 50% 90%, #f3e3c0 0%, transparent 50%), #faf6ed; font-family: 'Inter', system-ui, sans-serif; color: #3d3a2c; box-sizing: border-box; contain: layout paint; } .hs-gla-aurora { position: absolute; inset: -10%; background: conic-gradient(from 90deg, #d6f0e0, #f9d4c8, #f3e3c0, #d6f0e0); filter: blur(50px); opacity: 0.5; animation: hs-gla-spin 30s linear infinite; } @keyframes hs-gla-spin { to { transform: rotate(360deg); } } .hs-gla-card { position: relative; z-index: 1; max-width: 520px; background: rgba(255,255,255,0.55); border: 1px solid rgba(255,255,255,0.85); border-radius: 24px; padding: clamp(28px, 4vw, 44px); text-align: center; backdrop-filter: blur(20px) saturate(140%); -webkit-backdrop-filter: blur(20px) saturate(140%); box-shadow: 0 22px 60px rgba(195,150,120,0.18); } .hs-gla-eye { display: inline-block; font-family: 'Cormorant Garamond', Georgia, serif; font-size: 14px; font-style: italic; color: #b8956a; margin-bottom: 14px; } .hs-gla h2 { margin: 0 0 16px; font-family: 'Cormorant Garamond', Georgia, serif; font-size: clamp(32px, 5vw, 52px); font-weight: 500; letter-spacing: -0.015em; line-height: 1.05; color: #2a2818; } .hs-gla h2 em { color: #b8956a; font-weight: 600; } .hs-gla p { margin: 0 auto 24px; font-size: 15px; line-height: 1.6; color: #6b6755; max-width: 380px; } .hs-gla-cta { display: inline-block; padding: 12px 28px; background: #2a2818; color: #faf6ed; border-radius: 999px; text-decoration: none; font-size: 14px; font-weight: 600; letter-spacing: 0.04em; transition: background 0.18s; } .hs-gla-cta:hover { background: #b8956a; } @media (prefers-reduced-motion: reduce) { .hs-gla-aurora { animation: none; } .hs-gla-cta { transition: none; } } ``` ### 05. Terminal Dev Hero **Type:** Pure CSS **Description:** Vintage-CRT terminal hero — phosphor green text + amber prompt on a warm beige paper backdrop. The 1970s computing aesthetic for a modern dev tool. **HTML:** ```html

        Ship from your terminal.

        One command. No dashboard. No yak shave. Your CI agrees with your local because they share an OS.

        Read the docs →
        ``` **CSS:** ```css .hs-trm { display: grid; grid-template-columns: 1fr 1.05fr; width: 100%; min-height: 480px; padding: clamp(28px, 5vw, 64px) clamp(20px, 5vw, 56px); gap: clamp(24px, 4vw, 56px); align-items: center; background: repeating-linear-gradient(0deg, transparent 0 31px, rgba(50,30,10,0.04) 31px 32px), #f0e4cf; font-family: 'Inter', system-ui, sans-serif; color: #2a1d0a; box-sizing: border-box; } .hs-trm h2 { margin: 0 0 16px; font-family: 'JetBrains Mono', monospace; font-size: clamp(34px, 5vw, 54px); font-weight: 800; letter-spacing: -0.02em; line-height: 1.05; } .hs-trm h2 em { color: #b8580c; font-style: normal; } .hs-trm h2 em::before { content: '> '; opacity: 0.6; } .hs-trm p { margin: 0 0 24px; font-size: 15.5px; line-height: 1.6; color: #5a4220; max-width: 440px; } .hs-trm-cta { display: inline-block; padding: 12px 22px; background: #2a1d0a; color: #f0e4cf; font-family: 'JetBrains Mono', monospace; font-weight: 700; font-size: 13.5px; text-decoration: none; border-radius: 0; transition: background 0.15s; } .hs-trm-cta:hover { background: #b8580c; } .hs-trm-screen { background: #0d1908; border: 2px solid #2a1d0a; border-radius: 8px; padding: 22px 24px; font-family: 'JetBrains Mono', monospace; font-size: 14px; line-height: 1.85; box-shadow: 0 0 0 8px rgba(13,25,8,0.1), 0 0 60px rgba(60,255,120,0.18) inset; } .hs-trm-line { color: #5fff8c; text-shadow: 0 0 8px rgba(95,255,140,0.5); } .hs-trm-prompt { color: #ffb348; text-shadow: 0 0 8px rgba(255,179,72,0.5); margin-right: 6px; } .hs-trm-out { color: #88a890; opacity: 0.9; padding-left: 14px; } .hs-trm-ok { color: #5fff8c; padding-left: 14px; font-weight: 700; } .hs-trm-cursor { display: inline-block; width: 8px; height: 16px; background: #5fff8c; vertical-align: text-bottom; animation: hs-trm-blink 1s steps(2) infinite; } @keyframes hs-trm-blink { to { opacity: 0; } } @media (max-width: 720px) { .hs-trm { grid-template-columns: 1fr; } } @media (prefers-reduced-motion: reduce) { .hs-trm-cursor { animation: none; } } ``` ### 06. Video Loop Hero **Type:** Pure CSS **Description:** Memphis-modern video-pretender — geometric SVG shapes oscillating like a video loop, pinned behind cobalt-on-bone copy with a lemon CTA. No real video, no licensing. **HTML:** ```html
        ▸ NOW PLAYING

        Your portfolio, animated.

        Drop in your projects. We turn them into the kind of motion reel that gets the call back.

        Play with it
        ``` **CSS:** ```css .hs-vid { position: relative; overflow: hidden; display: grid; place-items: center; width: 100%; min-height: 480px; padding: clamp(28px, 5vw, 64px) clamp(20px, 5vw, 56px); background: #f4f1ea; font-family: 'Inter', system-ui, sans-serif; color: #0b1f4a; box-sizing: border-box; contain: layout paint; } .hs-vid-shapes { position: absolute; inset: 0; pointer-events: none; } .hs-vid-shapes span { position: absolute; animation: hs-vid-bounce 8s ease-in-out infinite alternate; } .hs-vid-s1 { top: 8%; left: 6%; width: 110px; height: 110px; background: #0b1f4a; border-radius: 50%; } .hs-vid-s2 { top: 12%; right: 10%; width: 0; height: 0; border-left: 70px solid transparent; border-right: 70px solid transparent; border-bottom: 120px solid #f5d028; animation-delay: -3s; } .hs-vid-s3 { bottom: 10%; left: 12%; width: 140px; height: 50px; background: #ee5253; border-radius: 999px; animation-delay: -5s; transform: rotate(-12deg); } .hs-vid-s4 { bottom: 8%; right: 8%; width: 90px; height: 90px; background: #0b1f4a; border-radius: 12px; animation-delay: -7s; transform: rotate(15deg); } @keyframes hs-vid-bounce { 0% { transform: translate(0,0) rotate(0deg); } 100% { transform: translate(20px,-15px) rotate(8deg); } } .hs-vid-s2 { animation-name: hs-vid-bounce-tri; } @keyframes hs-vid-bounce-tri { 0% { transform: translate(0,0); } 100% { transform: translate(-15px,20px); } } .hs-vid-content { position: relative; z-index: 1; max-width: 600px; text-align: center; } .hs-vid-eye { display: inline-block; padding: 4px 12px; background: #0b1f4a; color: #f5d028; font-family: 'JetBrains Mono', monospace; font-size: 11px; font-weight: 700; letter-spacing: 0.18em; margin-bottom: 22px; } .hs-vid h2 { margin: 0 0 16px; font-family: 'Inter', sans-serif; font-size: clamp(38px, 6vw, 64px); font-weight: 900; letter-spacing: -0.03em; line-height: 1; } .hs-vid h2 em { color: #ee5253; font-style: italic; font-weight: 900; } .hs-vid p { margin: 0 auto 28px; font-size: 16px; line-height: 1.55; color: #4a5878; max-width: 460px; } .hs-vid-cta { display: inline-block; padding: 14px 28px; background: #f5d028; color: #0b1f4a; font-weight: 800; font-size: 14.5px; text-decoration: none; border-radius: 4px; border: 3px solid #0b1f4a; box-shadow: 6px 6px 0 #0b1f4a; transition: transform 0.15s, box-shadow 0.15s; } .hs-vid-cta:hover { transform: translate(2px,2px); box-shadow: 4px 4px 0 #0b1f4a; } @media (prefers-reduced-motion: reduce) { .hs-vid-shapes span { animation: none; } .hs-vid-cta { transition: none; } } ``` ### 07. Social Proof Hero **Type:** Pure CSS **Description:** Mediterranean-tone social-proof hero — star rating pill above the headline, customer logo wall on warm cream, olive serif headlines with aubergine accents. **HTML:** ```html
        ★★★★★ 4.9 from 12,400 reviews

        Recipes from real grandmothers, measured for real kitchens.

        Saved by 500,000 home cooks who never want to scroll past life-stories again.

        Open the cookbook
        • NYT
        • BON APPÉTIT
        • EATER
        • GUARDIAN
        • SAVEUR
        ``` **CSS:** ```css .hs-sop { display: grid; place-items: center; width: 100%; min-height: 480px; padding: clamp(28px, 5vw, 64px) clamp(20px, 5vw, 56px); background: radial-gradient(70% 60% at 50% 0%, #f7ecd3, transparent 70%), #faf3e3; font-family: 'Inter', system-ui, sans-serif; color: #3a2845; box-sizing: border-box; } .hs-sop-inner { max-width: 720px; text-align: center; width: 100%; } .hs-sop-stars { display: inline-block; padding: 6px 14px; background: #fff; border: 1px solid #e2c89a; border-radius: 999px; color: #c9962b; font-size: 13px; font-weight: 700; letter-spacing: 0.04em; margin-bottom: 22px; } .hs-sop-stars em { color: #6b614f; font-style: normal; font-weight: 500; margin-left: 6px; } .hs-sop h2 { margin: 0 0 16px; font-family: 'Cormorant Garamond', Georgia, serif; font-size: clamp(32px, 5vw, 52px); font-weight: 600; letter-spacing: -0.01em; line-height: 1.1; color: #3a4f2a; } .hs-sop h2 em { color: #6b1e4a; font-style: italic; } .hs-sop p { margin: 0 auto 28px; font-size: 16px; line-height: 1.55; color: #6b614f; max-width: 480px; } .hs-sop-cta { display: inline-block; padding: 13px 26px; background: #6b1e4a; color: #faf3e3; border-radius: 4px; text-decoration: none; font-weight: 700; font-size: 14px; letter-spacing: 0.04em; margin-bottom: 32px; transition: background 0.18s; } .hs-sop-cta:hover { background: #4a1232; } .hs-sop-logos { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: clamp(20px, 4vw, 38px); justify-content: center; padding-top: 24px; border-top: 1px solid #e2c89a; } .hs-sop-logos li { font-family: 'Playfair Display', Georgia, serif; font-size: 12px; font-weight: 700; letter-spacing: 0.18em; color: #6b614f; } @media (prefers-reduced-motion: reduce) { .hs-sop-cta { transition: none; } } ``` ### 08. Animated Headline **Type:** Pure CSS **Description:** 1950s-diner animated headline — words lift into view with staggered delay, retro coral and ivory on jet black, neon-script CTA. Flips between two taglines on a loop. **HTML:** ```html
        — OPEN 24 HRS —

        Late night tunes,
        made for cruising.

        A radio station that never sleeps and never sells you anything.

        Tune in
        ``` **CSS:** ```css .hs-anh { display: grid; place-items: center; width: 100%; min-height: 480px; padding: clamp(32px, 5vw, 64px) clamp(20px, 5vw, 56px); background: #0d0d0d; font-family: 'Inter', system-ui, sans-serif; color: #fdf3e0; box-sizing: border-box; } .hs-anh-inner { max-width: 720px; text-align: center; } .hs-anh-eye { display: inline-block; font-family: 'Courier New', monospace; font-size: 12px; letter-spacing: 0.24em; color: #ff7461; margin-bottom: 26px; } .hs-anh h2 { margin: 0 0 22px; font-family: 'Playfair Display', Georgia, serif; font-size: clamp(38px, 6vw, 68px); font-weight: 700; letter-spacing: -0.015em; line-height: 1.05; color: #fdf3e0; } .hs-anh-w { display: inline-block; opacity: 0; animation: hs-anh-rise 0.7s cubic-bezier(.22,1,.36,1) forwards; animation-delay: calc(var(--d) * 0.12s); } .hs-anh-em { color: #ff7461; font-style: italic; } @keyframes hs-anh-rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } } .hs-anh-sub { font-size: 15px; line-height: 1.55; color: #b8a890; margin: 0 auto 28px; max-width: 420px; opacity: 0; animation: hs-anh-rise 0.7s cubic-bezier(.22,1,.36,1) 0.8s forwards; } .hs-anh-cta { display: inline-block; padding: 14px 28px; background: transparent; color: #ff7461; border: 2px solid #ff7461; border-radius: 999px; text-decoration: none; font-weight: 600; font-size: 14.5px; letter-spacing: 0.06em; text-transform: uppercase; opacity: 0; animation: hs-anh-rise 0.7s cubic-bezier(.22,1,.36,1) 1.1s forwards; transition: background 0.18s, color 0.18s; } .hs-anh-cta:hover { background: #ff7461; color: #0d0d0d; box-shadow: 0 0 22px rgba(255,116,97,0.5); } @media (prefers-reduced-motion: reduce) { .hs-anh-w, .hs-anh-sub, .hs-anh-cta { animation: none; opacity: 1; } } ``` ### 09. Before/After Hero **Type:** Light JS **Description:** Native <input type="range"> drives a CSS clip-path slider that wipes between a "before" desert scene and an "after" lush scene. Burnt orange + petrol blue + cream. **HTML:** ```html

        Restoration, one acre at a time.

        Drag the slider. We turn dust to forest in 18 months — proven on three continents.

        Plant a tree →
        ``` **CSS:** ```css .hs-baf { display: grid; grid-template-columns: 1.1fr 1fr; width: 100%; min-height: 480px; padding: clamp(24px, 4vw, 48px); gap: clamp(20px, 4vw, 48px); align-items: center; background: #f7ecd9; font-family: 'Inter', system-ui, sans-serif; color: #2c4a4f; box-sizing: border-box; } .hs-baf-stage { position: relative; height: 100%; min-height: 360px; border-radius: 12px; overflow: hidden; border: 4px solid #2c4a4f; box-shadow: 8px 8px 0 #c75a2b; } .hs-baf-after, .hs-baf-before { position: absolute; inset: 0; } .hs-baf-after { background: linear-gradient(180deg, #87b8a8 0%, #c8b890 70%, #d6c69a 100%); } .hs-baf-before { background: linear-gradient(180deg, #c75a2b 0%, #e8a36e 60%, #f0b87a 100%); clip-path: inset(0 50% 0 0); } .hs-baf-mountains { position: absolute; bottom: 30%; left: 0; right: 0; height: 40%; } .hs-baf-after-m { background: linear-gradient(135deg, transparent 50%, #4a6b58 50%) 0 0/120px 80px, linear-gradient(45deg, transparent 50%, #4a6b58 50%) 60px 0/120px 80px; background-repeat: repeat-x; } .hs-baf-before-m { background: linear-gradient(135deg, transparent 50%, #8a3614 50%) 0 0/120px 80px, linear-gradient(45deg, transparent 50%, #8a3614 50%) 60px 0/120px 80px; background-repeat: repeat-x; } .hs-baf-sun { position: absolute; top: 18%; left: 70%; width: 70px; height: 70px; border-radius: 50%; background: #f7d875; box-shadow: 0 0 50px rgba(247,216,117,0.6); } .hs-baf-moon { position: absolute; top: 14%; left: 26%; width: 60px; height: 60px; border-radius: 50%; background: #f7ecd9; box-shadow: 0 0 30px rgba(247,236,217,0.4); } .hs-baf-label { position: absolute; bottom: 12px; font-family: 'JetBrains Mono', monospace; font-size: 11px; font-weight: 700; letter-spacing: 0.18em; padding: 4px 10px; background: #2c4a4f; color: #f7ecd9; } .hs-baf-after .hs-baf-label { right: 14px; } .hs-baf-before .hs-baf-label { left: 14px; background: #8a3614; } .hs-baf-slider { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: ew-resize; margin: 0; z-index: 3; } .hs-baf-handle { position: absolute; top: 0; bottom: 0; left: 50%; width: 3px; background: #f7ecd9; box-shadow: 0 0 0 1px #2c4a4f; pointer-events: none; z-index: 2; } .hs-baf-handle::after { content: '⇆'; position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); width: 38px; height: 38px; background: #f7ecd9; border: 2px solid #2c4a4f; border-radius: 50%; color: #2c4a4f; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; } .hs-baf-copy { padding: 12px 0; } .hs-baf h2 { margin: 0 0 14px; font-family: 'Playfair Display', Georgia, serif; font-size: clamp(28px, 4.5vw, 44px); font-weight: 700; letter-spacing: -0.01em; line-height: 1.1; color: #2c4a4f; } .hs-baf h2 em { color: #c75a2b; font-style: italic; } .hs-baf p { margin: 0 0 22px; font-size: 15px; line-height: 1.6; color: #4a6b58; } .hs-baf-cta { display: inline-block; padding: 12px 22px; background: #c75a2b; color: #f7ecd9; border-radius: 4px; text-decoration: none; font-weight: 700; font-size: 14px; transition: background 0.18s; } .hs-baf-cta:hover { background: #8a3614; } @media (max-width: 720px) { .hs-baf { grid-template-columns: 1fr; } } @media (prefers-reduced-motion: reduce) { .hs-baf-cta { transition: none; } } ``` **JS:** ```js (function () { var range = document.getElementById('hs-baf-range'); var clip = document.getElementById('hs-baf-clip'); var handle= document.getElementById('hs-baf-handle'); if (!range || !clip || !handle) return; function update() { var v = range.value; clip.style.clipPath = 'inset(0 ' + (100 - v) + '% 0 0)'; handle.style.left = v + '%'; range.setAttribute('aria-valuetext', v + ' percent'); } range.addEventListener('input', update); update(); })(); ``` ### 10. Sticky Scroll Cue **Type:** Pure CSS **Description:** Tall full-bleed hero with a bouncing scroll indicator at the bottom. Forest emerald on birch with a soft yellow CTA — the cabin / retreat brand aesthetic. **HTML:** ```html
        — A small place upstate

        Slow Sundays, warm wood, not a single notification.

        Three cabins, two acres, no Wi-Fi, one shared kitchen. Book yourself a real weekend.

        Check availability
        ``` **CSS:** ```css .hs-scc { position: relative; display: grid; place-items: center; width: 100%; min-height: 480px; padding: clamp(28px, 5vw, 64px) clamp(20px, 5vw, 56px) 90px; background: radial-gradient(80% 60% at 50% 0%, rgba(38,82,52,0.16), transparent 70%), #f3eadb; font-family: 'Inter', system-ui, sans-serif; color: #1e3a26; box-sizing: border-box; } .hs-scc-inner { max-width: 720px; text-align: center; } .hs-scc-eye { display: inline-block; font-family: 'Cormorant Garamond', Georgia, serif; font-style: italic; font-size: 16px; color: #6b8a6f; margin-bottom: 18px; } .hs-scc h2 { margin: 0 0 18px; font-family: 'Cormorant Garamond', Georgia, serif; font-size: clamp(34px, 5vw, 56px); font-weight: 600; letter-spacing: -0.015em; line-height: 1.05; } .hs-scc h2 em { color: #b8893a; font-style: italic; } .hs-scc p { margin: 0 auto 26px; font-size: 16px; line-height: 1.55; color: #5a6b58; max-width: 480px; } .hs-scc-cta { display: inline-block; padding: 13px 26px; background: #f4d35e; color: #1e3a26; border: 2px solid #1e3a26; border-radius: 0; text-decoration: none; font-weight: 700; font-size: 14px; letter-spacing: 0.04em; box-shadow: 4px 4px 0 #1e3a26; transition: transform 0.15s, box-shadow 0.15s; } .hs-scc-cta:hover { transform: translate(2px,2px); box-shadow: 2px 2px 0 #1e3a26; } .hs-scc-cue { position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 6px; font-family: 'JetBrains Mono', monospace; font-size: 10px; letter-spacing: 0.18em; color: #6b8a6f; text-transform: uppercase; } .hs-scc-mouse { width: 22px; height: 36px; border: 2px solid #1e3a26; border-radius: 12px; position: relative; } .hs-scc-mouse span { position: absolute; top: 6px; left: 50%; transform: translateX(-50%); width: 3px; height: 7px; background: #1e3a26; border-radius: 2px; animation: hs-scc-bounce 1.4s ease-in-out infinite; } @keyframes hs-scc-bounce { 0%, 100% { transform: translate(-50%, 0); opacity: 1; } 50% { transform: translate(-50%, 10px); opacity: 0.4; } } @media (prefers-reduced-motion: reduce) { .hs-scc-mouse span { animation: none; } .hs-scc-cta { transition: none; } } ``` ### 11. Magazine Cover **Type:** Pure CSS **Description:** Print-magazine cover treatment — issue stamp, oversized italic serif headline, vertical spine label, foil-stamped corner number. Plum and champagne on linen. **HTML:** ```html
        Vol. XII · No. 47 · Spring 04
        SPRING 2026 · INDEX NO. 04

        The Quiet Revolution of slow type.

        Why every serious editorial brand is going back to serifs, italics, and a single column wide enough to think in.

        Read the issue →
        ``` **CSS:** ```css .hs-mag { display: grid; place-items: center; width: 100%; min-height: 480px; padding: clamp(20px, 4vw, 40px); background: repeating-linear-gradient(0deg, transparent 0 47px, rgba(60,40,80,0.04) 47px 48px), #ede4d3; font-family: 'Playfair Display', Georgia, serif; color: #2a1f3a; box-sizing: border-box; } .hs-mag-frame { position: relative; width: 100%; max-width: 720px; background: #f7f1e1; border: 1px solid #2a1f3a; padding: clamp(28px, 4vw, 56px) clamp(28px, 4vw, 56px) clamp(28px, 4vw, 56px) clamp(48px, 6vw, 72px); box-shadow: 12px 12px 0 #c69e5a, 12px 12px 0 1px #2a1f3a; } .hs-mag-spine { position: absolute; top: 50%; left: 18px; transform: translateY(-50%); writing-mode: vertical-rl; font-family: 'JetBrains Mono', monospace; font-size: 10.5px; letter-spacing: 0.32em; color: #6b1f4a; white-space: nowrap; padding: 14px 4px; border-block: 1px solid #6b1f4a; } .hs-mag-num { position: absolute; top: 16px; right: 22px; font-family: 'Playfair Display', Georgia, serif; font-size: 48px; font-weight: 800; font-style: italic; color: #c69e5a; text-shadow: 1px 1px 0 #2a1f3a; } .hs-mag header { padding-bottom: 18px; border-bottom: 1px solid #2a1f3a; margin-bottom: 22px; } .hs-mag-issue { font-family: 'JetBrains Mono', monospace; font-size: 10.5px; font-weight: 700; letter-spacing: 0.24em; color: #2a1f3a; } .hs-mag h2 { margin: 0 0 22px; font-size: clamp(40px, 7vw, 78px); font-weight: 600; line-height: 0.95; letter-spacing: -0.02em; } .hs-mag h2 em { font-style: italic; font-weight: 700; color: #6b1f4a; display: block; font-size: 1.2em; } .hs-mag p { font-family: 'Cormorant Garamond', Georgia, serif; font-style: italic; font-size: 18px; line-height: 1.45; color: #4a3858; margin: 0 0 24px; max-width: 460px; } .hs-mag-cta { font-family: 'JetBrains Mono', monospace; font-size: 12px; font-weight: 700; letter-spacing: 0.16em; color: #2a1f3a; text-decoration: none; border-bottom: 2px solid #2a1f3a; padding-bottom: 3px; transition: color 0.15s, border-color 0.15s; } .hs-mag-cta:hover { color: #6b1f4a; border-color: #6b1f4a; } ``` ### 12. Asymmetric Type **Type:** Pure CSS **Description:** Construction-site asymmetric typography — broken across columns with intentional misalignment, hi-vis safety yellow on concrete grey, black hard rules. **HTML:** ```html
        / ZONE 4

        UNDER construction. Always.

        &

        Software you ship is software that's still being built. We make CI fast enough to do it on the dev's terms — not the build's.

        DEPLOY →
        ``` **CSS:** ```css .hs-asy { display: grid; place-items: stretch; width: 100%; min-height: 480px; padding: clamp(24px, 4vw, 48px); background: #c8c4be; font-family: 'Inter', system-ui, sans-serif; color: #0a0a0a; box-sizing: border-box; overflow: hidden; } .hs-asy-grid { position: relative; display: grid; grid-template-columns: 1fr 1fr 0.6fr; grid-template-rows: auto 1fr auto auto; gap: 14px; width: 100%; } .hs-asy-tag { grid-column: 1 / 2; font-family: 'JetBrains Mono', monospace; font-size: 11px; font-weight: 700; letter-spacing: 0.2em; background: #f5d028; padding: 4px 10px; align-self: start; justify-self: start; } .hs-asy-h { grid-column: 1 / 4; margin: 0; font-family: 'Inter', sans-serif; font-weight: 900; line-height: 0.85; letter-spacing: -0.04em; text-transform: uppercase; } .hs-asy-l1 { display: block; font-size: clamp(60px, 11vw, 130px); } .hs-asy-l2 { display: block; font-size: clamp(40px, 8vw, 90px); margin-left: clamp(40px, 12vw, 180px); color: #f5d028; -webkit-text-stroke: 2px #0a0a0a; } .hs-asy-l3 { display: block; font-size: clamp(40px, 8vw, 90px); margin-left: clamp(80px, 24vw, 360px); } .hs-asy-amp { grid-column: 3; grid-row: 3; font-family: 'Playfair Display', Georgia, serif; font-size: clamp(80px, 14vw, 160px); font-weight: 800; font-style: italic; color: #0a0a0a; line-height: 1; align-self: end; justify-self: end; } .hs-asy-p { grid-column: 1 / 3; grid-row: 3; font-size: 14px; line-height: 1.55; max-width: 380px; color: #2a2a2a; margin: 0; align-self: end; border-left: 4px solid #f5d028; padding-left: 14px; } .hs-asy-cta { grid-column: 1 / 2; grid-row: 4; display: inline-block; padding: 14px 26px; background: #0a0a0a; color: #f5d028; font-family: 'JetBrains Mono', monospace; font-weight: 800; font-size: 14px; letter-spacing: 0.16em; text-decoration: none; border: 0; align-self: start; justify-self: start; transition: background 0.15s; } .hs-asy-cta:hover { background: #f5d028; color: #0a0a0a; } .hs-asy-stripe { grid-column: 2 / 4; grid-row: 4; height: 14px; align-self: center; background: repeating-linear-gradient(45deg, #0a0a0a 0 12px, #f5d028 12px 24px); } @media (max-width: 720px) { .hs-asy-l2, .hs-asy-l3 { margin-left: 0; } } @media (prefers-reduced-motion: reduce) { .hs-asy-cta { transition: none; } } ``` ### 13. Oversized Number **Type:** Pure CSS **Description:** Vintage wine-label poster — a massive faded burgundy "1924" set behind italic serif copy with gold-leaf accents on cream paper. **HTML:** ```html
        — Estate · Vinifera ·

        A century of quiet wines.

        Six grapes. Four hectares. One family that still skips the marketing and lets the vintage speak.

        Visit the cellar
        ``` **CSS:** ```css .hs-ovn { position: relative; overflow: hidden; display: grid; place-items: center; width: 100%; min-height: 480px; padding: clamp(28px, 5vw, 64px) clamp(20px, 5vw, 56px); background: #f5ebd4; font-family: 'Playfair Display', Georgia, serif; color: #2a0a18; box-sizing: border-box; } .hs-ovn-bg { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); font-size: clamp(220px, 38vw, 480px); font-weight: 900; line-height: 1; color: #6b1230; opacity: 0.12; pointer-events: none; letter-spacing: -0.02em; } .hs-ovn-inner { position: relative; z-index: 1; max-width: 580px; text-align: center; } .hs-ovn-eye { display: inline-block; font-family: 'Cormorant Garamond', Georgia, serif; font-style: italic; font-size: 16px; color: #c69e3d; margin-bottom: 16px; letter-spacing: 0.08em; } .hs-ovn h2 { margin: 0 0 18px; font-size: clamp(36px, 6vw, 60px); font-weight: 600; line-height: 1.05; } .hs-ovn h2 em { color: #6b1230; font-style: italic; } .hs-ovn p { font-family: 'Cormorant Garamond', Georgia, serif; font-style: italic; font-size: 18px; line-height: 1.55; color: #5a3848; margin: 0 auto 24px; max-width: 460px; } .hs-ovn-cta { display: inline-block; padding: 12px 28px; background: transparent; color: #6b1230; border: 1.5px solid #6b1230; border-radius: 0; text-decoration: none; font-family: 'JetBrains Mono', monospace; font-size: 12px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; transition: background 0.18s, color 0.18s; } .hs-ovn-cta:hover { background: #6b1230; color: #f5ebd4; } @media (prefers-reduced-motion: reduce) { .hs-ovn-cta { transition: none; } } ``` ### 14. Marquee Headline **Type:** Pure CSS **Description:** A single phrase scrolls horizontally on a loop with a counter-direction line beneath. Hot tangerine on chocolate brown — the streetwear / drop-culture treatment. **HTML:** ```html

        Drop 04. Tuesday 11am EST.

        72 pieces. No restock. No back-orders. No DM begging.

        Set the alarm
        ``` **CSS:** ```css .hs-mar { display: flex; flex-direction: column; justify-content: space-between; width: 100%; min-height: 480px; padding: 0; background: #2a1410; font-family: 'Inter', system-ui, sans-serif; color: #ffe4d6; box-sizing: border-box; overflow: hidden; contain: layout paint; } .hs-mar-track { display: flex; gap: 32px; white-space: nowrap; overflow: hidden; padding: 18px 0; font-family: 'Inter', sans-serif; font-size: clamp(32px, 5vw, 52px); font-weight: 900; font-style: italic; letter-spacing: -0.01em; background: #f04e23; color: #2a1410; border-block: 4px solid #2a1410; } .hs-mar-track span { animation: hs-mar-roll 22s linear infinite; flex-shrink: 0; } .hs-mar-r span { animation-direction: normal; } .hs-mar-l { background: #2a1410; color: #f04e23; border-color: #f04e23; } .hs-mar-l span { animation-direction: reverse; } @keyframes hs-mar-roll { from { transform: translateX(0); } to { transform: translateX(-100%); } } .hs-mar-inner { flex: 1; display: grid; place-items: center; padding: clamp(24px, 4vw, 56px); text-align: center; } .hs-mar h2 { margin: 0 0 14px; font-size: clamp(32px, 5vw, 52px); font-weight: 900; letter-spacing: -0.025em; line-height: 1.05; color: #ffe4d6; } .hs-mar h2 em { color: #f5b148; font-style: italic; } .hs-mar p { margin: 0 auto 22px; font-size: 16px; color: #c8a899; max-width: 460px; line-height: 1.55; } .hs-mar-cta { display: inline-block; padding: 13px 28px; background: #f5b148; color: #2a1410; border-radius: 0; text-decoration: none; font-weight: 800; font-size: 14.5px; letter-spacing: 0.04em; transition: background 0.15s; } .hs-mar-cta:hover { background: #ffe4d6; } @media (prefers-reduced-motion: reduce) { .hs-mar-track span { animation: none; } .hs-mar-cta { transition: none; } } ``` ### 15. Photo Card Hero **Type:** Pure CSS **Description:** Aesop / Apple-style full-bleed photo with copy in the bottom-left corner. Desaturated denim photograph painted in CSS, rust accent, linen card overlay. **HTML:** ```html
        — A garment for the long haul

        The chore coat, made to age.

        Heavy duck canvas. Rivet-tacked seams. The kind of jacket that earns its character on the wearer, not in the wash.

        Read the story →
        ``` **CSS:** ```css .hs-phc { position: relative; overflow: hidden; width: 100%; min-height: 480px; background: linear-gradient(180deg, #2c3a48 0%, #1f2a35 60%, #15202a 100%); font-family: 'Inter', system-ui, sans-serif; color: #f3eadb; box-sizing: border-box; display: grid; grid-template-columns: 1.05fr 1fr; align-items: stretch; } .hs-phc-wall { position: absolute; inset: 0; background: repeating-linear-gradient(95deg, transparent 0 80px, rgba(255,255,255,0.018) 80px 81px), repeating-linear-gradient(0deg, transparent 0 4px, rgba(0,0,0,0.06) 4px 5px); pointer-events: none; } .hs-phc-light { position: absolute; inset: 0; background: radial-gradient(40% 60% at 30% 25%, rgba(255,230,180,0.16) 0%, transparent 60%), radial-gradient(80% 100% at 50% 100%, rgba(0,0,0,0.5) 0%, transparent 70%); pointer-events: none; } .hs-phc-scene { position: relative; grid-column: 1; grid-row: 1; align-self: stretch; display: grid; place-items: center; z-index: 1; } .hs-phc-shelf { position: absolute; top: 18%; left: 18%; right: 18%; height: 8px; background: linear-gradient(180deg, #5a3e22 0%, #3a2814 100%); box-shadow: 0 1px 0 rgba(255,255,255,0.08) inset, 0 4px 8px rgba(0,0,0,0.35); border-radius: 2px; } .hs-phc-peg { position: absolute; top: 16%; left: 50%; width: 14px; height: 26px; background: linear-gradient(180deg, #c89a4e 0%, #7a5a2e 100%); border-radius: 6px 6px 4px 4px; transform: translateX(-50%); box-shadow: 0 2px 4px rgba(0,0,0,0.4); z-index: 2; } .hs-phc-coat { position: absolute; top: 22%; left: 50%; width: 200px; height: 280px; transform: translateX(-50%); background: radial-gradient(80% 100% at 50% 0%, #4a5e7a 0%, #34465c 50%, #1f2a3a 100%); clip-path: polygon( 35% 0%, 65% 0%, 78% 8%, 95% 14%, 100% 100%, 0% 100%, 5% 14%, 22% 8% ); box-shadow: inset -8px 0 24px rgba(0,0,0,0.4), inset 8px 0 16px rgba(255,255,255,0.04); } .hs-phc-collar { position: absolute; top: 4%; left: 50%; width: 56px; height: 24px; transform: translateX(-50%); background: #5a708c; clip-path: polygon(0% 0%, 100% 0%, 75% 100%, 25% 100%); } .hs-phc-pocket { position: absolute; top: 50%; width: 50px; height: 60px; background: rgba(0,0,0,0.18); border: 1.5px solid #2a3848; border-radius: 2px; } .hs-phc-pocket-l { left: 14%; } .hs-phc-pocket-r { right: 14%; } .hs-phc-button { position: absolute; left: 50%; transform: translateX(-50%); width: 8px; height: 8px; background: radial-gradient(circle at 35% 35%, #d8a05c 0%, #6a4818 100%); border-radius: 50%; box-shadow: 0 1px 2px rgba(0,0,0,0.4); } .hs-phc-b1 { top: 22%; } .hs-phc-b2 { top: 40%; } .hs-phc-b3 { top: 58%; } .hs-phc-shadow { position: absolute; bottom: 0; left: 50%; width: 240px; height: 24px; transform: translateX(-50%); background: radial-gradient(50% 100% at 50% 0%, rgba(0,0,0,0.55), transparent 70%); filter: blur(4px); } .hs-phc-grain { position: absolute; inset: 0; background-image: radial-gradient(circle at 25% 25%, rgba(255,255,255,0.025) 0.5px, transparent 1px), radial-gradient(circle at 75% 75%, rgba(0,0,0,0.05) 0.5px, transparent 1px); background-size: 3px 3px; pointer-events: none; z-index: 3; mix-blend-mode: overlay; } .hs-phc-card { grid-column: 2; grid-row: 1; align-self: end; justify-self: start; margin: 0 0 clamp(28px, 4vw, 48px) 0; max-width: 440px; background: #f3eadb; color: #1a2434; padding: clamp(22px, 3vw, 32px); border-radius: 2px; box-shadow: 0 22px 40px rgba(0,0,0,0.32); position: relative; z-index: 4; } .hs-phc-eye { display: block; font-family: 'Cormorant Garamond', Georgia, serif; font-style: italic; font-size: 14px; color: #b85020; margin-bottom: 10px; letter-spacing: 0.02em; } .hs-phc h2 { margin: 0 0 14px; font-family: 'Cormorant Garamond', Georgia, serif; font-size: clamp(28px, 3.6vw, 40px); font-weight: 600; letter-spacing: -0.01em; line-height: 1.1; } .hs-phc h2 em { color: #b85020; font-style: italic; } .hs-phc-card p { margin: 0 0 18px; font-size: 14px; line-height: 1.6; color: #4a5466; } .hs-phc-cta { display: inline-block; font-family: 'JetBrains Mono', monospace; font-size: 12px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: #1a2434; text-decoration: none; border-bottom: 1.5px solid #1a2434; padding-bottom: 3px; transition: color 0.15s, border-color 0.15s; } .hs-phc-cta:hover { color: #b85020; border-color: #b85020; } .hs-phc-meta { position: absolute; bottom: clamp(14px, 2vw, 22px); left: clamp(20px, 3vw, 32px); font-family: 'JetBrains Mono', monospace; font-size: 10px; letter-spacing: 0.18em; color: rgba(243,234,219,0.55); z-index: 4; } @media (max-width: 720px) { .hs-phc { grid-template-columns: 1fr; grid-template-rows: 280px auto; } .hs-phc-scene { grid-column: 1; grid-row: 1; } .hs-phc-card { grid-column: 1; grid-row: 2; margin: -40px 16px 16px; align-self: auto; justify-self: stretch; } .hs-phc-meta { display: none; } } @media (prefers-reduced-motion: reduce) { .hs-phc-cta { transition: none; } } ``` ### 16. Brutalist Text-Only **Type:** Pure CSS **Description:** Raw Swiss-punk brutalist hero — pure black, traffic-cone orange highlight, acid lime accent, hard 8px offset shadows. No images, no soft anything. **HTML:** ```html
        001 / 042

        THE WEB WAS NEVER MEANT TO LOOK SAFE.

        A design studio for brands that would rather be remembered than liked.

        ``` **CSS:** ```css .hs-bru { display: grid; place-items: center; width: 100%; min-height: 480px; padding: clamp(28px, 5vw, 64px) clamp(20px, 5vw, 56px); background: #0a0a0a; font-family: 'Inter', system-ui, sans-serif; color: #ffffff; box-sizing: border-box; } .hs-bru-stack { max-width: 760px; } .hs-bru-num { display: inline-block; font-family: 'JetBrains Mono', monospace; font-size: 12px; font-weight: 700; letter-spacing: 0.2em; background: #ff5e1a; color: #0a0a0a; padding: 4px 10px; margin-bottom: 22px; } .hs-bru-h { margin: 0 0 22px; font-family: 'Inter', sans-serif; font-size: clamp(40px, 7vw, 84px); font-weight: 900; line-height: 0.92; letter-spacing: -0.04em; text-transform: uppercase; } .hs-bru-h em { color: #c4f048; font-style: italic; display: inline; } .hs-bru-mark { display: inline-block; background: #ff5e1a; color: #0a0a0a; padding: 0 12px; transform: rotate(-1deg); } .hs-bru-p { font-family: 'JetBrains Mono', monospace; font-size: 14px; line-height: 1.55; color: #a8a8a8; margin: 0 0 26px; max-width: 480px; border-top: 2px solid #ff5e1a; padding-top: 14px; } .hs-bru-row { display: flex; gap: 14px; flex-wrap: wrap; } .hs-bru-cta { display: inline-block; padding: 12px 18px; font-family: 'JetBrains Mono', monospace; font-size: 13px; font-weight: 700; letter-spacing: 0.12em; text-decoration: none; background: transparent; color: #fff; border: 2px solid #fff; transition: background 0.12s, color 0.12s; } .hs-bru-cta:hover { background: #fff; color: #0a0a0a; } .hs-bru-cta-pri { background: #ff5e1a; color: #0a0a0a; border-color: #ff5e1a; } .hs-bru-cta-pri:hover { background: #c4f048; border-color: #c4f048; color: #0a0a0a; } @media (prefers-reduced-motion: reduce) { .hs-bru-cta { transition: none; } } ``` ### 17. Vertical Type Hero **Type:** Pure CSS **Description:** Japanese traditional vertical typography — headline reads top-to-bottom using writing-mode: vertical-rl. Indigo on washi-paper white, vermillion seal stamp. **HTML:** ```html

        静かな道具

        Shizuka na dōgu — quiet tools.

        Hand-forged carpentry implements. Made by one family in Niigata since 1873.

        View the catalogue →
        ``` **CSS:** ```css .hs-vrt { position: relative; display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; align-items: center; width: 100%; min-height: 480px; max-height: 540px; padding: clamp(28px, 4vw, 56px); gap: clamp(28px, 5vw, 64px); background: radial-gradient(80% 60% at 50% 0%, rgba(20,40,80,0.06), transparent 70%), #f5ede0; font-family: 'Cormorant Garamond', Georgia, serif; color: #1a2858; box-sizing: border-box; overflow: hidden; } .hs-vrt-bg { position: absolute; right: -60px; top: 0; bottom: 0; width: 280px; background: repeating-linear-gradient(0deg, transparent 0 23px, rgba(26,40,88,0.05) 23px 24px); pointer-events: none; } .hs-vrt-vertical { grid-column: 1; grid-row: 1 / 3; writing-mode: vertical-rl; text-orientation: upright; align-self: center; display: block; height: 100%; min-height: 380px; } .hs-vrt h2 { margin: 0; font-size: clamp(36px, 4.8vw, 56px); font-weight: 700; letter-spacing: 0.04em; color: #1a2858; line-height: 1.2; white-space: nowrap; } .hs-vrt h2 em { color: #c63828; font-style: normal; font-weight: 800; } .hs-vrt-copy { grid-column: 2; grid-row: 1 / 3; display: flex; flex-direction: column; gap: 18px; position: relative; z-index: 1; max-width: 460px; } .hs-vrt-jp { font-family: 'Cormorant Garamond', Georgia, serif; font-style: italic; font-size: 18px; color: #c63828; margin: 0; letter-spacing: 0.06em; } .hs-vrt-en { font-family: 'Inter', system-ui, sans-serif; font-size: 15px; line-height: 1.6; color: #4a5478; margin: 0; } .hs-vrt-seal { position: absolute; top: clamp(20px, 3vw, 32px); right: clamp(20px, 3vw, 32px); width: 78px; height: 78px; background: #c63828; color: #f5ede0; display: flex; flex-direction: column; align-items: center; justify-content: center; font-family: 'Inter', sans-serif; font-weight: 700; font-size: 22px; border: 2px solid #c63828; box-shadow: inset 0 0 0 4px #f5ede0, inset 0 0 0 6px #c63828; z-index: 2; } .hs-vrt-cta { display: inline-block; padding: 12px 22px; background: #1a2858; color: #f5ede0; font-family: 'JetBrains Mono', monospace; font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-decoration: none; align-self: flex-start; transition: background 0.15s; } .hs-vrt-cta:hover { background: #c63828; } @media (max-width: 720px) { .hs-vrt { grid-template-columns: 1fr; max-height: none; } .hs-vrt-vertical { grid-column: 1; grid-row: auto; min-height: 200px; } .hs-vrt-copy { grid-column: 1; grid-row: auto; } .hs-vrt-seal { top: 16px; right: 16px; width: 60px; height: 60px; font-size: 18px; } } @media (prefers-reduced-motion: reduce) { .hs-vrt-cta { transition: none; } } ``` ### 18. Kinetic Type Hero **Type:** Pure CSS **Description:** Rave-poster kinetic typography — letters rotate, scale, and float individually using per-letter delay. Acid green and magenta on pure black with strobe-like accents. **HTML:** ```html

        FULL BASS MODE

        A booking app for warehouse parties. The line is the door, not the website.

        Get tickets ⚡
        ``` **CSS:** ```css .hs-knt { position: relative; display: grid; place-items: center; width: 100%; min-height: 480px; padding: clamp(28px, 5vw, 64px) clamp(20px, 5vw, 56px); background: #0a0a0a; font-family: 'Inter', system-ui, sans-serif; color: #fff; box-sizing: border-box; overflow: hidden; text-align: center; } .hs-knt-pulse { position: absolute; inset: 0; background: radial-gradient(60% 50% at 30% 30%, rgba(196,255,82,0.18), transparent 60%), radial-gradient(50% 50% at 80% 70%, rgba(238,82,206,0.20), transparent 60%); animation: hs-knt-pulse 2.4s ease-in-out infinite alternate; } @keyframes hs-knt-pulse { from { opacity: 0.6; } to { opacity: 1; } } .hs-knt-h { position: relative; z-index: 1; margin: 0 0 22px; font-family: 'Inter', sans-serif; font-size: clamp(48px, 9vw, 110px); font-weight: 900; letter-spacing: -0.04em; line-height: 0.92; text-transform: uppercase; } .hs-knt-h span { display: inline-block; animation: hs-knt-jitter 2s ease-in-out infinite; animation-delay: calc(var(--i, 0) * 0.06s); } .hs-knt-h em { color: #ee52ce; font-style: italic; } .hs-knt-h em span { color: #ee52ce; } .hs-knt-h > span:nth-child(-n+4) { color: #c4ff52; } .hs-knt-gap { display: inline-block; width: 0.4em; } @keyframes hs-knt-jitter { 0%, 100% { transform: translateY(0) rotate(0deg) scale(1); } 25% { transform: translateY(-8px) rotate(-2deg) scale(1.04); } 50% { transform: translateY(0) rotate(2deg) scale(0.98); } 75% { transform: translateY(6px) rotate(-1deg) scale(1.02); } } .hs-knt-p { position: relative; z-index: 1; margin: 0 auto 26px; font-size: 16px; color: #888; max-width: 440px; } .hs-knt-cta { position: relative; z-index: 1; display: inline-block; padding: 14px 28px; background: #c4ff52; color: #0a0a0a; border-radius: 0; text-decoration: none; font-weight: 800; font-size: 14.5px; letter-spacing: 0.06em; text-transform: uppercase; box-shadow: 0 0 28px rgba(196,255,82,0.45); transition: background 0.15s, color 0.15s, box-shadow 0.15s; } .hs-knt-cta:hover { background: #ee52ce; color: #fff; box-shadow: 0 0 28px rgba(238,82,206,0.55); } @media (prefers-reduced-motion: reduce) { .hs-knt-h span, .hs-knt-pulse { animation: none; } .hs-knt-cta { transition: none; } } ``` ### 19. Bento Hero **Type:** Pure CSS **Description:** Apple-style bento hero — one large headline tile with stat / quote / pill cells fanning around it. Matte-ceramic palette: salmon, terracotta, ivory, olive. **HTML:** ```html
        1,400 hand-thrown
        pieces logged

        “Replaced three notebooks and a chalkboard.”

        — Mireya, Studio Verde
        ★ 4.9App Store
        ``` **CSS:** ```css .hs-bnt { display: grid; grid-template-columns: 1.4fr 0.8fr 0.8fr; grid-template-rows: auto auto; grid-template-areas: "hero hero stat" "hero hero quote" "pill cta quote"; gap: 14px; width: 100%; min-height: 480px; padding: clamp(20px, 3vw, 32px); background: #f5ebde; font-family: 'Inter', system-ui, sans-serif; color: #2c1f15; box-sizing: border-box; } .hs-bnt > article { border-radius: 16px; padding: clamp(18px, 2.5vw, 26px); display: flex; flex-direction: column; justify-content: space-between; gap: 10px; } .hs-bnt-hero { grid-area: hero; background: linear-gradient(160deg, #f4a48b, #d97766); color: #2c1f15; } .hs-bnt-eye { font-family: 'JetBrains Mono', monospace; font-size: 11px; font-weight: 700; letter-spacing: 0.16em; background: #2c1f15; color: #f5ebde; padding: 4px 10px; border-radius: 999px; align-self: flex-start; } .hs-bnt-hero h2 { margin: 0; font-family: 'Cormorant Garamond', Georgia, serif; font-size: clamp(28px, 4.5vw, 48px); font-weight: 600; letter-spacing: -0.015em; line-height: 1.05; } .hs-bnt-hero h2 em { color: #6b1f12; font-style: italic; } .hs-bnt-cta { align-self: flex-start; padding: 11px 20px; background: #2c1f15; color: #f5ebde; border-radius: 999px; text-decoration: none; font-weight: 600; font-size: 14px; transition: background 0.18s; } .hs-bnt-cta:hover { background: #6b1f12; } .hs-bnt-stat { grid-area: stat; background: #6b8a3e; color: #f5ebde; } .hs-bnt-stat strong { font-family: 'Cormorant Garamond', serif; font-size: clamp(40px, 5vw, 64px); font-weight: 700; line-height: 1; } .hs-bnt-stat span { font-size: 13px; line-height: 1.35; opacity: 0.9; } .hs-bnt-quote { grid-area: quote; background: #2c1f15; color: #f5ebde; } .hs-bnt-quote p { font-family: 'Cormorant Garamond', serif; font-style: italic; font-size: 17px; margin: 0; line-height: 1.4; } .hs-bnt-quote cite { font-size: 11px; font-style: normal; letter-spacing: 0.06em; opacity: 0.7; } .hs-bnt-pill { grid-area: pill; background: #f5ebde; border: 2px solid #2c1f15; flex-direction: row; align-items: center; justify-content: space-between; } .hs-bnt-pill span { font-weight: 800; font-size: 18px; color: #c69e3d; } .hs-bnt-pill em { font-style: normal; font-size: 11px; opacity: 0.7; letter-spacing: 0.06em; } .hs-bnt-cta-tile { grid-area: cta; background: #d97766; padding: 0 !important; align-items: stretch; justify-content: stretch; } .hs-bnt-cta-tile a { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; color: #2c1f15; text-decoration: none; font-weight: 700; font-size: 14.5px; } .hs-bnt-cta-tile a:hover { background: rgba(0,0,0,0.08); } @media (max-width: 720px) { .hs-bnt { grid-template-columns: 1fr 1fr; grid-template-areas: "hero hero" "stat quote" "pill cta"; } } @media (prefers-reduced-motion: reduce) { .hs-bnt-cta, .hs-bnt-cta-tile a { transition: none; } } ``` ### 20. Gradient Text Spotlight **Type:** Pure CSS **Description:** Oversized headline with an animated marigold → ruby → grape gradient sweeping across the letters. The Linear / Apple wordmark shimmer treatment. **HTML:** ```html
        v3 launching tuesday

        Made for the way creative people actually work.

        One canvas. Every layer. Zero exporting between apps to nudge a kerning pair.

        Join the waitlist →
        ``` **CSS:** ```css .hs-gts { display: grid; place-items: center; width: 100%; min-height: 480px; padding: clamp(28px, 5vw, 64px) clamp(20px, 5vw, 56px); background: radial-gradient(60% 60% at 50% 0%, rgba(120,30,90,0.18), transparent 70%), #1a0d20; font-family: 'Inter', system-ui, sans-serif; color: #f4e8d0; box-sizing: border-box; } .hs-gts-inner { max-width: 720px; text-align: center; } .hs-gts-eye { display: inline-block; font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: 0.16em; color: #f5b148; padding: 4px 10px; border: 1px solid rgba(245,177,72,0.4); border-radius: 999px; margin-bottom: 22px; } .hs-gts h2 { margin: 0 0 18px; font-size: clamp(38px, 6vw, 68px); font-weight: 800; letter-spacing: -0.025em; line-height: 1.05; } .hs-gts-shine { display: inline-block; background: linear-gradient(90deg, #f5b148, #d63a5e, #7e2d8a, #f5b148); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: hs-gts-sweep 4s linear infinite; } @keyframes hs-gts-sweep { to { background-position: 200% 0; } } .hs-gts p { margin: 0 auto 26px; font-size: 17px; line-height: 1.55; color: #b8a890; max-width: 460px; } .hs-gts-cta { display: inline-block; padding: 13px 26px; background: linear-gradient(90deg, #f5b148, #d63a5e); color: #1a0d20; border-radius: 999px; text-decoration: none; font-weight: 700; font-size: 14.5px; box-shadow: 0 12px 30px rgba(214,58,94,0.35); transition: transform 0.15s; } .hs-gts-cta:hover { transform: translateY(-1px); } @media (prefers-reduced-motion: reduce) { .hs-gts-shine { animation: none; background-position: 0 0; } .hs-gts-cta { transition: none; } } ``` ### 21. Product Shot Hero **Type:** Pure CSS **Description:** Apple-keynote product shot — a CSS-painted device front-and-centre with floating feature badges that pulse around it. Ice blue + chrome silver on warm white. **HTML:** ```html
        · chip16-core neural · battery22 hours · weight1.24 kg

        The lightest pro
        laptop we've ever shipped.

        From $1,499 →
        ``` **CSS:** ```css .hs-prd { display: grid; grid-template-columns: 1.2fr 1fr; width: 100%; min-height: 480px; padding: clamp(28px, 5vw, 56px); gap: clamp(24px, 4vw, 56px); align-items: center; background: radial-gradient(circle at 30% 30%, #d8e8f0 0%, transparent 50%), radial-gradient(circle at 80% 70%, #e8eef2 0%, transparent 50%), #f8fafc; font-family: 'Inter', system-ui, sans-serif; color: #1a2840; box-sizing: border-box; } .hs-prd-stage { position: relative; height: 100%; min-height: 320px; display: grid; place-items: center; } .hs-prd-device { width: 320px; height: 200px; background: linear-gradient(160deg, #b8c8d8 0%, #8090a8 50%, #607080 100%); border-radius: 14px; position: relative; box-shadow: 0 22px 60px rgba(96,112,128,0.4), inset 0 1px 0 rgba(255,255,255,0.5), inset 0 -2px 0 rgba(0,0,0,0.18); } .hs-prd-screen { position: absolute; inset: 8px; background: linear-gradient(135deg, #1a2840 0%, #0a1428 100%); border-radius: 7px; box-shadow: inset 0 0 0 2px #0a1428; } .hs-prd-cam { position: absolute; top: 4px; left: 50%; transform: translateX(-50%); width: 5px; height: 5px; border-radius: 50%; background: #1a2840; } .hs-prd-pulse { position: absolute; background: #fff; border: 1px solid #d0d8e0; padding: 8px 12px; border-radius: 999px; font-size: 12.5px; color: #1a2840; display: inline-flex; flex-direction: column; gap: 1px; box-shadow: 0 8px 22px rgba(96,112,128,0.18); animation: hs-prd-bob 4s ease-in-out infinite; } .hs-prd-pulse strong { font-family: 'JetBrains Mono', monospace; font-size: 10px; color: #6b85a5; font-weight: 600; letter-spacing: 0.04em; } .hs-prd-p1 { top: 10%; left: 4%; animation-delay: 0s; } .hs-prd-p2 { top: 35%; right: 0; animation-delay: -1.3s; } .hs-prd-p3 { bottom: 12%; left: 12%; animation-delay: -2.6s; } @keyframes hs-prd-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } } .hs-prd-copy { padding: 12px 0; } .hs-prd h2 { margin: 0 0 22px; font-size: clamp(30px, 4.5vw, 48px); font-weight: 700; letter-spacing: -0.025em; line-height: 1.05; color: #1a2840; } .hs-prd h2 em { background: linear-gradient(90deg, #6b85a5, #b8c8d8); -webkit-background-clip: text; background-clip: text; color: transparent; font-style: italic; font-weight: 800; } .hs-prd-cta { display: inline-block; padding: 13px 24px; background: #1a2840; color: #f8fafc; border-radius: 999px; text-decoration: none; font-weight: 600; font-size: 14.5px; transition: transform 0.15s; } .hs-prd-cta:hover { transform: translateY(-1px); } @media (max-width: 720px) { .hs-prd { grid-template-columns: 1fr; } } @media (prefers-reduced-motion: reduce) { .hs-prd-pulse { animation: none; } .hs-prd-cta { transition: none; } } ``` ### 22. Price Card Hero **Type:** Pure CSS **Description:** Heritage-banking pricing-led hero — copy left, single-tier brass-on-forest pricing card right. The 37signals-style "we have one price" treatment with a vintage finance feel. **HTML:** ```html
        — Est. 1924 · still independent

        One ledger. One price. One ridiculously responsive team.

        The bookkeeping software trusted by family-owned businesses since before "SaaS" was a word.

        The Members' Plan No tiers
        $49/ month, all in
        • Unlimited invoices
        • Multi-entity ledger
        • Audit-ready exports
        • A real human for support
        Become a member
        ``` **CSS:** ```css .hs-prc { display: grid; grid-template-columns: 1.05fr 1fr; width: 100%; min-height: 480px; padding: clamp(28px, 5vw, 64px) clamp(20px, 5vw, 56px); gap: clamp(28px, 4vw, 64px); align-items: center; background: #f5ecd8; font-family: 'Inter', system-ui, sans-serif; color: #1a3322; box-sizing: border-box; } .hs-prc-eye { display: block; font-family: 'Cormorant Garamond', Georgia, serif; font-style: italic; font-size: 16px; color: #8a7a3a; margin-bottom: 14px; } .hs-prc h2 { margin: 0 0 16px; font-family: 'Playfair Display', Georgia, serif; font-size: clamp(28px, 4.5vw, 46px); font-weight: 700; letter-spacing: -0.015em; line-height: 1.1; color: #1a3322; } .hs-prc h2 em { color: #8a7a3a; font-style: italic; } .hs-prc p { margin: 0; font-size: 15.5px; line-height: 1.6; color: #4a5a48; max-width: 460px; } .hs-prc-card { background: #1a3322; color: #f5ecd8; padding: clamp(24px, 3vw, 36px); border-radius: 0; border: 2px solid #8a7a3a; box-shadow: inset 0 0 0 4px #1a3322, inset 0 0 0 5px rgba(138,122,58,0.4); } .hs-prc-card header { display: flex; justify-content: space-between; align-items: center; font-family: 'Playfair Display', Georgia, serif; font-size: 13px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; padding-bottom: 16px; border-bottom: 1px solid #8a7a3a; margin-bottom: 18px; } .hs-prc-badge { font-family: 'JetBrains Mono', monospace; font-size: 10px; letter-spacing: 0.12em; padding: 2px 8px; border: 1px solid #8a7a3a; color: #c0a960; } .hs-prc-price { display: flex; align-items: baseline; gap: 6px; margin-bottom: 22px; } .hs-prc-price em { font-size: 24px; font-style: normal; color: #8a7a3a; font-weight: 700; } .hs-prc-price strong { font-family: 'Playfair Display', Georgia, serif; font-size: clamp(56px, 6vw, 80px); font-weight: 800; line-height: 1; color: #f5ecd8; } .hs-prc-price span { font-size: 13px; color: #c0a960; } .hs-prc-card ul { list-style: none; padding: 0; margin: 0 0 24px; font-size: 14px; line-height: 1.95; color: #c8d2c4; } .hs-prc-card ul li::before { content: '✓ '; color: #c0a960; font-weight: 800; } .hs-prc-cta { display: block; text-align: center; padding: 14px 24px; background: #c0a960; color: #1a3322; text-decoration: none; font-weight: 800; font-size: 14.5px; letter-spacing: 0.04em; border: 0; transition: background 0.15s; } .hs-prc-cta:hover { background: #f5ecd8; } @media (max-width: 720px) { .hs-prc { grid-template-columns: 1fr; } } @media (prefers-reduced-motion: reduce) { .hs-prc-cta { transition: none; } } ``` ### 23. App Store Hero **Type:** Pure CSS **Description:** iOS-pastel app-launch hero — three phone mockups fanned in lavender, soft pink, powder blue, with App Store and Google Play CTA pills below. **HTML:** ```html
        ★★★★★   #1 in Lifestyle

        Mood, sleep, joy — tracked gently.

        The wellness journal that doesn't gamify your serotonin into a streak.

        ``` **CSS:** ```css .hs-app { display: grid; grid-template-columns: 1fr 1fr; width: 100%; min-height: 480px; padding: clamp(28px, 5vw, 56px); gap: clamp(20px, 4vw, 48px); align-items: center; background: linear-gradient(135deg, #e8def0 0%, #fde0e4 50%, #d8e8f0 100%); font-family: 'Inter', system-ui, sans-serif; color: #3a2a55; box-sizing: border-box; } .hs-app-eye { display: inline-block; padding: 5px 12px; background: #fff; color: #c98ae0; border-radius: 999px; font-size: 11.5px; font-weight: 700; letter-spacing: 0.04em; margin-bottom: 18px; } .hs-app h2 { margin: 0 0 16px; font-size: clamp(32px, 5vw, 50px); font-weight: 800; letter-spacing: -0.02em; line-height: 1.05; color: #3a2a55; } .hs-app h2 em { background: linear-gradient(90deg, #c98ae0, #f59ab8); -webkit-background-clip: text; background-clip: text; color: transparent; font-style: italic; } .hs-app p { margin: 0 0 24px; font-size: 16px; line-height: 1.55; color: #6a5a85; max-width: 420px; } .hs-app-stores { display: flex; gap: 12px; flex-wrap: wrap; } .hs-app-stores a { display: inline-flex; flex-direction: column; padding: 10px 22px; background: #3a2a55; color: #fff; border-radius: 12px; text-decoration: none; transition: transform 0.15s; } .hs-app-stores a:hover { transform: translateY(-1px); } .hs-app-stores a span { font-size: 10px; opacity: 0.7; letter-spacing: 0.04em; } .hs-app-stores a strong { font-size: 14.5px; font-weight: 700; } .hs-app-fan { position: relative; height: 100%; min-height: 360px; display: flex; align-items: center; justify-content: center; } .hs-app-phone { position: absolute; width: 130px; height: 280px; border-radius: 24px; border: 3px solid #fff; box-shadow: 0 22px 50px rgba(120,80,150,0.25), inset 0 0 0 2px rgba(255,255,255,0.4); } .hs-app-p1 { background: linear-gradient(180deg, #c98ae0 0%, #a160c0 100%); transform: rotate(-12deg) translateX(-90px); } .hs-app-p2 { background: linear-gradient(180deg, #fde0e4 0%, #f59ab8 100%); z-index: 2; width: 145px; height: 300px; } .hs-app-p3 { background: linear-gradient(180deg, #d8e8f0 0%, #94b4d4 100%); transform: rotate(12deg) translateX(90px); } @media (max-width: 720px) { .hs-app { grid-template-columns: 1fr; } } @media (prefers-reduced-motion: reduce) { .hs-app-stores a { transition: none; } } ``` ### 24. Neon CTA Hero **Type:** Pure CSS **Description:** Tokyo-cyberpunk neon CTA — pure black backdrop, neon pink and electric cyan glows, single CTA that breathes with a soft pulse. The conversion-funnel pattern. **HTML:** ```html
        / ENTER THE NIGHT MARKET

        Order ramen at 3 a.m. like the locals do.

        50 Tokyo back-alley vendors. One delivery app. One foreigner-friendly menu.

        Open the menu
        ``` **CSS:** ```css .hs-neo { position: relative; overflow: hidden; display: grid; place-items: center; width: 100%; min-height: 480px; padding: clamp(28px, 5vw, 64px) clamp(20px, 5vw, 56px); background: #0a0014; font-family: 'Inter', system-ui, sans-serif; color: #fff; box-sizing: border-box; contain: layout paint; } .hs-neo-grid { position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); width: 220%; height: 50%; background: repeating-linear-gradient(0deg, transparent 0 24px, rgba(238,82,206,0.32) 24px 25px), repeating-linear-gradient(90deg, transparent 0 24px, rgba(34,211,238,0.32) 24px 25px); transform: translateX(-50%) perspective(800px) rotateX(60deg); transform-origin: center top; mask-image: linear-gradient(180deg, transparent 0%, #000 40%); -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 40%); pointer-events: none; } .hs-neo-inner { position: relative; z-index: 1; max-width: 720px; text-align: center; } .hs-neo-eye { display: inline-block; font-family: 'JetBrains Mono', monospace; font-size: 11.5px; letter-spacing: 0.24em; color: #22d3ee; padding: 4px 14px; border: 1px solid #22d3ee; text-shadow: 0 0 10px rgba(34,211,238,0.6); margin-bottom: 22px; } .hs-neo h2 { margin: 0 0 18px; font-size: clamp(36px, 6vw, 64px); font-weight: 900; letter-spacing: -0.02em; line-height: 1.05; text-shadow: 0 0 30px rgba(238,82,206,0.4); } .hs-neo h2 em { color: #ee52ce; font-style: italic; text-shadow: 0 0 18px rgba(238,82,206,0.7); } .hs-neo p { margin: 0 auto 28px; font-size: 16px; color: #a890c8; max-width: 460px; line-height: 1.55; } .hs-neo-cta { display: inline-block; padding: 14px 36px; background: transparent; color: #ee52ce; border: 2px solid #ee52ce; border-radius: 0; font-weight: 800; font-size: 15px; letter-spacing: 0.12em; text-transform: uppercase; text-decoration: none; box-shadow: 0 0 18px rgba(238,82,206,0.5), inset 0 0 18px rgba(238,82,206,0.18); animation: hs-neo-pulse 2.4s ease-in-out infinite alternate; transition: background 0.15s, color 0.15s; } @keyframes hs-neo-pulse { from { box-shadow: 0 0 14px rgba(238,82,206,0.4), inset 0 0 14px rgba(238,82,206,0.14); } to { box-shadow: 0 0 28px rgba(238,82,206,0.7), inset 0 0 24px rgba(238,82,206,0.28); } } .hs-neo-cta:hover { background: #ee52ce; color: #0a0014; } @media (prefers-reduced-motion: reduce) { .hs-neo-cta { animation: none; transition: none; } } ``` ### 25. Parallax Mountain **Type:** Pure CSS **Description:** Layered SVG mountain silhouettes drift at different speeds — glacier blue and pine on alpine snow. The outdoor / travel-brand parallax landscape. **HTML:** ```html
        — EST. 1958 · LAKE COUNTRY

        Trails that earn the silence.

        Six lodges. One ridge. The mountains your grandfather wrote home about.

        Reserve a cabin →
        ``` **CSS:** ```css .hs-prx { position: relative; overflow: hidden; width: 100%; min-height: 480px; background: linear-gradient(180deg, #d8e8f0 0%, #a8c8d8 60%, #5a7a8a 100%); font-family: 'Inter', system-ui, sans-serif; color: #1a2840; box-sizing: border-box; contain: layout paint; } .hs-prx-sky { position: absolute; inset: 0; background: radial-gradient(50% 70% at 80% 30%, rgba(255,240,210,0.4), transparent 70%); } .hs-prx-sun { position: absolute; top: 18%; right: 18%; width: 80px; height: 80px; border-radius: 50%; background: #f9f0d6; box-shadow: 0 0 60px rgba(249,240,214,0.7); } .hs-prx-m { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 60%; animation: hs-prx-float 12s ease-in-out infinite alternate; } .hs-prx-m1 { z-index: 3; height: 38%; animation-duration: 8s; } .hs-prx-m2 { z-index: 2; height: 50%; animation-duration: 12s; animation-delay: -2s; } .hs-prx-m3 { z-index: 1; height: 65%; animation-duration: 16s; animation-delay: -4s; } @keyframes hs-prx-float { 0% { transform: translateX(0); } 100% { transform: translateX(-2%); } } .hs-prx-inner { position: relative; z-index: 4; padding: clamp(28px, 5vw, 56px); max-width: 540px; } .hs-prx-eye { display: inline-block; font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: 0.18em; color: #1f3a4a; margin-bottom: 14px; } .hs-prx h2 { margin: 0 0 16px; font-family: 'Playfair Display', Georgia, serif; font-size: clamp(34px, 5vw, 56px); font-weight: 700; letter-spacing: -0.02em; line-height: 1.05; color: #0d2030; } .hs-prx h2 em { color: #1f3a4a; font-style: italic; } .hs-prx p { margin: 0 0 22px; font-size: 16px; line-height: 1.55; color: #2a4858; max-width: 420px; } .hs-prx-cta { display: inline-block; padding: 12px 22px; background: #f9f0d6; color: #1f3a4a; border: 2px solid #1f3a4a; border-radius: 0; font-family: 'JetBrains Mono', monospace; font-size: 13px; font-weight: 700; letter-spacing: 0.12em; text-decoration: none; transition: background 0.15s, color 0.15s; } .hs-prx-cta:hover { background: #1f3a4a; color: #f9f0d6; } @media (prefers-reduced-motion: reduce) { .hs-prx-m { animation: none; } .hs-prx-cta { transition: none; } } ``` ### 26. Isometric Room **Type:** Pure CSS **Description:** Cozy WFH isometric — a CSS-painted desk + laptop + plant + lamp scene rendered with `transform: skewY()`. Mauve, dusty rose, and sage — the calm-productivity aesthetic. **HTML:** ```html
        / for the home office crowd

        Deep work, without the doom-tabs.

        A focus timer that stays in the menu bar, not your face. Three tasks a day, one calm afternoon.

        Start a session →
        ``` **CSS:** ```css .hs-iso { display: grid; grid-template-columns: 1fr 1fr; width: 100%; min-height: 480px; padding: clamp(28px, 5vw, 56px); gap: clamp(20px, 4vw, 48px); align-items: center; background: radial-gradient(70% 60% at 70% 30%, rgba(216,150,180,0.18), transparent 70%), #f0e8e2; font-family: 'Inter', system-ui, sans-serif; color: #4a2840; box-sizing: border-box; } .hs-iso-eye { display: inline-block; font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: 0.16em; color: #8a5a78; margin-bottom: 14px; } .hs-iso h2 { margin: 0 0 16px; font-family: 'Cormorant Garamond', Georgia, serif; font-size: clamp(32px, 5vw, 50px); font-weight: 600; letter-spacing: -0.015em; line-height: 1.05; } .hs-iso h2 em { color: #8a5a78; font-style: italic; } .hs-iso p { margin: 0 0 22px; font-size: 15.5px; line-height: 1.6; color: #6a4858; max-width: 420px; } .hs-iso-cta { display: inline-block; padding: 12px 22px; background: #4a2840; color: #f0e8e2; border-radius: 999px; text-decoration: none; font-weight: 600; font-size: 14px; transition: background 0.18s; } .hs-iso-cta:hover { background: #8a5a78; } .hs-iso-scene { position: relative; height: 320px; display: grid; place-items: center; perspective: 800px; } .hs-iso-floor { position: absolute; bottom: 30px; left: 10%; right: 10%; height: 180px; background: linear-gradient(180deg, #d8b8c8 0%, #b890a8 100%); transform: rotateX(60deg); border-radius: 14px; } .hs-iso-desk { position: relative; width: 220px; height: 140px; background: linear-gradient(135deg, #e0c8a8 0%, #b89878 100%); transform: rotateX(60deg) rotateZ(-30deg); transform-style: preserve-3d; border-radius: 4px; box-shadow: 0 22px 40px rgba(74,40,64,0.25); } .hs-iso-laptop { position: absolute; top: 18%; left: 30%; width: 70px; height: 50px; background: #4a2840; border-radius: 4px; transform: translateZ(20px); } .hs-iso-laptop span { position: absolute; inset: 4px; background: #d8a8c0; border-radius: 2px; } .hs-iso-mug { position: absolute; top: 30%; right: 14%; width: 22px; height: 22px; background: #c0d8a8; border-radius: 4px; transform: translateZ(20px); } .hs-iso-plant { position: absolute; top: -6%; right: 6%; width: 30px; height: 50px; } .hs-iso-plant span { position: absolute; bottom: 0; width: 30px; height: 14px; background: #b89878; border-radius: 4px 4px 12px 12px; transform: translateZ(20px); } .hs-iso-plant span:nth-child(2) { width: 6px; height: 28px; bottom: 12px; left: 12px; background: #6a8a6a; border-radius: 6px 6px 0 0; } .hs-iso-lamp { position: absolute; top: -10%; left: 12%; width: 18px; height: 60px; background: #d8a8c0; border-radius: 4px; } .hs-iso-lamp span { position: absolute; top: -10px; left: -10px; width: 38px; height: 18px; background: #f0c0a8; border-radius: 50% 50% 4px 4px; } @media (max-width: 720px) { .hs-iso { grid-template-columns: 1fr; } } @media (prefers-reduced-motion: reduce) { .hs-iso-cta { transition: none; } } ``` ### 27. 3D Card Stack **Type:** Pure CSS **Description:** Three luxury-cosmetics product cards in 3D perspective, fanning forward on hover. Champagne and soft blush on jet — the high-end beauty / fragrance treatment. **HTML:** ```html
        — Cuvée 04

        The fragrance three editors couldn't stop wearing.

        Bergamot, oud, and a single drop of Damascus rose. 50ml. Limited.

        Discover the bottle
        04Cuvée
        04Cuvée
        04Cuvée
        ``` **CSS:** ```css .hs-cst { display: grid; grid-template-columns: 1fr 1fr; width: 100%; min-height: 480px; padding: clamp(28px, 5vw, 56px); gap: clamp(20px, 4vw, 56px); align-items: center; background: #0d0a0a; font-family: 'Inter', system-ui, sans-serif; color: #f0e0c8; box-sizing: border-box; perspective: 1200px; } .hs-cst-eye { display: inline-block; font-family: 'Cormorant Garamond', Georgia, serif; font-style: italic; font-size: 16px; color: #c69e5a; margin-bottom: 14px; } .hs-cst h2 { margin: 0 0 18px; font-family: 'Playfair Display', Georgia, serif; font-size: clamp(28px, 4.5vw, 46px); font-weight: 600; letter-spacing: -0.01em; line-height: 1.1; color: #f0e0c8; } .hs-cst h2 em { color: #f5c2c8; font-style: italic; } .hs-cst p { margin: 0 0 24px; font-size: 15px; line-height: 1.6; color: #b89878; max-width: 380px; } .hs-cst-cta { display: inline-block; font-family: 'JetBrains Mono', monospace; font-size: 12px; font-weight: 700; letter-spacing: 0.16em; color: #c69e5a; text-decoration: none; border-bottom: 1.5px solid #c69e5a; padding-bottom: 3px; transition: color 0.18s, border-color 0.18s; } .hs-cst-cta:hover { color: #f5c2c8; border-color: #f5c2c8; } .hs-cst-stack { position: relative; height: 100%; min-height: 360px; display: grid; place-items: center; transform-style: preserve-3d; } .hs-cst-card { position: absolute; width: 180px; height: 260px; background: linear-gradient(135deg, #2a1a1a 0%, #0d0a0a 100%); border: 1px solid #c69e5a; border-radius: 6px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; transition: transform 0.4s cubic-bezier(.22,1,.36,1); } .hs-cst-card strong { font-family: 'Playfair Display', Georgia, serif; font-size: 64px; font-weight: 800; font-style: italic; color: #c69e5a; line-height: 1; } .hs-cst-card em { font-family: 'JetBrains Mono', monospace; font-size: 11px; font-style: normal; letter-spacing: 0.24em; color: #c69e5a; } .hs-cst-c1 { transform: translateX(-90px) rotateY(20deg) translateZ(-40px); } .hs-cst-c2 { transform: translateZ(0); z-index: 2; background: linear-gradient(135deg, #3a2828 0%, #1a1010 100%); } .hs-cst-c3 { transform: translateX(90px) rotateY(-20deg) translateZ(-40px); } .hs-cst-stack:hover .hs-cst-c1 { transform: translateX(-130px) rotateY(20deg) translateZ(0); } .hs-cst-stack:hover .hs-cst-c2 { transform: translateZ(40px); } .hs-cst-stack:hover .hs-cst-c3 { transform: translateX(130px) rotateY(-20deg) translateZ(0); } @media (max-width: 720px) { .hs-cst { grid-template-columns: 1fr; } } @media (prefers-reduced-motion: reduce) { .hs-cst-card { transition: none; } .hs-cst-cta { transition: none; } } ``` ### 28. Particle Starfield **Type:** Pure CSS **Description:** Pure-CSS starfield — dots positioned via radial-gradient on a deep-navy backdrop. Electric yellow accent and dim white copy. No canvas, no per-particle DOM. **HTML:** ```html
        ★ NIGHT SKY ATLAS

        Every constellation, over your back yard tonight.

        Point your phone up. We'll tell you which star is where, why it has that name, and when to look again.

        Get the atlas
        ``` **CSS:** ```css .hs-stf { position: relative; overflow: hidden; display: grid; place-items: center; width: 100%; min-height: 480px; padding: clamp(28px, 5vw, 64px) clamp(20px, 5vw, 56px); background: radial-gradient(ellipse at 50% 100%, rgba(248,210,72,0.16), transparent 70%), linear-gradient(180deg, #050a1a 0%, #0a1428 60%, #1a2840 100%); font-family: 'Inter', system-ui, sans-serif; color: #f0eee0; box-sizing: border-box; contain: layout paint; } .hs-stf-stars { position: absolute; inset: 0; background-image: radial-gradient(1px 1px at 12% 8%, #fff, transparent), radial-gradient(1px 1px at 28% 24%, #f8d248, transparent), radial-gradient(1.5px 1.5px at 44% 12%, #fff, transparent), radial-gradient(1px 1px at 60% 30%, #fff, transparent), radial-gradient(2px 2px at 78% 18%, #f8d248, transparent), radial-gradient(1px 1px at 90% 32%, #fff, transparent), radial-gradient(1px 1px at 18% 48%, #fff, transparent), radial-gradient(1.5px 1.5px at 35% 64%, #fff, transparent), radial-gradient(1px 1px at 52% 52%, #f8d248, transparent), radial-gradient(2px 2px at 70% 76%, #fff, transparent), radial-gradient(1px 1px at 84% 60%, #fff, transparent), radial-gradient(1.5px 1.5px at 8% 80%, #fff, transparent), radial-gradient(1px 1px at 96% 88%, #fff, transparent); background-size: 100% 100%; animation: hs-stf-twinkle 4s ease-in-out infinite alternate; } .hs-stf-stars-2 { background-image: radial-gradient(1px 1px at 22% 14%, rgba(255,255,255,0.5), transparent), radial-gradient(1px 1px at 48% 30%, rgba(248,210,72,0.5), transparent), radial-gradient(1px 1px at 66% 8%, rgba(255,255,255,0.5), transparent), radial-gradient(1px 1px at 84% 44%, rgba(255,255,255,0.5), transparent), radial-gradient(1px 1px at 14% 62%, rgba(255,255,255,0.5), transparent), radial-gradient(1px 1px at 76% 88%, rgba(255,255,255,0.5), transparent); animation-delay: -2s; } @keyframes hs-stf-twinkle { from { opacity: 0.5; } to { opacity: 1; } } .hs-stf-inner { position: relative; z-index: 1; max-width: 640px; text-align: center; } .hs-stf-eye { display: inline-block; font-family: 'JetBrains Mono', monospace; font-size: 11.5px; letter-spacing: 0.24em; color: #f8d248; margin-bottom: 22px; } .hs-stf h2 { margin: 0 0 16px; font-family: 'Playfair Display', Georgia, serif; font-size: clamp(34px, 5vw, 56px); font-weight: 700; letter-spacing: -0.02em; line-height: 1.05; color: #f0eee0; } .hs-stf h2 em { color: #f8d248; font-style: italic; } .hs-stf p { margin: 0 auto 26px; font-size: 16px; line-height: 1.55; color: #b8b0a0; max-width: 460px; } .hs-stf-cta { display: inline-block; padding: 13px 26px; background: #f8d248; color: #050a1a; border-radius: 0; text-decoration: none; font-weight: 800; font-size: 14.5px; letter-spacing: 0.04em; transition: background 0.15s; } .hs-stf-cta:hover { background: #fff; } @media (prefers-reduced-motion: reduce) { .hs-stf-stars { animation: none; } .hs-stf-cta { transition: none; } } ``` ### 29. Glitch Text Hero **Type:** Pure CSS **Description:** VHS-glitch hero — RGB-channel offsets create a tape-static glitch effect. VHS red and tape blue against a static-gray background, the analogue cyberpunk treatment. **HTML:** ```html
        REC ● 00:42:18

        LOST & FOUND

        A search engine for VHS-era ephemera. Public-access TV, mall demos, regional news. The forgotten internet of the 80s.

        Search the tapes →
        ``` **CSS:** ```css .hs-glt { position: relative; overflow: hidden; display: grid; place-items: center; width: 100%; min-height: 480px; padding: clamp(28px, 5vw, 64px) clamp(20px, 5vw, 56px); background: #1a1818; font-family: 'JetBrains Mono', monospace; color: #d8d4c8; box-sizing: border-box; contain: layout paint; } .hs-glt-static { position: absolute; inset: 0; background-image: radial-gradient(rgba(255,255,255,0.04) 1px, transparent 1px), radial-gradient(rgba(255,255,255,0.03) 1px, transparent 1px); background-size: 3px 3px, 5px 5px; background-position: 0 0, 1px 1px; pointer-events: none; animation: hs-glt-jit 0.2s steps(2) infinite; } .hs-glt-scan { position: absolute; inset: 0; background: repeating-linear-gradient(180deg, transparent 0 2px, rgba(0,0,0,0.18) 2px 3px); pointer-events: none; } @keyframes hs-glt-jit { 0% { transform: translate(0,0); } 50% { transform: translate(-1px,1px); } 100% { transform: translate(1px,-1px); } } .hs-glt-inner { position: relative; z-index: 1; max-width: 640px; text-align: center; } .hs-glt-eye { display: inline-block; padding: 4px 10px; background: #d63838; color: #fff; font-size: 11px; font-weight: 700; letter-spacing: 0.18em; margin-bottom: 22px; animation: hs-glt-blink 1.4s steps(2) infinite; } @keyframes hs-glt-blink { to { opacity: 0.5; } } .hs-glt-h { position: relative; margin: 0 0 18px; font-family: 'Inter', sans-serif; font-size: clamp(48px, 9vw, 100px); font-weight: 900; letter-spacing: -0.04em; line-height: 0.92; color: #f0eee0; } .hs-glt-h::before, .hs-glt-h::after { content: attr(data-text); position: absolute; top: 0; left: 0; right: 0; pointer-events: none; text-align: center; } .hs-glt-h::before { color: #d63838; transform: translate(-3px,0); clip-path: polygon(0 12%, 100% 12%, 100% 38%, 0 38%); animation: hs-glt-rgb 2.4s ease-in-out infinite; } .hs-glt-h::after { color: #38b8d6; transform: translate(3px,0); clip-path: polygon(0 56%, 100% 56%, 100% 88%, 0 88%); animation: hs-glt-rgb 2.4s ease-in-out infinite reverse; } @keyframes hs-glt-rgb { 0%, 100% { transform: translate(-3px,0); } 50% { transform: translate(3px,2px); } } .hs-glt p { margin: 0 auto 24px; font-size: 14px; line-height: 1.6; color: #98948c; max-width: 460px; } .hs-glt-cta { display: inline-block; padding: 12px 22px; background: #38b8d6; color: #1a1818; border-radius: 0; text-decoration: none; font-weight: 800; font-size: 13px; letter-spacing: 0.16em; text-transform: uppercase; transition: background 0.15s, color 0.15s; } .hs-glt-cta:hover { background: #d63838; color: #fff; } @media (prefers-reduced-motion: reduce) { .hs-glt-static, .hs-glt-eye, .hs-glt-h::before, .hs-glt-h::after { animation: none; } .hs-glt-cta { transition: none; } } ``` ### 30. Conic Orbit Hero **Type:** Pure CSS **Description:** Solar-corona conic gradient ring orbits the headline using @property animatable angle. Gold and ember orange on jet black — the AI / launch treatment with a stellar feel. **HTML:** ```html
        solar v3

        Compute that moves at the speed of light.

        The new generation of inference cards. 3× the throughput. Half the heat.

        Pre-order →
        ``` **CSS:** ```css @property --hs-orb-a { syntax: ''; initial-value: 0deg; inherits: false; } .hs-orb { position: relative; overflow: hidden; display: grid; grid-template-columns: 1fr 1fr; width: 100%; min-height: 480px; padding: clamp(28px, 5vw, 56px); gap: clamp(24px, 4vw, 56px); align-items: center; background: #0a0805; font-family: 'Inter', system-ui, sans-serif; color: #f8e8c8; box-sizing: border-box; } .hs-orb-stage { position: relative; height: 100%; min-height: 320px; display: grid; place-items: center; } .hs-orb-ring { width: 320px; height: 320px; border-radius: 50%; background: conic-gradient(from var(--hs-orb-a), #f8d248, #ff6b1a, #d63a18, #ff6b1a, #f8d248); filter: blur(8px); animation: hs-orb-spin 12s linear infinite; -webkit-mask: radial-gradient(circle, transparent 96px, #000 100px, #000 158px, transparent 162px); mask: radial-gradient(circle, transparent 96px, #000 100px, #000 158px, transparent 162px); } .hs-orb-core { position: absolute; width: 200px; height: 200px; border-radius: 50%; background: radial-gradient(circle, #ff6b1a 0%, #d63a18 50%, #6b1a08 100%); box-shadow: 0 0 80px rgba(255,107,26,0.4); } @keyframes hs-orb-spin { to { --hs-orb-a: 360deg; } } .hs-orb-inner { position: relative; z-index: 1; } .hs-orb-eye { display: inline-block; font-family: 'JetBrains Mono', monospace; font-size: 11.5px; letter-spacing: 0.16em; color: #f8d248; padding: 4px 12px; background: rgba(248,210,72,0.12); border: 1px solid rgba(248,210,72,0.4); border-radius: 999px; margin-bottom: 18px; } .hs-orb h2 { margin: 0 0 16px; font-size: clamp(28px, 4vw, 44px); font-weight: 800; letter-spacing: -0.025em; line-height: 1.1; color: #f8e8c8; word-wrap: break-word; } .hs-orb h2 em { background: linear-gradient(90deg, #f8d248, #ff6b1a); -webkit-background-clip: text; background-clip: text; color: transparent; font-style: italic; display: inline-block; } .hs-orb p { margin: 0 0 26px; font-size: 16px; line-height: 1.55; color: #b89878; max-width: 420px; } .hs-orb-cta { display: inline-block; padding: 13px 26px; background: linear-gradient(135deg, #ff6b1a, #d63a18); color: #0a0805; border-radius: 999px; text-decoration: none; font-weight: 800; font-size: 14.5px; box-shadow: 0 14px 36px rgba(255,107,26,0.35); transition: transform 0.15s; } .hs-orb-cta:hover { transform: translateY(-1px); } @media (max-width: 720px) { .hs-orb { grid-template-columns: 1fr; } .hs-orb-ring, .hs-orb-core { width: 200px; height: 200px; } .hs-orb-core { width: 130px; height: 130px; } .hs-orb-ring { -webkit-mask: radial-gradient(circle, transparent 60px, #000 64px, #000 98px, transparent 102px); mask: radial-gradient(circle, transparent 60px, #000 64px, #000 98px, transparent 102px); } } @media (prefers-reduced-motion: reduce) { .hs-orb-ring { animation: none; } .hs-orb-cta { transition: none; } } ``` --- ## 30 CSS Hover Effects URL: https://codefronts.com/motion/css-hover-effects/ Description: 30 hand-coded CSS hover effects covering every production interactive pattern in 2026 — text hover (underline draw, glitch, letter-spacing expand, gradient reveal, split text, neon glow), button hover (magnetic liquid, border draw, shimmer shine, fill wipe, 3D press, ripple), card hover (3D tilt, flip, glassmorphism, spotlight, slide reveal, stack lift), image hover (zoom-pan, color channel split, distortion, duotone, curtain reveal, Ken Burns), navigation hover (underline slide, highlight fill, strikethrough link, inline word swap), and pointer-tracking effects (cursor dot trail, magnetic pull). 24 demos are 100% pure CSS using :hover + GPU-accelerated transform / opacity transitions; 6 use ~30-60 lines of vanilla JavaScript for pointer-coordinate tracking. All respect prefers-reduced-motion, use scoped .hv-NN__* class names so multiple effects coexist on the same page without style bleed, ship INP-safe (no layout-triggering animations), MIT-licensed. Drop into React, Vue, Astro, Svelte, Rails ERB, plain HTML, or WordPress — zero framework dependencies. Demo count: 30 ### 01. CSS Underline Draw Hover Effect **Type:** Pure CSS **Description:** Six scoped link and heading hover styles that animate underlines from invisible to visible — left-to-right draw, center-out expand, two-tone dual-line, offset thick bar, dotted border, and gradient sweep — all driven by CSS custom properties and pseudo-element transforms. **HTML:** ```html
        Left-to-Right Draw scaleX · left origin
        Center Expand scaleX · center origin
        Dual Line Sweep ::before + ::after toward center
        Thick Bar Slide offset bold underbar
        Dotted Border Grow border-bottom + scaleX
        Gradient Sweep background-size animation
        ``` **CSS:** ```css .hv-01,.hv-01 *,.hv-01 *::before,.hv-01 *::after{box-sizing:border-box;margin:0;padding:0} .hv-01 ::selection{background:#f72585;color:#fff} .hv-01{ --bg:#0a0a0f; --text:#e8e6f0; --dim:#666; --accent:#f72585; --cyan:#4cc9f0; --gold:#ffd60a; --green:#06d6a0; --orange:#fb5607; font-family:'Segoe UI',system-ui,sans-serif; background:var(--bg); min-height:100vh; display:flex;align-items:center;justify-content:center; padding:60px 24px; } .hv-01__grid{ display:grid; grid-template-columns:repeat(3,1fr); gap:40px 60px; max-width:900px; width:100%; } .hv-01__cell{ display:flex;flex-direction:column;align-items:center;gap:16px; padding:40px 24px; background:rgba(255,255,255,.03); border:1px solid rgba(255,255,255,.07); border-radius:12px; } .hv-01__label{font-size:11px;letter-spacing:.15em;text-transform:uppercase;color:var(--dim);text-align:center} /* shared link base */ .hv-01__link{ font-size:1.25rem;font-weight:600;color:var(--text); text-decoration:none;position:relative;display:inline-block; padding-bottom:4px; } /* 1 — left-to-right draw */ .hv-01__link--ltr::after{ content:'';position:absolute;left:0;bottom:0;width:100%;height:2px; background:var(--accent); transform:scaleX(0);transform-origin:left; transition:transform .35s cubic-bezier(.4,0,.2,1); } .hv-01__link--ltr:hover::after{transform:scaleX(1)} /* 2 — center expand */ .hv-01__link--center::after{ content:'';position:absolute;left:0;bottom:0;width:100%;height:2px; background:var(--cyan); transform:scaleX(0);transform-origin:center; transition:transform .4s cubic-bezier(.4,0,.2,1); } .hv-01__link--center:hover::after{transform:scaleX(1)} /* 3 — dual line sweep */ .hv-01__link--dual::before, .hv-01__link--dual::after{ content:'';position:absolute;left:0;width:100%;height:2px; background:var(--gold); transform:scaleX(0); transition:transform .4s cubic-bezier(.4,0,.2,1); } .hv-01__link--dual::before{bottom:6px;transform-origin:right} .hv-01__link--dual::after{bottom:0;transform-origin:left} .hv-01__link--dual:hover::before, .hv-01__link--dual:hover::after{transform:scaleX(1)} /* 4 — thick offset bar (highlighter effect). The :hover swaps text to var(--bg) so it reads as dark text on a bright green highlight. For the bar to land BEHIND the text but ABOVE the cell background, the link itself must create a stacking context — otherwise z-index:-1 on the ::after escapes the link and lands behind the cell's translucent fill, hiding the entire highlight. isolation:isolate creates that local stacking context without affecting the link's positioning. Bar height bumped from 6px to a fuller block so it visually reads as a highlighter rather than a thin underline; bottom offset adjusted so the bar covers the full text height. */ .hv-01__link--thick{isolation:isolate} .hv-01__link--thick::after{ content:'';position:absolute;left:-6px;bottom:0; width:calc(100% + 12px);height:100%; background:var(--green);border-radius:3px; transform:scaleX(0);transform-origin:left; transition:transform .35s cubic-bezier(.22,1,.36,1); z-index:-1;opacity:.85; } .hv-01__link--thick:hover::after{transform:scaleX(1)} .hv-01__link--thick:hover{color:var(--bg)} /* 5 — dotted border grow */ .hv-01__link--dot::after{ content:'';position:absolute;left:0;bottom:0;width:100%; border-bottom:2px dotted var(--orange); transform:scaleX(0);transform-origin:left; transition:transform .4s ease; } .hv-01__link--dot:hover::after{transform:scaleX(1)} .hv-01__link--dot:hover{color:var(--orange)} /* 6 — gradient background-size sweep */ .hv-01__link--grad{ background-image:linear-gradient(90deg,var(--accent),var(--cyan)); background-repeat:no-repeat; background-size:0% 2px; background-position:left bottom; transition:background-size .4s cubic-bezier(.4,0,.2,1),color .3s; } .hv-01__link--grad:hover{ background-size:100% 2px; color:var(--accent); } @media(max-width:680px){.hv-01__grid{grid-template-columns:repeat(2,1fr)}} @media(max-width:440px){.hv-01__grid{grid-template-columns:1fr}} @media(prefers-reduced-motion:reduce){ .hv-01__link::before,.hv-01__link::after{transition:none!important} .hv-01__link--grad{transition:none!important} } ``` ### 02. CSS Text Glitch Hover Effect **Type:** Pure CSS **Description:** Four text glitch hover effects — RGB channel split, scanline flicker, noise slice, and VHS chromatic aberration — each triggered by hovering the element and driven entirely by CSS keyframes on pseudo-elements using clip-path and color-mix. **HTML:** ```html
        GLITCH RGB Channel Split
        SCANLINE Scanline Flicker
        NOISE Noise Slice
        VHS VHS Chromatic
        ``` **CSS:** ```css .hv-02,.hv-02 *,.hv-02 *::before,.hv-02 *::after{box-sizing:border-box;margin:0;padding:0} .hv-02 ::selection{background:#ff003c;color:#fff} .hv-02{ --bg:#080810; --text:#f0f0f0; --dim:#444; --red:#ff003c; --blue:#00e5ff; --green:#39ff14; --yellow:#ffe600; font-family:'Segoe UI',system-ui,sans-serif; background:var(--bg); min-height:100vh; display:flex;align-items:center;justify-content:center; padding:60px 24px; } .hv-02__grid{ display:grid; grid-template-columns:repeat(2,1fr); gap:48px; max-width:800px;width:100%; } .hv-02__cell{ display:flex;flex-direction:column;align-items:center;gap:24px; padding:60px 32px; background:rgba(255,255,255,.025); border:1px solid rgba(255,255,255,.07); border-radius:12px; } .hv-02__label{font-size:11px;letter-spacing:.15em;text-transform:uppercase;color:var(--dim)} /* shared glitch base */ .hv-02__glitch{ font-size:clamp(2rem,6vw,3.5rem);font-weight:900; color:var(--text);letter-spacing:.08em; position:relative;cursor:default;display:inline-block; } .hv-02__glitch::before, .hv-02__glitch::after{ content:attr(data-text); position:absolute;top:0;left:0;width:100%;height:100%; pointer-events:none; } /* 1 — RGB channel split */ .hv-02__glitch--rgb::before{color:var(--red);left:2px} .hv-02__glitch--rgb::after{color:var(--blue);left:-2px} .hv-02__glitch--rgb:hover::before{animation:hv-02-rgb-b .4s steps(2) infinite} .hv-02__glitch--rgb:hover::after{animation:hv-02-rgb-a .4s steps(2) infinite .1s} @keyframes hv-02-rgb-b{ 0%{clip-path:inset(0 0 95% 0);transform:translateX(-3px)} 20%{clip-path:inset(30% 0 50% 0);transform:translateX(3px)} 40%{clip-path:inset(60% 0 20% 0);transform:translateX(-2px)} 60%{clip-path:inset(10% 0 75% 0);transform:translateX(4px)} 80%{clip-path:inset(80% 0 5% 0);transform:translateX(-3px)} 100%{clip-path:inset(45% 0 40% 0);transform:translateX(2px)} } @keyframes hv-02-rgb-a{ 0%{clip-path:inset(50% 0 30% 0);transform:translateX(3px)} 25%{clip-path:inset(5% 0 80% 0);transform:translateX(-4px)} 50%{clip-path:inset(70% 0 15% 0);transform:translateX(2px)} 75%{clip-path:inset(20% 0 60% 0);transform:translateX(-3px)} 100%{clip-path:inset(40% 0 45% 0);transform:translateX(3px)} } /* 2 — scanline flicker */ .hv-02__glitch--scan{color:var(--green)} .hv-02__glitch--scan::before{ background:repeating-linear-gradient( 0deg,transparent,transparent 2px,rgba(0,0,0,.4) 2px,rgba(0,0,0,.4) 4px ); background-size:100% 4px; mix-blend-mode:multiply; opacity:0;transition:opacity .2s; } .hv-02__glitch--scan::after{color:var(--green);left:2px;opacity:0;transition:opacity .2s} .hv-02__glitch--scan:hover::before{ opacity:1; animation:hv-02-scan-roll .8s linear infinite; } .hv-02__glitch--scan:hover::after{ opacity:.7; animation:hv-02-rgb-b .3s steps(3) infinite; } @keyframes hv-02-scan-roll{ 0%{background-position-y:0}100%{background-position-y:100px} } /* 3 — noise slice */ .hv-02__glitch--slice{color:var(--yellow)} .hv-02__glitch--slice::before{ color:var(--red);clip-path:inset(0 0 100% 0); } .hv-02__glitch--slice::after{ color:var(--blue);clip-path:inset(100% 0 0 0); } .hv-02__glitch--slice:hover::before{animation:hv-02-slice-t .5s steps(4) infinite} .hv-02__glitch--slice:hover::after{animation:hv-02-slice-b .5s steps(4) infinite .15s} @keyframes hv-02-slice-t{ 0%{clip-path:inset(0 0 85% 0);transform:translateX(6px) skewX(-2deg)} 33%{clip-path:inset(25% 0 55% 0);transform:translateX(-5px)} 66%{clip-path:inset(60% 0 10% 0);transform:translateX(4px) skewX(1deg)} 100%{clip-path:inset(10% 0 75% 0);transform:translateX(-6px)} } @keyframes hv-02-slice-b{ 0%{clip-path:inset(80% 0 0 0);transform:translateX(-4px)} 33%{clip-path:inset(50% 0 20% 0);transform:translateX(6px)} 66%{clip-path:inset(15% 0 70% 0);transform:translateX(-3px) skewX(2deg)} 100%{clip-path:inset(65% 0 5% 0);transform:translateX(5px)} } /* 4 — VHS chromatic */ .hv-02__glitch--vhs{color:#fff} .hv-02__glitch--vhs::before{ color:var(--red);mix-blend-mode:screen; transform:translateX(0); } .hv-02__glitch--vhs::after{ color:var(--blue);mix-blend-mode:screen; transform:translateX(0); } .hv-02__glitch--vhs:hover::before{animation:hv-02-vhs-r .6s steps(3) infinite} .hv-02__glitch--vhs:hover::after{animation:hv-02-vhs-b .6s steps(3) infinite .2s} @keyframes hv-02-vhs-r{ 0%{transform:translateX(-6px);clip-path:inset(20% 0 60% 0)} 50%{transform:translateX(4px);clip-path:inset(55% 0 10% 0)} 100%{transform:translateX(-5px);clip-path:inset(5% 0 80% 0)} } @keyframes hv-02-vhs-b{ 0%{transform:translateX(6px);clip-path:inset(40% 0 30% 0)} 50%{transform:translateX(-4px);clip-path:inset(10% 0 65% 0)} 100%{transform:translateX(5px);clip-path:inset(70% 0 5% 0)} } @media(max-width:520px){.hv-02__grid{grid-template-columns:1fr}} @media(prefers-reduced-motion:reduce){ .hv-02__glitch::before,.hv-02__glitch::after{animation:none!important;opacity:0!important} } ``` ### 03. CSS Letter Spacing Expand Hover Effect **Type:** Pure CSS **Description:** Five typographic hover states that animate letter-spacing from tight to airy — standard expand, collapse-in, stagger fade-out, per-letter scale, and tracking shift with fade — demonstrating how spacing transitions alone can carry expressive weight. **HTML:** ```html
        EXPAND letter-spacing expand
        COLLAPSE tracking collapse-in
        DRIFT stagger fade-out
        BOLD TRACK weight + spacing
        RADIANCE spacing + glow
        ``` **CSS:** ```css .hv-03,.hv-03 *,.hv-03 *::before,.hv-03 *::after{box-sizing:border-box;margin:0;padding:0} .hv-03 ::selection{background:#7c3aed;color:#fff} .hv-03{ --bg:#0d0d14; --text:#ede9fe; --dim:#6b7280; --purple:#a78bfa; --pink:#f472b6; --cyan:#67e8f9; --amber:#fbbf24; --white:#fff; font-family:'Segoe UI',system-ui,sans-serif; background:var(--bg); min-height:100vh; display:flex;align-items:center;justify-content:center; padding:60px 24px; } .hv-03__stack{ display:flex;flex-direction:column;gap:16px; width:min(700px,100%); } .hv-03__row{ display:flex;align-items:center;justify-content:space-between; padding:28px 36px; background:rgba(255,255,255,.03); border:1px solid rgba(255,255,255,.07); border-radius:12px; gap:20px; overflow:hidden; } .hv-03__tag{font-size:11px;letter-spacing:.12em;text-transform:uppercase;color:var(--dim);white-space:nowrap;flex-shrink:0} /* shared word base */ .hv-03__word{ font-size:clamp(1.4rem,4vw,2rem);font-weight:700; cursor:default;display:inline-block; transition:letter-spacing .4s cubic-bezier(.4,0,.2,1),color .4s,opacity .4s; } /* 1 — standard expand */ .hv-03__word--expand{color:var(--purple);letter-spacing:.02em} .hv-03__word--expand:hover{letter-spacing:.35em;color:var(--text)} /* 2 — collapse-in */ .hv-03__word--collapse{color:var(--pink);letter-spacing:.4em} .hv-03__word--collapse:hover{letter-spacing:.02em;color:var(--white)} /* 3 — stagger via nth-child span */ .hv-03__word--fade{ display:inline-flex;gap:0; font-size:clamp(1.4rem,4vw,2rem);font-weight:700; color:var(--cyan);letter-spacing:.02em; } .hv-03__word--fade span{ display:inline-block; transition:letter-spacing .4s cubic-bezier(.4,0,.2,1),opacity .4s; } .hv-03__word--fade:hover span{letter-spacing:.2em;opacity:.3} .hv-03__word--fade span:nth-child(1){transition-delay:.00s} .hv-03__word--fade span:nth-child(2){transition-delay:.04s} .hv-03__word--fade span:nth-child(3){transition-delay:.08s} .hv-03__word--fade span:nth-child(4){transition-delay:.12s} .hv-03__word--fade span:nth-child(5){transition-delay:.16s} /* 4 — bold + tracking */ .hv-03__word--bold{color:var(--amber);letter-spacing:.02em;font-weight:400;transition:letter-spacing .35s,font-weight .35s,color .35s} .hv-03__word--bold:hover{letter-spacing:.25em;font-weight:900;color:var(--white)} /* 5 — spacing + glow */ .hv-03__word--glow{ color:var(--text);letter-spacing:.06em; transition:letter-spacing .5s cubic-bezier(.4,0,.2,1),text-shadow .5s,color .5s; } .hv-03__word--glow:hover{ letter-spacing:.3em; color:#fff; text-shadow:0 0 20px var(--purple),0 0 60px var(--pink); } @media(max-width:520px){.hv-03__row{flex-direction:column;align-items:flex-start}} @media(prefers-reduced-motion:reduce){ .hv-03__word,.hv-03__word--fade span{transition:none!important} } ``` ### 04. CSS Gradient Text Reveal Hover Effect **Type:** Pure CSS **Description:** Six gradient text hover techniques — background-clip reveal, linear wipe, conic sweep, radial burst, rainbow shift, and masked shimmer — each using CSS background-clip: text to paint a gradient directly onto letterforms on hover. **HTML:** ```html
        AURORA gradient position wipe
        RADIAL radial-gradient burst
        SPECTRUM rainbow hue-shift
        SHIMMER shimmer keyframe
        DUOTONE dual-tone color swap
        PRISM diagonal sweep
        ``` **CSS:** ```css .hv-04,.hv-04 *,.hv-04 *::before,.hv-04 *::after{box-sizing:border-box;margin:0;padding:0} .hv-04 ::selection{background:#6d28d9;color:#fff} .hv-04{ --bg:#06040f; --text:#d4d4f7; --dim:#555; font-family:'Segoe UI',system-ui,sans-serif; background:var(--bg); min-height:100vh; display:flex;align-items:center;justify-content:center; padding:60px 24px; } .hv-04__grid{ display:grid;grid-template-columns:repeat(3,1fr);gap:32px; max-width:900px;width:100%; } .hv-04__cell{ display:flex;flex-direction:column;align-items:center;gap:20px; padding:48px 24px; background:rgba(255,255,255,.025); border:1px solid rgba(255,255,255,.07); border-radius:14px; } .hv-04__label{font-size:10px;letter-spacing:.15em;text-transform:uppercase;color:var(--dim);text-align:center} /* shared text base */ .hv-04__text{ font-size:clamp(1.6rem,4vw,2.4rem);font-weight:900;letter-spacing:.06em; cursor:default;display:inline-block; -webkit-background-clip:text;background-clip:text; } /* 1 — position wipe */ .hv-04__text--wipe{ color:var(--text); background-image:linear-gradient(90deg,#7c3aed,#06b6d4,#10b981); background-size:200% auto;background-position:right center; transition:background-position .5s cubic-bezier(.4,0,.2,1),color .5s; } .hv-04__text--wipe:hover{ color:transparent;background-position:left center; } /* 2 — radial burst */ .hv-04__text--burst{ color:var(--text); background-image:radial-gradient(circle at 50% 50%,#f59e0b,#ef4444,#7c3aed); background-size:0% 0%;background-position:center; transition:background-size .5s cubic-bezier(.4,0,.2,1),color .5s; } .hv-04__text--burst:hover{ color:transparent;background-size:200% 200%; } /* 3 — rainbow shift */ .hv-04__text--rainbow{ color:var(--text); background-image:linear-gradient(90deg,#f43f5e,#f59e0b,#10b981,#06b6d4,#6d28d9,#f43f5e); background-size:400% auto;background-position:0% center; transition:background-position .6s,color .4s; } .hv-04__text--rainbow:hover{ color:transparent;background-position:100% center; } /* 4 — shimmer keyframe */ .hv-04__text--shimmer{ color:var(--text); background-image:linear-gradient(105deg,#c4b5fd 0%,#fff 40%,#7c3aed 55%,#c4b5fd 100%); background-size:200% auto; transition:color .3s; } .hv-04__text--shimmer:hover{ color:transparent; animation:hv-04-shimmer .8s linear infinite; } @keyframes hv-04-shimmer{ 0%{background-position:-100% center} 100%{background-position:200% center} } /* 5 — duotone swap */ .hv-04__text--duotone{ color:var(--text); background-image:linear-gradient(135deg,#f43f5e,#f97316); background-size:100% 100%; transition:color .4s,filter .4s; } .hv-04__text--duotone:hover{ color:transparent; filter:hue-rotate(120deg) saturate(1.4); } /* 6 — diagonal sweep */ .hv-04__text--diagonal{ color:var(--text); background-image:linear-gradient(135deg,#06b6d4 0%,#a21caf 50%,#06b6d4 100%); background-size:200% 200%;background-position:bottom right; transition:background-position .6s cubic-bezier(.4,0,.2,1),color .4s; } .hv-04__text--diagonal:hover{ color:transparent;background-position:top left; } @media(max-width:640px){.hv-04__grid{grid-template-columns:repeat(2,1fr)}} @media(max-width:400px){.hv-04__grid{grid-template-columns:1fr}} @media(prefers-reduced-motion:reduce){ .hv-04__text{transition:none!important;animation:none!important} } ``` ### 05. CSS Split Text Hover Effect **Type:** Pure CSS **Description:** Four split-text hover effects where words or characters divide and separate on hover — vertical halve, top-bottom reveal, left-right push-apart, and diagonal slash — all achieved with CSS clip-path on layered pseudo-elements. **HTML:** ```html
        DIVIDE top / bottom split
        SCHISM left / right push
        SLASH diagonal polygon
        RIFT split + fade
        ``` **CSS:** ```css .hv-05,.hv-05 *,.hv-05 *::before,.hv-05 *::after{box-sizing:border-box;margin:0;padding:0} .hv-05 ::selection{background:#0891b2;color:#fff} .hv-05{ --bg:#020917; --text:#e0f2fe; --dim:#475569; --cyan:#06b6d4; --rose:#f43f5e; --violet:#8b5cf6; --amber:#f59e0b; font-family:'Segoe UI',system-ui,sans-serif; background:var(--bg); min-height:100vh; display:flex;align-items:center;justify-content:center; padding:60px 24px; } .hv-05__grid{ display:grid;grid-template-columns:repeat(2,1fr);gap:48px; max-width:800px;width:100%; } .hv-05__cell{ display:flex;flex-direction:column;align-items:center;gap:24px; padding:60px 32px; background:rgba(255,255,255,.025); border:1px solid rgba(255,255,255,.07); border-radius:14px; } .hv-05__label{font-size:11px;letter-spacing:.15em;text-transform:uppercase;color:var(--dim)} /* shared split base */ .hv-05__split{ font-size:clamp(2rem,6vw,3rem);font-weight:900;letter-spacing:.1em; position:relative;cursor:default;display:inline-block; color:transparent;overflow:hidden; } .hv-05__split::before, .hv-05__split::after{ content:attr(data-text); position:absolute;top:0;left:0;width:100%;height:100%; transition:transform .45s cubic-bezier(.4,0,.2,1),opacity .45s; pointer-events:none; } /* 1 — vertical top/bottom */ .hv-05__split--vert::before{color:var(--cyan);clip-path:inset(0 0 50% 0)} .hv-05__split--vert::after{color:var(--cyan);clip-path:inset(50% 0 0 0)} .hv-05__split--vert:hover::before{transform:translateY(-.55em)} .hv-05__split--vert:hover::after{transform:translateY(.55em)} /* 2 — left/right */ .hv-05__split--lr::before{color:var(--rose);clip-path:inset(0 50% 0 0)} .hv-05__split--lr::after{color:var(--amber);clip-path:inset(0 0 0 50%)} .hv-05__split--lr:hover::before{transform:translateX(-.4em)} .hv-05__split--lr:hover::after{transform:translateX(.4em)} /* 3 — diagonal */ .hv-05__split--diag::before{ color:var(--violet); clip-path:polygon(0 0,100% 0,60% 100%,0 100%); } .hv-05__split--diag::after{ color:var(--cyan); clip-path:polygon(60% 0,100% 0,100% 100%,0 100%); /* small intentional gap at clip edge */ } .hv-05__split--diag:hover::before{transform:translate(-.3em,-.3em)} .hv-05__split--diag:hover::after{transform:translate(.3em,.3em)} /* 4 — split + fade */ .hv-05__split--fade::before{color:var(--amber);clip-path:inset(0 0 50% 0)} .hv-05__split--fade::after{color:var(--rose);clip-path:inset(50% 0 0 0)} .hv-05__split--fade:hover::before{transform:translateY(-.6em) rotate(-3deg);opacity:0} .hv-05__split--fade:hover::after{transform:translateY(.6em) rotate(3deg);opacity:0} @media(max-width:520px){.hv-05__grid{grid-template-columns:1fr}} @media(prefers-reduced-motion:reduce){ .hv-05__split::before,.hv-05__split::after{transition:none!important} } ``` ### 06. CSS Neon Glow Text Hover Effect **Type:** Pure CSS **Description:** Six neon-sign-inspired text hover effects — classic tube glow, pulsing flicker, color-cycle sweep, multi-layer bloom, retro arcade, and icy frost glow — using layered text-shadow transitions to simulate electroluminescent lighting. **HTML:** ```html
        NEON classic tube glow
        FLICKER pulsing flicker
        SPECTRUM hue-rotate cycle
        BLOOM multi-layer bloom
        HI-SCORE retro arcade
        ICE icy frost glow
        ``` **CSS:** ```css .hv-06,.hv-06 *,.hv-06 *::before,.hv-06 *::after{box-sizing:border-box;margin:0;padding:0} .hv-06 ::selection{background:#ff00de;color:#fff} .hv-06{ --bg:#020204; --dim:#3a3a4a; font-family:'Segoe UI',system-ui,sans-serif; background:var(--bg); min-height:100vh; display:flex;align-items:center;justify-content:center; padding:60px 24px; } .hv-06__stack{ display:flex;flex-direction:column;gap:12px; width:min(700px,100%); } .hv-06__row{ display:flex;align-items:center;justify-content:space-between; padding:32px 40px; background:rgba(255,255,255,.02); border:1px solid rgba(255,255,255,.06); border-radius:12px;gap:20px; } .hv-06__label{font-size:11px;letter-spacing:.12em;text-transform:uppercase;color:var(--dim);white-space:nowrap;flex-shrink:0} /* shared neon base */ .hv-06__neon{ font-size:clamp(1.6rem,4vw,2.4rem);font-weight:700;letter-spacing:.15em; cursor:default;display:inline-block; } /* 1 — classic */ .hv-06__neon--classic{ color:#ff00de; text-shadow:0 0 4px #ff00de44; transition:text-shadow .4s,color .4s; } .hv-06__neon--classic:hover{ color:#fff; text-shadow: 0 0 4px #fff, 0 0 16px #ff00de, 0 0 40px #ff00de, 0 0 80px #ff00de; } /* 2 — flicker */ .hv-06__neon--flicker{ color:#39ff14; transition:text-shadow .3s; } .hv-06__neon--flicker:hover{ color:#fff; text-shadow:0 0 4px #fff,0 0 18px #39ff14,0 0 50px #39ff14; animation:hv-06-flicker 2s linear infinite; } @keyframes hv-06-flicker{ 0%,19%,21%,23%,25%,54%,56%,100%{ text-shadow:0 0 4px #fff,0 0 18px #39ff14,0 0 50px #39ff14; color:#fff; } 20%,24%,55%{ text-shadow:none;color:#39ff14; } } /* 3 — hue-rotate cycle */ .hv-06__neon--cycle{ color:#ff4400; text-shadow:0 0 4px #ff440033; transition:text-shadow .4s,filter .4s; } .hv-06__neon--cycle:hover{ color:#fff; text-shadow:0 0 6px #fff,0 0 20px #ff4400,0 0 60px #ff4400; animation:hv-06-huerot 3s linear infinite; } @keyframes hv-06-huerot{ 0%{filter:hue-rotate(0deg)} 100%{filter:hue-rotate(360deg)} } /* 4 — multi-layer bloom */ .hv-06__neon--bloom{ color:#7c3aed; text-shadow:0 0 4px #7c3aed44; transition:text-shadow .5s cubic-bezier(.4,0,.2,1),color .5s; } .hv-06__neon--bloom:hover{ color:#fff; text-shadow: 0 0 2px #fff, 0 0 8px #a78bfa, 0 0 20px #7c3aed, 0 0 50px #6d28d9, 0 0 100px #5b21b6, 0 0 180px #4c1d95; } /* 5 — retro arcade */ .hv-06__neon--arcade{ color:#ffee00;font-family:monospace; text-shadow:0 0 4px #ffee0044; transition:text-shadow .25s steps(2),color .25s; } .hv-06__neon--arcade:hover{ color:#fff; text-shadow: 2px 2px 0 #ff6600, 0 0 10px #ffee00, 0 0 30px #ffee00, 0 0 60px #ff6600; } /* 6 — frost */ .hv-06__neon--frost{ color:#a5f3fc; text-shadow:0 0 4px #a5f3fc44; transition:text-shadow .5s,color .5s,letter-spacing .5s; } .hv-06__neon--frost:hover{ color:#fff;letter-spacing:.25em; text-shadow: 0 0 4px #fff, 0 0 16px #a5f3fc, 0 0 40px #0ea5e9, 0 0 80px #0369a1; } @media(max-width:520px){.hv-06__row{flex-direction:column;align-items:flex-start}} @media(prefers-reduced-motion:reduce){ .hv-06__neon{transition:none!important;animation:none!important} } ``` ### 07. CSS Magnetic Liquid Button Hover Effect **Type:** Pure CSS **Description:** Four button hover effects with fluid, organic transitions — liquid fill bubble, morphing border-radius blob, surface tension ripple, and stretched rubber — using border-radius animation and pseudo-element scale transforms for a tactile, material-feeling interaction. **HTML:** ```html
        scale-Y fill
        border-radius keyframe
        ellipse clip-path burst
        squash-and-stretch
        ``` **CSS:** ```css .hv-07,.hv-07 *,.hv-07 *::before,.hv-07 *::after{box-sizing:border-box;margin:0;padding:0} .hv-07 ::selection{background:#10b981;color:#fff} .hv-07{ --bg:#030d09; --text:#d1fae5; --dim:#374151; --green:#10b981; --teal:#0d9488; --emerald:#059669; --mint:#6ee7b7; font-family:'Segoe UI',system-ui,sans-serif; background:var(--bg); min-height:100vh; display:flex;align-items:center;justify-content:center; padding:60px 24px; } .hv-07__grid{ display:grid;grid-template-columns:repeat(2,1fr);gap:48px; max-width:720px;width:100%; } .hv-07__cell{ display:flex;flex-direction:column;align-items:center;gap:20px; padding:48px 32px; background:rgba(255,255,255,.025); border:1px solid rgba(255,255,255,.07); border-radius:14px; } .hv-07__label{font-size:11px;letter-spacing:.15em;text-transform:uppercase;color:var(--dim)} /* shared btn base */ .hv-07__btn{ position:relative;overflow:hidden; padding:14px 36px; border:2px solid var(--green); background:transparent; color:var(--green); font-size:1rem;font-weight:600;letter-spacing:.06em; border-radius:8px;cursor:pointer; transition:color .35s; } .hv-07__btn span{position:relative;z-index:1} .hv-07__btn::before{content:'';position:absolute;inset:0;z-index:0} /* 1 — liquid fill */ .hv-07__btn--fill::before{ background:var(--green); transform:scaleY(0);transform-origin:bottom; transition:transform .35s cubic-bezier(.4,0,.2,1); } .hv-07__btn--fill:hover::before{transform:scaleY(1)} .hv-07__btn--fill:hover{color:#fff} /* 2 — blob morph */ .hv-07__btn--blob{ border-color:var(--teal);color:var(--teal); border-radius:8px; transition:border-radius .5s cubic-bezier(.4,0,.2,1),color .35s,background .35s; } .hv-07__btn--blob::before{ background:var(--teal); border-radius:8px; transform:scale(0); transition:transform .35s cubic-bezier(.4,0,.2,1),border-radius .5s; } .hv-07__btn--blob:hover{ color:#fff; border-radius:60% 40% 70% 30% / 40% 70% 30% 60%; } .hv-07__btn--blob:hover::before{ transform:scale(1); border-radius:60% 40% 70% 30% / 40% 70% 30% 60%; } /* 3 — surface tension (expanding emerald droplet from button center). The original used negative percentage margins (margin:-100% 0 0 -100%) to center the ::after, but percentage margins resolve against the PARENT'S WIDTH on BOTH axes (not against the element's own size, and NOT against parent's height for top/bottom margins). On a wide button, margin-top:-100% overshoots by ~200px upward, pushing the entire droplet above the visible button area where overflow:hidden clips it to nothing. Fix: use transform translate(-50%, -50%) for the centering (translate-% uses the ELEMENT's own dimensions) and combine the scale in the same transform. The animated value is the scale inside the transform, so we declare the centered translate + scaled-to-zero state, and the :hover handler bumps the scale portion to 1 while the centering translate stays the same. */ .hv-07__btn--tension{ border-color:var(--emerald);color:var(--emerald); } .hv-07__btn--tension::after{ content:'';position:absolute; top:50%;left:50%; width:200%;height:200%; background:var(--emerald); border-radius:50%; transform:translate(-50%,-50%) scale(0); transition:transform .5s cubic-bezier(.4,0,.2,1); z-index:0; } .hv-07__btn--tension:hover::after{transform:translate(-50%,-50%) scale(1)} .hv-07__btn--tension:hover{color:#fff} /* 4 — rubber stretch */ .hv-07__btn--rubber{ border-color:var(--mint);color:var(--mint); transition:transform .2s cubic-bezier(.4,0,.2,1),color .35s,background .35s,border-color .35s; } .hv-07__btn--rubber::before{ background:var(--mint); transform:scaleY(0);transform-origin:bottom; transition:transform .35s; } .hv-07__btn--rubber:hover{ transform:scaleX(1.06) scaleY(0.93); color:#000; } .hv-07__btn--rubber:hover::before{transform:scaleY(1)} .hv-07__btn--rubber:active{ transform:scaleX(0.97) scaleY(1.04); } @media(max-width:520px){.hv-07__grid{grid-template-columns:1fr}} @media(prefers-reduced-motion:reduce){ .hv-07__btn,.hv-07__btn::before,.hv-07__btn::after{transition:none!important;animation:none!important} } ``` ### 08. CSS Border Draw Hover Effect **Type:** Pure CSS **Description:** Six button and card border-draw hover effects — clockwise stroke, corner flash, double-rail slide, snake crawl, dashed grow, and gradient border sweep — all achieved by animating pseudo-element dimensions or SVG-style techniques without JavaScript. **HTML:** ```html
        clockwise stroke
        corner flash
        dual-rail slide
        dashed border scale
        conic border sweep
        box-shadow inset
        ``` **CSS:** ```css .hv-08,.hv-08 *,.hv-08 *::before,.hv-08 *::after{box-sizing:border-box;margin:0;padding:0} .hv-08 ::selection{background:#f59e0b;color:#000} .hv-08{ --bg:#0c0a03; --text:#fef3c7; --dim:#6b7280; --amber:#f59e0b; --orange:#f97316; --red:#ef4444; --yellow:#fde047; --gold:#b45309; font-family:'Segoe UI',system-ui,sans-serif; background:var(--bg); min-height:100vh; display:flex;align-items:center;justify-content:center; padding:60px 24px; } .hv-08__grid{ display:grid;grid-template-columns:repeat(3,1fr);gap:36px; max-width:860px;width:100%; } .hv-08__cell{ display:flex;flex-direction:column;align-items:center;gap:20px; padding:40px 20px; background:rgba(255,255,255,.025); border:1px solid rgba(255,255,255,.07); border-radius:12px; } .hv-08__label{font-size:11px;letter-spacing:.12em;text-transform:uppercase;color:var(--dim)} /* shared btn base */ .hv-08__btn{ position:relative;overflow:hidden; padding:13px 32px; background:transparent; font-size:.95rem;font-weight:600;letter-spacing:.05em; cursor:pointer; } /* 1 — clockwise draw */ .hv-08__btn--cw{ color:var(--amber);border:none; } .hv-08__btn--cw::before{ content:'';position:absolute;top:0;right:0;width:0;height:2px; background:var(--amber); transition:width .2s linear; } .hv-08__btn--cw::after{ content:'';position:absolute;bottom:0;left:0;width:0;height:2px; background:var(--amber); transition:width .2s linear .4s; } .hv-08__btn--cw:hover::before{width:100%;transition:width .2s linear} .hv-08__btn--cw:hover::after{width:100%;transition:width .2s linear .2s} /* border sides via box-shadow on hover for left/right of CW */ .hv-08__btn--cw{ box-shadow:inset 2px 0 0 transparent, inset -2px 0 0 transparent; transition:box-shadow .001s linear .39s,color .3s; } .hv-08__btn--cw:hover{ color:var(--text); box-shadow:inset 2px 0 0 var(--amber), inset -2px 0 0 var(--amber); transition:box-shadow .2s linear .2s, color .3s; } /* 2 — corner flash (L-shaped pseudos grow on hover to form full border). Two problems with the original: (a) the shared .hv-08__btn rule sets overflow:hidden, which clipped the L-corner pseudo-elements (positioned at top/left/bottom/right: -2px — slightly OUTSIDE the button box). Result: invisible default state, no growth on hover. (b) The background-image: linear-gradient stack was meant as a border-box transparent-center trick but was incomplete (no background-origin pairing), so it just painted the page bg over everything including the corner indicators. Fix: override overflow to visible on this variant only (other variants still need overflow:hidden for their clip effects), and drop the broken background-image stack entirely — the transparent button is already transparent without it. */ .hv-08__btn--corner{ color:var(--orange); overflow:visible; transition:color .3s; } .hv-08__btn--corner::before, .hv-08__btn--corner::after{ content:'';position:absolute;width:12px;height:12px; border-color:var(--orange);border-style:solid; transition:width .25s,height .25s; } .hv-08__btn--corner::before{top:-2px;left:-2px;border-width:2px 0 0 2px} .hv-08__btn--corner::after{bottom:-2px;right:-2px;border-width:0 2px 2px 0} .hv-08__btn--corner:hover::before,.hv-08__btn--corner:hover::after{width:calc(100% + 4px);height:calc(100% + 4px)} /* 3 — double rail */ .hv-08__btn--rail{ color:var(--red);border:none; } .hv-08__btn--rail::before{ content:'';position:absolute;top:0;left:-100%;width:100%;height:2px; background:var(--red); transition:left .35s cubic-bezier(.4,0,.2,1); } .hv-08__btn--rail::after{ content:'';position:absolute;bottom:0;right:-100%;width:100%;height:2px; background:var(--red); transition:right .35s cubic-bezier(.4,0,.2,1); } .hv-08__btn--rail:hover::before{left:0} .hv-08__btn--rail:hover::after{right:0} .hv-08__btn--rail:hover{color:var(--text)} /* 4 — dashed grow */ .hv-08__btn--dashed{ color:var(--yellow); border:2px dashed transparent; transition:border-color .3s,color .3s,padding .3s; } .hv-08__btn--dashed:hover{ border-color:var(--yellow); padding:13px 40px; color:var(--text); } /* 5 — gradient border sweep (conic gradient rotates around a 2px ring, button's bg covers the center so only the 2px edge shows the spinning gradient). Original implementation rotated the entire ::before pseudo- element via @keyframes transform: rotate(360deg). That works on SQUARE elements but the button is a wide rectangle (~189x43), so rotating the rectangle itself swings its corners through a huge arc — producing the "gradient wedge flapping in the background" effect the user reported. Fix: don't rotate the element. Instead use @property to register a custom property --angle as angle, then animate --angle inside the conic-gradient's "from angle" parameter. The ELEMENT stays put; only the gradient's start-angle rotates within the rectangle, producing a clean circular sweep visible only as a 2px ring (since ::after covers the center). @property support: Chrome 85+, Safari 16.4+, Firefox 128+ (~92% global). Older browsers see a static gradient — still looks intentional, just doesn't spin. Also fixed previously: overflow:visible override (shared .hv-08__btn sets overflow:hidden which clipped the gradient's 2px overhang), and isolation:isolate to trap the pseudo- elements' negative z-index within the button's stacking context. */ @property --hv-08-angle { syntax: ''; initial-value: 0deg; inherits: false; } .hv-08__btn--grad{ color:var(--text); border:none; background:transparent; overflow:visible; isolation:isolate; } .hv-08__btn--grad::before{ content:'';position:absolute;inset:-2px; --hv-08-angle:0deg; background:conic-gradient(from var(--hv-08-angle),transparent 0%,var(--amber) 30%,var(--orange) 50%,transparent 70%); border-radius:4px; opacity:0; transition:opacity .3s; z-index:-1; } .hv-08__btn--grad::after{ content:'';position:absolute;inset:0; background:var(--bg);border-radius:2px;z-index:-1; } .hv-08__btn--grad:hover::before{ opacity:1; animation:hv-08-spin 1.5s linear infinite; } @keyframes hv-08-spin{to{--hv-08-angle:360deg}} /* 6 — inset reveal */ .hv-08__btn--inset{ color:var(--gold); border:none; box-shadow:inset 0 0 0 0 var(--amber); transition:box-shadow .4s cubic-bezier(.4,0,.2,1),color .4s; } .hv-08__btn--inset:hover{ color:#000; box-shadow:inset 0 0 0 60px var(--amber); } @media(max-width:640px){.hv-08__grid{grid-template-columns:repeat(2,1fr)}} @media(max-width:400px){.hv-08__grid{grid-template-columns:1fr}} @media(prefers-reduced-motion:reduce){ .hv-08__btn,.hv-08__btn::before,.hv-08__btn::after{transition:none!important;animation:none!important} } ``` ### 09. CSS Shimmer Shine Button Hover Effect **Type:** Pure CSS **Description:** Five light-streak and shimmer button effects — diagonal gloss swipe, radial spotlight, frosted edge shimmer, holographic foil, and full-button shimmer wash — using pseudo-element gradients animated on hover to simulate a reflective material surface. **HTML:** ```html
        translateX streak
        radial-gradient reveal
        edge-shimmer effect
        conic-gradient holo
        full-button wave
        ``` **CSS:** ```css .hv-09,.hv-09 *,.hv-09 *::before,.hv-09 *::after{box-sizing:border-box;margin:0;padding:0} .hv-09 ::selection{background:#6366f1;color:#fff} .hv-09{ --bg:#07070f; --text:#e0e0ff; --dim:#4b5563; --indigo:#6366f1; --violet:#8b5cf6; --blue:#3b82f6; --sky:#0ea5e9; font-family:'Segoe UI',system-ui,sans-serif; background:var(--bg); min-height:100vh; display:flex;align-items:center;justify-content:center; padding:60px 24px; } .hv-09__stack{ display:flex;flex-direction:column;gap:20px; width:min(640px,100%); } .hv-09__row{ display:flex;align-items:center;justify-content:space-between; gap:24px;padding:24px 36px; background:rgba(255,255,255,.025); border:1px solid rgba(255,255,255,.07); border-radius:12px; } .hv-09__label{font-size:11px;letter-spacing:.12em;text-transform:uppercase;color:var(--dim);white-space:nowrap;flex-shrink:0} /* shared btn */ .hv-09__btn{ position:relative;overflow:hidden; padding:13px 36px;border:none; font-size:.95rem;font-weight:600;letter-spacing:.05em; cursor:pointer;border-radius:8px;flex-shrink:0; } .hv-09__btn::before{content:'';position:absolute;pointer-events:none} /* 1 — diagonal gloss */ .hv-09__btn--diagonal{ background:var(--indigo);color:#fff; } .hv-09__btn--diagonal::before{ top:0;left:-75%;width:75%;height:100%; background:linear-gradient(105deg,transparent 0%,rgba(255,255,255,.7) 50%,transparent 100%); transition:left .7s cubic-bezier(.4,0,.2,1); } .hv-09__btn--diagonal:hover::before{left:125%} /* 2 — radial spotlight */ .hv-09__btn--radial{ background:var(--violet);color:#fff; } .hv-09__btn--radial::before{ inset:0; background:radial-gradient(circle at 50% 50%,rgba(255,255,255,.5) 0%,transparent 65%); opacity:0;transition:opacity .4s; } .hv-09__btn--radial:hover::before{opacity:1} /* 3 — frosted edge */ .hv-09__btn--frost{ background:transparent;color:var(--blue); border:2px solid var(--blue); transition:background .4s ease,color .4s ease,box-shadow .4s ease; } .hv-09__btn--frost::before{ top:0;left:0;width:60%;height:100%; background:linear-gradient(90deg,rgba(59,130,246,.55),transparent); transform:translateX(-100%); transition:transform .5s ease; } .hv-09__btn--frost:hover{box-shadow:0 0 24px rgba(59,130,246,.35)} .hv-09__btn--frost:hover::before{transform:translateX(0)} .hv-09__btn--frost::after{ content:'';position:absolute;top:0;right:0;width:60%;height:100%; background:linear-gradient(270deg,rgba(59,130,246,.55),transparent); transform:translateX(100%); transition:transform .5s ease; pointer-events:none; } .hv-09__btn--frost:hover::after{transform:translateX(0)} /* 4 — holographic foil */ .hv-09__btn--holo{ background:conic-gradient(from 0deg,#6366f1,#8b5cf6,#ec4899,#f59e0b,#10b981,#06b6d4,#6366f1); background-size:200% 200%; background-position:0% 50%; color:#fff; transition:background-position .6s,filter .4s; } .hv-09__btn--holo:hover{ background-position:100% 50%; filter:brightness(1.2) saturate(1.3); } /* 5 — shimmer wash */ .hv-09__btn--wash{ background:linear-gradient(135deg,var(--sky),var(--indigo)); color:#fff; } .hv-09__btn--wash::before{ top:0;left:-100%;width:100%;height:100%; background:linear-gradient( 90deg, transparent 0%, rgba(255,255,255,.6) 50%, transparent 100% ); } .hv-09__btn--wash:hover::before{ animation:hv-09-wash .9s ease-in-out forwards; } @keyframes hv-09-wash{ 0%{left:-100%} 100%{left:100%} } @media(max-width:500px){.hv-09__row{flex-direction:column;align-items:flex-start}} @media(prefers-reduced-motion:reduce){ .hv-09__btn::before,.hv-09__btn::after{transition:none!important;animation:none!important} } ``` ### 10. CSS Fill Wipe Button Hover Effect **Type:** Pure CSS **Description:** Six directional fill-wipe button styles — left wipe, diagonal corner, radial center-out, curtain drop, split from center, and pixel dissolve — demonstrating every axis of reveal using CSS pseudo-element transitions and clip-path on buttons. **HTML:** ```html
        scaleX from left
        rotated translate
        scale from center
        scaleY from top
        dual scaleX outward
        box-shadow inset fill
        ``` **CSS:** ```css .hv-10,.hv-10 *,.hv-10 *::before,.hv-10 *::after{box-sizing:border-box;margin:0;padding:0} .hv-10 ::selection{background:#dc2626;color:#fff} .hv-10{ --bg:#0f0400; --text:#fef2f2; --dim:#6b7280; --red:#ef4444; --rose:#f43f5e; --orange:#f97316; --coral:#fb923c; --crimson:#dc2626; font-family:'Segoe UI',system-ui,sans-serif; background:var(--bg); min-height:100vh; display:flex;align-items:center;justify-content:center; padding:60px 24px; } .hv-10__grid{ display:grid;grid-template-columns:repeat(3,1fr);gap:36px; max-width:840px;width:100%; } .hv-10__cell{ display:flex;flex-direction:column;align-items:center;gap:20px; padding:40px 20px; background:rgba(255,255,255,.025); border:1px solid rgba(255,255,255,.07); border-radius:12px; } .hv-10__label{font-size:11px;letter-spacing:.12em;text-transform:uppercase;color:var(--dim)} /* shared btn */ .hv-10__btn{ position:relative;overflow:hidden; padding:13px 32px; font-size:.95rem;font-weight:600;letter-spacing:.05em; cursor:pointer;border-radius:6px; } .hv-10__btn span{position:relative;z-index:1} .hv-10__btn::before{content:'';position:absolute;inset:0;z-index:0} /* 1 — left wipe */ .hv-10__btn--left{ background:transparent;border:2px solid var(--red);color:var(--red); transition:color .35s; } .hv-10__btn--left::before{ background:var(--red); transform:scaleX(0);transform-origin:left; transition:transform .35s cubic-bezier(.4,0,.2,1); } .hv-10__btn--left:hover{color:#fff} .hv-10__btn--left:hover::before{transform:scaleX(1)} /* 2 — diagonal slash */ .hv-10__btn--diag{ background:transparent;border:2px solid var(--rose);color:var(--rose); transition:color .4s; } .hv-10__btn--diag::before{ inset:-20% -20%; background:var(--rose); transform:skewX(-25deg) scaleX(0); transform-origin:left center; transition:transform .5s cubic-bezier(.4,0,.2,1); } .hv-10__btn--diag:hover{color:#fff} .hv-10__btn--diag:hover::before{transform:skewX(-25deg) scaleX(1)} /* 3 — radial burst */ .hv-10__btn--radial{ background:transparent;border:2px solid var(--orange);color:var(--orange); transition:color .35s; } .hv-10__btn--radial::before{ background:var(--orange);border-radius:50%; transform:scale(0); transition:transform .45s cubic-bezier(.4,0,.2,1); } .hv-10__btn--radial:hover{color:#fff} .hv-10__btn--radial:hover::before{transform:scale(3)} /* 4 — curtain drop */ .hv-10__btn--drop{ background:transparent;border:2px solid var(--coral);color:var(--coral); transition:color .35s; } .hv-10__btn--drop::before{ background:var(--coral); transform:scaleY(0);transform-origin:top; transition:transform .35s cubic-bezier(.4,0,.2,1); } .hv-10__btn--drop:hover{color:#fff} .hv-10__btn--drop:hover::before{transform:scaleY(1)} /* 5 — center split */ .hv-10__btn--split{ background:transparent;border:2px solid var(--crimson);color:var(--crimson); transition:color .35s; } .hv-10__btn--split::before{ background:var(--crimson); transform:scaleX(0);transform-origin:center; transition:transform .35s cubic-bezier(.4,0,.2,1); } .hv-10__btn--split:hover{color:#fff} .hv-10__btn--split:hover::before{transform:scaleX(1)} /* 6 — inset box-shadow */ .hv-10__btn--inset{ background:transparent;border:2px solid var(--red);color:var(--red); box-shadow:inset 0 0 0 0 var(--red); transition:box-shadow .4s cubic-bezier(.4,0,.2,1),color .4s; } .hv-10__btn--inset::before{display:none} .hv-10__btn--inset:hover{ box-shadow:inset 0 0 0 60px var(--red); color:#fff; } @media(max-width:640px){.hv-10__grid{grid-template-columns:repeat(2,1fr)}} @media(max-width:400px){.hv-10__grid{grid-template-columns:1fr}} @media(prefers-reduced-motion:reduce){ .hv-10__btn,.hv-10__btn::before{transition:none!important} } ``` ### 11. CSS 3D Press Button Hover Effect **Type:** Pure CSS **Description:** Six physically satisfying 3D button press effects — layered shadow stack, extrude push-down, isometric depth, embossed groove, beveled edge, and neumorphic press — each simulating real depth through box-shadow and transform: translateY on hover. **HTML:** ```html
        shadow shrink press
        stacked shadow layers
        angled depth edge
        groove press
        inset bevel edges
        concave surface
        ``` **CSS:** ```css .hv-11,.hv-11 *,.hv-11 *::before,.hv-11 *::after{box-sizing:border-box;margin:0;padding:0} .hv-11 ::selection{background:#1d4ed8;color:#fff} .hv-11{ --bg:#0b0f1a; --text:#e2e8f0; --dim:#475569; --blue:#3b82f6; --navy:#1d4ed8; --slate:#64748b; --neu:#e2e8f0; font-family:'Segoe UI',system-ui,sans-serif; background:var(--bg); min-height:100vh; display:flex;align-items:center;justify-content:center; padding:60px 24px; } .hv-11__grid{ display:grid;grid-template-columns:repeat(3,1fr);gap:36px; max-width:840px;width:100%; } .hv-11__cell{ display:flex;flex-direction:column;align-items:center;gap:20px; padding:48px 20px; background:rgba(255,255,255,.025); border:1px solid rgba(255,255,255,.07); border-radius:12px; } .hv-11__label{font-size:11px;letter-spacing:.12em;text-transform:uppercase;color:var(--dim)} /* shared btn */ .hv-11__btn{ padding:13px 32px;font-size:.95rem;font-weight:700;letter-spacing:.05em; cursor:pointer;border:none;border-radius:8px; transition:transform .12s,box-shadow .12s; } /* 1 — classic push-down */ .hv-11__btn--stack{ background:var(--blue);color:#fff; box-shadow:0 6px 0 var(--navy); transform:translateY(0); } .hv-11__btn--stack:hover{transform:translateY(3px);box-shadow:0 3px 0 var(--navy)} .hv-11__btn--stack:active{transform:translateY(6px);box-shadow:0 0 0 var(--navy)} /* 2 — extrude stack (visible side-wall layers via 1px striations) */ .hv-11__btn--extrude{ background:#f59e0b;color:#000; box-shadow: 0 2px 0 #b45309, 0 4px 0 #9a3412, 0 6px 0 #7c2d12, 0 8px 0 #5a1a08, 0 10px 0 #3d1004, 0 14px 18px rgba(0,0,0,.55); transform:translateY(0); } .hv-11__btn--extrude:hover{ transform:translateY(8px); box-shadow: 0 1px 0 #b45309, 0 2px 0 #9a3412, 0 3px 6px rgba(0,0,0,.5); } /* 3 — isometric */ .hv-11__btn--iso{ background:#10b981;color:#fff; box-shadow:4px 4px 0 #065f46,5px 5px 0 #064e3b; transform:translate(0,0); transition:transform .12s,box-shadow .12s; } .hv-11__btn--iso:hover{ transform:translate(4px,4px); box-shadow:0 0 0 #065f46; } /* 4 — embossed groove (deeply recessed engraving, no platform shadow) */ .hv-11__btn--emboss{ background:#1f2937;color:#9ca3af; text-shadow:0 -1px 0 #000,0 1px 0 rgba(255,255,255,.08); box-shadow: inset 0 3px 6px rgba(0,0,0,.7), inset 0 -2px 4px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.06), inset 0 -1px 0 rgba(255,255,255,.03); } .hv-11__btn--emboss:hover{ color:#e5e7eb; box-shadow: inset 0 4px 10px rgba(0,0,0,.9), inset 0 -3px 6px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.04); } /* 5 — beveled (strong dual-edge chamfer, clearly visible top/bottom bevels) */ .hv-11__btn--bevel{ background:linear-gradient(180deg,#8b5cf6 0%,#7c3aed 50%,#5b21b6 100%); color:#fff; text-shadow:0 -1px 0 rgba(0,0,0,.4); box-shadow: inset 0 3px 0 rgba(255,255,255,.4), inset 3px 0 0 rgba(255,255,255,.15), inset -3px 0 0 rgba(0,0,0,.25), inset 0 -4px 0 rgba(0,0,0,.45), 0 4px 0 #3c1a78, 0 6px 8px rgba(0,0,0,.4); } .hv-11__btn--bevel:hover{ transform:translateY(2px); background:linear-gradient(180deg,#7c3aed 0%,#6d28d9 50%,#4c1d95 100%); box-shadow: inset 0 2px 0 rgba(255,255,255,.25), inset 2px 0 0 rgba(255,255,255,.1), inset -2px 0 0 rgba(0,0,0,.3), inset 0 -3px 0 rgba(0,0,0,.5), 0 2px 0 #3c1a78, 0 3px 4px rgba(0,0,0,.4); } /* 6 — neumorphic */ .hv-11__btn--neu{ background:#e2e8f0;color:#334155; box-shadow: 5px 5px 10px #b8bec9, -5px -5px 10px #ffffff; } .hv-11__btn--neu:hover{ box-shadow: inset 4px 4px 8px #b8bec9, inset -4px -4px 8px #ffffff; } @media(max-width:640px){.hv-11__grid{grid-template-columns:repeat(2,1fr)}} @media(max-width:400px){.hv-11__grid{grid-template-columns:1fr}} @media(prefers-reduced-motion:reduce){ .hv-11__btn{transition:none!important} } ``` ### 12. CSS Ripple Button Hover Effect **Type:** Pure CSS **Description:** Five ripple and pulse hover effects on buttons — center-out ring, double ripple, contained wave, border-pulse, and glow-ring expansion — all using pseudo-element scale animations and opacity keyframes to simulate a water-droplet impact. **HTML:** ```html
        scale + opacity keyframe
        staggered dual ripple
        overflow-clipped wave
        outline-offset ping
        box-shadow expand
        ``` **CSS:** ```css .hv-12,.hv-12 *,.hv-12 *::before,.hv-12 *::after{box-sizing:border-box;margin:0;padding:0} .hv-12 ::selection{background:#be185d;color:#fff} .hv-12{ --bg:#0f0008; --text:#fce7f3; --dim:#6b7280; --pink:#ec4899; --rose:#f43f5e; --magenta:#db2777; --purple:#a855f7; font-family:'Segoe UI',system-ui,sans-serif; background:var(--bg); min-height:100vh; display:flex;align-items:center;justify-content:center; padding:60px 24px; } .hv-12__stack{ display:flex;flex-direction:column;gap:16px; width:min(640px,100%); } .hv-12__row{ display:flex;align-items:center;justify-content:space-between; gap:24px;padding:24px 36px; background:rgba(255,255,255,.025); border:1px solid rgba(255,255,255,.07); border-radius:12px; } .hv-12__label{font-size:11px;letter-spacing:.12em;text-transform:uppercase;color:var(--dim);white-space:nowrap;flex-shrink:0} /* shared btn */ .hv-12__btn{ position:relative; padding:13px 36px;font-size:.95rem;font-weight:600; letter-spacing:.05em;cursor:pointer;border-radius:8px;border:none; flex-shrink:0; } /* 1 — center ripple */ .hv-12__btn--ring{ background:var(--pink);color:#fff;overflow:visible; } .hv-12__btn--ring::after{ content:'';position:absolute; top:50%;left:50%; width:100%;height:100%; border-radius:50%; background:rgba(255,255,255,.4); transform:translate(-50%,-50%) scale(0); pointer-events:none; } .hv-12__btn--ring:hover::after{ animation:hv-12-ripple .6s ease-out forwards; } @keyframes hv-12-ripple{ 0%{transform:translate(-50%,-50%) scale(0);opacity:.7} 100%{transform:translate(-50%,-50%) scale(3.5);opacity:0} } /* 2 — double ripple */ .hv-12__btn--double{ background:var(--rose);color:#fff;overflow:visible; } .hv-12__btn--double::before{ content:'';position:absolute; top:50%;left:50%;width:100%;height:100%; border-radius:50%;background:rgba(255,255,255,.3); transform:translate(-50%,-50%) scale(0); pointer-events:none; } .hv-12__btn--double::after{ content:'';position:absolute; top:50%;left:50%;width:100%;height:100%; border-radius:50%;background:rgba(255,255,255,.2); transform:translate(-50%,-50%) scale(0); pointer-events:none; } .hv-12__btn--double:hover::before{animation:hv-12-ripple .7s ease-out forwards} .hv-12__btn--double:hover::after{animation:hv-12-ripple .7s ease-out .25s forwards} /* 3 — contained wave */ .hv-12__btn--wave{ background:transparent;border:2px solid var(--magenta);color:var(--magenta); overflow:hidden; } .hv-12__btn--wave::before{ content:'';position:absolute; top:50%;left:50%; width:0;height:0; border-radius:50%; background:rgba(219,39,119,.25); transform:translate(-50%,-50%); pointer-events:none; } .hv-12__btn--wave:hover::before{ animation:hv-12-wave .6s ease-out forwards; } @keyframes hv-12-wave{ 0%{width:0;height:0;opacity:.8} 100%{width:300px;height:300px;opacity:0} } /* 4 — border pulse */ .hv-12__btn--pulse{ background:var(--purple);color:#fff; outline:2px solid var(--purple);outline-offset:0; transition:outline-offset .4s,outline-color .4s; } .hv-12__btn--pulse:hover{ outline-offset:10px; outline-color:transparent; } /* 5 — glow ring */ .hv-12__btn--glow{ background:transparent;border:2px solid var(--pink);color:var(--pink); box-shadow:0 0 0 0 rgba(236,72,153,.4); transition:box-shadow .4s cubic-bezier(.4,0,.2,1),color .3s,background .3s; } .hv-12__btn--glow:hover{ box-shadow:0 0 0 12px rgba(236,72,153,0); color:#fff;background:var(--pink); } @media(max-width:500px){.hv-12__row{flex-direction:column;align-items:flex-start}} @media(prefers-reduced-motion:reduce){ .hv-12__btn::before,.hv-12__btn::after{animation:none!important} .hv-12__btn--pulse{transition:none!important} } ``` ### 13. CSS 3D Tilt Card Hover Effect **Type:** Pure CSS **Description:** Four card hover effects with perspective-based 3D depth — static tilt corner, perspective flip-axis, floating lift with shadow depth, and layered parallax layers — using CSS perspective, rotateX/Y transforms, and transform-style: preserve-3d. **HTML:** ```html

        Static Tilt

        Perspective rotateX + rotateY on hover

        Axis Flip

        rotateY 180° perspective reveal

        Float Lift

        translateY + shadow depth

        Parallax

        translateZ layered depth

        ``` **CSS:** ```css .hv-13,.hv-13 *,.hv-13 *::before,.hv-13 *::after{box-sizing:border-box;margin:0;padding:0} .hv-13 ::selection{background:#0284c7;color:#fff} .hv-13{ --bg:#020810; --text:#bae6fd; --dim:#475569; --blue:#0ea5e9; --sky:#38bdf8; --indigo:#6366f1; --teal:#14b8a6; font-family:'Segoe UI',system-ui,sans-serif; background:var(--bg); min-height:100vh; display:flex;align-items:center;justify-content:center; padding:60px 24px; } .hv-13__grid{ display:grid;grid-template-columns:repeat(2,1fr);gap:40px; max-width:760px;width:100%; } .hv-13__scene{ perspective:800px; } .hv-13__card{ width:100%;min-height:220px; border-radius:16px; background:rgba(255,255,255,.04); border:1px solid rgba(255,255,255,.1); transition:transform .4s cubic-bezier(.4,0,.2,1),box-shadow .4s; transform-style:preserve-3d; cursor:pointer; } .hv-13__card-body{ padding:32px;display:flex;flex-direction:column;gap:12px; } .hv-13__icon{font-size:2rem;color:var(--blue)} .hv-13__title{font-size:1.1rem;font-weight:700;color:var(--text)} .hv-13__text{font-size:.85rem;color:var(--dim);line-height:1.5} /* 1 — static tilt */ .hv-13__card--tilt:hover{ transform:rotateX(8deg) rotateY(-8deg); box-shadow:8px 12px 40px rgba(14,165,233,.3); } /* 2 — axis flip */ .hv-13__card--flip{ border-color:rgba(99,102,241,.3); } .hv-13__card--flip .hv-13__icon{color:var(--indigo)} .hv-13__card--flip:hover{ transform:rotateX(-6deg) rotateY(10deg); box-shadow:-10px 8px 40px rgba(99,102,241,.3); border-color:rgba(99,102,241,.6); } /* 3 — float lift */ .hv-13__card--lift{ border-color:rgba(20,184,166,.3); box-shadow:0 4px 20px rgba(0,0,0,.4); transition:transform .4s cubic-bezier(.4,0,.2,1),box-shadow .4s; } .hv-13__card--lift .hv-13__icon{color:var(--teal)} .hv-13__card--lift:hover{ transform:translateY(-14px); box-shadow:0 28px 60px rgba(0,0,0,.5),0 0 30px rgba(20,184,166,.2); } /* 4 — parallax layers */ .hv-13__card--layers{ position:relative;min-height:220px;overflow:visible; transition:transform .4s cubic-bezier(.4,0,.2,1); border-color:rgba(56,189,248,.3); } .hv-13__card--layers:hover{ transform:rotateX(6deg) rotateY(-6deg); } .hv-13__layer{ position:absolute;inset:0;border-radius:16px; transition:transform .4s cubic-bezier(.4,0,.2,1); } .hv-13__layer--bg{ background:linear-gradient(135deg,rgba(14,165,233,.1),rgba(56,189,248,.05)); } .hv-13__layer--mid{ display:flex;align-items:flex-start;padding:32px; } .hv-13__layer--mid .hv-13__icon{color:var(--sky);font-size:2.5rem} .hv-13__card--layers:hover .hv-13__layer--mid{transform:translateZ(20px) translateY(-6px)} .hv-13__layer--top{ display:flex;flex-direction:column;justify-content:flex-end; padding:28px;gap:8px; } .hv-13__card--layers:hover .hv-13__layer--top{transform:translateZ(35px) translateY(-4px)} @media(max-width:520px){.hv-13__grid{grid-template-columns:1fr}} @media(prefers-reduced-motion:reduce){ .hv-13__card,.hv-13__layer{transition:none!important} } ``` ### 14. CSS Card Flip Hover Effect **Type:** Pure CSS **Description:** Four CSS 3D card flip hover effects — horizontal flip, vertical flip, diagonal corner-peel flip, and reverse accordion fan — using rotateY/rotateX on preserve-3d containers with backface-visibility to reveal a styled back face on hover. **HTML:** ```html
        Hover Me horizontal flip →
        Revealed! back face content
        Vertical ↓ flip over top
        Back Face rotateX flip
        Diagonal corner-peel axis
        Peeled! rotate3d(1,1,0)
        Fan
        hover the stack
        ``` **CSS:** ```css .hv-14,.hv-14 *,.hv-14 *::before,.hv-14 *::after{box-sizing:border-box;margin:0;padding:0} .hv-14 ::selection{background:#be123c;color:#fff} .hv-14{ --bg:#0a0008; --text:#ffe4e6; --dim:#6b7280; font-family:'Segoe UI',system-ui,sans-serif; background:var(--bg); min-height:100vh; display:flex;align-items:center;justify-content:center; padding:60px 24px; } .hv-14__grid{ display:grid;grid-template-columns:repeat(2,1fr);gap:40px; max-width:720px;width:100%; } /* scene wrapper */ .hv-14__scene{perspective:800px} .hv-14__scene--v{perspective:800px} /* card */ .hv-14__card{ position:relative;width:100%;height:220px; transform-style:preserve-3d; transition:transform .65s cubic-bezier(.4,0,.2,1); cursor:pointer; } .hv-14__face{ position:absolute;inset:0;border-radius:14px; backface-visibility:hidden;-webkit-backface-visibility:hidden; display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px; padding:24px; } .hv-14__icon{font-size:2rem} .hv-14__label{font-size:1rem;font-weight:700;color:var(--text)} .hv-14__sub{font-size:.75rem;color:var(--dim);letter-spacing:.05em} /* faces */ .hv-14__face--front{ background:rgba(190,18,60,.2);border:1px solid rgba(190,18,60,.4); color:var(--text); } .hv-14__back--rose{ background:#be123c;color:#fff; transform:rotateY(180deg); } .hv-14__front--teal{background:rgba(13,148,136,.2);border:1px solid rgba(13,148,136,.4)} .hv-14__back--indigo{ background:#4338ca;color:#fff; transform:rotateX(180deg); } .hv-14__front--amber{background:rgba(180,83,9,.2);border:1px solid rgba(180,83,9,.4)} .hv-14__back--orange{ background:#c2410c;color:#fff; transform:rotate3d(1,1,0,180deg); } /* flip triggers */ .hv-14__card--h:hover{transform:rotateY(180deg)} .hv-14__card--v:hover{transform:rotateX(180deg)} .hv-14__card--diag:hover{transform:rotate3d(1,1,0,180deg)} /* fan accordion */ .hv-14__fan-wrap{ position:relative;height:220px; display:flex;flex-direction:column;justify-content:flex-end;align-items:center; cursor:pointer; } .hv-14__fan-card{ position:absolute;width:100%;height:220px;border-radius:14px; border:1px solid rgba(255,255,255,.1); display:flex;align-items:center;justify-content:center; transform-origin:bottom center; transition:transform .4s cubic-bezier(.4,0,.2,1); } .hv-14__fan-card--1{background:rgba(139,92,246,.25);z-index:3} .hv-14__fan-card--2{background:rgba(109,40,217,.2);z-index:2} .hv-14__fan-card--3{background:rgba(91,33,182,.15);z-index:1} .hv-14__fan-label{font-size:1.1rem;font-weight:700;color:#c4b5fd} .hv-14__fan-hint{position:relative;z-index:4;font-size:11px;letter-spacing:.12em;text-transform:uppercase;color:var(--dim);margin-top:8px} .hv-14__fan-wrap:hover .hv-14__fan-card--2{transform:rotateY(-30deg)} .hv-14__fan-wrap:hover .hv-14__fan-card--3{transform:rotateY(-55deg)} @media(max-width:520px){.hv-14__grid{grid-template-columns:1fr}} @media(prefers-reduced-motion:reduce){ .hv-14__card,.hv-14__fan-card{transition:none!important} } ``` ### 15. CSS Glassmorphism Card Hover Effect **Type:** Pure CSS **Description:** Four glassmorphism card hover effects — frosted clarity increase, edge glow border, blur-depth stack, and reflective tinted glass — using backdrop-filter, border transparency transitions, and box-shadow layers to simulate frosted glass UI on hover. **HTML:** ```html

        Frosted Clarity

        Blur depth increases on hover, making the panel appear to thicken.

        Edge Glow

        Border lights up with accent color and a matching halo shadow.

        Depth Stack

        Layered glass panels separate on hover revealing depth.

        Reflection

        Specular highlight sweeps across the glass surface on hover.

        ``` **CSS:** ```css .hv-15,.hv-15 *,.hv-15 *::before,.hv-15 *::after{box-sizing:border-box;margin:0;padding:0} .hv-15 ::selection{background:#7c3aed;color:#fff} .hv-15{ --bg:#080514; --text:#e2d9f3; --dim:#9ca3af; --purple:#7c3aed; --pink:#ec4899; --cyan:#06b6d4; --white:rgba(255,255,255,.9); font-family:'Segoe UI',system-ui,sans-serif; background:var(--bg); min-height:100vh; display:flex;align-items:center;justify-content:center; padding:60px 24px; position:relative;overflow:hidden; } .hv-15__bg{position:absolute;inset:0;pointer-events:none} .hv-15__orb{position:absolute;border-radius:50%;filter:blur(80px);opacity:.45} .hv-15__orb--1{width:400px;height:400px;background:#7c3aed;top:-100px;left:-100px} .hv-15__orb--2{width:350px;height:350px;background:#ec4899;bottom:-80px;right:-60px} .hv-15__orb--3{width:280px;height:280px;background:#06b6d4;top:30%;left:40%} .hv-15__grid{ position:relative;z-index:1; display:grid;grid-template-columns:repeat(2,1fr);gap:28px; max-width:720px;width:100%; } /* shared card */ .hv-15__card{ padding:32px;border-radius:20px; background:rgba(255,255,255,.06); -webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px); border:1px solid rgba(255,255,255,.12); display:flex;flex-direction:column;gap:14px; cursor:pointer; transition:background .4s,border-color .4s,box-shadow .4s,transform .4s; } .hv-15__icon{font-size:1.8rem;color:var(--text)} .hv-15__title{font-size:1.05rem;font-weight:700;color:var(--text)} .hv-15__text{font-size:.85rem;color:var(--dim);line-height:1.5} /* 1 — clarity increase */ .hv-15__card--clarity:hover{ background:rgba(255,255,255,.14); -webkit-backdrop-filter:blur(24px);backdrop-filter:blur(24px); border-color:rgba(255,255,255,.25); transform:translateY(-4px); } /* 2 — edge glow */ .hv-15__card--glow{ --glow:rgba(124,58,237,0); box-shadow:0 0 0 0 var(--glow); } .hv-15__card--glow:hover{ border-color:rgba(124,58,237,.6); box-shadow:0 0 0 1px rgba(124,58,237,.3),0 0 24px rgba(124,58,237,.4),inset 0 0 24px rgba(124,58,237,.05); background:rgba(124,58,237,.08); } /* 3 — depth stack via box-shadow layers */ .hv-15__card--depth{ box-shadow:0 4px 20px rgba(0,0,0,.2); } .hv-15__card--depth:hover{ transform:translateY(-8px); box-shadow: 0 2px 8px rgba(0,0,0,.2), 0 16px 40px rgba(0,0,0,.4), 0 32px 60px rgba(0,0,0,.2); background:rgba(255,255,255,.1); border-color:rgba(255,255,255,.2); } /* 4 — reflective sweep */ .hv-15__card--reflect{position:relative;overflow:hidden} .hv-15__card--reflect::before{ content:'';position:absolute;top:-50%;left:-60%; width:40%;height:200%; background:linear-gradient(105deg,transparent,rgba(255,255,255,.12),transparent); transform:skewX(-20deg); transition:left .5s cubic-bezier(.4,0,.2,1); pointer-events:none; } .hv-15__card--reflect:hover::before{left:120%} .hv-15__card--reflect:hover{ background:rgba(255,255,255,.1); border-color:rgba(255,255,255,.2); } @media(max-width:520px){.hv-15__grid{grid-template-columns:1fr}} @media(prefers-reduced-motion:reduce){ .hv-15__card{transition:none!important} .hv-15__card--reflect::before{transition:none!important} } ``` ### 16. CSS Spotlight Card Hover Effect **Type:** Pure CSS **Description:** Four spotlight and lighting hover effects on cards — radial gradient center spotlight, corner-origin light sweep, edge scanline, and vignette-lift — using CSS radial-gradient pseudo-elements to simulate a focused light source illuminating the card face on hover. **HTML:** ```html

        Center Spot

        Radial gradient fades in from the center on hover.

        Corner Light

        Conic light sweep from the top-left corner lamp.

        Edge Scan

        Bright scan band sweeps top to bottom on hover.

        Vignette Lift

        Dark vignette fades out revealing the full card face.

        ``` **CSS:** ```css .hv-16,.hv-16 *,.hv-16 *::before,.hv-16 *::after{box-sizing:border-box;margin:0;padding:0} .hv-16 ::selection{background:#0f766e;color:#fff} .hv-16{ --bg:#020c0b; --text:#ccfbf1; --dim:#6b7280; --teal:#14b8a6; --green:#10b981; --cyan:#06b6d4; font-family:'Segoe UI',system-ui,sans-serif; background:var(--bg); min-height:100vh; display:flex;align-items:center;justify-content:center; padding:60px 24px; } .hv-16__grid{ display:grid;grid-template-columns:repeat(2,1fr);gap:32px; max-width:720px;width:100%; } /* shared card */ .hv-16__card{ position:relative;overflow:hidden; min-height:220px;border-radius:16px; background:rgba(255,255,255,.04); border:1px solid rgba(255,255,255,.1); cursor:pointer; transition:border-color .4s,transform .4s; } .hv-16__card:hover{ border-color:rgba(20,184,166,.3); transform:translateY(-4px); } .hv-16__card::before{ content:'';position:absolute;inset:0; pointer-events:none; transition:opacity .4s; } .hv-16__content{ position:relative;z-index:1; padding:32px;display:flex;flex-direction:column;gap:12px; } .hv-16__icon{font-size:1.8rem;color:var(--teal)} .hv-16__title{font-size:1.05rem;font-weight:700;color:var(--text)} .hv-16__text{font-size:.85rem;color:var(--dim);line-height:1.5} /* 1 — center spotlight */ .hv-16__card--center::before{ background:radial-gradient(circle at 50% 50%,rgba(20,184,166,.18) 0%,transparent 65%); opacity:0; } .hv-16__card--center:hover::before{opacity:1} /* 2 — corner sweep */ .hv-16__card--corner::before{ background:conic-gradient(from 225deg at 0% 0%,rgba(6,182,212,.25),transparent 40%); opacity:0; } .hv-16__card--corner:hover::before{opacity:1} /* 3 — scan band */ .hv-16__card--scan::before{ background:linear-gradient(180deg,transparent 0%,rgba(20,184,166,.15) 40%,rgba(20,184,166,.15) 60%,transparent 100%); opacity:0; transform:translateY(-100%); transition:opacity .3s,transform .5s cubic-bezier(.4,0,.2,1); } .hv-16__card--scan:hover::before{opacity:1;transform:translateY(60%)} /* 4 — vignette lift */ .hv-16__card--vignette::before{ background:radial-gradient(ellipse at center,transparent 40%,rgba(0,0,0,.7) 100%); opacity:1; transition:opacity .4s; } .hv-16__card--vignette:hover::before{opacity:0} @media(max-width:520px){.hv-16__grid{grid-template-columns:1fr}} @media(prefers-reduced-motion:reduce){ .hv-16__card,.hv-16__card::before{transition:none!important} } ``` ### 17. CSS Slide Reveal Card Hover Effect **Type:** Pure CSS **Description:** Five card hover effects that reveal hidden content through directional sliding panels — bottom-up overlay, left-push reveal, curtain wipe, inner-slide CTA, and overlay dissolve — all using CSS translate transforms and overflow hidden on nested containers. **HTML:** ```html

        Strategy Kit

        Modern approach to product design.

        Revealed!

        Bottom-up slide reveals hidden details on hover.

        Explore →

        Design System

        Components that scale.

        Left Push

        Content slides out, reveal slides in.

        Open →

        Brand Guide

        Visual language at scale.

        Curtain!

        Wipe reveals content beneath.

        View →

        Case Study

        Process and outcomes detailed.

        Dissolve

        Opacity fade with translateY settle.

        Read →
        ``` **CSS:** ```css .hv-17,.hv-17 *,.hv-17 *::before,.hv-17 *::after{box-sizing:border-box;margin:0;padding:0} .hv-17 ::selection{background:#b45309;color:#fff} .hv-17{ --bg:#0c0700; --text:#fef3c7; --dim:#78716c; --amber:#f59e0b; --orange:#f97316; --warm:#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 24px; } .hv-17__grid{ display:grid;grid-template-columns:repeat(2,1fr);gap:32px; max-width:720px;width:100%; } /* shared card */ .hv-17__card{ position:relative;overflow:hidden; min-height:220px;border-radius:16px; background:rgba(255,255,255,.03); border:1px solid rgba(255,255,255,.08); cursor:pointer; } .hv-17__base,.hv-17__overlay{ padding:28px; display:flex;flex-direction:column;gap:10px; } .hv-17__icon{font-size:1.8rem;color:var(--amber)} .hv-17__title{font-size:1rem;font-weight:700;color:var(--text)} .hv-17__text{font-size:.82rem;color:var(--dim);line-height:1.5} .hv-17__cta{font-size:.85rem;font-weight:600;color:var(--amber);margin-top:4px} /* 1 — bottom-up overlay */ .hv-17__overlay--up{ position:absolute;inset:0; background:var(--amber); transform:translateY(100%); transition:transform .4s cubic-bezier(.4,0,.2,1); } .hv-17__overlay--up .hv-17__title{color:#000} .hv-17__overlay--up .hv-17__text{color:rgba(0,0,0,.7)} .hv-17__overlay--up .hv-17__cta{color:#000} .hv-17__card--up:hover .hv-17__overlay--up{transform:translateY(0)} /* 2 — left push */ .hv-17__push-wrap{ position:absolute;inset:0; display:flex; transition:transform .4s cubic-bezier(.4,0,.2,1); } .hv-17__push-face,.hv-17__push-back{ flex:0 0 100%;padding:28px; display:flex;flex-direction:column;gap:10px; } .hv-17__push-back{ background:var(--orange); } .hv-17__push-back .hv-17__title{color:#fff} .hv-17__push-back .hv-17__text{color:rgba(255,255,255,.8)} .hv-17__push-back .hv-17__cta{color:#fff} .hv-17__card--push:hover .hv-17__push-wrap{transform:translateX(-50%)} /* 3 — curtain wipe */ .hv-17__curtain{ position:absolute;inset:0; background:var(--warm); transform:scaleX(0);transform-origin:left; transition:transform .4s cubic-bezier(.4,0,.2,1); z-index:1; } .hv-17__overlay--curtain{ position:absolute;inset:0; background:var(--warm); opacity:0; transition:opacity .2s .3s; z-index:2; } .hv-17__overlay--curtain .hv-17__title,.hv-17__overlay--curtain .hv-17__text,.hv-17__overlay--curtain .hv-17__cta{color:#000} .hv-17__card--curtain:hover .hv-17__curtain{transform:scaleX(1)} .hv-17__card--curtain:hover .hv-17__overlay--curtain{opacity:1} /* 4 — fade dissolve */ .hv-17__overlay--fade{ position:absolute;inset:0; background:rgba(15,12,5,.92); -webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px); opacity:0;transform:translateY(8px); transition:opacity .4s,transform .4s cubic-bezier(.4,0,.2,1); } .hv-17__card--fade:hover .hv-17__overlay--fade{opacity:1;transform:translateY(0)} @media(max-width:520px){.hv-17__grid{grid-template-columns:1fr}} @media(prefers-reduced-motion:reduce){ .hv-17__overlay,.hv-17__push-wrap,.hv-17__curtain{transition:none!important} } ``` ### 18. CSS Stack Lift Card Hover Effect **Type:** Pure CSS **Description:** Four stacked card hover effects — single card lift with shadow bloom, layered deck fan-out, cascading z-lift, and magnetic group hover — using translateY, box-shadow, and sibling selectors to create physical depth when hovering a stack of UI cards. **HTML:** ```html

        Lift Me

        Single card rise and shadow bloom.

        shadow bloom lift

        Fan Out

        sibling fan-out
        01
        02
        03
        cascade z-lift
        A
        B
        C
        group isolation
        ``` **CSS:** ```css .hv-18,.hv-18 *,.hv-18 *::before,.hv-18 *::after{box-sizing:border-box;margin:0;padding:0} .hv-18 ::selection{background:#0f766e;color:#fff} .hv-18{ --bg:#020c08; --text:#d1fae5; --dim:#6b7280; --green:#10b981; --teal:#14b8a6; --emerald:#059669; --sage:#6ee7b7; font-family:'Segoe UI',system-ui,sans-serif; background:var(--bg); min-height:100vh; display:flex;align-items:center;justify-content:center; padding:60px 24px; } .hv-18__demos{ display:grid;grid-template-columns:repeat(2,1fr);gap:40px; max-width:760px;width:100%; } .hv-18__demo{ display:flex;flex-direction:column;align-items:center;gap:20px; padding:40px 24px; background:rgba(255,255,255,.025); border:1px solid rgba(255,255,255,.07); border-radius:16px; } .hv-18__label{font-size:11px;letter-spacing:.12em;text-transform:uppercase;color:var(--dim)} /* shared card */ .hv-18__card{border-radius:12px;cursor:pointer} .hv-18__icon{font-size:1.6rem;color:var(--green)} .hv-18__title{font-size:.95rem;font-weight:700;color:var(--text)} .hv-18__text{font-size:.8rem;color:var(--dim);line-height:1.4} .hv-18__num{font-size:1.6rem;font-weight:900;color:var(--text)} /* 1 — single lift */ .hv-18__single{padding-bottom:24px} .hv-18__card--single{ padding:24px;width:200px; background:rgba(16,185,129,.12); border:1px solid rgba(16,185,129,.25); display:flex;flex-direction:column;gap:10px; box-shadow:0 4px 12px rgba(0,0,0,.3); transition:transform .35s cubic-bezier(.4,0,.2,1),box-shadow .35s; } .hv-18__card--single:hover{ transform:translateY(-14px); box-shadow:0 28px 56px rgba(0,0,0,.5),0 0 24px rgba(16,185,129,.2); } /* 2 — deck fan-out */ .hv-18__deck{position:relative;width:180px;height:160px} .hv-18__card--deck{ position:absolute;inset:0; display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px; border:1px solid rgba(255,255,255,.1); transition:transform .4s cubic-bezier(.4,0,.2,1); } .hv-18__card--d1{background:rgba(16,185,129,.2);z-index:3} .hv-18__card--d2{background:rgba(5,150,105,.15);z-index:2;transform:translateY(8px)} .hv-18__card--d3{background:rgba(4,120,87,.1);z-index:1;transform:translateY(16px)} .hv-18__deck:hover .hv-18__card--d1{transform:translateY(-12px)} .hv-18__deck:hover .hv-18__card--d2{transform:translateY(4px)} .hv-18__deck:hover .hv-18__card--d3{transform:translateY(20px)} /* 3 — cascade */ .hv-18__cascade{ display:flex;gap:10px;align-items:flex-end; } .hv-18__card--cas{ width:60px;height:100px; display:flex;align-items:center;justify-content:center; border:1px solid rgba(255,255,255,.1); transition:transform .35s cubic-bezier(.4,0,.2,1),box-shadow .35s; } .hv-18__card--c1{background:rgba(20,184,166,.2);height:80px} .hv-18__card--c2{background:rgba(16,185,129,.2);height:100px} .hv-18__card--c3{background:rgba(5,150,105,.2);height:120px} .hv-18__card--c1:hover{transform:translateY(-10px);box-shadow:0 12px 30px rgba(0,0,0,.4)} .hv-18__card--c2:hover{transform:translateY(-14px);box-shadow:0 16px 36px rgba(0,0,0,.4)} .hv-18__card--c3:hover{transform:translateY(-18px);box-shadow:0 20px 40px rgba(0,0,0,.4)} /* 4 — group hover isolation */ .hv-18__group{ display:flex;gap:10px; } .hv-18__card--grp{ width:56px;height:80px; display:flex;align-items:center;justify-content:center; font-size:1.1rem;font-weight:700;color:var(--text); border-radius:10px; background:rgba(16,185,129,.2); border:1px solid rgba(16,185,129,.3); transition:transform .3s,opacity .3s,box-shadow .3s; } .hv-18__group:hover .hv-18__card--grp{ opacity:.35;transform:scale(0.95); } .hv-18__group:hover .hv-18__card--grp:hover{ opacity:1;transform:translateY(-10px); box-shadow:0 16px 36px rgba(0,0,0,.4); } @media(max-width:520px){.hv-18__demos{grid-template-columns:1fr}} @media(prefers-reduced-motion:reduce){ .hv-18__card{transition:none!important} } ``` ### 19. CSS Zoom Pan Image Hover Effect **Type:** Pure CSS **Description:** Five image hover effects using CSS transforms on a contained image — center zoom, corner-pan zoom, slow drift ken-burns, zoom plus brightness, and clip-path crop zoom — demonstrating how scale, translate, and clip-path on overflow-hidden containers create cinematic image reveals. **HTML:** ```html
        center zoom
        corner-pan zoom
        slow ken-burns drift
        zoom + brightness
        clip-path crop zoom
        zoom + rotation
        ``` **CSS:** ```css .hv-19,.hv-19 *,.hv-19 *::before,.hv-19 *::after{box-sizing:border-box;margin:0;padding:0} .hv-19 ::selection{background:#1d4ed8;color:#fff} .hv-19{ --bg:#08080f; --dim:#6b7280; font-family:'Segoe UI',system-ui,sans-serif; background:var(--bg); min-height:100vh; display:flex;align-items:center;justify-content:center; padding:60px 24px; } .hv-19__grid{ display:grid;grid-template-columns:repeat(3,1fr);gap:24px; max-width:840px;width:100%; } .hv-19__cell{ display:flex;flex-direction:column;align-items:center;gap:12px; } .hv-19__label{font-size:11px;letter-spacing:.12em;text-transform:uppercase;color:var(--dim)} .hv-19__wrap{ width:100%;aspect-ratio:4/3; overflow:hidden;border-radius:12px;cursor:pointer; } .hv-19__img{ width:100%;height:100%; transition:transform .6s cubic-bezier(.4,0,.2,1),filter .6s,clip-path .6s; } /* layered pseudo-images: focal radial + grid pattern + diagonal lines + base color gives multiple visual anchors so zoom/pan/rotate are clearly perceptible */ .hv-19__swatch--blue{ background: radial-gradient(circle at 30% 40%,#fef3c7 0%,transparent 18%), radial-gradient(circle at 70% 70%,#fbbf24 0%,transparent 22%), repeating-linear-gradient(45deg,transparent 0 16px,rgba(255,255,255,.08) 16px 17px), repeating-linear-gradient(-45deg,transparent 0 24px,rgba(0,0,0,.12) 24px 25px), linear-gradient(135deg,#1e40af,#3b82f6,#93c5fd,#1e3a8a); } .hv-19__swatch--violet{ background: radial-gradient(circle at 25% 35%,#fce7f3 0%,transparent 16%), radial-gradient(circle at 65% 60%,#ec4899 0%,transparent 24%), repeating-linear-gradient(60deg,transparent 0 18px,rgba(255,255,255,.1) 18px 19px), repeating-linear-gradient(-30deg,transparent 0 28px,rgba(0,0,0,.15) 28px 29px), linear-gradient(135deg,#5b21b6,#7c3aed,#c4b5fd,#4c1d95); } .hv-19__swatch--amber{ background: radial-gradient(circle at 70% 30%,#fef9c3 0%,#fde047 8%,transparent 20%), radial-gradient(circle at 25% 75%,#dc2626 0%,transparent 18%), repeating-linear-gradient(90deg,transparent 0 22px,rgba(0,0,0,.12) 22px 23px), repeating-linear-gradient(0deg,transparent 0 22px,rgba(255,255,255,.08) 22px 23px), linear-gradient(135deg,#92400e,#f59e0b,#fde68a,#78350f); } .hv-19__swatch--emerald{ background: radial-gradient(circle at 40% 30%,#fef9c3 0%,transparent 14%), radial-gradient(circle at 75% 65%,#a7f3d0 0%,transparent 28%), repeating-linear-gradient(30deg,transparent 0 20px,rgba(255,255,255,.1) 20px 21px), repeating-linear-gradient(-60deg,transparent 0 30px,rgba(0,0,0,.14) 30px 31px), linear-gradient(135deg,#065f46,#10b981,#a7f3d0,#064e3b); } .hv-19__swatch--rose{ background: radial-gradient(circle at 30% 30%,#fef3c7 0%,#fbbf24 10%,transparent 22%), radial-gradient(circle at 70% 70%,#7c1d6f 0%,transparent 20%), repeating-linear-gradient(75deg,transparent 0 18px,rgba(255,255,255,.1) 18px 19px), repeating-linear-gradient(-15deg,transparent 0 26px,rgba(0,0,0,.12) 26px 27px), linear-gradient(135deg,#9f1239,#f43f5e,#fda4af,#881337); } .hv-19__swatch--teal{ background: radial-gradient(circle at 35% 35%,#fef3c7 0%,transparent 15%), radial-gradient(circle at 70% 70%,#0c4a6e 0%,transparent 25%), repeating-linear-gradient(45deg,transparent 0 20px,rgba(255,255,255,.1) 20px 21px), repeating-linear-gradient(-45deg,transparent 0 30px,rgba(0,0,0,.14) 30px 31px), linear-gradient(135deg,#0f766e,#14b8a6,#99f6e4,#0d9488); } /* 1 — center zoom */ .hv-19__img--center:hover{transform:scale(1.12)} /* 2 — corner-pan */ .hv-19__img--pan:hover{transform:scale(1.18) translate(-5%,-5%)} /* 3 — slow drift */ .hv-19__img--drift{ transition:transform 1.2s cubic-bezier(.4,0,.2,1); } .hv-19__img--drift:hover{transform:scale(1.1) translate(3%,2%)} /* 4 — zoom + brightness */ .hv-19__img--bright:hover{ transform:scale(1.1); filter:brightness(1.25) saturate(1.2); } /* 5 — clip-path crop zoom */ .hv-19__wrap--crop{ overflow:visible; } .hv-19__img--crop{ clip-path:inset(8% round 12px); transition:transform .6s cubic-bezier(.4,0,.2,1),clip-path .6s cubic-bezier(.4,0,.2,1); } .hv-19__img--crop:hover{ transform:scale(1.08); clip-path:inset(0% round 12px); } /* 6 — zoom + rotate */ .hv-19__img--rotate:hover{ transform:scale(1.15) rotate(3deg); } @media(max-width:640px){.hv-19__grid{grid-template-columns:repeat(2,1fr)}} @media(max-width:400px){.hv-19__grid{grid-template-columns:1fr}} @media(prefers-reduced-motion:reduce){ .hv-19__img{transition:none!important} } ``` ### 20. CSS Color Channel Split Hover Effect **Type:** Pure CSS **Description:** Four color channel separation effects on image containers — RGB duotone split, chromatic aberration text, green-screen channel extract, and full-color separation with mix-blend-mode — using CSS filter, mix-blend-mode, and pseudo-element tinting to deconstruct color into channels on hover. **HTML:** ```html
        SIGNAL
        RGB channel split
        CHROMATIC
        text shadow aberration
        DUOTONE
        color grade shift
        COMPOSITE
        screen blend channels
        ``` **CSS:** ```css .hv-20,.hv-20 *,.hv-20 *::before,.hv-20 *::after{box-sizing:border-box;margin:0;padding:0} .hv-20 ::selection{background:#dc2626;color:#fff} .hv-20{ --bg:#050505; --dim:#4b5563; --red:#ff0040; --green:#00ff88; --blue:#0040ff; font-family:'Segoe UI',system-ui,sans-serif; background:var(--bg); min-height:100vh; display:flex;align-items:center;justify-content:center; padding:60px 24px; } .hv-20__grid{ display:grid;grid-template-columns:repeat(2,1fr);gap:40px; max-width:720px;width:100%; } .hv-20__cell{ display:flex;flex-direction:column;align-items:center;gap:20px; } .hv-20__label{font-size:11px;letter-spacing:.12em;text-transform:uppercase;color:var(--dim)} .hv-20__box{ width:100%;aspect-ratio:4/3;border-radius:12px; position:relative;overflow:hidden;cursor:pointer; background:linear-gradient(135deg,#1a1a2e,#16213e,#0f3460,#533483); display:flex;align-items:center;justify-content:center; } .hv-20__box-label{ position:relative;z-index:2; font-size:1.2rem;font-weight:900;letter-spacing:.15em; color:#fff; } /* 1 — RGB channel split via text-shadow ghosts on the label */ .hv-20__box--rgb{ background: radial-gradient(circle at 30% 30%,#1e3a8a 0%,transparent 50%), radial-gradient(circle at 70% 70%,#4c1d95 0%,transparent 50%), linear-gradient(135deg,#0a0a1a,#1a0a2e); } .hv-20__box--rgb .hv-20__box-label{ transition:text-shadow .45s cubic-bezier(.4,0,.2,1),letter-spacing .45s; text-shadow:0 0 0 transparent; } .hv-20__box--rgb:hover .hv-20__box-label{ letter-spacing:.22em; text-shadow: -6px 0 0 var(--red), 6px 0 0 var(--blue), 0 4px 0 var(--green); } /* 2 — chromatic text shadow (now in a card to match siblings) */ .hv-20__box--chroma{ background:radial-gradient(circle at 50% 50%,#1a1a2e 0%,#050505 100%); cursor:default; } .hv-20__chroma{ font-size:clamp(1.4rem,4vw,1.8rem);font-weight:900;letter-spacing:.12em; color:#fff;position:relative;display:inline-block;z-index:2; transition:text-shadow .4s cubic-bezier(.4,0,.2,1),letter-spacing .4s; } .hv-20__box--chroma:hover .hv-20__chroma{ letter-spacing:.18em; text-shadow: 5px 0 0 var(--red), -5px 0 0 var(--blue), 0 4px 0 rgba(0,255,136,.6); } /* 3 — duotone grade (bright varied base so hue-rotate is visible) */ .hv-20__box--duo{ background: radial-gradient(circle at 25% 30%,#fbbf24 0%,transparent 35%), radial-gradient(circle at 75% 70%,#dc2626 0%,transparent 40%), linear-gradient(135deg,#7c3aed,#ec4899,#f59e0b); transition:filter .5s cubic-bezier(.4,0,.2,1); } .hv-20__box--duo:hover{ filter:hue-rotate(180deg) saturate(1.6); } .hv-20__box--duo .hv-20__box-label{ text-shadow:0 2px 8px rgba(0,0,0,.8); } /* 4 — screen composite */ .hv-20__screen-r,.hv-20__screen-b{ position:absolute;inset:0; border-radius:50%;width:60%;height:60%; opacity:0; transition:opacity .4s,transform .5s cubic-bezier(.4,0,.2,1); z-index:1; } .hv-20__screen-r{ background:var(--red);mix-blend-mode:screen; top:10%;left:10%; } .hv-20__screen-b{ background:var(--blue);mix-blend-mode:screen; top:10%;right:10%;left:auto; } .hv-20__box--screen:hover .hv-20__screen-r{opacity:.7;transform:translateX(-10px)} .hv-20__box--screen:hover .hv-20__screen-b{opacity:.7;transform:translateX(10px)} @media(max-width:520px){.hv-20__grid{grid-template-columns:1fr}} @media(prefers-reduced-motion:reduce){ .hv-20__layer,.hv-20__screen-r,.hv-20__screen-b,.hv-20__box{transition:none!important} .hv-20__chroma{transition:none!important} } ``` ### 21. CSS Duotone Image Hover Effect **Type:** Pure CSS **Description:** Four duotone image hover transitions — grayscale to full color restore, monochrome to brand duotone, hue rotation shift, and saturation fade-in — using CSS filter chains and pseudo-element blending to apply and remove two-tone color grades on hover. **HTML:** ```html
        grayscale → color restore
        duotone → natural
        hue-rotate grade
        desaturate fade-in
        ``` **CSS:** ```css .hv-21,.hv-21 *,.hv-21 *::before,.hv-21 *::after{box-sizing:border-box;margin:0;padding:0} .hv-21 ::selection{background:#9333ea;color:#fff} .hv-21{ --bg:#080608; --dim:#6b7280; font-family:'Segoe UI',system-ui,sans-serif; background:var(--bg); min-height:100vh; display:flex;align-items:center;justify-content:center; padding:60px 24px; } .hv-21__grid{ display:grid;grid-template-columns:repeat(2,1fr);gap:32px; max-width:720px;width:100%; } .hv-21__cell{display:flex;flex-direction:column;gap:12px} .hv-21__label{font-size:11px;letter-spacing:.12em;text-transform:uppercase;color:var(--dim)} .hv-21__wrap{ aspect-ratio:16/9;border-radius:12px; overflow:hidden;cursor:pointer;position:relative; isolation:isolate; } .hv-21__img{width:100%;height:100%} /* layered pseudo-images so duotone/grayscale/hue-rotate are visually meaningful */ .hv-21__swatch--a{ background: radial-gradient(circle at 28% 32%,#fef9c3 0%,transparent 14%), radial-gradient(circle at 70% 65%,#dc2626 0%,transparent 22%), repeating-linear-gradient(45deg,transparent 0 16px,rgba(255,255,255,.08) 16px 17px), repeating-linear-gradient(-45deg,transparent 0 24px,rgba(0,0,0,.14) 24px 25px), linear-gradient(135deg,#1e3a5f,#2563eb,#7dd3fc,#1e40af); } .hv-21__swatch--b{ background: radial-gradient(circle at 32% 30%,#fde047 0%,transparent 16%), radial-gradient(circle at 68% 68%,#10b981 0%,transparent 22%), repeating-linear-gradient(30deg,transparent 0 18px,rgba(255,255,255,.1) 18px 19px), repeating-linear-gradient(-60deg,transparent 0 28px,rgba(0,0,0,.14) 28px 29px), linear-gradient(135deg,#4a1942,#7c3aed,#ddd6fe,#6d28d9); } .hv-21__swatch--c{ background: radial-gradient(circle at 25% 30%,#fef3c7 0%,transparent 15%), radial-gradient(circle at 72% 70%,#dc2626 0%,transparent 22%), repeating-linear-gradient(60deg,transparent 0 20px,rgba(255,255,255,.1) 20px 21px), repeating-linear-gradient(-30deg,transparent 0 30px,rgba(0,0,0,.14) 30px 31px), linear-gradient(135deg,#14532d,#16a34a,#bbf7d0,#15803d); } .hv-21__swatch--d{ background: radial-gradient(circle at 30% 35%,#fef9c3 0%,transparent 14%), radial-gradient(circle at 70% 68%,#1e40af 0%,transparent 22%), repeating-linear-gradient(75deg,transparent 0 18px,rgba(255,255,255,.1) 18px 19px), repeating-linear-gradient(-15deg,transparent 0 28px,rgba(0,0,0,.14) 28px 29px), linear-gradient(135deg,#7c2d12,#ea580c,#fdba74,#c2410c); } /* 1 — grayscale restore */ .hv-21__wrap--restore .hv-21__img{ filter:grayscale(1) contrast(1.1); transition:filter .5s cubic-bezier(.4,0,.2,1); } .hv-21__wrap--restore:hover .hv-21__img{filter:none} /* 2 — duotone overlay fade */ .hv-21__duo-overlay{ position:absolute;inset:0; background:linear-gradient(135deg,#1e003c,#ff6b00); mix-blend-mode:color; opacity:1; transition:opacity .5s cubic-bezier(.4,0,.2,1); } .hv-21__wrap--duo .hv-21__img{filter:contrast(1.1)} .hv-21__wrap--duo:hover .hv-21__duo-overlay{opacity:0} /* 3 — hue rotate */ .hv-21__wrap--hue .hv-21__img{ filter:hue-rotate(0deg) saturate(1); transition:filter .6s cubic-bezier(.4,0,.2,1); } .hv-21__wrap--hue:hover .hv-21__img{ filter:hue-rotate(160deg) saturate(1.5); } /* 4 — desaturate reveal */ .hv-21__wrap--sat .hv-21__img{ filter:grayscale(1); transition:filter .5s cubic-bezier(.4,0,.2,1); } .hv-21__wrap--sat:hover .hv-21__img{ filter:grayscale(0) saturate(1.2); } @media(max-width:520px){.hv-21__grid{grid-template-columns:1fr}} @media(prefers-reduced-motion:reduce){ .hv-21__img,.hv-21__duo-overlay{transition:none!important} } ``` ### 22. CSS Curtain Reveal Image Hover Effect **Type:** Pure CSS **Description:** Five theatrical curtain-style hover reveals — split curtain open, top-to-bottom drop, blind slats slide, venetian blind open, and radial iris expand — all using clip-path polygon and inset transitions to theatrically reveal hidden image content on hover. **HTML:** ```html
        OPEN
        split curtain
        DROP
        curtain drop
        IRIS
        iris expand
        BLIND
        venetian blind
        ``` **CSS:** ```css .hv-22,.hv-22 *,.hv-22 *::before,.hv-22 *::after{box-sizing:border-box;margin:0;padding:0} .hv-22 ::selection{background:#be185d;color:#fff} .hv-22{ --bg:#08040c; --dim:#6b7280; font-family:'Segoe UI',system-ui,sans-serif; background:var(--bg); min-height:100vh; display:flex;align-items:center;justify-content:center; padding:60px 24px; } .hv-22__grid{ display:grid;grid-template-columns:repeat(2,1fr);gap:32px; max-width:720px;width:100%; } .hv-22__cell{display:flex;flex-direction:column;gap:12px} .hv-22__label{font-size:11px;letter-spacing:.12em;text-transform:uppercase;color:var(--dim)} .hv-22__wrap{ aspect-ratio:16/9;border-radius:12px;overflow:hidden; position:relative;cursor:pointer; } .hv-22__reveal{ width:100%;height:100%; display:flex;align-items:center;justify-content:center; } .hv-22__tag{font-size:1.4rem;font-weight:900;letter-spacing:.15em;color:#fff;opacity:.8} /* swatches */ .hv-22__swatch--a{background:linear-gradient(135deg,#0f172a,#1e40af,#3b82f6)} .hv-22__swatch--b{background:linear-gradient(135deg,#0f172a,#7c3aed,#c084fc)} .hv-22__swatch--c{background:linear-gradient(135deg,#0f172a,#0f766e,#2dd4bf)} .hv-22__swatch--d{background:linear-gradient(135deg,#0f172a,#be185d,#f9a8d4)} /* 1 — split curtain */ .hv-22__wrap--split::before, .hv-22__wrap--split::after{ content:'';position:absolute;top:0;width:50%;height:100%; background:#1a0a2e;z-index:2; transition:transform .5s cubic-bezier(.4,0,.2,1); } .hv-22__wrap--split::before{left:0} .hv-22__wrap--split::after{right:0} .hv-22__wrap--split:hover::before{transform:translateX(-100%)} .hv-22__wrap--split:hover::after{transform:translateX(100%)} /* 2 — curtain drop */ .hv-22__curtain-drop{ position:absolute;inset:0;z-index:2; background:#1a002a; transform:scaleY(1);transform-origin:top; transition:transform .5s cubic-bezier(.4,0,.2,1); } .hv-22__wrap--drop:hover .hv-22__curtain-drop{transform:scaleY(0)} /* 3 — iris expand */ .hv-22__iris-mask{ position:absolute;inset:0;z-index:2; background:#0a001a; clip-path:polygon(0 0,100% 0,100% 100%,0 100%,0 0,50% 50%); transition:clip-path .5s cubic-bezier(.4,0,.2,1); } .hv-22__wrap--iris .hv-22__iris-mask{ clip-path:circle(75% at 50% 50%); background:transparent; border:none; } /* re-approach: solid overlay with clip-path shrinking to reveal */ .hv-22__wrap--iris::before{ content:'';position:absolute;inset:0;z-index:2; background:#0a001a; clip-path:polygon( 0 0,50% 0,50% 0,50% 0,50% 100%,50% 100%,50% 100%,0 100%, 0 0,100% 0,100% 50%,100% 50%,100% 50%,100% 100%,50% 100% ); transition:clip-path .5s cubic-bezier(.4,0,.2,1),opacity .5s; opacity:1; } .hv-22__iris-mask{display:none} .hv-22__wrap--iris::after{ content:'';position:absolute;inset:0;z-index:1; } /* simpler iris via circle clip-path on a dark overlay */ .hv-22__wrap--iris::before{ clip-path:circle(76% at 50% 50%); background:transparent; box-shadow:0 0 0 200px #0a001a; border-radius:50%; top:50%;left:50%; width:0;height:0; transform:translate(-50%,-50%); clip-path:none; transition:box-shadow .5s cubic-bezier(.4,0,.2,1); } .hv-22__wrap--iris:hover::before{ box-shadow:0 0 0 0 #0a001a; } /* 4 — venetian blind slats */ .hv-22__slat{ position:absolute;left:0;width:100%;height:20%; background:#1a0014;z-index:2; transform:scaleY(1);transform-origin:top; transition:transform .3s cubic-bezier(.4,0,.2,1); } .hv-22__slat--1{top:0%;transition-delay:0s} .hv-22__slat--2{top:20%;transition-delay:.05s} .hv-22__slat--3{top:40%;transition-delay:.1s} .hv-22__slat--4{top:60%;transition-delay:.15s} .hv-22__slat--5{top:80%;transition-delay:.2s} .hv-22__wrap--slat:hover .hv-22__slat{transform:scaleY(0)} @media(max-width:520px){.hv-22__grid{grid-template-columns:1fr}} @media(prefers-reduced-motion:reduce){ .hv-22__wrap::before,.hv-22__wrap::after,.hv-22__curtain-drop,.hv-22__slat{transition:none!important} } ``` ### 23. CSS Ken Burns Image Hover Effect **Type:** Pure CSS **Description:** Documentary-style slow zoom and pan animations on images, triggered by hover — six directional Ken Burns presets. **HTML:** ```html

        Ken Burns Hover — 6 Presets

        zoom-in Zoom In
        zoom-out Zoom Out
        pan right Pan Right
        pan left Pan Left
        drift up Drift Up
        diagonal Diagonal
        ``` **CSS:** ```css .hv-23, .hv-23 *, .hv-23 *::before, .hv-23 *::after { box-sizing: border-box; margin: 0; padding: 0; } .hv-23 { --kb-duration: 6s; --kb-ease: cubic-bezier(.25,.46,.45,.94); font-family: system-ui, sans-serif; padding: 2rem; background: #0d0d0d; min-height: 100vh; } .hv-23__label { text-align: center; color: #888; font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 2rem; } .hv-23__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; max-width: 820px; margin: 0 auto; } .hv-23__card { position: relative; overflow: hidden; border-radius: 10px; cursor: pointer; aspect-ratio: 3/2; box-shadow: 0 4px 20px rgba(0,0,0,.5); } .hv-23__img { width: 100%; height: 100%; object-fit: cover; display: block; animation-duration: var(--kb-duration); animation-timing-function: var(--kb-ease); animation-fill-mode: both; animation-play-state: paused; will-change: transform; } .hv-23__card:hover .hv-23__img { animation-play-state: running; } .hv-23__tag { position: absolute; bottom: .6rem; left: .6rem; background: rgba(0,0,0,.65); color: #fff; font-size: .7rem; letter-spacing: .08em; padding: .25rem .55rem; border-radius: 4px; backdrop-filter: blur(4px); pointer-events: none; } /* ── Keyframes ── */ @keyframes hv-23-zoom-in { from { transform: scale(1) translate(0, 0); } to { transform: scale(1.18) translate(-2%, -2%); } } @keyframes hv-23-zoom-out { from { transform: scale(1.2) translate(-3%, -3%); } to { transform: scale(1) translate(0, 0); } } @keyframes hv-23-pan-right { from { transform: scale(1.14) translate(-5%, 0); } to { transform: scale(1.14) translate(5%, 0); } } @keyframes hv-23-pan-left { from { transform: scale(1.14) translate(5%, 0); } to { transform: scale(1.14) translate(-5%, 0); } } @keyframes hv-23-drift-up { from { transform: scale(1.14) translate(0, 5%); } to { transform: scale(1.14) translate(0, -5%); } } @keyframes hv-23-diagonal { from { transform: scale(1) translate(0, 0); } to { transform: scale(1.2) translate(-4%, -4%); } } /* ── Per-card assignments ── */ .hv-23__card--zoom-in .hv-23__img { animation-name: hv-23-zoom-in; } .hv-23__card--zoom-out .hv-23__img { animation-name: hv-23-zoom-out; } .hv-23__card--pan-right .hv-23__img { animation-name: hv-23-pan-right; } .hv-23__card--pan-left .hv-23__img { animation-name: hv-23-pan-left; } .hv-23__card--drift-up .hv-23__img { animation-name: hv-23-drift-up; } .hv-23__card--drift-diagonal .hv-23__img { animation-name: hv-23-diagonal; } @media (max-width: 600px) { .hv-23__grid { grid-template-columns: 1fr 1fr; } } @media (prefers-reduced-motion: reduce) { .hv-23__img { animation: none !important; } } ``` ### 24. CSS Image Tilt Depth Hover Effect **Type:** Pure CSS **Description:** Cards that tilt in 3-D perspective with floating depth layers and dynamic drop-shadows, entirely in CSS. **HTML:** ```html

        Image Tilt Depth — 4 Variants

        Portrait Tilt
        Landscape Tilt
        Deep Perspective
        Flat Hover Lift
        ``` **CSS:** ```css .hv-24, .hv-24 *, .hv-24 *::before, .hv-24 *::after { box-sizing: border-box; margin: 0; padding: 0; } .hv-24 { font-family: system-ui, sans-serif; background: #0e0e12; padding: 2.5rem 2rem; min-height: 100vh; } .hv-24__label { text-align: center; color: #666; font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 2.5rem; } .hv-24__grid { display: grid; grid-template-columns: repeat(2, auto); gap: 2.5rem; justify-content: center; align-items: start; } /* ── Card shell — holds perspective ── */ .hv-24__card { perspective: 700px; cursor: pointer; } /* ── Inner — rotates in 3-D ── */ .hv-24__inner { position: relative; border-radius: 12px; transform-style: preserve-3d; transition: transform .45s cubic-bezier(.23,1,.32,1), box-shadow .45s cubic-bezier(.23,1,.32,1); box-shadow: 0 8px 30px rgba(0,0,0,.55); overflow: hidden; /* clip image but we accept safari caveat */ } .hv-24__card--portrait .hv-24__inner { width: 220px; aspect-ratio: 3/4; } .hv-24__card--landscape .hv-24__inner { width: 320px; aspect-ratio: 16/9; } .hv-24__card--deep .hv-24__inner { width: 220px; aspect-ratio: 3/4; } .hv-24__card--flat .hv-24__inner { width: 320px; aspect-ratio: 16/9; } /* per-variant tilt angles */ .hv-24__card--portrait:hover .hv-24__inner { transform: rotateY(12deg) rotateX(-6deg); box-shadow: -14px 18px 50px rgba(0,0,0,.7); } .hv-24__card--landscape:hover .hv-24__inner { transform: rotateX(10deg) rotateY(-5deg); box-shadow: 0 -14px 40px rgba(0,0,0,.6); } .hv-24__card--deep:hover .hv-24__inner { transform: rotateY(-16deg) rotateX(8deg); box-shadow: 20px 14px 60px rgba(0,0,0,.8); } .hv-24__card--flat:hover .hv-24__inner { transform: rotateX(5deg) rotateY(5deg) translateZ(12px); box-shadow: -8px 20px 50px rgba(0,0,0,.65); } .hv-24__img { width: 100%; height: 100%; object-fit: cover; display: block; } /* ── Specular shine overlay ── */ .hv-24__shine { position: absolute; inset: 0; background: conic-gradient(from 135deg at 50% 0%, rgba(255,255,255,.18) 0deg, transparent 80deg); opacity: 0; transition: opacity .4s; pointer-events: none; border-radius: inherit; } .hv-24__card:hover .hv-24__shine { opacity: 1; } /* ── Caption ── */ .hv-24__caption { position: absolute; bottom: 0; left: 0; right: 0; padding: .65rem .9rem; background: linear-gradient(transparent, rgba(0,0,0,.75)); color: #fff; font-size: .78rem; letter-spacing: .06em; transform: translateY(4px); opacity: 0; transition: opacity .35s, transform .35s; pointer-events: none; } .hv-24__card:hover .hv-24__caption { opacity: 1; transform: translateY(0); } @media (max-width: 560px) { .hv-24__grid { grid-template-columns: 1fr; } .hv-24__card--portrait .hv-24__inner, .hv-24__card--deep .hv-24__inner { width: 100%; } .hv-24__card--landscape .hv-24__inner, .hv-24__card--flat .hv-24__inner { width: 100%; } } @media (prefers-reduced-motion: reduce) { .hv-24__inner { transition: none !important; } .hv-24__shine, .hv-24__caption { transition: none !important; } } ``` ### 25. CSS Underline Slide Nav Hover Effect **Type:** Pure CSS **Description:** Navigation links where a sliding underline bar glides between items — six distinct sliding and morphing underline styles. **HTML:** ```html

        Underline Slide Nav — 6 Styles

        ``` **CSS:** ```css .hv-25, .hv-25 *, .hv-25 *::before, .hv-25 *::after { box-sizing: border-box; margin: 0; padding: 0; } .hv-25 { --ul-color: #7c6af7; --ul-h: 2px; font-family: system-ui, sans-serif; background: #0b0b0f; padding: 3rem 2rem; min-height: 100vh; display: flex; flex-direction: column; gap: 2.8rem; } .hv-25__label { text-align: center; color: #555; font-size: .72rem; letter-spacing: .15em; text-transform: uppercase; } .hv-25__nav { display: flex; align-items: center; gap: 2rem; flex-wrap: wrap; position: relative; } .hv-25__sub { margin-left: auto; color: #444; font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; } .hv-25__link { color: #ccc; text-decoration: none; font-size: .95rem; font-weight: 500; position: relative; padding-bottom: 4px; transition: color .25s; } .hv-25__link:hover { color: #fff; } /* ── 1. Grow from Left ── */ .hv-25__nav--grow-left .hv-25__link::after { content: ''; position: absolute; bottom: 0; left: 0; width: 100%; height: var(--ul-h); background: var(--ul-color); transform: scaleX(0); transform-origin: left; transition: transform .3s cubic-bezier(.4,0,.2,1); } .hv-25__nav--grow-left .hv-25__link:hover::after { transform: scaleX(1); } /* ── 2. Expand from Centre ── */ .hv-25__nav--center .hv-25__link::after { content: ''; position: absolute; bottom: 0; left: 50%; width: 100%; height: var(--ul-h); background: var(--ul-color); transform: scaleX(0) translateX(-50%); transform-origin: center; transition: transform .3s cubic-bezier(.4,0,.2,1); } .hv-25__nav--center .hv-25__link:hover::after { transform: scaleX(1) translateX(-50%); } /* ── 3. Overline ── */ .hv-25__nav--overline .hv-25__link { padding-bottom: 0; padding-top: 4px; } .hv-25__nav--overline .hv-25__link::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: var(--ul-h); background: var(--ul-color); transform: scaleX(0); transform-origin: right; transition: transform .3s cubic-bezier(.4,0,.2,1); } .hv-25__nav--overline .hv-25__link:hover::before { transform: scaleX(1); transform-origin: left; } /* ── 4. Double Line ── */ .hv-25__nav--double .hv-25__link::before, .hv-25__nav--double .hv-25__link::after { content: ''; position: absolute; left: 0; width: 100%; height: var(--ul-h); background: var(--ul-color); transform: scaleX(0); transition: transform .35s cubic-bezier(.4,0,.2,1); } .hv-25__nav--double .hv-25__link::before { top: 0; transform-origin: right; } .hv-25__nav--double .hv-25__link::after { bottom: 0; transform-origin: left; } .hv-25__nav--double .hv-25__link:hover::before, .hv-25__nav--double .hv-25__link:hover::after { transform: scaleX(1); } /* ── 5. Thick Fill Highlight ── */ .hv-25__nav--thick .hv-25__link::after { content: ''; position: absolute; bottom: -2px; left: -6px; width: calc(100% + 12px); height: 34px; background: var(--ul-color); border-radius: 4px; transform: scaleY(0); transform-origin: bottom; transition: transform .28s cubic-bezier(.34,1.56,.64,1); z-index: -1; } .hv-25__nav--thick .hv-25__link:hover::after { transform: scaleY(1); } .hv-25__nav--thick .hv-25__link { z-index: 0; } /* ── 6. Dot Indicator ── */ .hv-25__nav--dot .hv-25__link { padding-bottom: 8px; } .hv-25__nav--dot .hv-25__link::after { content: ''; position: absolute; bottom: 0; left: 50%; width: 5px; height: 5px; border-radius: 50%; background: var(--ul-color); transform: translateX(-50%) scale(0); transition: transform .25s cubic-bezier(.34,1.56,.64,1); } .hv-25__nav--dot .hv-25__link:hover::after { transform: translateX(-50%) scale(1); } @media (prefers-reduced-motion: reduce) { .hv-25__link::before, .hv-25__link::after { transition: none !important; } } ``` ### 26. CSS Highlight Fill Nav Hover Effect **Type:** Pure CSS **Description:** Navigation links with pill, block, and gradient background fill highlights that animate in on hover — six distinct fill styles. **HTML:** ```html

        Highlight Fill Nav — 6 Styles

        ``` **CSS:** ```css .hv-26, .hv-26 *, .hv-26 *::before, .hv-26 *::after { box-sizing: border-box; margin: 0; padding: 0; } .hv-26 { --hl-bg: #5b4fcf; --hl-radius: 6px; font-family: system-ui, sans-serif; background: #0a0a10; padding: 3rem 2rem; min-height: 100vh; display: flex; flex-direction: column; gap: 2.6rem; } .hv-26__label { text-align: center; color: #444; font-size: .72rem; letter-spacing: .15em; text-transform: uppercase; } .hv-26__nav { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; } .hv-26__sub { margin-left: auto; color: #3a3a4a; font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; } .hv-26__link { color: #bbb; text-decoration: none; font-size: .95rem; font-weight: 500; position: relative; padding: .3rem .75rem; z-index: 0; transition: color .25s; } .hv-26__link::before { content: ''; position: absolute; inset: 0; z-index: -1; border-radius: var(--hl-radius); transition: transform .3s cubic-bezier(.4,0,.2,1), opacity .3s; } /* ── 1. Pill Fill ── */ .hv-26__nav--pill .hv-26__link { --hl-radius: 99px; } .hv-26__nav--pill .hv-26__link::before { background: var(--hl-bg); transform: scaleX(.1) scaleY(.4); opacity: 0; } .hv-26__nav--pill .hv-26__link:hover { color: #fff; } .hv-26__nav--pill .hv-26__link:hover::before { transform: scaleX(1) scaleY(1); opacity: 1; } /* ── 2. Block Fill (slide up) ── */ .hv-26__nav--block .hv-26__link::before { background: var(--hl-bg); transform: scaleY(0); transform-origin: bottom; border-radius: 4px; } .hv-26__nav--block .hv-26__link:hover { color: #fff; } .hv-26__nav--block .hv-26__link:hover::before { transform: scaleY(1); } /* ── 3. Gradient Fill ── */ .hv-26__nav--gradient .hv-26__link::before { background: linear-gradient(135deg, #7c6af7, #f764a8); transform: scaleX(0); transform-origin: left; border-radius: 6px; opacity: .9; } .hv-26__nav--gradient .hv-26__link:hover { color: #fff; } .hv-26__nav--gradient .hv-26__link:hover::before { transform: scaleX(1); } /* ── 4. Slash Clip ── */ .hv-26__nav--slash .hv-26__link::before { background: #e8c840; clip-path: polygon(8% 0%, 100% 0%, 92% 100%, 0% 100%); transform: scaleX(0); transform-origin: left; border-radius: 0; } .hv-26__nav--slash .hv-26__link:hover { color: #111; } .hv-26__nav--slash .hv-26__link:hover::before { transform: scaleX(1); } /* ── 5. Radial Spotlight ── */ .hv-26__nav--spotlight .hv-26__link::before { background: radial-gradient(ellipse at center, rgba(124,106,247,.7) 0%, transparent 72%); transform: scale(0); border-radius: 0; opacity: 0; } .hv-26__nav--spotlight .hv-26__link:hover { color: #fff; } .hv-26__nav--spotlight .hv-26__link:hover::before { transform: scale(2); opacity: 1; } /* ── 6. Invert Blend ── */ .hv-26__nav--invert { isolation: isolate; } .hv-26__nav--invert .hv-26__link { color: #fff; mix-blend-mode: difference; } .hv-26__nav--invert .hv-26__link::before { background: #fff; transform: scaleX(0); transform-origin: left; border-radius: 4px; mix-blend-mode: normal; } .hv-26__nav--invert .hv-26__link:hover::before { transform: scaleX(1); } @media (prefers-reduced-motion: reduce) { .hv-26__link::before { transition: none !important; } } ``` ### 27. CSS Strikethrough Hover Link Effect **Type:** Pure CSS **Description:** Links that animate a strikethrough line across the text on hover — six creative strikethrough styles including wavy, dotted, and multi-pass. **HTML:** ```html ``` **CSS:** ```css .hv-27, .hv-27 *, .hv-27 *::before, .hv-27 *::after { box-sizing: border-box; margin: 0; padding: 0; } .hv-27 { --st-color: #e05; --st-thickness: 2px; font-family: system-ui, sans-serif; background: #0c0c0f; padding: 3rem 2rem; min-height: 100vh; display: flex; flex-direction: column; gap: 2.5rem; align-items: center; justify-content: center; } .hv-27__label { color: #444; font-size: .72rem; letter-spacing: .15em; text-transform: uppercase; } .hv-27__group { display: flex; gap: 3rem; flex-wrap: wrap; justify-content: center; } .hv-27__link { color: #ddd; text-decoration: none; font-size: 1.35rem; font-weight: 600; position: relative; transition: color .25s; } /* Shared ::after base */ .hv-27__link::after { content: ''; position: absolute; left: 0; width: 100%; background: var(--st-color); transform: scaleX(0); transform-origin: left; transition: transform .32s cubic-bezier(.4,0,.2,1); } /* ── 1. Solid Strike ── */ .hv-27__link--solid::after { top: 50%; height: var(--st-thickness); margin-top: calc(var(--st-thickness) / -2); } .hv-27__link--solid:hover::after { transform: scaleX(1); } .hv-27__link--solid:hover { color: #888; } /* ── 2. Hair-thin ── */ .hv-27__link--thin::after { top: 50%; height: 1px; margin-top: -.5px; background: #fff; opacity: .7; } .hv-27__link--thin:hover::after { transform: scaleX(1); } .hv-27__link--thin:hover { color: #666; } /* ── 3. Chunky Strike ── */ .hv-27__link--thick::after { top: 44%; height: 6px; margin-top: -3px; border-radius: 3px; background: #f7a600; opacity: .85; } .hv-27__link--thick:hover::after { transform: scaleX(1); } .hv-27__link--thick:hover { color: #f7a600; } /* ── 4. Wavy Strike ── */ .hv-27__link--wavy::after { top: 54%; height: 4px; background: radial-gradient(ellipse 3px 2px at 3px 2px, #e05 100%, transparent) 0/6px 4px repeat-x, radial-gradient(ellipse 3px 2px at 3px 0px, transparent 100%, #e05) 3px/6px 4px repeat-x; background-color: transparent; } .hv-27__link--wavy:hover::after { transform: scaleX(1); } .hv-27__link--wavy:hover { color: #e05; } /* ── 5. Dashed Strike ── */ .hv-27__link--dashed::after { top: 50%; height: 2px; margin-top: -1px; background: repeating-linear-gradient( 90deg, #7c6af7 0, #7c6af7 6px, transparent 6px, transparent 10px ); } .hv-27__link--dashed:hover::after { transform: scaleX(1); } .hv-27__link--dashed:hover { color: #7c6af7; } /* ── 6. Double Strike ── */ .hv-27__link--double::before, .hv-27__link--double::after { content: ''; position: absolute; left: 0; width: 100%; height: 1.5px; background: #5cf; transform: scaleX(0); } .hv-27__link--double::before { top: 42%; transform-origin: right; transition: transform .3s cubic-bezier(.4,0,.2,1); } .hv-27__link--double::after { top: 56%; transform-origin: left; transition: transform .3s cubic-bezier(.4,0,.2,1) .06s; } .hv-27__link--double:hover::before, .hv-27__link--double:hover::after { transform: scaleX(1); } .hv-27__link--double:hover { color: #5cf; } @media (prefers-reduced-motion: reduce) { .hv-27__link::before, .hv-27__link::after { transition: none !important; } } ``` ### 28. CSS Inline Word Swap Hover Effect **Type:** Pure CSS **Description:** Text elements where hovering swaps out a word or phrase with an alternate, animated via clip-path, translateY, or opacity transitions — six swap styles. **HTML:** ```html

        Inline Word Swap — 6 Styles

        Make it Clip Reveal
        Start Fade Cross
        Build Scale In
        Ship Blur Swap
        ``` **CSS:** ```css .hv-28, .hv-28 *, .hv-28 *::before, .hv-28 *::after { box-sizing: border-box; margin: 0; padding: 0; } .hv-28 { --swap-color: #7c6af7; font-family: system-ui, sans-serif; background: #0b0b0e; padding: 3rem 2rem; min-height: 100vh; display: flex; flex-direction: column; gap: 2rem; align-items: flex-start; max-width: 600px; margin: 0 auto; } .hv-28__label { color: #444; font-size: .72rem; letter-spacing: .15em; text-transform: uppercase; align-self: center; } .hv-28__row { display: flex; align-items: center; gap: 1.5rem; } .hv-28__style { color: #3a3a50; font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; min-width: 90px; } .hv-28__link { text-decoration: none; font-size: 1.6rem; font-weight: 700; position: relative; display: inline-block; overflow: hidden; min-width: 8ch; height: 1.2em; line-height: 1.2; vertical-align: bottom; } .hv-28__word { display: block; position: absolute; left: 0; top: 0; width: 100%; white-space: nowrap; line-height: inherit; } /* ── 1. Slide Up ── */ .hv-28__link--slide-up .hv-28__word--out { color: #ccc; transition: transform .3s cubic-bezier(.4,0,.2,1); } .hv-28__link--slide-up .hv-28__word--in { color: var(--swap-color); transform: translateY(100%); transition: transform .3s cubic-bezier(.4,0,.2,1); } .hv-28__link--slide-up:hover .hv-28__word--out { transform: translateY(-100%); } .hv-28__link--slide-up:hover .hv-28__word--in { transform: translateY(0); } /* ── 2. Clip Reveal ── */ .hv-28__link--clip .hv-28__word--out { color: #ccc; transition: clip-path .3s cubic-bezier(.4,0,.2,1); clip-path: inset(0 0 0 0); } .hv-28__link--clip .hv-28__word--in { color: var(--swap-color); clip-path: inset(0 100% 0 0); transition: clip-path .3s cubic-bezier(.4,0,.2,1); } .hv-28__link--clip:hover .hv-28__word--out { clip-path: inset(0 0 0 100%); } .hv-28__link--clip:hover .hv-28__word--in { clip-path: inset(0 0 0 0); } /* ── 3. Fade Cross ── */ .hv-28__link--fade .hv-28__word--out { color: #ccc; transition: opacity .25s; } .hv-28__link--fade .hv-28__word--in { color: var(--swap-color); opacity: 0; transition: opacity .25s .1s; } .hv-28__link--fade:hover .hv-28__word--out { opacity: 0; } .hv-28__link--fade:hover .hv-28__word--in { opacity: 1; } /* ── 4. Scale In ── */ .hv-28__link--scale .hv-28__word--out { color: #ccc; transition: opacity .25s, transform .25s; } .hv-28__link--scale .hv-28__word--in { color: var(--swap-color); opacity: 0; transform: scale(.6); transition: opacity .3s .05s, transform .3s .05s cubic-bezier(.34,1.56,.64,1); } .hv-28__link--scale:hover .hv-28__word--out { opacity: 0; transform: scale(1.3); } .hv-28__link--scale:hover .hv-28__word--in { opacity: 1; transform: scale(1); } /* ── 5. Blur Swap ── */ .hv-28__link--blur .hv-28__word--out { color: #ccc; transition: filter .3s, opacity .3s; } .hv-28__link--blur .hv-28__word--in { color: var(--swap-color); filter: blur(8px); opacity: 0; transition: filter .3s .05s, opacity .3s .05s; } .hv-28__link--blur:hover .hv-28__word--out { filter: blur(8px); opacity: 0; } .hv-28__link--blur:hover .hv-28__word--in { filter: blur(0); opacity: 1; } /* ── 6. Flip Down ── */ .hv-28__link--rotate { perspective: 300px; } .hv-28__link--rotate .hv-28__word--out { color: #ccc; transition: transform .35s cubic-bezier(.4,0,.2,1), opacity .25s; transform-origin: bottom; } .hv-28__link--rotate .hv-28__word--in { color: var(--swap-color); transform: rotateX(-90deg); transform-origin: top; opacity: 0; transition: transform .35s cubic-bezier(.4,0,.2,1) .05s, opacity .2s .05s; } .hv-28__link--rotate:hover .hv-28__word--out { transform: rotateX(90deg); opacity: 0; } .hv-28__link--rotate:hover .hv-28__word--in { transform: rotateX(0); opacity: 1; } @media (prefers-reduced-motion: reduce) { .hv-28__word { transition: none !important; } } ``` ### 29. CSS Dot Trail Cursor Hover Effect **Type:** CSS + JS **Description:** A trail of fading dot particles follows the cursor inside a container — four trail styles including color rainbow, size decay, and comet tail. **HTML:** ```html

        Dot Trail Cursor — 4 Styles

        Classic Fade
        Rainbow
        Comet Tail
        Sparkle
        ``` **CSS:** ```css .hv-29, .hv-29 *, .hv-29 *::before, .hv-29 *::after { box-sizing: border-box; margin: 0; padding: 0; } .hv-29 { font-family: system-ui, sans-serif; background: #080810; padding: 2rem; min-height: 100vh; user-select: none; } .hv-29__label { text-align: center; color: #444; font-size: .72rem; letter-spacing: .15em; text-transform: uppercase; margin-bottom: 1.5rem; } .hv-29__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; max-width: 700px; margin: 0 auto; } .hv-29__zone { position: relative; overflow: hidden; border-radius: 12px; aspect-ratio: 4/3; border: 1px solid #1a1a2a; cursor: none; display: flex; align-items: center; justify-content: center; } .hv-29__zone--classic { background: #0d0d18; } .hv-29__zone--rainbow { background: #0d0d18; } .hv-29__zone--comet { background: #0a0a14; } .hv-29__zone--sparkle { background: #0c0c18; } .hv-29__hint { color: #2a2a40; font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; pointer-events: none; } /* ── Dot base ── */ .hv-29__dot { position: absolute; border-radius: 50%; pointer-events: none; transform: translate(-50%, -50%); will-change: transform, opacity; } /* ── Classic: white dots fade & shrink ── */ @keyframes hv-29-classic { 0% { opacity: .9; transform: translate(-50%,-50%) scale(1); } 100% { opacity: 0; transform: translate(-50%,-50%) scale(0); } } .hv-29__zone--classic .hv-29__dot { width: 8px; height: 8px; background: #fff; animation: hv-29-classic .6s ease-out forwards; } /* ── Rainbow: hue-rotated dots ── */ @keyframes hv-29-rainbow { 0% { opacity: 1; transform: translate(-50%,-50%) scale(1.1); } 100% { opacity: 0; transform: translate(-50%,-50%) scale(0.1); } } .hv-29__zone--rainbow .hv-29__dot { width: 10px; height: 10px; animation: hv-29-rainbow .7s ease-out forwards; /* background set inline via JS */ } /* ── Comet: elongated fade to right ── */ @keyframes hv-29-comet { 0% { opacity: 1; transform: translate(-50%,-50%) scale(1, 1); } 100% { opacity: 0; transform: translate(-50%,-50%) scale(3, .3); } } .hv-29__zone--comet .hv-29__dot { width: 12px; height: 4px; background: linear-gradient(90deg, rgba(100,180,255,0), rgba(100,180,255,1)); border-radius: 2px; animation: hv-29-comet .5s ease-out forwards; } /* ── Sparkle: star-like burst ── */ @keyframes hv-29-sparkle { 0% { opacity: 1; transform: translate(-50%,-50%) scale(0) rotate(0deg); } 60% { opacity: 1; transform: translate(-50%,-50%) scale(1.3) rotate(60deg); } 100% { opacity: 0; transform: translate(-50%,-50%) scale(0.4) rotate(90deg); } } .hv-29__zone--sparkle .hv-29__dot { width: 10px; height: 10px; clip-path: polygon(50% 0%,61% 35%,98% 35%,68% 57%,79% 91%,50% 70%,21% 91%,32% 57%,2% 35%,39% 35%); background: #f7d060; animation: hv-29-sparkle .65s ease-out forwards; } @media (prefers-reduced-motion: reduce) { .hv-29__dot { animation-duration: .01ms !important; } } ``` **JS:** ```js (function () { const zones = document.querySelectorAll('.hv-29__zone'); const RAINBOW = ['#ff6b6b','#ffa94d','#ffd43b','#69db7c','#4dabf7','#cc5de8','#f783ac']; let hueIndex = 0; let rafId = null; let pendingZone = null; let pendingX = 0; let pendingY = 0; function spawnDot(zone, x, y) { const trail = zone.dataset.trail; const dot = document.createElement('span'); dot.className = 'hv-29__dot'; dot.style.left = x + 'px'; dot.style.top = y + 'px'; if (trail === 'rainbow') { dot.style.background = RAINBOW[hueIndex % RAINBOW.length]; hueIndex++; } zone.appendChild(dot); dot.addEventListener('animationend', () => dot.remove(), { once: true }); } function onMove(e) { const zone = e.currentTarget; const rect = zone.getBoundingClientRect(); pendingX = e.clientX - rect.left; pendingY = e.clientY - rect.top; pendingZone = zone; if (!rafId) { rafId = requestAnimationFrame(() => { if (pendingZone) spawnDot(pendingZone, pendingX, pendingY); rafId = null; }); } } zones.forEach(zone => { zone.addEventListener('mousemove', onMove); zone.addEventListener('mouseleave', () => { pendingZone = null; }); }); })(); ``` ### 30. CSS Magnetic Cursor Pull Hover Effect **Type:** CSS + JS **Description:** Buttons and icons that magnetically attract to the cursor when nearby, snapping back smoothly when the cursor leaves — four magnetic element types. **HTML:** ```html

        Magnetic Cursor Pull — 4 Types

        Primary CTA
        Outline Button
        Icon Pull
        ``` **CSS:** ```css .hv-30, .hv-30 *, .hv-30 *::before, .hv-30 *::after { box-sizing: border-box; margin: 0; padding: 0; } .hv-30 { font-family: system-ui, sans-serif; background: #090912; padding: 3rem 2rem; min-height: 100vh; display: flex; flex-direction: column; align-items: center; gap: 2rem; } .hv-30__label { color: #444; font-size: .72rem; letter-spacing: .15em; text-transform: uppercase; } .hv-30__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 3.5rem 4rem; place-items: center; padding: 2rem; } .hv-30__wrap { display: flex; flex-direction: column; align-items: center; gap: 1rem; } .hv-30__caption { color: #333; font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; } /* Magnetic elements */ .hv-30__magnet { will-change: transform; transition: transform .45s cubic-bezier(.23,1,.32,1); cursor: pointer; } .hv-30__magnet-inner { display: inline-block; will-change: transform; transition: transform .45s cubic-bezier(.23,1,.32,1); pointer-events: none; } /* Button styles */ .hv-30__btn { background: #5b4fcf; color: #fff; border: none; border-radius: 50px; padding: .9rem 2.4rem; font-size: 1rem; font-weight: 600; letter-spacing: .02em; display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 6px 28px rgba(91,79,207,.4); } .hv-30__btn--outline { background: transparent; border: 2px solid #5b4fcf; color: #a99ef7; box-shadow: none; } .hv-30__btn--outline:hover { box-shadow: 0 6px 28px rgba(91,79,207,.25); } /* Icon button */ .hv-30__icon-btn { width: 64px; height: 64px; border-radius: 50%; background: linear-gradient(135deg, #7c6af7, #f764a8); color: #fff; font-size: 1.6rem; display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 24px rgba(124,106,247,.4); } /* Pill link */ .hv-30__pill { display: inline-flex; align-items: center; padding: .65rem 1.8rem; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); border-radius: 50px; color: #ccc; text-decoration: none; font-size: .9rem; backdrop-filter: blur(6px); transition: transform .45s cubic-bezier(.23,1,.32,1), background .3s, border-color .3s; } .hv-30__pill:hover { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.22); color: #fff; } @media (max-width: 500px) { .hv-30__grid { grid-template-columns: 1fr; } } @media (prefers-reduced-motion: reduce) { .hv-30__magnet, .hv-30__magnet-inner { transition: none !important; } } ``` **JS:** ```js (function () { if (window.matchMedia('(pointer: coarse)').matches) return; const magnets = document.querySelectorAll('.hv-30__magnet'); function handleMove(e, el) { const rect = el.getBoundingClientRect(); const cx = rect.left + rect.width / 2; const cy = rect.top + rect.height / 2; const dx = e.clientX - cx; const dy = e.clientY - cy; const dist = Math.sqrt(dx * dx + dy * dy); const radius = parseFloat(el.dataset.radius) || 80; const strength = parseFloat(el.dataset.strength) || 0.35; if (dist < radius) { const pull = (1 - dist / radius); const tx = dx * strength * pull; const ty = dy * strength * pull; el.style.transform = `translate(${tx}px, ${ty}px)`; const inner = el.querySelector('.hv-30__magnet-inner'); if (inner) { const is = parseFloat(inner.dataset.strength) || 0.5; inner.style.transform = `translate(${dx * is * pull}px, ${dy * is * pull}px)`; } } else { el.style.transform = ''; const inner = el.querySelector('.hv-30__magnet-inner'); if (inner) inner.style.transform = ''; } } function handleLeave(el) { el.style.transform = ''; const inner = el.querySelector('.hv-30__magnet-inner'); if (inner) inner.style.transform = ''; } magnets.forEach(el => { document.addEventListener('mousemove', e => handleMove(e, el)); el.addEventListener('mouseleave', () => handleLeave(el)); }); })(); ``` --- ## 16 CSS Image Gallery Designs URL: https://codefronts.com/snippets/css-image-gallery/ Description: 16 hand-coded CSS image gallery designs with live demos — CSS columns masonry grid, click-to-zoom lightbox overlay with focus trap, infinite scroll filmstrip, polaroid stack, tilt parallax cards with mousemove tracking, magazine grid layout, mosaic zoom hover, metro tile grid, perspective depth stack, diagonal clip-path slice reveal, glassmorphism hover cards, 3D cube viewer with perspective rotateY navigation, scattered random-rotation polaroid wall, Ken Burns auto-advancing slideshow, and accordion image gallery. 7 pure CSS + 9 with a tiny vanilla JS snippet — no framework. Every photo is an illustrated inline SVG scene (not a gradient placeholder), prefers-reduced-motion honoured, MIT licensed. Demo count: 16 ### 01. CSS Masonry Image Gallery **Type:** Pure CSS **Description:** A three-column CSS-only masonry grid where each card reveals a rich SVG-illustrated scene on hover, with a staggered caption fade. **HTML:** ```html
        Storm Over SerengetiWildlife · Tanzania
        Hanami SeasonBotanical · Kyoto
        Crystal CaveGeology · Iceland
        Provence at DuskLandscape · France
        Coral TriangleMarine · Raja Ampat
        Milky Way, SaharaAstrophoto · Morocco
        Morning MistForest · Arashiyama
        ``` **CSS:** ```css *,*::before,*::after{margin:0;padding:0;box-sizing:border-box} body{background:#f0ebe3;font-family:'DM Sans',sans-serif;padding:2rem} .ig-01{--gap:.75rem;--radius:14px;font-family:'DM Sans',sans-serif} .ig-01__grid{columns:3;column-gap:var(--gap)} .ig-01__card{break-inside:avoid;margin-bottom:var(--gap);border-radius:var(--radius);overflow:hidden;position:relative;cursor:pointer;display:block} .ig-01__card--tall .ig-01__scene{aspect-ratio:3/4} .ig-01__card--mid .ig-01__scene{aspect-ratio:1/1} .ig-01__card--short .ig-01__scene{aspect-ratio:4/3} .ig-01__scene{width:100%;display:block;transition:transform .5s cubic-bezier(.25,.46,.45,.94)} .ig-01__card:hover .ig-01__scene{transform:scale(1.06)} .ig-01__caption{position:absolute;inset:0;display:flex;flex-direction:column;justify-content:flex-end;padding:1.25rem 1rem;background:linear-gradient(to top,rgba(15,10,5,.85),transparent 60%);opacity:0;transform:translateY(8px);transition:opacity .35s ease,transform .35s ease} .ig-01__card:hover .ig-01__caption{opacity:1;transform:translateY(0)} .ig-01__caption span{color:#fff;font-size:.9rem;font-weight:600;font-family:'Playfair Display',serif} .ig-01__caption small{color:rgba(255,255,255,.6);font-size:.72rem;margin-top:.2rem;display:block;letter-spacing:.06em} @media(prefers-reduced-motion:reduce){.ig-01__scene,.ig-01__caption{transition:none}} ``` ### 02. CSS Lightbox Gallery Overlay **Type:** Pure CSS **Description:** A six-thumbnail grid where clicking any image opens a full-size overlay driven entirely by CSS :target pseudo-class — no JavaScript. **HTML:** ```html
        ×

        Kilauea Eruption

        Volcanic landscapes · Big Island, Hawaii

        ×

        Humpback Whale

        Marine photography · Tonga, South Pacific

        ×

        Aurora Borealis

        Astrophotography · Tromsø, Norway

        ×

        Sahara Caravan

        Desert expedition · Erg Chebbi, Morocco

        ×

        Firefly Forest

        Night nature · Smoky Mountains, Tennessee

        ×

        Perito Moreno

        Glacier expedition · Patagonia, Argentina

        ``` **CSS:** ```css *,*::before,*::after{margin:0;padding:0;box-sizing:border-box} body{background:#0a0a0f;font-family:'DM Sans',sans-serif;padding:2rem} .ig-02__grid{display:grid;grid-template-columns:repeat(3,1fr);gap:.6rem} .ig-02__thumb{border-radius:10px;overflow:hidden;cursor:pointer;display:block;text-decoration:none;position:relative;transition:transform .25s ease,box-shadow .25s ease;box-shadow:0 4px 20px rgba(0,0,0,.5)} .ig-02__thumb:hover{transform:scale(1.04) translateY(-2px);box-shadow:0 16px 40px rgba(0,0,0,.6)} .ig-02__thumb svg{display:block;width:100%;aspect-ratio:1} .ig-02__badge{position:absolute;bottom:.7rem;left:.7rem;color:rgba(255,255,255,.9);font-size:.7rem;font-weight:600;background:rgba(0,0,0,.4);backdrop-filter:blur(6px);padding:.2rem .55rem;border-radius:5px;font-family:'Playfair Display',serif;font-style:italic} .ig-02__overlay{position:fixed;inset:0;z-index:100;display:flex;align-items:center;justify-content:center;background:rgba(5,5,10,.95);opacity:0;pointer-events:none;transition:opacity .35s ease} .ig-02__overlay:target{opacity:1;pointer-events:all} .ig-02__overlay:target .ig-02__full{transform:scale(1);opacity:1} .ig-02__full{width:clamp(300px,85vw,700px);aspect-ratio:4/3;border-radius:18px;transform:scale(.88);opacity:0;transition:transform .4s cubic-bezier(.34,1.56,.64,1),opacity .35s ease;box-shadow:0 40px 100px rgba(0,0,0,.7);overflow:hidden} .ig-02__full svg{width:100%;height:100%} .ig-02__close{position:absolute;top:1.5rem;right:1.5rem;color:#fff;font-size:1.8rem;text-decoration:none;width:46px;height:46px;display:flex;align-items:center;justify-content:center;background:rgba(255,255,255,.12);border-radius:50%;backdrop-filter:blur(8px);transition:background .2s ease;line-height:1} .ig-02__close:hover{background:rgba(255,255,255,.25)} .ig-02__caption-lg{position:absolute;bottom:2rem;left:2rem;right:2rem;color:#fff;font-family:'Playfair Display',serif} .ig-02__caption-lg h3{font-size:1.6rem;font-weight:700;margin-bottom:.3rem} .ig-02__caption-lg p{font-size:.85rem;color:rgba(255,255,255,.6);font-style:italic;font-family:'DM Sans',sans-serif} @media(prefers-reduced-motion:reduce){.ig-02__overlay,.ig-02__full,.ig-02__thumb{transition:none}} ``` ### 03. CSS Infinite Scroll Image Strip **Type:** CSS + JS **Description:** An auto-scrolling horizontal filmstrip of illustrated world photography cards with a mask fade on each edge and JS-powered pause on hover. **HTML:** ```html

        Hover to pause · Auto-scrolling world photography

        Skógafoss · Iceland
        15 DH 20 DH
        Spice Souk · Marrakech
        Fitz Roy · Patagonia
        Fushimi Inari · Kyoto
        Antelope Canyon · Arizona
        Val d'Orcia · Tuscany
        Overwater Bungalow · Maldives
        Nærøyfjord · Norway
        ``` **CSS:** ```css *,*::before,*::after{margin:0;padding:0;box-sizing:border-box} body{background:#0a0a12;font-family:'DM Sans',sans-serif;padding:3rem 0;display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:100vh;gap:2rem} .ig-03{--play:running;width:100%} .ig-03__label{color:rgba(255,255,255,.35);font-size:.72rem;letter-spacing:.14em;text-transform:uppercase;text-align:center;margin-bottom:1.2rem} .ig-03__viewport{overflow:hidden;mask-image:linear-gradient(to right,transparent,black 8%,black 92%,transparent);-webkit-mask-image:linear-gradient(to right,transparent,black 8%,black 92%,transparent)} .ig-03__track{display:flex;gap:1.2rem;width:max-content;animation:ig-03-scroll 24s linear infinite;animation-play-state:var(--play);will-change:transform} .ig-03__card{flex-shrink:0;width:220px;height:260px;border-radius:16px;overflow:hidden;position:relative;box-shadow:0 8px 30px rgba(0,0,0,.4)} .ig-03__card svg{width:100%;height:100%;display:block} .ig-03__card-label{position:absolute;bottom:0;left:0;right:0;padding:.9rem 1rem;background:linear-gradient(to top,rgba(0,0,0,.8),transparent);color:#fff;font-size:.78rem;font-weight:600;letter-spacing:.04em} @keyframes ig-03-scroll{from{transform:translateX(0)}to{transform:translateX(-50%)}} @media(prefers-reduced-motion:reduce){.ig-03__track{animation:none}} ``` **JS:** ```js (function(){ const track=document.getElementById('ig-03-track'); const wrapper=track&&track.closest('.ig-03'); if(!track||!wrapper)return; Array.from(track.children).forEach(el=>track.appendChild(el.cloneNode(true))); wrapper.addEventListener('mouseenter',()=>wrapper.style.setProperty('--play','paused')); wrapper.addEventListener('mouseleave',()=>wrapper.style.setProperty('--play','running')); }()); ``` ### 04. CSS Polaroid Stack Gallery **Type:** CSS + JS **Description:** Five vintage-style polaroid photos stacked with random rotations that fan out on hover, with a flip animation triggered on click. **HTML:** ```html
        Venice, 1998
        Taj Mahal, 2002
        Santorini, 2005
        Amboseli, 2010
        Lapland, 2015

        Hover to fan · Click to flip

        ``` **CSS:** ```css *,*::before,*::after{margin:0;padding:0;box-sizing:border-box} body{background:radial-gradient(ellipse at center,#3a2a1a 0%,#1a1008 100%);font-family:'DM Sans',sans-serif;display:flex;align-items:center;justify-content:center;min-height:100vh;padding:2rem} .ig-04{--card-w:170px;display:flex;flex-direction:column;align-items:center;gap:1.8rem} .ig-04__scene{perspective:900px;height:260px;width:100%;display:flex;align-items:center;justify-content:center} .ig-04__stack{position:relative;width:var(--card-w);height:220px;cursor:pointer} .ig-04__card{position:absolute;inset:0;background:#faf6ee;border-radius:3px;padding:10px 10px 44px;box-shadow:0 8px 30px rgba(0,0,0,.55),0 2px 6px rgba(0,0,0,.3);transition:transform .5s cubic-bezier(.34,1.56,.64,1),box-shadow .4s ease;will-change:transform;transform-origin:center bottom} .ig-04__photo{width:100%;aspect-ratio:1;display:block} .ig-04__photo svg{width:100%;height:100%;display:block} .ig-04__meta{text-align:center;font-family:'Caveat',cursive;font-size:1rem;color:#4a3a28;margin-top:.4rem;letter-spacing:.02em} .ig-04__card.ig-04--active{animation:ig-04-flip .65s cubic-bezier(.34,1.56,.64,1);box-shadow:0 28px 70px rgba(0,0,0,.65)} @keyframes ig-04-flip{0%{transform:var(--ft,rotate(0deg)) scale(1)}50%{transform:var(--ft,rotate(0deg)) scale(1.18) rotateY(180deg)}100%{transform:var(--ft,rotate(0deg)) scale(1.1) rotateY(360deg)}} .ig-04__hint{color:rgba(255,255,255,.3);font-size:.72rem;letter-spacing:.1em;text-transform:uppercase} @media(prefers-reduced-motion:reduce){.ig-04__card{transition:none}.ig-04__card.ig-04--active{animation:none}} ``` **JS:** ```js (function(){ const stack=document.getElementById('ig-04-stack'); if(!stack)return; const cards=Array.from(stack.querySelectorAll('.ig-04__card')); const rots=cards.map(()=>(Math.random()-.5)*16); cards.forEach((c,i)=>{c.style.transform=`rotate(${rots[i]}deg)`;c.style.zIndex=i;}); stack.addEventListener('mouseenter',()=>{ const spread=20,total=cards.length; cards.forEach((c,i)=>{ const angle=-spread/2+(spread/(total-1))*i; const tx=-130+(260/(total-1))*i; c.style.transform=`translateX(${tx}px) rotate(${angle}deg)`; c.style.setProperty('--ft',`translateX(${tx}px) rotate(${angle}deg)`); }); }); stack.addEventListener('mouseleave',()=>{ cards.forEach((c,i)=>{c.style.transform=`rotate(${rots[i]}deg)`;c.classList.remove('ig-04--active');}); }); cards.forEach((c,i)=>{ c.addEventListener('click',()=>{ cards.forEach((x,j)=>{x.classList.remove('ig-04--active');x.style.zIndex=j;}); c.classList.add('ig-04--active');c.style.zIndex=cards.length+1; c.addEventListener('animationend',()=>c.classList.remove('ig-04--active'),{once:true}); }); }); }()); ``` ### 05. CSS Tilt Parallax Image Cards **Type:** Pure CSS **Description:** Three architecture cards with a CSS 3D tilt effect on hover plus a shimmer light-sweep across the face — pure CSS, no JavaScript. **HTML:** ```html
        Sky
        Burj KhalifaDubai, UAE · 828m
        Ancient
        ColosseumRome, Italy · 70 CE
        Wonder
        Machu PicchuCusco, Peru · 2430m
        ``` **CSS:** ```css *,*::before,*::after{margin:0;padding:0;box-sizing:border-box} body{background:#080c14;font-family:'Space Grotesk',sans-serif;display:flex;align-items:center;justify-content:center;min-height:100vh;padding:2.5rem} .ig-05__grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:1.5rem;width:100%;max-width:720px} .ig-05__wrap{perspective:700px} .ig-05__card{border-radius:18px;overflow:hidden;position:relative;transform-style:preserve-3d;transition:transform .45s cubic-bezier(.25,.46,.45,.94),box-shadow .45s ease;box-shadow:0 8px 28px rgba(0,0,0,.5);cursor:pointer} .ig-05__card::after{content:'';position:absolute;inset:0;background:linear-gradient(135deg,transparent 40%,rgba(255,255,255,.16) 50%,transparent 60%);transform:translateX(-120%);transition:transform .5s ease;pointer-events:none} .ig-05__wrap:hover .ig-05__card{transform:rotateX(8deg) rotateY(-8deg) scale(1.04);box-shadow:0 28px 64px rgba(0,0,0,.6)} .ig-05__wrap:hover .ig-05__card::after{transform:translateX(120%)} .ig-05__img{width:100%;aspect-ratio:3/4;display:block} .ig-05__img svg{width:100%;height:100%;display:block} .ig-05__badge{position:absolute;top:1.1rem;right:1.1rem;transform:translateZ(28px);background:var(--accent);color:#fff;font-size:.65rem;font-weight:700;letter-spacing:.1em;padding:.22rem .55rem;border-radius:6px;box-shadow:0 4px 14px rgba(0,0,0,.35);text-transform:uppercase} .ig-05__info{padding:1rem;background:#0f1420} .ig-05__info strong{color:#fff;font-size:.9rem;font-weight:700;display:block;margin-bottom:.2rem} .ig-05__info span{color:rgba(255,255,255,.45);font-size:.75rem} @media(prefers-reduced-motion:reduce){.ig-05__card,.ig-05__card::after{transition:none}} ``` ### 06. CSS Filmstrip Carousel Gallery **Type:** Pure CSS **Description:** A horizontally scrollable filmstrip of vintage-era illustrated frames with sprocket-hole styling and snap scrolling — pure CSS. **HTML:** ```html
        PAT'S DINER
        PAT'S DINER — Chicago, 1955
        ROUTE 66
        ROUTE 66 — Arizona, 1962
        Café de Flore
        CAFÉ DE FLORE — Paris, 1968
        OLD HAVANA — Cuba, 1975
        ラーメン OPEN 居酒屋 ラーメン OPEN 居酒屋 ラーメン OPEN
        SHINJUKU RAIN — Tokyo, 1988

        ← Scroll the filmstrip →

        ``` **CSS:** ```css *,*::before,*::after{margin:0;padding:0;box-sizing:border-box} body{background:#0a0805;font-family:'DM Sans',sans-serif;display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:100vh;padding:2rem 0;gap:1rem} .ig-06{width:100%} .ig-06__reel{background:#100a02;border-top:5px solid #0a0602;border-bottom:5px solid #0a0602;position:relative;overflow:hidden} .ig-06__reel::before,.ig-06__reel::after{content:'';position:absolute;left:0;right:0;height:20px;z-index:2;pointer-events:none;background:#100a02 repeating-linear-gradient(to right,transparent 0,transparent 5px,#000 5px,#000 7px,transparent 7px,transparent 12px,#1a0e04 12px,#1a0e04 22px,transparent 22px,transparent 28px)} .ig-06__reel::before{top:0}.ig-06__reel::after{bottom:0} .ig-06__strip{display:flex;gap:.6rem;overflow-x:scroll;scroll-snap-type:x mandatory;scrollbar-width:none;padding:26px 1.2rem;-webkit-overflow-scrolling:touch} .ig-06__strip::-webkit-scrollbar{display:none} .ig-06__frame{flex-shrink:0;min-width:clamp(220px,58vw,310px);scroll-snap-align:center;border:3px solid #2a1a08;border-radius:2px;overflow:hidden;position:relative;background:#000;transition:border-color .3s ease} .ig-06__frame:hover{border-color:#d4a840} .ig-06__img{width:100%;aspect-ratio:16/9;display:block} .ig-06__img svg{width:100%;height:100%;display:block} .ig-06__title{display:block;text-align:center;color:rgba(255,200,80,.75);font-size:.7rem;font-family:'Special Elite',cursive;letter-spacing:.1em;padding:.4rem;background:#0a0602} .ig-06__hint{color:rgba(255,255,255,.28);font-size:.72rem;letter-spacing:.1em;text-transform:uppercase;text-align:center} @media(prefers-reduced-motion:reduce){.ig-06__frame{transition:none}} ``` ### 07. CSS Mosaic Zoom Gallery **Type:** CSS + JS **Description:** Editorial "Earth's Biomes" mosaic dashboard — 8 illustrated biome tiles in a 4×3 grid where clicking any tile expands it to a 2×2 featured hero. Persistent caption strip on every tile (no mystery-meat), monospace section numbers, per-tile category accent stripe, live counter chip in the header that updates with the featured tile's name (e.g. "Featured · 03 / 08 · Sahara Dunes"), and a status bar footer. **HTML:** ```html
        Earth's Biomes 8 scenes · Click any tile to feature
        Featured · 01 / 08
        Amazon CanopyBrazil · Rainforest 01
        Arctic TundraSvalbard · 78° N 02
        Sahara DunesMorocco · Erg Chebbi 03
        Deep OceanPacific · Hadal zone 04
        City AerialManhattan · Night 05
        Volcanic IslandIceland · Fagradalsfjall 06
        Cherry OrchardKyoto · Spring bloom 07
        Summit ClimbK2 · 8,611 m 08
        ↑ Click a tile to feature SVG scale(1.08) on hover · grid-column span 2 on click MIT · prefers-reduced-motion ✓
        ``` **CSS:** ```css *,*::before,*::after{margin:0;padding:0;box-sizing:border-box} body{background:#0a0a0e;font-family:'DM Sans',sans-serif;padding:1rem;min-height:100vh;display:flex;align-items:center;justify-content:center;color:#fff} .ig-07{width:100%;max-width:860px;background:#0a0a0e;padding:1rem 1.1rem;display:flex;flex-direction:column;gap:.7rem} .ig-07__chrome{display:flex;justify-content:space-between;align-items:center;padding-bottom:.55rem;border-bottom:1px solid #1c1c24;flex-wrap:wrap;gap:.5rem} .ig-07__chrome-l{display:flex;align-items:baseline;gap:1rem;flex-wrap:wrap} .ig-07__title{font-family:'Playfair Display',serif;font-style:italic;font-weight:700;font-size:1.5rem;color:#fff;letter-spacing:-0.01em} .ig-07__sub{font-size:.66rem;letter-spacing:.16em;text-transform:uppercase;color:#7a7a8a;font-weight:600} .ig-07__pill{font-size:.65rem;font-weight:700;letter-spacing:.18em;text-transform:uppercase;color:#0a0a0e;background:#fff;padding:.35rem .7rem;border-radius:999px} .ig-07__grid{display:grid;grid-template-columns:repeat(4,1fr);grid-auto-rows:100px;gap:5px} .ig-07__tile{overflow:hidden;border-radius:6px;cursor:pointer;position:relative;outline:1px solid rgba(255,255,255,.05);transition:outline-color .3s ease;background:#0a0a0e} .ig-07__tile:hover{outline-color:var(--accent,#fff);outline-width:2px} .ig-07__tile svg{width:100%;height:100%;display:block;position:absolute;inset:0;transition:transform .55s cubic-bezier(.25,.46,.45,.94)} .ig-07__tile:hover svg{transform:scale(1.1)} .ig-07__tile--active{grid-column:span 2;grid-row:span 2;outline-color:var(--accent,#fff);outline-width:2px} .ig-07__tile--active svg{transform:scale(1)} .ig-07__tile--active:hover svg{transform:scale(1.04)} .ig-07__tile[data-color="#2a9018"]{--accent:#3aa628} .ig-07__tile[data-color="#88ccdd"]{--accent:#88ccdd} .ig-07__tile[data-color="#e8a838"]{--accent:#e8a838} .ig-07__tile[data-color="#2a8aee"]{--accent:#2a8aee} .ig-07__tile[data-color="#7c6cff"]{--accent:#7c6cff} .ig-07__tile[data-color="#ff5a32"]{--accent:#ff5a32} .ig-07__tile[data-color="#ff8ab8"]{--accent:#ff8ab8} .ig-07__tile[data-color="#cdd6e0"]{--accent:#cdd6e0} .ig-07__num{position:absolute;top:.45rem;right:.5rem;z-index:3;font-family:'Courier New',monospace;font-size:.6rem;font-weight:700;color:#fff;background:rgba(0,0,0,.55);padding:.18rem .42rem;border-radius:3px;letter-spacing:.1em;backdrop-filter:blur(4px);-webkit-backdrop-filter:blur(4px)} .ig-07__cap{position:absolute;left:0;right:0;bottom:0;z-index:3;padding:.55rem .65rem .5rem;display:flex;flex-direction:column;background:linear-gradient(to top,rgba(0,0,0,.92) 0%,rgba(0,0,0,.55) 60%,rgba(0,0,0,0) 100%);pointer-events:none;transform:translateY(0);transition:padding .35s ease} .ig-07__cap strong{font-size:.72rem;font-weight:700;color:#fff;line-height:1.15;letter-spacing:-0.005em;text-shadow:0 1px 4px rgba(0,0,0,.7)} .ig-07__cap em{font-style:normal;font-size:.55rem;font-weight:500;color:rgba(255,255,255,.7);letter-spacing:.1em;margin-top:.15rem;opacity:0;max-height:0;transition:opacity .3s ease,max-height .3s ease} .ig-07__tile--active .ig-07__cap{padding:1rem 1.2rem 1rem} .ig-07__tile--active .ig-07__cap strong{font-size:1.5rem;line-height:1.1;border-left:3px solid var(--accent,#fff);padding-left:.7rem;margin-bottom:.3rem} .ig-07__tile--active .ig-07__cap em{opacity:1;max-height:24px;font-size:.66rem;padding-left:.85rem} .ig-07__tile:not(.ig-07__tile--active):hover .ig-07__cap em{opacity:1;max-height:24px} .ig-07__statusbar{display:flex;justify-content:space-between;align-items:center;font-size:.6rem;font-weight:500;letter-spacing:.14em;text-transform:uppercase;color:#5a5a6a;padding-top:.5rem;border-top:1px solid #1c1c24;flex-wrap:wrap;gap:.5rem} .ig-07__hint{color:#9a9aaa;font-family:'Courier New',monospace;letter-spacing:.05em;text-transform:none} @media(prefers-reduced-motion:reduce){.ig-07__tile svg,.ig-07__tile,.ig-07__cap,.ig-07__cap em{transition:none}.ig-07__tile:hover svg{transform:none}} ``` **JS:** ```js (function(){ const grid=document.getElementById('ig-07-grid'); const counter=document.getElementById('ig-07-counter'); if(!grid)return; const tiles=Array.from(grid.querySelectorAll('.ig-07__tile')); const total=String(tiles.length).padStart(2,'0'); function syncCounter(){ if(!counter)return; const active=grid.querySelector('.ig-07__tile--active'); if(!active){counter.textContent='Featured · — / '+total;return;} const idx=tiles.indexOf(active)+1; const cap=active.getAttribute('data-cap')||''; counter.textContent='Featured · '+String(idx).padStart(2,'0')+' / '+total+' · '+cap; } tiles.forEach(t=>{ t.addEventListener('click',()=>{ const active=grid.querySelector('.ig-07__tile--active'); if(active&&active!==t)active.classList.remove('ig-07__tile--active'); t.classList.toggle('ig-07__tile--active'); syncCounter(); }); }); syncCounter(); }()); ``` ### 08. CSS Metro Tile Grid Gallery **Type:** Pure CSS **Description:** A real Windows Metro / Live Tile dashboard: start-screen chrome with username + pin count + signal/time, six bold sans-serif tiles in a 4-column grid with mixed span-1/span-2 sizing, category accent stripes on the left edge, in-tile metadata (category badge, photo count, big light-weight title, subtitle), and a live-tile flip on hover that swaps the chrome for a full metadata panel (mission, capture date, resolution, distance, telescope) with a VIEW → CTA in the accent color. **HTML:** ```html
        ★ COSMOS COLLECTION 6 tiles pinned · all sky
        14:45 · TUE ▮▮▮▯
        NEBULA 12 photos

        Carina
        Nebula

        NGC 3372 · 7,500 light-years

        MissionJames Webb

        Captured2022.07.12

        Resolution4536 × 6244

        ConstellationCarina

        VIEW ALBUM →
        PLANET 8

        Saturn

        Ringed gas giant

        MissionCassini

        Distance1.4 B km

        Moons146

        VIEW →
        GALAXY 14

        Andromeda

        M31 spiral · 2.5 M ly

        TypeSpiral Sb

        Stars~1 trillion

        Diameter220,000 ly

        VIEW →
        EARTH 23

        Aurora from Orbit

        ISS · LEO 400 km

        Captured2024.03.18

        CrewExpedition 70

        Altitude408 km

        VIEW →
        ANOMALY 7

        Black Hole

        M87* · supermassive

        Mass6.5 B M☉

        TelescopeEvent Horizon

        Distance55 M ly

        VIEW →
        COMET 19

        Halley's Comet

        Returns 2061

        Period76 years

        Last seen1986

        Discovered240 BC

        VIEW →
        ↑ Pin · Drag tiles to reorder HOVER ANY TILE Live tiles · 6/6 active
        ``` **CSS:** ```css *,*::before,*::after{margin:0;padding:0;box-sizing:border-box} body{background:#0a0a0e;font-family:'Segoe UI','Roboto',system-ui,sans-serif;padding:1rem;min-height:100vh;display:flex;align-items:center;justify-content:center;color:#fff} .ig-08{width:100%;max-width:820px;background:#0a0a0e;padding:1.1rem 1.2rem 1rem;display:flex;flex-direction:column;gap:.8rem} .ig-08__chrome{display:flex;justify-content:space-between;align-items:baseline;font-size:.7rem;letter-spacing:.14em;text-transform:uppercase;padding-bottom:.55rem;border-bottom:1px solid #1c1c24;flex-wrap:wrap;gap:.5rem} .ig-08__chrome-l{display:flex;align-items:baseline;gap:1rem;flex-wrap:wrap} .ig-08__user{font-size:1rem;font-weight:300;letter-spacing:.08em;color:#fff} .ig-08__pinned{font-size:.65rem;font-weight:400;color:#7a7a8a;letter-spacing:.16em} .ig-08__chrome-r{display:flex;gap:1rem;color:#7a7a8a;font-size:.65rem;font-weight:500;letter-spacing:.16em} .ig-08__signal{color:#46d160;letter-spacing:.05em;font-size:.75rem} .ig-08__grid{display:grid;grid-template-columns:repeat(4,1fr);grid-auto-rows:128px;gap:6px} .ig-08__tile{overflow:hidden;border-radius:0;position:relative;cursor:pointer;perspective:1000px;background:#0a0a0e;outline:1px solid rgba(255,255,255,.04)} .ig-08__tile:nth-child(1){grid-column:span 2;grid-row:span 2} .ig-08__tile:nth-child(2){grid-column:span 2} .ig-08__tile:nth-child(3){grid-column:span 1} .ig-08__tile:nth-child(4){grid-column:span 1} .ig-08__tile:nth-child(5){grid-column:span 2} .ig-08__tile:nth-child(6){grid-column:span 2} .ig-08__tile svg{width:100%;height:100%;display:block;transition:transform .55s cubic-bezier(.25,.46,.45,.94);position:absolute;inset:0;backface-visibility:hidden} .ig-08__tile:hover svg{transform:scale(1.04)} .ig-08__tile::before{content:'';position:absolute;top:0;left:0;width:4px;height:100%;background:var(--accent,#7c4dff);z-index:2;transition:width .35s ease} .ig-08__tile:hover::before{width:6px;box-shadow:0 0 18px var(--accent,#7c4dff)} .ig-08__tile[data-color="#e91e63"]{--accent:#e91e63} .ig-08__tile[data-color="#ff9800"]{--accent:#ff9800} .ig-08__tile[data-color="#9c27b0"]{--accent:#9c27b0} .ig-08__tile[data-color="#00bcd4"]{--accent:#00bcd4} .ig-08__tile[data-color="#7c4dff"]{--accent:#7c4dff} .ig-08__tile[data-color="#4caf50"]{--accent:#4caf50} .ig-08__tile-chrome{position:absolute;inset:0;z-index:3;display:flex;flex-direction:column;justify-content:space-between;padding:.7rem .85rem .8rem 1.05rem;background:linear-gradient(180deg,rgba(0,0,0,.45) 0%,rgba(0,0,0,0) 30%,rgba(0,0,0,0) 50%,rgba(0,0,0,.85) 100%);transition:opacity .4s ease,transform .4s ease;backface-visibility:hidden} .ig-08__tile:hover .ig-08__tile-chrome{opacity:0;transform:translateY(-6px)} .ig-08__tile-top{display:flex;justify-content:space-between;align-items:flex-start;gap:.5rem} .ig-08__cat{font-size:.6rem;font-weight:700;letter-spacing:.18em;color:var(--accent,#fff);background:rgba(0,0,0,.4);padding:.22rem .5rem;backdrop-filter:blur(4px);-webkit-backdrop-filter:blur(4px)} .ig-08__count{font-size:.62rem;font-weight:600;color:rgba(255,255,255,.85);letter-spacing:.08em;background:rgba(0,0,0,.4);padding:.22rem .5rem;backdrop-filter:blur(4px);-webkit-backdrop-filter:blur(4px)} .ig-08__tile-bottom{} .ig-08__title{font-size:1.2rem;font-weight:300;line-height:1.05;color:#fff;letter-spacing:-0.005em;margin-bottom:.25rem;text-shadow:0 1px 4px rgba(0,0,0,.65)} .ig-08__tile:nth-child(1) .ig-08__title{font-size:1.85rem;font-weight:200} .ig-08__sub{font-size:.66rem;color:rgba(255,255,255,.7);letter-spacing:.08em;font-weight:500;text-shadow:0 1px 3px rgba(0,0,0,.6)} .ig-08__flip{position:absolute;inset:0;z-index:4;background:linear-gradient(135deg,rgba(8,4,20,.96),rgba(20,4,30,.96));display:flex;flex-direction:column;justify-content:center;padding:1rem 1.1rem 1rem 1.3rem;gap:.45rem;opacity:0;transform:translateY(12px);transition:opacity .4s ease .05s,transform .4s ease .05s;backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px)} .ig-08__tile:hover .ig-08__flip{opacity:1;transform:translateY(0)} .ig-08__flip-line{display:flex;justify-content:space-between;align-items:baseline;font-size:.7rem;border-bottom:1px solid rgba(255,255,255,.08);padding-bottom:.32rem} .ig-08__flip-line span{color:rgba(255,255,255,.55);letter-spacing:.1em;text-transform:uppercase;font-size:.58rem;font-weight:600} .ig-08__flip-line strong{color:#fff;font-weight:600;font-size:.78rem;font-feature-settings:'tnum'} .ig-08__flip-cta{margin-top:.5rem;font-size:.62rem;font-weight:700;letter-spacing:.2em;color:var(--accent,#fff);align-self:flex-end;cursor:pointer} .ig-08__statusbar{display:flex;justify-content:space-between;align-items:center;font-size:.6rem;font-weight:500;letter-spacing:.16em;text-transform:uppercase;color:#5a5a6a;padding-top:.55rem;margin-top:.2rem;border-top:1px solid #1c1c24;flex-wrap:wrap;gap:.5rem} .ig-08__statusbar > :nth-child(2){color:var(--accent,#7c4dff);color:#7c4dff;font-weight:700} @media(prefers-reduced-motion:reduce){.ig-08__tile svg,.ig-08__tile-chrome,.ig-08__flip,.ig-08__tile::before{transition:none}.ig-08__tile:hover svg{transform:none}} ``` ### 09. CSS Magazine Layout Gallery **Type:** Pure CSS **Description:** A real editorial-magazine page in CSS — italic serif masthead, issue number, four ranked stories (hero spread + two column cards + side-by-side feature), drop-cap excerpts, byline rules, monospace section numbers, and a paper-stock footer rule. **HTML:** ```html
        Issue 09 · Markets of the World
        Summer 2026

        01

        Street Food · Bangkok

        Night Market
        Yaowarat

        A sensory labyrinth of woks and lanterns, where centuries-old recipes become street theatre under a canopy of lights — and every alley is its own kitchen.

        Read the story →
        02

        Bazaar · Istanbul

        Grand Bazaar

        4,000 shops beneath Ottoman vaults — a living museum of craft and commerce.

        03

        Mercado · Oaxaca

        Mercado Benito Juárez

        Beneath colonial arches and papel picado, the colours of Mexico spill into the street.

        04

        Craft · Fes

        Chouara Tannery — The Living Palette of Fes

        Morocco's oldest tannery has been dyeing leather in these stone vats since the 11th century — a spectacle unchanged by time, where artisans still mix indigo, saffron, and pomegranate by hand.

        Read the story →

        VOYAGEUR MAGAZINE · ESTABLISHED 1998 Page 09 — 14
        ``` **CSS:** ```css *,*::before,*::after{margin:0;padding:0;box-sizing:border-box} body{background:#f5f0e8;font-family:'DM Sans',sans-serif;padding:1.2rem;min-height:100vh;color:#1a1614} .ig-09{max-width:820px;margin:0 auto;background:#f5f0e8;padding:1.2rem;color:#1a1614} .ig-09__masthead{display:flex;justify-content:space-between;align-items:baseline;padding:.1rem 0 .4rem;flex-wrap:wrap;gap:.5rem} .ig-09__brand{display:flex;align-items:baseline;gap:.85rem;flex-wrap:wrap} .ig-09__logo{font-family:'Playfair Display',serif;font-style:italic;font-weight:700;font-size:1.5rem;color:#1a1614;letter-spacing:-0.01em} .ig-09__issue{font-size:.66rem;letter-spacing:.18em;text-transform:uppercase;color:#8a7f74;font-weight:600} .ig-09__date{font-size:.66rem;letter-spacing:.18em;text-transform:uppercase;color:#8a7f74;font-weight:600} .ig-09__rule{border:none;border-top:2px solid #1a1614;margin:.25rem 0 .9rem} .ig-09__rule--bottom{border-top-width:1px;border-color:#cdc3b5;margin:.9rem 0 .3rem} .ig-09__footer{display:flex;justify-content:space-between;font-size:.6rem;letter-spacing:.16em;text-transform:uppercase;color:#8a7f74;font-weight:600} .ig-09{display:grid;grid-template-columns:1fr 1fr 1fr;gap:.85rem} .ig-09__masthead,.ig-09__rule,.ig-09__footer{grid-column:span 3} .ig-09__card{overflow:hidden;border-radius:6px;position:relative;background:#fff;box-shadow:0 2px 12px rgba(0,0,0,.06);border:1px solid #ece4d5;display:flex;flex-direction:column;transition:box-shadow .35s ease,transform .35s ease} .ig-09__card:hover{box-shadow:0 8px 26px rgba(0,0,0,.12);transform:translateY(-2px)} .ig-09__card:nth-child(3){grid-column:span 2;grid-row:span 2;display:grid;grid-template-rows:auto 1fr} .ig-09__card:nth-child(6){grid-column:span 3;display:grid;grid-template-columns:1.4fr 1fr;align-items:stretch} .ig-09__card:nth-child(6) .ig-09__img--wide{aspect-ratio:auto;height:100%;min-height:170px} .ig-09__img{display:block;width:100%;overflow:hidden;position:relative} .ig-09__img svg{width:100%;height:100%;display:block;transition:transform .55s cubic-bezier(.25,.46,.45,.94)} .ig-09__card:hover .ig-09__img svg{transform:scale(1.05)} .ig-09__img--hero{aspect-ratio:2/1} .ig-09__img--sq{aspect-ratio:1} .ig-09__body{padding:.85rem 1rem 1rem;position:relative;flex:1;display:flex;flex-direction:column} .ig-09__num{position:absolute;top:.85rem;right:1rem;font-family:'Courier New',monospace;font-size:.66rem;font-weight:700;color:#c0472a;letter-spacing:.1em} .ig-09__tag{font-size:.6rem;font-weight:700;letter-spacing:.16em;text-transform:uppercase;color:#c0472a;margin-bottom:.45rem;padding-bottom:.4rem;border-bottom:1px solid #ece4d5;display:inline-block;padding-right:1rem} .ig-09__title{font-family:'Playfair Display',serif;font-size:.95rem;font-weight:700;color:#1a1614;line-height:1.2;margin-bottom:.4rem;letter-spacing:-0.005em} .ig-09__card:nth-child(3) .ig-09__title{font-size:1.4rem;line-height:1.1;margin-bottom:.5rem} .ig-09__card:nth-child(6) .ig-09__title{font-size:1.4rem;line-height:1.15} .ig-09__byline{font-size:.62rem;color:#8a7f74;letter-spacing:.04em;margin-bottom:.5rem;font-style:italic} .ig-09__desc{font-size:.75rem;color:#3a342e;line-height:1.55;flex:1} .ig-09__card:nth-child(3) .ig-09__desc{font-size:.82rem;line-height:1.6} .ig-09__card:nth-child(3) .ig-09__desc::first-letter{font-family:'Playfair Display',serif;font-size:2.6em;font-weight:700;float:left;line-height:.85;padding:.1rem .35rem 0 0;color:#c0472a} .ig-09__card:nth-child(6) .ig-09__desc{font-size:.78rem;line-height:1.6} .ig-09__card:nth-child(6) .ig-09__desc::first-letter{font-family:'Playfair Display',serif;font-size:2.4em;font-weight:700;float:left;line-height:.85;padding:.1rem .3rem 0 0;color:#c0472a} .ig-09__more{display:inline-block;margin-top:.7rem;font-size:.7rem;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:#1a1614;border-bottom:1.5px solid #c0472a;padding-bottom:.15rem;align-self:flex-start;cursor:pointer;transition:color .25s ease} .ig-09__more:hover{color:#c0472a} @media(prefers-reduced-motion:reduce){.ig-09__img svg,.ig-09__card{transition:none}.ig-09__card:hover{transform:none}} ``` ### 10. CSS Perspective Depth Stack Gallery **Type:** Pure CSS **Description:** Five illustrated ancient-wonder cards stacked in a true CSS 3D perspective scene — each card peeks at rest so you see all five at once; hover any card to pop it forward toward the viewer while the others dim and recede. **HTML:** ```html
        Angkor WatCambodia · 12th C.
        PetraJordan · 4th C. BC
        Machu PicchuPeru · 15th C.
        Easter IslandChile · 13th C.
        StonehengeEngland · 3000 BC
        ``` **CSS:** ```css *,*::before,*::after{margin:0;padding:0;box-sizing:border-box} body{background:radial-gradient(ellipse at 50% 30%,#241a14,#0c0608 75%);font-family:'DM Sans',sans-serif;display:flex;align-items:center;justify-content:center;min-height:100vh;padding:2rem} .ig-10{width:100%;max-width:720px;display:flex;align-items:center;justify-content:center} .ig-10__stage{position:relative;width:100%;height:420px;perspective:1400px;perspective-origin:50% 50%;display:flex;align-items:center;justify-content:center} .ig-10__card{position:absolute;width:74%;aspect-ratio:16/9;border-radius:12px;overflow:hidden;box-shadow:0 18px 50px rgba(0,0,0,.55);cursor:pointer;transform-origin:center center;transition:transform .55s cubic-bezier(.25,.8,.3,1),box-shadow .55s ease,filter .35s ease;will-change:transform;border:1px solid rgba(255,255,255,.08)} .ig-10__card svg{width:100%;height:100%;display:block} .ig-10__card:nth-child(5){transform:translateZ(-220px) translateY(-92px) rotateX(8deg);z-index:1} .ig-10__card:nth-child(4){transform:translateZ(-160px) translateY(-46px) rotateX(6deg);z-index:2} .ig-10__card:nth-child(3){transform:translateZ(-100px) translateY(0) rotateX(4deg);z-index:3} .ig-10__card:nth-child(2){transform:translateZ(-50px) translateY(48px) rotateX(2deg);z-index:4} .ig-10__card:nth-child(1){transform:translateZ(0) translateY(94px) rotateX(0);z-index:5;box-shadow:0 28px 70px rgba(0,0,0,.7)} .ig-10__stage:hover .ig-10__card{filter:brightness(.55) saturate(.7)} .ig-10__card:hover{transform:translateZ(160px) translateY(0) rotateX(-2deg) scale(1.04)!important;z-index:10!important;filter:none!important;box-shadow:0 40px 100px rgba(0,0,0,.75),0 0 0 1px rgba(255,255,255,.12)} .ig-10__label{position:absolute;left:1rem;right:1rem;bottom:.85rem;display:flex;justify-content:space-between;align-items:flex-end;gap:.5rem;pointer-events:none;opacity:0;transform:translateY(8px);transition:opacity .35s ease .1s,transform .35s ease .1s} .ig-10__card:nth-child(1) .ig-10__label,.ig-10__card:hover .ig-10__label{opacity:1;transform:translateY(0)} .ig-10__label strong{color:#fff;font-family:'IM Fell English',serif;font-size:1.15rem;text-shadow:0 2px 8px rgba(0,0,0,.7)} .ig-10__label span{color:rgba(255,255,255,.65);font-size:.68rem;letter-spacing:.1em;text-transform:uppercase;text-shadow:0 1px 4px rgba(0,0,0,.6)} @media(prefers-reduced-motion:reduce){.ig-10__card,.ig-10__label{transition:none}.ig-10__stage:hover .ig-10__card{filter:none}.ig-10__card:hover{transform:none!important}} ``` ### 11. CSS Diagonal Slice Reveal Gallery **Type:** Pure CSS **Description:** Six before/after pairs where hovering sweeps a skewed clip-path divider from center to edge, revealing the second scene behind the first. **HTML:** ```html
        SpringWinter
        AutumnDawn
        SummerNight
        Morning MistStorm
        DuskDeep Frost
        FloodDrought
        ``` **CSS:** ```css *,*::before,*::after{margin:0;padding:0;box-sizing:border-box} body{background:#0a0a0a;font-family:'DM Sans',sans-serif;display:flex;align-items:center;justify-content:center;min-height:100vh;padding:1.5rem} .ig-11{width:100%;max-width:760px} .ig-11__grid{display:grid;grid-template-columns:repeat(3,1fr);gap:4px} .ig-11__slice{position:relative;overflow:hidden;border-radius:6px;cursor:pointer;aspect-ratio:1} .ig-11__under,.ig-11__over{position:absolute;inset:0} .ig-11__under svg,.ig-11__over svg{width:100%;height:100%;display:block} .ig-11__over{clip-path:polygon(45% 0,100% 0,100% 100%,55% 100%);transition:clip-path .55s cubic-bezier(.77,0,.18,1)} .ig-11__slice:hover .ig-11__over{clip-path:polygon(105% 0,100% 0,100% 100%,105% 100%)} .ig-11__label{position:absolute;bottom:.7rem;left:.75rem;right:.75rem;display:flex;justify-content:space-between;pointer-events:none;z-index:3} .ig-11__label-a,.ig-11__label-b{color:rgba(255,255,255,.85);font-size:.65rem;font-weight:600;letter-spacing:.08em;text-transform:uppercase;text-shadow:0 1px 4px rgba(0,0,0,.7);transition:opacity .3s} .ig-11__label-b{text-align:right;opacity:0} .ig-11__slice:hover .ig-11__label-a{opacity:0} .ig-11__slice:hover .ig-11__label-b{opacity:1} .ig-11__divider{position:absolute;top:0;bottom:0;left:0;right:0;pointer-events:none;z-index:2} .ig-11__divider::after{content:'';position:absolute;top:0;bottom:0;left:44%;width:3px;background:rgba(255,255,255,.9);transform:skewX(-8deg);box-shadow:0 0 12px rgba(255,255,255,.5);transition:left .55s cubic-bezier(.77,0,.18,1)} .ig-11__slice:hover .ig-11__divider::after{left:99%} @media(prefers-reduced-motion:reduce){.ig-11__over,.ig-11__divider::after,.ig-11__label-a,.ig-11__label-b{transition:none}} ``` ### 12. CSS Glassmorphism Hover Cards **Type:** CSS + JS **Description:** Four ocean-zone cards floating above a vivid sunset-aurora SVG background — the frosted-glass blur reveals the colors behind, and hover slides up an info panel with species detail and a CTA chip while sibling cards dim to focus attention. **HTML:** ```html

        Sunlight Zone

        Surface Waters

        0 – 200m depth

        Dolphins · Tuna · Flying fish · Kelp forests

        Explore zone →

        Twilight Edge

        Coral Reef

        40 – 150m depth

        Clownfish · Sea anemone · Brain coral · Fan coral

        Explore zone →

        Midnight Zone

        Twilight Waters

        200 – 1000m depth

        Bioluminescent squid · Siphonophore · Deep shrimp

        Explore zone →

        Abyssal Zone

        Deep Abyss

        1000 – 4000m depth

        Anglerfish · Viper fish · Sea floor rubble

        Explore zone →
        ``` **CSS:** ```css *,*::before,*::after{margin:0;padding:0;box-sizing:border-box} body{font-family:'DM Sans',sans-serif;min-height:100vh;padding:2rem;display:flex;align-items:center;justify-content:center;overflow:hidden;background:#0a0418} .ig-12{position:relative;width:100%;max-width:780px;perspective:1200px} .ig-12__bg{position:absolute;inset:-60px;z-index:0;border-radius:24px;overflow:hidden} .ig-12__bg svg{width:100%;height:100%;display:block} .ig-12__grid{position:relative;z-index:1;display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:1.1rem;padding:.4rem} .ig-12__card{position:relative;border-radius:18px;overflow:hidden;cursor:pointer;border:1px solid rgba(255,255,255,.22);background:rgba(255,255,255,.08);backdrop-filter:blur(14px) saturate(160%);-webkit-backdrop-filter:blur(14px) saturate(160%);transition:transform .45s cubic-bezier(.25,.8,.3,1),filter .35s ease,box-shadow .45s ease,border-color .35s ease;box-shadow:0 8px 28px rgba(0,0,0,.35),inset 0 1px 0 rgba(255,255,255,.18);transform-style:preserve-3d;aspect-ratio:3/4} .ig-12__grid:hover .ig-12__card:not(:hover){filter:brightness(.55) saturate(.7);transform:scale(.97)} .ig-12__card:hover{transform:translateY(-12px) rotateX(2deg) scale(1.04);border-color:rgba(255,255,255,.45);box-shadow:0 26px 60px rgba(0,0,0,.55),0 0 0 1px rgba(255,255,255,.15),inset 0 1px 0 rgba(255,255,255,.35)} .ig-12__img{position:absolute;inset:0;width:100%;height:100%;display:block} .ig-12__img svg{width:100%;height:100%;display:block} .ig-12__info{position:absolute;left:0;right:0;bottom:0;padding:1rem 1.05rem 1.05rem;background:linear-gradient(to top,rgba(8,4,24,.92) 0%,rgba(8,4,24,.65) 55%,rgba(8,4,24,0) 100%);backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px);transform:translateY(calc(100% - 78px));transition:transform .45s cubic-bezier(.25,.8,.3,1)} .ig-12__card:hover .ig-12__info{transform:translateY(0)} .ig-12__zone{font-size:.58rem;font-weight:700;letter-spacing:.16em;text-transform:uppercase;color:#a8e0ff;margin-bottom:.3rem;text-shadow:0 1px 4px rgba(0,0,0,.5)} .ig-12__name{font-size:1rem;font-weight:700;color:#fff;line-height:1.2;text-shadow:0 1px 4px rgba(0,0,0,.55)} .ig-12__depth{font-size:.72rem;color:rgba(255,255,255,.7);margin-top:.25rem} .ig-12__species{font-size:.68rem;color:rgba(255,255,255,.75);margin-top:.55rem;line-height:1.35;opacity:0;transform:translateY(6px);transition:opacity .35s ease .12s,transform .35s ease .12s} .ig-12__card:hover .ig-12__species{opacity:1;transform:translateY(0)} .ig-12__cta{display:inline-block;margin-top:.65rem;padding:.32rem .65rem;font-size:.65rem;font-weight:600;letter-spacing:.06em;color:#fff;background:rgba(255,255,255,.18);border:1px solid rgba(255,255,255,.3);border-radius:999px;backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);opacity:0;transform:translateY(6px);transition:opacity .35s ease .2s,transform .35s ease .2s,background .25s ease} .ig-12__card:hover .ig-12__cta{opacity:1;transform:translateY(0)} .ig-12__cta:hover{background:rgba(255,255,255,.3)} @media(prefers-reduced-motion:reduce){.ig-12__card,.ig-12__info,.ig-12__species,.ig-12__cta{transition:none}.ig-12__grid:hover .ig-12__card:not(:hover){transform:none}.ig-12__card:hover{transform:none}} ``` ### 13. CSS 3D Cube Image Viewer **Type:** CSS + JS **Description:** A CSS 3D cube with six faces each showing an iconic world bridge illustration — buttons rotate the cube to any face via JS-applied transforms. **HTML:** ```html

        6 iconic bridges of the world

        ``` **CSS:** ```css *,*::before,*::after{margin:0;padding:0;box-sizing:border-box} body{background:#0a0c10;font-family:'DM Sans',sans-serif;display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:100vh;gap:2rem;padding:2rem} .ig-13{display:flex;flex-direction:column;align-items:center;gap:1.8rem} .ig-13__viewport{perspective:900px;width:260px;height:260px} .ig-13__cube{width:100%;height:100%;position:relative;transform-style:preserve-3d;transform:rotateX(-10deg) rotateY(0deg);transition:transform .65s cubic-bezier(.25,.46,.45,.94)} .ig-13__face{position:absolute;width:100%;height:100%;backface-visibility:hidden;border-radius:8px;overflow:hidden;border:2px solid rgba(255,255,255,.12)} .ig-13__face svg{width:100%;height:100%;display:block} .ig-13__face--front {transform:translateZ(130px)} .ig-13__face--back {transform:rotateY(180deg) translateZ(130px)} .ig-13__face--right {transform:rotateY(90deg) translateZ(130px)} .ig-13__face--left {transform:rotateY(-90deg) translateZ(130px)} .ig-13__face--top {transform:rotateX(90deg) translateZ(130px)} .ig-13__face--bottom{transform:rotateX(-90deg) translateZ(130px)} .ig-13__controls{display:flex;gap:.6rem;flex-wrap:wrap;justify-content:center} .ig-13__btn{background:rgba(255,255,255,.08);border:1px solid rgba(255,255,255,.15);color:rgba(255,255,255,.75);font-size:.72rem;font-weight:600;letter-spacing:.08em;padding:.4rem .9rem;border-radius:8px;cursor:pointer;font-family:'DM Sans',sans-serif;transition:background .2s ease,color .2s ease;text-transform:uppercase} .ig-13__btn:hover{background:rgba(255,255,255,.18);color:#fff} .ig-13__btn.ig-13--active{background:rgba(255,255,255,.22);color:#fff;border-color:rgba(255,255,255,.4)} .ig-13__label{color:rgba(255,255,255,.35);font-size:.7rem;letter-spacing:.08em;text-transform:uppercase} @media(prefers-reduced-motion:reduce){.ig-13__cube{transition:none}} ``` **JS:** ```js (function(){ const cube=document.getElementById('ig-13-cube'); const btns=document.querySelectorAll('#ig-13-controls .ig-13__btn'); if(!cube)return; btns.forEach(btn=>{ btn.addEventListener('click',()=>{ btns.forEach(b=>b.classList.remove('ig-13--active')); btn.classList.add('ig-13--active'); const y=Number(btn.dataset.y)||0; const x=Number(btn.dataset.x)||-10; cube.style.transform=`rotateX(${x}deg) rotateY(${y}deg)`; }); }); }()); ``` ### 14. CSS Scattered Photos Gallery **Type:** CSS + JS **Description:** Six vintage postcards scattered with random CSS rotations on a cork-board surface — hover zooms them in, click brings one to front. **HTML:** ```html
        Roma, 1994
        Grazie mille!
        Paris, 1997
        Magnifique!
        New York, 2001
        The city that never sleeps
        Tokyo, 2003
        Shibuya scramble
        Cairo, 2006
        Land of the pharaohs
        Istanbul, 2009
        Where East meets West
        ``` **CSS:** ```css *,*::before,*::after{margin:0;padding:0;box-sizing:border-box} body{background:radial-gradient(ellipse at 30% 70%,#2a1a0a,#0a0805 70%);min-height:100vh;display:flex;align-items:center;justify-content:center;padding:2rem;font-family:'DM Sans',sans-serif} .ig-14{position:relative;width:min(680px,100%);height:520px} .ig-14__photo{position:absolute;background:#f5f0e8;padding:10px 10px 42px;box-shadow:0 8px 32px rgba(0,0,0,.55),0 2px 6px rgba(0,0,0,.3);border-radius:2px;cursor:pointer;transition:transform .35s cubic-bezier(.34,1.56,.64,1),box-shadow .3s ease,z-index 0s;will-change:transform} .ig-14__photo:hover{box-shadow:0 24px 60px rgba(0,0,0,.65);z-index:10} .ig-14__photo svg{display:block;width:100%;height:auto} .ig-14__caption{text-align:center;font-family:'Caveat',cursive;font-size:1rem;color:#4a3a28;margin-top:.4rem;line-height:1.2} .ig-14__tape{position:absolute;top:-12px;left:50%;transform:translateX(-50%);width:38px;height:16px;background:rgba(255,240,200,.55);border-radius:2px} @media(prefers-reduced-motion:reduce){.ig-14__photo{transition:none}} ``` **JS:** ```js (function(){ const root=document.getElementById('ig-14-board'); if(!root)return; const photos=root.querySelectorAll('.ig-14__photo'); photos.forEach((p,i)=>{ p.addEventListener('mouseenter',()=>{p.style.transform=p.style.transform.replace(/scale\([^)]*\)/,'')+'scale(1.06)'}); p.addEventListener('mouseleave',()=>{p.style.transform=p.style.transform.replace(/scale\([^)]*\)/,'')}); p.addEventListener('click',()=>{ photos.forEach((x,j)=>{ const base=parseInt(x.style.zIndex)||j+1; x.style.zIndex=j===i?20:base>10?base-1:base; }); }); }); }()); ``` ### 15. CSS Ken Burns Slideshow Gallery **Type:** CSS + JS **Description:** A six-slide arctic wildlife slideshow with the Ken Burns zoom-pan effect on each active slide, auto-advancing with JS dot navigation and manual controls. **HTML:** ```html

        Polar Bear & Cub

        Sea ice, Svalbard Archipelago · Arctic Ocean

        Narwhal Pod

        Below Arctic sea ice, Baffin Bay · Canada

        Arctic Fox in Blizzard

        Winter tundra, Wrangel Island · Siberia

        Snowy Owl in Flight

        Arctic tundra, Churchill · Manitoba, Canada

        Walrus Colony

        Rocky haul-out, Round Island · Alaska

        Atlantic Puffins

        Sea-cliff colony, Látrabjarg · Iceland

        ``` **CSS:** ```css *,*::before,*::after{margin:0;padding:0;box-sizing:border-box} body{background:#040408;font-family:'DM Sans',sans-serif;display:flex;align-items:center;justify-content:center;min-height:100vh;padding:0} .ig-15{position:relative;width:min(760px,100vw);aspect-ratio:16/9;overflow:hidden;background:#040408} .ig-15__slide{position:absolute;inset:0;opacity:0;transition:opacity .8s ease} .ig-15__slide.ig-15--active{opacity:1;z-index:1} .ig-15__slide.ig-15--prev{opacity:0;z-index:0} .ig-15__img{position:absolute;inset:-8%;width:116%;height:116%;animation:none} .ig-15--active .ig-15__img{animation:ig-15-zoom 8s ease-in-out forwards} @keyframes ig-15-zoom{ 0%{transform:scale(1) translate(0,0)} 100%{transform:scale(1.12) translate(-3%,-2%)} } .ig-15__img svg{width:100%;height:100%;display:block} .ig-15__caption{position:absolute;bottom:0;left:0;right:0;z-index:3;padding:2rem 2.5rem 1.5rem;background:linear-gradient(to top,rgba(4,4,8,.9) 0%,rgba(4,4,8,.5) 50%,transparent);pointer-events:none} .ig-15__caption h3{font-family:'Playfair Display',serif;color:#fff;font-size:clamp(1.1rem,3vw,1.6rem);font-weight:700;margin-bottom:.3rem} .ig-15__caption p{color:rgba(255,255,255,.55);font-size:clamp(.68rem,1.8vw,.82rem);font-style:italic;font-family:'Playfair Display',serif} .ig-15__dots{position:absolute;bottom:1rem;right:1.5rem;z-index:5;display:flex;gap:.5rem;align-items:center} .ig-15__dot{width:6px;height:6px;border-radius:50%;background:rgba(255,255,255,.3);cursor:pointer;transition:background .3s,transform .3s} .ig-15__dot.ig-15--on{background:#fff;transform:scale(1.4)} .ig-15__nav{position:absolute;top:50%;z-index:5;transform:translateY(-50%);background:rgba(255,255,255,.1);border:none;color:rgba(255,255,255,.7);width:40px;height:40px;border-radius:50%;cursor:pointer;font-size:1.2rem;backdrop-filter:blur(6px);transition:background .2s;display:flex;align-items:center;justify-content:center} .ig-15__nav:hover{background:rgba(255,255,255,.22)} .ig-15__nav--prev{left:1rem} .ig-15__nav--next{right:1rem} @media(prefers-reduced-motion:reduce){.ig-15__img{animation:none!important}.ig-15__slide,.ig-15__dot{transition:none}} ``` **JS:** ```js (function(){ const el=document.getElementById('ig-15'); if(!el)return; const slides=el.querySelectorAll('.ig-15__slide'); const dots=el.querySelectorAll('.ig-15__dot'); let cur=0,timer,running=true; function go(n){ slides[cur].classList.remove('ig-15--active');dots[cur].classList.remove('ig-15--on'); cur=(n+slides.length)%slides.length; slides[cur].classList.add('ig-15--active');dots[cur].classList.add('ig-15--on'); } function startAuto(){timer=setInterval(()=>go(cur+1),6000)} function stopAuto(){clearInterval(timer)} el.querySelector('#ig-15-prev').addEventListener('click',()=>{stopAuto();go(cur-1);startAuto()}); el.querySelector('#ig-15-next').addEventListener('click',()=>{stopAuto();go(cur+1);startAuto()}); dots.forEach((d,i)=>d.addEventListener('click',()=>{stopAuto();go(i);startAuto()})); el.addEventListener('mouseenter',stopAuto);el.addEventListener('mouseleave',startAuto); startAuto(); }()); ``` ### 16. CSS Accordion Image Gallery **Type:** CSS + JS **Description:** Six desert landscape panels in a horizontal accordion — clicking any panel expands it to 5× width while the others compress, driven by CSS flex transitions. **HTML:** ```html

        Delicate Arch

        Arches National Park · Utah, USA

        Delicate Arch

        Sossusvlei Dunes

        Namib-Naukluft Park · Namibia

        Namib Desert

        Salar de Atacama

        Atacama Desert · Chile

        Atacama

        Wadi Rum Valley

        Valley of the Moon · Jordan

        Wadi Rum

        White Sands at Dusk

        White Sands NM · New Mexico, USA

        White Sands

        Cappadocia Balloons

        Göreme Valley · Central Turkey

        Cappadocia
        ``` **CSS:** ```css *,*::before,*::after{margin:0;padding:0;box-sizing:border-box} body{background:#0c0a08;font-family:'DM Sans',sans-serif;display:flex;align-items:center;justify-content:center;min-height:100vh;padding:1.5rem} .ig-16{width:100%;max-width:780px;height:420px;display:flex;gap:5px} .ig-16__panel{flex:1;position:relative;overflow:hidden;border-radius:10px;cursor:pointer;transition:flex .55s cubic-bezier(.25,.46,.45,.94);min-width:52px} .ig-16__panel.ig-16--open{flex:5} .ig-16__panel svg{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;transition:transform .55s ease} .ig-16__panel:hover:not(.ig-16--open) svg{transform:scale(1.05)} .ig-16__panel.ig-16--open svg{transform:scale(1)} .ig-16__label{position:absolute;bottom:0;left:0;right:0;padding:1.2rem 1.4rem .9rem;background:linear-gradient(to top,rgba(0,0,0,.85) 0%,transparent);transform:translateY(100%);transition:transform .4s .1s ease;pointer-events:none} .ig-16__panel.ig-16--open .ig-16__label{transform:translateY(0)} .ig-16__label h3{color:#fff;font-size:1.05rem;font-weight:600;margin-bottom:.2rem} .ig-16__label p{color:rgba(255,255,255,.5);font-size:.73rem;font-style:italic;font-family:'Playfair Display',serif} .ig-16__tab{position:absolute;bottom:1rem;left:50%;transform:translateX(-50%);white-space:nowrap;color:rgba(255,255,255,.7);font-size:.6rem;font-weight:600;letter-spacing:.14em;text-transform:uppercase;writing-mode:vertical-lr;transition:opacity .3s} .ig-16__panel.ig-16--open .ig-16__tab{opacity:0} @media(prefers-reduced-motion:reduce){.ig-16__panel,.ig-16__panel svg,.ig-16__label{transition:none}} ``` **JS:** ```js (function(){ const root=document.getElementById('ig-16'); if(!root)return; const panels=root.querySelectorAll('.ig-16__panel'); panels.forEach(p=>{ p.addEventListener('click',()=>{ const isOpen=p.classList.contains('ig-16--open'); panels.forEach(x=>x.classList.remove('ig-16--open')); if(!isOpen)p.classList.add('ig-16--open'); }); }); }()); ``` --- ## 20 CSS Image Hover Effects URL: https://codefronts.com/motion/css-image-hover-effects/ Description: 20 hand-coded CSS image hover effects with live demos — zoom-in card, hover reveal text overlay, e-commerce product image swap, grid blur overlay, slide-up caption, grayscale-to-color, color tint overlay, neumorphic image card, glassmorphism overlay, glowing neon border, clip-path morphing, 3D tilt perspective, shining glare sweep, split transition, ripple animation, spinning avatar border, fullscreen background swap, masonry zoom, icon reveal centre, and 3D card flip. 18 pure CSS + 2 with a tiny vanilla JS snippet — no framework. Modern @property + animation-timeline techniques, prefers-reduced-motion honoured, CLS-safe via aspect-ratio, WCAG 2.2 AA compliant, MIT licensed. Demo count: 20 ### 01. CSS Image Hover Zoom In Card **Type:** Pure CSS **Description:** The classic card micro-interaction where the image scales up inside its clipped container boundary without shifting the surrounding grid. **HTML:** ```html
        🔭

        Explore

        Deep Space Observatory

        12 min read · Cosmos

        🌿

        Nature

        Ancient Forest Canopy

        8 min read · Biology

        💎

        Design

        Crystal Formations

        5 min read · Art

        ``` **CSS:** ```css .ih-01, .ih-01 *, .ih-01 *::before, .ih-01 *::after { margin: 0; padding: 0; box-sizing: border-box; } .ih-01 ::selection { background: #7c3aed; color: #fff; } .ih-01 { --accent: #7c3aed; --accent2: #06b6d4; --bg: #0f0f13; --card-bg: #1a1a24; --text: #e2e8f0; --muted: #94a3b8; --radius: 16px; --zoom: 1.12; --duration: 0.45s; --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94); font-family: 'Inter', system-ui, sans-serif; background: var(--bg); padding: 40px 24px; min-height: 100vh; display: flex; align-items: center; justify-content: center; } .ih-01__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; max-width: 780px; width: 100%; } /* The key trick: overflow:hidden on card clips the zooming image */ .ih-01__card { background: var(--card-bg); border-radius: var(--radius); overflow: hidden; border: 1px solid rgba(255,255,255,0.06); transition: box-shadow var(--duration) var(--ease), border-color var(--duration) var(--ease); cursor: pointer; } .ih-01__card:hover { box-shadow: 0 20px 60px rgba(124,58,237,0.25); border-color: rgba(124,58,237,0.35); } .ih-01__img-wrap { overflow: hidden; aspect-ratio: 4/3; position: relative; } /* The image itself scales — overflow:hidden on parent does the crop */ .ih-01__img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--duration) var(--ease); display: block; background: linear-gradient(135deg, #1e1e2e, #2d1b69); } .ih-01__card:hover .ih-01__img { transform: scale(var(--zoom)); } /* Decorative gradient placeholder images */ .ih-01__img--1 { background: linear-gradient(135deg, #1a0533 0%, #4c1d95 50%, #0891b2 100%); } .ih-01__img--2 { background: linear-gradient(135deg, #0c1a2e 0%, #1e3a5f 50%, #065f46 100%); } .ih-01__img--3 { background: linear-gradient(135deg, #1a0a1e 0%, #6b21a8 50%, #be185d 100%); } .ih-01__img-inner { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; } .ih-01__img-icon { font-size: 48px; opacity: 0.4; transition: transform var(--duration) var(--ease), opacity var(--duration) var(--ease); } .ih-01__card:hover .ih-01__img-icon { transform: scale(0.88); opacity: 0.25; } .ih-01__body { padding: 16px; } .ih-01__cat { font-size: 10px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent2); margin-bottom: 6px; } .ih-01__title { font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 4px; } .ih-01__meta { font-size: 12px; color: var(--muted); } @media (prefers-reduced-motion: reduce) { .ih-01__img, .ih-01__img-icon, .ih-01__card { transition: none; } } ``` ### 02. CSS Hover Reveal Text Over Image **Type:** Pure CSS **Description:** Portfolio-grid technique where a title and description fade and slide in over an image on mouseover via layered opacity and translateY transitions. **HTML:** ```html
        🌌
        Portfolio

        Astrophotography

        Nebula Series Vol. 3

        Shot over 14 nights in the Chilean Atacama desert

        🏙️
        Architecture

        Urban Design

        Midnight Cityscapes

        Long exposure study of downtown light trails

        🔮
        Abstract

        Digital Art

        Prism Light Study

        Generative colour diffraction experiments

        ``` **CSS:** ```css .ih-02, .ih-02 *, .ih-02 *::before, .ih-02 *::after { margin: 0; padding: 0; box-sizing: border-box; } .ih-02 ::selection { background: #06b6d4; color: #000; } .ih-02 { --accent: #06b6d4; --accent2: #a78bfa; --bg: #09090f; --text: #f1f5f9; --muted: #94a3b8; --duration: 0.4s; --ease: cubic-bezier(0.16, 1, 0.3, 1); font-family: 'Inter', system-ui, sans-serif; background: var(--bg); padding: 40px 24px; min-height: 100vh; display: flex; align-items: center; justify-content: center; } .ih-02__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; max-width: 780px; width: 100%; } .ih-02__card { position: relative; border-radius: 12px; overflow: hidden; aspect-ratio: 3/4; cursor: pointer; } /* Gradient placeholder images */ .ih-02__img { width: 100%; height: 100%; transition: transform var(--duration) var(--ease); display: flex; align-items: center; justify-content: center; } .ih-02__img--1 { background: linear-gradient(160deg,#0f0c29,#302b63,#24243e); } .ih-02__img--2 { background: linear-gradient(160deg,#0f2027,#203a43,#2c5364); } .ih-02__img--3 { background: linear-gradient(160deg,#1a0533,#4a044e,#2d1b69); } .ih-02__card:hover .ih-02__img { transform: scale(1.08); } .ih-02__emoji { font-size: 56px; opacity: 0.35; transition: opacity var(--duration) var(--ease); } .ih-02__card:hover .ih-02__emoji { opacity: 0.1; } /* The overlay fades in and text slides up */ .ih-02__overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.3) 50%, transparent 100%); opacity: 0; transition: opacity var(--duration) var(--ease); display: flex; flex-direction: column; justify-content: flex-end; padding: 20px 16px; } .ih-02__card:hover .ih-02__overlay { opacity: 1; } .ih-02__tag { font-size: 10px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); margin-bottom: 6px; transform: translateY(12px); transition: transform var(--duration) var(--ease); } .ih-02__card:hover .ih-02__tag { transform: translateY(0); } .ih-02__name { font-size: 15px; font-weight: 700; color: var(--text); line-height: 1.3; transform: translateY(16px); transition: transform calc(var(--duration) * 1.1) var(--ease); } .ih-02__card:hover .ih-02__name { transform: translateY(0); } .ih-02__sub { font-size: 12px; color: var(--muted); margin-top: 4px; transform: translateY(20px); opacity: 0; transition: transform calc(var(--duration) * 1.2) var(--ease), opacity calc(var(--duration) * 1.2) var(--ease); } .ih-02__card:hover .ih-02__sub { transform: translateY(0); opacity: 1; } /* Static label when not hovered (accessibility) */ .ih-02__badge { position: absolute; top: 12px; left: 12px; background: rgba(0,0,0,0.5); backdrop-filter: blur(8px); border: 1px solid rgba(255,255,255,0.1); border-radius: 6px; padding: 4px 8px; font-size: 10px; color: var(--muted); font-weight: 600; letter-spacing: 0.05em; } @media (prefers-reduced-motion: reduce) { .ih-02__img, .ih-02__overlay, .ih-02__tag, .ih-02__name, .ih-02__sub, .ih-02__emoji { transition: none; } .ih-02__overlay { opacity: 1; } .ih-02__tag, .ih-02__name, .ih-02__sub { transform: none; opacity: 1; } } ``` ### 03. E-Commerce Product Image Swap on Hover **Type:** Pure CSS **Description:** Shopping-grid hover that cross-fades between a primary product angle and a secondary lifestyle image using stacked absolute elements. **HTML:** ```html
        👟
        👟
        Hover

        AeroStep Pro Runner

        $129 $189
        👜
        👜
        Hover

        Nomad Leather Tote

        $249 $320
        Hover

        Vertex Titanium Watch

        $589 $750
        ``` **CSS:** ```css .ih-03, .ih-03 *, .ih-03 *::before, .ih-03 *::after { margin: 0; padding: 0; box-sizing: border-box; } .ih-03 ::selection { background: #f59e0b; color: #000; } .ih-03 { --accent: #f59e0b; --accent2: #10b981; --bg: #0d0d11; --card-bg: #16161f; --text: #f1f5f9; --muted: #64748b; --border: rgba(255,255,255,0.07); --duration: 0.5s; font-family: 'Inter', system-ui, sans-serif; background: var(--bg); padding: 40px 24px; min-height: 100vh; display: flex; align-items: center; justify-content: center; } .ih-03__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; max-width: 780px; width: 100%; } .ih-03__card { background: var(--card-bg); border-radius: 14px; overflow: hidden; border: 1px solid var(--border); transition: box-shadow 0.3s ease; cursor: pointer; } .ih-03__card:hover { box-shadow: 0 16px 48px rgba(0,0,0,0.4); } .ih-03__img-wrap { position: relative; aspect-ratio: 1; overflow: hidden; } /* Primary and secondary images stacked */ .ih-03__img-primary, .ih-03__img-secondary { position: absolute; inset: 0; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; transition: opacity var(--duration) cubic-bezier(0.4, 0, 0.2, 1), transform var(--duration) cubic-bezier(0.4, 0, 0.2, 1); } /* Primary visible by default */ .ih-03__img-primary { opacity: 1; transform: scale(1); z-index: 1; } /* Secondary hidden by default */ .ih-03__img-secondary { opacity: 0; transform: scale(1.04); z-index: 2; } /* On hover: fade primary out, secondary in */ .ih-03__card:hover .ih-03__img-primary { opacity: 0; transform: scale(0.96); } .ih-03__card:hover .ih-03__img-secondary { opacity: 1; transform: scale(1); } /* Colour swatches as stand-ins for product angles */ .ih-03__img--1a { background: linear-gradient(135deg, #1e1b4b, #312e81, #4338ca); } .ih-03__img--1b { background: linear-gradient(135deg, #0c4a6e, #0369a1, #38bdf8); } .ih-03__img--2a { background: linear-gradient(135deg, #1a1007, #451a03, #92400e); } .ih-03__img--2b { background: linear-gradient(135deg, #052e16, #166534, #4ade80); } .ih-03__img--3a { background: linear-gradient(135deg, #1f1f2e, #374151, #9ca3af); } .ih-03__img--3b { background: linear-gradient(135deg, #310a0a, #7f1d1d, #f87171); } .ih-03__emoji { font-size: 52px; opacity: 0.5; } .ih-03__swap-badge { position: absolute; top: 10px; right: 10px; z-index: 10; background: rgba(0,0,0,0.6); backdrop-filter: blur(6px); border: 1px solid rgba(255,255,255,0.1); border-radius: 20px; padding: 3px 8px; font-size: 9px; font-weight: 700; color: var(--accent); letter-spacing: 0.08em; text-transform: uppercase; transition: opacity 0.25s; } .ih-03__card:hover .ih-03__swap-badge { opacity: 0; } .ih-03__body { padding: 14px 16px; } .ih-03__name { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 4px; } .ih-03__price-row { display: flex; align-items: center; gap: 8px; } .ih-03__price { font-size: 15px; font-weight: 700; color: var(--accent); } .ih-03__old-price { font-size: 11px; color: var(--muted); text-decoration: line-through; } .ih-03__swatches { display: flex; gap: 5px; margin-top: 10px; } .ih-03__swatch { width: 14px; height: 14px; border-radius: 50%; border: 2px solid rgba(255,255,255,0.15); } @media (prefers-reduced-motion: reduce) { .ih-03__img-primary, .ih-03__img-secondary, .ih-03__swap-badge { transition: none; } } ``` ### 04. CSS Grid Image Blur Overlay Text Hover **Type:** Pure CSS **Description:** Visually soft hover where the background image blurs under a dark overlay via backdrop-filter to make typography legible. **HTML:** ```html
        🌌

        Editorial

        The Infinite Canvas

        Exploring the boundaries of digital art in 2025

        🌿

        Nature

        Bioluminescent Depths

        Life thriving in the ocean's twilight zone

        Culture

        Neon Flux Collection

        Street art meets future-forward design aesthetics

        ``` **CSS:** ```css .ih-04, .ih-04 *, .ih-04 *::before, .ih-04 *::after { margin:0;padding:0;box-sizing:border-box; } .ih-04 ::selection { background:#8b5cf6;color:#fff; } .ih-04 { --accent:#8b5cf6; --bg:#080810; --text:#f1f5f9; --muted:#94a3b8; --duration:0.4s; --ease:cubic-bezier(0.25,0.46,0.45,0.94); font-family:system-ui,sans-serif; background:var(--bg); padding:40px 24px; min-height: 100vh; display:flex; align-items:center; justify-content:center; } .ih-04__grid { display:grid; grid-template-columns:repeat(3,1fr); gap:16px; max-width:780px; width:100%; } .ih-04__card { position:relative; border-radius:14px; overflow:hidden; aspect-ratio:3/4; cursor:pointer; } .ih-04__bg { position:absolute; inset:0; transition:filter var(--duration) var(--ease), transform var(--duration) var(--ease); } .ih-04__bg--1 { background:linear-gradient(135deg,#0f0c29,#302b63,#24243e); } .ih-04__bg--2 { background:linear-gradient(135deg,#0a3d2e,#155e43,#6ee7b7); } .ih-04__bg--3 { background:linear-gradient(135deg,#1a0010,#6b1d4e,#e879f9); } .ih-04__emoji { position:absolute; top:50%; left:50%; transform:translate(-50%,-60%); font-size:60px; opacity:0.35; transition:opacity var(--duration) var(--ease), transform var(--duration) var(--ease); } /* backdrop-filter blur on overlay — applied to the ::before pseudo so it blurs the sibling bg */ .ih-04__overlay { position:absolute; inset:0; background:rgba(0,0,0,0); /* We use backdrop-filter on the overlay itself */ backdrop-filter:blur(0px) brightness(1); -webkit-backdrop-filter:blur(0px) brightness(1); transition:backdrop-filter var(--duration) var(--ease), -webkit-backdrop-filter var(--duration) var(--ease), background var(--duration) var(--ease); display:flex; flex-direction:column; justify-content:flex-end; padding:20px; } .ih-04__card:hover .ih-04__bg { transform:scale(1.05); } .ih-04__card:hover .ih-04__emoji { opacity:0.08; transform:translate(-50%,-60%) scale(1.2); } .ih-04__card:hover .ih-04__overlay { backdrop-filter:blur(8px) brightness(0.6); -webkit-backdrop-filter:blur(8px) brightness(0.6); background:rgba(0,0,0,0.15); } .ih-04__cat { font-size:10px; font-weight:700; letter-spacing:0.12em; text-transform:uppercase; color:var(--accent); margin-bottom:6px; opacity:0; transform:translateY(10px); transition:opacity var(--duration) var(--ease), transform var(--duration) var(--ease); } .ih-04__title { font-size:15px; font-weight:700; color:var(--text); line-height:1.3; opacity:0; transform:translateY(12px); transition:opacity calc(var(--duration)*1.1) var(--ease), transform calc(var(--duration)*1.1) var(--ease); } .ih-04__desc { font-size:11px; color:var(--muted); margin-top:5px; opacity:0; transform:translateY(14px); transition:opacity calc(var(--duration)*1.2) var(--ease), transform calc(var(--duration)*1.2) var(--ease); } .ih-04__card:hover .ih-04__cat, .ih-04__card:hover .ih-04__title, .ih-04__card:hover .ih-04__desc { opacity:1; transform:none; } @media (prefers-reduced-motion:reduce) { .ih-04__bg,.ih-04__overlay,.ih-04__cat,.ih-04__title,.ih-04__desc,.ih-04__emoji { transition:none; } .ih-04__overlay { backdrop-filter:blur(8px) brightness(0.6); } .ih-04__cat,.ih-04__title,.ih-04__desc { opacity:1; transform:none; } } ``` ### 05. CSS Card Slide Up Caption on Hover **Type:** Pure CSS **Description:** A caption panel anchored at the bottom that slides up into view from below the image frame, revealing metadata and a category pill. **HTML:** ```html
        🎵
        Synthwave

        Neon Highways

        A 12-track journey through retro-futuristic soundscapes and pulsing basslines

        New Album
        🌊
        Ambient

        Ocean Mind

        Meditative binaural compositions recorded at the Faroe Islands coastline

        EP Release
        🔮
        Electronic

        Violet Frequencies

        Experimental club music blending modular synthesis and jazz improvisation

        Single
        ``` **CSS:** ```css .ih-05,.ih-05 *,.ih-05 *::before,.ih-05 *::after{margin:0;padding:0;box-sizing:border-box} .ih-05 ::selection{background:#f472b6;color:#000} .ih-05{ --accent:#f472b6;--accent2:#818cf8;--bg:#0a0a10;--card:#141420;--text:#f1f5f9;--muted:#64748b; --duration:0.4s;--ease:cubic-bezier(0.16,1,0.3,1); font-family:system-ui,sans-serif;background:var(--bg);padding:40px 24px; min-height: 100vh;display:flex;align-items:center;justify-content:center; } .ih-05__grid{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;max-width:780px;width:100%} .ih-05__card{ position:relative;border-radius:12px;overflow:hidden;aspect-ratio:4/5;cursor:pointer; background:var(--card);border:1px solid rgba(255,255,255,0.05); } .ih-05__img{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;transition:transform var(--duration) var(--ease)} .ih-05__img--1{background:linear-gradient(150deg,#0d0d1a 0%,#1e1b4b 60%,#312e81 100%)} .ih-05__img--2{background:linear-gradient(150deg,#042f2e 0%,#0f766e 60%,#2dd4bf 100%)} .ih-05__img--3{background:linear-gradient(150deg,#1a0626 0%,#6b21a8 60%,#c084fc 100%)} .ih-05__card:hover .ih-05__img{transform:scale(1.06) translateY(-4px)} .ih-05__icon{font-size:56px;opacity:0.35;transition:opacity var(--duration) var(--ease)} .ih-05__card:hover .ih-05__icon{opacity:0.12} /* The caption panel slides up from the bottom */ .ih-05__caption{ position:absolute;bottom:0;left:0;right:0; background:linear-gradient(to top, rgba(0,0,0,0.92) 0%, rgba(0,0,0,0.7) 60%, transparent 100%); padding:40px 16px 16px; transform:translateY(calc(100% - 44px)); transition:transform var(--duration) var(--ease); } .ih-05__card:hover .ih-05__caption{transform:translateY(0)} .ih-05__peek{ font-size:12px;font-weight:600;color:var(--text);margin-bottom:10px; display:flex;align-items:center;gap:6px; } .ih-05__dot{width:6px;height:6px;border-radius:50%;background:var(--accent);flex-shrink:0} .ih-05__title{font-size:14px;font-weight:700;color:var(--text);margin-bottom:6px} .ih-05__meta{font-size:11px;color:var(--muted);line-height:1.5} .ih-05__pill{ display:inline-block;margin-top:8px;padding:3px 8px;border-radius:20px; background:rgba(244,114,182,0.15);border:1px solid rgba(244,114,182,0.3); font-size:10px;font-weight:700;color:var(--accent);letter-spacing:0.06em; } @media(prefers-reduced-motion:reduce){ .ih-05__img,.ih-05__icon,.ih-05__caption{transition:none} .ih-05__caption{transform:none} } ``` ### 06. CSS Grayscale to Color Image Hover **Type:** Pure CSS **Description:** Team-bio technique where images start in desaturated grayscale and animate to full colour with a slight saturation boost on hover. **HTML:** ```html
        👩‍💻

        Aria Chen

        Lead Engineer

        👨‍🎨

        Marcus Webb

        Creative Director

        👩‍🔬

        Priya Nair

        Research Scientist

        👨‍💼

        Leo Santos

        Product Strategist

        ``` **CSS:** ```css .ih-06,.ih-06 *,.ih-06 *::before,.ih-06 *::after{margin:0;padding:0;box-sizing:border-box} .ih-06 ::selection{background:#22d3ee;color:#000} .ih-06{ --accent:#22d3ee;--bg:#09090f;--text:#f1f5f9;--muted:#475569; --duration:0.55s;--ease:cubic-bezier(0.25,0.46,0.45,0.94); font-family:system-ui,sans-serif;background:var(--bg);padding:40px 24px; min-height: 100vh;display:flex;align-items:center;justify-content:center; } .ih-06__grid{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;max-width:780px;width:100%} .ih-06__card{position:relative;border-radius:10px;overflow:hidden;cursor:pointer;aspect-ratio:3/4} /* filter:grayscale() + saturate() is the key technique — hardware accelerated */ .ih-06__img{ position:absolute;inset:0;width:100%;height:100%; display:flex;align-items:center;justify-content:center; filter:grayscale(1) brightness(0.75) saturate(0); transition:filter var(--duration) var(--ease), transform var(--duration) var(--ease); } .ih-06__card:hover .ih-06__img{filter:grayscale(0) brightness(1) saturate(1.2);transform:scale(1.04)} .ih-06__img--1{background: linear-gradient(135deg,#1e3a5f,#1e40af,#3b82f6,#93c5fd)} .ih-06__img--2{background: linear-gradient(135deg,#431407,#9a3412,#ef4444,#fca5a5)} .ih-06__img--3{background: linear-gradient(135deg,#064e3b,#065f46,#10b981,#6ee7b7)} .ih-06__img--4{background: linear-gradient(135deg,#3b0764,#7e22ce,#a855f7,#e9d5ff)} .ih-06__emoji{font-size:52px;opacity:0.6;filter:grayscale(1);transition:filter var(--duration) var(--ease)} .ih-06__card:hover .ih-06__emoji{filter:grayscale(0)} .ih-06__info{position:absolute;bottom:0;left:0;right:0;padding:12px;background:linear-gradient(to top,rgba(0,0,0,0.8),transparent)} .ih-06__name{font-size:12px;font-weight:700;color:var(--text)} .ih-06__role{font-size:10px;color:var(--muted);margin-top:2px;transition:color var(--duration) var(--ease)} .ih-06__card:hover .ih-06__role{color:var(--accent)} /* Coloured border reveal on hover */ .ih-06__card::after{ content:'';position:absolute;inset:0;border-radius:10px; border:2px solid transparent; transition:border-color var(--duration) var(--ease); pointer-events:none; } .ih-06__card:hover::after{border-color:rgba(34,211,238,0.4)} @media(prefers-reduced-motion:reduce){.ih-06__img,.ih-06__emoji,.ih-06__role,.ih-06__card::after{transition:none}.ih-06__img{filter:none}} ``` ### 07. CSS Image Color Overlay Tint on Hover **Type:** Pure CSS **Description:** Brand-tint hover where a per-card accent colour washes over a neutral image using mix-blend-mode to preserve the underlying texture. **HTML:** ```html
        🏗️
        Brand A

        Ember Orange Tint

        💡
        Brand B

        Pacific Blue Tint

        🔮
        Brand C

        Deep Violet Tint

        ``` **CSS:** ```css .ih-07,.ih-07 *,.ih-07 *::before,.ih-07 *::after{margin:0;padding:0;box-sizing:border-box} .ih-07 ::selection{background:#f97316;color:#000} .ih-07{ --bg:#0d0d0f;--text:#f1f5f9;--muted:#94a3b8; --duration:0.38s;--ease:cubic-bezier(0.25,0.46,0.45,0.94); font-family:system-ui,sans-serif;background:var(--bg);padding:40px 24px; min-height: 100vh;display:flex;align-items:center;justify-content:center; } .ih-07__grid{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;max-width:780px;width:100%} .ih-07__card{position:relative;border-radius:14px;overflow:hidden;aspect-ratio:1;cursor:pointer} .ih-07__img{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;transition:transform var(--duration) var(--ease)} .ih-07__img--1{background-image: url('https://picsum.photos/seed/landscape-orange/600/600'), linear-gradient(135deg,#111827,#1f2937,#374151); background-size: cover; background-position: center; background-repeat: no-repeat} .ih-07__img--2{background-image: url('https://picsum.photos/seed/landscape-blue/600/600'), linear-gradient(135deg,#0c0c0c,#1c1c1e,#2c2c2e); background-size: cover; background-position: center; background-repeat: no-repeat} .ih-07__img--3{background-image: url('https://picsum.photos/seed/landscape-violet/600/600'), linear-gradient(135deg,#0f0f14,#1a1a24,#252535); background-size: cover; background-position: center; background-repeat: no-repeat} .ih-07__card:hover .ih-07__img{transform:scale(1.06)} .ih-07__icon{font-size:56px;opacity:0.5;transition:opacity var(--duration) var(--ease)} .ih-07__card:hover .ih-07__icon{opacity:0.2} /* The tint overlay uses a CSS custom property for the brand colour per card */ .ih-07__tint{ position:absolute;inset:0; background:var(--tint-color); opacity:0; transition:opacity var(--duration) var(--ease); mix-blend-mode:color; /* blend mode keeps underlying texture visible */ } .ih-07__card:hover .ih-07__tint{opacity:0.7} /* Dark overlay under the text (separate from tint so blend mode doesn't affect it) */ .ih-07__label{ position:absolute;inset:0;display:flex;flex-direction:column;align-items:center; justify-content:center;gap:6px; } .ih-07__name{font-size:14px;font-weight:700;color:var(--text);opacity:0;transform:scale(0.9);transition:opacity var(--duration) var(--ease),transform var(--duration) var(--ease)} .ih-07__card:hover .ih-07__name{opacity:1;transform:none} .ih-07__card:first-child { --tint-color: #f97316; } /* orange */ .ih-07__card:nth-child(2) { --tint-color: #3b82f6; } /* blue */ .ih-07__card:nth-child(3) { --tint-color: #8b5cf6; } /* violet */ .ih-07__corner-tag{ position:absolute;top:10px;left:10px; background:rgba(255,255,255,0.08);border:1px solid rgba(255,255,255,0.1); border-radius:6px;padding:3px 8px;font-size:10px;font-weight:600;color:var(--muted); } @media(prefers-reduced-motion:reduce){.ih-07__img,.ih-07__tint,.ih-07__icon,.ih-07__name{transition:none}.ih-07__tint{opacity:0.5}.ih-07__name{opacity:1;transform:none}} ``` ### 08. Neumorphic Image Card Hover Effect CSS **Type:** Pure CSS **Description:** Soft-UI cards that shift from an extruded dual-shadow state to an inset "pressed" shadow on hover, mimicking tactile depth. **HTML:** ```html
        🎮

        Phantom Controller

        Haptic · Wireless · 40h

        $89
        🎧

        AquaTone Studio

        ANC · Hi-Res · 60h

        $229
        💻

        NovaPad Ultra

        OLED · 12-core · 18h

        $1,299
        ``` **CSS:** ```css .ih-08,.ih-08 *,.ih-08 *::before,.ih-08 *::after{margin:0;padding:0;box-sizing:border-box} .ih-08 ::selection{background:#6366f1;color:#fff} .ih-08{ --nm-bg:#1e1e2a;--nm-light:rgba(255,255,255,0.05);--nm-dark:rgba(0,0,0,0.45); --accent:#6366f1;--accent2:#22d3ee;--text:#e2e8f0;--muted:#64748b; --duration:0.4s;--ease:cubic-bezier(0.25,0.46,0.45,0.94); font-family:system-ui,sans-serif;background:var(--nm-bg);padding:40px 24px; min-height: 100vh;display:flex;align-items:center;justify-content:center; } .ih-08__grid{display:grid;grid-template-columns:repeat(3,1fr);gap:24px;max-width:780px;width:100%} /* Neumorphic base: dual shadow (light top-left, dark bottom-right) */ .ih-08__card{ background:var(--nm-bg);border-radius:20px;padding:12px;cursor:pointer; box-shadow:6px 6px 16px var(--nm-dark), -4px -4px 12px var(--nm-light); transition:box-shadow var(--duration) var(--ease), transform var(--duration) var(--ease); } /* Hover: inset shadow = pressed state */ .ih-08__card:hover{ box-shadow:inset 4px 4px 10px var(--nm-dark), inset -3px -3px 8px var(--nm-light); transform:scale(0.98); } .ih-08__img-frame{ border-radius:12px;overflow:hidden;aspect-ratio:1;position:relative; box-shadow:inset 2px 2px 6px var(--nm-dark),inset -1px -1px 4px var(--nm-light); } .ih-08__img{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;transition:transform var(--duration) var(--ease)} .ih-08__img--1{background:linear-gradient(135deg,#1e1b4b,#312e81,#4338ca)} .ih-08__img--2{background:linear-gradient(135deg,#0c4a6e,#075985,#38bdf8)} .ih-08__img--3{background:linear-gradient(135deg,#3b0764,#6b21a8,#a855f7)} .ih-08__card:hover .ih-08__img{transform:scale(1.04)} .ih-08__icon{font-size:48px;opacity:0.45} .ih-08__body{padding:12px 4px 4px} .ih-08__title{font-size:13px;font-weight:700;color:var(--text);margin-bottom:3px} .ih-08__sub{font-size:11px;color:var(--muted)} .ih-08__foot{display:flex;align-items:center;justify-content:space-between;margin-top:10px} .ih-08__price{font-size:15px;font-weight:700;color:var(--accent)} /* Neumorphic pill button */ .ih-08__btn{ padding:5px 12px;border-radius:20px;font-size:10px;font-weight:700; color:var(--text);letter-spacing:0.06em; background:var(--nm-bg); box-shadow:3px 3px 8px var(--nm-dark), -2px -2px 6px var(--nm-light); transition:box-shadow 0.2s ease;border:none;cursor:pointer; } .ih-08__btn:hover{box-shadow:inset 2px 2px 6px var(--nm-dark),inset -1px -1px 4px var(--nm-light)} @media(prefers-reduced-motion:reduce){.ih-08__card,.ih-08__img{transition:none}} ``` ### 09. Glassmorphism Overlay on Image Hover **Type:** Pure CSS **Description:** A frosted-glass descriptive card slides up from below the image frame on hover, using backdrop-filter for the blurred panel effect. **HTML:** ```html
        🌸

        Spring Collection

        Collection

        Spring Bloom 2025

        Ethereal violet pieces inspired by cherry blossom season

        🍃

        Earth Tones

        Sustainable

        Forest Origins

        Organic cotton pieces dyed with natural plant extracts

        🌊

        Azure Line

        Limited

        Azure Coast

        Mediterranean-inspired linen pieces for summer living

        ``` **CSS:** ```css .ih-09,.ih-09 *,.ih-09 *::before,.ih-09 *::after{margin:0;padding:0;box-sizing:border-box} .ih-09 ::selection{background:rgba(139,92,246,0.8);color:#fff} .ih-09{ --accent:#8b5cf6;--accent2:#34d399;--bg:#060611;--text:#f1f5f9;--muted:#94a3b8; --duration:0.45s;--ease:cubic-bezier(0.16,1,0.3,1); font-family:system-ui,sans-serif;background:var(--bg);padding:40px 24px; min-height: 100vh;display:flex;align-items:center;justify-content:center; } .ih-09__grid{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;max-width:780px;width:100%} .ih-09__card{position:relative;border-radius:16px;overflow:hidden;aspect-ratio:3/4;cursor:pointer} .ih-09__bg{position:absolute;inset:0;transition:transform var(--duration) var(--ease);display:flex;align-items:center;justify-content:center} .ih-09__bg--1{background:linear-gradient(145deg,#1a0a2e,#2d1b69,#4c1d95,#7c3aed)} .ih-09__bg--2{background:linear-gradient(145deg,#022c22,#065f46,#059669,#34d399)} .ih-09__bg--3{background:linear-gradient(145deg,#0c1445,#1e3a8a,#1d4ed8,#60a5fa)} .ih-09__card:hover .ih-09__bg{transform:scale(1.08)} .ih-09__icon{font-size:60px;opacity:0.3;transition:opacity var(--duration) var(--ease)} .ih-09__card:hover .ih-09__icon{opacity:0.08} /* The glass card: backdrop-filter applies to everything behind it in the stacking context */ .ih-09__glass{ position:absolute;left:12px;right:12px;bottom:12px; background:rgba(255,255,255,0.08); backdrop-filter:blur(12px) saturate(1.5); -webkit-backdrop-filter:blur(12px) saturate(1.5); border:1px solid rgba(255,255,255,0.15); border-radius:12px;padding:16px; transform:translateY(calc(100% + 16px)); opacity:0; transition:transform var(--duration) var(--ease), opacity var(--duration) var(--ease); } .ih-09__card:hover .ih-09__glass{transform:translateY(0);opacity:1} .ih-09__glass-label{font-size:9px;font-weight:700;letter-spacing:0.12em;text-transform:uppercase;color:var(--accent);margin-bottom:6px} .ih-09__glass-title{font-size:14px;font-weight:700;color:var(--text);margin-bottom:4px} .ih-09__glass-desc{font-size:11px;color:rgba(241,245,249,0.7);line-height:1.5} .ih-09__glass-footer{display:flex;align-items:center;justify-content:space-between;margin-top:10px} .ih-09__glass-stat{font-size:10px;color:var(--muted)} .ih-09__glass-cta{font-size:10px;font-weight:700;color:var(--accent);letter-spacing:0.06em} /* Static bottom gradient so card has content even before hover */ .ih-09__static{position:absolute;bottom:0;left:0;right:0;padding:16px;background:linear-gradient(to top,rgba(0,0,0,0.7) 0%,transparent 100%)} .ih-09__static-name{font-size:13px;font-weight:600;color:var(--text);transition:opacity var(--duration) var(--ease)} .ih-09__card:hover .ih-09__static-name{opacity:0} @media(prefers-reduced-motion:reduce){ .ih-09__bg,.ih-09__icon,.ih-09__glass,.ih-09__static-name{transition:none} .ih-09__glass{transform:none;opacity:1} } ``` ### 10. CSS Glowing Neon Border Image Hover **Type:** Pure CSS **Description:** Gaming-card style hover where vibrant box-shadow glows activate around the card border, driven by per-card CSS custom properties. **HTML:** ```html

        Cipher X9 GPU

        24GB GDDR7 · Ray Tracing

        ★ 98 / 100 Performance

        🖥️

        Horizon 4K OLED

        240Hz · 1ms GTG · HDR

        ★ 96 / 100 Visuals

        ⌨️

        Spectra 75% MK

        Optical · Per-key RGB

        ★ 94 / 100 Feel

        ``` **CSS:** ```css .ih-10,.ih-10 *,.ih-10 *::before,.ih-10 *::after{margin:0;padding:0;box-sizing:border-box} .ih-10 ::selection{background:#f0abfc;color:#000} .ih-10{ --c1:#f0abfc;--c2:#22d3ee;--c3:#86efac;--bg:#030308;--text:#f1f5f9;--muted:#64748b; --duration:0.4s;--ease:cubic-bezier(0.25,0.46,0.45,0.94); font-family:system-ui,sans-serif;background:var(--bg);padding:40px 24px; min-height: 100vh;display:flex;align-items:center;justify-content:center; } .ih-10__grid{display:grid;grid-template-columns:repeat(3,1fr);gap:20px;max-width:780px;width:100%} /* The glow uses box-shadow — much cheaper than drop-shadow on GPU */ .ih-10__card{ position:relative;border-radius:14px;overflow:hidden;cursor:pointer; border:1px solid rgba(255,255,255,0.06); transition:box-shadow var(--duration) var(--ease), border-color var(--duration) var(--ease); } .ih-10__card--1:hover{box-shadow:0 0 0 1px var(--c1),0 0 20px var(--c1),0 0 60px rgba(240,171,252,0.25);border-color:var(--c1)} .ih-10__card--2:hover{box-shadow:0 0 0 1px var(--c2),0 0 20px var(--c2),0 0 60px rgba(34,211,238,0.25);border-color:var(--c2)} .ih-10__card--3:hover{box-shadow:0 0 0 1px var(--c3),0 0 20px var(--c3),0 0 60px rgba(134,239,172,0.25);border-color:var(--c3)} .ih-10__img{aspect-ratio:1;display:flex;align-items:center;justify-content:center;transition:transform var(--duration) var(--ease)} .ih-10__img--1{background:linear-gradient(135deg,#150824,#3b0764,#6b21a8)} .ih-10__img--2{background:linear-gradient(135deg,#041e2b,#0c4a6e,#0369a1)} .ih-10__img--3{background:linear-gradient(135deg,#052013,#064e3b,#065f46)} .ih-10__card:hover .ih-10__img{transform:scale(1.04)} /* Animated corner accents */ .ih-10__img::before,.ih-10__img::after{ content:'';position:absolute;width:16px;height:16px;opacity:0; transition:opacity var(--duration) var(--ease); } .ih-10__img::before{top:8px;left:8px;border-top:2px solid currentColor;border-left:2px solid currentColor} .ih-10__img::after{bottom:8px;right:8px;border-bottom:2px solid currentColor;border-right:2px solid currentColor} .ih-10__card--1 .ih-10__img{color:var(--c1)} .ih-10__card--2 .ih-10__img{color:var(--c2)} .ih-10__card--3 .ih-10__img{color:var(--c3)} .ih-10__card:hover .ih-10__img::before,.ih-10__card:hover .ih-10__img::after{opacity:1} .ih-10__icon{font-size:52px;opacity:0.4;transition:opacity var(--duration) var(--ease)} .ih-10__card:hover .ih-10__icon{opacity:0.2} .ih-10__body{padding:14px 16px;background:rgba(0,0,0,0.3)} .ih-10__title{font-size:13px;font-weight:700;color:var(--text)} .ih-10__sub{font-size:11px;color:var(--muted);margin-top:3px} .ih-10__score{ font-size:12px;font-weight:800;margin-top:8px; background:linear-gradient(90deg,var(--c1),var(--c2)); -webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text; } .ih-10__card--2 .ih-10__score{background:linear-gradient(90deg,var(--c2),var(--c3));-webkit-background-clip:text;background-clip:text} .ih-10__card--3 .ih-10__score{background:linear-gradient(90deg,var(--c3),var(--c1));-webkit-background-clip:text;background-clip:text} @media(prefers-reduced-motion:reduce){.ih-10__card,.ih-10__img,.ih-10__icon,.ih-10__img::before,.ih-10__img::after{transition:none}} ``` ### 11. CSS Image Clip-Path Transition Hover **Type:** Pure CSS **Description:** Geometric shape morphing where images transition between circles, diamonds, and polygons via interpolated clip-path values on hover. **HTML:** ```html
        🌕

        CircleRounded Rect

        Orbital Shift

        💎

        DiamondCircle

        Gem Reveal

        HexWide Hex + Spin

        Lattice Morph

        ``` **CSS:** ```css .ih-11,.ih-11 *,.ih-11 *::before,.ih-11 *::after{margin:0;padding:0;box-sizing:border-box} .ih-11 ::selection{background:#e879f9;color:#000} .ih-11{ --accent:#e879f9;--bg:#08080d;--text:#f1f5f9;--muted:#64748b; --duration:0.5s;--ease:cubic-bezier(0.34,1.56,0.64,1); font-family:system-ui,sans-serif;background:var(--bg);padding:40px 24px; min-height: 100vh;display:flex;align-items:center;justify-content:center; } .ih-11__grid{display:grid;grid-template-columns:repeat(3,1fr);gap:20px;max-width:780px;width:100%} .ih-11__item{display:flex;flex-direction:column;align-items:center;gap:12px;cursor:pointer} /* clip-path morphs the image shape on hover */ .ih-11__frame{ width:100%;aspect-ratio:1;position:relative;overflow:visible; } .ih-11__img{ width:100%;height:100%;display:flex;align-items:center;justify-content:center; transition:clip-path var(--duration) var(--ease), transform var(--duration) var(--ease); } /* Starting shapes */ .ih-11__img--circle{ clip-path:circle(42% at 50% 50%); background:radial-gradient(circle,#2d1b69,#4c1d95,#7c3aed); } .ih-11__img--diamond{ clip-path:polygon(50% 0%,100% 50%,50% 100%,0% 50%); background:radial-gradient(circle,#042f2e,#065f46,#34d399); } .ih-11__img--hexagon{ clip-path:polygon(50% 0%,100% 25%,100% 75%,50% 100%,0% 75%,0% 25%); background:radial-gradient(circle,#1c1917,#92400e,#f59e0b); } /* Hover shapes */ .ih-11__item:hover .ih-11__img--circle{ clip-path:polygon(10% 0%,90% 0%,100% 10%,100% 90%,90% 100%,10% 100%,0% 90%,0% 10%); transform:scale(1.05); } .ih-11__item:hover .ih-11__img--diamond{ clip-path:circle(48% at 50% 50%); transform:scale(1.05); } .ih-11__item:hover .ih-11__img--hexagon{ clip-path:polygon(25% 0%,75% 0%,100% 50%,75% 100%,25% 100%,0% 50%); transform:scale(1.05) rotate(30deg); } .ih-11__icon{font-size:44px;opacity:0.5} /* Shape label */ .ih-11__labels{text-align:center} .ih-11__shape-from{font-size:10px;color:var(--muted);letter-spacing:0.08em} .ih-11__arrow{color:var(--accent);margin:0 4px} .ih-11__shape-to{font-size:10px;color:var(--accent);font-weight:700} .ih-11__name{font-size:13px;font-weight:700;color:var(--text);margin-top:3px} @media(prefers-reduced-motion:reduce){.ih-11__img{transition:none}} ``` ### 12. CSS Image Tilt 3D Perspective Hover **Type:** CSS + JS **Description:** A mousemove-driven 3D tilt illusion using CSS perspective and rotational transforms, with a specular highlight that tracks the pointer position. **HTML:** ```html
        🔮

        Mystic Artifacts

        Interactive 3D collection

        🌿

        Botanical Studies

        Flora & fauna series

        🌊

        Ocean Depths

        Underwater photography

        ``` **CSS:** ```css .ih-12,.ih-12 *,.ih-12 *::before,.ih-12 *::after{margin:0;padding:0;box-sizing:border-box} .ih-12 ::selection{background:#38bdf8;color:#000} .ih-12{ --accent:#38bdf8;--bg:#060a12;--text:#f1f5f9;--muted:#64748b; font-family:system-ui,sans-serif;background:var(--bg);padding:40px 24px; min-height: 100vh;display:flex;align-items:center;justify-content:center; perspective:1200px; } .ih-12__grid{display:grid;grid-template-columns:repeat(3,1fr);gap:20px;max-width:780px;width:100%} .ih-12__card{ border-radius:16px;overflow:hidden;cursor:pointer; transform-style:preserve-3d; transition:box-shadow 0.3s ease; will-change:transform; /* transform applied by JS */ } .ih-12__card:hover{box-shadow:0 30px 80px rgba(0,0,0,0.6)} .ih-12__img{aspect-ratio:3/4;display:flex;align-items:center;justify-content:center;position:relative;overflow:hidden} .ih-12__img--1{background:linear-gradient(135deg,#0f0c29,#2d1b69,#7c3aed)} .ih-12__img--2{background:linear-gradient(135deg,#022c22,#065f46,#10b981)} .ih-12__img--3{background:linear-gradient(135deg,#0c1445,#1e3a8a,#3b82f6)} .ih-12__icon{font-size:52px;opacity:0.45;transition:opacity 0.3s ease} .ih-12__card:hover .ih-12__icon{opacity:0.2} /* Specular shine layer — moves opposite to tilt for realism */ .ih-12__shine{ position:absolute;inset:0; background:radial-gradient(circle at var(--mx,50%) var(--my,50%), rgba(255,255,255,0.12) 0%, transparent 60%); opacity:0;transition:opacity 0.3s ease; pointer-events:none; } .ih-12__card:hover .ih-12__shine{opacity:1} .ih-12__body{padding:14px;background:rgba(255,255,255,0.03);backdrop-filter:blur(2px)} .ih-12__title{font-size:13px;font-weight:700;color:var(--text)} .ih-12__sub{font-size:11px;color:var(--muted);margin-top:3px} ``` **JS:** ```js (function(){ const cards = document.querySelectorAll('.ih-12__card'); const INTENSITY = 18; cards.forEach(card => { const shine = card.querySelector('.ih-12__shine'); card.addEventListener('mousemove', e => { const r = card.getBoundingClientRect(); const x = (e.clientX - r.left) / r.width; const y = (e.clientY - r.top) / r.height; const rx = (y - 0.5) * -INTENSITY; const ry = (x - 0.5) * INTENSITY; card.style.transform = `perspective(800px) rotateX(${rx}deg) rotateY(${ry}deg) scale3d(1.02,1.02,1.02)`; if(shine){ shine.style.setProperty('--mx', (x*100)+'%'); shine.style.setProperty('--my', (y*100)+'%'); } }); card.addEventListener('mouseleave', () => { card.style.transform = 'perspective(800px) rotateX(0deg) rotateY(0deg) scale3d(1,1,1)'; card.style.transition = 'transform 0.5s cubic-bezier(0.25,0.46,0.45,0.94), box-shadow 0.3s ease'; setTimeout(() => { card.style.transition = ''; }, 500); }); }); })(); ``` ### 13. CSS Shining Light Glare Image Hover **Type:** Pure CSS **Description:** A linear-gradient sheen sweeps across the image on hover using a translateX-driven pseudo-element, simulating a light reflection glare. **HTML:** ```html
        🏆

        Premium

        Gold Tier Membership

        ★★★★★

        $49 / mo

        💳

        Exclusive

        Platinum Credit Card

        ★★★★★

        0% APR 18mo

        💎

        Diamond

        Crystal Pro Bundle

        ★★★★★

        $299 / yr

        ``` **CSS:** ```css .ih-13,.ih-13 *,.ih-13 *::before,.ih-13 *::after{margin:0;padding:0;box-sizing:border-box} .ih-13 ::selection{background:#fbbf24;color:#000} .ih-13{ --accent:#fbbf24;--bg:#0a0906;--text:#f1f5f9;--muted:#78716c; --duration:0.6s;--ease:cubic-bezier(0.4,0,0.2,1); font-family:system-ui,sans-serif;background:var(--bg);padding:40px 24px; min-height: 100vh;display:flex;align-items:center;justify-content:center; } .ih-13__grid{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;max-width:780px;width:100%} .ih-13__card{ position:relative;border-radius:14px;overflow:hidden;cursor:pointer; border:1px solid rgba(255,255,255,0.06); transition:border-color var(--duration) var(--ease), box-shadow var(--duration) var(--ease); } .ih-13__card:hover{border-color:rgba(251,191,36,0.3);box-shadow:0 8px 40px rgba(251,191,36,0.12)} .ih-13__img{aspect-ratio:4/3;display:flex;align-items:center;justify-content:center;overflow:hidden;position:relative} .ih-13__img--1{background:linear-gradient(135deg,#1c1003,#451a03,#92400e,#fbbf24)} .ih-13__img--2{background:linear-gradient(135deg,#0d0d0d,#1f1f1f,#404040,#a3a3a3)} .ih-13__img--3{background:linear-gradient(135deg,#1a0a24,#4c1d95,#7c3aed,#c4b5fd)} .ih-13__icon{font-size:48px;opacity:0.45;position:relative;z-index:1} /* The glare: a rotated linear-gradient pseudo-element that slides across */ .ih-13__img::after{ content:''; position:absolute;inset:-50%; width:40%;height:200%; background:linear-gradient( 105deg, transparent 40%, rgba(255,255,255,0.08) 45%, rgba(255,255,255,0.22) 50%, rgba(255,255,255,0.08) 55%, transparent 60% ); transform:translateX(-200%) skewX(-10deg); transition:transform var(--duration) cubic-bezier(0.4,0,0.2,1); } .ih-13__card:hover .ih-13__img::after{transform:translateX(300%) skewX(-10deg)} .ih-13__body{padding:14px 16px;background:rgba(0,0,0,0.4)} .ih-13__tag{font-size:9px;font-weight:700;letter-spacing:0.12em;text-transform:uppercase;color:var(--accent);margin-bottom:5px} .ih-13__title{font-size:14px;font-weight:700;color:var(--text)} .ih-13__price{font-size:16px;font-weight:800;color:var(--accent);margin-top:6px} .ih-13__stars{font-size:11px;color:var(--accent);margin-top:2px;letter-spacing:-1px} @media(prefers-reduced-motion:reduce){.ih-13__img::after,.ih-13__card{transition:none}.ih-13__img::after{display:none}} ``` ### 14. CSS Image Split Transition Hover **Type:** Pure CSS **Description:** Avant-garde hover where an image slices horizontally into two moving segments, revealing an action strip in the gap via clip-path. **HTML:** ```html
        🎨
        🎨
        01

        Digital Canvas

        View
        🌱
        🌱
        02

        Growth Series

        View
        03

        Power Study

        View
        ``` **CSS:** ```css .ih-14,.ih-14 *,.ih-14 *::before,.ih-14 *::after{margin:0;padding:0;box-sizing:border-box} .ih-14 ::selection{background:#fb7185;color:#000} .ih-14{ --accent:#fb7185;--accent2:#38bdf8;--bg:#070710;--text:#f1f5f9;--muted:#475569; --duration:0.5s;--ease:cubic-bezier(0.34,1.56,0.64,1); font-family:system-ui,sans-serif;background:var(--bg);padding:40px 24px; min-height: 100vh;display:flex;align-items:center;justify-content:center; } .ih-14__grid{display:grid;grid-template-columns:repeat(3,1fr);gap:20px;max-width:780px;width:100%} .ih-14__card{position:relative;aspect-ratio:3/4;border-radius:14px;overflow:hidden;cursor:pointer} /* Each card is split into two halves using clip-path */ .ih-14__half{ position:absolute;inset:0; display:flex;align-items:center;justify-content:center; transition:transform var(--duration) var(--ease), clip-path var(--duration) var(--ease); will-change:transform; } /* Top half */ .ih-14__half--top{clip-path:polygon(0 0,100% 0,100% 50%,0 50%)} /* Bottom half */ .ih-14__half--bot{clip-path:polygon(0 50%,100% 50%,100% 100%,0 100%)} /* On hover: halves slide apart */ .ih-14__card:hover .ih-14__half--top{transform:translateY(-6%)} .ih-14__card:hover .ih-14__half--bot{transform:translateY(6%)} .ih-14__half--1{background:linear-gradient(135deg,#1a0533,#4c1d95,#7c3aed)} .ih-14__half--2{background:linear-gradient(135deg,#042f2e,#065f46,#10b981)} .ih-14__half--3{background:linear-gradient(135deg,#1c1003,#92400e,#f59e0b)} .ih-14__icon{font-size:52px;opacity:0.4;transition:opacity var(--duration) var(--ease)} .ih-14__card:hover .ih-14__icon{opacity:0.1} /* Revealed content in the gap */ .ih-14__reveal{ position:absolute;top:50%;left:0;right:0; transform:translateY(-50%); padding:12px 16px; background:var(--bg); display:flex;align-items:center;justify-content:space-between; opacity:0; clip-path:inset(100% 0 100% 0); transition:opacity var(--duration) var(--ease), clip-path var(--duration) var(--ease); } .ih-14__card:hover .ih-14__reveal{opacity:1;clip-path:inset(0 0 0 0)} .ih-14__rev-title{font-size:12px;font-weight:700;color:var(--text)} .ih-14__rev-cta{font-size:10px;font-weight:700;padding:4px 10px;border-radius:20px;background:var(--accent);color:#fff} /* Static badge */ .ih-14__num{ position:absolute;top:12px;left:12px; font-size:22px;font-weight:900; color:rgba(255,255,255,0.12);line-height:1; } @media(prefers-reduced-motion:reduce){.ih-14__half,.ih-14__icon,.ih-14__reveal{transition:none}.ih-14__reveal{opacity:1;clip-path:inset(0)}.ih-14__half--top{transform:none}.ih-14__half--bot{transform:none}} ``` ### 15. CSS Image Ripple Animation Hover **Type:** Pure CSS **Description:** Concentric circle ripples emanate outward from a circular avatar on hover, driven by staggered keyframe animations on sibling span elements. **HTML:** ```html
        👩‍🚀

        Dr. Elena Vasquez

        Mission Architect

        🧙

        Orion Blackwood

        AI Research Lead

        👩‍🌾

        Freya Lindqvist

        Growth Engineer

        ``` **CSS:** ```css .ih-15,.ih-15 *,.ih-15 *::before,.ih-15 *::after{margin:0;padding:0;box-sizing:border-box} .ih-15 ::selection{background:#2dd4bf;color:#000} .ih-15{ --accent:#2dd4bf;--bg:#060d0d;--text:#f1f5f9;--muted:#64748b; font-family:system-ui,sans-serif;background:var(--bg);padding:40px 24px; min-height: 100vh;display:flex;align-items:center;justify-content:center; } .ih-15__grid{display:grid;grid-template-columns:repeat(3,1fr);gap:20px;max-width:780px;width:100%} .ih-15__item{display:flex;flex-direction:column;align-items:center;gap:14px;cursor:pointer} /* Ripple container — must be position:relative so pseudo rings use absolute */ .ih-15__frame{ position:relative;width:140px;height:140px; display:flex;align-items:center;justify-content:center; } .ih-15__avatar{ width:100px;height:100px;border-radius:50%; display:flex;align-items:center;justify-content:center; font-size:42px;position:relative;z-index:2; transition:transform 0.3s cubic-bezier(0.34,1.56,0.64,1); } .ih-15__avatar--1{background:radial-gradient(circle,#1e3a5f,#0369a1)} .ih-15__avatar--2{background:radial-gradient(circle,#3b0764,#7e22ce)} .ih-15__avatar--3{background:radial-gradient(circle,#052e16,#15803d)} .ih-15__item:hover .ih-15__avatar{transform:scale(1.08)} /* Three ripple rings using sibling spans — keyframe scales + fades */ .ih-15__ring{ position:absolute;border-radius:50%; border:2px solid var(--accent); opacity:0; animation:none; } .ih-15__item:hover .ih-15__ring{ animation:ih-15-ripple 1.5s cubic-bezier(0,0.2,0.8,1) infinite; } .ih-15__ring:nth-child(2){animation-delay:0s} .ih-15__ring:nth-child(3){animation-delay:0.5s} .ih-15__ring:nth-child(4){animation-delay:1s} @keyframes ih-15-ripple{ 0%{width:100px;height:100px;opacity:0.6;top:calc(50% - 50px);left:calc(50% - 50px)} 100%{width:140px;height:140px;opacity:0;top:calc(50% - 70px);left:calc(50% - 70px)} } /* Colour the rings per item */ .ih-15__item:nth-child(1) .ih-15__ring{border-color:#38bdf8} .ih-15__item:nth-child(2) .ih-15__ring{border-color:#c084fc} .ih-15__item:nth-child(3) .ih-15__ring{border-color:#4ade80} .ih-15__name{font-size:14px;font-weight:700;color:var(--text)} .ih-15__role{font-size:11px;color:var(--muted)} .ih-15__socials{display:flex;gap:8px;margin-top:4px} .ih-15__social{width:26px;height:26px;border-radius:50%;background:rgba(255,255,255,0.06);border:1px solid rgba(255,255,255,0.08);display:flex;align-items:center;justify-content:center;font-size:12px;transition:background 0.2s ease} .ih-15__item:hover .ih-15__social{background:rgba(255,255,255,0.1)} @media(prefers-reduced-motion:reduce){.ih-15__ring,.ih-15__avatar{animation:none!important;transition:none}} ``` ### 16. Circular Team Profile Avatar Hover CSS **Type:** Pure CSS **Description:** About-page avatar hover with a conic-gradient spinning border trail and slide-up social icon reveal driven by CSS animation-play-state. **HTML:** ```html
        👩‍💻

        Yuki Tanaka

        Frontend Eng.

        𝕏gh
        👨‍🎨

        Amara Diallo

        UX Designer

        𝕏be
        🧑‍🔬

        Ravi Patel

        Data Scientist

        𝕏in
        👩‍🚀

        Zoe Mercer

        DevOps Lead

        ghin
        ``` **CSS:** ```css .ih-16,.ih-16 *,.ih-16 *::before,.ih-16 *::after{margin:0;padding:0;box-sizing:border-box} .ih-16 ::selection{background:#a78bfa;color:#000} .ih-16{ --accent:#a78bfa;--accent2:#34d399;--bg:#080812;--text:#f1f5f9;--muted:#64748b; font-family:system-ui,sans-serif;background:var(--bg);padding:40px 24px; min-height: 100vh;display:flex;align-items:center;justify-content:center; } .ih-16__grid{display:grid;grid-template-columns:repeat(4,1fr);gap:20px;max-width:780px;width:100%} .ih-16__item{display:flex;flex-direction:column;align-items:center;gap:10px;cursor:pointer} /* Conic gradient spinning ring via pseudo-element */ .ih-16__wrap{ position:relative;width:80px;height:80px; } .ih-16__wrap::before{ content:'';position:absolute;inset:-3px;border-radius:50%; background:conic-gradient(from 0deg, transparent 0deg 270deg, var(--ring-color,var(--accent)) 270deg 360deg); opacity:0; transition:opacity 0.3s ease; animation:ih-16-spin 1.2s linear infinite paused; } .ih-16__item:hover .ih-16__wrap::before{opacity:1;animation-play-state:running} @keyframes ih-16-spin{to{transform:rotate(360deg)}} /* The avatar itself */ .ih-16__avatar{ position:relative;z-index:1; width:74px;height:74px;border-radius:50%;margin:3px; display:flex;align-items:center;justify-content:center;font-size:34px; transition:transform 0.35s cubic-bezier(0.34,1.56,0.64,1); } .ih-16__item:hover .ih-16__avatar{transform:scale(1.06)} .ih-16__avatar--1{background:radial-gradient(circle at 30% 30%,#4c1d95,#0f172a)} .ih-16__avatar--2{background:radial-gradient(circle at 30% 30%,#065f46,#0f172a)} .ih-16__avatar--3{background:radial-gradient(circle at 30% 30%,#92400e,#0f172a)} .ih-16__avatar--4{background:radial-gradient(circle at 30% 30%,#1e3a5f,#0f172a)} /* Individual ring colours */ .ih-16__item:nth-child(1) .ih-16__wrap{--ring-color:#a78bfa} .ih-16__item:nth-child(2) .ih-16__wrap{--ring-color:#34d399} .ih-16__item:nth-child(3) .ih-16__wrap{--ring-color:#fb923c} .ih-16__item:nth-child(4) .ih-16__wrap{--ring-color:#60a5fa} /* Social icons slide up on hover */ .ih-16__socials{ display:flex;gap:6px;margin-top:2px; transform:translateY(6px);opacity:0; transition:transform 0.3s cubic-bezier(0.16,1,0.3,1),opacity 0.3s ease; } .ih-16__item:hover .ih-16__socials{transform:none;opacity:1} .ih-16__s{font-size:12px;background:rgba(255,255,255,0.07);border-radius:4px;padding:2px 5px;color:var(--muted)} .ih-16__name{font-size:12px;font-weight:700;color:var(--text);text-align:center} .ih-16__role{font-size:10px;color:var(--muted);text-align:center} @media(prefers-reduced-motion:reduce){ .ih-16__wrap::before{animation:none} .ih-16__avatar,.ih-16__socials{transition:none} .ih-16__item:hover .ih-16__wrap::before{opacity:1} .ih-16__item:hover .ih-16__socials{opacity:1;transform:none} } ``` ### 17. CSS Fullscreen Background Image Hover **Type:** CSS + JS **Description:** Navigation hover that swaps the entire viewport background by toggling an is-active class on one of several stacked background panels. **HTML:** ```html ``` **CSS:** ```css .ih-17,.ih-17 *,.ih-17 *::before,.ih-17 *::after{margin:0;padding:0;box-sizing:border-box} .ih-17 ::selection{background:#f472b6;color:#000} .ih-17{ --accent:#f472b6;--bg:#06060a;--text:#f1f5f9;--muted:#64748b; --duration:0.6s;--ease:cubic-bezier(0.16,1,0.3,1); font-family:system-ui,sans-serif;background:var(--bg); min-height: 100vh;position:relative;overflow:hidden; } /* Background panels — opacity cross-fade controlled by JS data-active */ .ih-17__bg{ position:absolute;inset:0;opacity:0; transition:opacity var(--duration) var(--ease),transform var(--duration) var(--ease); transform:scale(1.04); pointer-events:none; } .ih-17__bg.is-active{opacity:1;transform:scale(1)} .ih-17__bg--0{background:linear-gradient(135deg,#060606,#111)} .ih-17__bg--1{background:linear-gradient(135deg,#0f0c29,#302b63,#24243e)} .ih-17__bg--2{background:linear-gradient(135deg,#042f2e,#065f46,#059669)} .ih-17__bg--3{background:linear-gradient(135deg,#1c1003,#451a03,#92400e)} .ih-17__bg--4{background:linear-gradient(135deg,#1a0533,#4c1d95,#7c3aed)} .ih-17__bg--5{background:linear-gradient(135deg,#0c1445,#1e3a8a,#1d4ed8)} /* Foreground nav list */ .ih-17__nav{ position:relative;z-index:2; display:flex;flex-direction:column;justify-content:center; min-height: 100vh;padding:40px; } .ih-17__kicker{font-size:10px;font-weight:700;letter-spacing:0.14em;text-transform:uppercase;color:var(--muted);margin-bottom:20px} .ih-17__list{list-style:none;display:flex;flex-direction:column;gap:4px} .ih-17__link{ display:flex;align-items:center;gap:12px; padding:10px 12px;border-radius:8px;cursor:pointer; transition:background 0.2s ease,color 0.2s ease; text-decoration:none; } .ih-17__link:hover,.ih-17__link.is-active{background:rgba(255,255,255,0.06)} .ih-17__num{font-size:11px;color:var(--muted);font-weight:600;width:22px;flex-shrink:0} .ih-17__label{ font-size:20px;font-weight:800;color:rgba(255,255,255,0.25); transition:color var(--duration) var(--ease), transform var(--duration) var(--ease); letter-spacing:-0.02em; } .ih-17__link:hover .ih-17__label, .ih-17__link.is-active .ih-17__label{ color:var(--text);transform:translateX(6px); } .ih-17__arrow{ margin-left:auto;opacity:0;color:var(--accent);font-size:16px; transform:translateX(-8px); transition:opacity 0.2s ease,transform 0.2s ease; } .ih-17__link:hover .ih-17__arrow,.ih-17__link.is-active .ih-17__arrow{opacity:1;transform:none} .ih-17__emoji{font-size:14px} ``` **JS:** ```js (function(){ const root = document.getElementById('ih-17-root'); if(!root)return; const links = root.querySelectorAll('.ih-17__link'); const bgs = root.querySelectorAll('.ih-17__bg'); function activate(idx){ bgs.forEach(b=>{b.classList.toggle('is-active',b.dataset.bg===String(idx))}); } links.forEach(link=>{ link.addEventListener('mouseenter',()=>activate(link.dataset.target)); link.addEventListener('mouseleave',()=>activate(0)); link.addEventListener('click',e=>e.preventDefault()); }); })(); ``` ### 18. CSS Masonry Gallery Zoom Hover **Type:** Pure CSS **Description:** Pinterest-style column masonry gallery where individual items zoom in on hover without disrupting the column flow via isolated overflow contexts. **HTML:** ```html
        🌌
        Cosmos
        🌿
        Flora
        🏜️
        Desert
        🌊
        Ocean
        🌺
        Bloom
        🧊
        Ice
        🔮
        Mystic
        🌲
        Forest
        Stars
        ``` **CSS:** ```css .ih-18,.ih-18 *,.ih-18 *::before,.ih-18 *::after{margin:0;padding:0;box-sizing:border-box} .ih-18 ::selection{background:#f43f5e;color:#fff} .ih-18{ --accent:#f43f5e;--bg:#08080c;--text:#f1f5f9;--muted:#64748b; --duration:0.4s;--ease:cubic-bezier(0.25,0.46,0.45,0.94); font-family:system-ui,sans-serif;background:var(--bg);padding:32px 24px; min-height: 100vh; } /* CSS Masonry via columns — no JS layout required */ .ih-18__masonry{ columns:3;column-gap:12px;max-width:780px;margin:0 auto; } .ih-18__item{ break-inside:avoid;margin-bottom:12px; position:relative;border-radius:10px;overflow:hidden;cursor:pointer; /* Isolate so zoom doesn't clip to the column boundary */ display:block; } .ih-18__img{ display:block;width:100%; display:flex;align-items:center;justify-content:center; transition:transform var(--duration) var(--ease); } .ih-18__item:hover .ih-18__img{transform:scale(1.08)} /* Heights via padding-top for aspect ratios */ .ih-18__img--tall { padding-top:140%; } .ih-18__img--sq { padding-top:100%; } .ih-18__img--wide { padding-top:65%; } .ih-18__img--a{background-image: url('https://picsum.photos/seed/masonry-a/600/600'), linear-gradient(150deg,#1a0533,#4c1d95,#7c3aed); background-size: cover; background-position: center; background-repeat: no-repeat} .ih-18__img--b{background-image: url('https://picsum.photos/seed/masonry-b/600/600'), linear-gradient(150deg,#042f2e,#065f46,#10b981); background-size: cover; background-position: center; background-repeat: no-repeat} .ih-18__img--c{background-image: url('https://picsum.photos/seed/masonry-c/600/600'), linear-gradient(150deg,#1c1003,#92400e,#f59e0b); background-size: cover; background-position: center; background-repeat: no-repeat} .ih-18__img--d{background-image: url('https://picsum.photos/seed/masonry-d/600/600'), linear-gradient(150deg,#0c1445,#1e3a8a,#3b82f6); background-size: cover; background-position: center; background-repeat: no-repeat} .ih-18__img--e{background-image: url('https://picsum.photos/seed/masonry-e/600/600'), linear-gradient(150deg,#1a0010,#9d174d,#f43f5e); background-size: cover; background-position: center; background-repeat: no-repeat} .ih-18__img--f{background-image: url('https://picsum.photos/seed/masonry-f/600/600'), linear-gradient(150deg,#082032,#1e3a5f,#0891b2); background-size: cover; background-position: center; background-repeat: no-repeat} .ih-18__img--g{background-image: url('https://picsum.photos/seed/masonry-g/600/600'), linear-gradient(150deg,#0f0c29,#312e81,#4f46e5); background-size: cover; background-position: center; background-repeat: no-repeat} .ih-18__img--h{background-image: url('https://picsum.photos/seed/masonry-h/600/600'), linear-gradient(150deg,#052e16,#14532d,#4ade80); background-size: cover; background-position: center; background-repeat: no-repeat} /* Hover overlay */ .ih-18__overlay{ position:absolute;inset:0; background:linear-gradient(to top,rgba(0,0,0,0.7) 0%,transparent 60%); opacity:0;transition:opacity var(--duration) var(--ease); display:flex;align-items:flex-end;padding:10px; } .ih-18__item:hover .ih-18__overlay{opacity:1} .ih-18__tag{font-size:10px;font-weight:700;color:#fff;background:rgba(244,63,94,0.7);border-radius:4px;padding:2px 6px} .ih-18__emoji{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);font-size:36px;opacity:0.3;pointer-events:none} @media(prefers-reduced-motion:reduce){.ih-18__img,.ih-18__overlay{transition:none}.ih-18__overlay{opacity:1}} ``` ### 19. CSS Image Icon Reveal Center Hover **Type:** Pure CSS **Description:** Thumbnail grid where the image darkens and an action icon (play, magnify, link) scales in at the exact centre on hover using transform origin. **HTML:** ```html
        🎬
        Intro Reel 20254.2k views
        🌿
        🔍
        Jungle Macro1.8k views
        🔮
        🔗
        Prism Study9.1k views
        🌅
        Golden Hour BTS3.3k views
        🌊
        🔍
        Deep Blue Series7.6k views
        🌺
        🔗
        Bloom Editorial2.9k views
        ``` **CSS:** ```css .ih-19,.ih-19 *,.ih-19 *::before,.ih-19 *::after{margin:0;padding:0;box-sizing:border-box} .ih-19 ::selection{background:#818cf8;color:#fff} .ih-19{ --accent:#818cf8;--bg:#07070e;--text:#f1f5f9;--muted:#475569; --duration:0.38s;--ease:cubic-bezier(0.16,1,0.3,1); font-family:system-ui,sans-serif;background:var(--bg);padding:40px 24px; min-height: 100vh;display:flex;align-items:center;justify-content:center; } .ih-19__grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;max-width:780px;width:100%} .ih-19__card{position:relative;border-radius:10px;overflow:hidden;aspect-ratio:4/3;cursor:pointer} .ih-19__img{position:absolute;inset:0;transition:filter var(--duration) var(--ease),transform var(--duration) var(--ease)} .ih-19__img--1{background:linear-gradient(135deg,#0f0c29,#312e81,#4338ca)} .ih-19__img--2{background:linear-gradient(135deg,#042f2e,#065f46,#059669)} .ih-19__img--3{background:linear-gradient(135deg,#3b0764,#7e22ce,#a855f7)} .ih-19__img--4{background:linear-gradient(135deg,#1c1003,#92400e,#d97706)} .ih-19__img--5{background:linear-gradient(135deg,#0c1445,#1e3a8a,#2563eb)} .ih-19__img--6{background:linear-gradient(135deg,#1a0010,#9d174d,#e11d48)} .ih-19__card:hover .ih-19__img{filter:brightness(0.4);transform:scale(1.06)} .ih-19__img-content{position:absolute;inset:0;display:flex;align-items:center;justify-content:center} .ih-19__thumb{font-size:40px;opacity:0.4;transition:opacity var(--duration) var(--ease), transform var(--duration) var(--ease)} .ih-19__card:hover .ih-19__thumb{opacity:0;transform:scale(0.7)} /* The center icon — scales in from 0 */ .ih-19__icon-wrap{ position:absolute;inset:0;display:flex;align-items:center;justify-content:center; opacity:0;transform:scale(0.5) rotate(-20deg); transition:opacity var(--duration) var(--ease), transform var(--duration) var(--ease); } .ih-19__card:hover .ih-19__icon-wrap{opacity:1;transform:scale(1) rotate(0deg)} .ih-19__icon-btn{ width:52px;height:52px;border-radius:50%; background:rgba(255,255,255,0.12); border:2px solid rgba(255,255,255,0.25); backdrop-filter:blur(8px); display:flex;align-items:center;justify-content:center; font-size:22px; transition:background 0.2s ease, transform 0.2s ease; } .ih-19__card:hover .ih-19__icon-btn:hover{background:rgba(255,255,255,0.22);transform:scale(1.1)} /* Bottom strip */ .ih-19__strip{ position:absolute;bottom:0;left:0;right:0;padding:8px 10px; background:linear-gradient(to top,rgba(0,0,0,0.8),transparent); display:flex;align-items:center;justify-content:space-between; } .ih-19__title{font-size:11px;font-weight:700;color:var(--text)} .ih-19__views{font-size:10px;color:var(--muted)} @media(prefers-reduced-motion:reduce){.ih-19__img,.ih-19__thumb,.ih-19__icon-wrap{transition:none}.ih-19__icon-wrap{opacity:1;transform:none}} ``` ### 20. CSS Image Card Flip 3D Animation Hover **Type:** Pure CSS **Description:** Cards that rotate 180deg on their Y-axis to reveal a back face with descriptive content, driven entirely by CSS 3D transforms. **HTML:** ```html
        🔭

        Cosmos Explorer

        Astrophotography

        Hover to flip
        🌌

        20-Week Course

        Master astrophotography from light pollution basics to deep-sky stacking in Photoshop.

        🌿

        Bio Systems

        Botany Research

        Hover to flip
        🧬

        Lab Access

        12 months of virtual lab sessions with live microscopy and specimen archive access.

        🎭

        Digital Arts

        Creative Studio

        Hover to flip
        🎨

        Creator Pack

        Unlimited generative art tools, 500+ premium assets, and weekly critique sessions.

        ``` **CSS:** ```css .ih-20,.ih-20 *,.ih-20 *::before,.ih-20 *::after{margin:0;padding:0;box-sizing:border-box} .ih-20 ::selection{background:#34d399;color:#000} .ih-20{ --accent:#34d399;--accent2:#818cf8;--bg:#07070f;--text:#f1f5f9;--muted:#64748b; --duration:0.65s;--ease:cubic-bezier(0.45,0,0.55,1); font-family:system-ui,sans-serif;background:var(--bg);padding:40px 24px; min-height: 100vh;display:flex;align-items:center;justify-content:center; perspective:1000px; } .ih-20__grid{display:grid;grid-template-columns:repeat(3,1fr);gap:20px;max-width:780px;width:100%} .ih-20__scene{perspective:800px;aspect-ratio:3/4} /* The flipper: transform-style:preserve-3d is the key */ .ih-20__flipper{ position:relative;width:100%;height:100%; transform-style:preserve-3d; transition:transform var(--duration) var(--ease); cursor:pointer; } .ih-20__scene:hover .ih-20__flipper{transform:rotateY(180deg)} /* Both faces share absolute positioning and backface-visibility:hidden */ .ih-20__front, .ih-20__back{ position:absolute;inset:0;border-radius:16px;overflow:hidden; backface-visibility:hidden;-webkit-backface-visibility:hidden; display:flex;flex-direction:column;justify-content:flex-end; } /* Back face pre-rotated so it shows on flip */ .ih-20__back{transform:rotateY(180deg);flex-direction:column;justify-content:center;align-items:center;padding:20px} .ih-20__front-img{ position:absolute;inset:0;display:flex;align-items:center;justify-content:center; } .ih-20__front-img--1{background:linear-gradient(145deg,#1e1b4b,#312e81,#4338ca,#818cf8)} .ih-20__front-img--2{background:linear-gradient(145deg,#052e16,#065f46,#059669,#34d399)} .ih-20__front-img--3{background:linear-gradient(145deg,#3b0764,#6b21a8,#9333ea,#e879f9)} .ih-20__back--1{background:linear-gradient(135deg,#13103a,#1e1b4b)} .ih-20__back--2{background:linear-gradient(135deg,#031b10,#052e16)} .ih-20__back--3{background:linear-gradient(135deg,#230335,#3b0764)} .ih-20__face-icon{font-size:56px;opacity:0.35;position:relative;z-index:1} .ih-20__front-label{position:relative;z-index:1;padding:16px;background:linear-gradient(to top,rgba(0,0,0,0.8),transparent)} .ih-20__front-name{font-size:14px;font-weight:700;color:var(--text)} .ih-20__front-cat{font-size:10px;color:var(--muted);margin-top:2px} /* Back content */ .ih-20__back-icon{font-size:36px;margin-bottom:12px} .ih-20__back-title{font-size:15px;font-weight:800;color:var(--text);text-align:center;margin-bottom:8px} .ih-20__back-desc{font-size:11px;color:var(--muted);text-align:center;line-height:1.5;margin-bottom:14px} .ih-20__back-cta{ padding:8px 18px;border-radius:24px; font-size:11px;font-weight:700;letter-spacing:0.05em; color:#000;background:var(--accent);border:none;cursor:pointer; transition:transform 0.2s ease,box-shadow 0.2s ease; } .ih-20__back-cta:hover{transform:scale(1.04);box-shadow:0 0 16px rgba(52,211,153,0.4)} .ih-20__back--3 .ih-20__back-cta{background:#e879f9;color:#000} .ih-20__back--3 .ih-20__back-cta:hover{box-shadow:0 0 16px rgba(232,121,249,0.4)} /* Flip hint badge */ .ih-20__hint{ position:absolute;top:10px;right:10px;z-index:2; background:rgba(255,255,255,0.07);border:1px solid rgba(255,255,255,0.1); border-radius:20px;padding:3px 8px;font-size:9px;font-weight:700;color:var(--muted); transition:opacity 0.3s ease; } .ih-20__scene:hover .ih-20__hint{opacity:0} @media(prefers-reduced-motion:reduce){.ih-20__flipper{transition:none}.ih-20__scene:hover .ih-20__flipper{transform:none}} ``` --- ## 28 CSS Input Field Designs URL: https://codefronts.com/components/css-input-fields/ Description: 28 hand-coded CSS input field designs — floating label, OTP, password strength, voice search, autocomplete, range slider, credit card and more. Semantic HTML, copy-paste ready. Demo count: 28 ### 01. Floating Label **Type:** Pure CSS **Description:** Classic floating label input. The placeholder lifts and shrinks above the field on focus — a calm, accessible pattern used across every modern product surface. **HTML:** ```html ``` **CSS:** ```css .if-float { position: relative; display: block; width: 100%; max-width: 280px; } .if-float input { width: 100%; box-sizing: border-box; padding: 18px 14px 8px; background: #1a1a22; border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 10px; color: #f0eeff; font-size: 14px; outline: none; transition: border-color 0.2s, background 0.2s; } .if-float input:focus { border-color: #7c6cff; background: #1f1f2a; } .if-float-label { position: absolute; left: 14px; top: 14px; font-size: 13px; color: #b8b6d4; pointer-events: none; transition: transform 0.2s, font-size 0.2s, color 0.2s; } .if-float input:focus + .if-float-label, .if-float input:not(:placeholder-shown) + .if-float-label { transform: translateY(-9px); font-size: 10px; color: #a78bfa; letter-spacing: 0.06em; text-transform: uppercase; } ``` ### 02. Underline Sweep **Type:** Pure CSS **Description:** Minimal underline-style input. The bottom border draws outward from the centre on focus — a subtle, premium touch driven by `:focus-within`. **HTML:** ```html ``` **CSS:** ```css .if-line { display: grid; gap: 6px; width: 100%; max-width: 280px; font-size: 11px; color: #b8b6d4; text-transform: uppercase; letter-spacing: 0.08em; } .if-line-wrap { position: relative; display: block; border-bottom: 1px solid rgba(255, 255, 255, 0.14); } .if-line-wrap::after { content: ""; position: absolute; left: 50%; right: 50%; bottom: -1px; height: 2px; background: linear-gradient(90deg, #ff6c8a, #ff9a76); transition: left 0.3s ease, right 0.3s ease; } .if-line-wrap:focus-within::after { left: 0; right: 0; } .if-line input { width: 100%; box-sizing: border-box; padding: 8px 0 9px; background: transparent; border: 0; outline: none; color: #f0eeff; font-size: 14px; letter-spacing: 0; text-transform: none; } .if-line input::placeholder { color: #b8b6d4; } ``` ### 03. Neon Glow **Type:** Pure CSS **Description:** Cyan neon-glow input. The border crisps and the box-shadow blooms on focus — perfect for dark dashboards, gaming UIs, and developer tools. **HTML:** ```html ``` **CSS:** ```css .if-neon { display: grid; gap: 6px; width: 100%; max-width: 280px; } .if-neon-label { font-family: "JetBrains Mono", monospace; font-size: 10px; letter-spacing: 0.18em; color: #6cffff; text-shadow: 0 0 8px rgba(108, 255, 255, 0.5); } .if-neon input { width: 100%; box-sizing: border-box; background: #0a0a14; border: 1px solid rgba(108, 255, 255, 0.4); border-radius: 6px; padding: 11px 14px; color: #fff; font-family: "JetBrains Mono", monospace; font-size: 13px; outline: none; transition: border-color 0.2s, box-shadow 0.2s, background 0.2s; } .if-neon input::placeholder { color: rgba(108, 255, 255, 0.45); } .if-neon input:focus { border-color: #6cffff; background: #0d1820; box-shadow: 0 0 0 1px #6cffff, 0 0 16px rgba(108, 255, 255, 0.45), inset 0 0 12px rgba(108, 255, 255, 0.12); } ``` ### 04. Glass Frosted **Type:** Pure CSS **Description:** Frosted-glass input on a soft gradient. Translucent surface with `backdrop-filter` blur and an inner highlight — an elegant fit for hero sections. **HTML:** ```html
        ``` **CSS:** ```css .if-glass { position: relative; width: 100%; max-width: 280px; border-radius: 14px; padding: 14px; isolation: isolate; overflow: hidden; } .if-glass-bg { position: absolute; inset: 0; z-index: -1; background: radial-gradient(40% 60% at 30% 30%, #f59e0b 0%, transparent 60%), radial-gradient(50% 60% at 80% 70%, #7c3aed 0%, transparent 60%), #0a0a14; filter: blur(24px); transform: scale(1.2); } .if-glass-field { display: grid; gap: 6px; font-size: 11px; color: rgba(255, 255, 255, 0.7); text-transform: uppercase; letter-spacing: 0.1em; } .if-glass-field input { width: 100%; box-sizing: border-box; background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.2); backdrop-filter: blur(20px) saturate(160%); -webkit-backdrop-filter: blur(20px) saturate(160%); border-radius: 10px; padding: 10px 12px; color: #fff; font-size: 14px; text-transform: none; letter-spacing: 0; outline: none; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18); transition: border-color 0.2s, background 0.2s; } .if-glass-field input::placeholder { color: rgba(255, 255, 255, 0.45); } .if-glass-field input:focus { border-color: rgba(255, 255, 255, 0.5); background: rgba(255, 255, 255, 0.16); } ``` ### 05. Notched Outline **Type:** Pure CSS **Description:** Material-style notched outline. The label sits inside a gap cut into the border. Subtle, professional, and works beautifully for forms with dense fields. **HTML:** ```html ``` **CSS:** ```css .if-notch { position: relative; display: block; width: 100%; max-width: 280px; } .if-notch input { width: 100%; box-sizing: border-box; padding: 13px 14px; background: transparent; border: 0; outline: none; color: #f0eeff; font-size: 14px; position: relative; z-index: 1; } .if-notch input::placeholder { color: transparent; } .if-notch-label { position: absolute; left: 14px; top: 13px; font-size: 13px; color: #b8b6d4; pointer-events: none; transition: opacity 0.15s; z-index: 2; } .if-notch input:focus ~ .if-notch-label, .if-notch input:not(:placeholder-shown) ~ .if-notch-label { opacity: 0; } .if-notch-frame { position: absolute; inset: 0; display: grid; grid-template-columns: 12px auto 1fr; pointer-events: none; } .if-notch-l, .if-notch-cut, .if-notch-r { border: 1px solid rgba(46, 184, 138, 0.35); transition: border-color 0.2s; } .if-notch-l { border-right: 0; border-radius: 8px 0 0 8px; } .if-notch-r { border-left: 0; border-radius: 0 8px 8px 0; } .if-notch-cut { border-left: 0; border-right: 0; position: relative; display: flex; align-items: center; padding: 0 6px; } .if-notch-cut > span { font-size: 10px; color: rgba(46, 184, 138, 0.85); font-weight: 600; background: #07070f; padding: 0 4px; letter-spacing: 0.06em; text-transform: uppercase; transform: translateY(-13px) scale(0); transform-origin: left center; transition: transform 0.2s ease; } .if-notch input:focus ~ .if-notch-frame .if-notch-cut > span, .if-notch input:not(:placeholder-shown) ~ .if-notch-frame .if-notch-cut > span { transform: translateY(-13px) scale(1); } .if-notch:focus-within .if-notch-l, .if-notch:focus-within .if-notch-cut, .if-notch:focus-within .if-notch-r { border-color: #2eb88a; } ``` ### 06. Liquid Border **Type:** Pure CSS **Description:** Animated stroke that draws around the field on focus. A small flourish that makes a single text input feel deliberate and premium. **HTML:** ```html ``` **CSS:** ```css .if-liquid { display: grid; gap: 6px; width: 100%; max-width: 280px; font-size: 11px; color: #b8b6d4; text-transform: uppercase; letter-spacing: 0.08em; } .if-liquid input { width: 100%; box-sizing: border-box; padding: 11px 14px; background: #1a1a22; border: 1px solid #2a2a36; border-radius: 8px; color: #f0eeff; font-size: 14px; letter-spacing: 0; text-transform: none; outline: none; background-image: linear-gradient(90deg, #fbbf24, #fbbf24), linear-gradient(0deg, #fbbf24, #fbbf24), linear-gradient(90deg, #fbbf24, #fbbf24), linear-gradient(0deg, #fbbf24, #fbbf24); background-repeat: no-repeat; background-size: 0 2px, 2px 0, 0 2px, 2px 0; background-position: 0 0, 100% 0, 100% 100%, 0 100%; transition: background-size 0.35s linear, border-color 0.2s; } .if-liquid input::placeholder { color: #b8b6d4; } .if-liquid input:focus { border-color: transparent; background-size: 100% 2px, 2px 100%, 100% 2px, 2px 100%; transition-delay: 0s, 0.35s, 0.7s, 1.05s; transition-duration: 0.35s; } ``` ### 07. Inline Validation **Type:** Pure CSS **Description:** Live `:valid` / `:invalid` feedback. Green tick when correct, red cross when not — driven by `:has()` and pseudo-elements, no JavaScript required. **HTML:** ```html ``` **CSS:** ```css .if-val { display: grid; gap: 6px; width: 100%; max-width: 280px; font-size: 11px; color: #b8b6d4; } .if-val-label { font-weight: 600; letter-spacing: 0.04em; } .if-val-wrap { position: relative; display: block; } .if-val input { width: 100%; box-sizing: border-box; padding: 11px 38px 11px 14px; background: #1a1a22; border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 8px; color: #f0eeff; font-size: 14px; outline: none; transition: border-color 0.2s, background 0.2s; } .if-val input:focus { border-color: #7c6cff; } .if-val-wrap::after { content: ""; position: absolute; right: 12px; top: 50%; transform: translateY(-50%) scale(0.5); width: 18px; height: 18px; border-radius: 50%; opacity: 0; transition: transform 0.2s, opacity 0.2s, background 0.2s; } .if-val:has(input:not(:placeholder-shown):invalid) input { border-color: rgba(239, 68, 68, 0.55); } .if-val:has(input:not(:placeholder-shown):invalid) .if-val-wrap::after { opacity: 1; transform: translateY(-50%) scale(1); background: #ef4444 url("data:image/svg+xml;utf8,") center/10px no-repeat; } .if-val:has(input:not(:placeholder-shown):valid) input { border-color: rgba(34, 197, 94, 0.55); } .if-val:has(input:not(:placeholder-shown):valid) .if-val-wrap::after { opacity: 1; transform: translateY(-50%) scale(1); background: #22c55e url("data:image/svg+xml;utf8,") center/10px no-repeat; } .if-val-help { font-size: 10.5px; color: #b8b6d4; } ``` ### 08. Search with Clear **Type:** Pure CSS **Description:** Search input with a leading magnifier icon and a trailing clear button. The clear control appears only when the field has content — handled with `:placeholder-shown`. **HTML:** ```html ``` **CSS:** ```css .if-search { position: relative; width: 100%; max-width: 280px; display: flex; align-items: center; background: #1a1a22; border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 999px; padding: 0 8px 0 36px; transition: border-color 0.2s, box-shadow 0.2s; } .if-search:focus-within { border-color: #60a5fa; box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.18); } .if-search-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: #b8b6d4; display: grid; place-items: center; } .if-search:focus-within .if-search-icon { color: #60a5fa; } .if-search input { flex: 1; min-width: 0; background: transparent; border: 0; outline: none; color: #f0eeff; font-size: 14px; padding: 11px 0; } .if-search input::placeholder { color: #b8b6d4; } .if-search input::-webkit-search-cancel-button { display: none; } .if-search-clear { display: grid; place-items: center; width: 22px; height: 22px; background: rgba(255, 255, 255, 0.06); border: 0; border-radius: 50%; color: #b8b6d4; cursor: pointer; transition: opacity 0.15s, background 0.15s, color 0.15s; } .if-search:has(input:placeholder-shown) .if-search-clear, .if-search:has(input[value=""]) .if-search-clear { opacity: 0; pointer-events: none; } .if-search-clear:hover { background: rgba(255, 255, 255, 0.12); color: #f0eeff; } ``` ### 09. Password Strength **Type:** Pure CSS **Description:** Sign-up password input with a live strength bar that grades red → amber → green. Driven by `:has(input:valid/:invalid)` — zero scoring JavaScript. **HTML:** ```html ``` **CSS:** ```css .if-pw { display: grid; gap: 6px; width: 100%; max-width: 280px; font-size: 11px; color: #b8b6d4; } .if-pw-label { font-weight: 600; } .if-pw input { width: 100%; box-sizing: border-box; padding: 11px 14px; background: #1a1a22; border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 8px; color: #f0eeff; font-size: 14px; outline: none; transition: border-color 0.2s; } .if-pw input:focus { border-color: #c084fc; } .if-pw-meter { position: relative; height: 4px; border-radius: 99px; background: rgba(255, 255, 255, 0.08); overflow: hidden; } .if-pw-fill { position: absolute; inset: 0; width: 0; background: linear-gradient(90deg, #ef4444, #f59e0b, #22c55e); border-radius: inherit; transition: width 0.3s ease; } .if-pw:has(input:placeholder-shown) .if-pw-fill { width: 0; } .if-pw:has(input:not(:placeholder-shown):invalid) .if-pw-fill { width: 30%; } .if-pw:has(input:not(:placeholder-shown):valid) .if-pw-fill { width: 65%; } .if-pw:has(input:focus:valid) .if-pw-fill { width: 100%; } .if-pw-hint { font-size: 10.5px; color: #b8b6d4; } .if-pw { display: grid; gap: 6px; width: 100%; max-width: 280px; } .if-pw-label { font-family: "JetBrains Mono", monospace; font-size: 10px; letter-spacing: 0.12em; color: #b8b6d4; text-transform: uppercase; } .if-pw-wrap { display: inline-flex; align-items: center; padding: 0 6px 0 14px; background: #1a1a22; border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 10px; transition: border-color 0.2s; } .if-pw-wrap:focus-within { border-color: #7c6cff; } .if-pw input { flex: 1; min-width: 0; padding: 12px 0; border: 0; outline: none; background: transparent; color: #f0eeff; font: 500 14px/1 system-ui, sans-serif; letter-spacing: 0.08em; } .if-pw input::placeholder { color: #b8b6d4; } .if-pw-toggle { width: 32px; height: 32px; border: 0; cursor: pointer; background: transparent; border-radius: 6px; display: flex; align-items: center; justify-content: center; transition: background 0.15s; } .if-pw-toggle:hover { background: rgba(255, 255, 255, 0.05); } .if-pw-toggle svg { width: 16px; height: 16px; fill: none; stroke: #b8b6d4; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; } .if-pw-eye-off { display: none; } .if-pw-toggle[aria-pressed="true"] .if-pw-eye { display: none; } .if-pw-toggle[aria-pressed="true"] .if-pw-eye-off { display: block; } .if-pw-toggle[aria-pressed="true"] svg { stroke: #7c6cff; } ``` ### 10. OTP Code **Type:** Light JS **Description:** One-time-passcode entry split across six boxes inside a single `
        `. Auto-advance, backspace step-back, and full paste-to-fill — `autocomplete="one-time-code"` drives SMS auto-suggest. **HTML:** ```html
        Verification code
        ``` **CSS:** ```css .if-otp { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; width: 100%; max-width: 280px; position: relative; } .if-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; } .if-otp input { width: 100%; box-sizing: border-box; aspect-ratio: 1 / 1; background: #1a1a22; border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 10px; 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; } .if-otp input:focus { border-color: #7c6cff; background: rgba(124, 108, 255, 0.1); transform: translateY(-1px); } ``` **JS:** ```js // OTP — auto-advance, backspace step-back, full paste-to-fill document.querySelectorAll(".if-otp").forEach(function (row) { var inputs = Array.prototype.slice.call(row.querySelectorAll("[data-if-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]; } inputs[Math.min(i + digits.length, inputs.length - 1)].focus(); }); }); }); ``` ### 11. Rotating Placeholder **Type:** Light JS **Description:** The native placeholder attribute itself rotates through four sample queries every 2.5 seconds — "Search products…" → "Search docs…" → "Search people…" → "Search settings…". Light JS swaps the attribute; the browser does the rest. Stops the moment the user focuses or starts typing. **HTML:** ```html ``` **CSS:** ```css .if-anim { display: grid; gap: 6px; width: 100%; max-width: 280px; } .if-anim-cap { font-family: "JetBrains Mono", monospace; font-size: 10px; letter-spacing: 0.12em; color: #b8b6d4; text-transform: uppercase; } .if-anim input { width: 100%; box-sizing: border-box; padding: 12px 14px; background: #1a1a22; border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 10px; color: #f0eeff; font: 500 14px/1 system-ui, sans-serif; outline: none; transition: border-color 0.25s, background 0.2s; } .if-anim input:focus { border-color: #c084fc; background: #1f1f2a; } .if-anim input::placeholder { color: #b8b6d4; transition: opacity 0.25s ease; } .if-anim input.is-fading::placeholder { opacity: 0; } ``` **JS:** ```js // Rotating Placeholder — swap the input's placeholder attribute on a 2.5s loop document.querySelectorAll("[data-if-rotate]").forEach(function (input) { var phrases; try { phrases = JSON.parse(input.getAttribute("data-if-rotate") || "[]"); } catch (e) { phrases = []; } if (!phrases.length) return; var i = 0, paused = false; function tick() { if (paused || document.activeElement === input || input.value) return; input.classList.add("is-fading"); setTimeout(function () { i = (i + 1) % phrases.length; input.setAttribute("placeholder", phrases[i]); input.classList.remove("is-fading"); }, 250); } setInterval(tick, 2500); input.addEventListener("focus", function () { paused = true; }); input.addEventListener("blur", function () { paused = !!input.value; }); }); ``` ### 12. Tag Input **Type:** Light JS **Description:** Type a tag and press Enter or comma to commit it as a chip. Backspace on an empty input removes the last chip — a polished pattern for filters and email recipients. **HTML:** ```html ``` **CSS:** ```css .if-tag { display: grid; gap: 6px; width: 100%; max-width: 280px; font-size: 11px; color: #b8b6d4; } .if-tag-label { font-weight: 600; } .if-tag-wrap { display: flex; flex-wrap: wrap; gap: 6px; background: #1a1a22; border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 8px; padding: 8px 10px; align-items: center; transition: border-color 0.2s, box-shadow 0.2s; } .if-tag-wrap:focus-within { border-color: #fb923c; box-shadow: 0 0 0 3px rgba(251, 146, 60, 0.15); } .if-tag-list { display: contents; } .if-tag-chip { display: inline-flex; align-items: center; gap: 5px; background: rgba(251, 146, 60, 0.12); border: 1px solid rgba(251, 146, 60, 0.35); color: #fdba74; font-size: 12px; padding: 2px 8px; border-radius: 99px; font-weight: 500; } .if-tag-chip button { background: transparent; border: 0; padding: 0; color: inherit; cursor: pointer; font-size: 12px; line-height: 1; opacity: 0.7; } .if-tag-chip button:hover { opacity: 1; } .if-tag input { flex: 1; min-width: 80px; background: transparent; border: 0; outline: none; color: #f0eeff; font-size: 14px; padding: 2px 0; } .if-tag input::placeholder { color: #b8b6d4; } .if-tag-help { font-size: 10.5px; color: #b8b6d4; } .if-tag-help kbd { display: inline-block; background: #2a2a36; border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 4px; padding: 0 4px; font-family: "JetBrains Mono", monospace; font-size: 10px; } ``` **JS:** ```js // Tag input — Enter/comma commits a chip, Backspace removes the last document.querySelectorAll("[data-if-tags]").forEach(function (wrap) { var input = wrap.querySelector("input"); var list = wrap.querySelector(".if-tag-list"); if (!input || !list) return; function addChip(value) { value = (value || "").trim(); if (!value) return; var chip = document.createElement("span"); chip.className = "if-tag-chip"; chip.textContent = value + " "; var x = document.createElement("button"); x.type = "button"; x.setAttribute("aria-label", "Remove tag " + value); x.textContent = "×"; x.addEventListener("click", function () { chip.remove(); }); chip.appendChild(x); list.appendChild(chip); } input.addEventListener("keydown", function (e) { if (e.key === "Enter" || e.key === ",") { e.preventDefault(); addChip(input.value); input.value = ""; } else if (e.key === "Backspace" && !input.value) { var last = list.querySelector(".if-tag-chip:last-child"); if (last) last.remove(); } }); }); ``` ### 13. Phone with Country **Type:** Pure CSS **Description:** Phone number input with a native ` ``` **CSS:** ```css .if-phone { display: grid; gap: 6px; width: 100%; max-width: 280px; font-size: 11px; color: #b8b6d4; } .if-phone-label { font-weight: 600; } .if-phone-wrap { display: grid; grid-template-columns: auto 1fr; background: #1a1a22; border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 8px; overflow: hidden; transition: border-color 0.2s, box-shadow 0.2s; } .if-phone-wrap:focus-within { border-color: #ef4444; box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15); } .if-phone select { background: rgba(255, 255, 255, 0.04); border: 0; border-right: 1px solid rgba(255, 255, 255, 0.1); outline: none; color: #f0eeff; font-size: 13px; padding: 10px 28px 10px 12px; cursor: pointer; appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml;utf8,"); background-repeat: no-repeat; background-position: right 10px center; } .if-phone select option { background: #1a1a22; color: #f0eeff; } .if-phone input { background: transparent; border: 0; outline: none; color: #f0eeff; font-size: 14px; padding: 10px 12px; min-width: 0; } .if-phone input::placeholder { color: #b8b6d4; } ``` ### 14. Stepper Number **Type:** Light JS **Description:** Quantity input with custom −/+ controls. Native `` underneath keeps keyboard arrows, validation, and screen-reader semantics intact. **HTML:** ```html ``` **CSS:** ```css .if-step { display: grid; gap: 6px; width: 100%; max-width: 220px; font-size: 11px; color: #b8b6d4; } .if-step-label { font-weight: 600; } .if-step-wrap { display: grid; grid-template-columns: 36px 1fr 36px; background: #1a1a22; border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 8px; overflow: hidden; transition: border-color 0.2s; } .if-step-wrap:focus-within { border-color: #14b8a6; } .if-step-btn { background: rgba(20, 184, 166, 0.06); border: 0; color: #5eead4; font-size: 18px; font-weight: 700; cursor: pointer; transition: background 0.15s, color 0.15s; } .if-step-btn:hover { background: rgba(20, 184, 166, 0.18); color: #fff; } .if-step-btn:active { background: rgba(20, 184, 166, 0.28); } .if-step input { background: transparent; border: 0; outline: none; color: #f0eeff; font-size: 16px; font-weight: 600; text-align: center; padding: 10px 0; -moz-appearance: textfield; } .if-step input::-webkit-outer-spin-button, .if-step input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; } ``` **JS:** ```js // Stepper +/- buttons — clamp to min/max document.querySelectorAll(".if-step-wrap").forEach(function (wrap) { var input = wrap.querySelector('input[type="number"]'); if (!input) return; wrap.querySelectorAll("[data-if-step]").forEach(function (btn) { btn.addEventListener("click", function () { var dir = parseInt(btn.dataset.ifStep, 10) || 0; var min = input.min !== "" ? Number(input.min) : -Infinity; var max = input.max !== "" ? Number(input.max) : Infinity; var val = (Number(input.value) || 0) + dir; if (val < min) val = min; if (val > max) val = max; input.value = String(val); }); }); }); ``` ### 15. File Drop Zone **Type:** Pure CSS **Description:** Drag-and-drop file input with a custom dashed boundary. Native `` underneath, the visible filename appearing via `:has()` — accessible, keyboard-friendly, and minimal. **HTML:** ```html ``` **CSS:** ```css .if-file { position: relative; display: block; width: 100%; max-width: 320px; cursor: pointer; border: 1.5px dashed rgba(99, 102, 241, 0.5); border-radius: 12px; padding: 22px 18px; background: rgba(99, 102, 241, 0.05); text-align: center; transition: border-color 0.2s, background 0.2s, transform 0.15s; } .if-file:hover { border-color: #818cf8; background: rgba(99, 102, 241, 0.1); } .if-file:focus-within { border-color: #818cf8; background: rgba(99, 102, 241, 0.12); box-shadow: 0 0 0 3px rgba(129, 140, 248, 0.18); } .if-file input[type="file"] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; } .if-file-icon { display: grid; place-items: center; width: 40px; height: 40px; margin: 0 auto 8px; border-radius: 10px; background: rgba(99, 102, 241, 0.18); color: #a5b4fc; } .if-file-text { display: block; font-size: 13px; color: #c8c0ff; } .if-file-text strong { color: #a5b4fc; font-weight: 600; } .if-file-types { display: block; font-size: 11px; color: #b8b6d4; margin-top: 4px; } ``` ### 16. Currency Input **Type:** Pure CSS **Description:** Right-aligned numeric input with an inline `$` prefix. `inputmode="decimal"` brings up the right mobile keyboard; `:focus-within` lights the prefix to match the field accent. **HTML:** ```html ``` **CSS:** ```css .if-curr { display: grid; gap: 6px; width: 100%; max-width: 280px; } .if-curr-label { font-family: "JetBrains Mono", monospace; font-size: 10px; letter-spacing: 0.12em; color: #b8b6d4; text-transform: uppercase; } .if-curr-wrap { display: inline-flex; align-items: center; gap: 6px; padding: 0 14px; background: #1a1a22; border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 10px; transition: border-color 0.2s, background 0.2s; } .if-curr-wrap:focus-within { border-color: #f5a84a; background: #1f1f2a; } .if-curr-prefix { color: #b8b6d4; font: 600 14px/1 system-ui, sans-serif; transition: color 0.2s; } .if-curr-wrap:focus-within .if-curr-prefix { color: #f5a84a; } .if-curr input { flex: 1; min-width: 0; padding: 12px 0; border: 0; outline: none; background: transparent; color: #f0eeff; font: 600 14px/1 system-ui, sans-serif; text-align: right; -moz-appearance: textfield; } .if-curr input::-webkit-outer-spin-button, .if-curr input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; } .if-curr input::placeholder { color: #b8b6d4; } .if-curr-suffix { font-family: "JetBrains Mono", monospace; font-size: 10px; color: #b8b6d4; letter-spacing: 0.06em; } ``` ### 17. Date Picker Native **Type:** Pure CSS **Description:** A styled `` keeps every native picker behaviour (keyboard, accessibility, browser/OS calendars) while the chrome matches the rest of your form. `::-webkit-calendar-picker-indicator` is recoloured to match the accent. **HTML:** ```html ``` **CSS:** ```css .if-date { display: grid; gap: 6px; width: 100%; max-width: 280px; } .if-date-label { font-family: "JetBrains Mono", monospace; font-size: 10px; letter-spacing: 0.12em; color: #b8b6d4; text-transform: uppercase; } .if-date input { width: 100%; box-sizing: border-box; padding: 12px 14px; background: #1a1a22; border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 10px; color: #f0eeff; font: 500 14px/1 system-ui, sans-serif; outline: none; transition: border-color 0.2s, background 0.2s; color-scheme: dark; } .if-date input:focus { border-color: #06b6d4; background: #1f1f2a; } .if-date input::-webkit-calendar-picker-indicator { filter: invert(0.7) sepia(1) saturate(5) hue-rotate(150deg); cursor: pointer; opacity: 0.8; } .if-date input::-webkit-calendar-picker-indicator:hover { opacity: 1; } ``` ### 18. Time Range **Type:** Pure CSS **Description:** Two `` paired with a typographic `→` divider. Single visual unit while remaining two independent fields for keyboard nav and form submission. **HTML:** ```html
        Quiet hours
        ``` **CSS:** ```css .if-time { width: 100%; max-width: 320px; border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 12px; padding: 12px 14px; background: #1a1a22; } .if-time-legend { padding: 0 6px; font-family: "JetBrains Mono", monospace; font-size: 10px; letter-spacing: 0.12em; color: #b8b6d4; text-transform: uppercase; } .if-time-row { display: flex; align-items: center; gap: 12px; } .if-time label { flex: 1; display: grid; gap: 4px; } .if-time-cap { font-size: 10px; color: #b8b6d4; letter-spacing: 0.08em; text-transform: uppercase; } .if-time input { width: 100%; box-sizing: border-box; padding: 8px 10px; background: #0c0c12; border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 8px; color: #f0eeff; font: 600 13px/1 "JetBrains Mono", monospace; outline: none; color-scheme: dark; } .if-time input:focus { border-color: #a78bfa; } .if-time-sep { color: #a78bfa; font-size: 14px; align-self: end; padding-bottom: 9px; } ``` ### 19. Color Picker **Type:** Pure CSS **Description:** A `` swatch chip paired with a hex text field — both accept the same `name` and submit value via the underlying form. Sibling-`+` selectors mirror the swatch state. **HTML:** ```html ``` **CSS:** ```css .if-color { display: grid; gap: 6px; width: 100%; max-width: 280px; } .if-color-label { font-family: "JetBrains Mono", monospace; font-size: 10px; letter-spacing: 0.12em; color: #b8b6d4; text-transform: uppercase; } .if-color-wrap { display: inline-flex; align-items: stretch; gap: 0; background: #1a1a22; border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 10px; overflow: hidden; transition: border-color 0.2s; } .if-color-wrap:focus-within { border-color: #7c6cff; } .if-color input[type="color"] { width: 44px; height: 44px; padding: 6px; border: 0; outline: none; cursor: pointer; background: transparent; border-right: 1px solid rgba(255, 255, 255, 0.1); } .if-color input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; } .if-color input[type="color"]::-webkit-color-swatch { border: 0; border-radius: 6px; } .if-color input[type="text"] { flex: 1; min-width: 0; padding: 0 14px; border: 0; outline: none; background: transparent; color: #f0eeff; font: 600 13px/1 "JetBrains Mono", monospace; text-transform: uppercase; letter-spacing: 0.04em; } ``` ### 20. Search with Voice **Type:** Light JS **Description:** Search field with a microphone trigger that toggles a recording state — pulses a halo while "listening". Real `` so AT announces it as a search field. **HTML:** ```html ``` **CSS:** ```css .if-voice { display: grid; gap: 6px; width: 100%; max-width: 320px; } .if-voice-label { font-family: "JetBrains Mono", monospace; font-size: 10px; letter-spacing: 0.12em; color: #b8b6d4; text-transform: uppercase; } .if-voice-wrap { display: inline-flex; align-items: center; gap: 8px; padding: 4px 4px 4px 14px; background: #1a1a22; border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 10px; transition: border-color 0.2s; } .if-voice-wrap:focus-within { border-color: #ff6c8a; } .if-voice-glass { width: 16px; height: 16px; flex-shrink: 0; fill: none; stroke: #6b6987; stroke-width: 2; stroke-linecap: round; } .if-voice input { flex: 1; min-width: 0; padding: 8px 0; border: 0; outline: none; background: transparent; color: #f0eeff; font: 500 14px/1 system-ui, sans-serif; } .if-voice input::placeholder { color: #b8b6d4; } .if-voice-mic { width: 36px; height: 36px; flex-shrink: 0; border: 0; cursor: pointer; background: transparent; border-radius: 8px; display: flex; align-items: center; justify-content: center; position: relative; transition: background 0.2s; } .if-voice-mic:hover { background: rgba(255, 108, 138, 0.1); } .if-voice-mic svg { width: 16px; height: 16px; fill: none; stroke: #a78bfa; stroke-width: 2; stroke-linecap: round; } .if-voice-mic[aria-pressed="true"] svg { stroke: #ff6c8a; } .if-voice-mic[aria-pressed="true"]::after { content: ""; position: absolute; inset: 4px; border-radius: 6px; border: 1.5px solid #ff6c8a; animation: if-voice-pulse 1.2s ease-out infinite; } @keyframes if-voice-pulse { 0% { transform: scale(0.8); opacity: 1; } 100% { transform: scale(1.4); opacity: 0; } } @media (prefers-reduced-motion: reduce) { .if-voice-mic[aria-pressed="true"]::after { animation: none !important; } } ``` **JS:** ```js // Voice button — toggle aria-pressed (mock recording state for the demo) document.querySelectorAll("[data-if-voice]").forEach(function (btn) { btn.addEventListener("click", function () { var on = btn.getAttribute("aria-pressed") === "true"; btn.setAttribute("aria-pressed", on ? "false" : "true"); btn.setAttribute("aria-label", on ? "Start voice input" : "Stop voice input"); // Hook real Web Speech API here if you want actual voice input: // const rec = new (window.SpeechRecognition || window.webkitSpeechRecognition)(); }); }); ``` ### 21. Email with Suggestions **Type:** Light JS **Description:** When the user types `@`, common email domains are suggested in a keyboard-navigable dropdown. `aria-controls` + `aria-expanded` + `role="listbox"` make it a proper combobox. **HTML:** ```html ``` **CSS:** ```css .if-mail { display: grid; gap: 6px; width: 100%; max-width: 280px; } .if-mail-label { font-family: "JetBrains Mono", monospace; font-size: 10px; letter-spacing: 0.12em; color: #b8b6d4; text-transform: uppercase; } .if-mail-wrap { position: relative; display: block; } .if-mail input { width: 100%; box-sizing: border-box; padding: 12px 14px; background: #1a1a22; border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 10px; color: #f0eeff; font: 500 14px/1 system-ui, sans-serif; outline: none; transition: border-color 0.2s, border-radius 0.15s; } .if-mail input:focus { border-color: #2eb88a; } .if-mail input[aria-expanded="true"] { border-radius: 10px 10px 0 0; border-bottom-color: transparent; } .if-mail-list { position: absolute; top: 100%; left: 0; right: 0; margin: 0; padding: 4px; list-style: none; background: #1a1a22; border: 1px solid #2eb88a; border-top: 0; border-radius: 0 0 10px 10px; z-index: 10; max-height: 180px; overflow-y: auto; } .if-mail-list li { padding: 7px 10px; font: 500 13px/1.2 system-ui, sans-serif; color: #cbd5e1; cursor: pointer; border-radius: 6px; } .if-mail-list li[aria-selected="true"], .if-mail-list li:hover { background: rgba(46, 184, 138, 0.15); color: #fff; } .if-mail-list li b { color: #2eb88a; font-weight: 600; } ``` **JS:** ```js // Email Suggestions — show common domains after the user types '@' (function () { var input = document.getElementById("if-mail-input"); var list = document.getElementById("if-mail-list"); if (!input || !list) return; var DOMAINS = ["gmail.com", "outlook.com", "icloud.com", "protonmail.com", "fastmail.com"]; var idx = -1; function close() { list.hidden = true; input.setAttribute("aria-expanded", "false"); idx = -1; } function render(local) { list.innerHTML = ""; DOMAINS.forEach(function (d) { var li = document.createElement("li"); li.setAttribute("role", "option"); li.innerHTML = (local || "") + "@" + d + ""; list.appendChild(li); }); } function open(local) { render(local); list.hidden = false; input.setAttribute("aria-expanded", "true"); } function select(n) { var items = list.querySelectorAll("li"); items.forEach(function (li) { li.removeAttribute("aria-selected"); }); idx = (n + items.length) % items.length; items[idx].setAttribute("aria-selected", "true"); } input.addEventListener("input", function () { var v = input.value, at = v.indexOf("@"); if (at >= 0) open(v.substring(0, at + 1)); else close(); }); input.addEventListener("blur", function () { setTimeout(close, 150); }); input.addEventListener("keydown", function (e) { if (list.hidden) return; var items = list.querySelectorAll("li"); 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(); } else if (e.key === "Enter" && idx >= 0) { e.preventDefault(); input.value = items[idx].textContent; close(); } }); list.addEventListener("mousedown", function (e) { var li = e.target.closest('li[role="option"]'); if (li) { input.value = li.textContent; close(); } }); })(); ``` ### 22. Auto-Grow Textarea **Type:** Pure CSS **Description:** A multi-line ` Field grows as you type ``` **CSS:** ```css .if-grow { display: grid; gap: 6px; width: 100%; max-width: 320px; } .if-grow-label { font-family: "JetBrains Mono", monospace; font-size: 10px; letter-spacing: 0.12em; color: #b8b6d4; text-transform: uppercase; } .if-grow textarea { width: 100%; box-sizing: border-box; padding: 12px 14px; background: #1a1a22; border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 10px; color: #f0eeff; font: 500 14px/1.55 system-ui, sans-serif; outline: none; resize: none; min-height: 64px; field-sizing: content; transition: border-color 0.2s, background 0.2s; } .if-grow textarea:focus { border-color: #a78bfa; background: #1f1f2a; } .if-grow textarea::placeholder { color: #b8b6d4; } .if-grow-hint { font-size: 11px; color: #b8b6d4; } ``` ### 23. Inline Edit **Type:** Light JS **Description:** Click-to-edit text that swaps between a static value and an editable input. Saves on Enter, cancels on Escape, blurs to commit — the canonical pattern from Notion and Linear. **HTML:** ```html ``` **CSS:** ```css .if-edit { display: grid; gap: 6px; width: 100%; max-width: 280px; } .if-edit-label { font-family: "JetBrains Mono", monospace; font-size: 10px; letter-spacing: 0.12em; color: #b8b6d4; text-transform: uppercase; } .if-edit-wrap { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; background: transparent; border: 1px dashed transparent; border-radius: 8px; cursor: text; transition: background 0.15s, border-color 0.15s; } .if-edit-wrap:hover { background: rgba(124, 108, 255, 0.06); border-color: rgba(124, 108, 255, 0.2); } .if-edit-display, .if-edit-input { font: 600 14px/1.3 system-ui, sans-serif; color: #f0eeff; flex: 1; min-width: 0; } .if-edit-display { outline: none; } .if-edit-input { border: 0; outline: none; background: transparent; padding: 0; } .if-edit-pencil { font-size: 12px; color: #7a7899; opacity: 0; transition: opacity 0.15s; } .if-edit-wrap:hover .if-edit-pencil { opacity: 1; } .if-edit-wrap.is-editing { background: #1a1a22; border-color: #7c6cff; border-style: solid; } .if-edit-wrap.is-editing .if-edit-pencil { display: none; } ``` **JS:** ```js // Inline Edit — click to edit, Enter saves, Escape cancels, blur commits document.querySelectorAll("[data-if-edit]").forEach(function (wrap) { var display = wrap.querySelector(".if-edit-display"); var input = wrap.querySelector(".if-edit-input"); function enter() { wrap.classList.add("is-editing"); display.hidden = true; input.hidden = false; input.value = display.textContent; input.focus(); input.select(); } function commit() { var v = input.value.trim(); if (v) { display.textContent = v; wrap.dataset.value = v; } else { input.value = display.textContent; } exit(); } function cancel() { input.value = display.textContent; exit(); } function exit() { wrap.classList.remove("is-editing"); input.hidden = true; display.hidden = false; } display.addEventListener("click", enter); display.addEventListener("keydown", function (e) { if (e.key === "Enter" || e.key === " ") { e.preventDefault(); enter(); } }); input.addEventListener("blur", commit); input.addEventListener("keydown", function (e) { if (e.key === "Enter") { e.preventDefault(); commit(); } if (e.key === "Escape") { e.preventDefault(); cancel(); } }); }); ``` ### 24. Range Slider Pro **Type:** Light JS **Description:** A native `` with custom track/thumb styling and a live value bubble that follows the thumb. Honest accessibility — keyboard arrows, screen-reader announcement, real form value. **HTML:** ```html ``` **CSS:** ```css .if-range { display: grid; gap: 8px; width: 100%; max-width: 280px; } .if-range-label { display: flex; justify-content: space-between; align-items: center; font-family: "JetBrains Mono", monospace; font-size: 10px; letter-spacing: 0.12em; color: #b8b6d4; text-transform: uppercase; } .if-range-bubble { font: 700 11px/1 "JetBrains Mono", monospace; color: #f0eeff; background: #7c6cff; padding: 3px 7px; border-radius: 999px; letter-spacing: 0; } .if-range input { width: 100%; height: 6px; -webkit-appearance: none; appearance: none; background: linear-gradient( 90deg, #7c6cff 0%, #7c6cff var(--if-range-fill, 50%), rgba(255, 255, 255, 0.08) var(--if-range-fill, 50%), rgba(255, 255, 255, 0.08) 100% ); border-radius: 999px; outline: none; cursor: pointer; } .if-range input::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 18px; height: 18px; background: #fff; border: 0; border-radius: 50%; box-shadow: 0 2px 6px rgba(124, 108, 255, 0.5); cursor: pointer; transition: transform 0.15s; } .if-range input::-webkit-slider-thumb:hover { transform: scale(1.12); } .if-range input::-moz-range-thumb { width: 18px; height: 18px; background: #fff; border: 0; border-radius: 50%; box-shadow: 0 2px 6px rgba(124, 108, 255, 0.5); cursor: pointer; } ``` **JS:** ```js // Range Slider Pro — sync the live value bubble + paint the gradient fill via custom property document.querySelectorAll("[data-if-range]").forEach(function (input) { var bubble = input.closest(".if-range").querySelector("[data-if-bubble]"); function update() { var min = Number(input.min) || 0; var max = Number(input.max) || 100; var pct = ((Number(input.value) - min) / (max - min)) * 100; input.style.setProperty("--if-range-fill", pct + "%"); if (bubble) bubble.textContent = String(input.value); } input.addEventListener("input", update); update(); }); ``` ### 25. URL with Protocol **Type:** Pure CSS **Description:** URL input with a non-editable `https://` prefix that visually integrates with the field. Submit value is the full URL; users only type the host portion. **HTML:** ```html ``` **CSS:** ```css .if-url { display: grid; gap: 6px; width: 100%; max-width: 320px; } .if-url-label { font-family: "JetBrains Mono", monospace; font-size: 10px; letter-spacing: 0.12em; color: #b8b6d4; text-transform: uppercase; } .if-url-wrap { display: inline-flex; align-items: stretch; background: #1a1a22; border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 10px; overflow: hidden; transition: border-color 0.2s; } .if-url-wrap:focus-within { border-color: #06b6d4; } .if-url-prefix { display: inline-flex; align-items: center; padding: 0 12px; background: rgba(6, 182, 212, 0.08); color: #06b6d4; font: 600 12px/1 "JetBrains Mono", monospace; border-right: 1px solid rgba(255, 255, 255, 0.08); } .if-url input { flex: 1; min-width: 0; padding: 12px 14px; border: 0; outline: none; background: transparent; color: #f0eeff; font: 500 14px/1 system-ui, sans-serif; } .if-url input::placeholder { color: #b8b6d4; } ``` ### 26. Credit Card **Type:** Light JS **Description:** Auto-formatted 16-digit card number with brand-aware accent (Visa, Mastercard, Amex). `inputmode="numeric"` on mobile; pattern validation; `autocomplete="cc-number"`. **HTML:** ```html ``` **CSS:** ```css .if-card { display: grid; gap: 6px; width: 100%; max-width: 320px; } .if-card-label { font-family: "JetBrains Mono", monospace; font-size: 10px; letter-spacing: 0.12em; color: #b8b6d4; text-transform: uppercase; } .if-card-wrap { display: inline-flex; align-items: center; gap: 10px; padding: 0 12px 0 14px; background: #1a1a22; border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 10px; transition: border-color 0.2s; } .if-card-wrap:focus-within { border-color: #f5a84a; } .if-card-brand { font-family: "JetBrains Mono", monospace; font-size: 9px; font-weight: 700; letter-spacing: 0.08em; padding: 3px 7px; background: rgba(245, 168, 74, 0.12); color: #f5a84a; border-radius: 4px; flex-shrink: 0; transition: background 0.2s, color 0.2s; } .if-card-wrap[data-brand="visa"] .if-card-brand { background: rgba(67, 127, 193, 0.18); color: #6aa3e0; } .if-card-wrap[data-brand="mastercard"] .if-card-brand { background: rgba(255, 90, 90, 0.16); color: #ff7a7a; } .if-card-wrap[data-brand="amex"] .if-card-brand { background: rgba(46, 184, 138, 0.16); color: #2eb88a; } .if-card input { flex: 1; min-width: 0; padding: 13px 0; border: 0; outline: none; background: transparent; color: #f0eeff; font: 600 14px/1 "JetBrains Mono", monospace; letter-spacing: 0.08em; } .if-card input::placeholder { color: #b8b6d4; } ``` **JS:** ```js // Credit Card — auto-format groups of 4 + brand detection document.querySelectorAll("[data-if-card] input").forEach(function (input) { var wrap = input.closest("[data-if-card]"); var brand = wrap.querySelector(".if-card-brand"); function detect(digits) { if (/^4/.test(digits)) return ["visa", "VISA"]; if (/^(5[1-5]|2[2-7])/.test(digits)) return ["mastercard", "MC"]; if (/^3[47]/.test(digits)) return ["amex", "AMEX"]; if (/^6(011|5)/.test(digits)) return ["discover", "DISC"]; return ["", "CARD"]; } input.addEventListener("input", function () { var digits = input.value.replace(/\\D/g, "").slice(0, 19); input.value = (digits.match(/.{1,4}/g) || [""]).join(" "); var info = detect(digits); if (info[0]) wrap.setAttribute("data-brand", info[0]); else wrap.removeAttribute("data-brand"); brand.textContent = info[1]; }); }); ``` ### 27. Toggle Password **Type:** Light JS **Description:** Password field with an eye toggle that swaps `type="password"` ↔ `type="text"`. `aria-pressed` reflects state for screen readers; `autocomplete="new-password"` for sign-up flows. **HTML:** ```html ``` **CSS:** ```css .if-pw { display: grid; gap: 6px; width: 100%; max-width: 280px; font-size: 11px; color: #b8b6d4; } .if-pw-label { font-weight: 600; } .if-pw input { width: 100%; box-sizing: border-box; padding: 11px 14px; background: #1a1a22; border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 8px; color: #f0eeff; font-size: 14px; outline: none; transition: border-color 0.2s; } .if-pw input:focus { border-color: #c084fc; } .if-pw-meter { position: relative; height: 4px; border-radius: 99px; background: rgba(255, 255, 255, 0.08); overflow: hidden; } .if-pw-fill { position: absolute; inset: 0; width: 0; background: linear-gradient(90deg, #ef4444, #f59e0b, #22c55e); border-radius: inherit; transition: width 0.3s ease; } .if-pw:has(input:placeholder-shown) .if-pw-fill { width: 0; } .if-pw:has(input:not(:placeholder-shown):invalid) .if-pw-fill { width: 30%; } .if-pw:has(input:not(:placeholder-shown):valid) .if-pw-fill { width: 65%; } .if-pw:has(input:focus:valid) .if-pw-fill { width: 100%; } .if-pw-hint { font-size: 10.5px; color: #b8b6d4; } .if-pw { display: grid; gap: 6px; width: 100%; max-width: 280px; } .if-pw-label { font-family: "JetBrains Mono", monospace; font-size: 10px; letter-spacing: 0.12em; color: #b8b6d4; text-transform: uppercase; } .if-pw-wrap { display: inline-flex; align-items: center; padding: 0 6px 0 14px; background: #1a1a22; border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 10px; transition: border-color 0.2s; } .if-pw-wrap:focus-within { border-color: #7c6cff; } .if-pw input { flex: 1; min-width: 0; padding: 12px 0; border: 0; outline: none; background: transparent; color: #f0eeff; font: 500 14px/1 system-ui, sans-serif; letter-spacing: 0.08em; } .if-pw input::placeholder { color: #b8b6d4; } .if-pw-toggle { width: 32px; height: 32px; border: 0; cursor: pointer; background: transparent; border-radius: 6px; display: flex; align-items: center; justify-content: center; transition: background 0.15s; } .if-pw-toggle:hover { background: rgba(255, 255, 255, 0.05); } .if-pw-toggle svg { width: 16px; height: 16px; fill: none; stroke: #b8b6d4; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; } .if-pw-eye-off { display: none; } .if-pw-toggle[aria-pressed="true"] .if-pw-eye { display: none; } .if-pw-toggle[aria-pressed="true"] .if-pw-eye-off { display: block; } .if-pw-toggle[aria-pressed="true"] svg { stroke: #7c6cff; } ``` **JS:** ```js // Toggle Password — swap input type + reflect state via aria-pressed document.querySelectorAll("[data-if-pw-toggle]").forEach(function (btn) { var input = btn.closest(".if-pw-wrap").querySelector("input"); btn.addEventListener("click", function () { var on = btn.getAttribute("aria-pressed") === "true"; btn.setAttribute("aria-pressed", on ? "false" : "true"); btn.setAttribute("aria-label", on ? "Show password" : "Hide password"); input.type = on ? "password" : "text"; }); }); ``` ### 28. Brutalist Input **Type:** Pure CSS **Description:** Bold offset-shadow stamp with hard edges and monospace type — a confident input that doesn't apologize for itself. Press collapses into the shadow on focus. **HTML:** ```html ``` **CSS:** ```css .if-brut { display: grid; gap: 8px; width: 100%; max-width: 280px; } .if-brut-label { font-family: "Courier New", monospace; font-size: 11px; font-weight: 800; letter-spacing: 0.12em; color: #f0eeff; } .if-brut input { width: 100%; box-sizing: border-box; padding: 12px 14px; background: #f0eeff; border: 2.5px solid #1a1a2e; border-radius: 0; color: #1a1a2e; font: 700 13px/1 "Courier New", monospace; letter-spacing: 0.06em; outline: none; box-shadow: 5px 5px 0 #ff6c8a; transition: transform 0.1s, box-shadow 0.1s; } .if-brut input::placeholder { color: rgba(26, 26, 46, 0.5); } .if-brut input:focus { transform: translate(2px, 2px); box-shadow: 3px 3px 0 #ff6c8a; } .if-brut input:invalid:not(:placeholder-shown) { box-shadow: 5px 5px 0 #ff5d6c; } ``` --- ## 30 CSS Keyframe Animations URL: https://codefronts.com/motion/css-keyframe-animations/ Description: 30 hand-coded CSS @keyframes animations covering every production motion pattern in 2026 — loading spinners (6 variants), typewriter text effect, bouncing ball, pulse-glow buttons, morphing blobs, particle burst, ocean waves, 3D flip cards, neon flicker, skeleton loading shimmer, glitch text, solar-system orbit, liquid-fill progress, stagger list reveal, fire animation, ripple click, floating elements, infinite-scroll ticker (marquee replacement), countdown timer, path drawing, spotlight, spring bounce, confetti explosion (no canvas), breathing meditation pulse, typewriter-delete loop, aurora borealis background, card stack reveal, kinetic typography, morphing progress steps, and animated gradient mesh background. All 30 are 100% pure CSS — zero JavaScript, zero libraries, zero dependencies. GPU-accelerated via transform + opacity (compositor-thread, 60fps on mid-tier mobile, INP-friendly). Each demo uses scoped .kf-NN__* class names + prefixed @keyframes names so all 30 coexist on the same page. Respects prefers-reduced-motion. MIT-licensed. Demo count: 30 ### 01. CSS Keyframe Loading Spinners **Type:** Pure CSS **Description:** Nine animated CSS loading spinners — ring, dual-rotate, dot orbit, morph shape, pulse dots, audio wave, comet trail, folding grid, and progress sweep — each driven by a single scoped keyframe. **HTML:** ```html
        Classic Ring
        Dual Rotate
        Dot Orbit
        Morph Shape
        Pulse Dots
        Audio Wave
        Comet Trail
        Folding Grid
        Progress Sweep
        ``` **CSS:** ```css .kf-01,.kf-01 *,.kf-01 *::before,.kf-01 *::after{box-sizing:border-box;margin:0;padding:0} .kf-01 ::selection{background:#6c63ff;color:#fff} .kf-01{ --bg:#0f0e17; --purple:#6c63ff; --pink:#ff6584; --cyan:#43e8d8; --gold:#ffd166; --white:#fffffe; font-family:'Segoe UI',sans-serif; background:var(--bg); min-height:100vh; display:flex;align-items:center;justify-content:center; padding:40px 20px; color:var(--white); } .kf-01__stage{ display:grid; grid-template-columns:repeat(3,1fr); gap:40px; max-width:860px; width:100%; } .kf-01__cell{ display:flex;flex-direction:column;align-items:center;gap:20px; padding:32px 20px; background:rgba(255,255,255,.04); border:1px solid rgba(255,255,255,.08); border-radius:16px; } .kf-01__label{font-size:11px;letter-spacing:.2em;text-transform:uppercase;color:rgba(255,255,255,.4);text-align:center} /* 1 — classic ring */ .kf-01__ring{ width:64px;height:64px;border-radius:50%; border:4px solid rgba(108,99,255,.2); border-top-color:var(--purple); animation:kf-01-spin .9s linear infinite; } @keyframes kf-01-spin{to{transform:rotate(360deg)}} /* 2 — dual counter-rotate */ .kf-01__dual{width:64px;height:64px;position:relative} .kf-01__dual i{position:absolute;inset:0;border-radius:50%;border:4px solid transparent} .kf-01__dual i:nth-child(1){border-top-color:var(--pink);border-right-color:var(--pink);animation:kf-01-spin .8s linear infinite} .kf-01__dual i:nth-child(2){inset:12px;border-bottom-color:var(--cyan);border-left-color:var(--cyan);animation:kf-01-spin .8s linear infinite reverse} /* 3 — dotted orbit */ .kf-01__orbit{width:64px;height:64px;position:relative;animation:kf-01-spin 1.4s linear infinite} .kf-01__orbit span{position:absolute;width:12px;height:12px;border-radius:50%;background:var(--gold);top:0;left:50%;transform:translateX(-50%)} .kf-01__orbit span:nth-child(2){animation:kf-01-spin 1.4s linear infinite reverse;background:var(--purple);top:auto;bottom:0} .kf-01__orbit span:nth-child(3){top:50%;left:0;transform:translateY(-50%);background:var(--pink)} .kf-01__orbit span:nth-child(4){top:50%;right:0;left:auto;transform:translateY(-50%);background:var(--cyan)} /* 4 — morphing square */ .kf-01__morph{ width:52px;height:52px; background:var(--purple); animation:kf-01-morph 1.6s ease-in-out infinite; } @keyframes kf-01-morph{ 0%{border-radius:0;transform:rotate(0)} 25%{border-radius:50%;transform:rotate(90deg)} 50%{border-radius:0;transform:rotate(180deg) scaleX(.5)} 75%{border-radius:50%;transform:rotate(270deg)} 100%{border-radius:0;transform:rotate(360deg)} } /* 5 — pulse dots */ .kf-01__dots{display:flex;gap:10px;align-items:center} .kf-01__dots span{width:14px;height:14px;border-radius:50%;background:var(--cyan);animation:kf-01-pulse 1.2s ease-in-out infinite} .kf-01__dots span:nth-child(2){animation-delay:.2s;background:var(--purple)} .kf-01__dots span:nth-child(3){animation-delay:.4s;background:var(--pink)} @keyframes kf-01-pulse{0%,80%,100%{transform:scale(.6);opacity:.4}40%{transform:scale(1);opacity:1}} /* 6 — wave bars */ .kf-01__wave{display:flex;gap:5px;align-items:flex-end;height:48px} .kf-01__wave span{width:8px;border-radius:4px 4px 0 0;background:var(--gold);animation:kf-01-wave 1s ease-in-out infinite} .kf-01__wave span:nth-child(1){animation-delay:0s} .kf-01__wave span:nth-child(2){animation-delay:.1s} .kf-01__wave span:nth-child(3){animation-delay:.2s} .kf-01__wave span:nth-child(4){animation-delay:.3s} .kf-01__wave span:nth-child(5){animation-delay:.4s} @keyframes kf-01-wave{0%,100%{height:12px;opacity:.4}50%{height:42px;opacity:1}} /* 7 — comet trail */ .kf-01__comet{width:64px;height:64px;position:relative} .kf-01__comet::before{ content:'';position:absolute;inset:0;border-radius:50%; background:conic-gradient(transparent 60%,var(--pink)); animation:kf-01-spin .8s linear infinite; } .kf-01__comet::after{ content:'';position:absolute;top:50%;left:50%; width:10px;height:10px;margin:-5px 0 0 -5px; border-radius:50%;background:var(--white); box-shadow:0 0 12px var(--pink); } /* 8 — folding squares */ .kf-01__fold{width:40px;height:40px;position:relative;transform:rotate(45deg)} .kf-01__fold span{position:absolute;width:50%;height:50%;background:var(--purple)} .kf-01__fold span:nth-child(1){top:0;left:0;animation:kf-01-fold 2s ease-in-out infinite} .kf-01__fold span:nth-child(2){top:0;right:0;background:var(--cyan);animation:kf-01-fold 2s ease-in-out infinite .5s} .kf-01__fold span:nth-child(3){bottom:0;right:0;background:var(--pink);animation:kf-01-fold 2s ease-in-out infinite 1s} .kf-01__fold span:nth-child(4){bottom:0;left:0;background:var(--gold);animation:kf-01-fold 2s ease-in-out infinite 1.5s} @keyframes kf-01-fold{0%,10%,90%,100%{opacity:1;transform:scale(1)}50%{opacity:0;transform:scale(0)}} /* 9 — progress bar */ .kf-01__bar{width:100%;max-width:160px} .kf-01__bar-track{height:6px;background:rgba(255,255,255,.1);border-radius:3px;overflow:hidden} .kf-01__bar-fill{height:100%;border-radius:3px;background:linear-gradient(90deg,var(--purple),var(--pink));animation:kf-01-bar 2s ease-in-out infinite} @keyframes kf-01-bar{0%{width:0%;margin-left:0}50%{width:80%}100%{width:0%;margin-left:100%}} @media(max-width:640px){.kf-01__stage{grid-template-columns:repeat(2,1fr)}} @media(max-width:380px){.kf-01__stage{grid-template-columns:1fr}} @media(prefers-reduced-motion:reduce){.kf-01 *{animation:none!important}} ``` ### 02. CSS Typing Typewriter Text Effect **Type:** Pure CSS **Description:** Classic typewriter cursor, multi-word loop, code-line reveal and glitch-reveal text animations using CSS width + border-right keyframes only, zero JS. **HTML:** ```html
        Hello, world! — pure CSS typing.
        I build
        websites.
        animations.
        experiences.
        const animate = (el, props) => {
          el.style.transform = 'translateY(0)';
          el.style.opacity = '1';
          return Promise.resolve(true);
        };
        TYPOGRAPHIC
        ``` **CSS:** ```css @import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;700&family=Playfair+Display:ital,wght@0,700;1,400&display=swap'); .kf-02,.kf-02 *,.kf-02 *::before,.kf-02 *::after{box-sizing:border-box;margin:0;padding:0} .kf-02 ::selection{background:#e8ff45;color:#111} .kf-02{ --bg:#111014; --lime:#e8ff45; --orange:#ff6b35; --blue:#4cc9f0; --white:#f0eee8; --dim:#555; font-family:'JetBrains Mono',monospace; background:var(--bg); min-height:100vh; display:flex;flex-direction:column;align-items:center;justify-content:center; padding:60px 24px; gap:56px; color:var(--white); } /* 1 — Classic typewriter */ .kf-02__classic{font-size:clamp(1.4rem,4vw,2.2rem);font-weight:700;color:var(--lime); overflow:hidden;white-space:nowrap; border-right:3px solid var(--lime); width:0; animation:kf-02-type1 3s steps(28) 0.5s forwards, kf-02-cur 0.7s steps(2) infinite; } @keyframes kf-02-type1{to{width:28ch}} @keyframes kf-02-cur{50%{border-color:transparent}} /* 2 — Multi-line loop */ .kf-02__multi{ font-size:clamp(1rem,3vw,1.5rem); color:var(--white); position:relative; height:2em; display:flex;align-items:center;gap:8px; } .kf-02__multi b{color:var(--orange)} .kf-02__loop{ display:inline-block;overflow:hidden;white-space:nowrap;vertical-align:bottom; border-right:2px solid var(--orange); animation:kf-02-loop 9s steps(1) infinite; } .kf-02__loop span{display:block;animation:kf-02-slide 9s steps(1) infinite} @keyframes kf-02-loop{ 0%,30%{width:14ch}31%,35%{width:0}36%,65%{width:12ch}66%,70%{width:0}71%,99%{width:16ch} } @keyframes kf-02-slide{ 0%,32%{transform:translateY(0)} 33%,65%{transform:translateY(-2.1em)} 66%,99%{transform:translateY(-4.2em)} } /* 3 — Code reveal */ .kf-02__code{ background:#1a1a1f; border:1px solid rgba(255,255,255,.1); border-left:3px solid var(--blue); border-radius:8px; padding:28px 32px; width:min(600px,100%); } .kf-02__code-line{overflow:hidden;white-space:nowrap;color:#8ecae6;font-size:.95rem;line-height:1.8} .kf-02__code-line:nth-child(1){width:0;animation:kf-02-codeline 14s steps(22) 0.2s infinite} .kf-02__code-line:nth-child(2){width:0;color:#a8dadc;animation:kf-02-codeline2 14s steps(28) 0.7s infinite} .kf-02__code-line:nth-child(3){width:0;color:var(--lime);animation:kf-02-codeline3 14s steps(32) 1.2s infinite} .kf-02__code-line:nth-child(4){width:0;color:#ff6b35;animation:kf-02-codeline4 14s steps(24) 1.7s infinite} .kf-02__code-line:nth-child(5){width:0;color:#8ecae6;animation:kf-02-codeline5 14s steps(18) 2.2s infinite} @keyframes kf-02-codeline{0%,6%{width:0}18%,90%{width:22ch}96%,100%{width:0}} @keyframes kf-02-codeline2{0%,8%{width:0}22%,90%{width:28ch}96%,100%{width:0}} @keyframes kf-02-codeline3{0%,10%{width:0}26%,90%{width:32ch}96%,100%{width:0}} @keyframes kf-02-codeline4{0%,12%{width:0}30%,90%{width:24ch}96%,100%{width:0}} @keyframes kf-02-codeline5{0%,14%{width:0}34%,90%{width:18ch}96%,100%{width:0}} /* 4 — Big headline glitch-type */ .kf-02__glitch{ font-family:'Playfair Display',serif; font-size:clamp(2.5rem,10vw,5rem); font-weight:700; color:var(--white); position:relative; overflow:hidden; white-space:nowrap; width:0; animation:kf-02-reveal 2s cubic-bezier(.2,.6,.4,1) 0.3s forwards; } .kf-02__glitch::after{ content:attr(data-text); position:absolute; inset:0; color:var(--blue); clip-path:inset(0 0 60% 0); transform:translateX(-3px); animation:kf-02-glitch 4s steps(1) 2.5s infinite; } @keyframes kf-02-reveal{to{width:100%}} @keyframes kf-02-glitch{ 0%,90%,100%{clip-path:inset(0 0 100% 0);transform:translateX(0)} 92%{clip-path:inset(20% 0 50% 0);transform:translateX(-4px)} 94%{clip-path:inset(55% 0 10% 0);transform:translateX(3px)} 96%{clip-path:inset(0 0 100% 0)} } @keyframes kf-02-blinkOrange{50%{border-color:transparent}} @media(prefers-reduced-motion:reduce){.kf-02 *{animation:none!important;width:auto!important}} ``` ### 03. CSS Bouncing Ball Animation **Type:** Pure CSS **Description:** Realistic bouncing ball physics with squash-and-stretch, pendulum swing, stagger trio and rolling ball — all driven by cubic-bezier keyframes, no JavaScript. **HTML:** ```html
        CSS Bouncing Ball Physics Animations
        Simple
        Bounce
        Squash &
        Stretch
        Pendulum
        Swing
        Stagger
        Trio
        Rolling Ball
        ``` **CSS:** ```css .kf-03,.kf-03 *,.kf-03 *::before,.kf-03 *::after{box-sizing:border-box;margin:0;padding:0} .kf-03 ::selection{background:#f72585;color:#fff} .kf-03{ --bg:#fafaf8; --floor:#e8e5e0; --red:#f72585; --orange:#fb8500; --blue:#3a86ff; --green:#06d6a0; --purple:#7b2d8b; --shadow:rgba(0,0,0,.18); font-family:'Segoe UI',sans-serif; background:var(--bg); min-height:100vh; display:flex;flex-direction:column;align-items:center;justify-content:center; padding:40px 24px; gap:48px; color:#1a1a1a; } .kf-03__label{font-size:11px;letter-spacing:.2em;text-transform:uppercase;color:#999;text-align:center;margin-top:16px} .kf-03__title{font-size:clamp(1.4rem,4vw,2rem);font-weight:700;letter-spacing:-.02em;text-align:center;color:#1a1a1a} .kf-03__title span{color:var(--red)} /* Scene container */ .kf-03__row{display:flex;gap:48px;flex-wrap:wrap;justify-content:center;align-items:flex-end} .kf-03__scene{display:flex;flex-direction:column;align-items:center;gap:0;width:80px} .kf-03__arena{width:80px;height:180px;position:relative;display:flex;justify-content:center} .kf-03__floor{width:100%;height:4px;background:var(--floor);border-radius:2px;box-shadow:0 2px 0 #d8d5d0} /* Ball base */ .kf-03__ball{ position:absolute; border-radius:50%; left:50%;transform:translateX(-50%); } /* Shadow base */ .kf-03__shadow{ position:absolute;bottom:4px;left:50%;transform:translateX(-50%); background:var(--shadow);border-radius:50%; } /* 1 — Simple bounce */ .kf-03__ball--1{width:42px;height:42px;bottom:4px;background:radial-gradient(circle at 36% 28%,#ff9eb5,var(--red)); animation:kf-03-bounce1 0.7s cubic-bezier(.33,0,.66,0) infinite alternate} .kf-03__shadow--1{width:36px;height:10px;animation:kf-03-sh1 0.7s ease-in-out infinite alternate} @keyframes kf-03-bounce1{to{bottom:130px}} @keyframes kf-03-sh1{from{opacity:.3;transform:translateX(-50%) scaleX(1)}to{opacity:.06;transform:translateX(-50%) scaleX(.4)}} /* 2 — Squash & stretch */ .kf-03__ball--2{width:44px;height:44px;bottom:4px;background:radial-gradient(circle at 36% 28%,#ffc06a,var(--orange)); animation:kf-03-squash 0.8s ease-in-out infinite} .kf-03__shadow--2{width:36px;height:10px;animation:kf-03-sh2 0.8s ease-in-out infinite} @keyframes kf-03-squash{ 0%{bottom:4px;height:30px;width:52px;border-radius:50%/30%} 20%{bottom:100px;height:48px;width:36px;border-radius:50%} 40%{bottom:140px;height:52px;width:34px} 60%{bottom:80px;height:48px;width:36px} 80%{bottom:4px;height:26px;width:56px;border-radius:50%/30%} 100%{bottom:4px;height:30px;width:52px;border-radius:50%/30%} } @keyframes kf-03-sh2{0%,80%,100%{opacity:.4;transform:translateX(-50%) scaleX(1.2)}40%{opacity:.06;transform:translateX(-50%) scaleX(.3)}} /* 3 — Pendulum swing */ .kf-03__pend{width:80px;height:180px;position:relative;display:flex;justify-content:center;overflow:visible} .kf-03__string{position:absolute;top:8px;left:50%;width:2px;height:110px;background:#ccc;transform-origin:top center;animation:kf-03-pend 1.2s ease-in-out infinite alternate} @keyframes kf-03-pend{from{transform:rotate(-35deg)}to{transform:rotate(35deg)}} .kf-03__pball{position:absolute;bottom:0;left:50%;transform:translateX(-50%); width:36px;height:36px;border-radius:50%; background:radial-gradient(circle at 36% 28%,#90e0ef,var(--blue))} /* 4 — Triple bounce stagger */ .kf-03__triple{display:flex;gap:12px;align-items:flex-end;position:relative;height:180px;padding:0 4px} .kf-03__ball--t{width:26px;height:26px;border-radius:50%;position:absolute;bottom:4px} .kf-03__ball--t:nth-child(1){left:4px;background:var(--green);animation:kf-03-bounce1 0.7s cubic-bezier(.33,0,.66,0) infinite alternate} .kf-03__ball--t:nth-child(2){left:27px;background:var(--blue);animation:kf-03-bounce1 0.7s cubic-bezier(.33,0,.66,0) .15s infinite alternate} .kf-03__ball--t:nth-child(3){left:50px;background:var(--purple);animation:kf-03-bounce1 0.7s cubic-bezier(.33,0,.66,0) .3s infinite alternate} /* 5 — Rolling ball */ .kf-03__roll-wrap{width:180px;height:70px;position:relative;border-bottom:4px solid var(--floor);border-radius:0 0 4px 4px} .kf-03__ball--r{ width:46px;height:46px;bottom:4px;position:absolute;border-radius:50%; background:radial-gradient(circle at 36% 28%,#c9b8ff,var(--purple)); animation:kf-03-roll-x 2s linear infinite,kf-03-roll-spin 2s linear infinite; } @keyframes kf-03-roll-x{0%{left:-46px}100%{left:180px}} @keyframes kf-03-roll-spin{to{transform:rotate(360deg)}} @media(max-width:600px){.kf-03__row{gap:24px}} @media(prefers-reduced-motion:reduce){.kf-03 *{animation:none!important}} ``` ### 04. CSS Pulse Glow Animation Button **Type:** Pure CSS **Description:** Nine glowing button animation styles: ripple pulse, neon glow, heartbeat, shimmer sweep, border spin, breath expand, lightning flash, radar sweep and glow bloom. **HTML:** ```html
        Ripple Pulse
        Neon Glow
        Heartbeat
        Shimmer Sweep
        Border Spin
        Breath Expand
        Lightning Flash
        Radar Sweep
        Glow Bloom
        ``` **CSS:** ```css @import url('https://fonts.googleapis.com/css2?family=Inter:wght@500;700&display=swap'); .kf-04,.kf-04 *,.kf-04 *::before,.kf-04 *::after{box-sizing:border-box;margin:0;padding:0} .kf-04 ::selection{background:#00ff88;color:#000} .kf-04{ --bg:#06070a; --green:#00ff88; --blue:#00b4ff; --purple:#a855f7; --red:#ff3366; --gold:#ffbe0b; --white:#f8f9fa; font-family:'Inter',sans-serif; background:var(--bg); min-height:100vh; display:flex;flex-direction:column;align-items:center;justify-content:center; padding:60px 24px; gap:40px; } .kf-04__grid{display:grid;grid-template-columns:repeat(3,1fr);gap:32px;max-width:820px;width:100%} .kf-04__cell{display:flex;flex-direction:column;align-items:center;gap:16px} .kf-04__sublabel{font-size:11px;letter-spacing:.15em;text-transform:uppercase;color:#444} /* Base button */ .kf-04__btn{ position:relative; padding:14px 32px; border:none;border-radius:8px; font-family:'Inter';font-weight:700;font-size:.95rem;letter-spacing:.04em; cursor:pointer; overflow:visible; text-transform:uppercase; } /* 1 — Ripple pulse */ .kf-04__btn--1{background:var(--green);color:#000} .kf-04__btn--1::before,.kf-04__btn--1::after{ content:'';position:absolute;inset:0;border-radius:8px; background:var(--green);opacity:.5; animation:kf-04-ripple 2s ease-out infinite; } .kf-04__btn--1::after{animation-delay:.6s} @keyframes kf-04-ripple{ 0%{transform:scale(1);opacity:.6} 100%{transform:scale(1.8);opacity:0} } /* 2 — Neon glow pulse */ .kf-04__btn--2{ background:transparent; color:var(--blue); border:2px solid var(--blue); animation:kf-04-neon 2s ease-in-out infinite alternate; } @keyframes kf-04-neon{ from{box-shadow:0 0 8px var(--blue),0 0 20px var(--blue),inset 0 0 8px rgba(0,180,255,.1)} to{box-shadow:0 0 20px var(--blue),0 0 50px var(--blue),0 0 80px rgba(0,180,255,.3),inset 0 0 20px rgba(0,180,255,.15)} } /* 3 — Heartbeat */ .kf-04__btn--3{ background:var(--red);color:#fff; animation:kf-04-heart 1.2s ease-in-out infinite; } @keyframes kf-04-heart{ 0%,100%{transform:scale(1);box-shadow:0 0 0 rgba(255,51,102,.4)} 14%{transform:scale(1.1);box-shadow:0 0 0 rgba(255,51,102,.2)} 28%{transform:scale(1);box-shadow:0 0 0 rgba(255,51,102,.4)} 42%{transform:scale(1.06);box-shadow:0 0 20px rgba(255,51,102,.5)} 70%{transform:scale(1)} } /* 4 — Shimmer sweep */ .kf-04__btn--4{ background:linear-gradient(135deg,#1a1a2e,#16213e,#0f3460); color:var(--purple); border:1px solid rgba(168,85,247,.3); overflow:hidden; } .kf-04__btn--4::before{ content:'';position:absolute; top:0;left:-100%;width:60%;height:100%; background:linear-gradient(90deg,transparent,rgba(168,85,247,.4),transparent); animation:kf-04-shimmer 2.5s ease-in-out infinite; } @keyframes kf-04-shimmer{to{left:160%}} /* 5 — Border spin */ .kf-04__btn--5{ background:#0d0d0d;color:var(--gold); border:2px solid transparent; background-clip:padding-box; } .kf-04__btn--5::before{ content:'';position:absolute;inset:-2px;border-radius:10px;z-index:-1; background:conic-gradient(from 0deg,var(--gold),transparent,var(--gold)); animation:kf-04-borderspin 2s linear infinite; } @keyframes kf-04-borderspin{to{transform:rotate(360deg)}} /* 6 — Breath expand */ .kf-04__btn--6{ background:var(--purple);color:#fff; animation:kf-04-breath 3s ease-in-out infinite; } @keyframes kf-04-breath{ 0%,100%{transform:scale(1);box-shadow:0 0 0 0 rgba(168,85,247,.4)} 50%{transform:scale(1.05);box-shadow:0 0 0 18px rgba(168,85,247,0)} } /* 7 — Lightning flash */ .kf-04__btn--7{ background:linear-gradient(135deg,#1a1a1a,#222); color:var(--gold); border:1px solid #333; } .kf-04__btn--7::before{ content:'⚡';position:absolute; left:-14px;top:50%;transform:translateY(-50%); font-size:16px; animation:kf-04-lightning 2s steps(1) infinite; } .kf-04__btn--7::after{ content:'';position:absolute;inset:0;border-radius:8px; background:var(--gold);opacity:0; animation:kf-04-flash 2s steps(1) infinite; } @keyframes kf-04-lightning{0%,90%,100%{opacity:0}92%{opacity:1}94%{opacity:0}96%{opacity:1}} @keyframes kf-04-flash{0%,90%,100%{opacity:0}92%{opacity:.15}94%{opacity:0}96%{opacity:.1}} /* 8 — Radar sweep */ .kf-04__radar{ width:100px;height:100px;border-radius:50%;position:relative; border:2px solid rgba(0,255,136,.3); background:radial-gradient(circle,rgba(0,255,136,.05),transparent); } .kf-04__radar::before,.kf-04__radar::after{content:'';position:absolute;border-radius:50%;border:1px solid rgba(0,255,136,.2)} .kf-04__radar::before{inset:18px} .kf-04__radar::after{inset:36px} .kf-04__radar-beam{ position:absolute;inset:0;border-radius:50%; background:conic-gradient(from 0deg,rgba(0,255,136,.6) 0deg,rgba(0,255,136,.1) 40deg,transparent 40deg); animation:kf-04-borderspin 2s linear infinite; } .kf-04__radar-dot{ position:absolute;width:6px;height:6px;border-radius:50%;background:var(--green); top:22%;left:62%;box-shadow:0 0 6px var(--green); animation:kf-04-blink 2s steps(1) infinite; } @keyframes kf-04-blink{0%,50%{opacity:1}51%,100%{opacity:0}} /* 9 — CTA with particles */ .kf-04__btn--9{background:linear-gradient(135deg,var(--red),var(--purple));color:#fff;padding:16px 40px;font-size:1rem;border-radius:50px} .kf-04__btn--9::before{content:'';position:absolute;inset:-3px;border-radius:52px;background:linear-gradient(135deg,var(--red),var(--purple));z-index:-1;filter:blur(10px);opacity:.6;animation:kf-04-glow 2s ease-in-out infinite alternate} @keyframes kf-04-glow{to{filter:blur(18px);opacity:.9}} @media(max-width:640px){.kf-04__grid{grid-template-columns:repeat(2,1fr)}} @media(max-width:400px){.kf-04__grid{grid-template-columns:1fr}} @media(prefers-reduced-motion:reduce){.kf-04 *{animation:none!important}} ``` ### 05. CSS Morphing Blob Animation **Type:** Pure CSS **Description:** Six organic morphing blob animations — duo-colour, gradient shift, blend cluster, breathing ring and labelled blob — using staggered border-radius keyframes. **HTML:** ```html
        Classic Blob
        Duo-Color
        Gradient Shift
        Blend Cluster
        Breathing Ring
        FLUID
        DESIGN
        Label Blob
        ``` **CSS:** ```css @import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;700;800&display=swap'); .kf-05,.kf-05 *,.kf-05 *::before,.kf-05 *::after{box-sizing:border-box;margin:0;padding:0} .kf-05 ::selection{background:#ff6bd6;color:#fff} .kf-05{ --bg:#fff8f5; --coral:#ff6b6b; --teal:#06d6a0; --indigo:#3d5af1; --pink:#ff6bd6; --yellow:#ffe45e; --dark:#1a1a2e; font-family:'Syne',sans-serif; background:var(--bg); min-height:100vh; display:flex;flex-direction:column;align-items:center;justify-content:center; padding:60px 24px; gap:64px; overflow:hidden; position:relative; } /* Soft BG blobs */ .kf-05::before{content:'';position:absolute;top:-10%;right:-5%;width:500px;height:500px;border-radius:63% 37% 54% 46%/55% 48% 52% 45%; background:rgba(255,107,214,.08);animation:kf-05-bg 12s ease-in-out infinite;z-index:0} .kf-05::after{content:'';position:absolute;bottom:-10%;left:-5%;width:400px;height:400px;border-radius:42% 58% 37% 63%/55% 38% 62% 45%; background:rgba(6,214,160,.07);animation:kf-05-bg 10s ease-in-out infinite reverse;z-index:0} @keyframes kf-05-bg{ 0%,100%{border-radius:63% 37% 54% 46%/55% 48% 52% 45%} 50%{border-radius:37% 63% 46% 54%/45% 55% 48% 52%;transform:scale(1.08)} } .kf-05__row{display:flex;gap:48px;flex-wrap:wrap;justify-content:center;position:relative;z-index:1} .kf-05__cell{display:flex;flex-direction:column;align-items:center;gap:20px} .kf-05__label{font-size:11px;letter-spacing:.2em;text-transform:uppercase;color:#aaa} /* 1 — Classic blob */ .kf-05__blob--1{ width:140px;height:140px; background:linear-gradient(135deg,var(--coral),var(--pink)); animation:kf-05-blob1 6s ease-in-out infinite; } @keyframes kf-05-blob1{ 0%,100%{border-radius:63% 37% 54% 46%/55% 48% 52% 45%} 25%{border-radius:40% 60% 35% 65%/60% 30% 70% 40%} 50%{border-radius:55% 45% 65% 35%/35% 65% 45% 55%} 75%{border-radius:30% 70% 50% 50%/40% 60% 70% 30%} } /* 2 — Duo-color blob */ .kf-05__blob--2{ width:140px;height:140px; position:relative; animation:kf-05-blob2 7s ease-in-out infinite; } .kf-05__blob--2::before{ content:'';position:absolute;inset:0; background:linear-gradient(135deg,var(--indigo),var(--teal)); animation:kf-05-blob1 7s ease-in-out infinite; border-radius:63% 37% 54% 46%/55% 48% 52% 45%; } .kf-05__blob--2::after{ content:'';position:absolute;inset:20px; background:rgba(255,248,245,.6); animation:kf-05-blob1 5s ease-in-out infinite reverse; border-radius:50%; } /* 3 — Gradient shift blob */ .kf-05__blob--3{ width:140px;height:140px; animation:kf-05-blob3 8s ease-in-out infinite; background:linear-gradient(0deg,var(--yellow),var(--coral)); background-size:100% 200%; } @keyframes kf-05-blob3{ 0%,100%{border-radius:60% 40% 55% 45%/50% 55% 45% 50%;background-position:0% 0%} 33%{border-radius:40% 60% 30% 70%/60% 40% 60% 40%;background-position:0% 50%} 66%{border-radius:55% 45% 68% 32%/38% 68% 32% 62%;background-position:0% 100%} } /* 4 — Multi-blob cluster */ .kf-05__cluster{width:180px;height:180px;position:relative} .kf-05__cluster-b{position:absolute;border-radius:63% 37% 54% 46%/55% 48% 52% 45%;mix-blend-mode:multiply} .kf-05__cluster-b:nth-child(1){width:100px;height:100px;background:rgba(255,107,107,.7);top:0;left:0;animation:kf-05-blob1 5s ease-in-out infinite} .kf-05__cluster-b:nth-child(2){width:100px;height:100px;background:rgba(61,90,241,.7);top:30px;left:50px;animation:kf-05-blob1 6s ease-in-out infinite .5s} .kf-05__cluster-b:nth-child(3){width:100px;height:100px;background:rgba(255,228,94,.7);top:60px;left:20px;animation:kf-05-blob1 7s ease-in-out infinite 1s} /* 5 — Breathing ring blob */ .kf-05__blob--5{ width:140px;height:140px; border:12px solid var(--pink); background:transparent; animation:kf-05-blob1 6s ease-in-out infinite 0.5s,kf-05-ring 3s ease-in-out infinite; } @keyframes kf-05-ring{ 0%,100%{border-width:12px;box-shadow:0 0 0 0 rgba(255,107,214,.3)} 50%{border-width:4px;box-shadow:0 0 0 20px rgba(255,107,214,0)} } /* 6 — Text inside blob */ .kf-05__blob--6{ width:160px;height:160px; background:linear-gradient(135deg,var(--indigo),#7c3aed); display:grid;place-items:center; color:#fff; font-weight:800;font-size:1.2rem;text-align:center;line-height:1.2; animation:kf-05-blob1 7s ease-in-out infinite; box-shadow:0 20px 60px rgba(61,90,241,.35); } @media(max-width:600px){.kf-05__row{gap:24px}.kf-05__blob--1,.kf-05__blob--2,.kf-05__blob--3,.kf-05__blob--5,.kf-05__blob--6{width:110px;height:110px}} @media(prefers-reduced-motion:reduce){.kf-05 *{animation:none!important;border-radius:50%!important}} ``` ### 06. CSS Particle Burst Animation **Type:** Pure CSS **Description:** Four particle burst effects: shockwave rings, firework sparks, spinning petals and confetti rain — all pure CSS translate + scale keyframes, no canvas. **HTML:** ```html
        Shockwave
        Firework Sparks
        Spinning Petals
        Confetti Rain
        ``` **CSS:** ```css @import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;700&display=swap'); .kf-06,.kf-06 *,.kf-06 *::before,.kf-06 *::after{box-sizing:border-box;margin:0;padding:0} .kf-06 ::selection{background:#ff9f1c;color:#000} .kf-06{ --bg:#09090b; --orange:#ff9f1c; --teal:#2ec4b6; --pink:#e71d73; --lime:#cbff4d; --white:#f4f4f5; font-family:'Space Grotesk',sans-serif; background:var(--bg); min-height:100vh; display:flex;flex-direction:column;align-items:center;justify-content:center; padding:60px 24px;gap:72px; overflow:hidden; } /* ——— Burst 1: radial lines ——— */ .kf-06__burst{position:relative;width:120px;height:120px;display:grid;place-items:center} .kf-06__burst-ring{ position:absolute;inset:0;border-radius:50%; border:3px solid var(--orange); animation:kf-06-expand 2s ease-out infinite; } .kf-06__burst-ring:nth-child(2){animation-delay:.4s;border-color:rgba(255,159,28,.6)} .kf-06__burst-ring:nth-child(3){animation-delay:.8s;border-color:rgba(255,159,28,.3)} @keyframes kf-06-expand{ 0%{transform:scale(.1);opacity:1} 100%{transform:scale(2.5);opacity:0} } .kf-06__burst-dot{width:20px;height:20px;border-radius:50%;background:var(--orange);box-shadow:0 0 20px var(--orange)} /* ——— Burst 2: firework sparks ——— */ .kf-06__firework{position:relative;width:140px;height:140px} .kf-06__spark{ position:absolute;top:50%;left:50%; width:6px;height:6px;border-radius:50%; margin:-3px 0 0 -3px; animation:kf-06-spark 1.8s ease-out infinite; } .kf-06__spark:nth-child(1){background:var(--teal);--angle:0deg;animation-delay:0s} .kf-06__spark:nth-child(2){background:var(--pink);--angle:45deg;animation-delay:.05s} .kf-06__spark:nth-child(3){background:var(--lime);--angle:90deg;animation-delay:.1s} .kf-06__spark:nth-child(4){background:var(--orange);--angle:135deg;animation-delay:.15s} .kf-06__spark:nth-child(5){background:var(--teal);--angle:180deg;animation-delay:.2s} .kf-06__spark:nth-child(6){background:var(--pink);--angle:225deg;animation-delay:.25s} .kf-06__spark:nth-child(7){background:var(--lime);--angle:270deg;animation-delay:.3s} .kf-06__spark:nth-child(8){background:var(--orange);--angle:315deg;animation-delay:.35s} @keyframes kf-06-spark{ 0%{transform:rotate(var(--angle)) translateX(0);opacity:1;width:6px;height:6px} 60%{opacity:1} 100%{transform:rotate(var(--angle)) translateX(60px);opacity:0;width:3px;height:3px} } /* ——— Burst 3: starburst petals ——— */ .kf-06__starburst{position:relative;width:120px;height:120px;animation:kf-06-rotate 6s linear infinite} @keyframes kf-06-rotate{to{transform:rotate(360deg)}} .kf-06__petal{ position:absolute;top:50%;left:50%; width:12px;height:40px; border-radius:50%; margin:-20px 0 0 -6px; transform-origin:50% 100%; opacity:.8; } .kf-06__petal:nth-child(1){background:var(--teal);transform:rotate(0deg);animation:kf-06-petal 2s ease-in-out infinite} .kf-06__petal:nth-child(2){background:var(--pink);transform:rotate(45deg);animation:kf-06-petal 2s ease-in-out infinite .25s} .kf-06__petal:nth-child(3){background:var(--lime);transform:rotate(90deg);animation:kf-06-petal 2s ease-in-out infinite .5s} .kf-06__petal:nth-child(4){background:var(--orange);transform:rotate(135deg);animation:kf-06-petal 2s ease-in-out infinite .75s} .kf-06__petal:nth-child(5){background:var(--teal);transform:rotate(180deg);animation:kf-06-petal 2s ease-in-out infinite 1s} .kf-06__petal:nth-child(6){background:var(--pink);transform:rotate(225deg);animation:kf-06-petal 2s ease-in-out infinite 1.25s} .kf-06__petal:nth-child(7){background:var(--lime);transform:rotate(270deg);animation:kf-06-petal 2s ease-in-out infinite 1.5s} .kf-06__petal:nth-child(8){background:var(--orange);transform:rotate(315deg);animation:kf-06-petal 2s ease-in-out infinite 1.75s} @keyframes kf-06-petal{ 0%,100%{height:30px;opacity:.6} 50%{height:50px;opacity:1} } /* ——— Burst 4: confetti fall ——— */ .kf-06__confetti{position:relative;width:200px;height:100px;overflow:hidden} .kf-06__c{ position:absolute; width:8px;height:8px; animation:kf-06-fall linear infinite; } .kf-06__c:nth-child(1){left:10%;background:var(--teal);animation-duration:2.4s;animation-delay:0s;border-radius:2px} .kf-06__c:nth-child(2){left:25%;background:var(--pink);animation-duration:2s;animation-delay:.3s;border-radius:50%} .kf-06__c:nth-child(3){left:40%;background:var(--lime);animation-duration:2.8s;animation-delay:.6s} .kf-06__c:nth-child(4){left:55%;background:var(--orange);animation-duration:2.2s;animation-delay:.9s;border-radius:50%} .kf-06__c:nth-child(5){left:70%;background:var(--teal);animation-duration:2.6s;animation-delay:.2s} .kf-06__c:nth-child(6){left:85%;background:var(--pink);animation-duration:2.1s;animation-delay:.7s;border-radius:2px} .kf-06__c:nth-child(7){left:15%;background:var(--lime);animation-duration:2.9s;animation-delay:1.1s;border-radius:50%} .kf-06__c:nth-child(8){left:60%;background:var(--orange);animation-duration:2.3s;animation-delay:.4s} @keyframes kf-06-fall{ 0%{top:-8px;transform:rotate(0) translateX(0);opacity:1} 100%{top:100%;transform:rotate(720deg) translateX(20px);opacity:0} } .kf-06__row{display:flex;gap:56px;flex-wrap:wrap;justify-content:center;align-items:center} .kf-06__cell{display:flex;flex-direction:column;align-items:center;gap:18px} .kf-06__label{font-size:11px;letter-spacing:.18em;text-transform:uppercase;color:#555} @media(prefers-reduced-motion:reduce){.kf-06 *{animation:none!important}} ``` ### 07. CSS Wave Animation **Type:** Pure CSS **Description:** Ocean waves with animated boat, gradient wave, liquid-level vial and expanding pulse rings using CSS clip-path and sinusoidal keyframe paths. **HTML:** ```html
        Ocean Waves
        FLOWING
        Gradient Wave
        65%
        Liquid Level
        Pulse Rings
        ``` **CSS:** ```css @import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;700&display=swap'); .kf-07,.kf-07 *,.kf-07 *::before,.kf-07 *::after{box-sizing:border-box;margin:0;padding:0} .kf-07 ::selection{background:#0077b6;color:#fff} .kf-07{ --bg:#03045e; --deep:#0077b6; --mid:#00b4d8; --light:#90e0ef; --foam:#caf0f8; --white:#fff; --gold:#ffd60a; font-family:'DM Sans',sans-serif; background:linear-gradient(180deg,#03045e 0%,#0096c7 60%,#00b4d8 100%); min-height:100vh; display:flex;flex-direction:column;align-items:center;justify-content:center; padding:40px 20px;gap:56px; overflow:hidden; position:relative; color:var(--white); } /* 1 — Ocean waves stacked */ .kf-07__ocean{ position:relative;width:100%;max-width:700px;height:180px; background:linear-gradient(180deg,rgba(0,150,199,.3),rgba(0,77,110,.6)); border-radius:12px;overflow:hidden; } .kf-07__wave{ position:absolute;bottom:0;left:0;right:0; background:var(--mid); border-radius:100% 100% 0 0/40px; } .kf-07__wave--1{height:60px;background:rgba(0,180,216,.7);animation:kf-07-wave1 4s ease-in-out infinite} .kf-07__wave--2{height:50px;background:rgba(144,224,239,.5);animation:kf-07-wave2 5s ease-in-out infinite .3s} .kf-07__wave--3{height:40px;background:rgba(202,240,248,.4);animation:kf-07-wave1 6s ease-in-out infinite .6s} @keyframes kf-07-wave1{ 0%,100%{transform:translateX(-50px) scaleY(1)} 50%{transform:translateX(30px) scaleY(1.1)} } @keyframes kf-07-wave2{ 0%,100%{transform:translateX(40px) scaleY(1)} 50%{transform:translateX(-30px) scaleY(.9)} } .kf-07__ship{position:absolute;top:16px;left:0;font-size:28px;animation:kf-07-sail 8s linear infinite} @keyframes kf-07-sail{from{left:-40px}to{left:calc(100% + 40px)}} /* 2 — Sine wave line */ .kf-07__sine{width:100%;max-width:600px;height:80px;position:relative;overflow:hidden} .kf-07__sine-line{ position:absolute;bottom:0;left:-100%;width:300%;height:100%; background:none; border-top:3px solid var(--mid); border-radius:100%; animation:kf-07-sine 3s linear infinite; } .kf-07__sine-line--2{border-top-color:var(--light);animation-delay:.5s;opacity:.6} .kf-07__sine-line--3{border-top-color:var(--foam);animation-delay:1s;opacity:.3} @keyframes kf-07-sine{to{transform:translateX(33.33%)}} /* 3 — Animated gradient wave bg */ .kf-07__grad-wave{ width:100%;max-width:700px;height:120px;position:relative;border-radius:12px;overflow:hidden; } .kf-07__grad-wave::before{ content:'';position:absolute;inset:0; background:linear-gradient(90deg,#03045e,var(--deep),var(--mid),var(--light),var(--mid),var(--deep),#03045e); background-size:400% 100%; animation:kf-07-gradwave 4s linear infinite; } @keyframes kf-07-gradwave{to{background-position:-400% 0}} .kf-07__grad-text{position:relative;z-index:1;height:100%;display:flex;align-items:center;justify-content:center;font-size:2rem;font-weight:700;letter-spacing:.1em} /* 4 — Liquid level */ .kf-07__vial{width:90px;height:180px;border:3px solid var(--foam);border-radius:45px;position:relative;overflow:hidden;background:rgba(0,0,0,.2)} .kf-07__liquid{ position:absolute;bottom:0;left:0;right:0;height:65%; background:linear-gradient(180deg,var(--mid),var(--deep)); } .kf-07__liquid::before{ content:'';position:absolute;top:-18px;left:-50%;width:200%;height:36px; background:var(--mid);border-radius:50%; animation:kf-07-liq 2.5s ease-in-out infinite; } @keyframes kf-07-liq{ 0%,100%{transform:translateX(-10px) rotateZ(-2deg)} 50%{transform:translateX(10px) rotateZ(2deg)} } .kf-07__pct{position:absolute;inset:0;display:grid;place-items:center;font-weight:700;font-size:1.1rem;color:var(--white)} /* 5 — Pulse ring wave */ .kf-07__rings{position:relative;width:120px;height:120px;display:grid;place-items:center} .kf-07__ring{position:absolute;border-radius:50%;border:2px solid var(--mid);animation:kf-07-ring 2.4s ease-out infinite} .kf-07__ring:nth-child(1){inset:40px;animation-delay:0s} .kf-07__ring:nth-child(2){inset:30px;animation-delay:.4s;border-color:var(--light)} .kf-07__ring:nth-child(3){inset:20px;animation-delay:.8s;border-color:var(--foam)} .kf-07__ring:nth-child(4){inset:10px;animation-delay:1.2s} @keyframes kf-07-ring{ 0%{transform:scale(1);opacity:1} 100%{transform:scale(3);opacity:0} } .kf-07__row{display:flex;gap:40px;flex-wrap:wrap;justify-content:center;align-items:center;width:100%;max-width:700px} .kf-07__cell{display:flex;flex-direction:column;align-items:center;gap:14px} .kf-07__label{font-size:11px;letter-spacing:.18em;text-transform:uppercase;color:rgba(202,240,248,.6)} @media(prefers-reduced-motion:reduce){.kf-07 *{animation:none!important}} ``` ### 08. CSS 3D Flip Card Animation **Type:** Pure CSS **Description:** Four CSS 3D card flip animations: auto-flip Y-axis, hover-triggered flip, X-axis flip and diagonal flip using CSS perspective and rotateY/X keyframes. **HTML:** ```html
        🎧

        Pro Headset X

        Studio quality. Wireless freedom.

        $129
        Buy Now
        Auto Flip Y
        👩‍🎨

        Mara Solano

        Creative Director
        142Projects
        98%Rating
        Hover Flip

        Magic Card

        Flip on the X axis for a fresh perspective on card reveals.

        Flip X Axis
        42

        Diagonal axis flip

        Task complete!

        Diagonal Flip
        ``` **CSS:** ```css @import url('https://fonts.googleapis.com/css2?family=Raleway:wght@400;700;900&display=swap'); .kf-08,.kf-08 *,.kf-08 *::before,.kf-08 *::after{box-sizing:border-box;margin:0;padding:0} .kf-08 ::selection{background:#f4a261;color:#fff} .kf-08{ --bg:#1c1c1e; --orange:#f4a261; --teal:#2a9d8f; --sand:#e9c46a; --red:#e76f51; --blue:#264653; --white:#f8f9fa; font-family:'Raleway',sans-serif; background:var(--bg); min-height:100vh; display:flex;flex-direction:column;align-items:center;justify-content:center; padding:60px 24px;gap:48px; color:var(--white); } .kf-08__grid{display:flex;gap:32px;flex-wrap:wrap;justify-content:center} .kf-08__label{font-size:11px;letter-spacing:.18em;text-transform:uppercase;color:#666;text-align:center} .kf-08__cell{display:flex;flex-direction:column;align-items:center;gap:16px} /* 3D card base */ .kf-08__card{perspective:800px;width:180px;height:240px;cursor:pointer} .kf-08__inner{ width:100%;height:100%;position:relative;transform-style:preserve-3d; transition:transform .6s ease; } .kf-08__front,.kf-08__back{ position:absolute;inset:0;border-radius:16px; backface-visibility:hidden;display:flex;flex-direction:column;align-items:center;justify-content:center; gap:12px;padding:24px; } .kf-08__back{transform:rotateY(180deg)} /* Auto-flip animation */ .kf-08__inner--auto{animation:kf-08-flip 4s ease-in-out infinite} @keyframes kf-08-flip{ 0%,40%{transform:rotateY(0deg)} 50%,90%{transform:rotateY(180deg)} 100%{transform:rotateY(0deg)} } /* Hover flip */ .kf-08__card:hover .kf-08__inner--hover{transform:rotateY(180deg)} /* X-axis flip */ .kf-08__inner--x{animation:kf-08-flipx 4s ease-in-out infinite 1s} @keyframes kf-08-flipx{ 0%,40%{transform:rotateX(0deg)} 50%,90%{transform:rotateX(180deg)} 100%{transform:rotateX(0deg)} } .kf-08__back--x{transform:rotateX(180deg)} /* 4 — diagonal flip */ .kf-08__inner--diag{animation:kf-08-diag 4s ease-in-out infinite 0.5s} @keyframes kf-08-diag{ 0%,40%{transform:rotate3d(1,1,0,0deg)} 50%,90%{transform:rotate3d(1,1,0,180deg)} 100%{transform:rotate3d(1,1,0,0deg)} } .kf-08__back--diag{transform:rotate3d(1,1,0,180deg)} /* Card 1 — Product card */ .kf-08__f1{background:linear-gradient(135deg,#264653,#2a9d8f);box-shadow:0 20px 40px rgba(0,0,0,.4)} .kf-08__f1 .icon{font-size:3rem} .kf-08__f1 h3{font-size:1.1rem;font-weight:900;text-align:center} .kf-08__f1 p{font-size:.8rem;opacity:.7;text-align:center} .kf-08__b1{background:linear-gradient(135deg,#e9c46a,#f4a261);color:#1c1c1e;box-shadow:0 20px 40px rgba(0,0,0,.4)} .kf-08__b1 .price{font-size:2.2rem;font-weight:900} .kf-08__b1 .cta{background:#1c1c1e;color:#f4a261;border-radius:8px;padding:8px 20px;font-weight:700;font-size:.85rem} /* Card 2 — Profile card */ .kf-08__f2{background:linear-gradient(135deg,#e76f51,#f4a261);box-shadow:0 20px 40px rgba(231,111,81,.3)} .kf-08__f2 .avatar{width:72px;height:72px;border-radius:50%;background:rgba(255,255,255,.3);display:grid;place-items:center;font-size:2.2rem} .kf-08__f2 h3{font-weight:900} .kf-08__f2 small{opacity:.7;font-size:.8rem} .kf-08__b2{background:linear-gradient(135deg,#264653,#023e8a);box-shadow:0 20px 40px rgba(0,0,0,.4)} .kf-08__b2 .stat{text-align:center} .kf-08__b2 .stat b{display:block;font-size:1.6rem;font-weight:900;color:var(--sand)} .kf-08__b2 .stat small{font-size:.7rem;opacity:.6} .kf-08__b2 .stats{display:flex;gap:16px} /* Card 3 */ .kf-08__f3{background:linear-gradient(135deg,#7b2d8b,#c264f0);box-shadow:0 20px 40px rgba(123,45,139,.4)} .kf-08__f3 .icon{font-size:3rem} .kf-08__f3 h3{font-weight:900;font-size:1.2rem;text-align:center} .kf-08__b3{background:linear-gradient(135deg,#ff6b6b,#ffd166);color:#1c1c1e;box-shadow:0 20px 40px rgba(0,0,0,.3)} .kf-08__b3 p{font-size:.88rem;text-align:center;line-height:1.5} /* Card 4 — diagonal */ .kf-08__f4{background:linear-gradient(135deg,#0d1b2a,#1b4332);box-shadow:0 20px 40px rgba(0,0,0,.5);border:1px solid rgba(255,255,255,.05)} .kf-08__f4 .num{font-size:4rem;font-weight:900;color:var(--teal);line-height:1} .kf-08__f4 p{font-size:.8rem;opacity:.5;text-align:center} .kf-08__b4{background:linear-gradient(135deg,#2d6a4f,#40916c);box-shadow:0 20px 40px rgba(0,0,0,.4)} .kf-08__b4 .check{font-size:2.5rem} .kf-08__b4 p{font-size:.9rem;text-align:center;font-weight:700} @media(max-width:500px){.kf-08__card{width:150px;height:200px}} @media(prefers-reduced-motion:reduce){.kf-08 *{animation:none!important;transition:none!important}} ``` ### 09. CSS Neon Sign Flicker Animation **Type:** Pure CSS **Description:** Five neon sign animations: cursive pink glow, cyan monospace, OPEN sign box, script yellow hum and multi-word stagger flicker using box-shadow and opacity keyframes. **HTML:** ```html
        Electric Dreams
        NEON DISTRICT
        OPEN
        Late Night Vibes
        LIVE · CODE · CREATE
        ``` **CSS:** ```css @import url('https://fonts.googleapis.com/css2?family=Pacifico&family=Bebas+Neue&family=Sacramento&display=swap'); .kf-09,.kf-09 *,.kf-09 *::before,.kf-09 *::after{box-sizing:border-box;margin:0;padding:0} .kf-09 ::selection{background:#ff2dce;color:#fff} .kf-09{ --bg:#0a0008; --pink:#ff2dce; --cyan:#00fff5; --red:#ff3030; --yellow:#fff200; --blue:#4d79ff; --green:#39ff14; font-family:'Bebas Neue',sans-serif; background:radial-gradient(circle at 50% 40%,#1a0b2e 0%,#0a0008 70%); min-height:100vh; display:flex;flex-direction:column;align-items:center;justify-content:center; padding:60px 24px;gap:56px; overflow:hidden; position:relative; } /* Brick wall texture */ .kf-09::before{ content:'';position:absolute;inset:0; background-image: repeating-linear-gradient(rgba(255,255,255,.02) 0 2px,transparent 2px 40px), repeating-linear-gradient(90deg,rgba(255,255,255,.015) 0 2px,transparent 2px 80px); pointer-events:none; } /* Floor reflection */ .kf-09::after{ content:'';position:absolute;bottom:0;left:0;right:0;height:30%; background:linear-gradient(0deg,rgba(255,45,206,.08),transparent); pointer-events:none; } /* Shared neon base */ .kf-09__sign{text-align:center;position:relative} /* 1 — Pink cursive */ .kf-09__s1{ font-family:'Pacifico',cursive; font-size:clamp(2.4rem,10vw,5rem); color:var(--pink); text-shadow: 0 0 7px var(--pink), 0 0 20px var(--pink), 0 0 45px var(--pink), 0 0 80px rgba(255,45,206,.5); animation:kf-09-flicker1 6s steps(1) infinite; } @keyframes kf-09-flicker1{ 0%,18%,22%,25%,53%,57%,100%{ text-shadow:0 0 7px var(--pink),0 0 20px var(--pink),0 0 45px var(--pink),0 0 80px rgba(255,45,206,.5); opacity:1; } 20%,24%{text-shadow:none;opacity:.4} 54%{opacity:.7;text-shadow:0 0 7px var(--pink)} 55%,56%{text-shadow:none;opacity:.3} } /* 2 — Cyan mono */ .kf-09__s2{ font-family:'Bebas Neue',sans-serif; font-size:clamp(2rem,8vw,4rem); letter-spacing:.2em; color:var(--cyan); text-shadow: 0 0 5px var(--cyan), 0 0 15px var(--cyan), 0 0 30px rgba(0,255,245,.4); animation:kf-09-flicker2 8s steps(1) infinite 1s; } @keyframes kf-09-flicker2{ 0%,49%,51%,100%{opacity:1;text-shadow:0 0 5px var(--cyan),0 0 15px var(--cyan),0 0 30px rgba(0,255,245,.4)} 50%{opacity:.1;text-shadow:none} } /* 3 — Red OPEN sign */ .kf-09__sign-box{ border:4px solid var(--red); border-radius:8px; padding:12px 32px; display:inline-block; position:relative; box-shadow: 0 0 12px var(--red), 0 0 30px rgba(255,48,48,.4), inset 0 0 12px rgba(255,48,48,.1); animation:kf-09-box 5s steps(1) infinite 2s; } @keyframes kf-09-box{ 0%,89%,91%,93%,100%{box-shadow:0 0 12px var(--red),0 0 30px rgba(255,48,48,.4),inset 0 0 12px rgba(255,48,48,.1)} 90%,92%{box-shadow:none} } .kf-09__s3{ font-size:clamp(1.8rem,6vw,3rem); color:var(--red); letter-spacing:.3em; text-shadow:0 0 8px var(--red),0 0 20px rgba(255,48,48,.5); animation:kf-09-box 5s steps(1) infinite 2s; } /* Dots on box */ .kf-09__sign-box::before,.kf-09__sign-box::after{ content:'●';position:absolute;top:50%;transform:translateY(-50%); font-size:12px;color:var(--red); text-shadow:0 0 6px var(--red); } .kf-09__sign-box::before{left:-20px} .kf-09__sign-box::after{right:-20px} /* 4 — Script + glow halo */ .kf-09__s4{ font-family:'Sacramento',cursive; font-size:clamp(2.4rem,8vw,4.5rem); color:var(--yellow); text-shadow: 0 0 6px var(--yellow), 0 0 18px var(--yellow), 0 0 40px rgba(255,242,0,.5); animation:kf-09-hum 2.5s ease-in-out infinite; } @keyframes kf-09-hum{ 0%,100%{text-shadow:0 0 6px var(--yellow),0 0 18px var(--yellow),0 0 40px rgba(255,242,0,.5)} 50%{text-shadow:0 0 8px var(--yellow),0 0 25px var(--yellow),0 0 60px rgba(255,242,0,.7),0 0 90px rgba(255,242,0,.3)} } /* 5 — Multi-word stagger flicker */ .kf-09__multirow{display:flex;gap:20px;justify-content:center;flex-wrap:wrap} .kf-09__word{ font-size:clamp(1.4rem,5vw,2.8rem); letter-spacing:.15em; } .kf-09__word:nth-child(1){color:var(--pink);text-shadow:0 0 10px var(--pink),0 0 30px rgba(255,45,206,.5);animation:kf-09-flicker1 7s steps(1) infinite 0s} .kf-09__word:nth-child(2){color:var(--blue);text-shadow:0 0 10px var(--blue),0 0 30px rgba(77,121,255,.5);animation:kf-09-flicker2 9s steps(1) infinite .5s} .kf-09__word:nth-child(3){color:var(--green);text-shadow:0 0 10px var(--green),0 0 30px rgba(57,255,20,.5);animation:kf-09-flicker1 5s steps(1) infinite 1s} @media(prefers-reduced-motion:reduce){.kf-09 *{animation:none!important}} ``` ### 10. CSS Skeleton Loading Animation **Type:** Pure CSS **Description:** Shimmer skeleton loading placeholders for blog cards, profile layouts, list rows and dashboard stat cards using a scoped linear-gradient sweep keyframe. **HTML:** ```html
        Skeleton Loading Screens
        ``` **CSS:** ```css @import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap'); .kf-10,.kf-10 *,.kf-10 *::before,.kf-10 *::after{box-sizing:border-box;margin:0;padding:0} .kf-10 ::selection{background:#7c3aed;color:#fff} .kf-10{ --bg:#f5f3ff; --card:#fff; --base:#e5e7eb; --shine:rgba(255,255,255,.9); --purple:#7c3aed; --purple-light:#ede9fe; font-family:'Inter',sans-serif; background:var(--bg); min-height:100vh; display:flex;flex-direction:column;align-items:center;justify-content:center; padding:40px 20px;gap:40px; color:#1f2937; } .kf-10__title{font-size:1.6rem;font-weight:600;color:#1f2937;letter-spacing:-.02em} .kf-10__title span{color:var(--purple)} .kf-10__grid{display:grid;grid-template-columns:repeat(3,1fr);gap:24px;max-width:900px;width:100%} /* Shimmer core */ .kf-10__skel{ background:var(--base); border-radius:6px; position:relative; overflow:hidden; } .kf-10__skel::after{ content:''; position:absolute;inset:0; background:linear-gradient(90deg,transparent 0%,var(--shine) 50%,transparent 100%); animation:kf-10-shimmer 1.6s ease-in-out infinite; } @keyframes kf-10-shimmer{ 0%{transform:translateX(-100%)} 100%{transform:translateX(100%)} } /* 1 — Blog card skeleton */ .kf-10__card{background:var(--card);border-radius:16px;padding:20px;box-shadow:0 1px 3px rgba(0,0,0,.08);display:flex;flex-direction:column;gap:12px} .kf-10__img-skel{height:140px;border-radius:10px} .kf-10__line{height:14px} .kf-10__line--sm{height:12px;width:70%} .kf-10__line--xs{height:10px;width:50%} .kf-10__avatar-row{display:flex;gap:10px;align-items:center;margin-top:4px} .kf-10__av-skel{width:32px;height:32px;border-radius:50%;flex:0 0 32px} .kf-10__name-skel{height:11px;flex:0 0 90px} /* 2 — Profile skeleton */ .kf-10__profile{background:var(--card);border-radius:16px;padding:24px;box-shadow:0 1px 3px rgba(0,0,0,.08);display:flex;flex-direction:column;align-items:center;gap:14px} .kf-10__profile-av{width:72px;height:72px;border-radius:50%} .kf-10__profile-name{height:16px;width:120px} .kf-10__profile-sub{height:12px;width:80px} .kf-10__profile-bars{width:100%;display:flex;flex-direction:column;gap:8px} /* 3 — List skeleton */ .kf-10__list{background:var(--card);border-radius:16px;padding:20px;box-shadow:0 1px 3px rgba(0,0,0,.08);display:flex;flex-direction:column;gap:0} .kf-10__list-item{display:flex;gap:12px;align-items:center;padding:12px 0;border-bottom:1px solid var(--bg)} .kf-10__list-item:last-child{border:0;padding-bottom:0} .kf-10__li-icon{width:40px;height:40px;border-radius:10px;flex:0 0 40px} .kf-10__li-body{flex:1;display:flex;flex-direction:column;gap:7px} .kf-10__li-t{height:13px} .kf-10__li-s{height:10px;width:65%} /* 4 — Dashboard skeleton */ .kf-10__dash{grid-column:span 3;background:var(--card);border-radius:16px;padding:24px;box-shadow:0 1px 3px rgba(0,0,0,.08);display:grid;grid-template-columns:repeat(4,1fr);gap:20px} .kf-10__stat-card{background:var(--purple-light);border-radius:12px;padding:18px;display:flex;flex-direction:column;gap:10px} .kf-10__stat-num{height:28px;width:80px} .kf-10__stat-label{height:11px;width:60%} .kf-10__stat-bar{height:5px;border-radius:3px;margin-top:4px} /* Stagger delays for variety */ .kf-10__card:nth-child(2) .kf-10__skel::after{animation-delay:.2s} .kf-10__card:nth-child(3) .kf-10__skel::after{animation-delay:.4s} .kf-10__list-item:nth-child(2) .kf-10__skel::after{animation-delay:.15s} .kf-10__list-item:nth-child(3) .kf-10__skel::after{animation-delay:.3s} .kf-10__stat-card:nth-child(2) .kf-10__skel::after{animation-delay:.1s} .kf-10__stat-card:nth-child(3) .kf-10__skel::after{animation-delay:.2s} .kf-10__stat-card:nth-child(4) .kf-10__skel::after{animation-delay:.3s} @media(max-width:700px){.kf-10__grid{grid-template-columns:1fr}.kf-10__dash{grid-column:span 1;grid-template-columns:repeat(2,1fr)}} @media(prefers-reduced-motion:reduce){.kf-10__skel::after{animation:none}} ``` ### 11. CSS Glitch Text Animation Effect **Type:** Pure CSS **Description:** Four CSS glitch text effects: RGB channel split, terminal ghost, slice glitch and noise word distortion — using clip-path and translate keyframes with no JS. **HTML:** ```html
        GLITCH
        >> SYSTEM_OVERRIDE.exe
        CORRUPT
        SYSTEM
        ``` **CSS:** ```css @import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@700;900&family=Share+Tech+Mono&display=swap'); .kf-11,.kf-11 *,.kf-11 *::before,.kf-11 *::after{box-sizing:border-box;margin:0;padding:0} .kf-11 ::selection{background:#00ff41;color:#000} .kf-11{ --bg:#0a0a0a; --green:#00ff41; --red:#ff0055; --cyan:#00e5ff; --white:#f0f0f0; font-family:'Orbitron',monospace; background:var(--bg); min-height:100vh; display:flex;flex-direction:column;align-items:center;justify-content:center; padding:60px 24px;gap:72px; overflow:hidden; position:relative; } /* Scanline overlay */ .kf-11::before{ content:'';position:absolute;inset:0;pointer-events:none;z-index:10; background:repeating-linear-gradient(0deg,transparent 0 2px,rgba(0,255,65,.02) 2px 4px); } /* 1 — Classic RGB split glitch */ .kf-11__glitch{ font-size:clamp(2.5rem,10vw,6rem); font-weight:900; color:var(--white); position:relative; letter-spacing:.05em; animation:kf-11-shudder 4s steps(1) infinite; } .kf-11__glitch::before{ content:attr(data-text); position:absolute;inset:0; color:var(--red); clip-path:polygon(0 30%,100% 30%,100% 55%,0 55%); transform:translateX(-4px); animation:kf-11-glitch-r 4s steps(1) infinite; } .kf-11__glitch::after{ content:attr(data-text); position:absolute;inset:0; color:var(--cyan); clip-path:polygon(0 55%,100% 55%,100% 80%,0 80%); transform:translateX(4px); animation:kf-11-glitch-c 4s steps(1) infinite .05s; } @keyframes kf-11-glitch-r{ 0%,85%,100%{opacity:0;transform:translateX(0)} 86%{opacity:1;transform:translateX(-6px)} 87%{opacity:1;transform:translateX(-2px);clip-path:polygon(0 20%,100% 20%,100% 40%,0 40%)} 88%{opacity:0} 92%{opacity:1;transform:translateX(-8px);clip-path:polygon(0 60%,100% 60%,100% 80%,0 80%)} 94%{opacity:0} } @keyframes kf-11-glitch-c{ 0%,85%,100%{opacity:0;transform:translateX(0)} 86%{opacity:1;transform:translateX(5px)} 88%{opacity:0} 92%{opacity:1;transform:translateX(3px);clip-path:polygon(0 40%,100% 40%,100% 60%,0 60%)} 94%{opacity:0} } @keyframes kf-11-shudder{ 0%,84%,100%{transform:skewX(0)} 85%{transform:skewX(-2deg)} 87%{transform:skewX(2deg)} 89%,90%{transform:skewX(0)} } /* 2 — Green terminal glitch */ .kf-11__terminal{ font-family:'Share Tech Mono',monospace; font-size:clamp(1.2rem,4vw,2rem); color:var(--green); text-shadow:0 0 8px rgba(0,255,65,.5); position:relative; animation:kf-11-term 5s steps(1) infinite; } .kf-11__terminal::before{ content:attr(data-text); position:absolute;inset:0; color:rgba(0,255,65,.3); animation:kf-11-term-ghost 5s steps(1) infinite; overflow:hidden; } @keyframes kf-11-term{ 0%,78%,100%{transform:none;filter:none} 79%{transform:translateX(-3px);filter:brightness(1.3)} 80%{transform:translateX(2px);filter:brightness(.8)} 81%{transform:none;filter:none} 91%{transform:translateX(-1px) scaleY(1.02)} 92%{transform:none} } @keyframes kf-11-term-ghost{ 0%,78%,100%{opacity:0;transform:none} 79%,80%,81%{opacity:1;transform:translateY(3px)} 82%{opacity:0} } /* 3 — Slice glitch */ .kf-11__slice{ font-size:clamp(2rem,8vw,4.5rem); font-weight:700; color:var(--white); position:relative; line-height:1; } .kf-11__slice::before{ content:attr(data-text); position:absolute;inset:0; background:linear-gradient(var(--bg) 45%,transparent 45%,transparent 55%,var(--bg) 55%); color:var(--cyan); animation:kf-11-slice 3s steps(1) infinite 1s; } @keyframes kf-11-slice{ 0%,89%,100%{transform:translateX(0);opacity:0} 90%{transform:translateX(-8px);opacity:1} 91%{transform:translateX(6px)} 92%{transform:translateX(0);opacity:0} 95%{transform:translateX(4px);opacity:.6} 96%{opacity:0} } /* 4 — Noise word */ .kf-11__noise{ font-size:clamp(1.8rem,7vw,4rem); font-weight:900; color:var(--white); position:relative; overflow:hidden; } .kf-11__noise::before{ content:'S!Yst3m#FaIL'; position:absolute;inset:0; color:var(--red); font-family:'Share Tech Mono'; font-size:.8em; letter-spacing:.2em; animation:kf-11-noise 4s steps(1) infinite 0.5s; opacity:0; } @keyframes kf-11-noise{ 0%,87%,100%{opacity:0;transform:none} 88%{opacity:1;transform:translateY(-2px) scaleX(1.04)} 89%{transform:translateY(2px) scaleX(.98)} 90%,92%{opacity:0} 91%{opacity:.8;transform:translateX(-4px)} } @media(prefers-reduced-motion:reduce){.kf-11 *,.kf-11 *::before,.kf-11 *::after{animation:none!important}} ``` ### 12. CSS Orbit Animation Solar System **Type:** Pure CSS **Description:** Animated solar system with Sun, Mercury, Venus, Earth, Mars, Jupiter and Saturn orbiting at variable speeds on a starfield background — pure CSS rotate keyframes. **HTML:** ```html
        CSS KEYFRAME ORBIT — SOLAR SYSTEM
        ``` **CSS:** ```css @import url('https://fonts.googleapis.com/css2?family=Space+Mono:wght@400;700&display=swap'); .kf-12,.kf-12 *,.kf-12 *::before,.kf-12 *::after{box-sizing:border-box;margin:0;padding:0} .kf-12 ::selection{background:#ffd166;color:#000} .kf-12{ --bg:#04050f; --star:#fff; --sun:#ffd166; --mercury:#a8a8a8; --venus:#e5c07b; --earth:#4cc9f0; --mars:#e57373; --jupiter:#c99b5f; --saturn:#f0d080; font-family:'Space Mono',monospace; background:var(--bg); min-height:100vh; display:flex;flex-direction:column;align-items:center;justify-content:center; padding:40px 20px; gap:24px; overflow:hidden; position:relative; color:#fff; } /* Starfield */ .kf-12::before{ content:'';position:absolute;inset:0;pointer-events:none; background-image: radial-gradient(1px 1px at 10% 15%,#fff,transparent), radial-gradient(1px 1px at 25% 60%,rgba(255,255,255,.8),transparent), radial-gradient(1.5px 1.5px at 55% 20%,#fff,transparent), radial-gradient(1px 1px at 75% 75%,rgba(255,255,255,.9),transparent), radial-gradient(1px 1px at 40% 90%,rgba(255,255,255,.7),transparent), radial-gradient(1px 1px at 88% 35%,#fff,transparent), radial-gradient(1.5px 1.5px at 18% 80%,rgba(255,255,255,.6),transparent), radial-gradient(1px 1px at 65% 50%,rgba(255,255,255,.8),transparent), radial-gradient(1px 1px at 92% 10%,#fff,transparent), radial-gradient(1px 1px at 5% 45%,rgba(255,255,255,.7),transparent); } /* ——— System ——— */ .kf-12__system{position:relative;width:min(560px,90vw);height:min(560px,90vw);display:flex;align-items:center;justify-content:center} /* Sun */ .kf-12__sun{ width:52px;height:52px;border-radius:50%; background:radial-gradient(circle at 38% 35%,#fff9c4,var(--sun) 60%,#e65100); box-shadow:0 0 20px var(--sun),0 0 50px rgba(255,209,102,.4),0 0 80px rgba(255,209,102,.15); animation:kf-12-pulse 3s ease-in-out infinite; position:relative;z-index:5;flex:0 0 52px; } @keyframes kf-12-pulse{ 0%,100%{box-shadow:0 0 20px var(--sun),0 0 50px rgba(255,209,102,.4)} 50%{box-shadow:0 0 30px var(--sun),0 0 70px rgba(255,209,102,.6),0 0 100px rgba(255,209,102,.2)} } /* Orbit rings + planets */ .kf-12__orbit{ position:absolute;border-radius:50%;border:1px solid rgba(255,255,255,.06); display:flex;align-items:flex-start;justify-content:center; } .kf-12__planet{ border-radius:50%; margin-top:-1px; position:relative; box-shadow:inset -3px -2px 6px rgba(0,0,0,.6); } .kf-12__planet::after{ content:attr(data-name); position:absolute;top:calc(100% + 6px);left:50%;transform:translateX(-50%); font-size:9px;white-space:nowrap;color:rgba(255,255,255,.5);letter-spacing:.1em; } /* Mercury */ .kf-12__o-mercury{width:14%;height:14%;animation:kf-12-orbit 2.4s linear infinite} .kf-12__p-mercury{width:10px;height:10px;background:radial-gradient(circle at 38% 35%,#ddd,var(--mercury))} /* Venus */ .kf-12__o-venus{width:24%;height:24%;animation:kf-12-orbit 6s linear infinite} .kf-12__p-venus{width:14px;height:14px;background:radial-gradient(circle at 38% 35%,#fff3c4,var(--venus))} /* Earth */ .kf-12__o-earth{width:36%;height:36%;animation:kf-12-orbit 10s linear infinite} .kf-12__p-earth{width:16px;height:16px;background:radial-gradient(circle at 38% 35%,#90d8ff,var(--earth))} /* Mars */ .kf-12__o-mars{width:50%;height:50%;animation:kf-12-orbit 19s linear infinite} .kf-12__p-mars{width:12px;height:12px;background:radial-gradient(circle at 38% 35%,#ff9e9e,var(--mars))} /* Jupiter */ .kf-12__o-jupiter{width:68%;height:68%;animation:kf-12-orbit 118s linear infinite} .kf-12__p-jupiter{width:26px;height:26px;background:radial-gradient(circle at 38% 35%,#f5d9a8,var(--jupiter))} /* Saturn */ .kf-12__o-saturn{width:86%;height:86%;animation:kf-12-orbit 294s linear infinite} .kf-12__p-saturn{width:22px;height:22px;background:radial-gradient(circle at 38% 35%,#fff5c0,var(--saturn));position:relative} .kf-12__p-saturn::before{ content:'';position:absolute;top:50%;left:50%; width:38px;height:8px; transform:translate(-50%,-50%) rotateX(65deg); border:3px solid rgba(240,208,128,.6);border-radius:50%; box-shadow:0 0 0 4px rgba(240,208,128,.15); } @keyframes kf-12-orbit{to{transform:rotate(360deg)}} .kf-12__label{font-size:.7rem;letter-spacing:.2em;color:rgba(255,255,255,.35)} @media(max-width:420px){.kf-12__system{width:320px;height:320px}} @media(prefers-reduced-motion:reduce){.kf-12 *{animation:none!important}} ``` ### 13. CSS Liquid Fill Animation Progress Bar **Type:** Pure CSS **Description:** Liquid-fill progress bars with wave-bubble effect and circular liquid-fill widgets using CSS clip-path, pseudo-element waves and scoped keyframes. **HTML:** ```html
        Liquid Fill Progress Bars
        Design
        87%
        Frontend
        65%
        Backend
        42%
        DevOps
        78%
        Testing
        55%
        70%
        CPU
        45%
        Memory
        82%
        Storage
        ``` **CSS:** ```css @import url('https://fonts.googleapis.com/css2?family=Nunito:wght@600;800;900&display=swap'); .kf-13,.kf-13 *,.kf-13 *::before,.kf-13 *::after{box-sizing:border-box;margin:0;padding:0} .kf-13 ::selection{background:#4361ee;color:#fff} .kf-13{ --bg:#f0f4ff; --blue:#4361ee; --teal:#06d6a0; --red:#ef233c; --orange:#fb8500; --purple:#7209b7; font-family:'Nunito',sans-serif; background:var(--bg); min-height:100vh; display:flex;flex-direction:column;align-items:center;justify-content:center; padding:60px 24px;gap:40px; color:#1a1a2e; } .kf-13__title{font-size:clamp(1.4rem,4vw,2rem);font-weight:900;letter-spacing:-.02em;text-align:center} .kf-13__title span{color:var(--blue)} .kf-13__grid{display:flex;flex-direction:column;gap:28px;width:100%;max-width:560px} .kf-13__row{display:flex;align-items:center;gap:16px} .kf-13__row-label{font-weight:800;font-size:.88rem;width:80px;text-align:right;flex:0 0 80px} .kf-13__pct{font-weight:900;font-size:.9rem;width:42px;color:var(--blue)} /* Liquid fill bar */ .kf-13__track{ flex:1;height:28px;border-radius:14px; background:rgba(0,0,0,.06); position:relative;overflow:hidden; box-shadow:inset 0 2px 4px rgba(0,0,0,.1); } .kf-13__fill{ height:100%;border-radius:14px;position:relative; background:linear-gradient(90deg,var(--blue),#6c8fff); box-shadow:inset 0 2px 4px rgba(255,255,255,.3); animation:kf-13-fill1 3s cubic-bezier(.4,0,.2,1) forwards; } .kf-13__fill--2{background:linear-gradient(90deg,var(--teal),#43efa0);animation:kf-13-fill2 3s cubic-bezier(.4,0,.2,1) 0.3s forwards;width:0} .kf-13__fill--3{background:linear-gradient(90deg,var(--red),#ff7096);animation:kf-13-fill3 3s cubic-bezier(.4,0,.2,1) 0.6s forwards;width:0} .kf-13__fill--4{background:linear-gradient(90deg,var(--orange),#ffd166);animation:kf-13-fill4 3s cubic-bezier(.4,0,.2,1) 0.9s forwards;width:0} .kf-13__fill--5{background:linear-gradient(90deg,var(--purple),#b040f5);animation:kf-13-fill5 3s cubic-bezier(.4,0,.2,1) 1.2s forwards;width:0} @keyframes kf-13-fill1{from{width:0}to{width:87%}} @keyframes kf-13-fill2{from{width:0}to{width:65%}} @keyframes kf-13-fill3{from{width:0}to{width:42%}} @keyframes kf-13-fill4{from{width:0}to{width:78%}} @keyframes kf-13-fill5{from{width:0}to{width:55%}} /* Liquid wave top */ .kf-13__fill::after{ content:'';position:absolute; top:-8px;right:-10px; width:24px;height:24px;border-radius:50%; background:inherit; animation:kf-13-bubble 2s ease-in-out infinite; } @keyframes kf-13-bubble{ 0%,100%{transform:scaleY(1) translateY(0)} 50%{transform:scaleY(1.3) translateY(-3px)} } /* Circular liquid fill */ .kf-13__circles{display:flex;gap:32px;flex-wrap:wrap;justify-content:center} .kf-13__circle-wrap{display:flex;flex-direction:column;align-items:center;gap:12px} .kf-13__circle{ width:110px;height:110px;border-radius:50%; border:4px solid; position:relative;overflow:hidden; display:grid;place-items:center; } .kf-13__circle--blue{border-color:var(--blue);background:rgba(67,97,238,.08)} .kf-13__circle--teal{border-color:var(--teal);background:rgba(6,214,160,.08)} .kf-13__circle--orange{border-color:var(--orange);background:rgba(251,133,0,.08)} .kf-13__liquid{ position:absolute;bottom:0;left:-10%;width:120%; border-radius:50% 50% 0 0/20px; } .kf-13__liquid::before{ content:'';position:absolute; top:-12px;left:0;right:0;height:24px; border-radius:50%; animation:kf-13-liq-wave 2.5s ease-in-out infinite; } .kf-13__circle--blue .kf-13__liquid{height:70%;background:rgba(67,97,238,.25);animation:kf-13-liq-fill 2s ease-out forwards} .kf-13__circle--blue .kf-13__liquid::before{background:rgba(67,97,238,.4)} .kf-13__circle--teal .kf-13__liquid{height:45%;background:rgba(6,214,160,.3);animation:kf-13-liq-fill 2s ease-out .3s forwards} .kf-13__circle--teal .kf-13__liquid::before{background:rgba(6,214,160,.5)} .kf-13__circle--orange .kf-13__liquid{height:82%;background:rgba(251,133,0,.2);animation:kf-13-liq-fill 2s ease-out .6s forwards} .kf-13__circle--orange .kf-13__liquid::before{background:rgba(251,133,0,.4)} @keyframes kf-13-liq-fill{from{height:0}} @keyframes kf-13-liq-wave{ 0%,100%{transform:translateX(-8px)} 50%{transform:translateX(8px)} } .kf-13__num{position:relative;z-index:1;font-size:1.4rem;font-weight:900} .kf-13__circle--blue .kf-13__num{color:var(--blue)} .kf-13__circle--teal .kf-13__num{color:var(--teal)} .kf-13__circle--orange .kf-13__num{color:var(--orange)} .kf-13__circle-label{font-size:.75rem;font-weight:800;letter-spacing:.06em;text-transform:uppercase;color:#888} @media(prefers-reduced-motion:reduce){.kf-13 *{animation:none!important}.kf-13__fill{width:87%}.kf-13__fill--2{width:65%}.kf-13__fill--3{width:42%}.kf-13__fill--4{width:78%}.kf-13__fill--5{width:55%}.kf-13__liquid{height:50%}} ``` ### 14. CSS Stagger Animation List Items **Type:** Pure CSS **Description:** Three stagger animation patterns: slide-from-left list items, scale-and-fade cards and cascade drop timeline entries using nth-child animation-delay. **HTML:** ```html
        Slide from Left
        🎨
        UI DesignFigma · 24 components
        AnimationCSS keyframes
        🧪
        TestingCoverage 94%
        🚀
        DeployCI/CD pipeline
        📊
        AnalyticsLive dashboard
        🔐
        SecurityAuth + tokens
        Scale + Fade

        Motion Design

        Spring-based animations for delightful micro-interactions.

        CSS

        Glassmorphism

        Frosted glass layers with backdrop-filter blur.

        DESIGN

        Dark Mode

        Adaptive color palettes with CSS custom properties.

        THEME

        Accessibility

        prefers-reduced-motion and focus management.

        A11Y
        Cascade Drop
        Project KickoffJan 2025 · Initial scope
        Design SprintFeb 2025 · 12 screens
        Dev PhaseMar 2025 · Component library
        Beta LaunchApr 2025 · 500 users
        Go LiveMay 2025 · Public release
        ``` **CSS:** ```css @import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;700;800&display=swap'); .kf-14,.kf-14 *,.kf-14 *::before,.kf-14 *::after{box-sizing:border-box;margin:0;padding:0} .kf-14 ::selection{background:#f72585;color:#fff} .kf-14{ --bg:#0f0f23; --pink:#f72585; --cyan:#4cc9f0; --green:#80ffdb; --gold:#ffd60a; --white:#e8e8ff; --card:#16162a; font-family:'Plus Jakarta Sans',sans-serif; background:var(--bg); min-height:100vh; display:flex;flex-wrap:wrap;align-items:flex-start;justify-content:center; padding:60px 24px;gap:48px; color:var(--white); } /* ——— 1: Slide-in from left ——— */ .kf-14__col{display:flex;flex-direction:column;gap:12px;min-width:240px;max-width:320px;flex:1} .kf-14__col-title{font-size:.7rem;letter-spacing:.2em;text-transform:uppercase;color:#555;margin-bottom:4px} .kf-14__item{ background:var(--card); border-radius:12px;padding:16px 20px; display:flex;align-items:center;gap:14px; border:1px solid rgba(255,255,255,.05); opacity:0;transform:translateX(-30px); animation:kf-14-slide-in .5s cubic-bezier(.2,.8,.2,1) forwards; } .kf-14__item:nth-child(2){animation-delay:.1s} .kf-14__item:nth-child(3){animation-delay:.2s} .kf-14__item:nth-child(4){animation-delay:.3s} .kf-14__item:nth-child(5){animation-delay:.4s} .kf-14__item:nth-child(6){animation-delay:.5s} @keyframes kf-14-slide-in{to{opacity:1;transform:translateX(0)}} .kf-14__icon{width:40px;height:40px;border-radius:10px;display:grid;place-items:center;font-size:1.1rem;flex:0 0 40px} .kf-14__info{flex:1} .kf-14__info b{display:block;font-size:.9rem;font-weight:700} .kf-14__info span{font-size:.75rem;color:#888;margin-top:2px;display:block} /* ——— 2: Fade + scale up ——— */ .kf-14__cards{display:flex;flex-direction:column;gap:12px;min-width:240px;max-width:320px;flex:1} .kf-14__card{ background:linear-gradient(135deg,rgba(247,37,133,.1),rgba(76,201,240,.08)); border:1px solid rgba(247,37,133,.2); border-radius:16px;padding:20px; opacity:0;transform:scale(.88); animation:kf-14-pop .5s cubic-bezier(.34,1.56,.64,1) forwards; } .kf-14__card:nth-child(2){animation-delay:.12s} .kf-14__card:nth-child(3){animation-delay:.24s} .kf-14__card:nth-child(4){animation-delay:.36s} @keyframes kf-14-pop{to{opacity:1;transform:scale(1)}} .kf-14__card h3{font-size:.95rem;font-weight:800;margin-bottom:6px} .kf-14__card p{font-size:.78rem;color:#888;line-height:1.4} .kf-14__card-tag{display:inline-block;font-size:.65rem;font-weight:700;letter-spacing:.1em;text-transform:uppercase;padding:3px 8px;border-radius:4px;margin-top:10px} /* ——— 3: Cascade drop ——— */ .kf-14__timeline{display:flex;flex-direction:column;gap:0;min-width:240px;max-width:300px;flex:1;position:relative} .kf-14__timeline::before{content:'';position:absolute;left:19px;top:0;bottom:0;width:2px;background:rgba(128,255,219,.15)} .kf-14__titem{ display:flex;gap:16px;align-items:flex-start;padding:12px 0; opacity:0;transform:translateY(-20px); animation:kf-14-drop .4s cubic-bezier(.4,0,.2,1) forwards; } .kf-14__titem:nth-child(1){animation-delay:.05s} .kf-14__titem:nth-child(2){animation-delay:.2s} .kf-14__titem:nth-child(3){animation-delay:.35s} .kf-14__titem:nth-child(4){animation-delay:.5s} .kf-14__titem:nth-child(5){animation-delay:.65s} @keyframes kf-14-drop{to{opacity:1;transform:translateY(0)}} .kf-14__dot{width:16px;height:16px;border-radius:50%;flex:0 0 16px;margin-top:2px;border:2px solid} .kf-14__tbody{flex:1} .kf-14__tbody b{font-size:.88rem;font-weight:700;display:block} .kf-14__tbody span{font-size:.72rem;color:#666;display:block;margin-top:2px} /* Icon colors */ .kf-14__icon--1{background:rgba(247,37,133,.15);color:var(--pink)} .kf-14__icon--2{background:rgba(76,201,240,.15);color:var(--cyan)} .kf-14__icon--3{background:rgba(128,255,219,.15);color:var(--green)} .kf-14__icon--4{background:rgba(255,214,10,.15);color:var(--gold)} .kf-14__icon--5{background:rgba(247,37,133,.1);color:var(--pink)} .kf-14__icon--6{background:rgba(76,201,240,.1);color:var(--cyan)} .kf-14__card:nth-child(1) .kf-14__card-tag{background:rgba(247,37,133,.2);color:var(--pink)} .kf-14__card:nth-child(2) .kf-14__card-tag{background:rgba(76,201,240,.2);color:var(--cyan)} .kf-14__card:nth-child(3) .kf-14__card-tag{background:rgba(128,255,219,.2);color:var(--green)} .kf-14__card:nth-child(4) .kf-14__card-tag{background:rgba(255,214,10,.2);color:var(--gold)} .kf-14__dot:nth-child(1){border-color:var(--pink);background:rgba(247,37,133,.2)} .kf-14__titem:nth-child(1) .kf-14__dot{border-color:var(--pink)} .kf-14__titem:nth-child(2) .kf-14__dot{border-color:var(--cyan)} .kf-14__titem:nth-child(3) .kf-14__dot{border-color:var(--green)} .kf-14__titem:nth-child(4) .kf-14__dot{border-color:var(--gold)} .kf-14__titem:nth-child(5) .kf-14__dot{border-color:var(--pink)} @media(prefers-reduced-motion:reduce){.kf-14 *{animation:none!important;opacity:1!important;transform:none!important}} ``` ### 15. CSS Fire Animation Pure CSS **Type:** Pure CSS **Description:** Pure CSS fire: flickering candle with wick and wax, campfire with log base and IGNITE flame text — radial gradient bodies animated with scale and blur keyframes. **HTML:** ```html
        IGNITE
        Candle
        Campfire
        ``` **CSS:** ```css @import url('https://fonts.googleapis.com/css2?family=Black+Ops+One&family=Roboto+Mono:wght@500&display=swap'); .kf-15,.kf-15 *,.kf-15 *::before,.kf-15 *::after{box-sizing:border-box;margin:0;padding:0} .kf-15 ::selection{background:#ff4500;color:#fff} .kf-15{ --bg:#0d0800; --flame1:#ff4500; --flame2:#ff8c00; --flame3:#ffd700; --flame4:#fff5c0; font-family:'Black Ops One',sans-serif; background:radial-gradient(circle at 50% 80%,#1a0800 0%,#0d0800 60%); min-height:100vh; display:flex;flex-direction:column;align-items:center;justify-content:center; padding:60px 24px;gap:60px; overflow:hidden; position:relative; color:#ffd700; } /* ember particles */ .kf-15::before{ content:'';position:absolute;inset:0;pointer-events:none; background-image: radial-gradient(1px 1px at 20% 40%,rgba(255,69,0,.8),transparent), radial-gradient(1px 1px at 60% 20%,rgba(255,140,0,.6),transparent), radial-gradient(1.5px 1.5px at 80% 50%,rgba(255,215,0,.5),transparent); animation:kf-15-ember 3s linear infinite; } @keyframes kf-15-ember{to{background-position:0 -200px;opacity:0}} /* ——— Candle flame ——— */ .kf-15__candle{display:flex;flex-direction:column;align-items:center;gap:0} .kf-15__flame-wrap{position:relative;width:60px;height:100px;display:flex;justify-content:center;align-items:flex-end} .kf-15__flame{ position:absolute;bottom:0; border-radius:50% 50% 20% 20%/60% 60% 40% 40%; filter:blur(1px); transform-origin:50% 100%; } .kf-15__f1{width:28px;height:80px;background:linear-gradient(180deg,var(--flame4) 0%,var(--flame3) 30%,var(--flame2) 65%,var(--flame1) 100%);animation:kf-15-flicker 0.8s ease-in-out infinite} .kf-15__f2{width:22px;height:64px;background:linear-gradient(180deg,#fff 0%,var(--flame4) 30%,var(--flame3) 70%,transparent 100%);animation:kf-15-flicker 0.6s ease-in-out infinite reverse} .kf-15__f3{width:14px;height:48px;background:linear-gradient(180deg,#fff 0%,rgba(255,245,192,.8) 50%,transparent 100%);animation:kf-15-flicker 0.9s ease-in-out infinite 0.2s} @keyframes kf-15-flicker{ 0%,100%{transform:scaleX(1) scaleY(1) rotate(-2deg)} 25%{transform:scaleX(0.88) scaleY(1.06) rotate(2deg)} 50%{transform:scaleX(1.05) scaleY(0.96) rotate(-1deg)} 75%{transform:scaleX(0.92) scaleY(1.04) rotate(1.5deg)} } .kf-15__wick{width:3px;height:14px;background:linear-gradient(180deg,#333,#888);margin-top:0;z-index:2;position:relative} .kf-15__wax{width:50px;height:100px;background:linear-gradient(90deg,#f0ebe0,#e8e0d0 50%,#d8d0c0);border-radius:4px;position:relative;display:flex;justify-content:center} .kf-15__wax::before{content:'';position:absolute;top:0;left:50%;transform:translateX(-50%);width:30px;height:8px;border-radius:50%;background:rgba(255,220,180,.4);animation:kf-15-melt 3s ease-in-out infinite} @keyframes kf-15-melt{50%{transform:translateX(-50%) scaleX(1.1);background:rgba(255,200,150,.3)}} .kf-15__glow{position:absolute;bottom:0;left:50%;transform:translateX(-50%);width:80px;height:40px;background:radial-gradient(ellipse,rgba(255,140,0,.3),transparent);filter:blur(8px);animation:kf-15-glow 0.8s ease-in-out infinite alternate} @keyframes kf-15-glow{to{opacity:.6;transform:translateX(-50%) scale(1.2)}} /* ——— Campfire ——— */ .kf-15__camp{display:flex;flex-direction:column;align-items:center;gap:0} .kf-15__logs{width:120px;height:24px;position:relative} .kf-15__log{position:absolute;width:80px;height:12px;border-radius:6px;background:linear-gradient(180deg,#5a3a1a,#3a2010)} .kf-15__log:nth-child(1){bottom:0;left:20px} .kf-15__log:nth-child(2){bottom:0;left:20px;transform:rotate(40deg);transform-origin:40% 50%} .kf-15__log:nth-child(3){bottom:0;left:20px;transform:rotate(-40deg);transform-origin:60% 50%} .kf-15__camp-flame{position:relative;width:120px;height:120px;display:flex;justify-content:center;align-items:flex-end} .kf-15__cf{ position:absolute;bottom:0; border-radius:50% 50% 20% 20%/60% 60% 40% 40%; transform-origin:50% 100%; filter:blur(2px); } .kf-15__cf--1{width:60px;height:100px;background:linear-gradient(180deg,var(--flame4),var(--flame3) 30%,var(--flame2) 65%,var(--flame1));animation:kf-15-flicker 1.1s ease-in-out infinite} .kf-15__cf--2{width:44px;height:82px;background:linear-gradient(180deg,#fff,var(--flame4) 30%,var(--flame3) 70%,transparent);animation:kf-15-flicker 0.7s ease-in-out infinite 0.1s} .kf-15__cf--3{width:28px;height:60px;background:linear-gradient(180deg,#fff,rgba(255,245,192,.9),transparent);animation:kf-15-flicker 0.9s ease-in-out infinite 0.3s} .kf-15__cf--4{width:70px;height:60px;left:0;right:0;margin:0 auto;background:linear-gradient(180deg,transparent,var(--flame1) 50%,transparent);animation:kf-15-flicker 1.3s ease-in-out infinite;filter:blur(3px)} .kf-15__cf--5{width:50px;height:40px;left:0;right:0;margin:0 auto;background:var(--flame2);border-radius:50%;bottom:0;animation:kf-15-flicker 0.6s ease-in-out infinite 0.4s;filter:blur(4px)} /* ——— Torch text ——— */ .kf-15__text{ font-size:clamp(2.5rem,10vw,5rem); letter-spacing:.1em; color:var(--flame2); text-shadow: 0 0 10px var(--flame1), 0 0 30px var(--flame2), 0 0 60px rgba(255,140,0,.4); animation:kf-15-text 2s ease-in-out infinite alternate; position:relative; } @keyframes kf-15-text{ from{text-shadow:0 0 10px var(--flame1),0 0 30px var(--flame2),0 0 60px rgba(255,140,0,.4)} to{text-shadow:0 0 15px var(--flame3),0 0 40px var(--flame3),0 0 80px rgba(255,200,0,.5),0 0 120px rgba(255,140,0,.3)} } .kf-15__row{display:flex;gap:60px;flex-wrap:wrap;justify-content:center;align-items:flex-end} .kf-15__label{font-family:'Roboto Mono';font-size:.7rem;letter-spacing:.15em;text-transform:uppercase;color:rgba(255,140,0,.4);text-align:center;margin-top:12px} @media(prefers-reduced-motion:reduce){.kf-15 *{animation:none!important}} ``` ### 16. CSS Ripple Click Animation Effect **Type:** Pure CSS **Description:** Material Design ripple animations on six button variants, FAB, chip groups and icon buttons using ::after pseudo-element scale + opacity keyframes. **HTML:** ```html
        CSS Ripple Click Animations
        Material Design ripple effect — pure CSS keyframes
        Filled
        Filled Pink
        Outlined
        Pill Shape
        Orange Flat
        Rounded
        FAB
        Chips
        Icon Buttons
        ``` **CSS:** ```css @import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap'); .kf-16,.kf-16 *,.kf-16 *::before,.kf-16 *::after{box-sizing:border-box;margin:0;padding:0} .kf-16 ::selection{background:#6200ea;color:#fff} .kf-16{ --bg:#fafafa; --dp:#6200ea; --purple:#7c4dff; --pink:#e91e63; --teal:#00bcd4; --orange:#ff6d00; --green:#00c853; --ink:#212121; font-family:'Roboto',sans-serif; background:var(--bg); min-height:100vh; display:flex;flex-direction:column;align-items:center;justify-content:center; padding:60px 24px;gap:48px; color:var(--ink); } .kf-16__title{font-size:clamp(1.2rem,4vw,1.8rem);font-weight:700;letter-spacing:-.01em} .kf-16__subtitle{font-size:.88rem;color:#666;margin-top:4px;text-align:center} .kf-16__grid{display:flex;flex-wrap:wrap;gap:24px;justify-content:center;max-width:800px} .kf-16__cell{display:flex;flex-direction:column;align-items:center;gap:14px} .kf-16__label{font-size:.72rem;letter-spacing:.12em;text-transform:uppercase;color:#999} /* Material ripple base */ .kf-16__btn{ position:relative;overflow:hidden; border:none;border-radius:4px; cursor:pointer; font-family:'Roboto';font-weight:500;font-size:.9rem;letter-spacing:.08em;text-transform:uppercase; padding:14px 28px; display:flex;align-items:center;justify-content:center;gap:8px; } .kf-16__btn::after{ content:''; position:absolute; top:50%;left:50%; width:0;height:0; border-radius:50%; transform:translate(-50%,-50%); animation:kf-16-ripple 1.4s ease-out infinite; } /* Button variants */ .kf-16__btn--1{background:var(--dp);color:#fff;box-shadow:0 3px 6px rgba(98,0,234,.35)} .kf-16__btn--1::after{background:rgba(255,255,255,.4)} .kf-16__btn--2{background:var(--pink);color:#fff;box-shadow:0 3px 6px rgba(233,30,99,.35)} .kf-16__btn--2::after{background:rgba(255,255,255,.35)} .kf-16__btn--3{background:#fff;color:var(--dp);border:2px solid var(--dp);box-shadow:0 2px 4px rgba(0,0,0,.1)} .kf-16__btn--3::after{background:rgba(98,0,234,.2)} .kf-16__btn--4{background:var(--teal);color:#fff;border-radius:50px;box-shadow:0 3px 8px rgba(0,188,212,.35)} .kf-16__btn--4::after{background:rgba(255,255,255,.35)} .kf-16__btn--5{background:var(--orange);color:#fff;border-radius:2px;box-shadow:0 4px 8px rgba(255,109,0,.35)} .kf-16__btn--5::after{background:rgba(255,255,255,.3);animation-delay:.2s} .kf-16__btn--6{background:var(--green);color:#fff;border-radius:8px;box-shadow:0 3px 6px rgba(0,200,83,.35)} .kf-16__btn--6::after{background:rgba(255,255,255,.3)} @keyframes kf-16-ripple{ 0%{width:0;height:0;opacity:.8} 100%{width:220px;height:220px;opacity:0} } /* FAB ripple */ .kf-16__fab{ width:56px;height:56px;border-radius:50%; border:none;background:var(--dp);color:#fff; font-size:1.4rem;cursor:pointer; position:relative;overflow:hidden; box-shadow:0 6px 16px rgba(98,0,234,.45); display:grid;place-items:center; flex:0 0 56px; } .kf-16__fab::after{ content:'';position:absolute;top:50%;left:50%; width:0;height:0;border-radius:50%; transform:translate(-50%,-50%); background:rgba(255,255,255,.4); animation:kf-16-ripple 1.4s ease-out infinite .3s; } /* Chip ripple */ .kf-16__chip{ padding:8px 18px;border-radius:50px; border:1.5px solid #ddd;background:#fff; font-size:.85rem;font-weight:500;cursor:pointer; position:relative;overflow:hidden; color:var(--ink); } .kf-16__chip::after{ content:'';position:absolute;top:50%;left:50%; width:0;height:0;border-radius:50%; transform:translate(-50%,-50%); background:rgba(98,0,234,.12); animation:kf-16-ripple 1.2s ease-out infinite; } .kf-16__chips{display:flex;flex-wrap:wrap;gap:10px;justify-content:center} .kf-16__chip:nth-child(2)::after{animation-delay:.25s;background:rgba(233,30,99,.12)} .kf-16__chip:nth-child(3)::after{animation-delay:.5s;background:rgba(0,188,212,.12)} /* Icon button ripple */ .kf-16__iconbtn{ width:48px;height:48px;border-radius:50%; border:none;background:transparent; font-size:1.3rem;cursor:pointer; position:relative;overflow:hidden; display:grid;place-items:center; } .kf-16__iconbtn::after{ content:'';position:absolute;top:50%;left:50%; width:0;height:0;border-radius:50%; transform:translate(-50%,-50%); background:rgba(0,0,0,.1); animation:kf-16-ripple 1.2s ease-out infinite; } .kf-16__icon-row{display:flex;gap:8px} .kf-16__iconbtn:nth-child(2)::after{animation-delay:.2s} .kf-16__iconbtn:nth-child(3)::after{animation-delay:.4s} .kf-16__iconbtn:nth-child(4)::after{animation-delay:.6s} @media(max-width:500px){.kf-16__grid{gap:16px}} @media(prefers-reduced-motion:reduce){.kf-16 *{animation:none!important}} ``` ### 17. CSS Floating Elements Animation **Type:** Pure CSS **Description:** Hero section with six floating stat cards and a floating icon grid using staggered translateY + rotate keyframe animations with unique durations per element. **HTML:** ```html
        +24.6% Growth
        98ms response
        2.4M
        Active Users
        Live
        Production
        🏆 #1 Ranked
        🔒 SSL Secured

        Build Faster.
        Ship Smarter.

        CSS floating elements animation — pure keyframes.

        Get Started →
        🎨
        🚀
        🔐
        📊
        ``` **CSS:** ```css @import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;600;800&display=swap'); .kf-17,.kf-17 *,.kf-17 *::before,.kf-17 *::after{box-sizing:border-box;margin:0;padding:0} .kf-17 ::selection{background:#a855f7;color:#fff} .kf-17{ --bg:#0c0118; --purple:#a855f7; --blue:#38bdf8; --pink:#f472b6; --green:#34d399; --gold:#fbbf24; --white:#f0f0ff; font-family:'Manrope',sans-serif; background:var(--bg); min-height:100vh; display:flex;flex-direction:column;align-items:center;justify-content:center; padding:40px 20px;gap:40px; position:relative;overflow:hidden; color:var(--white); } /* BG glow */ .kf-17::before{content:'';position:absolute;top:20%;left:30%;width:400px;height:400px;background:radial-gradient(circle,rgba(168,85,247,.1),transparent 60%);pointer-events:none} /* ——— Hero section with floating UI elements ——— */ .kf-17__hero{ width:min(700px,100%); position:relative; min-height:420px; display:flex;align-items:center;justify-content:center; } .kf-17__center{text-align:center;z-index:5;position:relative} .kf-17__center h1{font-size:clamp(2rem,7vw,4rem);font-weight:800;letter-spacing:-.03em;line-height:1} .kf-17__center h1 span{background:linear-gradient(135deg,var(--purple),var(--blue));-webkit-background-clip:text;background-clip:text;color:transparent} .kf-17__center p{font-size:.95rem;color:rgba(240,240,255,.6);margin-top:12px} .kf-17__cta{display:inline-block;margin-top:20px;background:linear-gradient(135deg,var(--purple),var(--blue));color:#fff;border-radius:8px;padding:12px 28px;font-weight:700;font-size:.9rem;text-decoration:none;box-shadow:0 8px 24px rgba(168,85,247,.35)} /* Floating cards */ .kf-17__float{ position:absolute; border-radius:16px; background:rgba(255,255,255,.04); backdrop-filter:blur(8px); border:1px solid rgba(255,255,255,.08); padding:16px 20px; font-size:.82rem; white-space:nowrap; box-shadow:0 8px 32px rgba(0,0,0,.3); } .kf-17__f1{top:5%;left:2%;animation:kf-17-float1 6s ease-in-out infinite} .kf-17__f2{top:8%;right:2%;animation:kf-17-float2 7s ease-in-out infinite 0.5s} .kf-17__f3{top:50%;left:0%;transform:translateY(-50%);animation:kf-17-float1 8s ease-in-out infinite 1s} .kf-17__f4{top:50%;right:0%;transform:translateY(-50%);animation:kf-17-float2 6.5s ease-in-out infinite 1.5s} .kf-17__f5{bottom:5%;left:8%;animation:kf-17-float1 7.5s ease-in-out infinite 0.8s} .kf-17__f6{bottom:5%;right:8%;animation:kf-17-float2 6s ease-in-out infinite 0.3s} @keyframes kf-17-float1{ 0%,100%{transform:translateY(0) rotate(-1deg)} 50%{transform:translateY(-16px) rotate(1deg)} } @keyframes kf-17-float2{ 0%,100%{transform:translateY(0) rotate(1deg)} 50%{transform:translateY(-12px) rotate(-1deg)} } /* Adjust for f3/f4 which have extra transform */ .kf-17__f3{animation:kf-17-float-mid1 8s ease-in-out infinite 1s} .kf-17__f4{animation:kf-17-float-mid2 6.5s ease-in-out infinite 1.5s} @keyframes kf-17-float-mid1{ 0%,100%{transform:translateY(calc(-50% + 0px))} 50%{transform:translateY(calc(-50% - 14px))} } @keyframes kf-17-float-mid2{ 0%,100%{transform:translateY(calc(-50% + 0px))} 50%{transform:translateY(calc(-50% - 10px))} } .kf-17__badge{display:flex;align-items:center;gap:8px} .kf-17__badge-dot{width:8px;height:8px;border-radius:50%} .kf-17__badge b{font-weight:700;font-size:.9rem} .kf-17__stat{font-weight:800;font-size:1.6rem;color:var(--white)} .kf-17__stat-l{font-size:.7rem;color:rgba(240,240,255,.5);letter-spacing:.1em;text-transform:uppercase;margin-top:2px} /* ——— Floating icon grid ——— */ .kf-17__icons{display:flex;gap:24px;flex-wrap:wrap;justify-content:center} .kf-17__icon{ width:72px;height:72px;border-radius:20px; display:grid;place-items:center;font-size:1.8rem; background:rgba(255,255,255,.04);border:1px solid rgba(255,255,255,.08); box-shadow:0 8px 24px rgba(0,0,0,.2); } .kf-17__icon:nth-child(1){animation:kf-17-float1 5s ease-in-out infinite 0s;background:rgba(168,85,247,.1);border-color:rgba(168,85,247,.2)} .kf-17__icon:nth-child(2){animation:kf-17-float2 6s ease-in-out infinite 0.4s;background:rgba(56,189,248,.1);border-color:rgba(56,189,248,.2)} .kf-17__icon:nth-child(3){animation:kf-17-float1 7s ease-in-out infinite 0.8s;background:rgba(244,114,182,.1);border-color:rgba(244,114,182,.2)} .kf-17__icon:nth-child(4){animation:kf-17-float2 5.5s ease-in-out infinite 1.2s;background:rgba(52,211,153,.1);border-color:rgba(52,211,153,.2)} .kf-17__icon:nth-child(5){animation:kf-17-float1 6.5s ease-in-out infinite 0.6s;background:rgba(251,191,36,.1);border-color:rgba(251,191,36,.2)} @media(max-width:640px){.kf-17__f3,.kf-17__f4{display:none}} @media(prefers-reduced-motion:reduce){.kf-17 *{animation:none!important}} ``` ### 18. CSS Infinite Scroll Ticker Animation **Type:** Pure CSS **Description:** Stock price ticker, brand logo marquee, bidirectional word scroll rows and breaking-news headline ticker using CSS translateX keyframes on duplicated content. **HTML:** ```html
        AAPL$192.30+2.4%
        GOOG$145.80+0.9%
        TSLA$248.10-1.3%
        MSFT$420.55+1.7%
        NVDA$875.40+4.2%
        META$510.20-0.6%
        AMZN$185.90+1.1%
        AAPL$192.30+2.4%
        GOOG$145.80+0.9%
        TSLA$248.10-1.3%
        MSFT$420.55+1.7%
        NVDA$875.40+4.2%
        META$510.20-0.6%
        AMZN$185.90+1.1%
        CODEFRONTS VERCELNETLIFY SUPABASEFIGMA LINEARNOTION CODEFRONTS VERCELNETLIFY SUPABASEFIGMA LINEARNOTION
        DESIGN CODE ANIMATE SHIP DESIGN CODE ANIMATE SHIP
        MOTION CRAFT BUILD CREATE MOTION CRAFT BUILD CREATE
        LIVE
        BREAKING: CSS animations performance improved in Chrome 124 · UPDATE: New @keyframes at-rules land in Firefox 130 · GUIDE: Infinite marquee ticker using pure CSS — no JavaScript · TIP: Use animation-play-state: paused on hover for better UX · BREAKING: CSS animations performance improved in Chrome 124 · UPDATE: New @keyframes at-rules land in Firefox 130 ·
        ``` **CSS:** ```css @import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;700;900&display=swap'); .kf-18,.kf-18 *,.kf-18 *::before,.kf-18 *::after{box-sizing:border-box;margin:0;padding:0} .kf-18 ::selection{background:#ff6b00;color:#fff} .kf-18{ --bg:#f9f6f2; --dark:#111; --orange:#ff6b00; --yellow:#ffe135; --green:#00c896; --red:#ff3355; --blue:#0057ff; font-family:'Inter',sans-serif; background:var(--bg); min-height:100vh; display:flex;flex-direction:column;align-items:stretch;justify-content:center; gap:0; overflow:hidden; color:var(--dark); } /* ——— Stock ticker ——— */ .kf-18__ticker{ background:var(--dark);color:#fff; padding:12px 0;overflow:hidden; border-bottom:3px solid var(--orange); position:relative; } .kf-18__ticker-inner{ display:flex;width:max-content; animation:kf-18-scroll-l 30s linear infinite; } .kf-18__ticker-inner:hover{animation-play-state:paused} .kf-18__stock{display:flex;align-items:center;gap:10px;padding:0 32px;white-space:nowrap;font-size:.9rem;border-right:1px solid rgba(255,255,255,.1)} .kf-18__stock-sym{font-weight:700;letter-spacing:.05em} .kf-18__stock-price{font-family:monospace} .kf-18__stock-chg{font-size:.8rem;font-weight:700;padding:2px 7px;border-radius:3px} .kf-18__stock-chg--up{background:rgba(0,200,150,.2);color:var(--green)} .kf-18__stock-chg--dn{background:rgba(255,51,85,.2);color:var(--red)} @keyframes kf-18-scroll-l{from{transform:translateX(0)}to{transform:translateX(-50%)}} /* ——— Logo / brand marquee ——— */ .kf-18__brands{ padding:32px 0;overflow:hidden; border-bottom:1px solid rgba(0,0,0,.08); position:relative; } .kf-18__brands::before,.kf-18__brands::after{ content:'';position:absolute;top:0;bottom:0;width:100px;z-index:1;pointer-events:none; } .kf-18__brands::before{left:0;background:linear-gradient(90deg,var(--bg),transparent)} .kf-18__brands::after{right:0;background:linear-gradient(-90deg,var(--bg),transparent)} .kf-18__brand-row{display:flex;width:max-content;animation:kf-18-scroll-l 20s linear infinite} .kf-18__brand-row--r{animation:kf-18-scroll-r 22s linear infinite} @keyframes kf-18-scroll-r{from{transform:translateX(-50%)}to{transform:translateX(0)}} .kf-18__brand{display:flex;align-items:center;justify-content:center;padding:0 40px;font-weight:900;font-size:1.1rem;letter-spacing:-.02em;white-space:nowrap;opacity:.3} .kf-18__brand--colored{opacity:1;color:var(--orange)} /* ——— Text word scroll ——— */ .kf-18__words{ padding:60px 0;overflow:hidden; display:flex;flex-direction:column;gap:16px; } .kf-18__word-row{display:flex;width:max-content;gap:32px;align-items:center} .kf-18__word-row--1{animation:kf-18-scroll-l 18s linear infinite} .kf-18__word-row--2{animation:kf-18-scroll-r 22s linear infinite} .kf-18__word{ font-size:clamp(2rem,6vw,4rem);font-weight:900; text-transform:uppercase;letter-spacing:-.02em; white-space:nowrap; } .kf-18__word--outline{-webkit-text-stroke:2px var(--dark);color:transparent} .kf-18__word--dot{width:10px;height:10px;border-radius:50%;background:var(--orange);flex:0 0 10px} /* ——— News ticker ——— */ .kf-18__news{ background:var(--blue);color:#fff; padding:14px 0;overflow:hidden; border-top:3px solid var(--yellow); } .kf-18__news-label{position:absolute;left:0;background:var(--yellow);color:var(--dark);font-weight:900;font-size:.8rem;padding:0 14px;height:100%;display:flex;align-items:center;letter-spacing:.1em;text-transform:uppercase;z-index:2} .kf-18__news-inner{ display:flex;width:max-content;padding-left:120px; animation:kf-18-scroll-l 40s linear infinite; } .kf-18__news-item{padding:0 48px;font-size:.88rem;white-space:nowrap;border-right:1px solid rgba(255,255,255,.2)} .kf-18__news-item strong{color:var(--yellow)} .kf-18__news{position:relative} @media(prefers-reduced-motion:reduce){.kf-18 *{animation:none!important}} ``` ### 19. CSS Countdown Timer Animation **Type:** Pure CSS **Description:** Arc ring countdown timers × 4, an animated flip clock and three linear progress countdown bars — all stroke-dashoffset or scaleX keyframes, pure CSS. **HTML:** ```html
        03Days
        15Hours
        25Mins
        48Secs
        0
        3
        Days
        :
        1
        5
        Hours
        :
        2
        5
        Minutes
        Days Remaining15%
        Budget Used62%
        Time Elapsed80%
        ``` **CSS:** ```css @import url('https://fonts.googleapis.com/css2?family=Oswald:wght@700&family=Inter:wght@400;600&display=swap'); .kf-19,.kf-19 *,.kf-19 *::before,.kf-19 *::after{box-sizing:border-box;margin:0;padding:0} .kf-19 ::selection{background:#22d3ee;color:#000} .kf-19{ --bg:#020617; --cyan:#22d3ee; --purple:#a78bfa; --green:#4ade80; --red:#f87171; --white:#f1f5f9; font-family:'Oswald',sans-serif; background:var(--bg); min-height:100vh; display:flex;flex-direction:column;align-items:center;justify-content:center; padding:60px 24px;gap:64px; color:var(--white); position:relative;overflow:hidden; } .kf-19::before{content:'';position:absolute;top:10%;left:20%;width:300px;height:300px;border-radius:50%;background:radial-gradient(circle,rgba(34,211,238,.06),transparent 60%);pointer-events:none} .kf-19::after{content:'';position:absolute;bottom:10%;right:15%;width:250px;height:250px;border-radius:50%;background:radial-gradient(circle,rgba(167,139,250,.06),transparent 60%);pointer-events:none} /* ——— 1: SVG-style arc timer ——— */ .kf-19__arc-wrap{display:flex;gap:32px;flex-wrap:wrap;justify-content:center} .kf-19__arc{position:relative;width:120px;height:120px;display:grid;place-items:center;flex-direction:column} .kf-19__arc-ring{ position:absolute;inset:0;border-radius:50%; background:conic-gradient(var(--cyan) var(--pct),rgba(255,255,255,.06) 0); animation:kf-19-ring 60s linear infinite; } .kf-19__arc--days .kf-19__arc-ring{--pct:0%;background:conic-gradient(var(--purple) var(--pct),rgba(255,255,255,.06) 0);animation-duration:3600s} .kf-19__arc--hours .kf-19__arc-ring{--pct:62.5%;background:conic-gradient(var(--cyan) 62.5%,rgba(255,255,255,.06) 0);animation-duration:86400s} .kf-19__arc--mins .kf-19__arc-ring{background:conic-gradient(var(--green) 41.67%,rgba(255,255,255,.06) 0);animation:kf-19-ring 3600s linear infinite} .kf-19__arc--secs .kf-19__arc-ring{background:conic-gradient(var(--red) 80%,rgba(255,255,255,.06) 0);animation:kf-19-ring 60s linear infinite} @keyframes kf-19-ring{to{transform:rotate(360deg)}} .kf-19__arc-inner{width:90px;height:90px;border-radius:50%;background:var(--bg);display:flex;flex-direction:column;align-items:center;justify-content:center;z-index:1;position:relative} .kf-19__num{font-size:1.9rem;line-height:1} .kf-19__unit{font-family:'Inter';font-size:.6rem;letter-spacing:.15em;color:rgba(255,255,255,.4);text-transform:uppercase;margin-top:2px} /* ——— 2: Flip clock digits ——— */ .kf-19__flip-clock{display:flex;gap:12px;align-items:center} .kf-19__flip-sep{font-size:2rem;color:rgba(255,255,255,.3);margin-bottom:8px} .kf-19__flip-unit{display:flex;flex-direction:column;align-items:center;gap:6px} .kf-19__flip-pair{display:flex;gap:4px} .kf-19__flip-digit{ width:52px;height:72px;border-radius:8px; background:linear-gradient(180deg,#1e293b,#0f172a); border:1px solid rgba(255,255,255,.08); display:grid;place-items:center; font-size:2.4rem; box-shadow:0 4px 12px rgba(0,0,0,.4); position:relative;overflow:hidden; animation:kf-19-flip 1s ease-in-out infinite; } .kf-19__flip-digit::after{ content:'';position:absolute;left:0;right:0;top:50%;height:1px;background:rgba(0,0,0,.4); } .kf-19__flip-digit:nth-child(2){animation-delay:.05s} .kf-19__flip-unit:nth-child(1) .kf-19__flip-digit{animation-duration:60s} .kf-19__flip-unit:nth-child(3) .kf-19__flip-digit{animation-duration:3600s} @keyframes kf-19-flip{ 0%,92%{transform:rotateX(0);background:linear-gradient(180deg,#1e293b,#0f172a)} 96%{transform:rotateX(-90deg);background:linear-gradient(180deg,#0f172a,#1e293b)} 100%{transform:rotateX(0)} } .kf-19__flip-label{font-family:'Inter';font-size:.6rem;letter-spacing:.15em;color:rgba(255,255,255,.35);text-transform:uppercase} /* ——— 3: Linear countdown bar ——— */ .kf-19__bar-wrap{width:min(480px,100%);display:flex;flex-direction:column;gap:16px} .kf-19__bar-row{display:flex;flex-direction:column;gap:6px} .kf-19__bar-head{display:flex;justify-content:space-between;font-family:'Inter';font-size:.8rem} .kf-19__bar-head span:first-child{color:rgba(255,255,255,.6);font-weight:600} .kf-19__bar-head span:last-child{color:var(--cyan);font-weight:600} .kf-19__bar-track{height:8px;border-radius:4px;background:rgba(255,255,255,.08);overflow:hidden} .kf-19__bar-fill{height:100%;border-radius:4px} .kf-19__b1{background:linear-gradient(90deg,var(--purple),var(--cyan));width:15%;animation:kf-19-fill1 linear infinite} .kf-19__b2{background:linear-gradient(90deg,var(--green),var(--cyan));width:62%;animation:kf-19-fill2 linear infinite 0.5s} .kf-19__b3{background:linear-gradient(90deg,var(--red),var(--purple));width:80%;animation:kf-19-fill3 linear infinite 1s} @keyframes kf-19-fill1{0%,100%{width:15%}50%{width:5%}} @keyframes kf-19-fill2{0%,100%{width:62%}50%{width:45%}} @keyframes kf-19-fill3{0%{width:80%}100%{width:0%}} .kf-19__b3-wrap{overflow:hidden} @media(prefers-reduced-motion:reduce){.kf-19 *{animation:none!important}} ``` ### 20. CSS Path Drawing Animation **Type:** Pure CSS **Description:** SVG stroke-drawing animations: signature handwriting, success checkmark, map route, logo outline, circuit trace and infinite symbol — stroke-dashoffset keyframes only. **HTML:** ```html

        CSS Path Drawing Animations

        ``` **CSS:** ```css .kf-20 *, .kf-20 *::before, .kf-20 *::after { box-sizing: border-box; margin: 0; padding: 0; } .kf-20 { font-family: 'Segoe UI', sans-serif; background: #0d0d1a; color: #fff; padding: 40px 20px; min-height: 100vh; display: flex; flex-direction: column; align-items: center; gap: 48px; } .kf-20 h2 { font-size: 1.1rem; color: #888; letter-spacing: 2px; text-transform: uppercase; text-align: center; } .kf-20 .grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 32px; width: 100%; max-width: 900px; } .kf-20 .card { background: #13132a; border: 1px solid #2a2a4a; border-radius: 16px; padding: 32px 20px; display: flex; flex-direction: column; align-items: center; gap: 16px; } .kf-20 .card label { font-size: 0.8rem; color: #666; letter-spacing: 1px; text-transform: uppercase; } /* 1: Signature handwriting */ .kf-20 .sig-svg path { fill: none; stroke: #7c6af7; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 600; stroke-dashoffset: 600; animation: kf-20-draw 2.5s ease forwards infinite; } @keyframes kf-20-draw { 0% { stroke-dashoffset: 600; opacity: 1; } 70% { stroke-dashoffset: 0; opacity: 1; } 85% { stroke-dashoffset: 0; opacity: 1; } 100% { stroke-dashoffset: -600; opacity: 0; } } /* 2: Check mark */ .kf-20 .check-svg circle { fill: none; stroke: #00d46a; stroke-width: 4; stroke-dasharray: 251; stroke-dashoffset: 251; animation: kf-20-circle 0.6s ease forwards infinite; animation-delay: 0.2s; transform-origin: center; transform: rotate(-90deg); } .kf-20 .check-svg polyline { fill: none; stroke: #00d46a; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 80; stroke-dashoffset: 80; animation: kf-20-check 0.4s ease forwards infinite; animation-delay: 0.8s; } @keyframes kf-20-circle { 0% { stroke-dashoffset: 251; } 70% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: 0; } } @keyframes kf-20-check { 0% { stroke-dashoffset: 80; } 100% { stroke-dashoffset: 0; } } .kf-20 .check-svg { animation: kf-20-checkloop 2.5s ease infinite; } @keyframes kf-20-checkloop { 0%, 30% { opacity: 0; } 35%, 80% { opacity: 1; } 90%, 100% { opacity: 0; } } /* 3: Map route */ .kf-20 .route-svg polyline { fill: none; stroke: #ff6b35; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 400; stroke-dashoffset: 400; animation: kf-20-route 3s ease forwards infinite; } .kf-20 .route-svg .dot-start, .kf-20 .route-svg .dot-end { animation: kf-20-dotpop 0.3s ease forwards; transform-origin: center; } .kf-20 .route-svg .dot-start { animation-delay: 0s; } .kf-20 .route-svg .dot-end { animation-delay: 2.8s; } @keyframes kf-20-route { 0% { stroke-dashoffset: 400; } 80% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: 0; } } @keyframes kf-20-dotpop { 0% { r: 0; } 70% { r: 8; } 100% { r: 6; } } .kf-20 .route-wrap { animation: kf-20-routeloop 4s ease infinite; } @keyframes kf-20-routeloop { 0% { opacity: 0; } 5%, 85% { opacity: 1; } 95%, 100% { opacity: 0; } } /* 4: Logo outline */ .kf-20 .logo-svg path { fill: none; stroke: #e91e8c; stroke-width: 2.5; stroke-linecap: round; stroke-dasharray: 800; stroke-dashoffset: 800; animation: kf-20-logo 3s ease forwards infinite; } .kf-20 .logo-svg path:nth-child(2) { animation-delay: 1s; stroke: #7c6af7; } .kf-20 .logo-svg path:nth-child(3) { animation-delay: 2s; stroke: #00d4ff; } @keyframes kf-20-logo { 0% { stroke-dashoffset: 800; } 60% { stroke-dashoffset: 0; } 80% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: -800; } } /* 5: Circuit board */ .kf-20 .circuit-svg line, .kf-20 .circuit-svg path { fill: none; stroke: #00d4ff; stroke-width: 2; stroke-linecap: square; } .kf-20 .circuit-svg .trace { stroke-dasharray: 300; stroke-dashoffset: 300; animation: kf-20-circuit 2s linear infinite; } .kf-20 .circuit-svg .trace:nth-child(2) { animation-delay: 0.3s; stroke: #7c6af7; } .kf-20 .circuit-svg .trace:nth-child(3) { animation-delay: 0.6s; stroke: #00d46a; } .kf-20 .circuit-svg .trace:nth-child(4) { animation-delay: 0.9s; stroke: #ff6b35; } @keyframes kf-20-circuit { 0% { stroke-dashoffset: 300; } 100% { stroke-dashoffset: -300; } } .kf-20 .circuit-svg .node { fill: #00d4ff; animation: kf-20-nodeflash 2s ease infinite; } @keyframes kf-20-nodeflash { 0%, 100% { opacity: 0.3; } 50% { opacity: 1; } } /* 6: Infinity symbol */ .kf-20 .inf-svg path { fill: none; stroke: url(#kf20grad); stroke-width: 6; stroke-linecap: round; stroke-dasharray: 500; stroke-dashoffset: 0; animation: kf-20-inf 3s linear infinite; } @keyframes kf-20-inf { 0% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: -500; } } @media (prefers-reduced-motion: reduce) { .kf-20 .sig-svg path, .kf-20 .check-svg circle, .kf-20 .check-svg polyline, .kf-20 .check-svg, .kf-20 .route-svg polyline, .kf-20 .route-wrap, .kf-20 .logo-svg path, .kf-20 .circuit-svg .trace, .kf-20 .circuit-svg .node, .kf-20 .inf-svg path { animation: none; stroke-dashoffset: 0; opacity: 1; } } ``` ### 21. CSS Spotlight Animation Effect **Type:** Pure CSS **Description:** Six spotlight effects: roving text highlight, stage light cones, security scan beam, product reveal orb, grid cell highlight and club sweep — radial-gradient keyframes. **HTML:** ```html

        CSS Spotlight Animations

        SPOTLIGHT

        LIVE
        Scanning...
        🔴
        🟠
        🟡
        🟢
        🔵
        🟣
        🟤
        TONIGHT
        ``` **CSS:** ```css .kf-21 *, .kf-21 *::before, .kf-21 *::after { box-sizing: border-box; margin: 0; padding: 0; } .kf-21 { font-family: 'Segoe UI', sans-serif; background: #080810; color: #fff; padding: 40px 20px; min-height: 100vh; display: flex; flex-direction: column; align-items: center; gap: 40px; } .kf-21 h2 { font-size: 1.1rem; color: #555; letter-spacing: 2px; text-transform: uppercase; } .kf-21 .demos { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; width: 100%; max-width: 960px; } /* 1: Roving spotlight on text */ .kf-21 .spotlight-text { position: relative; overflow: hidden; background: #0d0d1a; border-radius: 12px; padding: 48px 24px; text-align: center; } .kf-21 .spotlight-text h3 { font-size: 2rem; font-weight: 800; color: #111; position: relative; z-index: 2; background: linear-gradient(90deg, #333, #222, #333); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; letter-spacing: 4px; } .kf-21 .spotlight-text::before { content: ''; position: absolute; width: 200px; height: 200px; background: radial-gradient(circle, rgba(255,220,100,0.9) 0%, rgba(255,180,0,0.4) 40%, transparent 70%); border-radius: 50%; top: 50%; left: -100px; transform: translateY(-50%); animation: kf-21-rove 3s ease-in-out infinite; pointer-events: none; z-index: 1; mix-blend-mode: screen; } @keyframes kf-21-rove { 0% { left: -100px; } 50% { left: calc(100% - 100px); } 100% { left: -100px; } } /* 2: Stage spotlight cones */ .kf-21 .stage { background: #050508; border-radius: 12px; overflow: hidden; position: relative; height: 200px; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 20px; gap: 40px; } .kf-21 .cone { position: absolute; top: 0; width: 120px; height: 180px; clip-path: polygon(40% 0%, 60% 0%, 100% 100%, 0% 100%); background: linear-gradient(180deg, rgba(255,240,180,0.15) 0%, rgba(255,240,180,0.05) 100%); transform-origin: top center; } .kf-21 .cone-1 { left: 20%; animation: kf-21-cone1 4s ease-in-out infinite; } .kf-21 .cone-2 { left: 50%; transform: translateX(-50%); animation: kf-21-cone2 4s ease-in-out infinite; animation-delay: 0.5s; } .kf-21 .cone-3 { right: 20%; animation: kf-21-cone3 4s ease-in-out infinite; animation-delay: 1s; } @keyframes kf-21-cone1 { 0%, 100% { opacity: 0.4; transform: rotate(-10deg); } 50% { opacity: 1; transform: rotate(10deg); } } @keyframes kf-21-cone2 { 0%, 100% { opacity: 1; transform: translateX(-50%) scaleX(1); } 50% { opacity: 0.5; transform: translateX(-50%) scaleX(0.7); } } @keyframes kf-21-cone3 { 0%, 100% { opacity: 0.4; transform: rotate(10deg); } 50% { opacity: 1; transform: rotate(-10deg); } } .kf-21 .stage-label { position: relative; z-index: 2; font-size: 1.4rem; font-weight: 700; letter-spacing: 6px; color: rgba(255,240,180,0.9); text-shadow: 0 0 20px rgba(255,200,50,0.8); animation: kf-21-stagelabel 4s ease-in-out infinite; } @keyframes kf-21-stagelabel { 0%, 100% { text-shadow: 0 0 20px rgba(255,200,50,0.4); } 50% { text-shadow: 0 0 40px rgba(255,200,50,1), 0 0 80px rgba(255,200,50,0.5); } } /* 3: Scanning spotlight */ .kf-21 .scan-wrap { position: relative; background: #0a0a16; border-radius: 12px; overflow: hidden; padding: 40px 24px; height: 180px; } .kf-21 .scan-beam { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(90deg, transparent 0%, transparent 20%, rgba(100,200,255,0.08) 40%, rgba(100,200,255,0.2) 50%, rgba(100,200,255,0.08) 60%, transparent 80%, transparent 100% ); animation: kf-21-scan 2.5s ease-in-out infinite; } @keyframes kf-21-scan { 0% { transform: translateX(-100%); } 100% { transform: translateX(100%); } } .kf-21 .scan-content { position: relative; z-index: 2; display: flex; flex-direction: column; gap: 12px; } .kf-21 .scan-line { height: 10px; border-radius: 4px; background: #1e2030; } .kf-21 .scan-line:nth-child(1) { width: 70%; } .kf-21 .scan-line:nth-child(2) { width: 90%; } .kf-21 .scan-line:nth-child(3) { width: 60%; } .kf-21 .scan-label { position: absolute; bottom: 12px; right: 16px; font-size: 0.7rem; color: rgba(100,200,255,0.6); letter-spacing: 2px; text-transform: uppercase; animation: kf-21-blink 1s step-end infinite; } @keyframes kf-21-blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } } /* 4: Product spotlight */ .kf-21 .product-spot { position: relative; background: #06060f; border-radius: 12px; overflow: hidden; height: 200px; display: flex; align-items: center; justify-content: center; } .kf-21 .product-spot::before { content: ''; position: absolute; width: 250px; height: 250px; background: radial-gradient(ellipse, rgba(180,120,255,0.25) 0%, rgba(100,50,200,0.1) 40%, transparent 70%); top: -80px; left: 50%; transform: translateX(-50%); animation: kf-21-prod 3s ease-in-out infinite; } @keyframes kf-21-prod { 0%, 100% { width: 200px; opacity: 0.6; } 50% { width: 300px; opacity: 1; } } .kf-21 .product-icon { position: relative; z-index: 2; width: 80px; height: 80px; background: linear-gradient(135deg, #7c6af7, #e91e8c); border-radius: 20px; display: flex; align-items: center; justify-content: center; font-size: 2.2rem; box-shadow: 0 20px 60px rgba(124,106,247,0.5); animation: kf-21-iconrise 3s ease-in-out infinite; } @keyframes kf-21-iconrise { 0%, 100% { transform: translateY(4px); box-shadow: 0 16px 40px rgba(124,106,247,0.4); } 50% { transform: translateY(-4px); box-shadow: 0 24px 70px rgba(124,106,247,0.7); } } /* 5: Spotlight grid highlight */ .kf-21 .grid-spot { background: #080814; border-radius: 12px; overflow: hidden; padding: 24px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; } .kf-21 .grid-cell { aspect-ratio: 1; border-radius: 8px; background: #111125; border: 1px solid #1e1e3a; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; transition: all 0.3s; } .kf-21 .grid-cell:nth-child(1) { animation: kf-21-cellhl 4.5s ease infinite 0s; } .kf-21 .grid-cell:nth-child(2) { animation: kf-21-cellhl 4.5s ease infinite 0.5s; } .kf-21 .grid-cell:nth-child(3) { animation: kf-21-cellhl 4.5s ease infinite 1s; } .kf-21 .grid-cell:nth-child(4) { animation: kf-21-cellhl 4.5s ease infinite 1.5s; } .kf-21 .grid-cell:nth-child(5) { animation: kf-21-cellhl 4.5s ease infinite 2s; } .kf-21 .grid-cell:nth-child(6) { animation: kf-21-cellhl 4.5s ease infinite 2.5s; } .kf-21 .grid-cell:nth-child(7) { animation: kf-21-cellhl 4.5s ease infinite 3s; } .kf-21 .grid-cell:nth-child(8) { animation: kf-21-cellhl 4.5s ease infinite 3.5s; } .kf-21 .grid-cell:nth-child(9) { animation: kf-21-cellhl 4.5s ease infinite 4s; } @keyframes kf-21-cellhl { 0%, 80%, 100% { background: #111125; border-color: #1e1e3a; box-shadow: none; } 90% { background: rgba(124,106,247,0.2); border-color: #7c6af7; box-shadow: 0 0 20px rgba(124,106,247,0.4); } } /* 6: Sweeping club spotlight */ .kf-21 .club { background: #020205; border-radius: 12px; overflow: hidden; height: 200px; position: relative; } .kf-21 .club-beam { position: absolute; bottom: 0; left: 50%; width: 300px; height: 280px; background: radial-gradient(ellipse at bottom center, rgba(255,50,150,0.5) 0%, rgba(150,0,100,0.2) 30%, transparent 70%); clip-path: polygon(40% 100%, 60% 100%, 95% 0%, 5% 0%); transform-origin: bottom center; transform: translateX(-50%); animation: kf-21-sweep 3s ease-in-out infinite; } .kf-21 .club-beam-2 { position: absolute; bottom: 0; left: 50%; width: 300px; height: 280px; background: radial-gradient(ellipse at bottom center, rgba(50,150,255,0.4) 0%, transparent 70%); clip-path: polygon(40% 100%, 60% 100%, 95% 0%, 5% 0%); transform-origin: bottom center; transform: translateX(-50%); animation: kf-21-sweep 3s ease-in-out infinite reverse; animation-delay: 1.5s; } @keyframes kf-21-sweep { 0%, 100% { transform: translateX(-50%) rotate(-40deg); } 50% { transform: translateX(-50%) rotate(40deg); } } .kf-21 .club-label { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); font-size: 1.2rem; font-weight: 700; letter-spacing: 4px; color: rgba(255,255,255,0.1); z-index: 2; } @media (prefers-reduced-motion: reduce) { .kf-21 .spotlight-text::before, .kf-21 .cone-1, .kf-21 .cone-2, .kf-21 .cone-3, .kf-21 .stage-label, .kf-21 .scan-beam, .kf-21 .scan-label, .kf-21 .product-spot::before, .kf-21 .product-icon, .kf-21 .grid-cell, .kf-21 .club-beam, .kf-21 .club-beam-2 { animation: none; } } ``` ### 22. CSS Spring Bounce Animation **Type:** Pure CSS **Description:** Eight CSS spring and elastic animations: drop ball with squash, elastic button, pop-in notification, stagger scale cards, spin, wobbly text, spring menu and rubber bars. **HTML:** ```html

        CSS Spring Bounce Animations

        Success!
        Task completed
        SPRING
        ``` **CSS:** ```css .kf-22 *, .kf-22 *::before, .kf-22 *::after { box-sizing: border-box; margin: 0; padding: 0; } .kf-22 { font-family: 'Segoe UI', sans-serif; background: #f0f4ff; color: #1a1a2e; padding: 48px 24px; min-height: 100vh; display: flex; flex-direction: column; align-items: center; gap: 48px; } .kf-22 h2 { font-size: 1.1rem; color: #888; letter-spacing: 2px; text-transform: uppercase; } .kf-22 .grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; width: 100%; max-width: 960px; } .kf-22 .card { background: #fff; border-radius: 20px; padding: 40px 24px; display: flex; flex-direction: column; align-items: center; gap: 20px; box-shadow: 0 4px 24px rgba(0,0,0,0.07); } .kf-22 .card label { font-size: 0.75rem; color: #aaa; letter-spacing: 1.5px; text-transform: uppercase; } /* Spring easings via keyframes */ /* 1: Ball spring drop */ .kf-22 .ball-spring { width: 60px; height: 60px; border-radius: 50%; background: linear-gradient(135deg, #7c6af7, #e91e8c); animation: kf-22-springdrop 1.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) infinite; box-shadow: 0 8px 24px rgba(124,106,247,0.4); } @keyframes kf-22-springdrop { 0% { transform: translateY(-80px) scaleX(0.8) scaleY(1.2); } 60% { transform: translateY(0) scaleX(1.2) scaleY(0.8); } 75% { transform: translateY(-20px) scaleX(0.95) scaleY(1.05); } 85% { transform: translateY(0) scaleX(1.05) scaleY(0.95); } 92% { transform: translateY(-6px); } 100% { transform: translateY(0) scaleX(1) scaleY(1); } } /* 2: Elastic button press */ .kf-22 .spring-btn { padding: 14px 32px; background: #7c6af7; color: #fff; border: none; border-radius: 50px; font-size: 1rem; font-weight: 600; cursor: pointer; animation: kf-22-btnspring 2s ease-in-out infinite; box-shadow: 0 6px 20px rgba(124,106,247,0.3); } @keyframes kf-22-btnspring { 0%, 60%, 100% { transform: scale(1); } 10% { transform: scaleX(0.85) scaleY(1.15); } 25% { transform: scaleX(1.15) scaleY(0.85); } 35% { transform: scaleX(0.95) scaleY(1.05); } 45% { transform: scaleX(1.05) scaleY(0.97); } 52% { transform: scaleX(0.98) scaleY(1.02); } } /* 3: Spring pop notification */ .kf-22 .notif { position: relative; display: flex; align-items: center; gap: 12px; background: #fff; border-radius: 16px; padding: 12px 16px; box-shadow: 0 8px 32px rgba(0,0,0,0.12); animation: kf-22-notifpop 2.5s cubic-bezier(0.34, 1.56, 0.64, 1) infinite; transform-origin: top center; min-width: 200px; } @keyframes kf-22-notifpop { 0%, 40%, 100% { transform: scale(0); opacity: 0; } 50% { transform: scale(1.08); opacity: 1; } 60%, 90% { transform: scale(1); opacity: 1; } 100% { transform: scale(0); opacity: 0; } } .kf-22 .notif-icon { width: 36px; height: 36px; border-radius: 10px; background: linear-gradient(135deg, #00d46a, #00b050); display: flex; align-items: center; justify-content: center; font-size: 1.1rem; } .kf-22 .notif-text { font-size: 0.85rem; font-weight: 600; color: #333; } .kf-22 .notif-sub { font-size: 0.72rem; color: #aaa; } /* 4: Spring scale cards */ .kf-22 .scale-grid { display: flex; gap: 10px; align-items: flex-end; } .kf-22 .scale-card { width: 48px; height: 48px; border-radius: 12px; background: linear-gradient(135deg, #ff6b35, #f7c948); animation: kf-22-scalepop 2.4s cubic-bezier(0.34, 1.56, 0.64, 1) infinite; } .kf-22 .scale-card:nth-child(2) { animation-delay: 0.15s; background: linear-gradient(135deg, #f7c948, #00d46a); } .kf-22 .scale-card:nth-child(3) { animation-delay: 0.3s; background: linear-gradient(135deg, #00d46a, #00d4ff); } .kf-22 .scale-card:nth-child(4) { animation-delay: 0.45s; background: linear-gradient(135deg, #00d4ff, #7c6af7); } @keyframes kf-22-scalepop { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.3); } } /* 5: Spring rotation */ .kf-22 .spin-spring { width: 64px; height: 64px; background: linear-gradient(135deg, #00d4ff, #7c6af7); border-radius: 16px; animation: kf-22-rotspring 2s cubic-bezier(0.34, 1.56, 0.64, 1) infinite; } @keyframes kf-22-rotspring { 0% { transform: rotate(0deg); } 50% { transform: rotate(200deg); } 100% { transform: rotate(180deg); } } /* 6: Wobbly text */ .kf-22 .wobble-text { font-size: 1.8rem; font-weight: 900; color: #1a1a2e; letter-spacing: 6px; display: flex; gap: 2px; } .kf-22 .wobble-text span { display: inline-block; animation: kf-22-wobble 2s cubic-bezier(0.36, 0.07, 0.19, 0.97) infinite; } .kf-22 .wobble-text span:nth-child(1) { animation-delay: 0.0s; color: #7c6af7; } .kf-22 .wobble-text span:nth-child(2) { animation-delay: 0.08s; color: #e91e8c; } .kf-22 .wobble-text span:nth-child(3) { animation-delay: 0.16s; color: #ff6b35; } .kf-22 .wobble-text span:nth-child(4) { animation-delay: 0.24s; color: #f7c948; } .kf-22 .wobble-text span:nth-child(5) { animation-delay: 0.32s; color: #00d46a; } .kf-22 .wobble-text span:nth-child(6) { animation-delay: 0.40s; color: #00d4ff; } @keyframes kf-22-wobble { 0%, 60%, 100% { transform: translateY(0) scaleX(1) scaleY(1); } 15% { transform: translateY(-20px) scaleX(0.9) scaleY(1.1); } 30% { transform: translateY(0) scaleX(1.1) scaleY(0.9); } 40% { transform: translateY(-8px) scaleX(0.97) scaleY(1.03); } 50% { transform: translateY(0) scaleX(1.02) scaleY(0.98); } } /* 7: Spring menu items */ .kf-22 .menu-spring { display: flex; flex-direction: column; gap: 8px; width: 100%; max-width: 200px; } .kf-22 .menu-item { padding: 10px 16px; border-radius: 10px; font-size: 0.85rem; font-weight: 500; color: #fff; animation: kf-22-menuspring 3s cubic-bezier(0.34, 1.56, 0.64, 1) infinite; transform-origin: left center; } .kf-22 .menu-item:nth-child(1) { background: #7c6af7; animation-delay: 0.1s; } .kf-22 .menu-item:nth-child(2) { background: #e91e8c; animation-delay: 0.25s; } .kf-22 .menu-item:nth-child(3) { background: #00d4ff; animation-delay: 0.4s; } .kf-22 .menu-item:nth-child(4) { background: #ff6b35; animation-delay: 0.55s; } @keyframes kf-22-menuspring { 0%, 70%, 100% { transform: translateX(0) scaleX(1); opacity: 1; } 80% { transform: translateX(-100%) scaleX(0.8); opacity: 0; } 85% { transform: translateX(-20px) scaleX(1.05); opacity: 1; } 92% { transform: translateX(4px); } } /* 8: Elastic line/rubber band */ .kf-22 .rubber-wrap { width: 100%; max-width: 200px; display: flex; flex-direction: column; gap: 8px; } .kf-22 .rubber-bar { height: 12px; border-radius: 6px; background: linear-gradient(90deg, #7c6af7, #e91e8c); animation: kf-22-rubber 2s cubic-bezier(0.34, 1.56, 0.64, 1) infinite; transform-origin: left center; } .kf-22 .rubber-bar:nth-child(2) { animation-delay: 0.2s; background: linear-gradient(90deg, #00d4ff, #00d46a); width: 75%; } .kf-22 .rubber-bar:nth-child(3) { animation-delay: 0.4s; background: linear-gradient(90deg, #ff6b35, #f7c948); width: 55%; } @keyframes kf-22-rubber { 0% { transform: scaleX(0); } 60% { transform: scaleX(1.1); } 75% { transform: scaleX(0.97); } 85% { transform: scaleX(1.03); } 100% { transform: scaleX(1); } } @media (prefers-reduced-motion: reduce) { .kf-22 .ball-spring, .kf-22 .spring-btn, .kf-22 .notif, .kf-22 .scale-card, .kf-22 .spin-spring, .kf-22 .wobble-text span, .kf-22 .menu-item, .kf-22 .rubber-bar { animation: none; transform: none; opacity: 1; } } ``` ### 23. CSS Confetti Explosion Animation **Type:** Pure CSS **Description:** Three confetti explosion styles: multi-directional radial burst, falling confetti rain and party-popper cracker — all pure CSS translate + rotate keyframes. **HTML:** ```html

        CSS Confetti Explosion Animations

        🎉 YAY! Celebration burst
        🎊 Confetti Rain
        🎉
        ``` **CSS:** ```css .kf-23 *, .kf-23 *::before, .kf-23 *::after { box-sizing: border-box; margin: 0; padding: 0; } .kf-23 { font-family: 'Segoe UI', sans-serif; background: #0a0a14; color: #fff; padding: 40px 20px; min-height: 100vh; display: flex; flex-direction: column; align-items: center; gap: 48px; } .kf-23 h2 { font-size: 1.1rem; color: #555; letter-spacing: 2px; text-transform: uppercase; } .kf-23 .scene-row { display: flex; flex-wrap: wrap; gap: 24px; justify-content: center; width: 100%; max-width: 960px; } /* Confetti piece base */ .kf-23 .conf-wrap { position: relative; width: 300px; height: 260px; overflow: hidden; border-radius: 16px; background: #0d0d1e; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 8px; } .kf-23 .conf-title { font-size: 1.6rem; font-weight: 800; letter-spacing: 2px; z-index: 2; text-align: center; } .kf-23 .conf-sub { font-size: 0.8rem; color: #888; letter-spacing: 1px; z-index: 2; } /* Generic confetti piece */ .kf-23 .piece { position: absolute; width: 10px; height: 10px; border-radius: 2px; animation: kf-23-burst 2.5s ease-in infinite; transform-origin: center; } /* Scene 1: Celebration burst — pieces all directions */ .kf-23 .scene-1 .piece { animation-duration: 2s; animation-delay: calc(var(--d) * 0.08s); } .kf-23 .scene-1 .piece:nth-child(1) { --d:1; left:50%; top:50%; background:#f7c948; width:8px; height:14px; animation-name: kf-23-p1; } .kf-23 .scene-1 .piece:nth-child(2) { --d:2; left:50%; top:50%; background:#e91e8c; width:12px; height:8px; border-radius:50%; animation-name: kf-23-p2; } .kf-23 .scene-1 .piece:nth-child(3) { --d:3; left:50%; top:50%; background:#7c6af7; animation-name: kf-23-p3; } .kf-23 .scene-1 .piece:nth-child(4) { --d:4; left:50%; top:50%; background:#00d4ff; width:6px; height:16px; animation-name: kf-23-p4; } .kf-23 .scene-1 .piece:nth-child(5) { --d:5; left:50%; top:50%; background:#ff6b35; border-radius:50%; animation-name: kf-23-p5; } .kf-23 .scene-1 .piece:nth-child(6) { --d:6; left:50%; top:50%; background:#00d46a; width:14px; height:6px; animation-name: kf-23-p6; } .kf-23 .scene-1 .piece:nth-child(7) { --d:7; left:50%; top:50%; background:#f7c948; width:8px; height:8px; border-radius:50%; animation-name: kf-23-p7; } .kf-23 .scene-1 .piece:nth-child(8) { --d:8; left:50%; top:50%; background:#e91e8c; animation-name: kf-23-p8; } .kf-23 .scene-1 .piece:nth-child(9) { --d:9; left:50%; top:50%; background:#7c6af7; width:16px; height:5px; animation-name: kf-23-p9; } .kf-23 .scene-1 .piece:nth-child(10) { --d:10; left:50%; top:50%; background:#ff6b35; width:6px; height:12px; animation-name: kf-23-p10; } .kf-23 .scene-1 .piece:nth-child(11) { --d:1; left:50%; top:50%; background:#00d4ff; width:9px; height:9px; animation-name: kf-23-p11; } .kf-23 .scene-1 .piece:nth-child(12) { --d:2; left:50%; top:50%; background:#00d46a; border-radius:50%; animation-name: kf-23-p12; } @keyframes kf-23-p1 { 0%{transform:translate(0,0) rotate(0)} 100%{transform:translate(-100px,-130px) rotate(540deg); opacity:0} } @keyframes kf-23-p2 { 0%{transform:translate(0,0) rotate(0)} 100%{transform:translate(80px,-150px) rotate(-360deg); opacity:0} } @keyframes kf-23-p3 { 0%{transform:translate(0,0) rotate(0)} 100%{transform:translate(130px,-90px) rotate(720deg); opacity:0} } @keyframes kf-23-p4 { 0%{transform:translate(0,0) rotate(0)} 100%{transform:translate(120px,60px) rotate(-540deg); opacity:0} } @keyframes kf-23-p5 { 0%{transform:translate(0,0) scale(1)} 100%{transform:translate(60px,140px) scale(0.3); opacity:0} } @keyframes kf-23-p6 { 0%{transform:translate(0,0) rotate(0)} 100%{transform:translate(-60px,130px) rotate(360deg); opacity:0} } @keyframes kf-23-p7 { 0%{transform:translate(0,0) scale(1)} 100%{transform:translate(-130px,80px) scale(0.2); opacity:0} } @keyframes kf-23-p8 { 0%{transform:translate(0,0) rotate(0)} 100%{transform:translate(-140px,-30px) rotate(-720deg); opacity:0} } @keyframes kf-23-p9 { 0%{transform:translate(0,0) rotate(0)} 100%{transform:translate(40px,-160px) rotate(480deg); opacity:0} } @keyframes kf-23-p10 { 0%{transform:translate(0,0) rotate(0)} 100%{transform:translate(150px,-50px) rotate(-400deg); opacity:0} } @keyframes kf-23-p11 { 0%{transform:translate(0,0) rotate(0)} 100%{transform:translate(-50px,-170px) rotate(600deg); opacity:0} } @keyframes kf-23-p12 { 0%{transform:translate(0,0) scale(1)} 100%{transform:translate(-120px,-100px) scale(0.2); opacity:0} } /* Scene 2: Rain confetti (falling from top) */ .kf-23 .scene-2 .piece { top: -20px; animation-name: kf-23-rain; animation-duration: 2.5s; animation-timing-function: linear; } .kf-23 .scene-2 .piece:nth-child(n) { animation-delay: calc(var(--i) * 0.18s); } .kf-23 .scene-2 .piece:nth-child(1) { --i:0; left:10%; background:#f7c948; width:8px; height:14px; } .kf-23 .scene-2 .piece:nth-child(2) { --i:1; left:22%; background:#e91e8c; border-radius:50%; } .kf-23 .scene-2 .piece:nth-child(3) { --i:2; left:35%; background:#7c6af7; width:14px; height:6px; } .kf-23 .scene-2 .piece:nth-child(4) { --i:3; left:50%; background:#00d4ff; width:6px; height:14px; } .kf-23 .scene-2 .piece:nth-child(5) { --i:4; left:65%; background:#ff6b35; border-radius:50%; } .kf-23 .scene-2 .piece:nth-child(6) { --i:5; left:78%; background:#00d46a; width:12px; height:8px; } .kf-23 .scene-2 .piece:nth-child(7) { --i:0.5; left:15%; background:#f7c948; border-radius:50%; } .kf-23 .scene-2 .piece:nth-child(8) { --i:1.5; left:45%; background:#e91e8c; width:8px; height:12px; } .kf-23 .scene-2 .piece:nth-child(9) { --i:2.5; left:60%; background:#7c6af7; width:12px; height:8px; } .kf-23 .scene-2 .piece:nth-child(10) { --i:3.5; left:88%; background:#00d4ff; border-radius:50%; } .kf-23 .scene-2 .piece:nth-child(11) { --i:4.5; left:5%; background:#ff6b35; width:10px; height:10px; } .kf-23 .scene-2 .piece:nth-child(12) { --i:5.5; left:72%; background:#00d46a; width:6px; height:16px; } @keyframes kf-23-rain { 0% { transform: translateY(0) rotate(0deg) translateX(0); opacity: 1; } 25% { transform: translateY(65px) rotate(180deg) translateX(15px); } 50% { transform: translateY(130px) rotate(360deg) translateX(-10px); } 75% { transform: translateY(195px) rotate(540deg) translateX(12px); } 100% { transform: translateY(280px) rotate(720deg) translateX(-8px); opacity: 0.4; } } /* Scene 3: Popper / cracker */ .kf-23 .cracker { position: relative; width: 240px; height: 260px; overflow: hidden; border-radius: 16px; background: #0d0d1e; display: flex; align-items: center; justify-content: center; } .kf-23 .popper-icon { font-size: 3rem; z-index: 2; animation: kf-23-poppericon 2s ease infinite; } @keyframes kf-23-poppericon { 0%, 40% { transform: rotate(-20deg) scale(0.9); } 50% { transform: rotate(20deg) scale(1.2); } 60%, 100% { transform: rotate(-20deg) scale(0.9); } } .kf-23 .cracker .piece { animation-name: kf-23-cracker; animation-duration: 1.8s; animation-timing-function: cubic-bezier(0.25, 0.46, 0.45, 0.94); } .kf-23 .cracker .piece:nth-child(2) { background:#f7c948; animation-delay:0.05s; } .kf-23 .cracker .piece:nth-child(3) { background:#e91e8c; border-radius:50%; animation-delay:0.1s; } .kf-23 .cracker .piece:nth-child(4) { background:#7c6af7; width:14px; height:5px; animation-delay:0.0s; } .kf-23 .cracker .piece:nth-child(5) { background:#00d4ff; animation-delay:0.15s; } .kf-23 .cracker .piece:nth-child(6) { background:#ff6b35; border-radius:50%; animation-delay:0.08s; } .kf-23 .cracker .piece:nth-child(7) { background:#00d46a; animation-delay:0.12s; } .kf-23 .cracker .piece:nth-child(8) { background:#f7c948; border-radius:50%; animation-delay:0.04s; } .kf-23 .cracker .piece:nth-child(9) { background:#e91e8c; width:5px; height:14px; animation-delay:0.16s; } @keyframes kf-23-cracker { 0% { transform: translate(0,0) rotate(0deg); opacity:1; top:50%; left:50%; } 30% { opacity:1; } 100% { opacity:0; } } /* Individual cracker pieces radiate */ .kf-23 .cracker .piece:nth-child(2) { animation-name: kf-23-cp1; } .kf-23 .cracker .piece:nth-child(3) { animation-name: kf-23-cp2; } .kf-23 .cracker .piece:nth-child(4) { animation-name: kf-23-cp3; } .kf-23 .cracker .piece:nth-child(5) { animation-name: kf-23-cp4; } .kf-23 .cracker .piece:nth-child(6) { animation-name: kf-23-cp5; } .kf-23 .cracker .piece:nth-child(7) { animation-name: kf-23-cp6; } .kf-23 .cracker .piece:nth-child(8) { animation-name: kf-23-cp7; } .kf-23 .cracker .piece:nth-child(9) { animation-name: kf-23-cp8; } @keyframes kf-23-cp1 { 0%{top:50%;left:50%;opacity:1} 100%{top:5%;left:15%;transform:rotate(480deg);opacity:0} } @keyframes kf-23-cp2 { 0%{top:50%;left:50%;opacity:1} 100%{top:8%;left:55%;transform:rotate(-360deg);opacity:0} } @keyframes kf-23-cp3 { 0%{top:50%;left:50%;opacity:1} 100%{top:15%;left:85%;transform:rotate(540deg);opacity:0} } @keyframes kf-23-cp4 { 0%{top:50%;left:50%;opacity:1} 100%{top:55%;left:90%;transform:rotate(-480deg);opacity:0} } @keyframes kf-23-cp5 { 0%{top:50%;left:50%;opacity:1} 100%{top:85%;left:70%;transform:rotate(360deg);opacity:0} } @keyframes kf-23-cp6 { 0%{top:50%;left:50%;opacity:1} 100%{top:88%;left:30%;transform:rotate(-540deg);opacity:0} } @keyframes kf-23-cp7 { 0%{top:50%;left:50%;opacity:1} 100%{top:80%;left:8%;transform:rotate(720deg);opacity:0} } @keyframes kf-23-cp8 { 0%{top:50%;left:50%;opacity:1} 100%{top:30%;left:5%;transform:rotate(-720deg);opacity:0} } @media (prefers-reduced-motion: reduce) { .kf-23 .piece, .kf-23 .popper-icon { animation: none; opacity: 0.5; } } ``` ### 24. CSS Breathing Animation Meditation **Type:** Pure CSS **Description:** Six calming CSS breathing animations: classic expanding circle, box-breathing dot tracer, ripple rings, lotus bloom petals, SVG wave breath and stroke-dashoffset timer ring. **HTML:** ```html

        CSS Breathing & Meditation Animations

        breathe in · hold · breathe out
        ``` **CSS:** ```css @import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600&display=swap'); .kf-24 *, .kf-24 *::before, .kf-24 *::after { box-sizing: border-box; margin: 0; padding: 0; } .kf-24 { font-family: 'Inter', sans-serif; background: #06080f; color: #fff; padding: 48px 24px; min-height: 100vh; display: flex; flex-direction: column; align-items: center; gap: 48px; } .kf-24 h2 { font-size: 1rem; color: #444; letter-spacing: 3px; text-transform: uppercase; font-weight: 300; } .kf-24 .grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 28px; width: 100%; max-width: 960px; } /* 1: Classic breathing circle */ .kf-24 .breathe-card { background: #0a0c18; border-radius: 20px; padding: 40px 20px; display: flex; flex-direction: column; align-items: center; gap: 20px; border: 1px solid #151830; } .kf-24 .breathe-card label { font-size: 0.75rem; color: #444; letter-spacing: 2px; text-transform: uppercase; font-weight: 300; } .kf-24 .breathe-circle { width: 120px; height: 120px; border-radius: 50%; background: radial-gradient(circle, rgba(100,160,255,0.8) 0%, rgba(80,120,220,0.4) 50%, rgba(50,80,180,0.1) 100%); box-shadow: 0 0 0 0 rgba(100,160,255,0.4), 0 0 40px rgba(80,140,255,0.3); animation: kf-24-breathe 8s ease-in-out infinite; } @keyframes kf-24-breathe { 0% { transform: scale(0.85); box-shadow: 0 0 0 0 rgba(100,160,255,0.6), 0 0 20px rgba(80,140,255,0.2); } 35% { transform: scale(1.25); box-shadow: 0 0 0 20px rgba(100,160,255,0), 0 0 60px rgba(80,140,255,0.5); } 65% { transform: scale(1.25); box-shadow: 0 0 0 0 rgba(100,160,255,0), 0 0 60px rgba(80,140,255,0.5); } 100% { transform: scale(0.85); box-shadow: 0 0 0 0 rgba(100,160,255,0.6), 0 0 20px rgba(80,140,255,0.2); } } .kf-24 .breathe-label { font-size: 1rem; font-weight: 300; color: rgba(140,180,255,0.8); letter-spacing: 2px; animation: kf-24-breathe-label 8s ease-in-out infinite; text-align: center; } @keyframes kf-24-breathe-label { 0%, 5% { content: 'Breathe in'; opacity: 0.5; } 10% { opacity: 1; } 30%, 40% { opacity: 1; } 45% { opacity: 0.3; } 60% { opacity: 0.8; } 80%, 95% { opacity: 0.8; } 100% { opacity: 0.5; } } /* 2: Box breathing */ .kf-24 .box-wrap { position: relative; width: 140px; height: 140px; } .kf-24 .box-bg { width: 100%; height: 100%; border-radius: 20px; background: #0f1020; border: 1px solid #1e2040; } .kf-24 .box-dot { position: absolute; width: 16px; height: 16px; background: #7c6af7; border-radius: 50%; top: -8px; left: -8px; box-shadow: 0 0 16px rgba(124,106,247,0.8); animation: kf-24-boxbreath 16s linear infinite; } @keyframes kf-24-boxbreath { 0% { top: -8px; left: -8px; } 25% { top: -8px; left: calc(100% - 8px); } 50% { top: calc(100% - 8px); left: calc(100% - 8px); } 75% { top: calc(100% - 8px); left: -8px; } 100% { top: -8px; left: -8px; } } .kf-24 .box-glow { position: absolute; inset: 4px; border-radius: 16px; border: 2px solid transparent; animation: kf-24-boxglow 16s linear infinite; } @keyframes kf-24-boxglow { 0%, 100% { border-color: rgba(124,106,247,0.3); } 12.5%, 37.5%, 62.5%, 87.5% { border-color: rgba(124,106,247,0.8); } } /* 3: Ripple breath */ .kf-24 .ripple-breath { position: relative; width: 120px; height: 120px; display: flex; align-items: center; justify-content: center; } .kf-24 .ripple-ring { position: absolute; border-radius: 50%; border: 2px solid rgba(0, 212, 106, 0.6); animation: kf-24-ripplering 4s ease-out infinite; } .kf-24 .ripple-ring:nth-child(1) { width: 40px; height: 40px; animation-delay: 0s; } .kf-24 .ripple-ring:nth-child(2) { width: 40px; height: 40px; animation-delay: 1s; } .kf-24 .ripple-ring:nth-child(3) { width: 40px; height: 40px; animation-delay: 2s; } .kf-24 .ripple-core { width: 36px; height: 36px; border-radius: 50%; background: radial-gradient(circle, #00d46a, #00a050); z-index: 2; animation: kf-24-corePulse 4s ease-in-out infinite; } @keyframes kf-24-ripplering { 0% { width: 40px; height: 40px; opacity: 0.8; border-color: rgba(0,212,106,0.8); } 100% { width: 130px; height: 130px; opacity: 0; border-color: rgba(0,212,106,0); } } @keyframes kf-24-corePulse { 0%, 100% { transform: scale(0.9); } 50% { transform: scale(1.1); } } /* 4: Petals / lotus breath */ .kf-24 .lotus-wrap { position: relative; width: 140px; height: 140px; display: flex; align-items: center; justify-content: center; } .kf-24 .petal { position: absolute; width: 40px; height: 60px; border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; transform-origin: bottom center; animation: kf-24-petal 6s ease-in-out infinite; } .kf-24 .petal:nth-child(1) { background: rgba(233,30,140,0.5); transform: rotate(0deg) translateY(-20px); animation-delay: 0s; } .kf-24 .petal:nth-child(2) { background: rgba(124,106,247,0.5); transform: rotate(45deg) translateY(-20px); animation-delay: 0.15s; } .kf-24 .petal:nth-child(3) { background: rgba(0,212,255,0.5); transform: rotate(90deg) translateY(-20px); animation-delay: 0.3s; } .kf-24 .petal:nth-child(4) { background: rgba(0,212,106,0.5); transform: rotate(135deg) translateY(-20px); animation-delay: 0.45s; } .kf-24 .petal:nth-child(5) { background: rgba(247,201,72,0.5); transform: rotate(180deg) translateY(-20px); animation-delay: 0.6s; } .kf-24 .petal:nth-child(6) { background: rgba(255,107,53,0.5); transform: rotate(225deg) translateY(-20px); animation-delay: 0.75s; } .kf-24 .petal:nth-child(7) { background: rgba(233,30,140,0.4); transform: rotate(270deg) translateY(-20px); animation-delay: 0.9s; } .kf-24 .petal:nth-child(8) { background: rgba(124,106,247,0.4); transform: rotate(315deg) translateY(-20px); animation-delay: 1.05s; } @keyframes kf-24-petal { 0%, 100% { transform: rotate(var(--r, 0deg)) translateY(-20px) scaleY(0.6); opacity: 0.5; } 40%, 60% { transform: rotate(var(--r, 0deg)) translateY(-25px) scaleY(1.1); opacity: 1; } } /* override with inline CSS instead; use nth-child combined with CSS vars via property */ .kf-24 .petal:nth-child(1) { --r: 0deg; } .kf-24 .petal:nth-child(2) { --r: 45deg; } .kf-24 .petal:nth-child(3) { --r: 90deg; } .kf-24 .petal:nth-child(4) { --r: 135deg; } .kf-24 .petal:nth-child(5) { --r: 180deg; } .kf-24 .petal:nth-child(6) { --r: 225deg; } .kf-24 .petal:nth-child(7) { --r: 270deg; } .kf-24 .petal:nth-child(8) { --r: 315deg; } .kf-24 .lotus-core { width: 28px; height: 28px; border-radius: 50%; background: radial-gradient(circle, #fff 0%, rgba(255,255,255,0.3) 100%); z-index: 2; animation: kf-24-lotuscore 6s ease-in-out infinite; } @keyframes kf-24-lotuscore { 0%, 100% { transform: scale(0.8); opacity: 0.5; } 50% { transform: scale(1.1); opacity: 1; } } /* 5: Waveform breathing */ .kf-24 .wave-breath { width: 200px; height: 80px; overflow: hidden; position: relative; } .kf-24 .wave-breath svg { width: 100%; height: 100%; } .kf-24 .wave-breath path { fill: none; stroke: rgba(0,212,255,0.8); stroke-width: 2.5; stroke-linecap: round; animation: kf-24-wavepath 4s ease-in-out infinite; } @keyframes kf-24-wavepath { 0% { d: path("M 0,40 Q 50,40 100,40 Q 150,40 200,40"); opacity: 0.5; } 25% { d: path("M 0,40 Q 50,5 100,40 Q 150,75 200,40"); opacity: 1; } 50% { d: path("M 0,40 Q 50,40 100,40 Q 150,40 200,40"); opacity: 0.5; } 75% { d: path("M 0,40 Q 50,75 100,40 Q 150,5 200,40"); opacity: 1; } 100% { d: path("M 0,40 Q 50,40 100,40 Q 150,40 200,40"); opacity: 0.5; } } /* 6: Timer circle */ .kf-24 .timer-breath { position: relative; width: 120px; height: 120px; } .kf-24 .timer-breath svg { width: 100%; height: 100%; transform: rotate(-90deg); } .kf-24 .timer-track { fill: none; stroke: #1e2040; stroke-width: 6; } .kf-24 .timer-prog { fill: none; stroke: url(#kf24grad); stroke-width: 6; stroke-linecap: round; stroke-dasharray: 327; animation: kf-24-timerprog 8s linear infinite; } @keyframes kf-24-timerprog { 0% { stroke-dashoffset: 327; } 100% { stroke-dashoffset: 0; } } .kf-24 .timer-text { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); font-size: 1.4rem; font-weight: 300; color: rgba(180,200,255,0.9); animation: kf-24-timertext 8s linear infinite; } @keyframes kf-24-timertext { 0% { content: '8'; } } @media (prefers-reduced-motion: reduce) { .kf-24 .breathe-circle, .kf-24 .breathe-label, .kf-24 .box-dot, .kf-24 .box-glow, .kf-24 .ripple-ring, .kf-24 .ripple-core, .kf-24 .petal, .kf-24 .lotus-core, .kf-24 .wave-breath path, .kf-24 .timer-prog { animation: none; } } ``` ### 25. CSS Typewriter Delete Animation Loop **Type:** Pure CSS **Description:** Six typewriter-and-delete loop patterns: word cycler, terminal prompt, search input placeholder, big display, multiline build-and-erase and code editor typing. **HTML:** ```html

        CSS Typewriter Delete Loop Animations

        I build websites.
        npm run dev
        ✓ Server running on :3000
        Search anything...
        DESIGN.
        → Installing dependencies...
        → Compiling source files...
        → Build complete! ✓
        1const hero = 'World';
        2function greet(name) {
        3 return `Hello, ${name}`;
        4}
        ``` **CSS:** ```css @import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;700&family=Inter:wght@400;700;900&display=swap'); .kf-25 *, .kf-25 *::before, .kf-25 *::after { box-sizing: border-box; margin: 0; padding: 0; } .kf-25 { font-family: 'Inter', sans-serif; background: #09090f; color: #fff; padding: 48px 24px; min-height: 100vh; display: flex; flex-direction: column; align-items: center; gap: 48px; } .kf-25 h2 { font-size: 1rem; color: #444; letter-spacing: 3px; text-transform: uppercase; } .kf-25 .grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; width: 100%; max-width: 960px; } .kf-25 .card { background: #0f0f1a; border: 1px solid #1e1e30; border-radius: 16px; padding: 36px 24px; display: flex; flex-direction: column; gap: 16px; } .kf-25 .card label { font-size: 0.72rem; color: #444; letter-spacing: 2px; text-transform: uppercase; } /* Cursor blink */ @keyframes kf-25-blink { 0%, 100% { border-color: currentColor; } 50% { border-color: transparent; } } /* 1: Hero headline typewriter with word cycling */ .kf-25 .hero-type { font-size: 1.6rem; font-weight: 900; color: #fff; display: flex; align-items: center; gap: 0; flex-wrap: wrap; } .kf-25 .hero-type .static { color: #888; margin-right: 8px; font-weight: 400; font-size: 1.3rem; } .kf-25 .hero-type .dynamic { color: #7c6af7; border-right: 3px solid #7c6af7; overflow: hidden; white-space: nowrap; animation: kf-25-type1 2s steps(9, end) 0s 1 normal forwards, kf-25-del1 1s steps(9, end) 2.5s 1 normal forwards, kf-25-type2 2s steps(10, end) 4s 1 normal forwards, kf-25-del2 1s steps(10, end) 6.5s 1 normal forwards, kf-25-type3 2s steps(8, end) 8s 1 normal forwards, kf-25-del3 1s steps(8, end) 10.5s 1 normal forwards, kf-25-type1 2s steps(9, end) 12s infinite; animation-fill-mode: forwards; } /* Simplified: cycle through width */ .kf-25 .dynamic { animation: kf-25-wordcycle 12s steps(1) infinite !important; } @keyframes kf-25-wordcycle { 0% { width: 0; } 4% { width: 9ch; } 25% { width: 9ch; } 30% { width: 0; } 35% { width: 0; } 38% { width: 10ch; color: #e91e8c; border-color: #e91e8c; } 58% { width: 10ch; } 63% { width: 0; } 68% { width: 0; } 71% { width: 8ch; color: #00d4ff; border-color: #00d4ff; } 91% { width: 8ch; } 96% { width: 0; } 100% { width: 0; color: #7c6af7; border-color: #7c6af7; } } /* But width alone looks bad — use a more robust approach with multiple spans */ /* 2: Terminal prompt */ .kf-25 .terminal { background: #050508; border-radius: 10px; padding: 20px 16px; font-family: 'JetBrains Mono', monospace; font-size: 0.85rem; } .kf-25 .terminal-line { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; } .kf-25 .prompt { color: #00d46a; } .kf-25 .cmd { color: #fff; overflow: hidden; white-space: nowrap; border-right: 2px solid #fff; animation: kf-25-termtype 6s steps(1) infinite; } @keyframes kf-25-termtype { 0% { width: 0; border-color: #fff; } 5% { width: 18ch; } 40% { width: 18ch; } 45% { width: 10ch; } 50% { width: 0; } 55% { width: 14ch; } 90% { width: 14ch; } 95% { width: 0; } 100% { width: 0; } } .kf-25 .output { color: #7c6af7; font-size: 0.78rem; opacity: 0; animation: kf-25-termout 6s ease infinite; } @keyframes kf-25-termout { 0%, 40% { opacity: 0; } 50%, 90% { opacity: 1; } 100% { opacity: 0; } } /* 3: Input field typewriter */ .kf-25 .input-demo { position: relative; background: #0a0a16; border: 2px solid #2a2a4a; border-radius: 10px; padding: 14px 16px; font-size: 0.95rem; color: #ccc; display: flex; align-items: center; gap: 0; } .kf-25 .input-demo .placeholder { color: #333; overflow: hidden; white-space: nowrap; animation: kf-25-inputtype 8s steps(1) infinite; } @keyframes kf-25-inputtype { 0% { width: 0; } 6% { width: 20ch; color: #ccc; } 40% { width: 20ch; color: #ccc; } 50% { width: 12ch; color: #888; } 56% { width: 0; } 60% { width: 0; } 65% { width: 18ch; color: #ccc; } 92% { width: 18ch; } 98% { width: 0; } 100% { width: 0; } } .kf-25 .input-cursor { width: 2px; height: 1.1em; background: #7c6af7; animation: kf-25-blink 0.8s step-end infinite; flex-shrink: 0; } .kf-25 .input-demo.focused { border-color: #7c6af7; } /* 4: Big display typewriter */ .kf-25 .big-type { font-size: 2.2rem; font-weight: 900; color: #fff; overflow: hidden; white-space: nowrap; border-right: 4px solid #f7c948; width: fit-content; animation: kf-25-bigtype 8s cubic-bezier(0.4,0,0.6,1) infinite, kf-25-blink 0.8s step-end infinite; } @keyframes kf-25-bigtype { 0% { width: 0; } 30% { width: 7ch; } 60% { width: 7ch; } 90% { width: 0; } 100% { width: 0; } } /* 5: Multiline stagger */ .kf-25 .multiline { display: flex; flex-direction: column; gap: 10px; } .kf-25 .type-line { font-size: 0.9rem; color: #888; overflow: hidden; white-space: nowrap; border-right: 2px solid transparent; animation: kf-25-multitype 9s steps(1) infinite; } .kf-25 .type-line:nth-child(1) { animation-delay: 0s; } .kf-25 .type-line:nth-child(2) { animation-delay: 0.8s; } .kf-25 .type-line:nth-child(3) { animation-delay: 1.6s; } @keyframes kf-25-multitype { 0% { width: 0; border-color: #7c6af7; color: #7c6af7; } 20% { width: 28ch; border-color: #7c6af7; color: #fff; } 70% { width: 28ch; border-color: transparent; color: #888; } 80% { width: 0; } 100% { width: 0; } } /* 6: Code editor typing */ .kf-25 .code-editor { background: #050508; border-radius: 10px; padding: 20px 16px; font-family: 'JetBrains Mono', monospace; font-size: 0.78rem; line-height: 1.8; } .kf-25 .code-line { display: flex; align-items: center; gap: 16px; } .kf-25 .ln { color: #333; user-select: none; min-width: 16px; } .kf-25 .code-text { overflow: hidden; white-space: nowrap; animation: kf-25-codetype 10s steps(1) infinite; } .kf-25 .code-line:nth-child(1) .code-text { color: #e91e8c; animation-delay: 0s; } .kf-25 .code-line:nth-child(2) .code-text { color: #7c6af7; animation-delay: 1.2s; } .kf-25 .code-line:nth-child(3) .code-text { color: #00d4ff; animation-delay: 2.4s; } .kf-25 .code-line:nth-child(4) .code-text { color: #00d46a; animation-delay: 3.6s; } @keyframes kf-25-codetype { 0% { width: 0; } 15% { width: 30ch; } 75% { width: 30ch; } 90% { width: 0; } 100% { width: 0; } } @media (prefers-reduced-motion: reduce) { .kf-25 .dynamic, .kf-25 .cmd, .kf-25 .output, .kf-25 .input-demo .placeholder, .kf-25 .input-cursor, .kf-25 .big-type, .kf-25 .type-line, .kf-25 .code-text { animation: none; width: auto; opacity: 1; border-color: transparent; } } ``` ### 26. CSS Aurora Borealis Animation Background **Type:** Pure CSS **Description:** Animated northern-lights sky with skewed gradient curtain bands, tree silhouette and four colour-variant cards — green, purple/pink, blue-teal and multicolour aurora. **HTML:** ```html

        CSS Aurora Borealis Animations

        Aurora

        Northern Lights

        Green Aurora
        Purple & Pink
        Blue Teal
        Multicolor
        ``` **CSS:** ```css @import url('https://fonts.googleapis.com/css2?family=Inter:wght@200;300;400;700&display=swap'); .kf-26 *, .kf-26 *::before, .kf-26 *::after { box-sizing: border-box; margin: 0; padding: 0; } .kf-26 { font-family: 'Inter', sans-serif; background: #010308; color: #fff; padding: 48px 24px; min-height: 100vh; display: flex; flex-direction: column; align-items: center; gap: 40px; } .kf-26 h2 { font-size: 1rem; color: #334; letter-spacing: 3px; text-transform: uppercase; font-weight: 300; } /* ── Scene 1: Full aurora sky ── */ .kf-26 .sky { position: relative; width: 100%; max-width: 960px; height: 340px; background: linear-gradient(180deg, #010308 0%, #020812 60%, #04101e 100%); border-radius: 20px; overflow: hidden; } /* Stars */ .kf-26 .sky::before { content: ''; position: absolute; inset: 0; background-image: radial-gradient(1px 1px at 10% 15%, rgba(255,255,255,0.8) 0%, transparent 100%), radial-gradient(1px 1px at 30% 8%, rgba(255,255,255,0.6) 0%, transparent 100%), radial-gradient(1px 1px at 55% 20%, rgba(255,255,255,0.9) 0%, transparent 100%), radial-gradient(1px 1px at 75% 6%, rgba(255,255,255,0.7) 0%, transparent 100%), radial-gradient(1px 1px at 90% 18%, rgba(255,255,255,0.5) 0%, transparent 100%), radial-gradient(1px 1px at 20% 30%, rgba(255,255,255,0.4) 0%, transparent 100%), radial-gradient(1px 1px at 65% 12%, rgba(255,255,255,0.8) 0%, transparent 100%), radial-gradient(1px 1px at 45% 5%, rgba(255,255,255,0.6) 0%, transparent 100%), radial-gradient(1px 1px at 82% 28%, rgba(255,255,255,0.7) 0%, transparent 100%), radial-gradient(1px 1px at 5% 22%, rgba(255,255,255,0.5) 0%, transparent 100%); animation: kf-26-twinkle 4s ease-in-out infinite; } @keyframes kf-26-twinkle { 0%, 100% { opacity: 0.6; } 50% { opacity: 1; } } /* Ground silhouette */ .kf-26 .sky::after { content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 60px; background: linear-gradient(180deg, transparent 0%, #010205 100%); } /* Aurora curtains */ .kf-26 .aurora { position: absolute; bottom: 40px; width: 100%; height: 220px; filter: blur(18px); mix-blend-mode: screen; } .kf-26 .aurora-band { position: absolute; bottom: 0; height: 100%; border-radius: 50%; transform-origin: bottom center; } .kf-26 .a1 { width: 60%; left: -5%; background: linear-gradient(0deg, transparent 0%, rgba(0,220,120,0.15) 20%, rgba(0,255,160,0.4) 45%, rgba(0,230,130,0.2) 65%, transparent 100% ); animation: kf-26-aurora1 8s ease-in-out infinite; } .kf-26 .a2 { width: 70%; left: 20%; background: linear-gradient(0deg, transparent 0%, rgba(100,0,220,0.1) 15%, rgba(140,80,255,0.35) 40%, rgba(180,100,255,0.2) 60%, transparent 100% ); animation: kf-26-aurora2 10s ease-in-out infinite; } .kf-26 .a3 { width: 55%; right: -5%; background: linear-gradient(0deg, transparent 0%, rgba(0,180,220,0.1) 20%, rgba(0,220,255,0.3) 45%, rgba(50,200,240,0.15) 65%, transparent 100% ); animation: kf-26-aurora3 7s ease-in-out infinite; } .kf-26 .a4 { width: 40%; left: 30%; background: linear-gradient(0deg, transparent 0%, rgba(0,240,180,0.05) 20%, rgba(100,255,200,0.25) 50%, transparent 100% ); animation: kf-26-aurora4 12s ease-in-out infinite; } @keyframes kf-26-aurora1 { 0% { transform: skewX(-5deg) scaleX(1) translateX(0); opacity: 0.8; } 33% { transform: skewX(8deg) scaleX(1.1) translateX(3%); opacity: 1; } 66% { transform: skewX(-3deg) scaleX(0.95) translateX(-2%); opacity: 0.9; } 100% { transform: skewX(-5deg) scaleX(1) translateX(0); opacity: 0.8; } } @keyframes kf-26-aurora2 { 0% { transform: skewX(3deg) scaleX(1) translateX(0); opacity: 0.7; } 40% { transform: skewX(-10deg) scaleX(1.08) translateX(-4%); opacity: 0.9; } 70% { transform: skewX(6deg) scaleX(0.92) translateX(3%); opacity: 0.8; } 100% { transform: skewX(3deg) scaleX(1) translateX(0); opacity: 0.7; } } @keyframes kf-26-aurora3 { 0% { transform: skewX(8deg) scaleX(1) translateX(0); opacity: 0.9; } 45% { transform: skewX(-6deg) scaleX(1.12) translateX(-3%); opacity: 0.6; } 75% { transform: skewX(4deg) scaleX(0.98) translateX(4%); opacity: 1; } 100% { transform: skewX(8deg) scaleX(1) translateX(0); opacity: 0.9; } } @keyframes kf-26-aurora4 { 0% { transform: scaleY(1) translateX(0); opacity: 0.6; } 50% { transform: scaleY(1.3) translateX(-5%); opacity: 0.9; } 100% { transform: scaleY(1) translateX(0); opacity: 0.6; } } /* Trees silhouette */ .kf-26 .trees { position: absolute; bottom: 0; left: 0; right: 0; height: 60px; background: #010205; clip-path: polygon( 0% 100%, 0% 80%, 3% 60%, 6% 80%, 9% 50%, 12% 70%, 15% 40%, 18% 65%, 21% 45%, 24% 70%, 27% 35%, 30% 60%, 33% 50%, 36% 75%, 39% 45%, 42% 65%, 45% 30%, 48% 55%, 51% 40%, 54% 60%, 57% 45%, 60% 70%, 63% 50%, 66% 75%, 69% 40%, 72% 65%, 75% 35%, 78% 60%, 81% 50%, 84% 75%, 87% 45%, 90% 65%, 93% 40%, 96% 60%, 100% 80%, 100% 100% ); } /* Sky caption */ .kf-26 .sky-caption { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); text-align: center; z-index: 3; } .kf-26 .sky-caption h3 { font-size: 2rem; font-weight: 200; letter-spacing: 8px; color: rgba(200,240,220,0.85); text-shadow: 0 0 40px rgba(0,255,160,0.5); text-transform: uppercase; } .kf-26 .sky-caption p { font-size: 0.75rem; font-weight: 300; color: rgba(180,220,200,0.5); letter-spacing: 3px; margin-top: 4px; } /* ── Scene 2: Card variants ── */ .kf-26 .variants { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; width: 100%; max-width: 960px; } .kf-26 .variant-card { height: 160px; border-radius: 16px; overflow: hidden; position: relative; display: flex; align-items: flex-end; padding: 16px; } /* Variant A: Green only */ .kf-26 .var-a { background: #010308; } .kf-26 .var-a .mini-aurora { position: absolute; inset: 0; background: linear-gradient(160deg, transparent 20%, rgba(0,255,140,0.15) 40%, rgba(0,220,100,0.35) 55%, rgba(0,180,80,0.1) 70%, transparent 85% ); filter: blur(12px); animation: kf-26-varA 6s ease-in-out infinite; } @keyframes kf-26-varA { 0%, 100% { transform: translateX(-10%) skewY(-3deg); opacity: 0.7; } 50% { transform: translateX(10%) skewY(3deg); opacity: 1; } } /* Variant B: Purple + pink */ .kf-26 .var-b { background: #060408; } .kf-26 .var-b .mini-aurora { position: absolute; inset: 0; background: linear-gradient(170deg, transparent 10%, rgba(200,0,255,0.1) 30%, rgba(255,50,150,0.3) 50%, rgba(180,0,220,0.15) 70%, transparent 90% ); filter: blur(14px); animation: kf-26-varB 7s ease-in-out infinite; } @keyframes kf-26-varB { 0%, 100% { transform: rotate(-5deg) scale(1); opacity: 0.8; } 50% { transform: rotate(5deg) scale(1.1); opacity: 1; } } /* Variant C: Blue teal */ .kf-26 .var-c { background: #010408; } .kf-26 .var-c .mini-aurora { position: absolute; inset: 0; background: linear-gradient(150deg, transparent 15%, rgba(0,150,255,0.1) 35%, rgba(0,220,255,0.35) 55%, rgba(0,180,220,0.1) 72%, transparent 88% ); filter: blur(12px); animation: kf-26-varC 8s ease-in-out infinite; } @keyframes kf-26-varC { 0%, 100% { transform: skewX(5deg) translateY(-5%); opacity: 0.8; } 50% { transform: skewX(-5deg) translateY(5%); opacity: 1; } } /* Variant D: Multi-color */ .kf-26 .var-d { background: #020308; } .kf-26 .var-d .mini-aurora { position: absolute; inset: 0; background: conic-gradient(from 200deg at 50% 80%, rgba(0,255,140,0.2) 0deg, rgba(100,80,255,0.2) 60deg, rgba(0,200,255,0.2) 120deg, rgba(0,255,140,0.05) 180deg, transparent 220deg ); filter: blur(16px); animation: kf-26-varD 9s linear infinite; } @keyframes kf-26-varD { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } } .kf-26 .variant-card span { font-size: 0.72rem; color: rgba(255,255,255,0.4); letter-spacing: 2px; text-transform: uppercase; position: relative; z-index: 2; } @media (prefers-reduced-motion: reduce) { .kf-26 .sky::before, .kf-26 .a1, .kf-26 .a2, .kf-26 .a3, .kf-26 .a4, .kf-26 .var-a .mini-aurora, .kf-26 .var-b .mini-aurora, .kf-26 .var-c .mini-aurora, .kf-26 .var-d .mini-aurora { animation: none; opacity: 0.7; } } ``` ### 27. CSS Card Stack Animation **Type:** Pure CSS **Description:** Five card stack animations: flip-through financial deck, fanned playing cards, depth-rise pricing stack, Tinder-style swipe deck and floating credit card stack. **HTML:** ```html

        CSS Card Stack Animations

        $2,450
        Savings Account
        $8,100
        Investment
        $320
        Daily Spend
        Pro Plan
        Everything you need
        Most Popular
        Candidate
        Alex Morgan
        Senior Designer
        94% match
        •••• •••• •••• 4291
        J. Smith
        ◉◉
        ``` **CSS:** ```css @import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;900&display=swap'); .kf-27 *, .kf-27 *::before, .kf-27 *::after { box-sizing: border-box; margin: 0; padding: 0; } .kf-27 { font-family: 'Inter', sans-serif; background: #0f0f14; color: #fff; padding: 48px 24px; min-height: 100vh; display: flex; flex-direction: column; align-items: center; gap: 56px; } .kf-27 h2 { font-size: 1rem; color: #444; letter-spacing: 3px; text-transform: uppercase; } .kf-27 .row { display: flex; flex-wrap: wrap; gap: 60px; justify-content: center; width: 100%; max-width: 960px; } .kf-27 .demo-wrap { display: flex; flex-direction: column; align-items: center; gap: 20px; } .kf-27 .demo-wrap label { font-size: 0.72rem; color: #444; letter-spacing: 2px; text-transform: uppercase; } /* ── 1: Flip Through Stack ── */ .kf-27 .flip-stack { position: relative; width: 240px; height: 160px; } .kf-27 .flip-stack .fc { position: absolute; inset: 0; border-radius: 16px; padding: 20px; display: flex; flex-direction: column; gap: 8px; backface-visibility: hidden; } .kf-27 .flip-stack .fc:nth-child(1) { background: linear-gradient(135deg, #7c6af7, #e91e8c); animation: kf-27-flip 6s ease-in-out infinite; } .kf-27 .flip-stack .fc:nth-child(2) { background: linear-gradient(135deg, #00d4ff, #00d46a); animation: kf-27-flip 6s ease-in-out infinite; animation-delay: 2s; } .kf-27 .flip-stack .fc:nth-child(3) { background: linear-gradient(135deg, #f7c948, #ff6b35); animation: kf-27-flip 6s ease-in-out infinite; animation-delay: 4s; } @keyframes kf-27-flip { 0% { transform: translateY(0) scale(1); z-index: 3; opacity: 1; } 25% { transform: translateY(-10px) scale(1.02); z-index: 3; opacity: 1; } 35% { transform: translateX(120%) rotate(15deg) scale(0.95); z-index: 3; opacity: 0.8; } 40% { transform: translateX(160%) rotate(20deg); z-index: 0; opacity: 0; } 41% { transform: translateX(-10px) rotate(-3deg) scale(0.92); z-index: 1; opacity: 0.5; } 60% { transform: translateX(0) rotate(0deg) scale(0.96); z-index: 1; opacity: 0.8; } 80% { transform: translateX(0) scale(0.98); z-index: 2; } 100% { transform: translateY(0) scale(1); z-index: 3; opacity: 1; } } .kf-27 .fc-amt { font-size: 1.6rem; font-weight: 900; color: rgba(255,255,255,0.95); } .kf-27 .fc-name { font-size: 0.78rem; color: rgba(255,255,255,0.7); font-weight: 500; } /* ── 2: Fanned deck ── */ .kf-27 .fan-stack { position: relative; width: 200px; height: 160px; } .kf-27 .fan-stack .fan-card { position: absolute; width: 140px; height: 100px; border-radius: 12px; top: 30px; left: 30px; display: flex; align-items: center; justify-content: center; font-size: 1.8rem; } .kf-27 .fan-card:nth-child(1) { background: #7c6af7; animation: kf-27-fan1 4s ease-in-out infinite; } .kf-27 .fan-card:nth-child(2) { background: #e91e8c; animation: kf-27-fan2 4s ease-in-out infinite; } .kf-27 .fan-card:nth-child(3) { background: #ff6b35; animation: kf-27-fan3 4s ease-in-out infinite; } .kf-27 .fan-card:nth-child(4) { background: #f7c948; animation: kf-27-fan4 4s ease-in-out infinite; } @keyframes kf-27-fan1 { 0%, 100% { transform: rotate(-20deg) translateX(-20px); z-index: 1; } 50% { transform: rotate(-20deg) translateX(-25px); z-index: 1; } } @keyframes kf-27-fan2 { 0%, 100% { transform: rotate(-7deg) translateX(-6px); z-index: 2; } 50% { transform: rotate(-9deg) translateX(-8px); z-index: 2; } } @keyframes kf-27-fan3 { 0%, 100% { transform: rotate(7deg) translateX(6px); z-index: 3; } 50% { transform: rotate(9deg) translateX(8px); z-index: 3; } } @keyframes kf-27-fan4 { 0%, 100% { transform: rotate(20deg) translateX(20px); z-index: 4; } 50% { transform: rotate(22deg) translateX(22px); z-index: 4; } } /* ── 3: Stacking rise ── */ .kf-27 .rise-stack { position: relative; width: 220px; height: 180px; } .kf-27 .rise-card { position: absolute; width: 100%; height: 120px; border-radius: 14px; padding: 16px; } .kf-27 .rise-card:nth-child(1) { bottom: 0; left: 0; background: #1a1a30; border: 1px solid #2a2a50; transform: scale(0.88) translateY(16px); z-index: 1; animation: kf-27-rise1 5s ease-in-out infinite; } .kf-27 .rise-card:nth-child(2) { bottom: 0; left: 0; background: #1e1e3a; border: 1px solid #303060; transform: scale(0.94) translateY(8px); z-index: 2; animation: kf-27-rise2 5s ease-in-out infinite; } .kf-27 .rise-card:nth-child(3) { bottom: 0; left: 0; background: #24243e; border: 1px solid #7c6af7; z-index: 3; animation: kf-27-rise3 5s ease-in-out infinite; } .kf-27 .rise-card .rc-title { font-size: 1rem; font-weight: 600; color: #7c6af7; } .kf-27 .rise-card .rc-sub { font-size: 0.78rem; color: #666; margin-top: 4px; } .kf-27 .rise-card .rc-tag { display: inline-block; padding: 3px 10px; border-radius: 20px; background: rgba(124,106,247,0.15); font-size: 0.7rem; color: #7c6af7; margin-top: 8px; } @keyframes kf-27-rise1 { 0%, 40%, 100% { transform: scale(0.88) translateY(16px); } 60%, 80% { transform: scale(0.88) translateY(14px); } } @keyframes kf-27-rise2 { 0%, 40%, 100% { transform: scale(0.94) translateY(8px); } 60%, 80% { transform: scale(0.94) translateY(6px); } } @keyframes kf-27-rise3 { 0%, 30%, 100% { transform: translateY(0) scale(1); box-shadow: 0 8px 32px rgba(124,106,247,0.2); } 50% { transform: translateY(-10px) scale(1.02); box-shadow: 0 20px 50px rgba(124,106,247,0.4); } } /* ── 4: Swipe deck ── */ .kf-27 .swipe-stack { position: relative; width: 220px; height: 170px; } .kf-27 .swipe-card { position: absolute; width: 200px; height: 140px; border-radius: 16px; top: 15px; left: 10px; padding: 18px; display: flex; flex-direction: column; justify-content: space-between; } .kf-27 .swipe-card:nth-child(3) { background: #1a1a2a; border: 1px solid #222240; transform: scale(0.84) translateY(12px); z-index: 1; } .kf-27 .swipe-card:nth-child(2) { background: #1e1e32; border: 1px solid #282850; transform: scale(0.92) translateY(6px); z-index: 2; } .kf-27 .swipe-card:nth-child(1) { background: linear-gradient(135deg, #1a1a38, #22223a); border: 1px solid #3a3a6a; z-index: 3; animation: kf-27-swipe 4s cubic-bezier(0.4, 0, 0.2, 1) infinite; } @keyframes kf-27-swipe { 0%, 40% { transform: translateX(0) rotate(0deg); opacity: 1; z-index: 3; } 55% { transform: translateX(160%) rotate(15deg); opacity: 0.6; z-index: 3; } 56% { transform: translateX(-160%) rotate(-10deg); opacity: 0; z-index: 0; } 70% { transform: translateX(0) rotate(0deg); opacity: 1; z-index: 1; } 85% { z-index: 2; } 100% { transform: translateX(0) rotate(0deg); z-index: 3; opacity: 1; } } .kf-27 .sc-header { font-size: 0.72rem; color: #555; letter-spacing: 1px; text-transform: uppercase; } .kf-27 .sc-name { font-size: 1rem; font-weight: 600; color: #ccc; } .kf-27 .sc-role { font-size: 0.78rem; color: #666; } .kf-27 .sc-match { font-size: 0.78rem; color: #00d46a; } /* ── 5: Credit card stack ── */ .kf-27 .credit-stack { position: relative; width: 260px; height: 180px; } .kf-27 .credit-card { position: absolute; width: 240px; height: 150px; border-radius: 16px; padding: 18px 20px; display: flex; flex-direction: column; justify-content: space-between; } .kf-27 .credit-card:nth-child(3) { background: linear-gradient(135deg, #1e1e30, #2a2a45); top: 20px; left: 10px; transform: rotate(-5deg) scale(0.9); z-index: 1; } .kf-27 .credit-card:nth-child(2) { background: linear-gradient(135deg, #241e40, #302855); top: 10px; left: 10px; transform: rotate(-2deg) scale(0.95); z-index: 2; animation: kf-27-credit2 3s ease-in-out infinite; } .kf-27 .credit-card:nth-child(1) { background: linear-gradient(135deg, #7c6af7, #e91e8c); top: 0; left: 10px; z-index: 3; animation: kf-27-credit1 3s ease-in-out infinite; box-shadow: 0 12px 40px rgba(124,106,247,0.4); } @keyframes kf-27-credit1 { 0%, 100% { transform: translateY(0) rotate(0deg); box-shadow: 0 12px 40px rgba(124,106,247,0.4); } 50% { transform: translateY(-6px) rotate(0.5deg); box-shadow: 0 20px 60px rgba(124,106,247,0.6); } } @keyframes kf-27-credit2 { 0%, 100% { transform: rotate(-2deg) scale(0.95); } 50% { transform: rotate(-3deg) scale(0.95) translateY(-2px); } } .kf-27 .cc-chip { width: 36px; height: 26px; background: rgba(255,215,100,0.8); border-radius: 4px; } .kf-27 .cc-num { font-size: 0.9rem; letter-spacing: 3px; color: rgba(255,255,255,0.85); font-family: 'JetBrains Mono', monospace; } .kf-27 .cc-row { display: flex; justify-content: space-between; align-items: flex-end; } .kf-27 .cc-name { font-size: 0.75rem; color: rgba(255,255,255,0.7); letter-spacing: 1px; text-transform: uppercase; } .kf-27 .cc-brand { font-size: 1.4rem; color: rgba(255,255,255,0.5); } @media (prefers-reduced-motion: reduce) { .kf-27 .fc, .kf-27 .fan-card, .kf-27 .rise-card, .kf-27 .swipe-card:nth-child(1), .kf-27 .credit-card { animation: none; } } ``` ### 28. CSS Kinetic Typography Animation **Type:** Pure CSS **Description:** Five kinetic type scenes: stagger letter spring-drop, explode-and-reassemble, sinusoidal wave, scale-pulse mixed-weight headline and RGB-split glitch — pure CSS keyframes. **HTML:** ```html
        KINETIC
        DESIGN.
        WAVES!
        THINK outside THE the BOX
        MOTION
        ``` **CSS:** ```css @import url('https://fonts.googleapis.com/css2?family=Inter:ital,wght@0,200;0,400;0,700;0,900;1,900&family=Bebas+Neue&display=swap'); .kf-28 *, .kf-28 *::before, .kf-28 *::after { box-sizing: border-box; margin: 0; padding: 0; } .kf-28 { font-family: 'Inter', sans-serif; background: #060608; color: #fff; min-height: 100vh; overflow: hidden; display: flex; flex-direction: column; align-items: center; gap: 0; } /* ── Scene 1: Kinetic splash hero ── */ .kf-28 .scene { width: 100%; max-width: 960px; padding: 60px 24px; min-height: 280px; display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden; } /* Scene 1: Stagger letter drop */ .kf-28 .scene-1 { background: #060608; border-bottom: 1px solid #111; } .kf-28 .letter-drop { font-family: 'Bebas Neue', sans-serif; font-size: clamp(3rem, 10vw, 6rem); letter-spacing: 8px; display: flex; gap: 4px; overflow: hidden; } .kf-28 .letter-drop span { display: inline-block; animation: kf-28-drop 3s cubic-bezier(0.34, 1.56, 0.64, 1) infinite; } .kf-28 .letter-drop span:nth-child(1) { color:#7c6af7; animation-delay:0.05s; } .kf-28 .letter-drop span:nth-child(2) { color:#896cf9; animation-delay:0.1s; } .kf-28 .letter-drop span:nth-child(3) { color:#9870fa; animation-delay:0.15s; } .kf-28 .letter-drop span:nth-child(4) { color:#a975fb; animation-delay:0.2s; } .kf-28 .letter-drop span:nth-child(5) { color:#bb79fc; animation-delay:0.25s; } .kf-28 .letter-drop span:nth-child(6) { color:#cd7dfd; animation-delay:0.3s; } .kf-28 .letter-drop span:nth-child(7) { color:#e080fe; animation-delay:0.35s; } @keyframes kf-28-drop { 0%, 60%, 100% { transform: translateY(0); } 15% { transform: translateY(-40px); } 30% { transform: translateY(4px); } 42% { transform: translateY(-10px); } 52% { transform: translateY(2px); } } /* Scene 2: Explode and reassemble */ .kf-28 .scene-2 { background: #080808; border-bottom: 1px solid #111; } .kf-28 .explode-word { font-size: clamp(2rem, 8vw, 4rem); font-weight: 900; letter-spacing: 2px; display: flex; gap: 0; } .kf-28 .explode-word span { display: inline-block; animation: kf-28-explode 4s ease-in-out infinite; } .kf-28 .explode-word span:nth-child(1) { color:#e91e8c; animation-delay:0s; --tx:-120px; --ty:-60px; --r:-90deg; } .kf-28 .explode-word span:nth-child(2) { color:#ee3f9a; animation-delay:0.06s; --tx:-60px; --ty:-90px; --r:45deg; } .kf-28 .explode-word span:nth-child(3) { color:#f356a8; animation-delay:0.12s; --tx:0px; --ty:-100px;--r:-20deg; } .kf-28 .explode-word span:nth-child(4) { color:#f767b4; animation-delay:0.18s; --tx:60px; --ty:-80px; --r:60deg; } .kf-28 .explode-word span:nth-child(5) { color:#fb7cbf; animation-delay:0.24s; --tx:100px; --ty:-50px; --r:-45deg; } .kf-28 .explode-word span:nth-child(6) { color:#fe8ec8; animation-delay:0.3s; --tx:130px; --ty:-70px; --r:80deg; } .kf-28 .explode-word span:nth-child(7) { color:#ffa1d3; animation-delay:0.36s; --tx:80px; --ty:60px; --r:-60deg; } @keyframes kf-28-explode { 0%, 20% { transform: translate(0,0) rotate(0deg) scale(1); opacity: 1; } 45% { transform: translate(var(--tx), var(--ty)) rotate(var(--r)) scale(0.5); opacity: 0; } 55% { transform: translate(var(--tx), var(--ty)) rotate(var(--r)) scale(0.5); opacity: 0; } 80%, 100% { transform: translate(0,0) rotate(0deg) scale(1); opacity: 1; } } /* Scene 3: Wave text */ .kf-28 .scene-3 { background: #06060a; border-bottom: 1px solid #111; } .kf-28 .wave-word { font-size: clamp(2.5rem, 9vw, 5rem); font-weight: 900; display: flex; gap: 2px; font-style: italic; } .kf-28 .wave-word span { display: inline-block; animation: kf-28-wave 2s ease-in-out infinite; } .kf-28 .wave-word span:nth-child(1) { color:#00d4ff; animation-delay:0s; } .kf-28 .wave-word span:nth-child(2) { color:#20d8ff; animation-delay:0.08s; } .kf-28 .wave-word span:nth-child(3) { color:#40dcfe; animation-delay:0.16s; } .kf-28 .wave-word span:nth-child(4) { color:#5fdffe; animation-delay:0.24s; } .kf-28 .wave-word span:nth-child(5) { color:#7fe3fd; animation-delay:0.32s; } .kf-28 .wave-word span:nth-child(6) { color:#9fe6fc; animation-delay:0.40s; } @keyframes kf-28-wave { 0%, 100% { transform: translateY(0) scaleY(1); } 25% { transform: translateY(-20px) scaleY(1.1); } 50% { transform: translateY(0) scaleY(1); } 75% { transform: translateY(8px) scaleY(0.95); } } /* Scene 4: Scale pulse words */ .kf-28 .scene-4 { background: #070709; border-bottom: 1px solid #111; } .kf-28 .scale-words { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; justify-content: center; } .kf-28 .scale-words .sw { font-size: clamp(1.5rem, 5vw, 2.5rem); font-weight: 900; text-transform: uppercase; letter-spacing: 2px; animation: kf-28-scalepulse 3s ease-in-out infinite; } .kf-28 .sw-1 { color: #f7c948; animation-delay: 0s; } .kf-28 .sw-2 { color: #fff; font-size: clamp(0.9rem, 3vw, 1.2rem) !important; animation-delay: 0.5s; font-weight: 300; } .kf-28 .sw-3 { color: #ff6b35; animation-delay: 1s; } .kf-28 .sw-4 { color: #fff; font-size: clamp(0.9rem, 3vw, 1.2rem) !important; animation-delay: 1.5s; font-weight: 300; } .kf-28 .sw-5 { color: #00d46a; animation-delay: 2s; } @keyframes kf-28-scalepulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.1); } } /* Scene 5: Glitch kinetic */ .kf-28 .scene-5 { background: #040406; } .kf-28 .glitch-kine { font-family: 'Bebas Neue', sans-serif; font-size: clamp(3rem, 10vw, 5rem); letter-spacing: 6px; position: relative; color: #fff; } .kf-28 .glitch-kine::before { content: attr(data-text); position: absolute; top: 0; left: 0; color: #e91e8c; animation: kf-28-glitch1 3s linear infinite; clip-path: polygon(0 30%, 100% 30%, 100% 60%, 0 60%); } .kf-28 .glitch-kine::after { content: attr(data-text); position: absolute; top: 0; left: 0; color: #00d4ff; animation: kf-28-glitch2 3s linear infinite; clip-path: polygon(0 60%, 100% 60%, 100% 80%, 0 80%); } @keyframes kf-28-glitch1 { 0%, 85%, 100% { transform: translate(0); } 87% { transform: translate(-4px, 2px); } 89% { transform: translate(4px, -2px); } 91% { transform: translate(-4px, 0); } 93% { transform: translate(3px, 1px); } 95% { transform: translate(0); } } @keyframes kf-28-glitch2 { 0%, 80%, 100% { transform: translate(0); } 82% { transform: translate(4px, -3px); } 84% { transform: translate(-3px, 2px); } 86% { transform: translate(2px, -1px); } 88% { transform: translate(0); } } @media (prefers-reduced-motion: reduce) { .kf-28 .letter-drop span, .kf-28 .explode-word span, .kf-28 .wave-word span, .kf-28 .scale-words .sw, .kf-28 .glitch-kine::before, .kf-28 .glitch-kine::after { animation: none; transform: none; } } ``` ### 29. CSS Morphing Progress Steps Animation **Type:** Pure CSS **Description:** Four animated progress step UI patterns: horizontal step track, radial ring steps, morphing pill steps and animated vertical timeline — all scoped CSS keyframes. **HTML:** ```html

        CSS Morphing Progress Steps

        Account
        Profile
        3
        Payment
        4
        Review
        5
        Launch
        📦
        🚚
        🗺️
        📬
        Set up
        Design
        Build
        Review
        Deploy

        Requirements Gathered

        All project requirements documented and approved.

        Design Approved

        Wireframes and visual design signed off by stakeholders.

        Development in Progress

        Frontend and backend implementation underway.

        4

        QA Testing

        Automated and manual testing pipeline.

        5

        Production Launch

        Deploy to production and monitor.

        ``` **CSS:** ```css @import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap'); .kf-29 *, .kf-29 *::before, .kf-29 *::after { box-sizing: border-box; margin: 0; padding: 0; } .kf-29 { font-family: 'Inter', sans-serif; background: #09090f; color: #fff; padding: 48px 24px; min-height: 100vh; display: flex; flex-direction: column; align-items: center; gap: 48px; } .kf-29 h2 { font-size: 1rem; color: #444; letter-spacing: 3px; text-transform: uppercase; } /* ── 1: Horizontal step progress ── */ .kf-29 .h-steps { width: 100%; max-width: 700px; } .kf-29 .step-track { display: flex; align-items: center; position: relative; } .kf-29 .step-node { position: relative; display: flex; flex-direction: column; align-items: center; gap: 10px; z-index: 2; } .kf-29 .node-circle { width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.85rem; font-weight: 600; position: relative; transition: all 0.3s; } .kf-29 .node-label { font-size: 0.72rem; color: #555; letter-spacing: 0.5px; text-align: center; max-width: 80px; } .kf-29 .step-line { flex: 1; height: 3px; background: #1e1e2a; position: relative; margin: 0 -2px; margin-bottom: 28px; } .kf-29 .step-line::after { content: ''; position: absolute; top: 0; left: 0; height: 100%; border-radius: 2px; } /* Completed step */ .kf-29 .step-node.done .node-circle { background: #7c6af7; color: #fff; box-shadow: 0 0 0 0 rgba(124,106,247,0.4); animation: kf-29-nodeshine 3s ease-in-out infinite; } @keyframes kf-29-nodeshine { 0%, 100% { box-shadow: 0 0 0 0 rgba(124,106,247,0.4); } 50% { box-shadow: 0 0 0 8px rgba(124,106,247,0); } } .kf-29 .step-node.done .node-label { color: #7c6af7; } /* Active step */ .kf-29 .step-node.active .node-circle { background: transparent; border: 3px solid #7c6af7; color: #7c6af7; animation: kf-29-activepulse 1.5s ease-in-out infinite; } @keyframes kf-29-activepulse { 0%, 100% { border-color: #7c6af7; box-shadow: 0 0 0 0 rgba(124,106,247,0.5); } 50% { border-color: #a898fc; box-shadow: 0 0 0 6px rgba(124,106,247,0); } } .kf-29 .step-node.active .node-label { color: #ccc; } /* Pending step */ .kf-29 .step-node.pending .node-circle { background: #151525; border: 2px solid #2a2a40; color: #444; } /* Line fills */ .kf-29 .step-line.done::after { background: #7c6af7; width: 100%; } .kf-29 .step-line.active::after { background: linear-gradient(90deg, #7c6af7, #b8acff); animation: kf-29-linefill 2s ease-in-out infinite alternate; } @keyframes kf-29-linefill { 0% { width: 30%; } 100% { width: 85%; } } .kf-29 .step-line.pending::after { width: 0; } /* ── 2: Circular / radial progress ── */ .kf-29 .radial-steps { display: flex; gap: 32px; flex-wrap: wrap; justify-content: center; } .kf-29 .radial-step { display: flex; flex-direction: column; align-items: center; gap: 10px; } .kf-29 .radial-ring { position: relative; width: 80px; height: 80px; } .kf-29 .radial-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); } .kf-29 .ring-bg { fill: none; stroke: #1e1e30; stroke-width: 6; } .kf-29 .ring-fill { fill: none; stroke-width: 6; stroke-linecap: round; stroke-dasharray: 220; } .kf-29 .ring-fill.s1 { stroke: #7c6af7; stroke-dashoffset: 0; animation: kf-29-ring1 3s ease-in-out infinite; } .kf-29 .ring-fill.s2 { stroke: #00d4ff; stroke-dashoffset: 55; animation: kf-29-ring2 3s ease-in-out infinite; } .kf-29 .ring-fill.s3 { stroke: #ff6b35; stroke-dashoffset: 110; animation: kf-29-ring3 3s ease-in-out infinite; } .kf-29 .ring-fill.s4 { stroke: #f7c948; stroke-dashoffset: 165; animation: kf-29-ring4 3s ease-in-out infinite; } @keyframes kf-29-ring1 { 0%,100%{stroke-dashoffset:0} 50%{stroke-dashoffset:-10} } @keyframes kf-29-ring2 { 0%,100%{stroke-dashoffset:55} 50%{stroke-dashoffset:45} } @keyframes kf-29-ring3 { 0%,100%{stroke-dashoffset:110} 50%{stroke-dashoffset:90} } @keyframes kf-29-ring4 { 0%,100%{stroke-dashoffset:165} 50%{stroke-dashoffset:155} } .kf-29 .ring-icon { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); font-size: 1.2rem; } .kf-29 .radial-step label { font-size: 0.7rem; color: #555; letter-spacing: 1px; text-align: center; text-transform: uppercase; } /* ── 3: Morphing pill steps ── */ .kf-29 .pill-steps { display: flex; gap: 8px; align-items: center; } .kf-29 .pill { height: 36px; border-radius: 18px; display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 0.8rem; font-weight: 500; overflow: hidden; white-space: nowrap; transition: all 0.4s; } .kf-29 .pill.done-p { background: rgba(124,106,247,0.15); border: 1px solid #7c6af7; color: #7c6af7; padding: 0 16px; animation: kf-29-pilldone 4s ease infinite; } .kf-29 .pill.active-p { background: #7c6af7; color: #fff; padding: 0 20px; animation: kf-29-pillactive 4s ease infinite; box-shadow: 0 4px 20px rgba(124,106,247,0.4); } .kf-29 .pill.pending-p { background: #111125; border: 1px solid #1e1e35; color: #444; padding: 0 14px; animation: kf-29-pillpending 4s ease infinite; } @keyframes kf-29-pilldone { 0%, 100% { transform: scale(1); } 50% { transform: scale(0.98); } } @keyframes kf-29-pillactive { 0%, 100% { box-shadow: 0 4px 20px rgba(124,106,247,0.4); transform: scale(1); } 50% { box-shadow: 0 6px 30px rgba(124,106,247,0.6); transform: scale(1.03); } } @keyframes kf-29-pillpending { 0%, 100% { opacity: 0.6; } 50% { opacity: 0.8; } } .kf-29 .pill-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex-shrink: 0; } /* ── 4: Vertical timeline steps ── */ .kf-29 .v-steps { display: flex; flex-direction: column; gap: 0; position: relative; width: 100%; max-width: 440px; } .kf-29 .v-step { display: flex; gap: 20px; position: relative; } .kf-29 .v-step-left { display: flex; flex-direction: column; align-items: center; width: 40px; flex-shrink: 0; } .kf-29 .v-dot { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.85rem; flex-shrink: 0; z-index: 2; } .kf-29 .v-connector { width: 2px; flex: 1; min-height: 32px; margin: 2px 0; } .kf-29 .v-step-right { padding: 4px 0 32px; } .kf-29 .v-step-right h4 { font-size: 0.9rem; font-weight: 600; color: #ccc; margin-bottom: 4px; } .kf-29 .v-step-right p { font-size: 0.78rem; color: #555; line-height: 1.5; } /* done */ .kf-29 .v-step.done .v-dot { background: #7c6af7; color: #fff; animation: kf-29-vdoneshine 3s ease-in-out infinite; } @keyframes kf-29-vdoneshine { 0%,100%{box-shadow:0 0 0 0 rgba(124,106,247,0.4)} 50%{box-shadow:0 0 0 6px rgba(124,106,247,0)} } .kf-29 .v-step.done .v-connector { background: linear-gradient(180deg, #7c6af7, #a898fc); } .kf-29 .v-step.done .v-step-right h4 { color: #fff; } /* active */ .kf-29 .v-step.active-v .v-dot { background: transparent; border: 3px solid #7c6af7; color: #7c6af7; animation: kf-29-activepulse 1.5s ease-in-out infinite; } .kf-29 .v-step.active-v .v-connector { background: linear-gradient(180deg, #a898fc, transparent); animation: kf-29-vline 2s ease infinite alternate; } @keyframes kf-29-vline { 0% { opacity: 0.4; } 100% { opacity: 1; } } /* pending */ .kf-29 .v-step.pend .v-dot { background: #111120; border: 2px solid #1e1e30; color: #333; } .kf-29 .v-step.pend .v-connector { background: #1a1a28; } .kf-29 .v-step.pend .v-step-right h4 { color: #444; } @media (prefers-reduced-motion: reduce) { .kf-29 .node-circle, .kf-29 .step-line.active::after, .kf-29 .ring-fill, .kf-29 .pill, .kf-29 .v-dot, .kf-29 .v-connector { animation: none; } .kf-29 .step-line.active::after { width: 60%; } } ``` ### 30. CSS Animated Gradient Mesh Background **Type:** Pure CSS **Description:** Animated gradient mesh using floating radial-gradient orbs on a dark base: full hero scene, four colour-variant cards (purple, pink, green, gold) and a rainbow gradient text strip. **HTML:** ```html

        CSS Animated Gradient Mesh

        Gradient Mesh

        pure CSS · no canvas · no SVG

        Purple · Cyan
        Analytics
        Pink · Orange
        Creative
        Green · Teal
        Growth
        Gold · Warm
        Premium
        VIVID
        ``` **CSS:** ```css @import url('https://fonts.googleapis.com/css2?family=Inter:wght@200;300;400;700;900&display=swap'); .kf-30 *, .kf-30 *::before, .kf-30 *::after { box-sizing: border-box; margin: 0; padding: 0; } .kf-30 { font-family: 'Inter', sans-serif; background: #050508; color: #fff; padding: 48px 24px; min-height: 100vh; display: flex; flex-direction: column; align-items: center; gap: 40px; } .kf-30 h2 { font-size: 1rem; color: #333; letter-spacing: 3px; text-transform: uppercase; font-weight: 300; } /* ── 1: Full hero gradient mesh ── */ .kf-30 .hero-mesh { width: 100%; max-width: 960px; min-height: 320px; border-radius: 24px; overflow: hidden; position: relative; display: flex; align-items: center; justify-content: center; } .kf-30 .mesh-bg { position: absolute; inset: 0; background: #0a0a14; } /* Floating gradient orbs */ .kf-30 .orb { position: absolute; border-radius: 50%; filter: blur(60px); mix-blend-mode: screen; } .kf-30 .orb-1 { width: 400px; height: 400px; background: radial-gradient(circle, rgba(124,106,247,0.5) 0%, transparent 70%); top: -100px; left: -80px; animation: kf-30-orb1 8s ease-in-out infinite; } .kf-30 .orb-2 { width: 350px; height: 350px; background: radial-gradient(circle, rgba(233,30,140,0.4) 0%, transparent 70%); bottom: -80px; right: -60px; animation: kf-30-orb2 10s ease-in-out infinite; } .kf-30 .orb-3 { width: 300px; height: 300px; background: radial-gradient(circle, rgba(0,212,255,0.35) 0%, transparent 70%); top: 30%; left: 40%; transform: translate(-50%, -50%); animation: kf-30-orb3 7s ease-in-out infinite; } .kf-30 .orb-4 { width: 250px; height: 250px; background: radial-gradient(circle, rgba(0,212,106,0.3) 0%, transparent 70%); bottom: 10%; left: 20%; animation: kf-30-orb4 12s ease-in-out infinite; } @keyframes kf-30-orb1 { 0%, 100% { transform: translate(0, 0) scale(1); } 33% { transform: translate(80px, 60px) scale(1.1); } 66% { transform: translate(-40px, 80px) scale(0.9); } } @keyframes kf-30-orb2 { 0%, 100% { transform: translate(0, 0) scale(1); } 40% { transform: translate(-100px, -60px) scale(1.15); } 70% { transform: translate(50px, -40px) scale(0.85); } } @keyframes kf-30-orb3 { 0%, 100% { transform: translate(-50%, -50%) scale(1); } 50% { transform: translate(-40%, -60%) scale(1.2); } } @keyframes kf-30-orb4 { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(80px, -50px) scale(1.1); } } .kf-30 .hero-content { position: relative; z-index: 2; text-align: center; } .kf-30 .hero-content h3 { font-size: clamp(2rem, 6vw, 3.5rem); font-weight: 900; letter-spacing: 2px; background: linear-gradient(135deg, #fff 0%, rgba(255,255,255,0.7) 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; } .kf-30 .hero-content p { font-size: 1rem; color: rgba(255,255,255,0.45); margin-top: 8px; letter-spacing: 2px; font-weight: 300; } /* ── 2: Card variants ── */ .kf-30 .cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; width: 100%; max-width: 960px; } .kf-30 .mesh-card { border-radius: 20px; overflow: hidden; position: relative; min-height: 200px; padding: 24px; display: flex; flex-direction: column; justify-content: flex-end; } .kf-30 .mesh-card .card-bg { position: absolute; inset: 0; } .kf-30 .mesh-card .card-orb { position: absolute; border-radius: 50%; filter: blur(40px); mix-blend-mode: screen; } /* Card A: Purple + cyan */ .kf-30 .mc-a .card-bg { background: #080814; } .kf-30 .mc-a .card-orb:nth-child(2) { width: 200px; height: 200px; background: rgba(124,106,247,0.6); top: -60px; left: -60px; animation: kf-30-ca1 6s ease-in-out infinite; } .kf-30 .mc-a .card-orb:nth-child(3) { width: 150px; height: 150px; background: rgba(0,212,255,0.4); bottom: -40px; right: -40px; animation: kf-30-ca2 8s ease-in-out infinite; } @keyframes kf-30-ca1 { 0%,100%{transform:translate(0,0)} 50%{transform:translate(40px,30px)} } @keyframes kf-30-ca2 { 0%,100%{transform:translate(0,0)} 50%{transform:translate(-30px,-40px)} } /* Card B: Pink + orange */ .kf-30 .mc-b .card-bg { background: #0e0810; } .kf-30 .mc-b .card-orb:nth-child(2) { width: 180px; height: 180px; background: rgba(233,30,140,0.6); top: -50px; right: -50px; animation: kf-30-cb1 7s ease-in-out infinite; } .kf-30 .mc-b .card-orb:nth-child(3) { width: 140px; height: 140px; background: rgba(255,107,53,0.5); bottom: -30px; left: -30px; animation: kf-30-cb2 9s ease-in-out infinite; } @keyframes kf-30-cb1 { 0%,100%{transform:translate(0,0) scale(1)} 50%{transform:translate(-40px,30px) scale(1.1)} } @keyframes kf-30-cb2 { 0%,100%{transform:translate(0,0)} 50%{transform:translate(40px,-30px)} } /* Card C: Green + teal */ .kf-30 .mc-c .card-bg { background: #050e0a; } .kf-30 .mc-c .card-orb:nth-child(2) { width: 200px; height: 200px; background: rgba(0,212,106,0.5); bottom: -60px; left: -40px; animation: kf-30-cc1 8s ease-in-out infinite; } .kf-30 .mc-c .card-orb:nth-child(3) { width: 160px; height: 160px; background: rgba(0,180,220,0.4); top: -40px; right: -40px; animation: kf-30-cc2 6s ease-in-out infinite; } @keyframes kf-30-cc1 { 0%,100%{transform:translate(0,0)} 50%{transform:translate(50px,-40px)} } @keyframes kf-30-cc2 { 0%,100%{transform:translate(0,0)} 50%{transform:translate(-40px,40px)} } /* Card D: Gold + warm */ .kf-30 .mc-d .card-bg { background: #0d0a05; } .kf-30 .mc-d .card-orb:nth-child(2) { width: 220px; height: 220px; background: rgba(247,201,72,0.5); top: -80px; right: -40px; animation: kf-30-cd1 9s ease-in-out infinite; } .kf-30 .mc-d .card-orb:nth-child(3) { width: 160px; height: 160px; background: rgba(255,140,60,0.4); bottom: -40px; left: -20px; animation: kf-30-cd2 7s ease-in-out infinite; } @keyframes kf-30-cd1 { 0%,100%{transform:translate(0,0) scale(1)} 50%{transform:translate(-40px,50px) scale(0.9)} } @keyframes kf-30-cd2 { 0%,100%{transform:translate(0,0)} 50%{transform:translate(50px,-30px)} } .kf-30 .card-label { position: relative; z-index: 2; font-size: 0.72rem; color: rgba(255,255,255,0.4); letter-spacing: 2px; text-transform: uppercase; } .kf-30 .card-title { position: relative; z-index: 2; font-size: 1.2rem; font-weight: 700; color: rgba(255,255,255,0.85); margin-top: 4px; } /* ── 3: Gradient text animation ── */ .kf-30 .gradient-text-demo { text-align: center; } .kf-30 .grad-text { font-size: clamp(2rem, 8vw, 4rem); font-weight: 900; background: linear-gradient(90deg, #7c6af7, #e91e8c, #ff6b35, #f7c948, #00d46a, #00d4ff, #7c6af7 ); background-size: 200% auto; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; animation: kf-30-gradshift 4s linear infinite; letter-spacing: 4px; } @keyframes kf-30-gradshift { 0% { background-position: 0% center; } 100% { background-position: 200% center; } } @media (prefers-reduced-motion: reduce) { .kf-30 .orb, .kf-30 .card-orb, .kf-30 .grad-text { animation: none; } } ``` --- ## 20 CSS Link Hover Effect Designs URL: https://codefronts.com/motion/css-link-effects/ Description: 20 free CSS link hover effects — animated underlines, glitches, neon flickers, marker highlights, 3D flips and more, with copy-paste code. Demo count: 20 ### 01. Squiggly Underline **Type:** Pure CSS **Description:** Hand-drawn-look squiggly SVG underline that draws in beneath the link on hover via stroke-dasharray. Perfect for navigation, blog headers, and personality-forward sites. **HTML:** ```html ``` **CSS:** ```css .cle-squig-nav { display: flex; gap: 28px; } .cle-squig { position: relative; padding-bottom: 14px; color: #c5e8ff; font: 600 18px/1.2 "Caveat", "Comic Sans MS", cursive; text-decoration: none; transition: color 0.25s; } .cle-squig.is-active { color: #ddff8a; } .cle-squig::after { content: ""; position: absolute; left: -2px; right: -2px; bottom: 0; height: 10px; background-image: url("data:image/svg+xml;utf8,"); background-repeat: no-repeat; background-size: 0% 100%; background-position: left center; transition: background-size 0.55s cubic-bezier(0.65, 0, 0.35, 1); } .cle-squig:hover::after, .cle-squig:focus-visible::after, .cle-squig.is-active::after { background-size: 100% 100%; } ``` ### 02. Tilde Morph **Type:** Pure CSS **Description:** A straight underline morphs into a tilde-style wave on hover via background-image swap. Editorial inline-menu pattern — line on rest, wave on attention. **HTML:** ```html

        Root Perfect Fifth Perfect Fourth Major Third

        ``` **CSS:** ```css .cle-tilde-row { margin: 0; display: flex; gap: 20px; flex-wrap: wrap; } .cle-tilde { position: relative; padding-bottom: 8px; color: #ffd479; font: 500 15px/1.2 Georgia, "Times New Roman", serif; text-decoration: none; background-image: linear-gradient(#ffd479, #ffd479); background-repeat: no-repeat; background-size: 100% 1px; background-position: 0 100%; transition: background-image 0.4s, background-size 0.4s; } .cle-tilde:hover, .cle-tilde:focus-visible { background-image: url("data:image/svg+xml;utf8,"); background-size: 100% 6px; } ``` ### 03. Dotted Focus Ring **Type:** Pure CSS **Description:** A dotted box outline appears around the link on hover, paired with a blinking trailing caret. Reads as terminal/CLI focus — distinctive without competing with the text. **HTML:** ```html Let's Goooo! ``` **CSS:** ```css .cle-dot { display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px; color: #ddff8a; font: 700 16px/1.2 system-ui, sans-serif; text-decoration: underline; text-decoration-color: #ddff8a; text-decoration-thickness: 2px; text-underline-offset: 4px; border: 1.5px dotted transparent; border-radius: 3px; transition: border-color 0.2s; } .cle-dot-bullet { color: #ddff8a; font-size: 14px; } .cle-dot-caret { opacity: 0; color: #ddff8a; font-weight: 700; transition: opacity 0.2s; } .cle-dot:hover, .cle-dot:focus-visible { border-color: #ddff8a; } .cle-dot:hover .cle-dot-caret, .cle-dot:focus-visible .cle-dot-caret { opacity: 1; animation: cle-dot-blink 0.9s steps(1) infinite; } @keyframes cle-dot-blink { 0%, 50% { opacity: 1; } 51%, 100% { opacity: 0; } } @media (prefers-reduced-motion: reduce) { .cle-dot:hover .cle-dot-caret, .cle-dot:focus-visible .cle-dot-caret { animation: none; opacity: 1; } } ``` ### 04. Encircled **Type:** Pure CSS **Description:** An SVG ellipse strokes itself around the linked text on hover via stroke-dasharray — a pen circling a phrase. Calm, editorial, and impossible to miss. **HTML:** ```html

        Check out the link here

        ``` **CSS:** ```css .cle-circle-bg { padding: 24px; background: #f4f5f9; border-radius: 10px; } .cle-circle-wrap { margin: 0; font: 500 16px/1.5 system-ui, sans-serif; color: #2a2a3e; } .cle-circle { position: relative; display: inline-block; padding: 0 6px; color: #6b8cff; font-weight: 600; text-decoration: none; } .cle-circle-svg { position: absolute; inset: -4px -2px; width: calc(100% + 4px); height: calc(100% + 8px); color: #6b8cff; pointer-events: none; overflow: visible; } .cle-circle-svg ellipse { stroke-dasharray: 200; stroke-dashoffset: 200; transform-origin: center; transform: rotate(-3deg); transition: stroke-dashoffset 0.7s cubic-bezier(0.65, 0, 0.35, 1); } .cle-circle:hover .cle-circle-svg ellipse, .cle-circle:focus-visible .cle-circle-svg ellipse { stroke-dashoffset: 0; } ``` ### 05. Chevron Companion **Type:** Pure CSS **Description:** On hover the underline retracts from right-to-left while a chevron arrow "draws in" via stroke-dasharray with a spring overshoot. Adapted from Aaron Iker — works on multi-line links thanks to background-image underline. **HTML:** ```html ``` **CSS:** ```css .cle-chev-bg { padding: 28px 32px; background: #f6f8ff; border-radius: 10px; } .cle-chev-stack { display: flex; flex-direction: column; gap: 22px; align-items: flex-start; } .cle-chev { --line: #646b8c; --color: #2b3044; --background-size: 100%; --background-delay: 0.15s; --stroke-dashoffset: 46; --stroke-duration: 0.15s; --stroke-easing: linear; --stroke-delay: 0s; position: relative; display: inline; color: var(--color); font: 500 16px/20px "Inter", system-ui, sans-serif; text-decoration: none; } .cle-chev span { background-image: linear-gradient(0deg, var(--line) 0%, var(--line) 100%); background-position: 100% 100%; background-repeat: no-repeat; background-size: var(--background-size) 1px; transition: background-size 0.2s linear var(--background-delay); transform: translateZ(0); } .cle-chev-arrow { vertical-align: top; display: inline; line-height: 1; width: 13px; height: 20px; position: relative; left: -2px; fill: none; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1px; stroke: var(--line); stroke-dasharray: 7.95 30; stroke-dashoffset: var(--stroke-dashoffset); transition: stroke-dashoffset var(--stroke-duration) var(--stroke-easing) var(--stroke-delay); } .cle-chev:hover, .cle-chev:focus-visible { --background-size: 0%; --background-delay: 0s; --stroke-dashoffset: 26; --stroke-duration: 0.3s; --stroke-easing: cubic-bezier(0.3, 1.5, 0.5, 1); --stroke-delay: 0.195s; } .cle-chev-multi { max-width: 180px; } ``` ### 06. Cursor Blink Underline **Type:** Pure CSS **Description:** Link text stays solid; only a CLI-style cursor caret bar underneath blinks at the exact 60bpm cadence terminals use. The link reads as "ready for input" without any text flicker. **HTML:** ```html Open editor ``` **CSS:** ```css .cle-curblink { position: relative; display: inline-block; padding-bottom: 6px; color: #00e5ff; font: 600 16px/1.2 ui-monospace, "SF Mono", monospace; text-decoration: none; letter-spacing: 0.02em; transition: color 0.2s, text-shadow 0.25s; } .cle-curblink::after { content: ""; position: absolute; left: 0; bottom: 0; width: 100%; height: 2px; background: #00e5ff; transform-origin: left; animation: cle-curblink-pulse 1s steps(1, end) infinite; } .cle-curblink:hover, .cle-curblink:focus-visible { color: #fff; text-shadow: 0 0 12px rgba(0, 229, 255, 0.55); } .cle-curblink:hover::after, .cle-curblink:focus-visible::after { background: #fff; box-shadow: 0 0 8px rgba(0, 229, 255, 0.7); } @keyframes cle-curblink-pulse { 0%, 50% { opacity: 1; } 51%, 100% { opacity: 0; } } @media (prefers-reduced-motion: reduce) { .cle-curblink::after { animation: none; opacity: 1; } } ``` ### 07. Neon Sign Flicker **Type:** Pure CSS **Description:** On hover the link flickers like a faulty neon sign powering on — irregular opacity stutters via non-uniform steps() keyframes for ~1 second, then settles into a steady glow. Finite, intentional, premium. **HTML:** ```html VACANCY ``` **CSS:** ```css .cle-neonblink { display: inline-block; padding: 6px 18px; color: #ff6c8a; font: 700 17px/1.2 "Courier New", monospace; letter-spacing: 0.18em; text-decoration: none; text-shadow: 0 0 8px rgba(255, 108, 138, 0.4); border: 1.5px solid rgba(255, 108, 138, 0.4); border-radius: 4px; background: #15081a; transition: color 0.2s, border-color 0.2s, background 0.3s; } .cle-neonblink:hover, .cle-neonblink:focus-visible { color: #ffe1ea; border-color: #ff6c8a; background: #1f0d24; animation: cle-neonblink-flicker 1.1s steps(1, end); } @keyframes cle-neonblink-flicker { 0% { opacity: 1; text-shadow: none; } 3% { opacity: 0.2; text-shadow: none; } 6% { opacity: 1; text-shadow: 0 0 14px #ff6c8a, 0 0 4px #fff; } 10% { opacity: 0.4; text-shadow: none; } 13% { opacity: 1; text-shadow: 0 0 14px #ff6c8a, 0 0 4px #fff; } 18% { opacity: 0.1; text-shadow: none; } 22% { opacity: 1; text-shadow: 0 0 14px #ff6c8a, 0 0 4px #fff; } 35% { opacity: 0.5; text-shadow: 0 0 8px #ff6c8a; } 38% { opacity: 1; text-shadow: 0 0 18px #ff6c8a, 0 0 6px #fff; } 55% { opacity: 0.6; text-shadow: 0 0 6px #ff6c8a; } 58% { opacity: 1; text-shadow: 0 0 22px #ff6c8a, 0 0 8px #fff; } 100% { opacity: 1; text-shadow: 0 0 22px #ff6c8a, 0 0 8px #fff; } } @media (prefers-reduced-motion: reduce) { .cle-neonblink:hover, .cle-neonblink:focus-visible { animation: none; text-shadow: 0 0 22px #ff6c8a, 0 0 8px #fff; } } ``` ### 08. Heartbeat Pulse **Type:** Pure CSS **Description:** A leading dot pulses with a real medical-grade heartbeat rhythm — lub-DUB-pause-lub-DUB-pause via a multi-keyframe @keyframes. The link itself stays static. Reads as live-signal / new content. **HTML:** ```html Live updates ``` **CSS:** ```css .cle-heartbeat { display: inline-flex; align-items: center; gap: 10px; padding: 4px 6px; color: #f0eeff; font: 600 15px/1.2 system-ui, sans-serif; text-decoration: none; border-bottom: 1px solid transparent; transition: border-color 0.25s, color 0.25s; } .cle-heartbeat-dot { position: relative; width: 9px; height: 9px; border-radius: 50%; background: #ff3d6e; animation: cle-heartbeat-thump 1.6s ease-in-out infinite; flex-shrink: 0; } .cle-heartbeat-dot::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: inherit; animation: cle-heartbeat-ring 1.6s ease-out infinite; } .cle-heartbeat:hover, .cle-heartbeat:focus-visible { color: #fff; border-bottom-color: rgba(255, 61, 110, 0.5); } /* Real heartbeat curve: lub (small bump) → DUB (big bump) → long pause */ @keyframes cle-heartbeat-thump { 0% { transform: scale(1); } 10% { transform: scale(1.18); } 20% { transform: scale(1); } 30% { transform: scale(1.32); } 45% { transform: scale(1); } 100% { transform: scale(1); } } @keyframes cle-heartbeat-ring { 0% { transform: scale(1); opacity: 0; } 30% { opacity: 0.55; } 100% { transform: scale(3); opacity: 0; } } @media (prefers-reduced-motion: reduce) { .cle-heartbeat-dot, .cle-heartbeat-dot::after { animation: none; } } ``` ### 09. Reveal Sweep **Type:** Pure CSS **Description:** A thin gradient line sweeps across the link from left to right on hover, then settles as a permanent underline. Two-stage motion in a single hover. **HTML:** ```html Read the article ``` **CSS:** ```css .cle-sweep { position: relative; display: inline-block; color: #f0eeff; font: 600 16px/1.4 system-ui, sans-serif; text-decoration: none; padding-bottom: 6px; overflow: hidden; } /* Permanent underline that draws in from the left */ .cle-sweep::before { content: ""; position: absolute; left: 0; bottom: 0; width: 100%; height: 1.5px; background: #7c6cff; transform: scaleX(0); transform-origin: left center; transition: transform 0.5s cubic-bezier(0.65, 0, 0.35, 1); } .cle-sweep:hover::before, .cle-sweep:focus-visible::before { transform: scaleX(1); } /* Bright gradient highlight that sweeps across once on hover */ .cle-sweep::after { content: ""; position: absolute; left: 0; bottom: 0; width: 60%; height: 1.5px; background: linear-gradient(90deg, transparent, #fff 50%, transparent); transform: translateX(-100%); opacity: 0; transition: transform 0.7s cubic-bezier(0.65, 0, 0.35, 1), opacity 0.2s; pointer-events: none; } .cle-sweep:hover::after, .cle-sweep:focus-visible::after { transform: translateX(280%); opacity: 1; } ``` ### 10. Letter Push **Type:** Pure CSS **Description:** Each letter shifts down 2px on hover with a tiny per-letter stagger via :nth-child — a wave that ripples through the word. **HTML:** ```html Discover ``` **CSS:** ```css .cle-push { display: inline-flex; color: #c4b5fd; font: 700 18px/1.2 system-ui, sans-serif; text-decoration: none; letter-spacing: 0.02em; border-bottom: 1.5px solid rgba(124, 108, 255, 0.4); padding-bottom: 3px; transition: border-color 0.25s; } .cle-push:hover { border-bottom-color: #7c6cff; } .cle-push span { display: inline-block; transition: transform 0.35s cubic-bezier(0.65, 0, 0.35, 1), color 0.25s; } .cle-push:hover span { color: #fff; transform: translateY(-3px); } .cle-push:hover span:nth-child(1) { transition-delay: 0s; } .cle-push:hover span:nth-child(2) { transition-delay: 0.04s; } .cle-push:hover span:nth-child(3) { transition-delay: 0.08s; } .cle-push:hover span:nth-child(4) { transition-delay: 0.12s; } .cle-push:hover span:nth-child(5) { transition-delay: 0.16s; } .cle-push:hover span:nth-child(6) { transition-delay: 0.2s; } .cle-push:hover span:nth-child(7) { transition-delay: 0.24s; } .cle-push:hover span:nth-child(8) { transition-delay: 0.28s; } ``` ### 11. Marker Highlighter **Type:** Pure CSS **Description:** A pale highlight expands from 0% to 100% width behind the text on hover, with a hand-drawn-look SVG fill. Reads as a real marker pen, not a geometric block. **HTML:** ```html

        Try our brand new editor today.

        ``` **CSS:** ```css .cle-marker-wrap { margin: 0; font: 500 16px/1.5 system-ui, sans-serif; color: #d8d6f0; } .cle-marker { position: relative; display: inline-block; padding: 1px 4px; color: #fff; font-weight: 600; text-decoration: none; z-index: 0; } .cle-marker::before { content: ""; position: absolute; inset: 0; background-image: url("data:image/svg+xml;utf8,"); background-repeat: no-repeat; background-size: 0% 100%; background-position: left center; transition: background-size 0.5s cubic-bezier(0.65, 0, 0.35, 1); z-index: -1; } .cle-marker:hover::before, .cle-marker:focus-visible::before { background-size: 100% 100%; } ``` ### 12. Background Slide **Type:** Pure CSS **Description:** A solid colour slides up from below the baseline, covering the link as the text colour inverts via mix-blend-mode: difference. Reads like a film cut. **HTML:** ```html WATCH FILM ``` **CSS:** ```css .cle-slide { position: relative; display: inline-block; padding: 4px 10px; color: #f0eeff; font: 700 13px/1.2 ui-monospace, monospace; letter-spacing: 0.18em; text-decoration: none; overflow: hidden; isolation: isolate; } .cle-slide span { position: relative; mix-blend-mode: difference; color: #fff; z-index: 1; } .cle-slide::before { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 0; background: #fff; transition: height 0.4s cubic-bezier(0.65, 0, 0.35, 1); z-index: 0; } .cle-slide:hover::before, .cle-slide:focus-visible::before { height: 100%; } ``` ### 13. Crosshair Brackets **Type:** Pure CSS **Description:** Mono [ and ] brackets appear on either side of the link on hover, drawing in via a tiny scale-overshoot. Terminal/hacker aesthetic — perfect for dev portfolios. **HTML:** ```html execute() ``` **CSS:** ```css .cle-bracket { position: relative; display: inline-block; padding: 0 16px; color: #00e5ff; font: 700 16px/1.2 ui-monospace, monospace; letter-spacing: 0.04em; text-decoration: none; transition: text-shadow 0.2s; } .cle-bracket::before, .cle-bracket::after { position: absolute; top: 50%; font: inherit; color: #00e5ff; opacity: 0; transform: translateY(-50%) scale(0.4); transition: opacity 0.25s ease, transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1); } .cle-bracket::before { content: "["; left: 0; } .cle-bracket::after { content: "]"; right: 0; } .cle-bracket:hover { text-shadow: 0 0 12px rgba(0, 229, 255, 0.55); } .cle-bracket:hover::before, .cle-bracket:hover::after, .cle-bracket:focus-visible::before, .cle-bracket:focus-visible::after { opacity: 1; transform: translateY(-50%) scale(1); } ``` ### 14. Glitch Split **Type:** Pure CSS **Description:** RGB-channel split shudders across the text on hover (cyan + magenta offsets via text-shadow), reading as video corruption. Honours prefers-reduced-motion. **HTML:** ```html System.exit(0) ``` **CSS:** ```css .cle-glitch { position: relative; display: inline-block; color: #f0eeff; font: 700 16px/1.2 ui-monospace, monospace; text-decoration: none; letter-spacing: 0.02em; } .cle-glitch:hover, .cle-glitch:focus-visible { animation: cle-glitch-shake 0.35s steps(2) infinite; text-shadow: 2px 0 #ff3d6e, -2px 0 #00e5ff, 0 0 12px rgba(255, 255, 255, 0.2); } @keyframes cle-glitch-shake { 0% { transform: translate(0, 0); } 25% { transform: translate(-1px, 1px); } 50% { transform: translate(1px, -1px); } 75% { transform: translate(-1px, -1px); } 100% { transform: translate(1px, 1px); } } @media (prefers-reduced-motion: reduce) { .cle-glitch:hover, .cle-glitch:focus-visible { animation: none; } } ``` ### 15. Ink Bleed Underline **Type:** Pure CSS **Description:** Hand-drawn-look SVG underline that strokes in from left to right on hover via stroke-dasharray. Reads as ink bleeding into paper. **HTML:** ```html Subscribe ``` **CSS:** ```css .cle-ink { position: relative; display: inline-block; padding-bottom: 8px; color: #ffd479; font: 600 16px/1.2 Georgia, "Times New Roman", serif; text-decoration: none; } .cle-ink-line { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 8px; color: #ffd479; pointer-events: none; } .cle-ink-line path { stroke-dasharray: 200; stroke-dashoffset: 200; transition: stroke-dashoffset 0.7s cubic-bezier(0.65, 0, 0.35, 1); } .cle-ink:hover .cle-ink-line path, .cle-ink:focus-visible .cle-ink-line path { stroke-dashoffset: 0; } ``` ### 16. Magnetic Pull **Type:** Pure CSS **Description:** Link text drifts horizontally as if magnetically pulled, while a thin underline draws in beneath. A small tactile touch that signals interactivity. **HTML:** ```html Open dashboard → ``` **CSS:** ```css .cle-mag { position: relative; display: inline-block; padding-bottom: 4px; color: #c4b5fd; font: 600 15px/1.2 system-ui, sans-serif; text-decoration: none; transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.25s; } .cle-mag::after { content: ""; position: absolute; left: 0; bottom: 0; width: 100%; height: 1.5px; background: #a78bfa; transform: scaleX(0); transform-origin: left center; transition: transform 0.4s cubic-bezier(0.65, 0, 0.35, 1); } .cle-mag:hover, .cle-mag:focus-visible { transform: translateX(6px); color: #fff; } .cle-mag:hover::after, .cle-mag:focus-visible::after { transform: scaleX(1); } ``` ### 17. Caret Companion **Type:** Pure CSS **Description:** A blinking terminal cursor ▌ appears at the end of the link on hover, with a thin underline drawing in. Mono font — perfect for CLIs and dev portfolios. **HTML:** ```html $ run --watch ``` **CSS:** ```css .cle-caret { position: relative; display: inline-block; padding: 2px 4px 4px; color: #2eb88a; font: 600 14px/1.4 ui-monospace, monospace; text-decoration: none; border-bottom: 1px solid transparent; transition: border-color 0.25s ease 0.05s; } .cle-caret::after { content: ""; display: inline-block; width: 7px; height: 1em; margin-left: 4px; vertical-align: text-bottom; background: #2eb88a; opacity: 0; transition: opacity 0.2s ease; } .cle-caret:hover, .cle-caret:focus-visible { border-bottom-color: rgba(46, 184, 138, 0.5); } .cle-caret:hover::after, .cle-caret:focus-visible::after { opacity: 1; animation: cle-caret-blink 1s steps(1) infinite; } @keyframes cle-caret-blink { 0%, 50% { opacity: 1; } 51%, 100% { opacity: 0; } } @media (prefers-reduced-motion: reduce) { .cle-caret:hover::after, .cle-caret:focus-visible::after { animation: none; opacity: 1; } } ``` ### 18. Brutalist Block **Type:** Pure CSS **Description:** Link fills with hot-pink background and gains an offset shadow on hover; click presses it down into the shadow. Brutalist design system fixture. **HTML:** ```html DOWNLOAD .ZIP ``` **CSS:** ```css .cle-brut { display: inline-block; padding: 6px 12px; background: transparent; color: #fff; font: 700 13px/1.2 "Courier New", monospace; letter-spacing: 0.14em; text-decoration: none; border: 2px solid #fff; transition: background 0.15s, color 0.15s, transform 0.12s, box-shadow 0.12s; } .cle-brut:hover, .cle-brut:focus-visible { background: #ff3d6e; color: #0a0a0a; border-color: #0a0a0a; box-shadow: 5px 5px 0 #fff; transform: translate(-2px, -2px); } .cle-brut:active { transform: translate(3px, 3px); box-shadow: 0 0 0 #fff; } ``` ### 19. 3D Flip Reveal **Type:** Pure CSS **Description:** Link face flips 180° on the Y axis on hover, revealing a different call-to-action on the back. Uses transform-style: preserve-3d and backface-visibility. **HTML:** ```html Get Started Learn More → ``` **CSS:** ```css .cle-flip { position: relative; display: inline-block; height: 40px; padding: 0 22px; perspective: 800px; text-decoration: none; font: 700 13px/40px ui-monospace, monospace; letter-spacing: 0.12em; } /* Invisible ghost claims the wider of the two faces so the chip width is stable */ .cle-flip-ghost { visibility: hidden; white-space: nowrap; } .cle-flip-inner { position: absolute; inset: 0; transform-style: preserve-3d; -webkit-transform-style: preserve-3d; transition: transform 0.55s cubic-bezier(0.65, 0, 0.35, 1); } .cle-flip-front, .cle-flip-back { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; border-radius: 999px; backface-visibility: hidden; -webkit-backface-visibility: hidden; white-space: nowrap; } .cle-flip-front { background: #7c6cff; color: #fff; } .cle-flip-back { background: #2eb88a; color: #0a0f0c; transform: rotateY(180deg); } .cle-flip:hover .cle-flip-inner, .cle-flip:focus-visible .cle-flip-inner { transform: rotateY(180deg); } ``` ### 20. Type-On Reveal **Type:** Pure CSS **Description:** Link text appears empty until hover; on hover it types itself character-by-character via a steps() animation with a blinking caret. The CTA itself is the animation. **HTML:** ```html $ deploy --prod ``` **CSS:** ```css .cle-type { position: relative; display: inline-block; padding: 6px 14px; background: #0a0a18; border: 1px solid rgba(0, 229, 255, 0.3); border-radius: 4px; text-decoration: none; min-width: 160px; } .cle-type-text { display: inline-block; font: 600 13px/1.4 ui-monospace, monospace; color: #00e5ff; white-space: nowrap; overflow: hidden; width: 0; border-right: 2px solid transparent; vertical-align: bottom; } .cle-type:hover .cle-type-text, .cle-type:focus-visible .cle-type-text { width: 14ch; border-right-color: #00e5ff; animation: cle-type-in 1.2s steps(14, end) forwards, cle-type-blink 0.7s steps(1) 1.2s infinite; } @keyframes cle-type-in { from { width: 0; } to { width: 14ch; } } @keyframes cle-type-blink { 0%, 50% { border-right-color: #00e5ff; } 51%, 100% { border-right-color: transparent; } } @media (prefers-reduced-motion: reduce) { .cle-type:hover .cle-type-text, .cle-type:focus-visible .cle-type-text { width: 14ch; animation: none; border-right-color: #00e5ff; } } ``` --- ## 20 CSS Loaders URL: https://codefronts.com/motion/css-loader-designs/ Description: 20 hand-coded CSS loaders covering every production loading-indicator pattern developers reach for in 2026 — spinning ring loader (the canonical Material Design pattern), dot chase loader, skeleton screen loader (Facebook/LinkedIn/YouTube content-shimmer pattern), progress bar loader with shimmer, bouncing balls loader, DNA double-helix loader, glitch flicker loader, heartbeat pulse loader, circular progress with percentage, liquid fill loader, neon arc spinner, cube flip 3D loader, audio wave bars loader, morphing square loader, orbit planet loader, typing dots indicator (chat/messaging pattern), staircase step loader, infinity loop loader, gradient conic spinner (Instagram-stories pattern), and particle burst loader. All 100% pure CSS — zero JavaScript, zero libraries (no react-loading-skeleton, no react-spinners, no SpinKit copy, no loading.io snippet). Every loader uses CSS @keyframes animation on 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. Every demo respects prefers-reduced-motion, uses scoped .ld-NN__* class names so multiple loaders 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: 20 ### 01. CSS Spinning Ring Loader **Type:** Pure CSS **Description:** Six ring-based CSS spinners — classic, double, triple nested, dashed, gradient conic, and pulse ring — demonstrating the full spectrum of border and conic-gradient spin techniques. **HTML:** ```html
        Classic Ring
        Double Ring
        Triple Ring
        Dashed Ring
        Gradient Ring
        Pulse Ring
        ``` **CSS:** ```css .ld-01,.ld-01 *,.ld-01 *::before,.ld-01 *::after{box-sizing:border-box;margin:0;padding:0} .ld-01{ --bg:#0a0a0f;--accent:#6c63ff;--accent2:#ff6584;--accent3:#43e97b; background:var(--bg);display:flex;align-items:center;justify-content:center; min-height:100vh;font-family:'Segoe UI',sans-serif; } .ld-01__stage{display:flex;gap:48px;flex-wrap:wrap;justify-content:center;padding:40px} .ld-01__cell{display:flex;flex-direction:column;align-items:center;gap:16px} .ld-01__label{color:rgba(255,255,255,.5);font-size:11px;letter-spacing:1.5px;text-transform:uppercase} /* Classic Ring */ .ld-01__ring{width:56px;height:56px;border:4px solid rgba(108,99,255,.2);border-top-color:var(--accent);border-radius:50%;animation:ld-01-spin 1s linear infinite} @keyframes ld-01-spin{to{transform:rotate(360deg)}} /* Double Ring */ .ld-01__double{width:56px;height:56px;border:4px solid transparent;border-top-color:var(--accent);border-bottom-color:var(--accent2);border-radius:50%;animation:ld-01-spin 1.2s linear infinite} /* Triple Ring */ .ld-01__triple{width:60px;height:60px;position:relative} .ld-01__triple span{position:absolute;border-radius:50%;border:3px solid transparent;animation:ld-01-spin linear infinite} .ld-01__triple span:nth-child(1){inset:0;border-top-color:var(--accent);animation-duration:.9s} .ld-01__triple span:nth-child(2){inset:8px;border-top-color:var(--accent2);animation-duration:1.3s;animation-direction:reverse} .ld-01__triple span:nth-child(3){inset:16px;border-top-color:var(--accent3);animation-duration:1.7s} /* Dashed Ring */ .ld-01__dashed{width:56px;height:56px;border:4px dashed var(--accent);border-radius:50%;animation:ld-01-spin 2s linear infinite;opacity:.8} /* Gradient Ring */ .ld-01__gradient{width:56px;height:56px;border-radius:50%;background:conic-gradient(var(--accent),var(--accent2),var(--accent3),var(--accent));animation:ld-01-spin 1s linear infinite;-webkit-mask:radial-gradient(farthest-side,#0000 calc(100% - 6px),#000 0)} /* Pulsing Ring */ .ld-01__pulse-ring{width:56px;height:56px;border:4px solid var(--accent);border-radius:50%;animation:ld-01-pulse-ring 1.5s ease-out infinite} @keyframes ld-01-pulse-ring{0%{transform:scale(.8);opacity:1}100%{transform:scale(1.5);opacity:0}} @media(prefers-reduced-motion:reduce){ .ld-01__ring,.ld-01__double,.ld-01__triple span,.ld-01__dashed,.ld-01__gradient,.ld-01__pulse-ring{animation:none} } ``` ### 02. CSS Dot Chase Loader **Type:** Pure CSS **Description:** Four dot-based CSS loaders — a staggered bounce chase row, a spinning orbit ring, a hexagonal trail pulse, and animated wave bars — all driven by staggered animation-delay. **HTML:** ```html
        Dot Chase
        Orbit Dots
        Trailing Dots
        Wave Bars
        ``` **CSS:** ```css .ld-02,.ld-02 *,.ld-02 *::before,.ld-02 *::after{box-sizing:border-box;margin:0;padding:0} .ld-02{ --bg:#0d1117;--c1:#f7c948;--c2:#f27121;--c3:#e94057; background:var(--bg);display:flex;align-items:center;justify-content:center;min-height:100vh;font-family:'Segoe UI',sans-serif; } .ld-02__stage{display:flex;gap:56px;flex-wrap:wrap;justify-content:center;padding:40px} .ld-02__cell{display:flex;flex-direction:column;align-items:center;gap:20px} .ld-02__label{color:rgba(255,255,255,.4);font-size:11px;letter-spacing:1.5px;text-transform:uppercase} /* Dot Chase */ .ld-02__chase{display:flex;gap:8px;align-items:center} .ld-02__chase span{width:12px;height:12px;border-radius:50%;background:var(--c1);animation:ld-02-chase 1.2s ease-in-out infinite} .ld-02__chase span:nth-child(1){animation-delay:0s} .ld-02__chase span:nth-child(2){animation-delay:.15s;background:var(--c2)} .ld-02__chase span:nth-child(3){animation-delay:.3s;background:var(--c3)} .ld-02__chase span:nth-child(4){animation-delay:.45s;background:var(--c1)} .ld-02__chase span:nth-child(5){animation-delay:.6s;background:var(--c2)} @keyframes ld-02-chase{0%,80%,100%{transform:scale(.6);opacity:.4}40%{transform:scale(1.1);opacity:1}} /* Orbit dots */ .ld-02__orbit{width:60px;height:60px;position:relative;animation:ld-02-spin 1.5s linear infinite} .ld-02__orbit span{position:absolute;width:10px;height:10px;border-radius:50%;background:var(--c1)} .ld-02__orbit span:nth-child(1){top:0;left:50%;transform:translateX(-50%)} .ld-02__orbit span:nth-child(2){top:50%;right:0;transform:translateY(-50%);background:var(--c2)} .ld-02__orbit span:nth-child(3){bottom:0;left:50%;transform:translateX(-50%);background:var(--c3)} .ld-02__orbit span:nth-child(4){top:50%;left:0;transform:translateY(-50%);background:var(--c1)} @keyframes ld-02-spin{to{transform:rotate(360deg)}} /* Trailing dots */ .ld-02__trail{width:60px;height:60px;position:relative} .ld-02__trail span{position:absolute;width:8px;height:8px;border-radius:50%;animation:ld-02-trail 1.2s ease-in-out infinite} .ld-02__trail span:nth-child(1){background:var(--c1);animation-delay:0s;top:4px;left:26px} .ld-02__trail span:nth-child(2){background:var(--c2);animation-delay:.1s;top:10px;right:4px} .ld-02__trail span:nth-child(3){background:var(--c3);animation-delay:.2s;bottom:10px;right:4px} .ld-02__trail span:nth-child(4){background:var(--c1);animation-delay:.3s;bottom:4px;left:26px} .ld-02__trail span:nth-child(5){background:var(--c2);animation-delay:.4s;bottom:10px;left:4px} .ld-02__trail span:nth-child(6){background:var(--c3);animation-delay:.5s;top:10px;left:4px} @keyframes ld-02-trail{0%,100%{transform:scale(.4);opacity:.3}50%{transform:scale(1);opacity:1}} /* Flocking dots */ .ld-02__flock{display:flex;gap:6px;align-items:flex-end;height:40px} .ld-02__flock span{width:10px;border-radius:5px;background:var(--c2);animation:ld-02-flock 1s ease-in-out infinite} .ld-02__flock span:nth-child(1){height:10px;animation-delay:0s} .ld-02__flock span:nth-child(2){height:20px;animation-delay:.1s;background:var(--c3)} .ld-02__flock span:nth-child(3){height:30px;animation-delay:.2s;background:var(--c1)} .ld-02__flock span:nth-child(4){height:20px;animation-delay:.3s;background:var(--c3)} .ld-02__flock span:nth-child(5){height:10px;animation-delay:.4s} @keyframes ld-02-flock{0%,100%{transform:scaleY(.5);opacity:.5}50%{transform:scaleY(1.3);opacity:1}} @media(prefers-reduced-motion:reduce){ .ld-02__chase span,.ld-02__orbit,.ld-02__trail span,.ld-02__flock span{animation:none} } ``` ### 03. CSS Skeleton Screen Loader **Type:** Pure CSS **Description:** Three shimmer-based CSS skeleton screens — a profile card, an article card, and a dashboard widget — using a single shared shimmer keyframe scoped per wrapper. **HTML:** ```html
        ``` **CSS:** ```css .ld-03,.ld-03 *,.ld-03 *::before,.ld-03 *::after{box-sizing:border-box;margin:0;padding:0} .ld-03{ --bg:#111827;--card:#1f2937;--shine:rgba(255,255,255,.06);--line:#374151; background:var(--bg);display:flex;align-items:center;justify-content:center;min-height:100vh;font-family:'Segoe UI',sans-serif;padding:40px; } .ld-03__stage{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:24px;max-width:900px;width:100%} .ld-03__card{background:var(--card);border-radius:16px;padding:20px;overflow:hidden} .ld-03__skel{background:var(--line);border-radius:8px;position:relative;overflow:hidden} .ld-03__skel::after{content:'';position:absolute;inset:0;background:linear-gradient(90deg,transparent 0%,var(--shine) 50%,transparent 100%);animation:ld-03-shimmer 1.5s ease-in-out infinite;transform:translateX(-100%)} @keyframes ld-03-shimmer{to{transform:translateX(100%)}} /* Profile card skeleton */ .ld-03__avatar{width:56px;height:56px;border-radius:50%} .ld-03__meta{display:flex;align-items:center;gap:14px;margin-bottom:16px} .ld-03__lines{flex:1;display:flex;flex-direction:column;gap:8px} .ld-03__line{height:10px} .ld-03__line--short{width:60%} .ld-03__image-skel{height:140px;border-radius:10px;margin-bottom:16px} .ld-03__text-block{display:flex;flex-direction:column;gap:8px} /* Article skeleton */ .ld-03__article-img{height:160px;border-radius:10px;margin-bottom:16px} .ld-03__tag{height:20px;width:60px;border-radius:20px;margin-bottom:12px} .ld-03__title-line{height:14px;margin-bottom:8px} .ld-03__title-line--half{width:55%} .ld-03__para-line{height:10px;margin-bottom:6px} .ld-03__para-line--short{width:70%} /* Dashboard skeleton */ .ld-03__stat-row{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-bottom:16px} .ld-03__stat{background:var(--bg);border-radius:10px;padding:14px} .ld-03__stat-num{height:28px;width:50%;margin-bottom:8px;border-radius:6px} .ld-03__stat-lbl{height:10px;width:80%;border-radius:4px} .ld-03__chart{height:100px;border-radius:10px} @media(prefers-reduced-motion:reduce){.ld-03__skel::after{animation:none}} ``` ### 04. CSS Progress Bar Loader **Type:** Pure CSS **Description:** Five animated CSS progress bars — fill sweep, animated stripes, gradient shimmer, indeterminate bounce, and segmented pulse — covering the most common loading-state UI patterns. **HTML:** ```html
        Uploading file…78%
        ``` **CSS:** ```css .ld-04,.ld-04 *,.ld-04 *::before,.ld-04 *::after{box-sizing:border-box;margin:0;padding:0} .ld-04{ --bg:#0c0c1d;--c1:#a78bfa;--c2:#06b6d4;--c3:#f472b6;--c4:#34d399; background:var(--bg);display:flex;align-items:center;justify-content:center;min-height:100vh;font-family:'Segoe UI',sans-serif;padding:40px; } .ld-04__stage{display:flex;flex-direction:column;gap:36px;width:100%;max-width:480px} .ld-04__item{display:flex;flex-direction:column;gap:10px} .ld-04__label{display:flex;justify-content:space-between;color:rgba(255,255,255,.6);font-size:12px;letter-spacing:.5px} .ld-04__track{height:8px;background:rgba(255,255,255,.08);border-radius:99px;overflow:hidden;position:relative} /* Standard fill */ .ld-04__fill{height:100%;border-radius:99px;background:var(--c1);animation:ld-04-fill1 2.5s ease-in-out infinite} @keyframes ld-04-fill1{0%{width:0%}60%{width:78%}100%{width:78%}} /* Striped animated */ .ld-04__striped{height:100%;border-radius:99px;background:repeating-linear-gradient(45deg,var(--c2) 0,var(--c2) 10px,rgba(255,255,255,.15) 10px,rgba(255,255,255,.15) 20px);background-size:200% 100%;width:60%;animation:ld-04-stripes 1s linear infinite} @keyframes ld-04-stripes{to{background-position:-200% 0}} /* Gradient shimmer */ .ld-04__gfill{height:100%;border-radius:99px;width:55%;background:linear-gradient(90deg,var(--c3),var(--c1),var(--c3));background-size:200% 100%;animation:ld-04-glow 1.5s ease-in-out infinite} @keyframes ld-04-glow{0%{background-position:100% 0}100%{background-position:-100% 0}} /* Indeterminate bounce */ .ld-04__bounce{height:100%;border-radius:99px;background:var(--c4);width:40%;animation:ld-04-bounce 1.8s ease-in-out infinite} @keyframes ld-04-bounce{0%{transform:translateX(-100%)}50%{transform:translateX(150%)}100%{transform:translateX(-100%)}} /* Segmented */ .ld-04__seg-track{display:flex;gap:4px} .ld-04__seg{flex:1;height:8px;border-radius:4px;background:rgba(255,255,255,.08);animation:ld-04-seg 2s ease-in-out infinite} .ld-04__seg:nth-child(1){animation-delay:0s} .ld-04__seg:nth-child(2){animation-delay:.2s} .ld-04__seg:nth-child(3){animation-delay:.4s} .ld-04__seg:nth-child(4){animation-delay:.6s} .ld-04__seg:nth-child(5){animation-delay:.8s} @keyframes ld-04-seg{0%,100%{background:rgba(255,255,255,.08)}50%{background:var(--c1)}} @media(prefers-reduced-motion:reduce){ .ld-04__fill,.ld-04__striped,.ld-04__gfill,.ld-04__bounce,.ld-04__seg{animation:none;width:60%} } ``` ### 05. CSS Bouncing Balls Loader **Type:** Pure CSS **Description:** Four kinetic ball-physics loaders — a staggered bounce row, elastic scale pulses, rolling balls with rotation, and a squash-and-stretch ball with shadow — each using pure CSS animation. **HTML:** ```html
        Bounce Row
        Elastic Pulse
        Rolling Balls
        ``` **CSS:** ```css .ld-05,.ld-05 *,.ld-05 *::before,.ld-05 *::after{box-sizing:border-box;margin:0;padding:0} .ld-05{ --bg:#1a0a2e;--c1:#ff6b6b;--c2:#ffd93d;--c3:#6bcb77;--c4:#4d96ff;--c5:#c77dff; background:var(--bg);display:flex;align-items:center;justify-content:center;min-height:100vh;font-family:'Segoe UI',sans-serif; } .ld-05__stage{display:flex;gap:64px;flex-wrap:wrap;justify-content:center;padding:40px} .ld-05__cell{display:flex;flex-direction:column;align-items:center;gap:20px} .ld-05__label{color:rgba(255,255,255,.4);font-size:11px;letter-spacing:1.5px;text-transform:uppercase} /* Simple bounce */ .ld-05__simple{display:flex;gap:8px;align-items:flex-end;height:50px} .ld-05__simple span{width:14px;height:14px;border-radius:50%;background:var(--c1);animation:ld-05-simple-bounce 0.8s ease-in-out infinite alternate} .ld-05__simple span:nth-child(1){animation-delay:0s} .ld-05__simple span:nth-child(2){animation-delay:.15s;background:var(--c2)} .ld-05__simple span:nth-child(3){animation-delay:.3s;background:var(--c3)} .ld-05__simple span:nth-child(4){animation-delay:.45s;background:var(--c4)} @keyframes ld-05-simple-bounce{0%{transform:translateY(0) scaleX(1)}100%{transform:translateY(-30px) scaleX(.85)}} /* Elastic */ .ld-05__elastic{display:flex;gap:10px;align-items:center;height:50px} .ld-05__elastic span{width:14px;height:14px;border-radius:50%;background:var(--c4);animation:ld-05-elastic 1.2s cubic-bezier(.68,-.55,.27,1.55) infinite} .ld-05__elastic span:nth-child(1){animation-delay:0s} .ld-05__elastic span:nth-child(2){animation-delay:.15s;background:var(--c5)} .ld-05__elastic span:nth-child(3){animation-delay:.3s;background:var(--c1)} @keyframes ld-05-elastic{0%,100%{transform:scale(1);opacity:1}50%{transform:scale(1.6);opacity:.5}} /* Rolling */ .ld-05__roll{width:100px;height:30px;position:relative;overflow:hidden} .ld-05__roll span{position:absolute;width:16px;height:16px;border-radius:50%;top:7px;background:var(--c2);animation:ld-05-roll 1.5s linear infinite} .ld-05__roll span:nth-child(1){animation-delay:0s} .ld-05__roll span:nth-child(2){animation-delay:.5s;background:var(--c3)} .ld-05__roll span:nth-child(3){animation-delay:1s;background:var(--c5)} @keyframes ld-05-roll{0%{left:-16px;transform:rotate(0)}100%{left:100%;transform:rotate(720deg)}} /* Shadow squash */ .ld-05__squash{display:flex;flex-direction:column;align-items:center;gap:4px;height:60px;justify-content:flex-end} .ld-05__squash-ball{width:20px;height:20px;border-radius:50%;background:var(--c1);animation:ld-05-squash-ball 0.8s ease-in-out infinite alternate} .ld-05__squash-shadow{width:20px;height:6px;border-radius:50%;background:rgba(255,107,107,.3);animation:ld-05-squash-shadow 0.8s ease-in-out infinite alternate} @keyframes ld-05-squash-ball{0%{transform:translateY(0) scaleY(1)}100%{transform:translateY(-28px) scaleY(.9)}} @keyframes ld-05-squash-shadow{0%{transform:scaleX(1);opacity:.4}100%{transform:scaleX(.5);opacity:.1}} @media(prefers-reduced-motion:reduce){ .ld-05__simple span,.ld-05__elastic span,.ld-05__roll span,.ld-05__squash-ball,.ld-05__squash-shadow{animation:none} } ``` ### 06. CSS DNA Helix Loader **Type:** Pure CSS **Description:** Three organic helix and spiral CSS loaders — a pulsing DNA ladder with rungs, a glowing helix ring stack, and a spiralling orbit chain — creating bio-tech and data-processing aesthetics. **HTML:** ```html
        ``` **CSS:** ```css .ld-06,.ld-06 *,.ld-06 *::before,.ld-06 *::after{box-sizing:border-box;margin:0;padding:0} .ld-06{ --bg:#020c1b;--c1:#00d2ff;--c2:#ff6b9d;--c3:#a8ff78; background:var(--bg);display:flex;align-items:center;justify-content:center;min-height:100vh;font-family:'Segoe UI',sans-serif; } .ld-06__stage{display:flex;gap:80px;flex-wrap:wrap;justify-content:center;padding:40px;align-items:center} .ld-06__cell{display:flex;flex-direction:column;align-items:center;gap:20px} .ld-06__label{color:rgba(255,255,255,.4);font-size:11px;letter-spacing:1.5px;text-transform:uppercase} /* DNA Helix */ .ld-06__dna{display:flex;flex-direction:column;gap:3px;align-items:center} .ld-06__rung{display:flex;gap:4px;align-items:center} .ld-06__rung span{width:10px;height:10px;border-radius:50%} .ld-06__rung span:nth-child(1){background:var(--c1)} .ld-06__rung span:nth-child(2){background:rgba(255,255,255,.1);flex:1;height:2px;border-radius:1px} .ld-06__rung span:nth-child(3){background:var(--c2)} .ld-06__rung:nth-child(1){animation:ld-06-dna 1.2s ease-in-out infinite;animation-delay:0s} .ld-06__rung:nth-child(2){animation:ld-06-dna 1.2s ease-in-out infinite;animation-delay:.1s} .ld-06__rung:nth-child(3){animation:ld-06-dna 1.2s ease-in-out infinite;animation-delay:.2s} .ld-06__rung:nth-child(4){animation:ld-06-dna 1.2s ease-in-out infinite;animation-delay:.3s} .ld-06__rung:nth-child(5){animation:ld-06-dna 1.2s ease-in-out infinite;animation-delay:.4s} .ld-06__rung:nth-child(6){animation:ld-06-dna 1.2s ease-in-out infinite;animation-delay:.5s} .ld-06__rung:nth-child(7){animation:ld-06-dna 1.2s ease-in-out infinite;animation-delay:.6s} .ld-06__rung:nth-child(8){animation:ld-06-dna 1.2s ease-in-out infinite;animation-delay:.7s} @keyframes ld-06-dna{0%,100%{transform:scaleX(1);opacity:.6}50%{transform:scaleX(.3);opacity:1}} /* Helix ring stack */ .ld-06__helix{width:50px;height:80px;position:relative} .ld-06__helix span{position:absolute;left:50%;border-radius:50%;transform:translateX(-50%);animation:ld-06-helix 1.5s ease-in-out infinite} .ld-06__helix span:nth-child(1){width:40px;height:10px;background:var(--c1);top:0;animation-delay:0s} .ld-06__helix span:nth-child(2){width:30px;height:9px;background:var(--c2);top:12px;animation-delay:.1s} .ld-06__helix span:nth-child(3){width:16px;height:8px;background:var(--c1);top:23px;animation-delay:.2s} .ld-06__helix span:nth-child(4){width:8px;height:8px;background:var(--c3);top:34px;animation-delay:.3s} .ld-06__helix span:nth-child(5){width:16px;height:8px;background:var(--c2);top:45px;animation-delay:.4s} .ld-06__helix span:nth-child(6){width:30px;height:9px;background:var(--c1);top:56px;animation-delay:.5s} .ld-06__helix span:nth-child(7){width:40px;height:10px;background:var(--c2);top:68px;animation-delay:.6s} @keyframes ld-06-helix{0%,100%{opacity:.3}50%{opacity:1;box-shadow:0 0 12px currentColor}} /* Spiral */ .ld-06__spiral{width:60px;height:60px;position:relative} .ld-06__spiral span{position:absolute;width:8px;height:8px;border-radius:50%;animation:ld-06-spiral 2s linear infinite} .ld-06__spiral span:nth-child(1){background:var(--c1);animation-delay:0s} .ld-06__spiral span:nth-child(2){background:var(--c2);animation-delay:-.25s} .ld-06__spiral span:nth-child(3){background:var(--c3);animation-delay:-.5s} .ld-06__spiral span:nth-child(4){background:var(--c1);animation-delay:-.75s} .ld-06__spiral span:nth-child(5){background:var(--c2);animation-delay:-1s} .ld-06__spiral span:nth-child(6){background:var(--c3);animation-delay:-1.25s} .ld-06__spiral span:nth-child(7){background:var(--c1);animation-delay:-1.5s} .ld-06__spiral span:nth-child(8){background:var(--c2);animation-delay:-1.75s} @keyframes ld-06-spiral{0%{transform:rotate(0deg) translateX(24px) scale(.4);opacity:0}20%{opacity:1;transform:rotate(72deg) translateX(24px) scale(.7)}60%{transform:rotate(216deg) translateX(24px) scale(1)}80%{opacity:1}100%{transform:rotate(360deg) translateX(24px) scale(.4);opacity:0}} @media(prefers-reduced-motion:reduce){ .ld-06__rung,.ld-06__helix span,.ld-06__spiral span{animation:none} } ``` ### 07. CSS Glitch Flicker Loader **Type:** Pure CSS **Description:** Three cyberpunk CSS loaders — a glitching text title with RGB channel split, a CRT scan-line box, and a matrix binary rain column — evoking terminal hacking and retro sci-fi aesthetics. **HTML:** ```html
        LOADING
        Glitch Text
        Scan Line
        101010
        010101
        110010
        001101
        ``` **CSS:** ```css .ld-07,.ld-07 *,.ld-07 *::before,.ld-07 *::after{box-sizing:border-box;margin:0;padding:0} .ld-07{ --bg:#080808;--c1:#00ff41;--c2:#ff003c;--c3:#00d4ff; background:var(--bg);display:flex;align-items:center;justify-content:center;min-height:100vh;font-family:'Courier New',monospace; } .ld-07__stage{display:flex;gap:80px;flex-wrap:wrap;justify-content:center;padding:40px;align-items:center} .ld-07__cell{display:flex;flex-direction:column;align-items:center;gap:24px} .ld-07__label{color:rgba(255,255,255,.3);font-size:11px;letter-spacing:2px;text-transform:uppercase} /* Glitch text */ .ld-07__text{font-size:28px;font-weight:700;color:var(--c1);letter-spacing:4px;position:relative;text-shadow:0 0 10px var(--c1);animation:ld-07-flicker 3s step-end infinite} .ld-07__text::before{content:attr(data-text);position:absolute;left:0;top:0;color:var(--c2);animation:ld-07-glitch-r 2.5s step-end infinite;clip-path:polygon(0 20%,100% 20%,100% 40%,0 40%)} .ld-07__text::after{content:attr(data-text);position:absolute;left:0;top:0;color:var(--c3);animation:ld-07-glitch-b 2s step-end infinite;clip-path:polygon(0 60%,100% 60%,100% 80%,0 80%)} @keyframes ld-07-flicker{0%,100%{opacity:1}92%{opacity:1}93%{opacity:0}94%{opacity:1}96%{opacity:0}97%{opacity:1}} @keyframes ld-07-glitch-r{0%{transform:translateX(0)}15%{transform:translateX(-3px)}16%{transform:translateX(3px)}17%{transform:translateX(0)}85%{transform:translateX(0)}86%{transform:translateX(2px)}87%{transform:translateX(-2px)}88%{transform:translateX(0)}} @keyframes ld-07-glitch-b{0%{transform:translateX(0)}10%{transform:translateX(2px)}11%{transform:translateX(-2px)}12%{transform:translateX(0)}75%{transform:translateX(0)}76%{transform:translateX(-3px)}77%{transform:translateX(3px)}78%{transform:translateX(0)}} /* Scan line loader */ .ld-07__scan{width:80px;height:80px;background:#111;border:1px solid var(--c1);border-radius:4px;position:relative;overflow:hidden;box-shadow:0 0 20px rgba(0,255,65,.2)} .ld-07__scan::before{content:'';position:absolute;left:0;width:100%;height:2px;background:var(--c1);box-shadow:0 0 8px var(--c1);animation:ld-07-scan 1.5s linear infinite;opacity:.8} .ld-07__scan::after{content:'';position:absolute;inset:0;background:repeating-linear-gradient(0deg,transparent,transparent 3px,rgba(0,255,65,.03) 3px,rgba(0,255,65,.03) 4px)} @keyframes ld-07-scan{0%{top:0}100%{top:100%}} /* Binary rain letters */ .ld-07__matrix{width:80px;height:80px;overflow:hidden;background:#050505;border:1px solid rgba(0,255,65,.2);border-radius:4px;display:flex;gap:1px;padding:2px} .ld-07__col{display:flex;flex-direction:column;gap:1px;animation:ld-07-matrix-col 1.5s linear infinite} .ld-07__col:nth-child(2){animation-delay:.3s} .ld-07__col:nth-child(3){animation-delay:.6s} .ld-07__col:nth-child(4){animation-delay:.9s} .ld-07__col span{font-size:9px;color:var(--c1);opacity:.15;display:block;line-height:12px;text-align:center;animation:ld-07-digit 2s step-end infinite} .ld-07__col span:nth-child(1){animation-delay:0s} .ld-07__col span:nth-child(2){animation-delay:.2s;opacity:.4} .ld-07__col span:nth-child(3){animation-delay:.4s;opacity:.7} .ld-07__col span:nth-child(4){animation-delay:.6s;opacity:1;color:#fff;text-shadow:0 0 4px var(--c1)} .ld-07__col span:nth-child(5){animation-delay:.8s;opacity:.4} .ld-07__col span:nth-child(6){animation-delay:1s;opacity:.1} @keyframes ld-07-matrix-col{0%{transform:translateY(-20px)}100%{transform:translateY(20px)}} @keyframes ld-07-digit{0%,100%{content:'0'}25%{content:'1'}50%{content:'0'}75%{content:'1'}} @media(prefers-reduced-motion:reduce){ .ld-07__text,.ld-07__text::before,.ld-07__text::after,.ld-07__scan::before,.ld-07__col{animation:none} } ``` ### 08. CSS Heartbeat Pulse Loader **Type:** Pure CSS **Description:** Four heart and pulse CSS loaders — an SVG heartbeat, expanding ring pulse, animated ECG line, and sonar ping — perfect for health, wellness, and real-time data UI contexts. **HTML:** ```html
        Heartbeat
        Ring Pulse
        ECG Line
        Sonar Ping
        ``` **CSS:** ```css .ld-08,.ld-08 *,.ld-08 *::before,.ld-08 *::after{box-sizing:border-box;margin:0;padding:0} .ld-08{ --bg:#0d0014;--c1:#ff4d6d;--c2:#ff8fa3;--c3:#ffb3c1; background:var(--bg);display:flex;align-items:center;justify-content:center;min-height:100vh;font-family:'Segoe UI',sans-serif; } .ld-08__stage{display:flex;gap:80px;flex-wrap:wrap;justify-content:center;padding:40px;align-items:center} .ld-08__cell{display:flex;flex-direction:column;align-items:center;gap:24px} .ld-08__label{color:rgba(255,255,255,.4);font-size:11px;letter-spacing:1.5px;text-transform:uppercase} /* Heart SVG pulse */ .ld-08__heart{width:60px;height:60px;position:relative;display:flex;align-items:center;justify-content:center} .ld-08__heart svg{width:50px;height:50px;animation:ld-08-heartbeat .8s ease-in-out infinite} @keyframes ld-08-heartbeat{0%,100%{transform:scale(1)}14%{transform:scale(1.3)}28%{transform:scale(1)}42%{transform:scale(1.15)}70%{transform:scale(1)}} /* Ring pulse */ .ld-08__rings{width:80px;height:80px;position:relative;display:flex;align-items:center;justify-content:center} .ld-08__rings::before,.ld-08__rings::after{content:'';position:absolute;border-radius:50%;border:2px solid var(--c1)} .ld-08__rings::before{width:30px;height:30px;animation:ld-08-ring-pulse 1.5s ease-out infinite} .ld-08__rings::after{width:30px;height:30px;animation:ld-08-ring-pulse 1.5s ease-out infinite .4s} .ld-08__rings i{width:16px;height:16px;border-radius:50%;background:var(--c1);box-shadow:0 0 10px var(--c1);animation:ld-08-heartbeat .8s ease-in-out infinite} @keyframes ld-08-ring-pulse{0%{transform:scale(1);opacity:.8}100%{transform:scale(3.5);opacity:0}} /* ECG line */ .ld-08__ecg{width:140px;height:50px;position:relative;overflow:hidden} .ld-08__ecg svg{position:absolute;width:200%;height:100%;animation:ld-08-ecg 1.5s linear infinite} @keyframes ld-08-ecg{0%{transform:translateX(0)}100%{transform:translateX(-50%)}} /* Sonar */ .ld-08__sonar{width:80px;height:80px;position:relative;display:flex;align-items:center;justify-content:center} .ld-08__sonar span{position:absolute;border-radius:50%;border:2px solid var(--c2);animation:ld-08-sonar 2s ease-out infinite} .ld-08__sonar span:nth-child(1){width:20px;height:20px;animation-delay:0s} .ld-08__sonar span:nth-child(2){width:20px;height:20px;animation-delay:.5s} .ld-08__sonar span:nth-child(3){width:20px;height:20px;animation-delay:1s} .ld-08__sonar i{width:8px;height:8px;border-radius:50%;background:var(--c2);box-shadow:0 0 8px var(--c2)} @keyframes ld-08-sonar{0%{width:8px;height:8px;opacity:1}100%{width:70px;height:70px;opacity:0}} @media(prefers-reduced-motion:reduce){ .ld-08__heart svg,.ld-08__rings::before,.ld-08__rings::after,.ld-08__rings i,.ld-08__ecg svg,.ld-08__sonar span{animation:none} } ``` ### 09. CSS Circular Progress Loader **Type:** Pure CSS **Description:** Four SVG-based circular progress loaders — a stroke-dashoffset arc, segmented arcs, a gauge semicircle, and radial concentric rings — covering all common circular-indicator design patterns. **HTML:** ```html
        78%
        ``` **CSS:** ```css .ld-09,.ld-09 *,.ld-09 *::before,.ld-09 *::after{box-sizing:border-box;margin:0;padding:0} .ld-09{ --bg:#0f172a;--c1:#818cf8;--c2:#34d399;--c3:#fb923c;--c4:#f472b6; background:var(--bg);display:flex;align-items:center;justify-content:center;min-height:100vh;font-family:'Segoe UI',sans-serif; } .ld-09__stage{display:flex;gap:48px;flex-wrap:wrap;justify-content:center;padding:40px} .ld-09__cell{display:flex;flex-direction:column;align-items:center;gap:16px} .ld-09__label{color:rgba(255,255,255,.4);font-size:11px;letter-spacing:1.5px;text-transform:uppercase} /* SVG Circle progress */ .ld-09__svg-wrap{position:relative;width:90px;height:90px} .ld-09__svg-wrap svg{width:90px;height:90px;transform:rotate(-90deg)} .ld-09__track{fill:none;stroke:rgba(255,255,255,.07);stroke-width:6} .ld-09__prog{fill:none;stroke:var(--c1);stroke-width:6;stroke-linecap:round;stroke-dasharray:226;animation:ld-09-dash 2s ease-in-out infinite} @keyframes ld-09-dash{0%{stroke-dashoffset:226;opacity:.6}50%{stroke-dashoffset:50;opacity:1}100%{stroke-dashoffset:226;opacity:.6}} .ld-09__pct{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;font-size:18px;font-weight:700;color:var(--c1)} /* Segmented ring */ .ld-09__seg-ring{width:90px;height:90px;border-radius:50%;position:relative} .ld-09__seg-ring svg{width:90px;height:90px} .ld-09__seg-arc{fill:none;stroke-width:6;stroke-linecap:round} .ld-09__seg-arc:nth-child(1){stroke:var(--c2);stroke-dasharray:40 226;stroke-dashoffset:0;animation:ld-09-seg1 3s linear infinite} .ld-09__seg-arc:nth-child(2){stroke:var(--c3);stroke-dasharray:40 226;stroke-dashoffset:-60;animation:ld-09-seg2 3s linear infinite} .ld-09__seg-arc:nth-child(3){stroke:var(--c4);stroke-dasharray:40 226;stroke-dashoffset:-120;animation:ld-09-seg3 3s linear infinite} @keyframes ld-09-seg1{to{stroke-dashoffset:-226}} @keyframes ld-09-seg2{to{stroke-dashoffset:-286}} @keyframes ld-09-seg3{to{stroke-dashoffset:-346}} /* Gauge */ .ld-09__gauge{width:100px;height:55px;position:relative;overflow:hidden} .ld-09__gauge svg{width:100px;height:100px;transform:translateY(10px)} .ld-09__gauge-track{fill:none;stroke:rgba(255,255,255,.07);stroke-width:8;stroke-dasharray:125;stroke-dashoffset:-62.5} .ld-09__gauge-fill{fill:none;stroke:var(--c3);stroke-width:8;stroke-linecap:round;stroke-dasharray:125;stroke-dashoffset:-62.5;animation:ld-09-gauge 2.5s ease-in-out infinite} @keyframes ld-09-gauge{0%{stroke-dashoffset:0}50%{stroke-dashoffset:-62.5}100%{stroke-dashoffset:0}} /* Radial multi */ .ld-09__radial{width:90px;height:90px;position:relative} .ld-09__radial svg{width:90px;height:90px;transform:rotate(-90deg)} .ld-09__r-track{fill:none;stroke:rgba(255,255,255,.05);stroke-linecap:round} .ld-09__r-fill{fill:none;stroke-linecap:round;animation:ld-09-rdash 2s ease-in-out infinite} .ld-09__r-fill:nth-child(2){stroke:var(--c1);stroke-width:5;stroke-dasharray:200;animation-delay:0s} .ld-09__r-fill:nth-child(4){stroke:var(--c2);stroke-width:5;stroke-dasharray:160;animation-delay:.3s} .ld-09__r-fill:nth-child(6){stroke:var(--c3);stroke-width:5;stroke-dasharray:120;animation-delay:.6s} @keyframes ld-09-rdash{0%{stroke-dashoffset:200;opacity:.5}60%{stroke-dashoffset:40;opacity:1}100%{stroke-dashoffset:200;opacity:.5}} @media(prefers-reduced-motion:reduce){ .ld-09__prog,.ld-09__seg-arc,.ld-09__gauge-fill,.ld-09__r-fill{animation:none} } ``` ### 10. CSS Liquid Fill Loader **Type:** Pure CSS **Description:** Four liquid-fill CSS loaders — a flask with wave, a liquid circle with sloshing, a vertical tube, and an animated battery indicator — using height and transform animations to simulate fluid. **HTML:** ```html
        ``` **CSS:** ```css .ld-10,.ld-10 *,.ld-10 *::before,.ld-10 *::after{box-sizing:border-box;margin:0;padding:0} .ld-10{ --bg:#071330;--c1:#0ea5e9;--c2:#6366f1;--c3:#10b981;--c4:#f59e0b; background:var(--bg);display:flex;align-items:center;justify-content:center;min-height:100vh;font-family:'Segoe UI',sans-serif; } .ld-10__stage{display:flex;gap:40px;flex-wrap:wrap;justify-content:center;padding:40px;align-items:flex-end} .ld-10__cell{display:flex;flex-direction:column;align-items:center;gap:16px} .ld-10__label{color:rgba(255,255,255,.4);font-size:11px;letter-spacing:1.5px;text-transform:uppercase} /* Flask fill */ .ld-10__flask{width:50px;height:80px;border:2px solid var(--c1);border-radius:4px 4px 12px 12px;position:relative;overflow:hidden;box-shadow:0 0 16px rgba(14,165,233,.2)} .ld-10__flask-fill{position:absolute;bottom:0;left:0;right:0;background:linear-gradient(to top,var(--c1),rgba(14,165,233,.4));animation:ld-10-fill 3s ease-in-out infinite} .ld-10__flask-wave{position:absolute;bottom:0;left:-100%;width:300%;height:30px;background:radial-gradient(ellipse at 50% 100%,rgba(14,165,233,.6) 0%,transparent 70%);animation:ld-10-wave 1.5s linear infinite} @keyframes ld-10-fill{0%{height:10%}50%{height:80%}100%{height:10%}} @keyframes ld-10-wave{to{transform:translateX(33%)}} /* Circle liquid */ .ld-10__circle{width:80px;height:80px;border-radius:50%;border:3px solid var(--c2);position:relative;overflow:hidden;box-shadow:0 0 20px rgba(99,102,241,.2)} .ld-10__circle-fill{position:absolute;bottom:0;left:0;right:0;height:50%;background:linear-gradient(to top,var(--c2),rgba(99,102,241,.3));animation:ld-10-wave-x 1.2s ease-in-out infinite alternate} .ld-10__circle::before{content:'60%';position:absolute;inset:0;display:flex;align-items:center;justify-content:center;color:#fff;font-size:14px;font-weight:700;z-index:1} @keyframes ld-10-wave-x{0%{transform:translateX(-5px) skewX(-3deg)}100%{transform:translateX(5px) skewX(3deg)}} /* Tube */ .ld-10__tube{width:24px;height:100px;border:2px solid var(--c3);border-radius:12px;position:relative;overflow:hidden;box-shadow:0 0 12px rgba(16,185,129,.15)} .ld-10__tube-fill{position:absolute;bottom:0;left:0;right:0;background:linear-gradient(to top,var(--c3),rgba(16,185,129,.3));animation:ld-10-tube 2.5s ease-in-out infinite} @keyframes ld-10-tube{0%,100%{height:15%}50%{height:85%}} /* Battery */ .ld-10__battery{width:80px;height:44px;border:2px solid var(--c4);border-radius:6px;position:relative;overflow:hidden} .ld-10__battery::before{content:'';position:absolute;right:-8px;top:50%;transform:translateY(-50%);width:6px;height:16px;background:var(--c4);border-radius:0 3px 3px 0} .ld-10__battery-fill{position:absolute;left:0;top:0;bottom:0;background:linear-gradient(90deg,var(--c4),rgba(245,158,11,.5));animation:ld-10-battery 3s ease-in-out infinite;border-radius:4px} @keyframes ld-10-battery{0%{width:5%}60%{width:85%}100%{width:5%}} @media(prefers-reduced-motion:reduce){ .ld-10__flask-fill,.ld-10__flask-wave,.ld-10__circle-fill,.ld-10__tube-fill,.ld-10__battery-fill{animation:none} } ``` ### 11. CSS Neon Arc Spinner **Type:** Pure CSS **Description:** Five glowing neon CSS spinners — a single neon ring, double counter-rotating neon, multi-arc intersecting glow, neon orbiting dot, and a conic comet — styled for dark cyberpunk UIs. **HTML:** ```html
        Neon Ring
        Double Neon
        Neon Arcs
        Neon Orbit
        Neon Comet
        ``` **CSS:** ```css .ld-11,.ld-11 *,.ld-11 *::before,.ld-11 *::after{box-sizing:border-box;margin:0;padding:0} .ld-11{ --bg:#06000f;--c1:#bf00ff;--c2:#00f5ff;--c3:#ff6600;--c4:#39ff14; background:var(--bg);display:flex;align-items:center;justify-content:center;min-height:100vh;font-family:'Segoe UI',sans-serif; } .ld-11__stage{display:flex;gap:60px;flex-wrap:wrap;justify-content:center;padding:40px} .ld-11__cell{display:flex;flex-direction:column;align-items:center;gap:20px} .ld-11__label{color:rgba(255,255,255,.35);font-size:11px;letter-spacing:1.5px;text-transform:uppercase} /* Neon ring */ .ld-11__neon{width:70px;height:70px;border-radius:50%;border:3px solid transparent;border-top-color:var(--c1);box-shadow:0 0 12px var(--c1),inset 0 0 12px rgba(191,0,255,.1);animation:ld-11-spin 1s linear infinite} @keyframes ld-11-spin{to{transform:rotate(360deg)}} /* Double neon */ .ld-11__double-neon{width:70px;height:70px;position:relative} .ld-11__double-neon span{position:absolute;border-radius:50%;border:3px solid transparent;animation:ld-11-spin linear infinite} .ld-11__double-neon span:nth-child(1){inset:0;border-top-color:var(--c2);box-shadow:0 0 14px var(--c2);animation-duration:1s} .ld-11__double-neon span:nth-child(2){inset:10px;border-bottom-color:var(--c1);box-shadow:0 0 10px var(--c1);animation-duration:1.5s;animation-direction:reverse} /* Neon arc segments */ .ld-11__arcs{width:70px;height:70px;position:relative} .ld-11__arcs span{position:absolute;border-radius:50%;border:3px solid transparent;animation:ld-11-spin linear infinite} .ld-11__arcs span:nth-child(1){inset:0;border-top-color:var(--c3);box-shadow:0 0 12px var(--c3);animation-duration:.8s} .ld-11__arcs span:nth-child(2){inset:0;border-right-color:var(--c3);box-shadow:0 0 12px var(--c3);animation-duration:.8s} .ld-11__arcs span:nth-child(3){inset:16px;border-bottom-color:var(--c4);box-shadow:0 0 10px var(--c4);animation-duration:1.2s;animation-direction:reverse} /* Neon orbit */ .ld-11__orbit-neon{width:70px;height:70px;position:relative;display:flex;align-items:center;justify-content:center} .ld-11__orbit-neon::before{content:'';width:10px;height:10px;border-radius:50%;background:var(--c1);box-shadow:0 0 15px var(--c1),0 0 30px var(--c1);animation:ld-11-spin 1.2s linear infinite;position:absolute;top:0;left:50%;transform:translateX(-50%);transform-origin:35px 35px} .ld-11__orbit-neon::after{content:'';position:absolute;width:64px;height:64px;border-radius:50%;border:1px solid rgba(191,0,255,.2);box-shadow:0 0 8px rgba(191,0,255,.15)} .ld-11__orbit-neon i{width:6px;height:6px;border-radius:50%;background:var(--c2);box-shadow:0 0 10px var(--c2)} /* Comet neon */ .ld-11__comet-neon{width:70px;height:70px;border-radius:50%;background:conic-gradient(transparent 60%,var(--c4));-webkit-mask:radial-gradient(farthest-side,#0000 calc(100% - 4px),#000 0);animation:ld-11-spin 1.2s linear infinite;filter:drop-shadow(0 0 6px var(--c4))} @media(prefers-reduced-motion:reduce){ .ld-11__neon,.ld-11__double-neon span,.ld-11__arcs span,.ld-11__orbit-neon::before,.ld-11__comet-neon{animation:none} } ``` ### 12. CSS Cube Flip 3D Loader **Type:** Pure CSS **Description:** Three three-dimensional CSS loaders — a six-face spinning cube, a folding grid of four squares, and a nested wireframe box — using CSS 3D transforms and preserve-3d for depth. **HTML:** ```html
        ``` **CSS:** ```css .ld-12,.ld-12 *,.ld-12 *::before,.ld-12 *::after{box-sizing:border-box;margin:0;padding:0} .ld-12{ --bg:#12151e;--c1:#ff9f43;--c2:#ee5a24;--c3:#a29bfe;--c4:#6c5ce7; background:var(--bg);display:flex;align-items:center;justify-content:center;min-height:100vh;font-family:'Segoe UI',sans-serif;perspective:600px; } .ld-12__stage{display:flex;gap:80px;flex-wrap:wrap;justify-content:center;padding:40px;align-items:center} .ld-12__cell{display:flex;flex-direction:column;align-items:center;gap:24px} .ld-12__label{color:rgba(255,255,255,.4);font-size:11px;letter-spacing:1.5px;text-transform:uppercase} /* Flip cube */ .ld-12__cube{width:50px;height:50px;transform-style:preserve-3d;animation:ld-12-cube-flip 2s ease-in-out infinite} .ld-12__face{position:absolute;width:50px;height:50px;border:2px solid var(--c1);display:flex;align-items:center;justify-content:center} .ld-12__face--front{transform:translateZ(25px);background:rgba(255,159,67,.15)} .ld-12__face--back{transform:rotateY(180deg) translateZ(25px);background:rgba(255,159,67,.1)} .ld-12__face--left{transform:rotateY(-90deg) translateZ(25px);background:rgba(238,90,36,.1)} .ld-12__face--right{transform:rotateY(90deg) translateZ(25px);background:rgba(238,90,36,.15)} .ld-12__face--top{transform:rotateX(90deg) translateZ(25px);background:rgba(255,159,67,.05)} .ld-12__face--bottom{transform:rotateX(-90deg) translateZ(25px);background:rgba(238,90,36,.05)} @keyframes ld-12-cube-flip{0%{transform:rotateX(0) rotateY(0)}33%{transform:rotateX(90deg) rotateY(0)}66%{transform:rotateX(90deg) rotateY(90deg)}100%{transform:rotateX(180deg) rotateY(90deg)}} /* Folding squares */ .ld-12__fold{width:40px;height:40px;position:relative} .ld-12__fold span{position:absolute;width:18px;height:18px;background:var(--c3);animation:ld-12-fold 2.4s ease-in-out infinite} .ld-12__fold span:nth-child(1){top:0;left:0;transform-origin:bottom right;animation-delay:0s} .ld-12__fold span:nth-child(2){top:0;right:0;transform-origin:bottom left;animation-delay:.3s;background:rgba(162,155,254,.7)} .ld-12__fold span:nth-child(3){bottom:0;right:0;transform-origin:top left;animation-delay:.6s;background:rgba(162,155,254,.5)} .ld-12__fold span:nth-child(4){bottom:0;left:0;transform-origin:top right;animation-delay:.9s;background:rgba(162,155,254,.3)} @keyframes ld-12-fold{0%,10%,100%{transform:perspective(140px) rotateX(0) rotateY(0)}50%{transform:perspective(140px) rotateX(-180deg) rotateY(0)}} /* Rotating box */ .ld-12__box{width:50px;height:50px;border:3px solid var(--c4);position:relative;animation:ld-12-box-spin 3s linear infinite;transform-style:preserve-3d} .ld-12__box::before,.ld-12__box::after{content:'';position:absolute;border:3px solid rgba(108,92,231,.4)} .ld-12__box::before{inset:-12px;transform:rotateY(45deg);border-color:rgba(108,92,231,.3)} .ld-12__box::after{inset:-6px;transform:rotateX(45deg);border-color:rgba(108,92,231,.2)} @keyframes ld-12-box-spin{to{transform:rotateX(360deg) rotateY(360deg)}} @media(prefers-reduced-motion:reduce){ .ld-12__cube,.ld-12__fold span,.ld-12__box{animation:none} } ``` ### 13. CSS Wave Bars Audio Loader **Type:** Pure CSS **Description:** Four music-visualiser CSS loaders — classic audio bars, a 10-band spectrum analyser, a waveform timeline, and a dual-channel VU meter — styled with a retro green terminal palette. **HTML:** ```html
        Audio Bars
        Spectrum
        Waveform
        ``` **CSS:** ```css .ld-13,.ld-13 *,.ld-13 *::before,.ld-13 *::after{box-sizing:border-box;margin:0;padding:0} .ld-13{ --bg:#001a00;--c1:#00ff41;--c2:#00cc33;--c3:#39ff14;--c4:#7fff00; background:var(--bg);display:flex;align-items:center;justify-content:center;min-height:100vh;font-family:'Courier New',monospace; } .ld-13__stage{display:flex;gap:70px;flex-wrap:wrap;justify-content:center;padding:40px;align-items:center} .ld-13__cell{display:flex;flex-direction:column;align-items:center;gap:20px} .ld-13__label{color:rgba(0,255,65,.3);font-size:11px;letter-spacing:1.5px;text-transform:uppercase} /* Classic audio bars */ .ld-13__bars{display:flex;gap:4px;align-items:flex-end;height:50px} .ld-13__bars span{width:6px;border-radius:3px 3px 0 0;background:var(--c1);box-shadow:0 0 6px var(--c1);animation:ld-13-bar 0.9s ease-in-out infinite alternate} .ld-13__bars span:nth-child(1){height:15px;animation-delay:0s} .ld-13__bars span:nth-child(2){height:35px;animation-delay:.05s;background:var(--c2)} .ld-13__bars span:nth-child(3){height:50px;animation-delay:.1s} .ld-13__bars span:nth-child(4){height:28px;animation-delay:.15s;background:var(--c3)} .ld-13__bars span:nth-child(5){height:42px;animation-delay:.2s} .ld-13__bars span:nth-child(6){height:20px;animation-delay:.25s;background:var(--c2)} .ld-13__bars span:nth-child(7){height:36px;animation-delay:.3s} @keyframes ld-13-bar{0%{transform:scaleY(.3)}100%{transform:scaleY(1)}} /* Spectrum */ .ld-13__spectrum{display:flex;gap:3px;align-items:center;height:60px} .ld-13__spectrum span{width:5px;border-radius:3px;background:linear-gradient(to top,var(--c1),var(--c4));animation:ld-13-spectrum 1.2s ease-in-out infinite} .ld-13__spectrum span:nth-child(1){animation-delay:0s} .ld-13__spectrum span:nth-child(2){animation-delay:.05s} .ld-13__spectrum span:nth-child(3){animation-delay:.1s} .ld-13__spectrum span:nth-child(4){animation-delay:.15s} .ld-13__spectrum span:nth-child(5){animation-delay:.2s} .ld-13__spectrum span:nth-child(6){animation-delay:.25s} .ld-13__spectrum span:nth-child(7){animation-delay:.3s} .ld-13__spectrum span:nth-child(8){animation-delay:.35s} .ld-13__spectrum span:nth-child(9){animation-delay:.4s} .ld-13__spectrum span:nth-child(10){animation-delay:.45s} @keyframes ld-13-spectrum{0%,100%{height:8px;opacity:.4}50%{height:52px;opacity:1}} /* Waveform line */ .ld-13__wave-line{width:160px;height:40px;display:flex;gap:2px;align-items:center} .ld-13__wave-line span{flex:1;border-radius:2px;background:var(--c1);animation:ld-13-wave 1s ease-in-out infinite} .ld-13__wave-line span:nth-child(1){animation-delay:0s} .ld-13__wave-line span:nth-child(2){animation-delay:.06s} .ld-13__wave-line span:nth-child(3){animation-delay:.12s} .ld-13__wave-line span:nth-child(4){animation-delay:.18s} .ld-13__wave-line span:nth-child(5){animation-delay:.24s} .ld-13__wave-line span:nth-child(6){animation-delay:.30s} .ld-13__wave-line span:nth-child(7){animation-delay:.36s} .ld-13__wave-line span:nth-child(8){animation-delay:.42s} .ld-13__wave-line span:nth-child(9){animation-delay:.48s} .ld-13__wave-line span:nth-child(10){animation-delay:.54s} .ld-13__wave-line span:nth-child(11){animation-delay:.60s} .ld-13__wave-line span:nth-child(12){animation-delay:.66s} @keyframes ld-13-wave{0%,100%{height:4px}50%{height:36px}} /* VU Meter */ .ld-13__vu{display:flex;gap:6px} .ld-13__vu-col{display:flex;flex-direction:column;gap:2px} .ld-13__vu-seg{width:12px;height:6px;border-radius:1px;background:rgba(0,255,65,.12);animation:ld-13-vu 1.2s ease-in-out infinite} .ld-13__vu-col:nth-child(1) .ld-13__vu-seg:nth-child(1){animation-delay:0s;--h:6} .ld-13__vu-col:nth-child(1) .ld-13__vu-seg:nth-child(2){animation-delay:.05s} .ld-13__vu-col:nth-child(1) .ld-13__vu-seg:nth-child(3){animation-delay:.1s} .ld-13__vu-col:nth-child(1) .ld-13__vu-seg:nth-child(4){animation-delay:.15s} .ld-13__vu-col:nth-child(1) .ld-13__vu-seg:nth-child(5){animation-delay:.2s;background:rgba(255,255,0,.12)} .ld-13__vu-col:nth-child(1) .ld-13__vu-seg:nth-child(6){animation-delay:.25s;background:rgba(255,0,0,.12)} .ld-13__vu-col:nth-child(2) .ld-13__vu-seg:nth-child(1){animation-delay:.1s} .ld-13__vu-col:nth-child(2) .ld-13__vu-seg:nth-child(2){animation-delay:.15s} .ld-13__vu-col:nth-child(2) .ld-13__vu-seg:nth-child(3){animation-delay:.2s} .ld-13__vu-col:nth-child(2) .ld-13__vu-seg:nth-child(4){animation-delay:.25s} .ld-13__vu-col:nth-child(2) .ld-13__vu-seg:nth-child(5){animation-delay:.3s;background:rgba(255,255,0,.12)} .ld-13__vu-col:nth-child(2) .ld-13__vu-seg:nth-child(6){animation-delay:.35s;background:rgba(255,0,0,.12)} @keyframes ld-13-vu{0%,100%{background:rgba(0,255,65,.08)}50%{background:var(--c1);box-shadow:0 0 4px var(--c1)}} @media(prefers-reduced-motion:reduce){ .ld-13__bars span,.ld-13__spectrum span,.ld-13__wave-line span,.ld-13__vu-seg{animation:none;height:20px} } ``` ### 14. CSS Morphing Square Loader **Type:** Pure CSS **Description:** Four square-based CSS loaders — a border-radius morph, a corner-orbit rotation, a four-square chase path, and a perspective 3D flip — demonstrating CSS shape-shifting and spatial transforms. **HTML:** ```html
        Morphing
        Corner Orbit
        Chase Squares
        3D Flip
        ``` **CSS:** ```css .ld-14,.ld-14 *,.ld-14 *::before,.ld-14 *::after{box-sizing:border-box;margin:0;padding:0} .ld-14{ --bg:#1a0533;--c1:#d63af9;--c2:#7c3aed;--c3:#ec4899;--c4:#f59e0b; background:var(--bg);display:flex;align-items:center;justify-content:center;min-height:100vh;font-family:'Segoe UI',sans-serif; } .ld-14__stage{display:flex;gap:70px;flex-wrap:wrap;justify-content:center;padding:40px;align-items:center} .ld-14__cell{display:flex;flex-direction:column;align-items:center;gap:20px} .ld-14__label{color:rgba(255,255,255,.35);font-size:11px;letter-spacing:1.5px;text-transform:uppercase} /* Morph shape */ .ld-14__morph{width:60px;height:60px;background:linear-gradient(135deg,var(--c1),var(--c2));animation:ld-14-morph 3s ease-in-out infinite} @keyframes ld-14-morph{0%{border-radius:4px;transform:rotate(0)}25%{border-radius:50%;transform:rotate(90deg)}50%{border-radius:4px;transform:rotate(180deg)}75%{border-radius:50% 4px;transform:rotate(270deg)}100%{border-radius:4px;transform:rotate(360deg)}} /* Square orbit */ .ld-14__sq-orbit{width:60px;height:60px;position:relative;animation:ld-14-orbit 2s linear infinite} .ld-14__sq-orbit span{position:absolute;width:14px;height:14px;background:var(--c3);border-radius:2px} .ld-14__sq-orbit span:nth-child(1){top:0;left:0} .ld-14__sq-orbit span:nth-child(2){top:0;right:0;background:var(--c1);animation:ld-14-sq-pulse .5s ease-in-out infinite alternate} .ld-14__sq-orbit span:nth-child(3){bottom:0;right:0;background:var(--c4)} .ld-14__sq-orbit span:nth-child(4){bottom:0;left:0;background:var(--c2)} @keyframes ld-14-orbit{to{transform:rotate(360deg)}} @keyframes ld-14-sq-pulse{to{border-radius:50%}} /* Chase squares */ .ld-14__chase-sq{width:60px;height:60px;position:relative} .ld-14__chase-sq span{position:absolute;width:20px;height:20px;border-radius:3px;animation:ld-14-chase-sq 1.5s ease-in-out infinite} .ld-14__chase-sq span:nth-child(1){background:var(--c1);animation-delay:0s} .ld-14__chase-sq span:nth-child(2){background:var(--c2);animation-delay:.375s} .ld-14__chase-sq span:nth-child(3){background:var(--c3);animation-delay:.75s} .ld-14__chase-sq span:nth-child(4){background:var(--c4);animation-delay:1.125s} @keyframes ld-14-chase-sq{ 0%{transform:translate(0,0)} 25%{transform:translate(40px,0)} 50%{transform:translate(40px,40px)} 75%{transform:translate(0,40px)} 100%{transform:translate(0,0)} } /* Spinner square */ .ld-14__sq-spin{width:44px;height:44px;border:4px solid var(--c4);border-radius:4px;animation:ld-14-sq-spin 1.2s ease-in-out infinite} @keyframes ld-14-sq-spin{0%{transform:perspective(120px) rotateX(0) rotateY(0)}50%{transform:perspective(120px) rotateX(-180deg) rotateY(0)}100%{transform:perspective(120px) rotateX(-180deg) rotateY(-180deg)}} @media(prefers-reduced-motion:reduce){ .ld-14__morph,.ld-14__sq-orbit,.ld-14__sq-orbit span,.ld-14__chase-sq span,.ld-14__sq-spin{animation:none} } ``` ### 15. CSS Orbit Planet Loader **Type:** Pure CSS **Description:** Three space-themed CSS loaders — a multi-orbit solar system, a conic-gradient comet trail, and binary orbiting stars — evoking astronomy dashboards and data pipeline visualisations. **HTML:** ```html
        ``` **CSS:** ```css .ld-15,.ld-15 *,.ld-15 *::before,.ld-15 *::after{box-sizing:border-box;margin:0;padding:0} .ld-15{ --bg:#01020a;--c1:#4fc3f7;--c2:#f48fb1;--c3:#a5d6a7;--c4:#ffe082;--c5:#cf94da; background:var(--bg);display:flex;align-items:center;justify-content:center;min-height:100vh;font-family:'Segoe UI',sans-serif; } .ld-15__stage{display:flex;gap:80px;flex-wrap:wrap;justify-content:center;padding:40px;align-items:center} .ld-15__cell{display:flex;flex-direction:column;align-items:center;gap:24px} .ld-15__label{color:rgba(255,255,255,.3);font-size:11px;letter-spacing:1.5px;text-transform:uppercase} /* Multi-orbit solar */ .ld-15__solar{width:120px;height:120px;position:relative;display:flex;align-items:center;justify-content:center} .ld-15__sun{width:18px;height:18px;border-radius:50%;background:var(--c4);box-shadow:0 0 16px var(--c4),0 0 32px rgba(255,224,130,.3)} .ld-15__orbit-ring{position:absolute;border-radius:50%;border:1px solid rgba(255,255,255,.08)} .ld-15__orbit-ring:nth-child(2){width:44px;height:44px;animation:ld-15-orbit 1.2s linear infinite} .ld-15__orbit-ring:nth-child(3){width:72px;height:72px;animation:ld-15-orbit 2s linear infinite} .ld-15__orbit-ring:nth-child(4){width:100px;height:100px;animation:ld-15-orbit 3s linear infinite} .ld-15__planet{position:absolute;border-radius:50%;top:-5px;left:50%;transform:translateX(-50%)} .ld-15__orbit-ring:nth-child(2) .ld-15__planet{width:8px;height:8px;background:var(--c1);box-shadow:0 0 6px var(--c1)} .ld-15__orbit-ring:nth-child(3) .ld-15__planet{width:10px;height:10px;background:var(--c2);box-shadow:0 0 8px var(--c2)} .ld-15__orbit-ring:nth-child(4) .ld-15__planet{width:7px;height:7px;background:var(--c3);box-shadow:0 0 6px var(--c3)} @keyframes ld-15-orbit{to{transform:rotate(360deg)}} /* Comet orbit */ .ld-15__comet-orbit{width:90px;height:90px;position:relative} .ld-15__comet-orbit::before{content:'';position:absolute;inset:0;border-radius:50%;border:1px solid rgba(255,255,255,.06)} .ld-15__comet-dot{width:10px;height:10px;border-radius:50%;background:var(--c5);box-shadow:0 0 10px var(--c5);position:absolute;top:-5px;left:50%;transform:translateX(-50%);transform-origin:45px 50px;animation:ld-15-orbit 1.8s linear infinite} .ld-15__comet-trail{position:absolute;inset:0;border-radius:50%;background:conic-gradient(transparent 75%,rgba(207,148,218,.3));animation:ld-15-orbit 1.8s linear infinite;-webkit-mask:radial-gradient(farthest-side,#0000 calc(100% - 2px),#000 0)} /* Binary stars */ .ld-15__binary{width:90px;height:90px;position:relative;display:flex;align-items:center;justify-content:center} .ld-15__binary-wrap{width:60px;height:60px;position:relative;animation:ld-15-orbit 2s linear infinite} .ld-15__star{position:absolute;border-radius:50%;top:50%;transform:translateY(-50%)} .ld-15__star:nth-child(1){left:0;width:14px;height:14px;background:var(--c4);box-shadow:0 0 10px var(--c4);margin-top:-7px} .ld-15__star:nth-child(2){right:0;width:10px;height:10px;background:var(--c1);box-shadow:0 0 8px var(--c1);margin-top:-5px} @media(prefers-reduced-motion:reduce){ .ld-15__orbit-ring,.ld-15__comet-dot,.ld-15__comet-trail,.ld-15__binary-wrap{animation:none} } ``` ### 16. CSS Typing Dots Loader **Type:** Pure CSS **Description:** Four conversational CSS loaders — a chat-bubble typing indicator, an inline AI-thinking status, a cursor blink, and a bouncing dot trio — matching the patterns used in messaging and AI product UIs. **HTML:** ```html
        Chat bubble
        ``` **CSS:** ```css .ld-16,.ld-16 *,.ld-16 *::before,.ld-16 *::after{box-sizing:border-box;margin:0;padding:0} .ld-16{ --bg:#1c1c2e;--c1:#e2e8f0;--c2:#94a3b8;--c3:#38bdf8;--c4:#a78bfa; background:var(--bg);display:flex;align-items:center;justify-content:center;min-height:100vh;font-family:'Segoe UI',sans-serif; } .ld-16__stage{display:flex;gap:28px;flex-direction:column;align-items:flex-start;padding:40px;max-width:400px;width:100%} .ld-16__label-row{color:rgba(255,255,255,.3);font-size:10px;letter-spacing:1.5px;text-transform:uppercase;margin-bottom:4px} /* Chat bubble with typing dots */ .ld-16__bubble{background:#2d2d44;border-radius:18px 18px 18px 4px;padding:14px 18px;display:inline-flex;align-items:center;gap:6px;max-width:180px} .ld-16__bubble span{width:8px;height:8px;border-radius:50%;background:var(--c2);animation:ld-16-typing 1.2s ease-in-out infinite} .ld-16__bubble span:nth-child(1){animation-delay:0s} .ld-16__bubble span:nth-child(2){animation-delay:.2s} .ld-16__bubble span:nth-child(3){animation-delay:.4s} @keyframes ld-16-typing{0%,60%,100%{transform:translateY(0);opacity:.4}30%{transform:translateY(-6px);opacity:1}} /* Inline text dots */ .ld-16__inline{display:flex;align-items:center;gap:8px;color:var(--c2);font-size:14px} .ld-16__inline-dots{display:flex;gap:3px} .ld-16__inline-dots span{width:5px;height:5px;border-radius:50%;background:var(--c3);animation:ld-16-typing 1s ease-in-out infinite} .ld-16__inline-dots span:nth-child(1){animation-delay:0s} .ld-16__inline-dots span:nth-child(2){animation-delay:.15s} .ld-16__inline-dots span:nth-child(3){animation-delay:.3s} /* Cursor blink */ .ld-16__cursor-wrap{color:var(--c1);font-size:16px;display:flex;align-items:center;gap:2px} .ld-16__cursor{width:2px;height:20px;background:var(--c4);animation:ld-16-blink 1s step-end infinite} @keyframes ld-16-blink{0%,100%{opacity:1}50%{opacity:0}} /* Processing dots large */ .ld-16__processing{display:flex;gap:10px;align-items:center} .ld-16__processing span{width:12px;height:12px;border-radius:50%;background:var(--c4);animation:ld-16-proc 1.4s ease-in-out infinite} .ld-16__processing span:nth-child(1){animation-delay:0s} .ld-16__processing span:nth-child(2){animation-delay:.2s;background:var(--c3)} .ld-16__processing span:nth-child(3){animation-delay:.4s;background:var(--c4)} @keyframes ld-16-proc{0%,80%,100%{transform:scale(.6) translateY(0);opacity:.4}40%{transform:scale(1) translateY(-10px);opacity:1}} @media(prefers-reduced-motion:reduce){ .ld-16__bubble span,.ld-16__inline-dots span,.ld-16__cursor,.ld-16__processing span{animation:none} } ``` ### 17. CSS Staircase Step Loader **Type:** Pure CSS **Description:** Three step-progression CSS loaders — a cascading staircase bar chart, a 3×3 pulsing grid, and a multi-bar equaliser — representing data loading, task processing, and multi-step upload flows. **HTML:** ```html
        ``` **CSS:** ```css .ld-17,.ld-17 *,.ld-17 *::before,.ld-17 *::after{box-sizing:border-box;margin:0;padding:0} .ld-17{ --bg:#0f1923;--c1:#f0db4f;--c2:#e8834a;--c3:#4ecdc4;--c4:#ff6b6b; background:var(--bg);display:flex;align-items:center;justify-content:center;min-height:100vh;font-family:'Segoe UI',sans-serif; } .ld-17__stage{display:flex;gap:80px;flex-wrap:wrap;justify-content:center;padding:40px;align-items:center} .ld-17__cell{display:flex;flex-direction:column;align-items:center;gap:24px} .ld-17__label{color:rgba(255,255,255,.35);font-size:11px;letter-spacing:1.5px;text-transform:uppercase} /* Staircase ascending */ .ld-17__stairs{display:flex;gap:4px;align-items:flex-end;height:60px} .ld-17__step{width:12px;border-radius:2px 2px 0 0;animation:ld-17-step 1.4s ease-in-out infinite} .ld-17__step:nth-child(1){height:10px;background:var(--c1);animation-delay:0s} .ld-17__step:nth-child(2){height:20px;background:var(--c2);animation-delay:.15s} .ld-17__step:nth-child(3){height:32px;background:var(--c3);animation-delay:.3s} .ld-17__step:nth-child(4){height:44px;background:var(--c4);animation-delay:.45s} .ld-17__step:nth-child(5){height:56px;background:var(--c1);animation-delay:.6s} @keyframes ld-17-step{0%,100%{opacity:.3;transform:scaleY(.8)}50%{opacity:1;transform:scaleY(1)}} /* Tetris-style blocks */ .ld-17__tetris{width:60px;height:60px;display:grid;grid-template-columns:repeat(3,1fr);gap:3px} .ld-17__block{border-radius:3px;background:rgba(255,255,255,.06);animation:ld-17-block 2.1s ease-in-out infinite} .ld-17__block:nth-child(1){animation-delay:0s;background:rgba(240,219,79,.12)} .ld-17__block:nth-child(2){animation-delay:.14s} .ld-17__block:nth-child(3){animation-delay:.28s;background:rgba(78,205,196,.12)} .ld-17__block:nth-child(4){animation-delay:.42s} .ld-17__block:nth-child(5){animation-delay:.56s;background:rgba(255,107,107,.12)} .ld-17__block:nth-child(6){animation-delay:.70s} .ld-17__block:nth-child(7){animation-delay:.84s;background:rgba(240,219,79,.12)} .ld-17__block:nth-child(8){animation-delay:.98s} .ld-17__block:nth-child(9){animation-delay:1.12s;background:rgba(78,205,196,.12)} @keyframes ld-17-block{0%,100%{opacity:.15}50%{opacity:1;transform:scale(1.05)}} /* Equalizer */ .ld-17__eq{display:flex;gap:5px;align-items:center;height:60px} .ld-17__eq-bar{width:10px;border-radius:5px;background:var(--c3);animation:ld-17-eq 1s ease-in-out infinite} .ld-17__eq-bar:nth-child(1){animation-delay:0s} .ld-17__eq-bar:nth-child(2){animation-delay:.1s;background:var(--c4)} .ld-17__eq-bar:nth-child(3){animation-delay:.2s} .ld-17__eq-bar:nth-child(4){animation-delay:.3s;background:var(--c1)} .ld-17__eq-bar:nth-child(5){animation-delay:.4s} @keyframes ld-17-eq{0%{height:8px}25%{height:40px}50%{height:20px}75%{height:55px}100%{height:8px}} @media(prefers-reduced-motion:reduce){ .ld-17__step,.ld-17__block,.ld-17__eq-bar{animation:none} } ``` ### 18. CSS Infinity Loop Loader **Type:** Pure CSS **Description:** Three infinity and loop CSS loaders — a lemniscate dot path, an SVG animateMotion tracer, and a Möbius counter-spin — creating hypnotic continuous-flow loading indicators. **HTML:** ```html
        ``` **CSS:** ```css .ld-18,.ld-18 *,.ld-18 *::before,.ld-18 *::after{box-sizing:border-box;margin:0;padding:0} .ld-18{ --bg:#05050a;--c1:#00e5ff;--c2:#ff1744;--c3:#76ff03;--c4:#ffea00; background:var(--bg);display:flex;align-items:center;justify-content:center;min-height:100vh;font-family:'Segoe UI',sans-serif; } .ld-18__stage{display:flex;gap:80px;flex-wrap:wrap;justify-content:center;padding:40px;align-items:center} .ld-18__cell{display:flex;flex-direction:column;align-items:center;gap:24px} .ld-18__label{color:rgba(255,255,255,.3);font-size:11px;letter-spacing:1.5px;text-transform:uppercase} /* Figure-8 / Infinity */ .ld-18__infinity{width:100px;height:50px;position:relative} .ld-18__infinity svg{width:100px;height:50px} .ld-18__inf-path{fill:none;stroke:rgba(0,229,255,.15);stroke-width:3} .ld-18__inf-dot{animation:ld-18-inf-move 2s linear infinite} @keyframes ld-18-inf-move{0%{offset-distance:0%}100%{offset-distance:100%}} /* Lemniscate dot tracker */ .ld-18__lemniscate{width:110px;height:55px;position:relative} .ld-18__lem-track{position:absolute;inset:0} .ld-18__lem-dot{width:10px;height:10px;border-radius:50%;background:var(--c1);box-shadow:0 0 10px var(--c1);position:absolute;animation:ld-18-lem 2.4s ease-in-out infinite} .ld-18__lem-dot:nth-child(1){animation-delay:0s} .ld-18__lem-dot:nth-child(2){animation-delay:.8s;background:var(--c2);box-shadow:0 0 10px var(--c2)} .ld-18__lem-dot:nth-child(3){animation-delay:1.6s;background:var(--c3);box-shadow:0 0 10px var(--c3)} @keyframes ld-18-lem{ 0%{top:22px;left:50px} 12.5%{top:2px;left:80px} 25%{top:22px;left:100px} 37.5%{top:42px;left:80px} 50%{top:22px;left:50px} 62.5%{top:2px;left:20px} 75%{top:22px;left:0px} 87.5%{top:42px;left:20px} 100%{top:22px;left:50px} } /* Möbius strip illusion */ .ld-18__mobius{width:90px;height:45px;position:relative} .ld-18__mobius::before,.ld-18__mobius::after{content:'';position:absolute;border-radius:50px;border:4px solid transparent} .ld-18__mobius::before{width:40px;height:40px;top:0;left:0;border-top-color:var(--c4);border-left-color:var(--c4);animation:ld-18-mob1 2s ease-in-out infinite} .ld-18__mobius::after{width:40px;height:40px;top:0;right:0;border-bottom-color:var(--c2);border-right-color:var(--c2);animation:ld-18-mob2 2s ease-in-out infinite} @keyframes ld-18-mob1{0%{transform:rotate(0)}100%{transform:rotate(360deg)}} @keyframes ld-18-mob2{0%{transform:rotate(0)}100%{transform:rotate(-360deg)}} @media(prefers-reduced-motion:reduce){ .ld-18__inf-dot,.ld-18__lem-dot,.ld-18__mobius::before,.ld-18__mobius::after{animation:none} } ``` ### 19. CSS Gradient Conic Spinner **Type:** Pure CSS **Description:** Six conic-gradient CSS spinners — rainbow sweep, sunset arc, dual-sweep, thick gradient arc, nested concentric conics, and a glowing comet — demonstrating the full expressive range of conic-gradient masking. **HTML:** ```html
        Rainbow Conic
        Sunset Arc
        Dual Sweep
        Thick Arc
        Nested Conic
        Glow Conic
        ``` **CSS:** ```css .ld-19,.ld-19 *,.ld-19 *::before,.ld-19 *::after{box-sizing:border-box;margin:0;padding:0} .ld-19{ --bg:#0a0a0a;--c1:#ff6b6b;--c2:#ffd93d;--c3:#6bcb77;--c4:#4d96ff;--c5:#c77dff; background:var(--bg);display:flex;align-items:center;justify-content:center;min-height:100vh;font-family:'Segoe UI',sans-serif; } .ld-19__stage{display:flex;gap:48px;flex-wrap:wrap;justify-content:center;padding:40px} .ld-19__cell{display:flex;flex-direction:column;align-items:center;gap:18px} .ld-19__label{color:rgba(255,255,255,.35);font-size:11px;letter-spacing:1.5px;text-transform:uppercase} /* Rainbow conic */ .ld-19__rainbow{width:70px;height:70px;border-radius:50%;background:conic-gradient(var(--c1),var(--c2),var(--c3),var(--c4),var(--c5),var(--c1));animation:ld-19-spin 1s linear infinite;-webkit-mask:radial-gradient(farthest-side,#0000 calc(100% - 6px),#000 0)} @keyframes ld-19-spin{to{transform:rotate(360deg)}} /* Sunset conic */ .ld-19__sunset{width:70px;height:70px;border-radius:50%;background:conic-gradient(transparent 30%,#ff6b6b,#ffd93d,transparent 70%);animation:ld-19-spin 1.5s linear infinite;-webkit-mask:radial-gradient(farthest-side,#0000 calc(100% - 5px),#000 0)} /* Dual-sweep */ .ld-19__dual-sweep{width:70px;height:70px;border-radius:50%;background:conic-gradient(var(--c4) 0deg,transparent 120deg,var(--c5) 180deg,transparent 300deg,var(--c4) 360deg);animation:ld-19-spin 1.2s linear infinite;-webkit-mask:radial-gradient(farthest-side,#0000 calc(100% - 5px),#000 0)} /* Thick gradient arc */ .ld-19__thick{width:70px;height:70px;border-radius:50%;background:conic-gradient(transparent 20%,var(--c3),#4d96ff,transparent 80%);animation:ld-19-spin 2s ease-in-out infinite;-webkit-mask:radial-gradient(farthest-side,#0000 calc(100% - 10px),#000 0)} /* Nested conic */ .ld-19__nested{width:70px;height:70px;position:relative} .ld-19__nested span{position:absolute;border-radius:50%;background:conic-gradient(transparent 70%,currentColor);animation:ld-19-spin linear infinite;-webkit-mask:radial-gradient(farthest-side,#0000 calc(100% - 4px),#000 0)} .ld-19__nested span:nth-child(1){inset:0;color:var(--c1);animation-duration:1s} .ld-19__nested span:nth-child(2){inset:10px;color:var(--c3);animation-duration:1.5s;animation-direction:reverse} .ld-19__nested span:nth-child(3){inset:20px;color:var(--c4);animation-duration:2s} /* Glow conic */ .ld-19__glow{width:70px;height:70px;border-radius:50%;background:conic-gradient(transparent 40%,var(--c5),white,var(--c5),transparent 60%);animation:ld-19-spin 1.5s linear infinite;-webkit-mask:radial-gradient(farthest-side,#0000 calc(100% - 6px),#000 0);filter:drop-shadow(0 0 6px var(--c5))} @media(prefers-reduced-motion:reduce){ .ld-19__rainbow,.ld-19__sunset,.ld-19__dual-sweep,.ld-19__thick,.ld-19__nested span,.ld-19__glow{animation:none} } ``` ### 20. CSS Particle Burst Loader **Type:** Pure CSS **Description:** Three particle CSS loaders — a radial burst with eight directional particles, floating ascending particles, and a 12-arm pulsing starburst — creating energetic, attention-grabbing loading states. **HTML:** ```html
        ``` **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
        ``` **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
        0%
        Preparing your tour 0%
        ``` **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
        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
        Welcome back
        Sign in to continue
        No account? Create one
        ``` **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
        LOG IN
        ``` **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
        Account Login
        Forgot?
        ``` **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
        Sign in
        Reset password
        ``` **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
        Sign in with magic link
        We'll email you a one-time link. No password needed.
        ``` **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
        ~/login
        $ auth login
        user:
        pass:
        ``` **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
        Welcome
        Sign in to your workspace
        ``` **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
        Sign in
        Forgot your password?
        ``` **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
        Sign in
        or
        By continuing you agree to our Terms
        ``` **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
        Sign in to Codefronts
        Use your email and password to continue
        ``` **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

        Sign in

        Welcome back. Continue where you left off.

        ``` **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
        1 of 2
        What's your email?
        Now your password
        ``` **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

        Sign in

        A small bit of magic, every time.

        ``` **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

        Vault access

        Authenticate to view encrypted contents

        ``` **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

        Sign in.

        No frills. Get back to work.

        ``` **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

        Sign in

        Forgot password?
        ``` **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

        Enter code

        We sent a 6-digit code to jane@example.com

        Verification code

        Didn't get it? Resend code

        ``` **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

        Create account

        ``` **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

        Enter PIN

        ``` **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

        Sign in

        Inputs validate as you type

        ``` **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

        Welcome traveller

        Sign in to continue your journey

        ``` **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

        Use your passkey

        Touch the sensor or use Face ID


        or sign in with password
        ``` **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
        ``` **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
        M
        Maria Chen
        Lead UI Designer · 2h ago
        🎨
        Just shipped the new icon system for our design tokens library. 340 icons, fully optimised SVGs!
        Revenue · June 2025
        $84,240
        ↑ 12.4% vs last month
        Goal progress84%
        2,840
        New customers
        94.2%
        Satisfaction
        🎵
        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
        📅
        Team Standup
        Today · 10:00 AM – 10:30 AM
        📍 Google Meet · join.meet.com/abc-xyz
        👥 Priya, Alex, Sam +3
        Sprint Goal Achieved
        All 24 story points completed ahead of schedule.
        24
        Points
        8
        Stories
        0
        Bugs
        JK
        Jordan Kim
        Senior Product Designer at Nexus Co.
        🎨 Figma ✦ Framer ⚡ CSS
        ``` **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
        Home Projects Material Navigation Demo
        Navigation Patterns

        Material Design 3 provides multiple navigation components: the Navigation Drawer (left sidebar) for complex apps, the Navigation Rail (compact vertical) for tablets, the Bottom Navigation Bar for mobile, and the Top Tab Bar for content switching. Each adapts to screen size and app complexity.

        Bottom Navigation Bar
        ``` **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
        ⚠ Please enter a valid email address
        Select & Textarea
        Max 500 characters
        Checkboxes & Radio Buttons
        Preferences
        Plan
        Toggles
        Continuous Slider
        Volume60%
        0100
        Budget$3,000
        $0$10k
        ``` **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.
        Share with people
        🔗
        https://aurora.design/shared/abc123
        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
        Export file as
        ✅ Changes saved to cloud
        Material Design Dialogs & Modals
        Alert dialogs, full dialogs, bottom sheets and snackbars — CSS-only with checkbox-hack
        Alert Dialog
        Discard changes?
        Changes will be lost if you leave this page
        Keep
        Discard
        Confirmation Dialog
        Phone ringtone
        Callisto
        Ganymede
        Luna
        Cancel
        OK
        Snackbar Variants
        Message sent
        Connection lostRetry
        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
        Team Members
        Name Role Status Tasks Completed Joined Actions
        A
        Alex Thompson
        alex@nexus.co
        Lead Designer ● Active
        92%
        23/25 Jan 2023
        M
        Maria Chen
        m.chen@nexus.co
        UI Engineer ● Active
        78%
        14/18 Mar 2023
        J
        Jordan Kim
        j.kim@nexus.co
        Product Manager ◑ In Review
        55%
        11/20 Jun 2023
        S
        Sam Rivera
        s.rivera@nexus.co
        Dev Lead ◔ Pending
        35%
        7/20 Sep 2023
        P
        Priya Nair
        p.nair@nexus.co
        QA Engineer ○ Inactive
        10%
        2/20 Nov 2023
        Rows per page: 10  ·  1–5 of 42
        Recent Transactions
        Date Description Category Status Amount
        Jun 11, 2025AWS InfrastructureCloudPaid-$1,240.00
        Jun 10, 2025Client Invoice #0042RevenueSettled+$8,500.00
        Jun 09, 2025Figma EnterpriseToolsPending-$540.00
        Jun 08, 2025Contractor PaymentPayrollPaid-$2,800.00
        Jun 07, 2025Retainer Fee Q2RevenueProcessing+$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
        Project Overview
        Aurora Design System is a comprehensive Material Design 3 component library. It provides 240+ components, 12 themes and full accessibility compliance out of the box.
        240+
        Components
        12
        Themes
        98%
        Coverage
        4.9★
        Rating
        Analytics Dashboard
        Page views, session durations and conversion rates from the past 30 days. All metrics trending upward.
        84.2k
        Page Views
        3m 42s
        Avg. Session
        6.8%
        Conversion
        Project Settings
        Manage project configuration, API keys, webhooks and team permissions from this panel.
        • Enable dark mode by default
        • Set custom domain: aurora.design
        • Configure Figma plugin sync
        • Manage webhook endpoints
        • Export tokens as CSS variables
        Version History
        Track all changes, releases and rollbacks for your design system.
        • v3.4.0 — New icon set (340 icons)
        • v3.3.2 — Dialog animation fixes
        • v3.3.0 — Tabs & nav rail components
        • v3.2.0 — M3 color scheme support
        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
        Home
        Tab panels with icon + label, following Material Design 3 icon tab guidelines for improved visual hierarchy and tap target accessibility.
        Design Phase
        Create wireframes and high-fidelity designs using the Aurora component library in Figma. Use design tokens for consistency across all breakpoints.
        Development Phase
        Implement components using React and CSS custom properties. Leverage the Aurora npm package for pre-built accessible Material Design 3 components.
        Testing Phase
        Run Playwright visual regression tests, axe accessibility audits and cross-browser compatibility checks. Target >94% code coverage.
        Deployment Phase
        Publish to npm registry, update Figma plugin, generate changelog and notify subscribers. CI/CD pipeline handles versioning automatically.
        ``` **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
        Filter Chips (Interactive — click to toggle)
        Choice Chips (Single Select)
        Input Chips with Avatars
        A
        Alex T.
        M
        Maria C.
        J
        Jordan K.
        S
        Sam R.
        🏷Material Design
        🏷CSS
        🏷UI Components
        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
        Cart
        Completed
        Shipping
        Completed
        3
        Payment
        In progress
        4
        Review
        Pending
        5
        Confirm
        Pending
        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.
        Horizontal Stepper — With Error State
        Upload
        Done
        !
        Validate
        Error
        3
        Process
        Waiting
        4
        Publish
        Waiting
        ⚠ Validation Failed
        3 columns in your CSV are missing required values. Please fix the errors and re-upload your file.
        Vertical Stepper (Accordion)

        Provide your name, email and password to create your account. We'll send a verification email once you submit.

        Select the plan that best fits your needs. You can upgrade or downgrade at any time.

        Free
        $0
        5 projects
        Pro ★
        $12
        Unlimited
        Team
        $49
        20 seats

        Review your selections and confirm. Your workspace will be ready in seconds.

        Shipping Address
        Payment Details
        Order Review
        Aurora Pro (12 months)$144.00
        ShippingFree
        Total$144.00
        ``` **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
        Tooltips — Hover to See
        Edit item
        Delete permanently
        Share with team
        Open settings
        Bold, italic, underline, strikethrough
        Press ⌘K to open the command palette, ⌘S to save, ⌘Z to undo.
        Rich Tooltip (Hover)
        Add to favourites
        Save this item to your favourites list to access it quickly from the sidebar.
        Privacy controls
        Control who can see your profile and how your data is shared. Settings apply immediately.
        Linear Progress Indicators
        Storage used72%
        Upload complete45%
        Confidence score94%
        Loading data…Indeterminate
        Circular Progress Indicators
        75%
        Progress
        45%
        Budget
        90%
        Capacity
        Loading…
        Syncing
        Badges
        3
        99+
        New
        12
        Page Indicator Dots
        ``` **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.

        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.

        Configure how and when you receive notifications — by email, push, or SMS. You can fine-tune per-category preferences.

        Review app permissions, manage connected accounts, set two-factor authentication, and download your data.

        With Leading Icons

        Last password change: 3 months ago. Two-factor authentication is currently disabled. We strongly recommend enabling it for your security.

        You're subscribed to weekly digests, product updates, and security alerts. Marketing emails are currently off.

        FAQ Style

        You are billed monthly on the date you subscribed. Upgrades are prorated and applied immediately; downgrades take effect at the next billing cycle.
        Yes. You can cancel your subscription from the Account settings page. You'll retain access until the end of your current billing period — no partial refunds are issued.
        All data is encrypted at rest (AES-256) and in transit (TLS 1.3). We are SOC 2 Type II certified and undergo annual penetration testing.
        We offer a 14-day free trial on all paid plans. No credit card is required to start — you'll only be charged if you choose to continue after the trial ends.
        ``` **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

        Inbox
        12
        Starred
        Sent
        Drafts
        3
        Trash

        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

        General
        Account
        Notifications
        Display
        Dark Theme
        Currently off
        Language & Region

        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

        Color Roles

        Primary
        On Primary
        Primary Container
        Secondary
        Secondary Cont.
        Tertiary
        Tertiary Cont.
        Surface
        Surface Variant

        Tonal Surfaces

        Primary
        Dark
        Container
        Variant

        Live Preview

        My App
        Filters
        All Recent Starred
        Actions
        +
        ``` **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
        Dashboard
        K
        Total Users
        4,821
        ▲ 12% this month
        Revenue
        $28.4k
        ▲ 8.3% vs last month
        Open Tasks
        143
        ▼ 5 since yesterday
        Recent Activity
        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 ``` **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 ``` **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 ``` **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 ``` **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 ``` **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 ``` **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
        Overview/ Q2 2025
        Day
        Week
        Month
        YTD
        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
        Revenue Breakdown — weekly
        $80K$60K$40K$20K$0
        Recent Events
        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
        Campaigns
        6 active
        CampaignStatusReachCVRProgress
        Spring DropActive48.2K5.4%
        Retarget BActive21.7K3.1%
        Email DripPaused9.4K1.8%
        Paid SearchError
        Traffic Sources
        Organic Search
        68%
        Paid Social
        42%
        Direct
        24%
        Referral
        15%
        Email
        9%
        ``` **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
        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.

        Scroll to discover
        New 2025
        Starting from
        € 1,890
        Handcrafted in FlorenceFree Express ShippingComplimentary Gift WrappingLifetime Authenticity GuaranteeMade-to-Order Available
        Handcrafted in FlorenceFree Express ShippingComplimentary Gift WrappingLifetime Authenticity GuaranteeMade-to-Order Available
        Curated Selections

        New Arrivals

        View all pieces →
        New
        Add to Bag
        Alma Tote
        Full-grain calfskin · Almond
        Add to Bag
        Nox Clutch
        Patent leather · Noir
        −15%
        Add to Bag
        Serene Hobo
        Woven raffia & leather · Sand
        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
        Vera Lindström
        Available for projects

        Visual
        Architect
        & Director

        Art Direction · Branding · UI

        Building brand identities and digital experiences that earn their silence. Stockholm-based, globally engaged.

        01
        Selected Work
        001
        Maison Collective
        Brand Identity · Art Direction
        2025
        002
        Aether Digital
        Product UI · Design System
        2025
        003
        Forma Architecture
        Photography · Editorial
        2024
        004
        Norde Finance
        Motion · Campaign
        2024
        005
        Lune Editorial
        Publication · Typography
        2024
        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 & SystemsStrategy · Visual
        Digital Product DesignUI · UX · Prototyping
        Art DirectionPhoto · Film · Print
        Editorial DesignBooks · Magazines
        Motion & CampaignDigital · Out-of-home
        © 2025 Vera Lindström Studio Stockholm · SE Currently: Available Q3 2025
        ``` **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
        Independent. Rigorous. Since 1882.
        Ledger
        The Journal of Record for Ideas That Matter
        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
        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.

        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
        Press Freedom Index ↓
        38
        Global Literacy Rate
        87%
        Arctic Ice Cover
        −41%
        UN Budget Shortfall
        $2.4B
        Multilateral Treaties
        ↑ 55
        ``` **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
        9:41
        Good morning,
        Elara 👋
        EK
        Total Balance
        $24,832.49
        +$1,204.20 this month
        💹
        +4.2%
        Portfolio
        $8,440
        🎯
        +12%
        Savings Goal
        76%
        Spending
        1W
        1M
        3M
        $3,214
        ↓ $380 vs last month
        Recent
        See all →
        🛒
        Whole Foods Market
        Today, 8:24 AM
        −$62.40
        💰
        Salary Deposit
        Yesterday
        +$5,200.00
        Blue Bottle Coffee
        Mon, May 26
        −$7.80
        🎬
        Netflix
        May 25
        −$18.99
        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
        Quick Actions
        💳
        Virtual Card
        📊
        Analytics
        🔐
        Security
        Upgrade
        ``` **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
        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.

        A
        M
        S
        K
        +
        ★★★★★
        4,200+ teams ship faster with Crest
        99.98%
        Uptime SLA
        1.2s
        Avg Deploy Time
        Live Dashboard · Production
        crest.app/dashboard
        Requests / sec
        12,840
        ● 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
        Why Crest
        THE STACK
        DESERVES
        BETTER

        We built Crest because the status quo is broken. Complex configs, flaky pipelines, and dashboards that tell you nothing useful. Crest is the platform we needed and couldn't find.

        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 YOUR
        best work.

        Join 4,200 teams who stopped fighting their infrastructure and started focusing on what actually matters.

        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
        9:41
        WiFi🔋

        Home

        📈

        Portfolio Value

        +2.4% today

        💳

        Spending

        $342 this week

        🎯

        Savings Goal

        68% complete

        Search

        🛒

        Groceries

        Yesterday

        -$48
        💸

        Transfer received

        2 days ago

        +$200

        Notifications

        ⚠️

        Unusual spend detected

        $340 at Electronics Hub

        Payment cleared

        Rent payment confirmed

        👤

        Jordan Blake

        Premium Member

        🔒

        Security

        🔔

        Notifications

        ``` **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

        ui-components
        A collection of production-ready React components built with TypeScript.
        TypeScript
        ⭐ 842 🍴 124
        api-gateway
        High-performance API gateway with rate limiting and auth middleware.
        Go
        ⭐ 231 🍴 48
        css-animations
        60+ CSS animation demos with no dependencies required.
        CSS
        ⭐ 1.2k 🍴 307
        ``` **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

        Your creative workspace

        Generate, edit, and share stunning visuals with AI-powered tools.

        248
        Creations
        12k
        Views
        94
        Likes
        🖼️
        Gallery
        ✏️
        Edit
        📤
        Share
        Favorites
        ⚙️
        Settings
        ``` **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
        Canvas
        ← 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
        📍
        Directions
        🗺️
        Nearby
        📌
        Save Location
        Share
        📤
        ``` **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
        🔔
        Trending Now
        🎵

        Neon Lights

        Synthwave Collective · 3:42

        🎸

        Midnight Drive

        Neon Atlas · 4:18

        🎹

        Electric Dream

        Pixel Sound · 5:01

        Popular Podcasts
        🧠

        Deep Dives

        128 episodes

        💡

        Tech Talks

        84 episodes

        🌍

        World News

        312 episodes

        🎤

        Interviews

        56 episodes

        Live Radio
        📻

        Synthwave FM

        🔴 Live · 2.4k listeners

        🎶

        Chill Beats

        🔴 Live · 8.1k listeners

        Your Library

        Liked Songs

        248 tracks

        🎼

        My Playlists

        12 playlists

        ``` **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

        Sustainable Living

        Eco-friendly products for a greener lifestyle.

        ♻️

        100% Recycled

        All packaging uses post-consumer materials.

        🌍

        Carbon Neutral

        Certified carbon-neutral shipping worldwide.

        🌿

        Organic

        USDA certified organic ingredients only.

        🐰

        Cruelty-Free

        Never tested on animals. Leaping Bunny certified.

        ``` **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
        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
        SYS · ONLINE
        // 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 →
        🌍

        Global Scale

        Deploy to 32 regions worldwide in a single click.

        Explore Regions →
        💎

        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
        Documents
        🔍
        Folders + New
        📁 Design Assets 48 items
        📁 Client Reports 12 items
        📁 Contracts 7 items
        Recent Files
        📄

        Q4 Summary Report.pdf

        PDF · 2.4 MB

        Today

        14:32

        📊

        Analytics Dashboard.xlsx

        Excel · 840 KB

        Yesterday

        09:15

        🖼️

        Brand Guidelines.fig

        Figma · 18 MB

        Dec 3

        11:00

        ☁️

        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

        🎮

        Pro Controller

        Wireless · 40hr battery

        $79
        🎧

        Gaming Headset

        7.1 Surround · Noise cancel

        $120
        🖥️

        144Hz Monitor

        27" IPS · 1ms response

        $349

        Nature

        🌱

        Succulent Set

        6-pack · Indoor

        $32
        🪴

        Ceramic Planter

        Matte White · 8"

        $28
        🌿

        Plant Fertilizer

        Organic · 500ml

        $14

        Health

        Fitness Tracker

        Heart rate · Sleep

        $89
        💊

        Vitamin D3

        5000 IU · 90 caps

        $22

        Tech

        🎧

        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.label}

        ${c.desc}

        ${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 ☀️
        7.4k
        Steps
        420
        Calories
        6.5h
        Sleep

        Daily Goal

        74% complete — keep going!

        Steps Progress

        7,400 steps10,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 eaten2,000 goal

        Protein · 68g

        Chicken, eggs, Greek yogurt

        Carbs · 142g

        Oats, rice, banana

        Profile
        Your health data
        🏃

        Taylor Kim

        Premium · Since 2022

        Weekly Streak

        ``` **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

        Cover Story

        The Last
        Quiet
        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
        ``` **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

        New Season — SS 2026

        The Art of
        Refinement

        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 the
        future, 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
        🔒
        Secure
        SOC2 Type II
        🌐
        Global
        48 edge nodes
        ``` **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

        Overview

        Your workspace at a glance — updated just now

        Monthly Revenue
        $84.2k
        +12.4%
        Active Users
        4,291
        +8.1%
        Deployments
        138
        −3.2%
        Uptime SLA
        99.97%
        Stable
        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
        ``` **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
        ``` **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
        NOVA CLUB
        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
        $9
        per month
        • 5 active projects
        • 10 GB cloud storage
        • API access (1k req/day)
        • Community support
        Enterprise
        $99
        per month
        • Unlimited everything
        • 1 TB cloud storage
        • Dedicated servers
        • SLA 99.99% uptime
        • White-label option
        ``` **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
        System Controls — v2.4.1
        Neural Link
        OFF
        Threat Scanner
        OFF
        Hologram HUD
        OFF
        Signal Power 65%
        Plasma Charge 40%
        Modules
        Mode
        ``` **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
        #00DBDE
        #FC00FF
        #0057FF
        #8B00FF
        Cyberpunk Gradient
        ELECTRIC
        VOLTAGE
        CYBERPUNK
        CSS Custom Properties — Cyberpunk Palette
        --neon-cyan: #00dbde; /* electric teal */
        --neon-pink: #fc00ff; /* hot magenta */
        --neon-blue: #0057ff; /* deep electric */
        --neon-violet: #8b00ff; /* mid spectrum */
        --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
        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
        Shield
        Power
        Module
        Rating
        Target
        Alert
        ✕ 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
        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
        05:00
        minutes remaining
        ``` **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
        1:28 3:52
        ``` **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
        Climate Control
        Humidity 48% · Feels 23°
        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
        ○ Resting
        box-shadow: 8px 8px 18px #a3b1c6,
        -8px -8px 18px #ffffff;
        Extruded. Light from top-left, dark bottom-right.
        ↑ Hover / Lift
        box-shadow: 12px 12px 26px #a3b1c6,
        -12px -12px 26px #ffffff;
        Shadows grow — surface rises.
        ⬤ Pressed
        box-shadow: inset 6px 6px 14px #a3b1c6,
        inset -6px -6px 14px #fff;
        Inverted inset — surface sinks in.
        02 — Shapes & Variants
        03 — Toggles · Radios · Checks
        Enabled
        Dark Mode
        Notifications
        ``` **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
        Ember & Ash
        SOLARIS & THE ECHO · LIMINAL HOURS
        BPM 124
        1:42 3:47
        Volume
        72
        ``` **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
        02 — Text Input Fields
        ✓ Looks good!
        ✕ Please enter a valid email.
        Strength: Strong
        03 — Checkboxes & Radios
        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
        Power Control
        SYSTEM ON
        Hub Status
        Devices 8 / 10
        Network 5G ▮▮▮▮
        Energy 2.4 kW
        Scenes
        Climate Control
        22°
        Living Room
        ☀ Brightness 78%
        🌀 Fan Speed 3 / 5
        💧 Humidity 55%
        Devices
        ``` **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
        AURUM
        Private Banking
        •••• •••• •••• 7291
        Total Balance
        $48,290.50
        ▲ +$1,240.00 this month
        $6.8k
        Income
        $3.2k
        Spent
        $3.6k
        Saved
        Spending Overview
        72%
        Budget
        Housing
        $1,440
        Food
        $860
        Transport
        $320
        Other
        $240
        Recent Transactions
        Whole Foods Market
        Today · 2:34 PM
        −$84.20
        Groceries
        Salary Deposit
        Yesterday · 9:00 AM
        +$3,400
        Income
        Blue Bottle Coffee
        May 21 · 8:15 AM
        −$7.50
        Dining
        United Airlines
        May 20 · 11:42 AM
        −$342.00
        Travel
        ``` **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
        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
        Live
        18°
        Partly Cloudy
        Feels like 16° · Wind 14 km/h NW
        72%
        Humidity
        14km
        Visibility
        14
        km/h
        20%
        Rain
        Today
        18°
        12°
        Sat
        22°
        14°
        Sun
        20°
        13°
        Mon
        15°
        10°
        Tue
        13°
        10:42:00
        Saturday, May 24, 2026
        AM
        4
        UV
        Moderate
        SPF 30 recommended. Safe until noon.
        🌅 6:14 AM 🌇 8:02 PM
        💧 Humidity
        72%
        Comfortable range
        38
        AQI
        🌿 Air Quality · Good
        PM2.5
        12
        PM10
        22
        O₃
        38
        NO₂
        8
        CO
        0.4
        ``` **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
        Style A — Concave Dimple
        Style B — Pill Segment
        Style C — Card Select
        Checkboxes
        Pure CSS inset · accent fill transition
        Style A — Dimple Box
        Style B — Stamp Pill
        Style C — Card Check
        ``` **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."
        248
        Projects
        14.2k
        Followers
        98%
        Rating
        Neumorphism Design Systems Motion Accessibility
        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
        Marc Osei
        Motion Designer · Apple
        12 mutual connections
        Aiko Tanaka
        UX Researcher · Google
        3 mutual connections
        Dele Owusu
        Product Lead · Notion
        8 mutual connections
        ``` **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
        72%
        CPU
        64%
        RAM
        43%
        GPU
        45°C
        Temp
        2.4W
        Power
        4.2G
        VRAM
        node server.js 58%
        chrome.exe 34%
        figma.desktop 20%
        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
        10:42
        :00 AM
        /* Dark Neu Formula */
        --sd: #0e1425;
        --sl: #263050;
        box-shadow:
          10px 10px 26px var(--sd),
          -8px -8px 20px var(--sl);
        Neon Dusk
        Phantom Circuit · 2026
        1:484:22
        ▲ +12%
        1.2Gb
        Network In
        ▼ −3%
        84W
        Power Draw
        ▲ +5%
        512MB
        Disk Write
        ▲ HIGH
        67°C
        GPU Temp
        ``` **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
        0% of goal reached
        Raised $0K
        Goal $500K
        🌿
        🌱
        🍃
        🌳
        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
        0
        0
        0
        ,
        0
        0
        0
        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
        00
        Days
        :
        00
        Hours
        :
        00
        Min
        :
        00
        Sec
        Until Forma Studio 3.0 is live for everyone.
        ``` **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
        Community Milestone
        +
        0K
        makers, builders & dreamers
        have joined the Forma community.
        🧑
        @lucasdev just joined
        👤
        @yuki_m just joined
        👩
        @hannadesign just joined
        🧑
        @tanyabuild just joined
        👨
        @arjun.io just joined
        👩
        @camille_ux just joined
        🧑
        @lucasdev just joined
        👤
        @yuki_m just joined
        👩
        @hannadesign just joined
        🧑
        @tanyabuild just joined
        👨
        @arjun.io just joined
        👩
        @camille_ux just joined
        +0 this week · growing fast
        ``` **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
        🌿
        0
        tonnes CO₂ saved
        by our fleet this year, equivalent to planting a small forest.
        Annual Target0% Complete
        🌳
        0
        Trees equiv.
        ✈️
        0
        Flights offset
        🏠
        0
        Homes/yr
        ``` **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
        99.000%
        Uptime · Rolling 90 Days

        Daily incident history · 30 days
        30 days agoToday
        ``` **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

        0
        Pages
        0
        Hours
        0
        Min left
        ``` **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
        NVDA · NASDAQ
        Open
        $
        0.00
        +0.00 +0.00% May 19 · 14:32 ET
        Open
        $0
        High
        $0
        Low
        $0
        Vol
        0M
        ``` **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%
        of goal
        0
        Steps Today
        5K
        7.5K
        10K
        15K
        ``` **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,420ETH $3,810GOLD $2,341/oz VIX 14.210Y YIELD 4.38%DXY 104.1 NASDAQ +2.41%DOW +0.87%S&P500 +1.23% BTC $68,420ETH $3,810GOLD $2,341/oz VIX 14.210Y YIELD 4.38%DXY 104.1
        ▼ 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
        REM
        72%
        DEEP
        58%
        LIGHT
        85%
        Aerobic
        0 ml/kg
        VO₂ Max · Excellent
        30D
        52.1
        60D
        51.3
        90D
        49.8
        Nervous System
        0 ms
        Heart Rate Variability
        ↑ 12ms vs baseline
        0 score
        Overall Recovery
        0 / 100
        Body is ready · Optimal Training Zone
        STRAIN
        6.5
        CALORIES
        2,840
        ``` **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
        Return
        0 %
        Annualized
        ◆ ✦ ◆
        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
        #1
        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
        Combat Skills · Analysis
        Accuracy
        94%
        Reaction
        87%
        Strategy
        78%
        Aggression
        91%
        Support
        65%
        Movement
        82%
        ``` **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
        Jan 1 — Mar 31, 2026 · Q1 Report
        7D
        1M
        Q1
        YTD
        Monthly Recurring Revenue
        $0M
        ↑ 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
        Apr
        May
        Jun
        Jul
        Aug
        Sep
        Oct
        Nov
        Dec
        Jan
        Feb
        Mar
        Acquisition Channels Q1 2026
        Organic Search
        34,820
        36.7%
        Paid Ads
        22,190
        23.4%
        Referral
        18,140
        19.1%
        Social
        11,810
        12.5%
        Direct
        7,750
        8.2%
        Key Metrics
        Avg. Session
        Per active user
        0m
        💰
        ARPU
        Monthly average
        $0
        📈
        LTV
        Avg customer
        $0
        CAC
        Blended
        $0
        🎯
        Conv. Rate
        Trial to paid
        0%
        Retention Cohorts
        0%
        D30 Retention
        ↑ 5pp vs benchmark
        D7
        91%
        D30
        78%
        D90
        61%
        ``` **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
        Propulsion
        Thrust Output
        0%
        All engines nominal
        Navigation
        Velocity
        0km/h
        Orbital insertion achieved
        System Status
        LIFE SUPPORT
        POWER GRID
        COMMS LINK
        SOLAR PNL B
        NAVIGATION
        PROPULSION
        GYRO 3
        THERMAL
        Data Feed
        [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
        Telemetry
        PWR
        91%
        TEMP
        67%
        O₂
        88%
        FUEL
        74%
        LOAD
        52%
        Crew
        Aboard
        0crew
        All crew nominal
        Comms
        Signal Strength
        0%
        Uplink: 3 satellites
        Thermal
        External Temp
        0°C
        Shadow pass cycle
        Orbits Completed
        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

        📦

        Shipment #44

        In transit

        ✉️

        3 Inquiries

        Unread

        Autumn / Winter 2024

        The
        Collection

        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

        94k
        Revenue
        38
        Orders
        4.9
        Avg Rating

        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
        Shop Lookbook 🛍 3

        ``` **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}
        ${p.cat}
        ${p.title}
        ${p.price}
        `; 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 BUILD
        BOLD
        FUTURES

        A multi-disciplinary studio pushing the boundaries of brand, motion, and digital experience design.

        142
        Projects
        8yr
        Experience
        4.9
        Avg Rating
        01
        Brand Identity
        Luminary
        Financial
        02
        Digital Experience
        Atlas
        Platform
        03
        Motion & Film
        Epoch
        Campaign
        04
        Product Design
        Nova
        Wearables

        WE ARE
        FORM
        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.

        Brand Design97%
        Web Development92%
        Motion Design88%
        ``` **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
        Overview
        KL
        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
        Direct 42%
        Search 26%
        Social 16%
        Other 16%
        Analytics
        Funnel performance and conversion data.
        Conversion Funnel
        Visitors → Paying customers
        Visitors
        48,291
        Sign-ups
        29,940
        Activated
        18,350
        Trial
        10,141
        Paid
        4,346
        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.
        Recent Transactions
        Export CSV
        Customer
        Amount
        Date
        Status
        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 Invisible
        Library
        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
        The 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
        She 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
        pp. i–ii
        ``` **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.
        木灰釉薬 · Wood-ash glaze
        白泥窯 · 一九八九年創業

        Making is
        a form of
        listening

        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.
        36
        Years at the kiln
        4
        Annual firings
        ~60
        Pieces kept per year
        ``` **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
        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.

        47
        Missions
        99.1%
        Success rate
        4
        Orbiting now

        Core
        Systems

        SYS.001 — SYS.006
        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
        ALTITUDE847.3 km
        INCLINATION89.7°
        VELOCITY7.62 km/s
        BATTERY98.2%
        TEMPERATURE-112°C
        SIGNAL DELAY1.28s
        FAULT COUNT0
        UPTIME14d 08h 33m

        Join the
        mission

        8 open roles · Remote + Berlin
        Principal GNC Engineer
        Guidance & Navigation · Orbital
        Engineering
        Berlin / Remote
        ML Engineer — Flight Systems
        Neural burn optimization
        AI / ML
        Remote
        Thermal Systems Lead
        Materials & thermal design
        Hardware
        Berlin
        Systems Integration Engineer
        Avionics & software
        Systems
        Berlin
        Mission Control Operator
        24/7 ops rotation
        Operations
        Berlin
        ``` **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.

        Maison
        Since 1967
        Ateliers
        Paris · Florence
        Collection
        AH 2025 · 42 looks
        Runway
        Palais Royal, 4 Oct

        The
        Collection

        42 Looks · AH 2025
        Look 01
        L'aube noire
        Look 07
        Le voile froid
        Look 14
        La colonne
        Look 21
        Le bruissement
        Look 38
        La chute
        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
        58
        Years of haute
        couture
        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.

        Address
        24 Rue du Faubourg Saint-Honoré
        Telephone
        +33 1 42 68 00 00
        Fitting hours
        Mar–Sam · 10h–18h
        Correspondence
        atelier@lecluse.paris
        Maison
        ``` **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:~#
        // SYSTEM STATUS
        CPU12%
        MEM68%
        NET I/O2.1 Gb/s
        UPTIME847d
        THREATS3
        INTRUSION0
        NODES48/48
        KERNEL6.8.4

        OPS_STATUS

        UPTIME 847d 14h 22m · ALL SYSTEMS
        Operational
        Perimeter Watch
        Real-time monitoring of 48 network boundary nodes. Zero intrusion events in past 72 hours.
        Last event: 2025-09-01 · False positive
        Operational
        Endpoint XDR
        Extended detection across 2,400 managed endpoints. Behavioral AI scoring all process trees.
        Last quarantine: 2025-09-10 · Ransomware sim
        Degraded
        Intel Feed
        External threat intelligence ingestion partially degraded — 2 upstream providers offline.
        ETA restore: 2025-09-15 09:00 UTC
        Operational
        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.

        THREAT_INTEL

        THREAT LEVEL: ELEVATED
        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

        ./TEAM

        8 OPERATORS · CLEARANCE L4+
        vex
        Lead Analyst
        Vera Okonkwo
        malwareREthreat hunting
        z0r
        Exploit Dev
        Kai Ishikawa
        kernelasmfuzzing
        gh0st
        Red Team Lead
        Lena Brandt
        pentestsocial engAPT sim
        null_ptr
        Platform Eng
        Marcus Webb
        rusteBPFk8s
        ``` **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
        Current Exhibition

        Surface
        /
        Pressure

        New works by Noa Svensson. Painting as excavation — as the removal of what was always already there.

        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
        Groundwork
        Amara Osei
        22 Feb — 10 May 2026
        Upcoming
        04
        Interval
        Group Exhibition
        1 Jun — 30 Aug 2025
        Closed
        05
        After the Voice
        Priya Krishnaswamy
        15 Mar — 28 May 2025
        Closed
        Featured Artist

        Noa
        Svensson

        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.

        42
        Solo exhibitions
        18
        Museums collecting
        2009
        First solo show
        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
        Tues — Friday
        11am — 7pm
        Saturday
        10am — 6pm
        Sunday — Monday
        Closed
        Admission
        Free, always
        Contact
        hello@volta.gallery
        ``` **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
        FORM
        MEETS
        FUNCTION

        Crafting digital experiences that leave a lasting impression. We build at the intersection of art, technology, and human desire.

        Scroll

        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
        8yrExperience
        14Awards
        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.

        Scroll

        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
        Forma Gallery 12 works / parallax grid

        A gallery
        built on depth
        & movement.

        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
        Void Minimal · 2024
        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 / 05
        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
        Scroll to travel
        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

        CSS Parallax · Mouse-Driven Tilt

        Hover over a card
        — any card.

        🌌

        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.

        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
        through
        motion.

        Scroll to blur the world. The color field beneath you fades from vivid to frosted glass as you descend.

        Scroll
        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.

        Depth revealed
        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.

        Color diffused
        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.

        Depth in motion
        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 ``` **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 ``` **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 ``` **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 ``` **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 ``` **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 →

        Solo

        $15/ month

        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

        Pricing with depth.

        Hover to bring a plan forward.

        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
        Pay what you want

        Support the project — name your price.

        The full product is yours regardless of the amount. Pay more if it helps, pay less if it’s tight. We trust you.

        Choose an amount
        • Lifetime access to the full product
        • All future updates included
        • Source files + commercial use rights
        Pay $10 — get it now Pay $5 — get it now Pay $25 — get it now Pay $50 — get it now Enter custom amount →

        No questions asked refund inside 14 days. Powered by Stripe.

        ``` **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

        Pricing in your currency.

        Pay where you live, with the rate fixed at billing time.

        Currency

        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
        ★★★★★ 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

        Pricing without the wall of checkmarks.

        Open any tier to read the full feature list. Tap to collapse.

        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

        Move the light. Read the price.

        Cursor-aware cards. Real cards, real prices, real keyboard support.

        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

        Pay yearly, save real money.

        Same product, two months free when you commit to a year.

        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
        Pricing

        Pick the plan that fits today.

        Upgrade, downgrade, or cancel any time. No fine print.

        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

        Simple pricing, no surprises.

        Three plans. Same product. Pick what you can grow into.

        Basic

        $12/mo

        Just the essentials.

        • 3 projects
        • 5 GB storage
        • Email-only support
        Choose Basic

        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

        Compare every feature.

        Pick the column that matches what you ship today.

        Feature Free
        $0
        RecommendedPro
        $24
        Team
        $48
        Enterprise
        Contact
        Projects 1 10 50 Unlimited
        Storage 500 MB 10 GB 50 GB 500 GB
        Custom domain
        Team roles
        Priority support
        SSO & SAML
        Audit logs
        99.99% SLA
        Dedicated CSM
        Get started Choose Pro → Choose Team Talk to sales
        ``` **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

        Pay how it suits you.

        Switch billing — no contracts, no negotiation.

        Billing cycle

        Hobby

        $0$0forever
        • 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
        Pay-as-you-go

        Only pay for what you actually send.

        Slide to estimate your monthly bill — we round up to the nearest tier so you’re never surprised.

        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

        No demo required. Cancel any time, refund any time within 30 days.

        “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

        Pricing in tiles, not tiers.

        One canvas, three offers, and the proof points that make the choice obvious.

        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

        Grow into the next plan, not out of one.

        Three stops on the same road. Switch up or down with one click.

        1. Free

          $0

          Open-source projects, side experiments, anything you want to ship without a credit card.

          • 1 project
          • 500 MB storage
          • Public repos only
          Start free →
        2. Pro

          $24/mo

          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 →
        3. Enterprise

          Custom

          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.

        PlanSolo
        Cost$8/mo
        Built forIndie devs

        • 1 site, 1 admin
        • 5 GB storage
        • Forum support
        [ Buy Solo ]
        ★ POPULAR
        PlanStudio
        Cost$24/mo
        Built forSmall studios

        • 10 sites, 5 admins
        • 50 GB storage
        • Email support
        • Custom domain
        [ Buy Studio ]
        PlanShop
        Cost$60/mo
        Built forAgencies

        • 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

        Pricing, on the house.

        Three tiers, all built on the same calm interface.

        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
        Build your plan

        Per-seat pricing, calculated live.

        One number to change. Everything else updates with you.

        Billing cycle
        Team size
        Up to 500 seats. Above that, we’ll talk.
        Seats5
        Per seat$12 /mo
        CycleMonthly

        Total today $60.00

        Billed monthly · cancel any time

        Start 14-day trial →
        ``` **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
        68% storage used
        ``` **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. 1Cart
        2. 2Address
        3. 3Payment
        4. 4Confirm
        ``` **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
        Build #482 62%
        Compiling assets · 4.2 MB / 6.8 MB
        ``` **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
        $6,800 raised of $10,000
        ``` **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
        0 score
        ``` **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 ``` **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
        ``` **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
        ``` **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
        ``` **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
        ``` **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
        ``` **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
        ``` **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
        ``` **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
        ``` **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
        ``` **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
        ``` **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
        ``` **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
        ``` **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
        ``` **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
        ``` **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
        ``` **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
        ``` **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
        ``` **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

        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 ``` **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 ``` **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

        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 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.

        Project A
        Project B

        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.

        Strategy
        Design
        Build

        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.

        A
        Alex
        Design
        J
        Jamie
        Dev
        S
        Sam
        Strategy
        R
        Riley
        Growth

        Contact

        Let's talk

        Scroll all the way here and the progress bar is full. The scroll spy updates both the desktop pill and mobile link states simultaneously from one observer loop.

        ``` **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
        FileEditSearchHelp

        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 »
        Codefronts 95
        📑Programs
        📂Documents
        ⚙️Settings
        🔍Find
        Help
        🔌Shut Down…
        📝 Welcome.txt
        ⚠️ Error
        🔊 📅 12:00 PM
        ``` **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...
        HP
        ❤️❤️❤️🤍🤍
        EXP  LV.7 → LV.8
        🪙 x 1280
        ⚔️ ATTACK 🛡️ DEFEND 🎒 ITEMS
        ``` **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
        Brutal Switch
        Status:
        99%Less Gradient
        0pxBorder 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
        ◦ SIDE A · MIXTAPE '88 ◦
        ▶ 02:14 / 04:51
        Volume
        Bass
        Treble
        ``` **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
        👾 🛸 👾 🛸 👾
        © 1986 CODEFRONTS
        insert 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 ~*~

        ★彡 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_Xx06/14/2001kewl site dude!! how'd u make the spinning skull gif?? l8r
        ~PrincessSparkle~06/12/2001omg luv the rainbow text!!1! added u 2 my webring :) :) :)
        webmaster_steve06/09/2001nice tables. all hand-coded HTML, no css frameworks here. RESPECT

        VISITORS

        0024891

        WEBRING

         ❤  
        The 90s Kids Ring

        BADGES

        HTML 4.0 NETSCAPE GEOCITIES Y2K OK
        🚧 UNDER
        CONSTRUCTION 🚧
        Made with Notepad & ♥ · © 2001 Dave · webmaster@daverad.geocities.com
        This page best viewed at 800×600 · Get Netscape Now!
        ``` **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.

        SYNCING…
        68% — 2.4 MB/s
        ``` **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
        The General Goods Co.
        Catalogue No. 47
        EST. 1974 · MAIL ORDER
        ◆ 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.

        25%
        OFF
        This Month Only
        New📻

        Tube Radio

        SKU · 0042
        $38$52
        Add to order
        📷

        Field Camera

        SKU · 0118
        $94
        Add to order
        Sale☎️

        Rotary Phone

        SKU · 0076
        $29$45
        Add to order

        Wind-Up Watch

        SKU · 0203
        $61
        Add to order
        Hot🕹️

        Joystick Set

        SKU · 0159
        $22$30
        Add to order
        🧳

        Travel Trunk

        SKU · 0011
        $110
        Add to order
        To order, ring us today — ☎ 1-800-RETRO-CO
        ``` **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
        FileEditViewSpecial ◐ 88%12:00 PM
        📁Work
        📄Resume
        🗑️Trash
        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.

        CSSMotionWebGLTypePixels
        projects

        Selected Work


        🎨
        Pixel PainterCanvas · 2025
        🎹
        Synth Web ToyWebAudio · 2024
        🌀
        CRT Shader LabGLSL · 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

        Water Ripple Click Effect

        Click anywhere on the surface to create realistic water ripples

        click the surface
        0 Drops
        0 Active Rings
        ``` **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

        Ripple Button Click Animation

        Material-style ink ripple on every button press — pure CSS + minimal JS

        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
        Magenta
        Cyan
        Lime
        Orange
        Electric
        Plasma

        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 Ripple Loading Spinners

        Six ripple-based loaders — pure CSS, no SVG, no JavaScript

        Orbit Ring
        Pulse Expand
        Radar Sweep
        Dot Wave
        Square Ripple
        Double Arc
        ``` **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

        Contacts
        04
        Sweep / min
        20 RPM
        Range
        48 nmi
        Mode
        ACTIVE
        ▌ 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

        Heartbeat Pulse Ripple Effect

        CSS keyframe animation with multi-wave pulse rings and ECG trace

        ❤️
        72 BPM
        ECG · Lead II
        72
        BPM
        98%
        SpO₂
        120
        SBP
        80
        DBP
        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

        Ripple Card Hover Effect

        Radial gradient ripple expands from center on hover — pure CSS transitions

        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

        Sound Wave Ripple Visualizer

        CSS ripple rings, animated EQ bars and a looping SVG waveform

        🔊
        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

        Liquid Drop
        Ripple Animation

        CSS-only falling drops with elliptical surface ripple rings

        Amber
        Indigo
        Rose

        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.

        Sign in

        Good to see
        you again.

        Enter your credentials to continue

        or continue with
        ``` **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
        DEPTH
        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
        Americas91%
        APAC87%
        Western Europe78%
        Eastern Europe73%
        ANZ62%
        Latam58%
        MEA44%
        South Asia31%
        Product health
        Core metrics · rolling 90-day average
        82%
        Conversion
        69%
        Retention
        93%
        Satisfaction
        51%
        Growth MoM
        88%
        NPS Score
        14.2K
        Daily Active
        +9.4%
        3.8s
        Session Length
        +0.3s
        2.1%
        Churn Rate
        −0.4pp
        $84
        Avg Rev/User
        +$12
        ``` **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
        Fauna
        Silent mid-flight
        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
        02 — Compound diagonal
        🔐
        Vault Security
        Zero-knowledge auth and encryption middleware for developer-first security stacks.
        Security
        📡
        Signal Comms
        Unified messaging across channels. One API for email, push, SMS, and webhooks globally.
        Comms
        🧩
        Mosaic UI
        Component library tuned for enterprise design systems. Dark mode native, accessible first.
        Design
        03 — Flip entry
        🚀
        Launch Ops
        Ship faster with automated deployment pipelines, rollback controls, and real-time observability.
        DevOps
        🌐
        Nexus CDN
        Global edge delivery with sub-20ms latency. Smart caching, compression, and DDoS protection.
        Network
        📊
        Prism Reports
        Scheduled and live reporting for finance, ops, and executive teams. Export-ready outputs.
        Analytics
        04 — Z-depth burst
        🤖
        Aria AI
        Embedded AI assistant for any workflow. Train on your data, deploy in hours, iterate endlessly.
        AI
        🔗
        Bridge APIs
        Unified API gateway with rate limiting, auth, versioning, and auto-generated documentation.
        APIs
        🛡️
        Shield IAM
        Identity and access management for multi-cloud environments. RBAC, SSO, and audit trails built-in.
        IAM
        ``` **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
        MURANO
        STUDIO

        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
        48
        Projects built
        14
        Countries
        9
        Awards won
        15yr
        In practice
        "Good architecture makes you forget the building. You only remember what happened inside it."

        — Founder, Murano Studio

        Begin a project
        LET'S BUILD
        something
        LASTING
        hello@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
        0%
        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
        Selected Work — 2019 / 2026

        A list that arrives one row at a time.

        01
        Halcyon Identity SystemBranding · Art Direction
        2026
        02
        Northwind Commerce PlatformProduct Design · Engineering
        2025
        03
        Atlas Editorial RedesignWeb · Typography
        2025
        04
        Lumen Motion LibraryAnimation · Systems
        2024
        05
        Verdant Sustainability ReportData Viz · Layout
        2023
        06
        Strata Mobile BankingUX · Prototyping
        2022
        07
        Cinder Festival CampaignBrand · Print
        2021
        08
        Orbit Developer PortalDocs · 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
        A Parallax Ascent

        Higher
        Ground

        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
        Welcome back, Jane 👋
        Click the button above to slide open the menu — pure CSS only.
        2,847
        Page Views
        94%
        Uptime
        $12.4k
        Revenue
        483
        Users
        ``` **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
        Overview

        Open the drawer to see a frosted backdrop blur overlay appear behind the menu. Clicking the backdrop also closes it.

        99.9%
        Uptime SLA
        4.2ms
        Avg Latency
        18k
        Requests / hr
        0
        Open Incidents
        ``` **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
        Dashboard

        The entire content area physically slides right when the menu opens — true off-canvas push behaviour with zero JS.

        7,291
        Visitors
        89%
        Retention
        $9.1k
        Revenue
        312
        Signups
        ``` **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
        Dashboard
        Hover the icon rail on the left to expand. Labels and badges appear without any JavaScript.
        41
        Active Projects
        98%
        Health Score
        $74k
        Monthly Revenue
        1.2k
        Team Members
        ``` **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
        Home
        Prism / Home
        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.
        5,382
        Sessions
        63%
        Conversion
        228
        Subscribers
        $4.8k
        Revenue
        ``` **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
        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.
        Mastering the CSS Cascade & Specificity
        Deep dive into how browsers resolve style conflicts, the cascade algorithm, and why understanding layers beats specificity hacks.
        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.
        Advanced CSS Custom Properties Techniques
        Beyond basic theming: learn how to use custom properties as data channels, calculation bridges, and runtime animation drivers.
        ``` **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
        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
        Dashboard

        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.

        28
        Active Projects
        142
        Open Tasks
        7
        Team Members
        99%
        SLA
        ``` **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.
        3,091
        Sessions
        71%
        Engagement
        $6.3k
        Revenue
        521
        Sign-ups
        ``` **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.
        12.4k
        Followers
        892
        Likes today
        47
        Published
        3.2k
        Views
        ``` **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.
        0
        Critical
        3
        Warnings
        99.9%
        Uptime
        14ms
        Latency
        ``` **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
        [01]
        Homepage

        Brutalist sidebar using raw black borders, zero gradients, high-contrast type, and a thick red rule as the only decorative element.

        24
        Projects
        08
        Clients
        6yr
        Experience
        100%
        Remote
        ``` **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);
        }
        0 JS
        Lines of JS
        100%
        Pure CSS
        ``` **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
        4.1k
        Events / sec
        8
        Active Streams
        0
        Alerts
        99.8%
        Uptime
        ``` **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
        Dashboard
        Click ‹ to collapse the sidebar from full width to icon-only. Driven by transition: width — zero JS.
        $82k
        Revenue
        1,247
        Orders
        98%
        Uptime
        4.9★
        Rating
        ``` **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
        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
        Workspace · Q4 review

        Overview

        Active users 24,812 ↑ 12.4%
        Revenue · MTD $148.2k ↑ 7.1%
        Uptime · 30d 99.97% — stable
        Engagement Last 30 days
        ``` **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.

        184Ideas this week
        4.2kFollowers
        ``` **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
        SYS_OSv2099
        ▸ TERMINAL · USER 0x7F

        Tap to
        jack in.

        Tap the burger to slide the drawer in over the page. The backdrop blurs everything; tap it or the × to dismiss. :has(:checked) drives the slide.

        CPU87% NET1.2g MEM4.7G
        ``` **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 follows
        function.

        The sidebar sits on the right — design-tool convention (Figma, Sketch). Layout is just 1fr 260px; native <dl> exposes property pairs to assistive tech.

        ``` **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

        This morning

        4 unread
        Anya Petrova Re: Q3 launch deck Looks great — one tweak on slide 14.
        Daichi Sato Friday demo recap Here's the recording + the action items we…
        Lena Müller Invoice #2143 Attached, due in 30 days.
        Carlos Reyes Coffee Thursday? I'll be near the office around 11.
        DAILY DIGEST · OPS

        Friday demo recap.

        From Daichi Sato · · 4 min read

        Hey 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
        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.

        ``` **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
        FW · 26 Collection

        Knitwear.

        238 pieces · Sorted by Newest

        01
        02
        03
        04
        05
        06
        ``` **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.

        2,481XP
        87Wins
        4.9Rank
        ``` **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
        Engineering Sprint 47
        ★ Established 1956

        Form,
        function,
        flair.

        Toggle the burger — content shifts right rather than being overlaid. Pure CSS on the grid template; works on desktop where both panes should remain visible.

        01 Lounge Chair Walnut · Tan leather
        02 Wire Stool Powder-coated steel
        ``` **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
        Polaris 63°N · 02:47
        — Tonight, the sky moves slowly

        The aurora
        opens the menu.

        Tap the burger — the drawer slides in over the page, the backdrop blurs the night sky behind. Tap the dim area or × to dismiss. Pure CSS, no JavaScript required.

        ``` **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).

        284Active
        47Pending
        12Closed
        ``` **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
        — 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
        app.tsx + 47 UTF-8
        // 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
        👋 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,481XP earned
        47Lessons
        12Badges
        ``` **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
        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
        CMD + K to switch · ⌘1 / ⌘2 / ⌘3

        Sprint 47 retro.

        Last edited yesterday at 14:21 · 4 collaborators

        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.

        vaporwaveaesthetic1995chrome
        ``` **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

        Pure CSS Collapsible Sidebar

        A zero-JavaScript collapsible navigation rail built entirely with the checkbox-hack pattern. Click the menu icon to smoothly collapse the sidebar down to icon-only mode and back.

        // the entire toggle logic
        <input type="checkbox" id="t">
        <label for="t">☰</label>

        /* 100% CSS, no scripts */
        ``` **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

        Flexible Rail Menu

        An expanding icon rail — bouncy, springy, collapsible.

        ``` **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

        Dashboard

        Active Users
        24.7k
        ▲ 12.4%
        Revenue
        $89.2k
        ▲ 8.1%
        Conversion
        3.42%
        ▲ 0.6%
        Sessions
        112k
        ▲ 19%
        ``` **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

        Overview

        Multi-level expandable navigation — up to two nested tiers.

        Open Deals
        142
        Pipeline Value
        $1.8M
        Win Rate
        31%
        ``` **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

        Catalog

        Products
        812
        Orders Today
        94
        Revenue
        $12.4k
        ``` **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
        Lights4 of 6 on
        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
        Fork&Go
        2
        ☰ 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

        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
        Loading
        ``` **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
        1
        0
        0
        1
        0
        1
        1
        0
        0
        1
        1
        1
        0
        0
        1
        ``` **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
        — La Maison Verte

        The Spring
        tasting menu.

        Five courses, paired with natural wines, served family-style. Reservations required.

        Asparagus & truffle
        18
        Pea soup, mint oil
        14
        Hand-rolled cavatelli
        26
        Lamb shoulder, jus
        34
        Olive oil cake
        12
        5-course · 104 per guest
        ``` **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
        ISSUE 47 · MAY

        FASTER
        than
        YESTERDAY.

        Inside: how four runners broke their personal records by changing one thing.

        • 01 The 6am rule
        • 02 Negative splits
        • 03 Track over road
        ``` **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
        VINTAGE 1987

        Château
        Verdun

        A single-vineyard cuvée from the Médoc. Aged 24 months in French oak. Limited release of 1,200 bottles.

        Region
        Bordeaux, France
        Varietal
        Cabernet Sauvignon (78%)
        Aging
        24 months · French oak
        Tasting
        Black cherry, leather, tobacco
        Pairing
        Dry-aged ribeye, hard cheese
        €420 per bottle
        ``` **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

        NEONHEART

        Vol. 03 · Out now

        01 ⟡ Midnight Drive 02 ⟡ Lights Off 03 ⟡ Pink Static
        SIDE B

        CYBERBLOOM

        Vol. 03 · Out now

        04 ⟡ Glass Hearts 05 ⟡ Hologram 06 ⟡ Echo Park
        ``` **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

        Misty
        Morning

        LIGHT ROAST

        Bright, floral, lemon zest. Single origin Ethiopia.

        €18 · 250g

        Honey
        House

        MEDIUM

        Caramel, almond, ripe stone fruit. Costa Rica blend.

        €20 · 250g

        Midnight
        Hour

        DARK ROAST

        Dark chocolate, smoke, lingering espresso finish.

        €22 · 250g
        ``` **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.

        14Shapers
        2,400Boards / yr
        1972Founded
        ``` **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.

        LocationValle de Bravo, MX Year2026 Area220 m² StatusCompleted
        ``` **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

        FRIDAY
        3PM

        • 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
        ``` **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
        — Real client · 12 weeks

        Quiet skin,
        loud confidence.

        Drag the slider to see the result of our 12-week ritual: gentle exfoliation, daily SPF, and the Oat Renewal serum.

        • 92% reduced redness
        • 87% smoother texture
        • 4.9★ average rating
        ``` **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
        FW · Autumn

        Burnt &
        Bronzed.

        Wool tweeds, raw selvedge denim, oxblood leather. The fall capsule, hand-finished in our atelier.

        • 01 Camel coat
        • 02 Rust knit
        • 03 Olive trouser
        SS · Winter

        Cold &
        Quiet.

        Cashmere knits, double-faced wool coats, alpine boots. The winter capsule, made for stillness.

        • 01 Storm coat
        • 02 Steel knit
        • 03 Snow boot
        ``` **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

        Library

        • Midnight DriveAurelia · Side A
          3:42
        • Glass HeartsAurelia · Side B
          4:18
        • Cherry StaticVarious
          2:54
        • Forest FloorAurelia
          5:02
        ▸ NOW PLAYING

        Midnight
        Drive.

        Aurelia · Side A · Track 03

        1:333:42
        ``` **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
        FOR SALE · Verified

        Casa Sol

        Mid-century courtyard home, walking distance to the village.

        Beds
        4
        Baths
        3
        Sq m
        240
        Built
        1958
        €840,000
        FOR SALE · New listing

        Casa Verde

        Modern earth-tone build with garden views and original olive trees.

        Beds
        3
        Baths
        2
        Sq m
        185
        Built
        2022
        €720,000
        ``` **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

        The
        Last
        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
        ``` **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

        Folegandros
        in 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
        ``` **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
        // LOAD >>

        GHOST
        PROTOCOL

        Free-to-play. Pay-to-survive.

        SYSTEM_INTEGRITY
        73%
        • 01RAVEN_Z9128
        • 02v0id_X8044
        • 03YOU7621
        • 04n3on_Q6890
        ⚠ 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
        — Five steps to your cup
        1. Hand-picked at sunrise

          Only the cherries that turn deep red on the tree. Picked between 5am and 9am, before the heat sets in.

        2. Washed & sun-dried

          72 hours on raised beds. Daily turning by the same family of farmers since 1962.

        3. Shipped in jute

          Single-origin lots, no blending. From Pereira to our roastery in 18 days.

        4. Slow-roasted weekly

          Light medium, 14 minutes. We rest the beans 48 hours before grinding.

        5. 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-roasted
        tomato orzo.

        One pan, four ingredients, ninety minutes. The kind of recipe that smells like home.

        1h 30mTotal time EasySkill 4 servingsYield
        ``` **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
        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

        1. Visit our shelter Sat / Sun, 10am — 4pm
        2. Spend an hour with a friend
        3. Take them home the same day
        ``` **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.

        After 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.

        • 12 min read
        • 2,840 words
        • Apr 14 issue
        ``` **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
        ``` **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
        Type04
        Letter
        forms

        An editorial typography system built for screens.

        View case
        Motion03
        In
        motion

        Kinetic brand identity that moves with intent.

        View case
        Color02
        Warm
        tones

        Palette & art direction with a human warmth.

        View case
        Index01
        Selected
        works

        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
        01Phase one

        Discover

        We map your goals and audit exactly where you stand today.

        02Phase two

        Design

        Concepts take shape through rapid, collaborative iteration.

        03Phase three

        Build

        Production-ready code, tested and shipped with real care.

        04Phase four

        Launch

        We go live, measure everything, then refine what works.

        ``` **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

        “This completely changed how our team ships. We cut launch time in half.”

        Maya Chen

        Head of Product, Loop

        “Beautiful, fast, and genuinely a joy to use every single day.”

        Theo Marsh

        Founder, Northbeam

        “The support alone is worth it. Best decision we made this year.”

        Lena Ortiz

        CTO, Brightside
        ``` **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
        SCALEUnlimited seats · SSO · SLA$79/mo
        GROWTH10 seats · analytics · API$29/mo
        STARTER1 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 / 04DECK
        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
        Organic62%
        Paid24%
        Referral14%
        Revenue
        $48.2k +12%
        Users
        9.1k
        Churn
        1.8%
        NPS
        72
        ``` **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
        golden hour
        low tide
        the trail
        dusk in june
        ``` **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 03

        Cached // idle

        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
        SUNRISE

        Citrus

        $18
        MEADOW

        Verdant

        $22
        TWILIGHT

        Indigo

        $26
        ``` **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

        Deployed

        v3.2 live

        Building

        2 jobs queued

        Review

        5 PRs open

        Drafts

        3 pending

        Archived

        112 items

        ``` **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

        Layer B

        The middle ground

        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

        Ember

        Warm tones & energy

        Violet

        Mystery & depth

        Azure

        Calm & clarity

        Jade

        Growth & balance

        ``` **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
        ACLICK TO SHUFFLE
        BNEXT UP
        CWAITING
        DLAST
        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
        CDN
        APP
        API
        DATA
        ``` **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
        CARD03
        CARD02
        TAP TO FLIP01
        ``` **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
        01
        02
        03
        04
        05
        ``` **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 VISIT10% 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
        PRIZE$5
        PRIZE$20
        WINNER$100
        ``` **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
        Create Your Account
        Complete all steps to get started
        1
        Profile
        2
        Details
        3
        Billing
        4
        Review
        Personal Profile
        Account Details
        Billing Information
        Review & Confirm
        Name
        Alex Morgan
        Email
        alex@example.com
        Username
        @alexmorgan
        Plan
        Pro · $29/mo
        Account Created!
        Welcome aboard. Check your email to verify your account.
        Step 2 of 4
        ``` **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
        Pill Track Style
        3
        4
        5
        Progress Bar With Numbered Markers
        Start
        Profile
        3
        Payment
        4
        Shipping
        5
        Review
        6
        Done
        Segmented Block Style
        Account
        Address
        03Payment
        04Review
        05Confirm
        ``` **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
        Step 1
        Cart
        Step 2
        Address
        3
        Step 3
        Payment
        4
        Step 4
        Review
        Payment Details
        Order Summary
        👟
        Air Max Pro
        Size 10 · Black
        $129
        🎒
        Trail Pack 24L
        Navy · x1
        $89
        🧢
        Sport Cap
        One Size · x2
        $38
        Subtotal$256
        ShippingFree
        Tax (8%)$20.48
        Total$276.48
        🔒 256-bit SSL encrypted
        ``` **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
        Application Process
        Complete Your Application
        Follow each step to submit your application in minutes
        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
        3
        Step 3 · In Progress
        Employment History
        Tell us about your last two positions.
        4
        Step 4
        Documents Upload
        Upload your CV, cover letter, and ID documents.
        📎 Drag & drop files or browse
        5
        Step 5
        Review & Submit
        Final check before we process your application.
        Everything looks great! Click submit when ready.
        🎉
        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
        🎨
        Theme Appearance
        👥
        Team Invite members
        🔗
        Integrations Connect apps
        📊
        Analytics Set up tracking
        🚀
        Launch Go live
        Choose Your Theme
        Personalise your workspace with colours and typography that match your brand.
        Dark ModeCustom PaletteFont Scale
        Invite Your Team
        Add teammates by email. Assign roles and set permissions for each member.
        AdminEditorViewer
        Connect Integrations
        Link your favourite tools — Slack, GitHub, Figma, Linear and more — to keep everything in sync.
        SlackGitHubFigmaLinearNotion
        40%
        Overall Progress
        Configure Analytics
        Set up event tracking, conversion goals, and dashboard widgets to stay on top of performance.
        EventsGoalsFunnels
        🚀 Ready to Launch!
        Your workspace is fully configured. Click Launch to go live and start collaborating with your team.
        All systems go5 steps complete
        ``` **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
        Sprout · Setup
        Setup progress — 40%
        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
        👤
        Solo
        Just me
        👥
        Small
        2–10 people
        🏢
        Mid
        11–50 people
        🏙️
        Enterprise
        50+ people
        🎉
        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
        01Discovery
        02Proposal
        03Review
        04Approval
        05Delivery
        Research
        Wireframe
        3
        Design
        4
        Prototype
        5
        Handoff
        6
        Launch
        Init
        Build
        3
        Test
        4
        Stage
        5
        Deploy
        6
        Monitor
        7
        Done
        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.
        ``` **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
        !
        Security
        3
        Profile
        Docs
        5
        Submit
        Identity Verification
        All identity fields are valid.
        ✓ Full Name ✓ Email ✓ Date of Birth
        ✓ Name verified
        ✓ Email verified
        Security Setup
        There are errors that need to be fixed.
        ✗ Password too weak ✗ Passwords don't match
        ✗ Password must be at least 12 characters with symbols
        ✗ Passwords do not match
        Profile Details
        Fill in your professional profile information.
        ⚠️
        ⚠ URL format looks incomplete — add https://
        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.
        Step 3 of 5
        ``` **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
        25%
        Complete
        Step 2 of 4
        Setup
        2
        Configure
        3
        Integrate
        4
        Launch
        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
        ``` **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
        Account
        Details
        3
        Plan
        4
        Payment
        Choose Your Plan
        Select the tier that fits your needs
        Starter
        Free
        5 projects
        Pro
        $29
        Unlimited
        Team
        $79
        10 seats
        ``` **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
        Done
        Preferences
        Done
        3
        Notifications
        In progress
        4
        Review
        Next
        Account Setup
        Create your secure account credentials.
        Preferences
        Personalise your experience.
        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
        Emailjordan@example.com
        Time ZoneUTC-08:00 Pacific
        Email Digest✓ Enabled
        Push AlertsDisabled
        Step 3 of 4
        ``` **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
        Initiate
        Configure
        3
        Build
        4
        Test
        5
        Deploy
        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
        3
        Step 03 · In Progress
        Development Sprint
        Feature development, API integration, and unit test coverage underway.
        ● Started 1 Mar 2026
        4
        Step 04
        QA & Staging
        Full regression, performance audits, and stakeholder UAT on staging.
        — Scheduled Apr 2026
        5
        Step 05
        Production Launch
        Canary rollout, monitoring alerts active, and public release.
        — Scheduled May 2026
        ``` **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
        ``` **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
        Pulse — short, rhythmic bursts of light.
        Wave — continuous oscillating motion.
        Surge — sudden upward power swell.
        Bloom — soft expanding glow front.
        ``` **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
        Build — assemble the parts.
        Ship — push it to production.
        Iterate — measure and refine.
        ``` **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
        Violet — deep, contemplative.
        Rose — warm, inviting.
        Cyan — crisp, technical.
        Lime — fresh, urgent.
        ``` **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
        // app.tsx
        export default App;
        // config.js
        module.exports = {};
        /* styles.css */
        :root { color: white; }
        ``` **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
        ``` **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
        Stats — daily and weekly metrics summary.
        Inbox — unread messages from your team.
        Tasks — items due in the next 7 days.
        ``` **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
        ``` **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
        terminal — bash
        $ ls -la
        drwxr-xr-x src/
        -rw-r--r-- README.md
        $ tail -f app.log
        [12:04] OK 200
        [12:05] OK 200
        $ crontab -l
        0 * * * * ./sync.sh
        */5 * * * * ./ping.sh
        ``` **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
        Hello, friend.
        Systems nominal.
        See you tomorrow.
        ``` **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
        ``` **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
        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
        Tokens, components, motion.
        Modern CSS, zero deps.
        Live with all states.
        ``` **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
        ``` **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
        A summary of the project, members, and recent decisions.
        Edits, comments, and team mentions over the last seven days.
        Permissions, integrations, and billing controls.
        ``` **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
        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
        The body copy of an editorial feature.
        A curated set of plates and engravings.
        Marginalia and footnote annotations.
        ``` **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
        Drafts, archives, and reference material.
        The current notebook in active edit mode.
        Approvals, releases, and publication state.
        ``` **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
        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
        Composition, weight, balance.
        Modular columns and rows.
        Specimens and pairings.
        Limited primary palette.
        ``` **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
        The right-hand page, traditionally odd-numbered.
        The left-hand page, traditionally even.
        The full leaf — both sides counted as one.
        ``` **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
        Working files in progress.
        Galleys ready for review.
        Approved and locked.
        ``` **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
        ``` **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
        The founding statement of intent.
        The closing inscription, type & paper notes.
        Corrections issued after the first printing.
        ``` **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
        Specimen of the upright Roman cut.
        Specimen of the bold cut.
        Specimen of the small caps cut.
        ``` **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
        ``` **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
        The opening recto.
        The continuation.
        The closing leaf.
        ``` **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
        Acid bites the plate to print recessed lines.
        A burin cuts directly into the metal surface.
        Pressure raises the paper into a relief.
        ``` **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
        ``` **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
        • Frontend
        • Backend
        • DevOps
        ``` **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
          ``` **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 ``` **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
          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
          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.
          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.
          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.
          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.
          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
          "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
          5★
          1,112
          4★
          98
          3★
          24
          2★
          9
          1★
          5
          "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
          "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
          "Robust, opinionated in the right ways, and genuinely designed for real work rather than demos."
          P. Fontaine · PM, Vex Collective
          "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.
          Sasha BloomYoga instructor · 6 months subscriber
          ★★★★★
          "Gentle on the system, remarkable on the results. I've recommended it to my entire wellness circle."
          Olivia MarshNutritionist
          ★★★★★
          "Smells like a greenhouse in the best way. My skin has never been softer or more even-toned."
          Priya EastonSkincare obsessive
          ★★★★★
          "Fell asleep faster than I have since I was a child. The lavender formula is genuinely magical."
          Rafael CruzSleep coach
          ★★★★★
          "Finally a brand that doesn't lie about ingredients. Transparent, effective, beautiful packaging."
          Zoë NakamuraClean beauty editor
          ★★★★★
          "The ritual of it — the scent, the texture — has become the most grounding part of my day."
          Lena Ward · Therapist
          ★★★★★
          "Tried seventeen wellness products this year. This is the one I actually still use. Not even close."
          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
          4.9★
          Avg. Rating
          98%
          Recommend
          14K+
          Teams
          3.2×
          Avg. ROI
          // productivity
          ★★★★★
          "We retired three separate tools the week we went live. The consolidation alone saved us 12 hours a week."
          Takeshi KatoEng Lead · Lattice AI
          // enterprise
          ★★★★★
          "SOC 2 compliance, multi-region failover, and still deployed faster than our last internal tool. Unreal."
          Rachel NovakCTO · Vantage Systems
          // growth
          ★★★★★
          "Pipeline visibility went from gut feeling to real-time precision. We closed 30% more deals in Q3."
          Luca BianchiVP Sales · Corvis
          // devex
          ★★★★★
          "Setup took nine minutes. Not nine days. Nine minutes."
          Amara OseiSenior 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."
          Elisa MorrowVP 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.

          Gideon HarlowFood critic · The Table Magazine
          9.4
          / 10 · 4,820 diners
          "The pasta is handmade. You can taste it."
          Mira LaszloRegular diner
          "Best wood-fired bread in the neighbourhood. Period."
          Pablo OrtegaWeekend 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.

          Sofía ArenasFirst-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
          Client testimonials · Verified · 2024
          Live · 348 reviews this week
          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.

          Service
          Brand Strategy
          Duration
          6 weeks
          5.0
          out of 5
          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.

          Service
          Pitch Design
          Duration
          3 weeks
          5.0
          out of 5
          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.

          Service
          UI / Design
          Duration
          Ongoing
          4.9
          out of 5
          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.

          Service
          Rebrand
          Duration
          12 weeks
          5.0
          out of 5
          4.98
          Avg. score
          348
          Reviews / week
          100%
          Verified clients
          96%
          Recommend
          ``` **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
          ChainVerify · On-Chain Reviews
          $2.4B
          volume protected · 48,220 reviews
          ◆ 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.
          0xVelvet.ethDeFi power user · 3y holder
          ◆ 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.
          NeonKoi.ethNFT collector · Top 0.1%
          ◆ 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.
          ProtocolRavenDAO core contributor
          ◆ Yield · Verified
          ★★★★★
          38% APY, zero impermanent loss surprises. The risk dashboard is the most honest I've seen in DeFi. Period.
          AlphaSatoshiYield farmer · 2y
          ◆ Bridge · Verified
          ★★★★★
          Bridged $400K across chains last quarter. Zero failed transactions. Settlement was faster than CEX withdrawals. Genuinely shocked.
          WhalexBTCMulti-chain trader
          ``` **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
          94%
          Completion rate
          2.1M
          Learners
          4.97★
          Avg rating
          Mathematics
          ★★★★★
          "Failed calculus twice in college. Came to LearnSpark. Passed my actuarial exam on the first try. The adaptive pacing changed everything."
          Tobias MüllerActuarial student · Germany
          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."
          Priscilla AdomJunior developer · Ghana
          Biology
          ★★★★★
          "Got into medical school. My LearnSpark MCAT biology score was in the 98th percentile. Coincidence? I don't think so."
          Seo-Yeon ChoiMed school applicant · Korea
          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."
          Lucia RomeroUI 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."
          Nia WilliamsPhD 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."
          Damien KowalskiFormer 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
          Meridian Estates · Verified Reviews
          Rating 9.8 / 10
          Transactions 4,200+
          Avg. value $3.4M
          Client Experiences
          $8.2M
          Transaction value
          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."
          Charles & Helena VossBuyers · New York, NY
          $2.7M
          Sale price
          Villa · Malibu
          "Listed on a Friday. Received eleven offers by Sunday. Above asking. The market intelligence this team brings is extraordinary."
          Anastasia ParkSeller · 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.

          Reza & Tamar HashemiPortfolio buyers
          Condo · Tribeca
          "First-time buyer. They made the process feel entirely manageable. No condescension, just genuine guidance."
          Maya OkonkwoBuyer · 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
          Live · 3,420 online
          ◆ Legendary · MVP
          4.2
          K/D ratio
          94%
          Win rate
          3,800
          Hours played
          ★★★★★
          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.
          GhostRazeTop 500 · NA Server
          ◆ Diamond
          ★★★★★
          The ping optimization guide alone dropped me from 74ms to 18ms. Games feel completely different.
          VoidShift.exeDiamond I · EU
          9.9
          Platform score · 42K reviews
          42K
          Reviews
          98%
          Recommend
          3.2M
          Players
          ◆ 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.
          NightKitsunePlatinum III · APAC
          ◆ Gold
          ★★★★★
          Hardware recommendations boosted my FPS by 140 frames. My reaction time measurably improved in a week. Actual game changer.
          ByteBomberGold 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.
          TitanRisePro 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."
          Isabella FontaineParis · 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."
          Mireille AuclairMontré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."
          Yuki TanakaTokyo · 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."
          Dominique PeresSão Paulo · Architect
          Bespoke
          "Three fittings, infinite patience. The result was a suit nothing else in my wardrobe could compete with."
          Raj MehraLondon · 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 OstrovskyMoscow · 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
          FCA Regulated · FSCS Protected · 256-bit Encrypted
          Verified Client Reviews
          All reviews authenticated via KYC & account data
          4.97
          Trust score
          286K
          Accounts
          £4.2B
          AUM
          KYC verified
          Investment portfolio
          +34.2%
          12-month return
          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."
          Peter HartmannPension 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."
          Sadia KhanFounder · ScaleUp Ltd
          High-yield savings
          ★★★★★
          "5.3% AER, instant access. My high-street bank offers 0.5%. This should be illegal by comparison."
          Marcus NwosuPersonal savings
          Verified
          Stock trading
          ★★★★★
          "Zero commission, real-time execution, fractional shares. Everything I've wanted from a broker for fifteen years."
          Lena DuboisActive trader · Paris
          Global ETFs
          ★★★★★
          "Auto-invest, auto-rebalance, zero decision fatigue. My portfolio grows while I sleep. That's the deal I always wanted."
          Remi OkaforPassive 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

          5.0 · Verified
          "The onboarding was so smooth I had my whole team up and running in a single afternoon. That never happens."
          Sarah ChenHead of Product, Relay
          5.0 · Verified
          "Replaced three different tools and cut our monthly spend by 40%. The ROI was visible in week one."
          Marcus WilliamsCTO, Stackframe
          5.0 · Verified
          "Customer support replied in four minutes on a Sunday. I didn't even know that was possible from a SaaS company."
          Isabelle MorelVP Operations, Cove
          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."
          Daniel ParkEngineering Lead, Meridian Cloud
          Verified customer
          "Shipped faster in the first month than the entire previous quarter. The workflow automation alone saved us 15 hours a week."
          Amara OseiFounder, 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

          Hear it from the people who matter most

          4.9 ★
          Average across 9,200+ reviews
          "I've recommended this to every founder I know. The time I've saved is genuinely hard to quantify."
          Emma LarsonFounder, Northfield Pro
          "Our sales cycle shortened by three weeks after switching. The clarity in our pitch improved the moment we had the right data."
          James OwusuVP 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."
          Mei ZhangCo-founder, Fenix Labs Growth
          "Migrated our entire workflow in a weekend. Monday morning the team didn't miss a beat. Zero disruption, full adoption."
          Thomas ReevesOps Lead, Slate Co. Team
          "The reporting alone is worth the subscription. I present to investors every quarter and the visuals do half the work."
          Aisha PatelCEO, 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."
          Carlos MendesCPO, 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

          NEON

          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

          Crafted

          for the

          discerning eye.

          ``` **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

          EXPAND

          YOUR

          HORIZON

          ``` **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

          WAVE TEXT

          ``` **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

          Design
          Motion

          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
          BOUNCE   !
          ``` **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

          IMPACT

          ``` **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

          BOUNCE

          ``` **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

          We design

          ``` **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

          ``` **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 Products
          Users Love

          Design systems, prototypes, and production-grade components—all in one collaborative workspace.

          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 Your
          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

          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

          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
          AK

          Analytics Overview

          Your performance at a glance for the last 30 days.

          $124KRevenue
          8,432Sessions
          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

          CYBERPUNK

          NEON INTERFACE

          78%THREAT
          4096CREDITS
          LEVEL 9CLEARANCE
          NEURAL SYNC
          ``` **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
          ``` **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.

          JL
          Julia Lam Jun 12 · 5 min read
          ``` **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
          Lifestyle · 4 min

          The art of
          slow mornings

          Gentle routines and intentional starts that reshape how you work, rest, and create throughout the day.

          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 Gradient
          Utility Classes

          Tailwind achieves gradient text by composing three utility classes. Here's how the framework classes map to raw CSS properties.

          Tailwind ClassCSS 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
          Lumis

          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

          Dig Site K-7
          Anatolian Plateau

          EXCAVATION LOG · SEASON 04 42°14′N 33°08′E · Lead: Dr. M. Eren
          Surface elevation 1,142m · Total depth 6.4m
          Catalogued artifacts: 218 · Hover any layer to inspect.
          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.
          ``` **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

          The Static
          World Tour '26

          44 cities
          6 continents
          sold + standing
          ━━━━━━━━━
          scroll →
          14 · FEB · 2026 · FRI
          Reykjavík
          Harpa Concert Hall
          SET LIST
          1. Northern Static
          2. Glacier Song
          3. Bone Radio
          4. Encore: Aurora
          Sold
          Out
          22 · FEB · 2026 · SAT
          Berlin
          Tempodrom · Kreuzberg
          SET LIST
          1. U-Bahn Hymn
          2. Brutalist Love
          3. Concrete Dawn
          4. Encore: Static (live edit)
          Few
          Left
          06 · MAR · 2026 · FRI
          Marrakech
          Jardin Majorelle
          SET LIST
          1. Blue Garden
          2. Souk Static
          3. Atlas Lullaby
          4. Encore: Mint Tea
          Sold
          Out
          19 · MAR · 2026 · THU
          Lagos
          Terra Kulture Arena
          SET LIST
          1. Harmattan
          2. Static Pt. II
          3. Yellow Bus
          4. Encore: Lagos After Dark
          Tix
          Live
          04 · APR · 2026 · SAT
          Mexico City
          Foro Sol
          SET LIST
          1. Xochimilco
          2. Smog Romance
          3. Tláloc
          4. Encore: Mezcal Static
          Sold
          Out
          02 · MAY · 2026 · SAT
          Tokyo
          Nippon Budokan
          SET LIST
          1. Shibuya Static
          2. Sakura Loop
          3. Train at 3am
          4. 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

          Mitral Valve Repair
          OR-3 · 08:14:22

          PT · ID-449201 · M · 58y
          ASA III · BMI 27.4
          Lead surgeon: Dr. A. Okafor
          Anesthesia: GA · ETT
          Heart Rate
          72bpm
          SpO₂
          99%
          BP · MAP
          118/74 · 89
          Core Temp
          36.4°C
          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 CLEARECHO ✓
          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 pendingHEMOSTASIS
          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 52CORRECTEDCPB 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:24ARREST 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 BYPASSTEE: TRACE MREPI 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
          A Production Diary · Calendar Year MMXXV

          The Last Lighthouse

          Dir. Helena Vance · Prod. Auteur Pictures · 35mm
          I
          Dev
          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
          II
          Pre
          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
          III
          Shoot
          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
          IV
          Post
          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
          V
          Score
          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.
          VI
          Out
          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

          HALCYON-7
          ::Lunar South Pole Insertion

          VEHICLEFALCON H · BLOCK 5
          PAYLOADHALCYON-7 LANDER
          PADKSC-39A
          WINDOW04:12:00 UTC
          AZIMUTH084.7°
          STATUSNOMINAL
          T-MINUS
          00:00:07_
          T-Time Stat Event Telem
          T−14h GO WET DRESS REHEARSALTanking sequence completed. LOX/RP-1 propellant load confirmed at 100%. All vent valves cycled. 100%
          T−02h GO RANGE GREENEastern Range clear. Air traffic and maritime traffic confirmed outside exclusion zone. Wx 76% favorable. 76%
          T−45m HOLD TANKING HOLD · LH2Upper-stage LH2 fill pressure 2.3 PSI above nominal. Bleed valve cycling. Recovery in progress. HOLD
          T−42m RESUME HOLD RELEASEDLH2 fill pressure nominal at 14.8 PSI. Count resumed. Loss-of-window risk: low. 98%
          T−10m GO TERMINAL COUNTFTS armed. APU spin-up complete. Launch director polls all stations: GO for launch. 99%
          T+00:00 LIFT IGNITION & LIFTOFF27 Merlin engines at 100% throttle. Tower cleared at T+7. Pitch program initiated at T+9. 7.6M LBF
          T+01:08 NOM MAX-QVehicle passes maximum dynamic pressure at 11.2 km altitude. Throttle-down complete, throttling back up. Q=33
          T+02:42 SEP BECO & STAGE SEPBoost engine cutoff. Side cores separate cleanly. Upper stage MVac ignition confirmed. +147km
          T+08:34 CRIT UPPER STAGE ANOMALYTelemetry dropout on FCC-2. Backup channel active. Crew safe; redundancy nominal but logged for review. REDX
          T+12:18 ORB ORBITAL INSERTIONParking 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
          1
          flour + water, mixed
          2
          quiet still
          3
          first bubbles
          4
          smells sour
          5
          false rise
          6
          it falls. don't worry.
          7
          second wind
          8
          tangier now
          9
          doubling
          10
          first peak ✦
          11
          discard half
          12
          rebuilding
          13
          predictable
          14
          bake-ready ✦
          15
          first loaf
          16
          rest
          17
          name it
          18
          share with neighbor
          19
          to the fridge
          20
          sleeping
          21
          it has a name now ✦
          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. 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

          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

          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

          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
          2020
          🌍
          2021

          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
          2023
          🌱
          🎯
          2025

          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
          Early
          1890 — 1910

          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
          Middle
          1911 — 1935

          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
          Late
          1936 — 1962

          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.

          4Units
          72hDeploy
          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.

          −38%Fuel
          +2kkm Range
          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.

          14hOutage
          6hRecovery
          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.

          24Satellites
          <50msLatency
          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."
          40s

          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."
          60s

          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."
          80s

          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."
          2K
          ``` **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
          Q1
          Jan — Mar 2025 Complete

          Core Infrastructure

          Database sharding, API gateway redesign, and global CDN rollout completed 12 days ahead of schedule.

          Infrastructure100%
          Q2
          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.

          Mobile100%
          Q3
          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 Layer67%
          Q4
          Oct — Dec 2025 Planned

          Enterprise Platform

          SSO, audit logging, custom data residency, and dedicated onboarding for Fortune 500 accounts entering the pipeline.

          Enterprise12%
          Q1
          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.

          Expansion0%
          ``` **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
          A Brief History Studio Chronicle · 2018–present
          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
          2026
          Nova Design System
          Lead Designer
          FigmaTokensReact
          002 ▸
          ATLAS
          2025
          Atlas Data Viz
          UX + Dev
          D3.jsWebGLSVG
          003 ▸
          ORBIT
          2024
          Orbit Mobile App
          Product Design
          iOSSwiftHaptics
          004 ▸
          DUNE
          2023
          Dune Brand Identity
          Brand + Motion
          After EffectsAI
          005 ▸
          LOOP
          2022
          Loop CMS Platform
          Full-stack Design
          Next.jsCMS
          ``` **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
          System Audit Log
          Migration Record
          FY 2024–2026
          Schema v4 → v7
          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 ``` **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 ``` **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 ``` **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 ``` **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 ``` **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 ``` **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 ``` **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 ``` **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 ``` **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 ``` **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 ``` **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 ``` **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 ``` **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 ``` **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 ``` **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 ``` **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 ``` **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 ``` **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.
          Glass12 / 9 CoatingNano-V Weight410g
          02
          — Shutter Dial
          Mechanical command dial
          Detented brass with knurled edge. Range 1/8000s to 30s plus bulb. Locks with a quarter-press.
          Steps1/3 EV Travel300° Cycles500k
          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.
          Sync1/250s Pins1+4 Hot12V
          04
          — Hand Grip
          Magnesium undergrip
          Cast magnesium core wrapped in pressed cowhide. Conceals battery, card slot, and focus-recall trigger.
          WrapCowhide CoreMgAl Battery7.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
          1
          2
          3
          4
          5
          6
          7
          8
          // pipeline assembled at boot
          import { createScheduler } from "./scheduler";
           
          const queue = createScheduler FUNCTION coreschedulercreateScheduler 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. concurrencyMax parallel jobs. Default 4. retriesPer-task retry budget. Default 3. onDrainFires once when the queue empties. scheduler.ts · L42 K for docs
          ({
            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

          The 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
          Mira Vance
          @miravance
          Editor-in-Chief
          M
          Mira Vance
          "Words first; everything else negotiated after."
          142
          essays
          8.4k
          readers
          VII
          volumes
          Adesh Kothari
          @adesh.k
          Design Director
          A
          Adesh Kothari
          "Restraint is also a flourish, if you commit to it."
          96
          covers
          12
          awards
          04
          books
          June Lacroix
          @junelacroix
          Photo Editor
          J
          June Lacroix
          "A photograph is the slowest sentence a magazine can run."
          311
          shoots
          28
          cities
          VI
          years
          ``` **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%
          Awakened · 7/10
          "It does not warm — it only insists that warmth was once here."
          BOUNDvendor: 2,400g
          Voidshard Pendant
          Epic · Pendant
          Intellect+62
          Shadow Mastery+9%
          Charged · 3/5
          "Cool to the touch. Then colder. Then it whispers your name in a voice that almost is."
          SOULBOUNDvendor: 1,150g
          Ranger's Compass
          Rare · Trinket
          Agility+34
          Stealth+7%
          "True north is whichever direction the deer have not yet noticed you."
          UNIQUEvendor: 480g
          Verdant Tonic
          Uncommon · Consumable
          Restores+1,200 HP
          Over8 sec
          "Tastes like the smell of a greenhouse in winter."
          STACK · 14vendor: 24g
          Iron Lockbox
          Common · Container
          Slots+6
          "Heavy enough to be honest about what it contains."
          STACK · 1vendor: 8g
          ``` **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 Uptime99.98% p95 latency38ms Req/min12.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 Uptime100% p95 latency18ms Token/min84k No incidents in the last 90 days.
          PostgreSQL Primary 99.94%
          PostgreSQL Primary Operational 30-day uptime Uptime99.94% p95 latency6ms Conns142/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 Uptime98.42% Delivery91.3% Avg delay340ms 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
          SL
          Sarah Lindqvist
          CEO · Executive
          Active now
          Former Stripe PM. Building the next layer of financial infrastructure for SMBs.
          214
          Team
          8yr
          Tenure
          $1.2B
          Valuation
          Message
          View Profile
          MW
          MW
          Marcus Webb
          CTO · Engineering
          Active now
          Ex-Google infra. Obsessed with distributed systems and making things fast at scale.
          96
          Team
          5yr
          Tenure
          340
          PRs
          Message
          View Profile
          ER
          ER
          Elena Russo
          CMO · Marketing
          Away · 2h ago
          Brand strategist. Grew Notion's Europe presence 3×. London-based, GMT+1.
          68
          Team
          3yr
          Tenure
          +84%
          YoY
          Message
          View Profile
          AP
          AP
          Aisha Patel
          Growth Lead · Marketing
          Offline
          Data-driven growth. 0 → 100k users in 18 months. Runs the acquisition engine.
          6
          Team
          1yr
          Tenure
          $1.2M
          Budget
          Message
          View Profile
          ``` **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
          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
          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
          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
          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 +/
          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
          Q1Q2Q3Q4
          Revenue $2.1M Revenue · Q1 $2.1M↑ +18% vs Q4 By segment SMB62% Mid28% Ent.10% vs prior: +$320KARR: $8.4M $2.8M Revenue · Q2 $2.8M↑ +33% vs Q1 By segment SMB55% Mid33% Ent.12% vs Q1: +$700KARR: $11.2M $3.4M Revenue · Q3 $3.4M↑ +21% vs Q2 By segment SMB48% Mid38% Ent.14% vs Q2: +$600KARR: $13.6M $4.2M Revenue · Q4 $4.2M↑ +24% vs Q3 By segment SMB42% Mid38% Ent.20% vs Q3: +$800KYear: $12.5M
          Active Users 12.4K Active Users · Q1 12.4K↑ +22% By plan Free58% Pro32% Ent.10% New: +2,240DAU/MAU: 41% 18.9K Active Users · Q2 18.9K↑ +52% By plan Free54% Pro36% Ent.10% New: +6,500DAU/MAU: 44% 24.1K Active Users · Q3 24.1K↑ +28% By plan Free50% Pro38% Ent.12% New: +5,200DAU/MAU: 47% 31.8K Active Users · Q4 31.8K↑ +32% By plan Free44% Pro40% Ent.16% New: +7,700YoY: +156%
          Churn 2.8%Monthly Churn · Q12.8%↓ +0.4pp worseReasonPrice42%Feat.31%Other27%Net rev churn: 1.1%Win-back: 14% 2.4%Monthly Churn · Q22.4%↑ −0.4pp betterReasonPrice38%Feat.34%Other28%Net rev churn: 0.8%Win-back: 18% 2.1%Monthly Churn · Q32.1%↑ −0.3pp betterReasonPrice32%Feat.38%Other30%Net rev churn: 0.6%Win-back: 21% 1.8%Monthly Churn · Q41.8%↑ −0.3pp betterReasonPrice28%Feat.40%Other32%Net rev churn: 0.4%Year: −1.0pp
          ``` **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 LearningNeural NetsPyTorch
          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
          GitHubLinuxLicensing
          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
          DistributedCAP TheoremDatabases
          Top articles
          Designing a rate limiter from scratch
          When to use a message queue
          Read replicas and write-ahead logs
          Career
          CR
          Career
          3,102 articles
          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
          InterviewsSalaryRemote work
          Top articles
          The staff engineer path, explained
          How to negotiate a competing offer
          Writing your first performance review
          Security
          SE
          Security
          1,540 articles
          Application security, cryptography, threat modelling, vulnerability research, and secure development practices for engineers.
          Popularity this month
          ↑ trending+18% vs last month
          Related
          OWASPAuthCVE
          Top articles
          SQL injection prevention in 2024
          JWT vs sessions: which to use
          Zero-trust architecture basics
          DevOps
          DO
          DevOps
          1,188 articles
          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
          DockerKubernetesTerraform
          Top articles
          Building zero-downtime deploys
          Helm charts for beginners
          Observability vs. monitoring
          Performance
          PF
          Performance
          922 articles
          Techniques for optimising speed, throughput, and resource efficiency — from query tuning to Core Web Vitals.
          Popularity this month
          → stable+1% vs last month
          Related
          ProfilingCachingWeb Vitals
          Top articles
          N+1 queries and how to fix them
          React re-renders: a visual guide
          Redis caching patterns in production
          Architecture
          AR
          Architecture
          748 articles
          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
          DDDMicroservicesClean 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
          TimeFlightDestinationTermGateStatus
          06:15 AA 2847 New York JFK T3 B12 Departed
          American Airlines
          AA 2847
          Departed
          LAX
          Los Angeles
          5h 22m
          JFK
          New York
          Aircraft
          B737-800
          Seats
          162
          Class
          F / Y
          Meals
          Yes
          Departed 06:09 · 6 min earlyT3 · Gate B12
          07:40 UA 5512 Chicago ORD T7 C04 On Time
          United Airlines
          UA 5512
          On Time
          LAX
          Los Angeles
          3h 55m
          ORD
          Chicago
          Aircraft
          A320neo
          Seats
          150
          Class
          J / Y
          Wi-Fi
          Yes
          Boards 07:10 · Gate closes 07:25T7 · Gate C04
          08:20 DL 8831 London LHR TB A22 Boarding
          Delta Air Lines
          DL 8831
          Boarding
          LAX
          Los Angeles
          10h 15m
          LHR
          London
          Aircraft
          B767-400
          Seats
          245
          Class
          F / J / Y
          Meals
          Yes
          Now boarding all groups · Final callTB · Gate A22
          10:30 SQ 7736 Singapore SIN TB B44 Delayed 45m
          Singapore Airlines
          SQ 7736
          Delayed 45m
          LAX
          Los Angeles
          17h 30m
          SIN
          Singapore
          Aircraft
          A350-900ULR
          Seats
          161
          Class
          J / Y
          Meals
          2× hot
          Late inbound aircraft · New ETD 11:15TB · Gate B44
          ``` **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
          Prep
          20 min
          Cook
          1 hr 15 min
          Total
          1 hr 35 min
          Difficulty
          Medium
          Ingredients
          • 1 whole (3–4 lb) free-range chicken
            Free-Range Chicken
            Poultry · whole bird
            Per 100g (roasted, no skin)
            Calories165 kcal
            Protein31g
            Iron1.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
            Garlic
            Allium · bulb
            Per 3 cloves (9g)
            Calories13 kcal
            Allicinhigh (antimicrobial)
            Vit C9% 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)
            Calories22 kcal
            Vitamin C51mg (56% DV)
            Citric acidtenderises 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)
            Thymolantimicrobial terpene
            Iron1.7mg (10% DV)
            Rosmarinicantioxidant
            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)
            Calories102 kcal
            Saturated7.3g
            Vitamin A7% 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
          Distance700 ly
          App. mag0.42 (variable)
          Luminosity~126,000 L☉
          Radius~700 R☉
          Brightness
          β Orionis
          Rigel
          Orion · Lower right
          B8 Ia · Blue Supergiant
          Distance860 ly
          App. mag0.13 (brightest)
          Luminosity~120,000 L☉
          Temp12,100 K
          Brightness
          γ Orionis
          Bellatrix
          Orion · Upper right shoulder
          B2 III · Blue Giant
          Distance250 ly
          App. mag1.64
          Luminosity~6,400 L☉
          Temp22,000 K
          Brightness
          ε Orionis
          Alnilam
          Orion · Belt, central star
          B0 Ia · Blue Supergiant
          Distance2,000 ly
          App. mag1.69
          Luminosity~375,000 L☉
          Temp27,500 K
          λ Orionis
          Meissa
          Orion · Head
          O8 III · Blue-White Giant
          Distance1,100 ly
          App. mag3.39
          Luminosity~28,000 L☉
          Temp35,000 K
          κ Orionis
          Saiph
          Orion · Lower left
          B0.5 Ia · Blue Supergiant
          Distance720 ly
          App. mag2.07
          Luminosity~57,500 L☉
          Temp26,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
          1
          H
          Hydrogen
          1.008
          H
          Hydrogen
          Reactive Nonmetal
          Atomic No.1
          Atomic Mass1.008 u
          Config1s¹
          State (25°C)Gas
          Boiling pt.−252.9 °C
          Discovered 1766 · Henry Cavendish
          2
          He
          Helium
          4.003
          He
          Helium
          Noble Gas
          Atomic No.2
          Atomic Mass4.003 u
          Config1s²
          Boiling pt.−268.9 °C
          Discovered 1895 · Ramsey, Clève, Langlet
          3
          Li
          Lithium
          6.941
          Li
          Lithium
          Alkali Metal
          Atomic No.3
          Config[He] 2s¹
          Melting pt.180.5 °C
          UseBatteries, 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
          NoteHighly toxic dust
          Discovered 1798 · L.-N. Vauquelin
          5
          B
          Boron
          10.81
          B
          Boron
          Metalloid
          Config[He] 2s² 2p¹
          Melting pt.2,076 °C
          Discovered 1808 · Gay-Lussac, Davy
          6
          C
          Carbon
          12.01
          C
          Carbon
          Reactive Nonmetal
          Config[He] 2s² 2p²
          AllotropesDiamond, graphite
          Sublimation3,642 °C
          Known since antiquity
          7
          N
          Nitrogen
          14.01
          N
          Nitrogen
          Reactive Nonmetal
          Config[He] 2s² 2p³
          Boiling pt.−195.8 °C
          Atmosphere78% of air
          Discovered 1772 · Daniel Rutherford
          8
          O
          Oxygen
          16.00
          O
          Oxygen
          Reactive Nonmetal
          Config[He] 2s² 2p⁴
          Boiling pt.−183 °C
          Discovered 1771 · C. W. Scheele
          9
          F
          Fluorine
          19.00
          F
          Fluorine
          Halogen
          Config[He] 2s² 2p⁵
          Electronegativity3.98 (highest)
          Boiling pt.−188 °C
          Isolated 1886 · Henri Moissan
          10
          Ne
          Neon
          20.18
          Ne
          Neon
          Noble Gas
          Config[He] 2s² 2p⁶
          Boiling pt.−246.1 °C
          EmissionRed-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
          Aperture
          f/8.0
          Shutter
          1/250s
          ISO
          100
          Focal: 35mmWB: DaylightMalibu, CA
          Nikon Z6 III
          NIKKOR Z 85mm f/1.8 S
          Jan 8, 2024
          Aperture
          f/1.8
          Shutter
          1/160s
          ISO
          800
          Focal: 85mmWB: TungstenFlash: Off
          Fujifilm X-T5
          XF 16-80mm f/4 R
          Feb 22, 2024
          Aperture
          f/11
          Shutter
          1/500s
          ISO
          200
          Focal: 16mmWB: CloudyBig Sur, CA
          Canon EOS R5
          RF 24-105mm f/4L IS
          Apr 5, 2024
          Aperture
          f/5.6
          Shutter
          1/60s
          ISO
          400
          Focal: 50mmWB: ShadeOlympic NP
          Sony A7 IV
          FE 50mm f/1.4 GM
          Dec 18, 2023
          Aperture
          f/2.0
          Shutter
          1/30s
          ISO
          3200
          Focal: 50mmWB: AutoTokyo, JP
          Hasselblad X2D
          XCD 45mm f/3.5
          Nov 3, 2023
          Aperture
          f/16
          Shutter
          1/1000s
          ISO
          64
          Focal: 45mmWB: DaylightSahara, Morocco
          Leica M11
          Summicron 50mm f/2
          Oct 14, 2023
          Aperture
          f/4.0
          Shutter
          1/125s
          ISO
          200
          Focal: 50mmWB: CloudyHighlands, UK
          Nikon Z6 III
          NIKKOR Z 14-30mm f/4 S
          Sep 27, 2023
          Aperture
          f/2.8
          Shutter
          20s
          ISO
          1600
          Focal: 14mmWB: 3200KIceland
          ``` **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
          2
          Reports
          214
          Org Size
          8yr
          Tenure
          sarah@company.comNYC · EST
          MW
          Marcus Webb
          Chief Technology Officer
          Engineering
          MW
          Marcus Webb
          Chief Technology Officer
          Engineering · Platform
          2
          Reports
          96
          Org Size
          5yr
          Tenure
          m.webb@company.comSF · PST
          ER
          Elena Russo
          Chief Marketing Officer
          Marketing
          ER
          Elena Russo
          Chief Marketing Officer
          Marketing · Growth
          2
          Reports
          68
          Org Size
          3yr
          Tenure
          e.russo@company.comLondon · GMT
          AT
          Amir Tahir
          Chief Financial Officer
          Finance
          AT
          Amir Tahir
          Chief Financial Officer
          Finance · Strategy
          2
          Reports
          50
          Org Size
          2yr
          Tenure
          a.tahir@company.comDubai · GST
          ``` **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.
          Runway18 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 share31% 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
          Bold Italic Underline 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
          Username ? Letters, numbers, and underscores only. 3–20 characters.
          Email address ? Used for login and account recovery. Never shown publicly.
          Website ? Include https:// — displayed on your public profile page.
          Bio ? Shown below your name on your profile. Max 160 characters.
          Time zone ? Used to display timestamps and schedule notifications correctly.
          ``` **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
          Slide up
          Neon glow
          Rotate icon
          Border draw
          3D depth
          Ripple ring
          Shimmer
          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
          Scroll animation demo

          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.

          ↓ SCROLL DOWN ↓

          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."

          AK
          Alex Kim
          Lead Developer

          "Buttery smooth on mobile. The reduced-motion support is exactly what we needed for accessibility compliance."

          SL
          Sara Liu
          UX Engineer

          "Implemented in 20 minutes. The Intersection Observer approach means zero layout jank during scroll."

          MR
          Marcus Reid
          Frontend Architect
          98%
          Lighthouse score
          6
          Animation types
          0kb
          Dependencies
          A11y
          Reduced motion
          ``` **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 →
          Vertical flip — rotateX
          🌿
          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 →
          700msDefault duration
          1000pxPerspective
          rotateY/XTransforms
          0 JSFlip 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
          Text Reveal Transitions

          Type
          In
          Mo
          tion.

          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

          01Brand Identity Systems
          02Editorial Typography
          03Motion Design Reels
          04Interactive Installations
          05Digital 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 swaptransition: background .4s
          Gradient shiftlinear-gradient swap
          Left-to-right sweepbackground-position slide
          Top-to-bottom fillbackground-position vertical
          Radial burstpseudo-element scale
          Diagonal shimmertranslateX sweep
          Colour cycleanimation on hover
          Navigation — background colour hover
          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

          Fade In
          Fade Out

          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

          ``` **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:
          Card skeletons — shimmer variant
          🚀
          M
          Marcus Reid
          Frontend Engineer
          CSSReact
          🌊
          Y
          Yuki Mori
          Data Scientist
          PythonML
          🔥
          A
          Amara Cole
          Product Designer
          FigmaMotion
          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

          ``` **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
          01 / 04

          Page Transitions

          CSS-powered page transition effects. Choose a style above, then click Next to see it play.

          02 / 04

          Smooth Moves

          Four transition types: horizontal wipe, curtain open, radial circle burst, and vertical slices.

          03 / 04

          Full Coverage

          Each effect uses pure CSS animations on a fixed overlay that covers the viewport during the swap.

          04 / 04

          Cycle Back

          Click below to loop back to the start, or select a different transition type above.

          ``` **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
          Outlined + text buttons
          FABs + chips
          Filter chips
          All
          Design
          Development
          Marketing
          Research
          Strategy
          List items
          📧
          Inbox
          3 unread messages
          Starred
          12 starred items
          📤
          Sent
          All sent messages
          🗑️
          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 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 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
          0ms
          Avg. Response
          ↓ 18ms faster
          0M
          API Calls / Day
          ↑ 3.2M new
          $0.00
          Total transaction volume (live demo)
          82% Performance
          Performance
          95% Accessibility
          Accessibility
          68% SEO Score
          SEO Score
          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

          ✦ Premium
          💎
          Holographic Card
          CSS 3D tilt with a rotating conic gradient shimmer and a radial specular glare that follows your cursor.
          ★ Gold tier
          🏆
          Gold Edition
          Warm amber gradient with a soft radial bloom. The tilt depth is controlled by JavaScript reading mousemove coordinates.
          ◈ Active
          Neon Green
          Deep forest background with teal glow accents. Floating gradient orbs shift with a parallax offset during tilt.
          ◻ Standard
          🔮
          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

          Profile Cards

          👩‍🎨
          Aria Chen
          Senior Designer
          128
          Projects
          4.9k
          Followers
          312
          Likes
          👨‍💻
          Leo Marquez
          Full-Stack Engineer
          94
          Repos
          2.1k
          Stars
          87
          PRs
          🧠
          Nova Singh
          ML Researcher
          41
          Papers
          8.7k
          Citations
          19
          Models

          Notification Toasts

          Deployment successfulProduction v2.4.1 is now live
          just now
          ⚠️
          High memory usageServer node-03 at 89% capacity
          2m ago
          💬
          New commentAria replied to your design review
          5m ago
          🔔
          ReminderSprint 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

          • Set up CI/CD pipelineHigh
          • Design system token auditHigh
          • Write API documentationMid
          • Migrate legacy endpointsMid
          • Lighthouse performance auditLow
          • Update onboarding guideLow

          Feature Cards — Scale Up

          🚀
          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

          Data Table — Rows Fade Up

          ServiceStatusUptimeLatency
          API GatewayOperational99.98%12ms
          Auth ServiceOperational99.95%18ms
          Storage CDNDegraded99.41%84ms
          DatabaseOperational100%4ms
          Queue WorkerOutage97.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

          Interactive Zones

          Hover a link Hover over me
          Card

          Move freely

          The cursor ring expands when hovering interactive elements.

          Button

          Stats

          0

          Trail particles created

          0

          Current X position

          0

          Current Y position

          0

          Cursor speed (px/frame)

          ``` **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

          Social / Icon Buttons

          Navigation Items

          Floating Action Buttons

          ``` **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

          Word-by-Word Reveal

          Rotating Word Swap

          We build
          interfaces

          Character Colour Wave

          Text Scramble Reveal

          ``` **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

          TypeScript0%
          React0%
          Node.js0%
          PostgreSQL0%
          Rust0%

          Shimmer & Striped Variants

          Upload progress0%
          Installing packages0%
          Syncing data0%

          Page / Loading Indicators

          Determinate — fetching data
          Indeterminate — waiting for server

          Circular Progress Rings

          Step Indicators

          Order progressStep 3 of 5
          PlacedConfirmedPackedShippedDelivered
          ``` **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
          AXIOM-OS v2.4 // SECURE SHELL
          ════════════════════════════════

          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:~$
          ``` **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

          ``` **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
          ``` **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
          app.ts  ×
          ``` **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.