# 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-05-13 (regenerated on every deploy)
## Collections
---
## 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
DESIGN
Compose from atomic tokens. Stay consistent across surfaces and scale.
BUILD
Hand-coded HTML and CSS, no framework lock-in. Ship faster.
SHIP
Static output, edge-cached, instant on every connection.
REPEAT
Iterate without rewriting. Components compose cleanly.
```
**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
Amethyst
Royal violet anchor of the system. Use for primary actions.
Copper
Warm metallic accent. Use sparingly for highlights and badges.
Sage
Cool restorative neutral. Use for success and secondary chrome.
```
**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
01
Discover
Map the problem space. Talk to users. Sketch hypotheses.
02
Define
Pick one bet. Frame it crisply. Write what success looks like.
03
Deliver
Ship a thin slice. Measure. Decide what's next.
```
**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
```
**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
SIDE A · Echoes
SIDE B · Static
SIDE C · Drift
SIDE D · Hum
```
**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
North
Cold violet ribbon, 22:00 local
East
Warm copper veil, 23:30 local
West
Soft sage glow, 01:00 local
```
**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
```
**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; }
}
```
---
## 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.
A
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."
JR
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
```
**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
// 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
"Finally, snippets that don't fight my stack."
— Marcus T., DevOps
"My team's dashboard ships twice as fast."
— Priya R., Eng Lead
```
**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."
Read more
— 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
Copy
"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
Home
Collections
CSS Tabs
```
**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
Home
›
Design
›
Components
```
**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
Home
Products
Detail
```
**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
Home
Library
Effects
```
**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
Home
╱
Shop
╱
Item
```
**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
Home
Docs
Guide
```
**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
Home
Projects
Dashboard
```
**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
01 Home
02 Articles
03 Read
```
**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
~ home
/ projects
/ css-tabs
_
```
**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
Home
Blog
Article
```
**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
⌂ Home
◫ Components
⬡ Breadcrumbs
```
**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
Home
Components
Buttons
```
**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
Home
Collections
Breadcrumbs
```
**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
Home
Blog
Post
```
**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
Home
Motion
Effects
```
**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
Home
Shop
Product
```
**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
Home
Design
Tokens
```
**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
Home
Docs
API
```
**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
✓
Cart
2
Shipping
3
Payment
```
**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
Home
Motion
Animation
```
**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
Home
Library
Collections
```
**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
Copied!
```
**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);
});
});
});
```
---
## 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
Monthly
Yearly
Forever
```
**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
Edit
Duplicate
Archive
```
**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
React
TypeScript
Astro
```
**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
Deploy
```
**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
B
I
U
S
```
**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
«
‹
1
2
3
4
5
›
»
```
**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 Cart
2 Address
3 Payment
4 Review
```
**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
Profile
Settings
Sign out
```
**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
ALL
DRAFT
LIVE
```
**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
RUN
STOP
CLEAR
EXPORT
```
**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
Today
7 days
30 days
Custom
```
**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
Free
Pro
Suite
```
**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
Sort: Newest
Newest
Oldest
A → Z
Z → A
Most popular
```
**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
Profile
Notifications
Privacy
Billing
```
**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
Starter
Plus
Team
```
**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; }
}
```
---
## 21 CSS Button Hover Effects
URL: https://codefronts.com/motion/css-button-hover-effects/
Description: 21 original CSS button hover effects — liquid fill, glitch, neon pulse, 3D flip, particle burst and more. Pure CSS with 3 vanilla JS enhancements. Copy-paste ready.
Demo count: 21
### 01. Liquid Fill
**Type:** Pure CSS
**Description:** Background floods upward like liquid filling a container via pseudo-element height transition.
**HTML:**
```html
Hover Me
```
**CSS:**
```css
.bhe-01__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-01__btn {
position: relative;
color: #7c6cff;
background: transparent;
border: 2px solid #7c6cff;
overflow: hidden;
transition: color 0.4s;
z-index: 0;
}
.bhe-01__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-01__btn:hover {
color: #fff;
}
.bhe-01__btn:hover::before {
height: calc(100% + 4px);
}
```
### 02. 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
Magnetic Border
```
**CSS:**
```css
.bhe-02__wrap {
font-family: inherit;
letter-spacing: 0.02em;
background: transparent;
color: inherit;
}
.bhe-02__wrap {
position: relative;
padding: 2px;
border: none;
background: none;
cursor: pointer;
border-radius: 8px;
display: inline-block;
}
.bhe-02__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-02__wrap:hover::before {
opacity: 1;
animation-play-state: running;
}
@keyframes border-spin {
to {
transform: rotate(360deg);
}
}
.bhe-02__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-02__wrap:hover .bhe-02__inner {
transform: translateY(-2px);
box-shadow: 0 8px 24px rgba(124, 108, 255, 0.3);
}
@media (prefers-reduced-motion: reduce) {
.bhe-02__wrap,
.bhe-02__wrap * {
animation: none !important;
}
}
```
### 03. Glitch Slice
**Type:** Pure CSS
**Description:** Two color-shifted clones slice through in staggered horizontal bands, simulating a signal glitch.
**HTML:**
```html
GLITCH
```
**CSS:**
```css
.bhe-03__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-03__btn {
position: relative;
overflow: hidden;
}
.bhe-03__btn::before,
.bhe-03__btn::after {
content: attr(data-text);
position: absolute;
inset: 0;
display: flex;
align-items: center;
justify-content: center;
opacity: 0;
}
.bhe-03__btn::before {
background: #ff6c8a;
color: #fff;
clip-path: polygon(0 30%, 100% 30%, 100% 50%, 0 50%);
}
.bhe-03__btn::after {
background: #7c6cff;
color: #fff;
clip-path: polygon(0 55%, 100% 55%, 100% 75%, 0 75%);
}
.bhe-03__btn:hover::before {
animation: glitch1 0.3s steps(1) infinite;
}
.bhe-03__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-03__btn,
.bhe-03__btn * {
animation: none !important;
}
}
```
### 04. Neon Pulse
**Type:** Pure CSS
**Description:** Multi-layered box-shadows create a breathing neon glow that pulses rhythmically on hover.
**HTML:**
```html
NEON
```
**CSS:**
```css
.bhe-04__btn {
padding: 12px 32px;
font-size: 13.5px;
font-family: inherit;
font-weight: 500;
border-radius: 8px;
cursor: pointer;
background: transparent;
color: inherit;
}
.bhe-04__btn {
color: #2ecc8a;
border: 2px solid #2ecc8a;
background: transparent;
text-transform: uppercase;
letter-spacing: 0.08em;
transition: all 0.3s;
}
.bhe-04__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-04__btn,
.bhe-04__btn * {
animation: none !important;
}
}
```
### 05. 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
Split Reveal
Split Reveal
```
**CSS:**
```css
.bhe-05__btn {
padding: 12px 32px;
font-family: inherit;
border-radius: 8px;
letter-spacing: 0.02em;
background: transparent;
color: inherit;
}
.bhe-05__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-05__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-05__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-05__btn:hover .bhe-05__top {
transform: translateY(-50%);
}
.bhe-05__btn:hover .bhe-05__bottom {
transform: translateY(0);
}
```
### 06. Diagonal Shutter
**Type:** Pure CSS
**Description:** A skewed gradient panel wipes diagonally across the button like a camera shutter opening.
**HTML:**
```html
Hover Me
```
**CSS:**
```css
.bhe-06__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-06__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-06__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-06__btn:hover::before {
left: 0;
}
.bhe-06__btn:hover {
border-color: transparent;
}
```
### 07. 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
Click Me
```
**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 {
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-07__btn:hover {
transform: translateY(-4px);
box-shadow: 0 8px 0 #4a3aad;
}
.bhe-07__btn:active {
transform: translateY(2px);
box-shadow: 0 2px 0 #4a3aad;
}
```
### 08. Center Underline Draw
**Type:** Pure CSS
**Description:** A gradient underline expands symmetrically outward from the center of the button text.
**HTML:**
```html
Hover Me
```
**CSS:**
```css
.bhe-08__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-08__btn {
position: relative;
background: transparent;
border: none;
}
.bhe-08__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-08__btn:hover::after {
left: 32px;
right: 32px;
}
```
### 09. 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
Hover Me
Flipped!
```
**CSS:**
```css
.bhe-09__wrapper {
font-size: 13.5px;
font-family: inherit;
font-weight: 500;
cursor: pointer;
letter-spacing: 0.02em;
background: transparent;
color: inherit;
}
.bhe-09__wrapper {
perspective: 600px;
display: inline-block;
}
.bhe-09__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-09__front,
.bhe-09__back {
display: block;
padding: 12px 32px;
border-radius: 8px;
backface-visibility: hidden;
}
.bhe-09__front {
background: #ff6c8a;
color: #fff;
}
.bhe-09__back {
position: absolute;
inset: 0;
display: flex;
align-items: center;
justify-content: center;
background: #7c6cff;
color: #fff;
transform: rotateX(180deg);
}
.bhe-09__wrapper:hover .bhe-09__btn {
transform: rotateX(180deg);
}
```
### 10. Particle Burst
**Type:** Pure CSS
**Description:** Six colored dots shoot out in all directions from the center of the button on hover.
**HTML:**
```html
Burst!
```
**CSS:**
```css
.bhe-10__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-10__btn {
position: relative;
overflow: visible;
}
.bhe-10__dot {
position: absolute;
width: 6px;
height: 6px;
border-radius: 50%;
top: 50%;
left: 50%;
margin: -3px 0 0 -3px;
opacity: 0;
}
.bhe-10__btn:hover .bhe-10__dot {
animation: burst 0.65s ease-out forwards;
}
.bhe-10__dot:nth-child(1) {
background: #7c6cff;
--dx: -52px;
--dy: -42px;
}
.bhe-10__dot:nth-child(2) {
background: #ff6c8a;
--dx: 52px;
--dy: -42px;
animation-delay: 0.05s;
}
.bhe-10__dot:nth-child(3) {
background: #2ecc8a;
--dx: -62px;
--dy: 2px;
animation-delay: 0.02s;
}
.bhe-10__dot:nth-child(4) {
background: #f5a623;
--dx: 62px;
--dy: 2px;
animation-delay: 0.07s;
}
.bhe-10__dot:nth-child(5) {
background: #7c6cff;
--dx: -36px;
--dy: 46px;
animation-delay: 0.04s;
}
.bhe-10__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-10__btn,
.bhe-10__btn * {
animation: none !important;
}
}
```
### 11. 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
Slide Doors
```
**CSS:**
```css
.bhe-11__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-11__btn {
position: relative;
overflow: hidden;
}
.bhe-11__btn::before,
.bhe-11__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-11__btn::before {
left: 0;
transform: translateX(-101%);
}
.bhe-11__btn::after {
right: 0;
transform: translateX(101%);
}
.bhe-11__btn .bhe-11__label {
position: relative;
z-index: 1;
transition: color 0.4s;
}
.bhe-11__btn:hover::before {
transform: translateX(0);
}
.bhe-11__btn:hover::after {
transform: translateX(0);
}
.bhe-11__btn:hover .bhe-11__label {
color: #fff;
}
```
### 12. Typewriter Retype
**Type:** CSS + JS
**Description:** Text erases and retypes itself character by character on hover — like a live terminal cursor.
**HTML:**
```html
console.log()
```
**CSS:**
```css
.bhe-12__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-12__btn {
font-family: monospace;
}
.bhe-12__cursor {
display: inline-block;
width: 2px;
height: 13px;
background: currentColor;
margin-left: 2px;
vertical-align: middle;
opacity: 0;
}
.bhe-12__btn:hover .bhe-12__cursor {
animation: blink 0.6s step-end infinite;
}
@keyframes blink {
0%,
100% {
opacity: 1;
}
50% {
opacity: 0;
}
}
@media (prefers-reduced-motion: reduce) {
.bhe-12__btn,
.bhe-12__btn * {
animation: none !important;
}
}
```
**JS:**
```js
document.querySelectorAll(".bhe-12__btn").forEach(function (btn) {
const txt = btn.querySelector(".bhe-12__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);
}
});
});
```
### 13. Hard Shadow Shift
**Type:** Pure CSS
**Description:** Brutalist hard offset shadow shifts both position and color on hover, snaps back on click.
**HTML:**
```html
CLICK ME
```
**CSS:**
```css
.bhe-13__btn {
padding: 12px 32px;
font-size: 13.5px;
font-family: inherit;
border-radius: 8px;
cursor: pointer;
background: transparent;
color: inherit;
}
.bhe-13__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-13__btn:hover {
box-shadow: 8px 8px 0 #7c6cff;
transform: translate(-2px, -2px);
}
.bhe-13__btn:active {
box-shadow: 2px 2px 0 #0a0a0f;
transform: translate(2px, 2px);
}
```
### 14. Ripple Wave
**Type:** CSS + JS
**Description:** A ripple circle radiates outward from the exact point of your click, like Material Design.
**HTML:**
```html
Click Me
```
**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;
overflow: hidden;
}
.bhe-14__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-14__btn,
.bhe-14__btn * {
animation: none !important;
}
}
```
**JS:**
```js
document.querySelectorAll(".bhe-14__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-14__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(); });
});
});
```
### 15. Rainbow Border Spin
**Type:** Pure CSS
**Description:** A conic-gradient border spins continuously using the CSS mask-composite technique.
**HTML:**
```html
Hover Me
```
**CSS:**
```css
.bhe-15__btn {
font-size: 13.5px;
font-family: inherit;
font-weight: 500;
cursor: pointer;
letter-spacing: 0.02em;
color: inherit;
background: transparent;
}
.bhe-15__btn {
position: relative;
border: none;
}
.bhe-15__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-15__btn:hover::before {
opacity: 1;
animation: spin 2s linear infinite;
}
@keyframes spin {
to {
transform: rotate(360deg);
}
}
@media (prefers-reduced-motion: reduce) {
.bhe-15__btn,
.bhe-15__btn * {
animation: none !important;
}
}
```
### 16. Morph Shape
**Type:** Pure CSS
**Description:** The button border-radius morphs from rectangle to pill and color transitions simultaneously.
**HTML:**
```html
Hover Me
```
**CSS:**
```css
.bhe-16__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-16__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-16__btn:hover {
border-radius: 50px;
background: #7c6cff;
transform: scaleX(0.92);
}
```
### 17. 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
Get Started→
```
**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;
transition: padding 0.35s cubic-bezier(0.23, 1, 0.32, 1);
}
.bhe-17__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-17__btn:hover {
padding-right: 52px;
}
.bhe-17__btn:hover .bhe-17__icon {
right: 16px;
opacity: 1;
}
```
### 18. Cursor Spotlight
**Type:** CSS + JS
**Description:** A soft radial light follows your cursor around inside the button, illuminating where you hover.
**HTML:**
```html
Hover Me
```
**CSS:**
```css
.bhe-18__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-18__btn {
position: relative;
overflow: hidden;
}
.bhe-18__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-18__btn:hover .bhe-18__glow {
opacity: 1;
}
```
**JS:**
```js
document.querySelectorAll(".bhe-18__btn").forEach(function (btn) {
const glow = btn.querySelector(".bhe-18__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";
});
});
```
### 19. Stagger Fill
**Type:** Pure CSS
**Description:** Five vertical segments fill upward one by one in a cascading waterfall sequence.
**HTML:**
```html
Hover Me
```
**CSS:**
```css
.bhe-19__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-19__btn {
position: relative;
overflow: hidden;
}
.bhe-19__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-19__seg:nth-child(1) {
left: 0%;
transition-delay: 0s;
}
.bhe-19__seg:nth-child(2) {
left: 20%;
transition-delay: 0.04s;
}
.bhe-19__seg:nth-child(3) {
left: 40%;
transition-delay: 0.08s;
}
.bhe-19__seg:nth-child(4) {
left: 60%;
transition-delay: 0.12s;
}
.bhe-19__seg:nth-child(5) {
left: 80%;
transition-delay: 0.16s;
}
.bhe-19__label {
position: relative;
z-index: 1;
transition: color 0.4s 0.1s;
}
.bhe-19__btn:hover .bhe-19__seg {
transform: scaleY(1);
}
.bhe-19__btn:hover .bhe-19__label {
color: #fff;
}
```
### 20. Sunburst Expand
**Type:** Pure CSS
**Description:** Spinning conic-gradient rays fan out behind the button on hover, glowing like a sunburst.
**HTML:**
```html
Sunburst
```
**CSS:**
```css
.bhe-20__btn {
font-family: inherit;
letter-spacing: 0.02em;
background: transparent;
color: inherit;
}
.bhe-20__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-20__btn:hover {
transform: scale(1.06);
box-shadow: 0 8px 24px rgba(245, 168, 74, 0.5);
}
.bhe-20__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-20__btn:hover .bhe-20__rays {
opacity: 1;
animation: sunburst-spin 6s linear infinite;
}
@keyframes sunburst-spin {
to {
transform: rotate(360deg);
}
}
.bhe-20__label {
position: relative;
z-index: 1;
}
@media (prefers-reduced-motion: reduce) {
.bhe-20__btn,
.bhe-20__btn * {
animation: none !important;
}
}
```
### 21. 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
3D Press
```
**CSS:**
```css
.bhe-21__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-21__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-21__btn:hover {
transform: translateY(-3px);
box-shadow:
0 9px 0 #4a3ab0,
0 14px 24px rgba(74, 58, 176, 0.45);
}
.bhe-21__btn:active {
transform: translateY(4px);
box-shadow:
0 2px 0 #4a3ab0,
0 4px 8px rgba(74, 58, 176, 0.3);
}
```
---
## 31 CSS Button Designs
URL: https://codefronts.com/components/css-buttons/
Description: 31 hand-coded CSS buttons styled as real-world materials — brushed brass, holographic foil, vinyl record, velvet ribbon, frosted ice, brutalist concrete and more.
Demo count: 31
### 01. 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
Engage
```
**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);
}
```
### 02. 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
Send Wish
福
```
**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);
}
```
### 03. 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
Cool Down
```
**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%; }
```
### 04. 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
RETURN
```
**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);
}
```
### 05. 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
Reserve
```
**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);
}
```
### 06. 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
PRESCRIBE 500 MG
```
**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)); }
```
### 07. Copper Coin
**Type:** Pure CSS
**Description:** Aged copper disc with verdigris patina blooming around the rim. Hover spins the patina conically.
**HTML:**
```html
Mint
```
**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);
}
```
### 08. 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
Open
```
**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%);
}
```
### 09. Holographic Foil
**Type:** Pure CSS
**Description:** Iridescent cyan→magenta sheen with a ragged sticker edge. Hover shifts the spectrum across the surface.
**HTML:**
```html
Mint NFT
```
**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);
}
```
### 10. 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
SUBMIT
```
**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; }
```
### 11. Mercury Bead
**Type:** Pure CSS
**Description:** Quicksilver bead that morphs its border-radius on hover, like surface tension giving way under pressure.
**HTML:**
```html
Liquid
```
**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);
}
```
### 12. 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
Continue
⏎
```
**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); }
```
### 13. 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
FRAGILE
```
**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);
}
```
### 14. Glass Shard
**Type:** Pure CSS
**Description:** Obsidian shard with a faceted clip-path; magenta and cyan refract through the cuts on hover.
**HTML:**
```html
Activate
```
**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);
}
```
### 15. Velvet Ribbon
**Type:** Pure CSS
**Description:** Wine-velvet pill with gilt edges; the nap shimmers like brushed fabric on hover.
**HTML:**
```html
RSVP
```
**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);
}
```
### 16. LED Segment
**Type:** Pure CSS
**Description:** Phosphor-green 7-segment-style display on a pure black panel with a faint scanline overlay.
**HTML:**
```html
START
```
**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);
}
```
### 17. 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
SIDE A
```
**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; }
```
### 18. Chalkboard
**Type:** Pure CSS
**Description:** Slate-green chalkboard with a chalk-drawn label and dusty grain. Hover smudges a faint eraser trail.
**HTML:**
```html
Today's Special
```
**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; }
```
### 19. 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
Play
```
**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');
});
});
```
### 20. 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
Save to album
'89 · 03/24
```
**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);
}
```
### 21. 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
SFO
JFK
SEAT
14A
```
**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);
}
```
### 22. 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
PROCESS
```
**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);
});
});
```
### 23. Rx Label
**Type:** Pure CSS
**Description:** Cream pharmacy label with letterpress serif, dotted underline, and a red Rx badge. Vintage prescription chic.
**HTML:**
```html
℞
TAKE ONE
```
**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); }
```
### 24. 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
OFF
ON
```
**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');
});
});
```
### 25. Postage Stamp
**Type:** Pure CSS
**Description:** Regal blue stamp with scalloped perforated edges and a faded ink date. Pure SVG-mask perforation.
**HTML:**
```html
FIRST CLASS
¢25
```
**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); }
```
### 26. Cigar Band
**Type:** Pure CSS
**Description:** Gold filigree foil seal over a maroon ribbon; ornate Victorian club-lounge energy.
**HTML:**
```html
PRIVATE CLUB
```
**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); }
```
### 27. Calculator Key
**Type:** Pure CSS
**Description:** Beige concave keycap with olive-green accent label; click flips the press shadow flush.
**HTML:**
```html
=
EQUAL
```
**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);
}
```
### 28. Toolbox Latch
**Type:** CSS + JS
**Description:** Enamel teal lever with chrome bolt; the cursor spotlight illuminates the metal as you move across.
**HTML:**
```html
UNLOCK
```
**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%');
});
});
```
### 29. 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
PAID
TOTAL
$0
```
**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);
});
});
```
### 30. 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
COMPILE
```
**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');
});
});
```
### 31. 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
SCAN
```
**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 Card Hover Effects
URL: https://codefronts.com/motion/css-card-hover-effects/
Description: 27 original CSS card hover effects — elastic lift, 3D tilt, holographic shimmer, spotlight, aurora and more. Pure CSS with 4 vanilla JS enhancements. Copy-paste ready.
Demo count: 27
### 01. Elastic Lift
**Type:** Pure CSS
**Description:** Card springs upward with a cubic-bezier overshoot, expands its shadow and highlights the border on hover.
**HTML:**
```html
Design
Elastic Lift
Springs up with an overshoot bounce.
```
**CSS:**
```css
.card-01__tag {
font-family: monospace;
font-size: 10px;
padding: 2px 8px;
border-radius: 20px;
background: rgba(124, 108, 255, 0.15);
color: #7c6cff;
border: 1px solid rgba(124, 108, 255, 0.3);
display: inline-block;
margin-bottom: 10px;
}
.card-01__title {
font-size: 17px;
font-weight: 700;
color: #f0eeff;
margin-bottom: 6px;
}
.card-01__body {
font-size: 13px;
color: #b8b6d4;
line-height: 1.6;
}
.card-01 {
width: 100%;
max-width: 280px;
padding: 22px;
border-radius: 14px;
background: #17171f;
border: 1px solid rgba(255, 255, 255, 0.08);
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
cursor: pointer;
position: relative;
transition:
transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1),
box-shadow 0.45s cubic-bezier(0.34, 1.56, 0.64, 1),
border-color 0.3s;
}
.card-01:hover {
transform: translateY(-12px);
box-shadow:
0 20px 40px rgba(124, 108, 255, 0.22),
0 8px 16px rgba(0, 0, 0, 0.3);
border-color: rgba(124, 108, 255, 0.4);
}
.card-01__glow {
position: absolute;
inset: 0;
border-radius: 14px;
background: radial-gradient(ellipse at 50% 120%, rgba(124, 108, 255, 0.2), transparent 65%);
opacity: 0;
transition: opacity 0.4s;
pointer-events: none;
}
.card-01:hover .card-01__glow {
opacity: 1;
}
```
### 02. Gradient Border Draw
**Type:** Pure CSS
**Description:** A conic-gradient rainbow border fades in around the card perimeter on hover via an inset pseudo-element.
**HTML:**
```html
Frontend
Border Draw
A gradient border traces itself on hover.
```
**CSS:**
```css
.card-02__tag {
font-family: monospace;
font-size: 10px;
padding: 2px 8px;
border-radius: 20px;
background: rgba(124, 108, 255, 0.15);
color: #7c6cff;
border: 1px solid rgba(124, 108, 255, 0.3);
display: inline-block;
margin-bottom: 10px;
}
.card-02__title {
font-size: 17px;
font-weight: 700;
color: #f0eeff;
margin-bottom: 6px;
}
.card-02__body {
font-size: 13px;
color: #b8b6d4;
line-height: 1.6;
}
.card-02 {
width: 100%;
max-width: 280px;
position: relative;
padding: 22px;
border-radius: 14px;
background: #17171f;
border: 1px solid rgba(255, 255, 255, 0.06);
cursor: pointer;
z-index: 0;
transition: border-color 0.3s;
}
.card-02::before {
content: "";
position: absolute;
inset: -1.5px;
border-radius: 15.5px;
background: conic-gradient(from 0deg, #7c6cff, #ff6c8a, #3de8f5, #1ed98a, #7c6cff);
z-index: -1;
opacity: 0;
transition: opacity 0.4s;
}
.card-02::after {
content: "";
position: absolute;
inset: 0;
border-radius: 13px;
background: #17171f;
z-index: -1;
}
.card-02:hover::before {
opacity: 1;
}
.card-02:hover {
border-color: transparent;
}
```
### 03. Stacked Reveal
**Type:** Pure CSS
**Description:** Two ghost cards fan out from beneath the front card on hover using rotate and translate transforms.
**HTML:**
```html
CSS
Stacked Reveal
Hidden cards fan out from beneath.
```
**CSS:**
```css
.card-03__tag {
font-family: monospace;
font-size: 10px;
padding: 2px 8px;
border-radius: 20px;
background: rgba(124, 108, 255, 0.15);
color: #7c6cff;
border: 1px solid rgba(124, 108, 255, 0.3);
display: inline-block;
margin-bottom: 10px;
}
.card-03__title {
font-size: 17px;
font-weight: 700;
color: #f0eeff;
margin-bottom: 6px;
}
.card-03__body {
font-size: 13px;
color: #b8b6d4;
line-height: 1.6;
}
.card-03 {
width: 100%;
max-width: 280px;
position: relative;
cursor: pointer;
min-height: 130px;
}
.card-03__back {
position: absolute;
inset: 0;
border-radius: 14px;
transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}
.card-03__back--1 {
background: rgba(124, 108, 255, 0.25);
border: 1px solid rgba(124, 108, 255, 0.4);
}
.card-03__back--2 {
background: rgba(255, 108, 138, 0.18);
border: 1px solid rgba(255, 108, 138, 0.3);
}
.card-03__front {
position: relative;
z-index: 2;
padding: 22px;
border-radius: 14px;
background: #17171f;
border: 1px solid rgba(255, 255, 255, 0.08);
transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}
.card-03:hover .card-03__back--1 {
transform: translate(-14px, 10px) rotate(-5deg);
}
.card-03:hover .card-03__back--2 {
transform: translate(14px, 12px) rotate(5deg);
}
.card-03:hover .card-03__front {
transform: translateY(-4px);
}
```
### 04. Holographic Shimmer
**Type:** Pure CSS
**Description:** A rainbow gradient sweeps across the card on hover using translateX over a multi-colour iridescent base layer.
**HTML:**
```html
Ultra Rare
Holographic
Rainbow light sweeps the surface.
```
**CSS:**
```css
.card-04__tag {
font-family: monospace;
font-size: 10px;
padding: 2px 8px;
border-radius: 20px;
background: rgba(124, 108, 255, 0.15);
color: #7c6cff;
border: 1px solid rgba(124, 108, 255, 0.3);
display: inline-block;
margin-bottom: 10px;
}
.card-04__title {
font-size: 17px;
font-weight: 700;
color: #f0eeff;
margin-bottom: 6px;
}
.card-04__body {
font-size: 13px;
color: #b8b6d4;
line-height: 1.6;
}
.card-04 {
width: 100%;
max-width: 280px;
position: relative;
overflow: hidden;
padding: 22px;
border-radius: 14px;
border: 1px solid rgba(255, 255, 255, 0.12);
cursor: pointer;
}
.card-04::before {
content: "";
position: absolute;
inset: 0;
background: linear-gradient(135deg, rgba(124, 108, 255, 0.18), rgba(61, 232, 245, 0.12), rgba(255, 108, 138, 0.18), rgba(30, 217, 138, 0.12));
opacity: 0.75;
}
.card-04__shine {
position: absolute;
inset: 0;
background: linear-gradient(110deg, transparent 20%, rgba(255, 255, 255, 0.2) 50%, transparent 80%);
transform: translateX(-100%);
transition: transform 0.65s ease;
}
.card-04:hover .card-04__shine {
transform: translateX(100%);
}
.card-04__tag,
.card-04__title,
.card-04__body,
.card-04__bar {
position: relative;
z-index: 1;
}
.card-04__bar {
height: 3px;
border-radius: 2px;
margin-top: 14px;
background: linear-gradient(90deg, #7c6cff, #ff6c8a, #3de8f5);
}
```
### 05. Curtain Reveal
**Type:** Pure CSS
**Description:** A solid gradient overlay slides upward like a stage curtain to reveal the card content underneath.
**HTML:**
```html
Motion
Curtain Reveal
Content slides into view as overlay pulls away.
Explore →
```
**CSS:**
```css
.card-05__tag {
font-family: monospace;
font-size: 10px;
padding: 2px 8px;
border-radius: 20px;
background: rgba(124, 108, 255, 0.15);
color: #7c6cff;
border: 1px solid rgba(124, 108, 255, 0.3);
display: inline-block;
margin-bottom: 10px;
}
.card-05__title {
font-size: 17px;
font-weight: 700;
color: #f0eeff;
margin-bottom: 6px;
}
.card-05__body {
font-size: 13px;
color: #b8b6d4;
line-height: 1.6;
}
.card-05 {
width: 100%;
max-width: 280px;
position: relative;
overflow: hidden;
padding: 22px;
border-radius: 14px;
background: #17171f;
border: 1px solid rgba(255, 255, 255, 0.08);
cursor: pointer;
min-height: 140px;
}
.card-05__curtain {
position: absolute;
inset: 0;
background: linear-gradient(160deg, #7c6cff, #ff6c8a);
transform: translateY(0);
transition: transform 0.48s cubic-bezier(0.23, 1, 0.32, 1);
z-index: 1;
border-radius: inherit;
}
.card-05:hover .card-05__curtain {
transform: translateY(-105%);
}
.card-05__content {
position: relative;
z-index: 2;
}
.card-05__cta {
display: inline-block;
margin-top: 12px;
font-size: 13px;
color: #7c6cff;
font-weight: 600;
transform: translateY(8px);
opacity: 0;
transition:
transform 0.35s 0.18s ease,
opacity 0.35s 0.18s ease;
}
.card-05:hover .card-05__cta {
transform: translateY(0);
opacity: 1;
}
```
### 06. Corner Peel
**Type:** Pure CSS
**Description:** The bottom-right corner peels away to reveal a gradient triangle, growing from 0 to 72px on hover.
**HTML:**
```html
Effect
Corner Peel
Bottom-right corner folds up on hover.
```
**CSS:**
```css
.card-06__tag {
font-family: monospace;
font-size: 10px;
padding: 2px 8px;
border-radius: 20px;
background: rgba(124, 108, 255, 0.15);
color: #7c6cff;
border: 1px solid rgba(124, 108, 255, 0.3);
display: inline-block;
margin-bottom: 10px;
}
.card-06__title {
font-size: 17px;
font-weight: 700;
color: #f0eeff;
margin-bottom: 6px;
}
.card-06__body {
font-size: 13px;
color: #b8b6d4;
line-height: 1.6;
}
.card-06 {
width: 100%;
max-width: 280px;
position: relative;
overflow: hidden;
padding: 22px;
border-radius: 14px;
background: #17171f;
border: 1px solid rgba(255, 255, 255, 0.08);
cursor: pointer;
transition: box-shadow 0.3s;
}
.card-06:hover {
box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}
.card-06__peel {
position: absolute;
bottom: 0;
right: 0;
width: 0;
height: 0;
background: linear-gradient(225deg, #7c6cff 45%, rgba(124, 108, 255, 0.08) 45%);
transition:
width 0.38s cubic-bezier(0.23, 1, 0.32, 1),
height 0.38s cubic-bezier(0.23, 1, 0.32, 1);
}
.card-06:hover .card-06__peel {
width: 72px;
height: 72px;
}
```
### 07. Neon Sign
**Type:** Pure CSS
**Description:** Border glows and title text pulses with layered neon box-shadows on hover, with a CSS flicker animation.
**HTML:**
```html
Neon
Neon Sign
Hover to see the glow flicker to life.
```
**CSS:**
```css
.card-07__tag {
font-family: monospace;
font-size: 10px;
padding: 2px 8px;
border-radius: 20px;
background: rgba(124, 108, 255, 0.15);
color: #7c6cff;
border: 1px solid rgba(124, 108, 255, 0.3);
display: inline-block;
margin-bottom: 10px;
}
.card-07__title {
font-size: 17px;
font-weight: 700;
color: #f0eeff;
margin-bottom: 6px;
}
.card-07__body {
font-size: 13px;
color: #b8b6d4;
line-height: 1.6;
}
.card-07 {
width: 100%;
max-width: 280px;
padding: 22px;
border-radius: 14px;
background: #07070e;
border: 1px solid rgba(255, 255, 255, 0.06);
cursor: pointer;
transition:
border-color 0.3s,
box-shadow 0.3s;
}
.card-07:hover {
border-color: rgba(124, 108, 255, 0.6);
box-shadow:
0 0 28px rgba(124, 108, 255, 0.12),
inset 0 0 28px rgba(124, 108, 255, 0.04);
}
.card-07__title {
font-size: 22px;
letter-spacing: 0.04em;
transition:
text-shadow 0.3s,
color 0.3s;
}
.card-07:hover .card-07__title {
color: #c0b4ff;
text-shadow:
0 0 6px #7c6cff,
0 0 14px #7c6cff,
0 0 30px rgba(124, 108, 255, 0.5);
animation: card-07-flicker 1.2s ease-out forwards;
}
@keyframes card-07-flicker {
0%, 100% { opacity: 1; }
8% { opacity: 0.82; }
10% { opacity: 1; }
60% { opacity: 0.9; }
62% { opacity: 1; }
}
.card-07__line {
margin-top: 14px;
height: 2px;
border-radius: 1px;
background: rgba(255, 255, 255, 0.15);
transition:
background 0.3s,
box-shadow 0.3s;
}
.card-07:hover .card-07__line {
background: #7c6cff;
box-shadow: 0 0 8px #7c6cff;
}
```
### 08. Scanline
**Type:** Pure CSS
**Description:** CRT-style horizontal scanlines scroll over the card surface on hover using a repeating-linear-gradient animation.
**HTML:**
```html
SYSTEM
Scanline
CRT scanlines sweep the surface on hover.
```
**CSS:**
```css
/* Demo 08 overrides shared __tag/__title/__body so the green CRT palette
reads correctly against the black card background. Inlined here so a
user pasting just the demo gets the full effect with no shared prelude. */
.card-08__tag {
font-family: monospace;
font-size: 10px;
padding: 2px 8px;
border-radius: 20px;
background: rgba(30, 217, 138, 0.12);
color: #1ed98a;
border: 1px solid rgba(30, 217, 138, 0.3);
display: inline-block;
margin-bottom: 10px;
}
.card-08__title {
font-size: 17px;
font-weight: 700;
color: #1ed98a;
margin-bottom: 6px;
}
.card-08__body {
font-size: 13px;
color: rgba(30, 217, 138, 0.65);
line-height: 1.6;
}
.card-08 {
width: 100%;
max-width: 280px;
position: relative;
overflow: hidden;
padding: 22px;
border-radius: 14px;
background: #0a0a0a;
border: 1px solid rgba(30, 217, 138, 0.2);
cursor: pointer;
font-family: monospace;
color: #1ed98a;
transition: box-shadow 0.3s;
}
.card-08:hover {
box-shadow:
0 0 24px rgba(30, 217, 138, 0.18),
inset 0 0 24px rgba(30, 217, 138, 0.04);
}
.card-08__scanlines {
position: absolute;
inset: 0;
pointer-events: none;
background: repeating-linear-gradient(
to bottom,
transparent 0,
transparent 3px,
rgba(0, 0, 0, 0.22) 3px,
rgba(0, 0, 0, 0.22) 4px
);
opacity: 0;
transition: opacity 0.4s;
}
.card-08:hover .card-08__scanlines {
opacity: 1;
animation: card-08-scroll 4s linear infinite;
}
@keyframes card-08-scroll {
0% { background-position: 0 0; }
100% { background-position: 0 40px; }
}
```
### 09. Depth Parallax
**Type:** CSS + JS
**Description:** Three layers — background, mid, and foreground — shift at different speeds as the cursor moves, creating a parallax depth illusion.
**HTML:**
```html
3D
Depth Parallax
Layers shift at different speeds.
```
**CSS:**
```css
.card-09__tag {
font-family: monospace;
font-size: 10px;
padding: 2px 8px;
border-radius: 20px;
background: rgba(124, 108, 255, 0.15);
color: #7c6cff;
border: 1px solid rgba(124, 108, 255, 0.3);
display: inline-block;
margin-bottom: 10px;
}
.card-09__title {
font-size: 17px;
font-weight: 700;
color: #f0eeff;
margin-bottom: 6px;
}
.card-09__body {
font-size: 13px;
color: #b8b6d4;
line-height: 1.6;
}
.card-09 {
width: 100%;
max-width: 280px;
position: relative;
overflow: hidden;
padding: 22px;
border-radius: 14px;
background: #0d0d1a;
border: 1px solid rgba(255, 255, 255, 0.08);
cursor: none;
transform-style: preserve-3d;
min-height: 130px;
}
.card-09__bg {
position: absolute;
inset: -12%;
background:
radial-gradient(ellipse at 60% 40%, rgba(124, 108, 255, 0.22), transparent 55%),
radial-gradient(ellipse at 20% 80%, rgba(61, 232, 245, 0.14), transparent 50%);
will-change: transform;
}
.card-09__mid,
.card-09__fg {
position: relative;
will-change: transform;
}
.card-09__mid {
margin-bottom: 8px;
}
```
**JS:**
```js
document.querySelectorAll(".card-09").forEach(function (card) {
var bg = card.querySelector(".card-09__bg");
var mid = card.querySelector(".card-09__mid");
var fg = card.querySelector(".card-09__fg");
card.addEventListener("mousemove", function (e) {
var r = card.getBoundingClientRect();
var x = (e.clientX - r.left) / r.width - 0.5;
var y = (e.clientY - r.top) / r.height - 0.5;
bg.style.transform = "translate(" + (x * -20) + "px," + (y * -20) + "px)";
mid.style.transform = "translate(" + (x * -12) + "px," + (y * -12) + "px)";
fg.style.transform = "translate(" + (x * -6) + "px," + (y * -6) + "px)";
});
card.addEventListener("mouseleave", function () {
bg.style.transform = mid.style.transform = fg.style.transform = "";
});
});
```
### 10. Spotlight
**Type:** CSS + JS
**Description:** A soft radial glow follows the cursor around inside the card, illuminating wherever you look.
**HTML:**
```html
Light
Spotlight
Cursor glow follows your mouse inside the card.
```
**CSS:**
```css
.card-10__tag {
font-family: monospace;
font-size: 10px;
padding: 2px 8px;
border-radius: 20px;
background: rgba(124, 108, 255, 0.15);
color: #7c6cff;
border: 1px solid rgba(124, 108, 255, 0.3);
display: inline-block;
margin-bottom: 10px;
}
.card-10__title {
font-size: 17px;
font-weight: 700;
color: #f0eeff;
margin-bottom: 6px;
}
.card-10__body {
font-size: 13px;
color: #b8b6d4;
line-height: 1.6;
}
.card-10 {
width: 100%;
max-width: 280px;
position: relative;
overflow: hidden;
padding: 22px;
border-radius: 14px;
background: #111118;
border: 1px solid rgba(255, 255, 255, 0.07);
cursor: none;
transition: border-color 0.3s;
}
.card-10:hover {
border-color: rgba(124, 108, 255, 0.4);
}
.card-10__glow {
position: absolute;
width: 200px;
height: 200px;
border-radius: 50%;
background: radial-gradient(circle, rgba(124, 108, 255, 0.25) 0%, transparent 70%);
transform: translate(-50%, -50%);
pointer-events: none;
opacity: 0;
transition: opacity 0.3s;
top: 50%;
left: 50%;
}
.card-10:hover .card-10__glow {
opacity: 1;
}
.card-10__tag,
.card-10__title,
.card-10__body {
position: relative;
z-index: 1;
}
```
**JS:**
```js
document.querySelectorAll(".card-10").forEach(function (card) {
var glow = card.querySelector(".card-10__glow");
card.addEventListener("mousemove", function (e) {
var r = card.getBoundingClientRect();
glow.style.left = (e.clientX - r.left) + "px";
glow.style.top = (e.clientY - r.top) + "px";
});
});
```
### 11. 3D Tilt
**Type:** CSS + JS
**Description:** Mouse position controls live rotateX/rotateY perspective transforms, with a radial shine that follows the cursor.
**HTML:**
```html
3D
3D Tilt
Mouse position controls the tilt angle.
```
**CSS:**
```css
.card-11__tag {
font-family: monospace;
font-size: 10px;
padding: 2px 8px;
border-radius: 20px;
background: rgba(124, 108, 255, 0.15);
color: #7c6cff;
border: 1px solid rgba(124, 108, 255, 0.3);
display: inline-block;
margin-bottom: 10px;
}
.card-11__title {
font-size: 17px;
font-weight: 700;
color: #f0eeff;
margin-bottom: 6px;
}
.card-11__body {
font-size: 13px;
color: #b8b6d4;
line-height: 1.6;
}
.card-11 {
width: 100%;
max-width: 280px;
position: relative;
overflow: hidden;
padding: 22px;
border-radius: 14px;
background: linear-gradient(160deg, #1a1a28, #111118);
border: 1px solid rgba(255, 255, 255, 0.1);
transform-style: preserve-3d;
cursor: none;
transition: transform 0.08s ease;
}
.card-11__shine {
position: absolute;
inset: 0;
background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 65%);
pointer-events: none;
opacity: 0;
transition: opacity 0.3s;
}
.card-11:hover .card-11__shine {
opacity: 1;
}
.card-11__layer {
transform: translateZ(22px);
}
```
**JS:**
```js
document.querySelectorAll(".card-11").forEach(function (card) {
card.addEventListener("mousemove", function (e) {
var r = card.getBoundingClientRect();
var x = (e.clientX - r.left) / r.width - 0.5;
var y = (e.clientY - r.top) / r.height - 0.5;
card.style.transform =
"perspective(700px) rotateX(" + (-y * 14) + "deg) rotateY(" + (x * 14) + "deg)";
});
card.addEventListener("mouseleave", function () {
card.style.transform = "";
});
});
```
### 12. Slide Up Content
**Type:** Pure CSS
**Description:** Extra description and a CTA animate into view from below the title on hover using max-height and translateY.
**HTML:**
```html
🎨
Slide Up
Extra details slide up on hover.
Read more →
```
**CSS:**
```css
/* Demo 12 has its own typography scale — don't include the shared rules. */
.card-12 {
width: 100%;
max-width: 280px;
border-radius: 14px;
overflow: hidden;
background: #17171f;
border: 1px solid rgba(255, 255, 255, 0.08);
cursor: pointer;
transition:
box-shadow 0.35s,
transform 0.35s cubic-bezier(0.23, 1, 0.32, 1);
}
.card-12:hover {
transform: translateY(-6px);
box-shadow: 0 16px 32px rgba(0, 0, 0, 0.42);
}
.card-12__image {
height: 90px;
background: linear-gradient(135deg, #1a1a2e, #0d0d2b);
display: flex;
align-items: center;
justify-content: center;
font-size: 32px;
transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}
.card-12:hover .card-12__image {
transform: scale(1.05);
}
.card-12__body {
padding: 16px 18px;
}
.card-12__title {
font-size: 14px;
font-weight: 600;
color: #f0eeff;
margin-bottom: 4px;
}
.card-12__hidden {
font-size: 12px;
color: #b8b6d4;
max-height: 0;
overflow: hidden;
opacity: 0;
transform: translateY(8px);
transition:
max-height 0.4s ease,
opacity 0.35s ease,
transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}
.card-12:hover .card-12__hidden {
max-height: 60px;
opacity: 1;
transform: translateY(0);
}
.card-12__cta {
display: inline-block;
margin-top: 6px;
font-size: 12px;
color: #7c6cff;
font-weight: 600;
opacity: 0;
transform: translateY(6px);
transition:
opacity 0.3s 0.12s,
transform 0.3s 0.12s;
}
.card-12:hover .card-12__cta {
opacity: 1;
transform: translateY(0);
}
```
### 13. Flip Card
**Type:** Pure CSS
**Description:** Pure CSS 3D card flip on hover using transform-style: preserve-3d and backface-visibility: hidden on both faces.
**HTML:**
```html
Hover
Flip Card
Hover to flip over.
The Back
Revealed with CSS 3D perspective.
Explore →
```
**CSS:**
```css
.card-13__tag {
font-family: monospace;
font-size: 10px;
padding: 2px 8px;
border-radius: 20px;
background: rgba(124, 108, 255, 0.15);
color: #7c6cff;
border: 1px solid rgba(124, 108, 255, 0.3);
display: inline-block;
margin-bottom: 10px;
}
.card-13__title {
font-size: 17px;
font-weight: 700;
color: #f0eeff;
margin-bottom: 6px;
}
.card-13__body {
font-size: 13px;
color: #b8b6d4;
line-height: 1.6;
}
.card-13 {
/* The face elements (__front, __back) are absolutely positioned and
give the parent zero intrinsic width. Use a fixed 280px width so
the card has a predictable size in any flex container (stage,
playground iframe). Same pattern as card-26. */
width: 280px;
max-width: 100%;
height: 155px;
perspective: 800px;
cursor: pointer;
}
.card-13__inner {
width: 100%;
height: 100%;
position: relative;
transform-style: preserve-3d;
transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}
.card-13:hover .card-13__inner {
transform: rotateY(180deg);
}
.card-13__front,
.card-13__back {
position: absolute;
inset: 0;
border-radius: 14px;
padding: 22px;
backface-visibility: hidden;
}
.card-13__front {
background: #17171f;
border: 1px solid rgba(255, 255, 255, 0.08);
}
.card-13__back {
background: linear-gradient(135deg, #7c6cff, #ff6c8a);
transform: rotateY(180deg);
display: flex;
flex-direction: column;
justify-content: center;
}
.card-13__back-title {
font-size: 17px;
font-weight: 700;
color: #fff;
margin-bottom: 6px;
}
.card-13__back-body {
font-size: 12px;
color: rgba(255, 255, 255, 0.8);
}
.card-13__back-cta {
display: inline-block;
margin-top: 10px;
font-size: 12px;
color: rgba(255, 255, 255, 0.9);
font-weight: 600;
border-bottom: 1px solid rgba(255, 255, 255, 0.4);
}
```
### 14. Glitch Card
**Type:** Pure CSS
**Description:** Two colour-shifted clones with clip-path flicker on hover in opposite directions, simulating a digital signal glitch.
**HTML:**
```html
Glitch
Glitch Card
RGB channel split flickers on hover.
```
**CSS:**
```css
.card-14__tag {
font-family: monospace;
font-size: 10px;
padding: 2px 8px;
border-radius: 20px;
background: rgba(124, 108, 255, 0.15);
color: #7c6cff;
border: 1px solid rgba(124, 108, 255, 0.3);
display: inline-block;
margin-bottom: 10px;
}
.card-14__title {
font-size: 17px;
font-weight: 700;
color: #f0eeff;
margin-bottom: 6px;
}
.card-14__body {
font-size: 13px;
color: #b8b6d4;
line-height: 1.6;
}
.card-14 {
width: 100%;
max-width: 280px;
position: relative;
overflow: hidden;
padding: 22px;
border-radius: 14px;
background: #0a0a0f;
border: 1px solid rgba(255, 255, 255, 0.08);
cursor: pointer;
transition: border-color 0.2s;
}
.card-14:hover {
border-color: rgba(255, 108, 138, 0.35);
}
.card-14::before,
.card-14::after {
content: "";
position: absolute;
inset: 0;
border-radius: inherit;
opacity: 0;
}
.card-14::before {
background: rgba(255, 108, 138, 0.07);
clip-path: polygon(0 18%, 100% 18%, 100% 45%, 0 45%);
}
.card-14::after {
background: rgba(61, 232, 245, 0.07);
clip-path: polygon(0 55%, 100% 55%, 100% 82%, 0 82%);
}
.card-14:hover::before,
.card-14:hover::after {
opacity: 1;
}
.card-14:hover::before {
animation: card-14-glitch-a 0.4s step-end infinite;
}
.card-14:hover::after {
animation: card-14-glitch-b 0.4s step-end infinite 0.1s;
}
@keyframes card-14-glitch-a {
0%, 100% { transform: translate(-4px, 0); }
33% { transform: translate(-6px, 2px); }
66% { transform: translate(-2px, -2px); }
}
@keyframes card-14-glitch-b {
0%, 100% { transform: translate(4px, 0); }
33% { transform: translate(6px, -2px); }
66% { transform: translate(2px, 2px); }
}
```
### 15. Gradient Rotate
**Type:** Pure CSS
**Description:** The card border becomes a conic-gradient that hue-rotates continuously on hover, cycling the full spectrum.
**HTML:**
```html
Color
Gradient Rotate
Border hue-rotates continuously on hover.
```
**CSS:**
```css
.card-15__tag {
font-family: monospace;
font-size: 10px;
padding: 2px 8px;
border-radius: 20px;
background: rgba(124, 108, 255, 0.15);
color: #7c6cff;
border: 1px solid rgba(124, 108, 255, 0.3);
display: inline-block;
margin-bottom: 10px;
}
.card-15__title {
font-size: 17px;
font-weight: 700;
color: #f0eeff;
margin-bottom: 6px;
}
.card-15__body {
font-size: 13px;
color: #b8b6d4;
line-height: 1.6;
}
.card-15 {
width: 100%;
max-width: 280px;
border-radius: 14px;
padding: 2px;
cursor: pointer;
background: rgba(255, 255, 255, 0.05);
transition: background 0.3s;
}
.card-15:hover {
background: conic-gradient(#7c6cff, #ff6c8a, #3de8f5, #1ed98a, #7c6cff 360deg);
animation: card-15-spin 4s linear infinite;
}
@keyframes card-15-spin {
to { filter: hue-rotate(360deg); }
}
.card-15__inner {
border-radius: 12px;
padding: 22px;
background: #17171f;
}
```
### 16. Border Morph
**Type:** Pure CSS
**Description:** The card border-radius morphs to an organic blob shape and scales up on hover with a spring cubic-bezier.
**HTML:**
```html
Morph
Border Morph
Corners morph to an organic blob shape.
```
**CSS:**
```css
.card-16__tag {
font-family: monospace;
font-size: 10px;
padding: 2px 8px;
border-radius: 20px;
background: rgba(124, 108, 255, 0.15);
color: #7c6cff;
border: 1px solid rgba(124, 108, 255, 0.3);
display: inline-block;
margin-bottom: 10px;
}
.card-16__title {
font-size: 17px;
font-weight: 700;
color: #f0eeff;
margin-bottom: 6px;
}
.card-16__body {
font-size: 13px;
color: #b8b6d4;
line-height: 1.6;
}
.card-16 {
width: 100%;
max-width: 280px;
padding: 22px;
border-radius: 14px;
border: 2px solid rgba(124, 108, 255, 0.3);
background: rgba(124, 108, 255, 0.05);
cursor: pointer;
transition:
border-radius 0.55s cubic-bezier(0.34, 1.56, 0.64, 1),
border-color 0.3s,
background 0.3s,
transform 0.35s,
box-shadow 0.35s;
}
.card-16:hover {
border-radius: 48% 52% 68% 32% / 42% 38% 62% 58%;
border-color: #7c6cff;
background: rgba(124, 108, 255, 0.12);
transform: scale(1.05);
box-shadow: 0 12px 32px rgba(124, 108, 255, 0.22);
}
```
### 17. Magnetic Float
**Type:** Pure CSS
**Description:** Three orbit dots scatter to different positions on hover with spring easing, while the card floats upward.
**HTML:**
```html
Float
Magnetic Float
Orbit dots scatter on hover with spring easing.
```
**CSS:**
```css
.card-17__tag {
font-family: monospace;
font-size: 10px;
padding: 2px 8px;
border-radius: 20px;
background: rgba(124, 108, 255, 0.15);
color: #7c6cff;
border: 1px solid rgba(124, 108, 255, 0.3);
display: inline-block;
margin-bottom: 10px;
}
.card-17__title {
font-size: 17px;
font-weight: 700;
color: #f0eeff;
margin-bottom: 6px;
}
.card-17__body {
font-size: 13px;
color: #b8b6d4;
line-height: 1.6;
}
.card-17 {
width: 100%;
max-width: 280px;
position: relative;
overflow: visible;
padding: 22px;
border-radius: 14px;
background: #17171f;
border: 1px solid rgba(255, 255, 255, 0.08);
cursor: pointer;
transition:
transform 0.42s cubic-bezier(0.34, 1.56, 0.64, 1),
box-shadow 0.42s;
}
.card-17:hover {
transform: translateY(-10px);
box-shadow: 0 22px 44px rgba(0, 0, 0, 0.42);
}
.card-17__dot {
position: absolute;
border-radius: 50%;
transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.card-17__dot--a {
width: 11px;
height: 11px;
background: #7c6cff;
top: 18px;
right: 18px;
}
.card-17__dot--b {
width: 8px;
height: 8px;
background: #ff6c8a;
bottom: 22px;
left: 22px;
}
.card-17__dot--c {
width: 6px;
height: 6px;
background: #1ed98a;
top: 50%;
right: 14px;
}
.card-17:hover .card-17__dot--a {
transform: translate(10px, -12px) scale(1.5);
}
.card-17:hover .card-17__dot--b {
transform: translate(-10px, 10px) scale(1.4);
}
.card-17:hover .card-17__dot--c {
transform: translate(8px, 0) scale(1.6);
}
```
### 18. Typewriter Reveal
**Type:** Pure CSS
**Description:** A hidden line types in from zero width using max-width transition, with a blinking terminal cursor via CSS animation.
**HTML:**
```html
Terminal
Typewriter
$ npm run deploy --prod
```
**CSS:**
```css
/* Demo 18 paints in green CRT/terminal palette so it overrides the
shared __tag/__title rules with its own. */
.card-18__tag {
font-family: monospace;
font-size: 10px;
padding: 2px 8px;
border-radius: 20px;
background: rgba(30, 217, 138, 0.12);
color: #1ed98a;
border: 1px solid rgba(30, 217, 138, 0.3);
display: inline-block;
margin-bottom: 10px;
}
.card-18__title {
font-size: 17px;
font-weight: 700;
color: #1ed98a;
margin-bottom: 6px;
}
.card-18 {
width: 100%;
max-width: 280px;
padding: 22px;
border-radius: 14px;
background: #07070e;
border: 1px solid rgba(30, 217, 138, 0.2);
font-family: monospace;
cursor: pointer;
transition:
border-color 0.3s,
box-shadow 0.3s;
}
.card-18:hover {
border-color: rgba(30, 217, 138, 0.5);
box-shadow: 0 0 24px rgba(30, 217, 138, 0.1);
}
.card-18__hidden {
font-size: 12px;
color: #1ed98a;
max-width: 0;
overflow: hidden;
white-space: nowrap;
opacity: 0;
transition:
max-width 0.75s cubic-bezier(0.23, 1, 0.32, 1),
opacity 0.25s;
}
.card-18:hover .card-18__hidden {
max-width: 400px;
opacity: 1;
}
.card-18__cursor {
display: inline-block;
width: 8px;
height: 14px;
background: #1ed98a;
margin-top: 5px;
opacity: 0;
}
.card-18:hover .card-18__cursor {
opacity: 1;
animation: card-18-blink 0.7s step-end infinite;
}
@keyframes card-18-blink {
0%, 100% { opacity: 1; }
50% { opacity: 0; }
}
```
### 19. Overlay Slide
**Type:** Pure CSS
**Description:** A full gradient overlay slides in from the left on hover, revealing a CTA that fades in with a stagger delay.
**HTML:**
```html
View Project →
🚀
Project
Overlay Slide
Full overlay slides in from the left.
```
**CSS:**
```css
.card-19__tag {
font-family: monospace;
font-size: 10px;
padding: 2px 8px;
border-radius: 20px;
background: rgba(124, 108, 255, 0.15);
color: #7c6cff;
border: 1px solid rgba(124, 108, 255, 0.3);
display: inline-block;
margin-bottom: 10px;
}
.card-19__title {
font-size: 17px;
font-weight: 700;
color: #f0eeff;
margin-bottom: 6px;
}
.card-19__body {
font-size: 13px;
color: #b8b6d4;
line-height: 1.6;
}
.card-19 {
width: 100%;
max-width: 280px;
position: relative;
overflow: hidden;
padding: 22px;
border-radius: 14px;
background: #17171f;
border: 1px solid rgba(255, 255, 255, 0.08);
cursor: pointer;
min-height: 130px;
}
.card-19__overlay {
position: absolute;
inset: 0;
background: linear-gradient(135deg, rgba(124, 108, 255, 0.94), rgba(255, 108, 138, 0.9));
transform: translateX(-101%);
transition: transform 0.42s cubic-bezier(0.23, 1, 0.32, 1);
display: flex;
align-items: center;
justify-content: center;
z-index: 2;
border-radius: inherit;
}
.card-19:hover .card-19__overlay {
transform: translateX(0);
}
.card-19__cta {
color: #fff;
font-size: 15px;
font-weight: 700;
letter-spacing: 0.04em;
transform: translateX(-18px);
opacity: 0;
transition:
transform 0.35s 0.16s ease,
opacity 0.35s 0.16s ease;
}
.card-19:hover .card-19__cta {
transform: translateX(0);
opacity: 1;
}
.card-19__content {
position: relative;
z-index: 1;
}
.card-19__icon {
font-size: 28px;
margin-bottom: 10px;
color: #7c6cff;
display: block;
}
```
### 20. Grain Texture
**Type:** Pure CSS
**Description:** An SVG noise layer animates in with mix-blend-mode: overlay on hover, giving the card an organic film grain texture.
**HTML:**
```html
Texture
Grain Texture
Film grain animates over the surface on hover.
```
**CSS:**
```css
.card-20__tag {
font-family: monospace;
font-size: 10px;
padding: 2px 8px;
border-radius: 20px;
background: rgba(124, 108, 255, 0.15);
color: #7c6cff;
border: 1px solid rgba(124, 108, 255, 0.3);
display: inline-block;
margin-bottom: 10px;
}
.card-20__title {
font-size: 17px;
font-weight: 700;
color: #f0eeff;
margin-bottom: 6px;
}
.card-20__body {
font-size: 13px;
color: #b8b6d4;
line-height: 1.6;
}
.card-20 {
width: 100%;
max-width: 280px;
position: relative;
overflow: hidden;
padding: 22px;
border-radius: 14px;
background: linear-gradient(135deg, #1a1228, #0d0d1a);
border: 1px solid rgba(255, 255, 255, 0.08);
cursor: pointer;
transition:
box-shadow 0.35s,
transform 0.35s cubic-bezier(0.23, 1, 0.32, 1);
}
.card-20:hover {
transform: translateY(-4px);
box-shadow: 0 18px 42px rgba(0, 0, 0, 0.55);
}
.card-20__noise {
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)'/%3E%3C/svg%3E");
background-size: 160px 160px;
opacity: 0;
mix-blend-mode: overlay;
pointer-events: none;
transition: opacity 0.4s;
animation: card-20-grain 6s steps(1) infinite paused;
}
.card-20:hover .card-20__noise {
opacity: 0.45;
animation-play-state: running;
}
@keyframes card-20-grain {
0% { transform: translate(0, 0); }
10% { transform: translate(-3%, -4%); }
20% { transform: translate(2%, 3%); }
30% { transform: translate(-4%, 2%); }
40% { transform: translate(3%, -3%); }
50% { transform: translate(-2%, 4%); }
60% { transform: translate(4%, -2%); }
70% { transform: translate(-3%, 3%); }
80% { transform: translate(2%, -4%); }
90% { transform: translate(-4%, -2%); }
100% { transform: translate(0, 0); }
}
.card-20__tag,
.card-20__title,
.card-20__body {
position: relative;
z-index: 1;
}
```
### 21. Frosted Glass Intensify
**Type:** Pure CSS
**Description:** Backdrop-filter blur and saturation ramp up from 0 to 14px on hover, intensifying a frosted glass effect over coloured orbs.
**HTML:**
```html
Glass
Frosted Glass
Backdrop blur intensifies on hover.
```
**CSS:**
```css
.card-21__tag {
font-family: monospace;
font-size: 10px;
padding: 2px 8px;
border-radius: 20px;
background: rgba(124, 108, 255, 0.15);
color: #7c6cff;
border: 1px solid rgba(124, 108, 255, 0.3);
display: inline-block;
margin-bottom: 10px;
}
.card-21__title {
font-size: 17px;
font-weight: 700;
color: #f0eeff;
margin-bottom: 6px;
}
.card-21__body {
font-size: 13px;
color: #b8b6d4;
line-height: 1.6;
}
.card-21 {
width: 100%;
max-width: 280px;
position: relative;
overflow: hidden;
padding: 22px;
border-radius: 16px;
border: 1px solid rgba(255, 255, 255, 0.12);
cursor: pointer;
min-height: 130px;
transition:
border-color 0.4s,
box-shadow 0.4s;
}
.card-21:hover {
border-color: rgba(255, 255, 255, 0.3);
box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}
.card-21__bg {
position: absolute;
inset: 0;
z-index: 0;
background: linear-gradient(135deg, #1a0533, #0a1535, #0d2b1a);
}
.card-21__bg::before {
content: "";
position: absolute;
border-radius: 50%;
width: 120px;
height: 120px;
background: rgba(124, 108, 255, 0.55);
top: -20px;
right: -20px;
filter: blur(40px);
}
.card-21__bg::after {
content: "";
position: absolute;
border-radius: 50%;
width: 100px;
height: 100px;
background: rgba(61, 232, 245, 0.4);
bottom: -10px;
left: 0;
filter: blur(40px);
}
.card-21__frost {
position: absolute;
inset: 0;
z-index: 1;
backdrop-filter: blur(0px) saturate(100%);
-webkit-backdrop-filter: blur(0px) saturate(100%);
transition:
backdrop-filter 0.5s ease,
-webkit-backdrop-filter 0.5s ease;
}
.card-21:hover .card-21__frost {
backdrop-filter: blur(14px) saturate(180%);
-webkit-backdrop-filter: blur(14px) saturate(180%);
}
.card-21__content {
position: relative;
z-index: 2;
}
```
### 22. Blueprint Reveal
**Type:** Pure CSS
**Description:** Engineering blueprint aesthetic: a dot grid and corner crosshair marks fade in on hover, with title and body shifting to cyan.
**HTML:**
```html
// BLUEPRINT
Blueprint
Grid lines and corner marks appear on hover.
```
**CSS:**
```css
/* Demo 22 has its own title/body color transitions, so it owns those rules. */
.card-22 {
width: 100%;
max-width: 280px;
position: relative;
overflow: hidden;
padding: 22px;
border-radius: 14px;
background: #17171f;
border: 1px solid rgba(255, 255, 255, 0.08);
cursor: pointer;
transition:
background 0.4s,
border-color 0.4s,
box-shadow 0.4s;
}
.card-22:hover {
background: #041428;
border-color: rgba(61, 232, 245, 0.5);
box-shadow:
0 0 32px rgba(61, 232, 245, 0.1),
inset 0 0 32px rgba(61, 232, 245, 0.04);
}
.card-22__grid {
position: absolute;
inset: 0;
background-image:
linear-gradient(rgba(61, 232, 245, 0.08) 1px, transparent 1px),
linear-gradient(90deg, rgba(61, 232, 245, 0.08) 1px, transparent 1px);
background-size: 20px 20px;
opacity: 0;
transition: opacity 0.4s;
}
.card-22:hover .card-22__grid {
opacity: 1;
}
.card-22__marks {
position: absolute;
inset: 0;
z-index: 1;
}
.card-22__mark {
position: absolute;
width: 14px;
height: 14px;
opacity: 0;
transition: opacity 0.3s 0.15s;
}
.card-22__mark::before,
.card-22__mark::after {
content: "";
position: absolute;
background: rgba(61, 232, 245, 0.7);
}
.card-22__mark::before {
width: 1px;
height: 100%;
left: 50%;
}
.card-22__mark::after {
width: 100%;
height: 1px;
top: 50%;
}
.card-22__mark--tl { top: 10px; left: 10px; }
.card-22__mark--tr { top: 10px; right: 10px; }
.card-22__mark--bl { bottom: 10px; left: 10px; }
.card-22__mark--br { bottom: 10px; right: 10px; }
.card-22:hover .card-22__mark {
opacity: 1;
}
.card-22__content {
position: relative;
z-index: 2;
}
.card-22__label {
font-family: monospace;
font-size: 10px;
color: rgba(61, 232, 245, 0.5);
letter-spacing: 0.12em;
text-transform: uppercase;
display: block;
margin-bottom: 6px;
opacity: 0;
transition: opacity 0.3s 0.1s;
}
.card-22:hover .card-22__label {
opacity: 1;
}
.card-22__title {
font-size: 18px;
font-weight: 700;
color: #f0eeff;
margin-bottom: 6px;
transition: color 0.35s;
}
.card-22__body {
font-size: 13px;
color: #b8b6d4;
line-height: 1.6;
transition: color 0.35s;
}
.card-22:hover .card-22__title {
color: #3de8f5;
}
.card-22:hover .card-22__body {
color: rgba(61, 232, 245, 0.6);
}
```
### 23. Shockwave
**Type:** Pure CSS
**Description:** Two concentric ring pulses expand outward from the card border on hover, like a shockwave ripple effect.
**HTML:**
```html
Pulse
Shockwave
Two ripple rings expand outward on hover.
```
**CSS:**
```css
.card-23__tag {
font-family: monospace;
font-size: 10px;
padding: 2px 8px;
border-radius: 20px;
background: rgba(124, 108, 255, 0.15);
color: #7c6cff;
border: 1px solid rgba(124, 108, 255, 0.3);
display: inline-block;
margin-bottom: 10px;
}
.card-23__title {
font-size: 17px;
font-weight: 700;
color: #f0eeff;
margin-bottom: 6px;
}
.card-23__body {
font-size: 13px;
color: #b8b6d4;
line-height: 1.6;
}
.card-23 {
width: 100%;
max-width: 280px;
position: relative;
overflow: visible;
padding: 22px;
border-radius: 14px;
background: #17171f;
border: 1px solid rgba(255, 255, 255, 0.08);
cursor: pointer;
transition:
border-color 0.3s,
transform 0.3s;
}
.card-23:hover {
border-color: rgba(124, 108, 255, 0.5);
transform: scale(1.02);
}
.card-23::before,
.card-23::after {
content: "";
position: absolute;
inset: -8px;
border-radius: 20px;
border: 2px solid rgba(124, 108, 255, 0.55);
opacity: 0;
pointer-events: none;
}
.card-23:hover::before {
animation: card-23-a 0.7s cubic-bezier(0.2, 0.6, 0.4, 1) forwards;
}
.card-23:hover::after {
animation: card-23-b 0.7s cubic-bezier(0.2, 0.6, 0.4, 1) 0.18s forwards;
}
@keyframes card-23-a {
0% { transform: scale(1); opacity: 0.8; }
100% { transform: scale(1.18); opacity: 0; }
}
@keyframes card-23-b {
0% { transform: scale(1); opacity: 0.5; }
100% { transform: scale(1.32); opacity: 0; }
}
```
### 24. Color Burn
**Type:** Pure CSS
**Description:** A radial gradient bloom erupts from the bottom-left corner and expands to fill the entire card on hover.
**HTML:**
```html
Burn
Color Burn
Gradient bloom erupts from the corner.
```
**CSS:**
```css
.card-24__tag {
font-family: monospace;
font-size: 10px;
padding: 2px 8px;
border-radius: 20px;
background: rgba(124, 108, 255, 0.15);
color: #7c6cff;
border: 1px solid rgba(124, 108, 255, 0.3);
display: inline-block;
margin-bottom: 10px;
}
.card-24__title {
font-size: 17px;
font-weight: 700;
color: #f0eeff;
margin-bottom: 6px;
}
.card-24__body {
font-size: 13px;
color: #b8b6d4;
line-height: 1.6;
}
.card-24 {
width: 100%;
max-width: 280px;
position: relative;
overflow: hidden;
padding: 22px;
border-radius: 14px;
background: #0a0a0f;
border: 1px solid rgba(255, 255, 255, 0.07);
cursor: pointer;
transition: border-color 0.4s;
}
.card-24:hover {
border-color: rgba(255, 108, 138, 0.4);
}
.card-24__burn {
position: absolute;
bottom: -60px;
left: -60px;
width: 120px;
height: 120px;
border-radius: 50%;
background: radial-gradient(
circle,
rgba(255, 108, 138, 0.9) 0%,
rgba(124, 108, 255, 0.65) 40%,
transparent 70%
);
transform: scale(0);
transform-origin: center;
pointer-events: none;
filter: blur(2px);
transition:
transform 0.55s cubic-bezier(0.23, 1, 0.32, 1),
border-radius 0.55s ease;
}
.card-24:hover .card-24__burn {
transform: scale(5.5);
border-radius: 40%;
}
.card-24__tag,
.card-24__title,
.card-24__body {
position: relative;
z-index: 1;
}
```
### 25. Prismatic Sweep
**Type:** Pure CSS
**Description:** Three skewed colour beams sweep across the card in a staggered sequence, like light through a prism.
**HTML:**
```html
Prism
Prismatic Sweep
Three colour beams sweep across in sequence.
```
**CSS:**
```css
.card-25__tag {
font-family: monospace;
font-size: 10px;
padding: 2px 8px;
border-radius: 20px;
background: rgba(124, 108, 255, 0.15);
color: #7c6cff;
border: 1px solid rgba(124, 108, 255, 0.3);
display: inline-block;
margin-bottom: 10px;
}
.card-25__title {
font-size: 17px;
font-weight: 700;
color: #f0eeff;
margin-bottom: 6px;
}
.card-25__body {
font-size: 13px;
color: #b8b6d4;
line-height: 1.6;
}
.card-25 {
width: 100%;
max-width: 280px;
position: relative;
overflow: hidden;
padding: 22px;
border-radius: 14px;
background: #111118;
border: 1px solid rgba(255, 255, 255, 0.08);
cursor: pointer;
transition: border-color 0.3s;
}
.card-25:hover {
border-color: rgba(255, 255, 255, 0.2);
}
.card-25__prism {
position: absolute;
inset: -20%;
width: 30%;
transform: skewX(-18deg) translateX(-180%);
transition: transform 0.52s cubic-bezier(0.23, 1, 0.32, 1);
opacity: 0.18;
}
.card-25__prism--a {
background: #7c6cff;
left: 10%;
transition-delay: 0s;
}
.card-25__prism--b {
background: #ff6c8a;
left: 30%;
transition-delay: 0.08s;
}
.card-25__prism--c {
background: #3de8f5;
left: 50%;
transition-delay: 0.16s;
}
.card-25:hover .card-25__prism {
transform: skewX(-18deg) translateX(700%);
}
.card-25__content {
position: relative;
z-index: 1;
}
```
### 26. Book Open
**Type:** Pure CSS
**Description:** The card cover folds open like a book page using perspective rotateY, revealing hidden content on the reverse page.
**HTML:**
```html
Hidden content revealed as you open the book.
Read now →
Preview
Book Open
Cover folds open like a book page.
```
**CSS:**
```css
.card-26__tag {
font-family: monospace;
font-size: 10px;
padding: 2px 8px;
border-radius: 20px;
background: rgba(124, 108, 255, 0.15);
color: #7c6cff;
border: 1px solid rgba(124, 108, 255, 0.3);
display: inline-block;
margin-bottom: 10px;
}
.card-26__title {
font-size: 17px;
font-weight: 700;
color: #f0eeff;
margin-bottom: 6px;
}
.card-26__body {
font-size: 13px;
color: #b8b6d4;
line-height: 1.6;
}
.card-26 {
/* Both children (__page, __cover) are absolutely positioned so they
don't contribute to the parent's intrinsic width. Use a fixed
280px width here instead of 100%/max-width so the card has a
predictable size in any flex container (stage, playground iframe). */
width: 280px;
max-width: 100%;
height: 160px;
border-radius: 14px;
position: relative;
cursor: pointer;
box-shadow: -4px 0 16px rgba(0, 0, 0, 0.4);
}
.card-26__page {
position: absolute;
inset: 0;
border-radius: 14px;
padding: 22px;
background: linear-gradient(135deg, #1a1228, #111118);
border: 1px solid rgba(124, 108, 255, 0.25);
display: flex;
flex-direction: column;
justify-content: center;
gap: 8px;
}
.card-26__page-text {
font-size: 12px;
color: rgba(255, 255, 255, 0.65);
line-height: 1.5;
}
.card-26__page-cta {
font-size: 12px;
color: #7c6cff;
font-weight: 600;
}
.card-26__cover {
position: absolute;
inset: 0;
border-radius: 14px;
padding: 22px;
background: #17171f;
border: 1px solid rgba(255, 255, 255, 0.1);
transform-origin: left center;
transform-style: preserve-3d;
transition:
transform 0.62s cubic-bezier(0.23, 1, 0.32, 1),
box-shadow 0.62s;
z-index: 2;
box-shadow: inset -6px 0 18px rgba(0, 0, 0, 0.3);
}
.card-26:hover .card-26__cover {
transform: perspective(900px) rotateY(-62deg);
box-shadow:
inset -6px 0 18px rgba(0, 0, 0, 0.55),
6px 0 22px rgba(0, 0, 0, 0.45);
}
```
### 27. Aurora
**Type:** CSS + JS
**Description:** Two blurred light orbs track cursor position independently, creating a living aurora borealis inside the card.
**HTML:**
```html
Aurora
Aurora
Two light orbs follow your cursor through the card.
```
**CSS:**
```css
.card-27__tag {
font-family: monospace;
font-size: 10px;
padding: 2px 8px;
border-radius: 20px;
background: rgba(124, 108, 255, 0.15);
color: #7c6cff;
border: 1px solid rgba(124, 108, 255, 0.3);
display: inline-block;
margin-bottom: 10px;
}
.card-27__title {
font-size: 17px;
font-weight: 700;
color: #f0eeff;
margin-bottom: 6px;
}
.card-27__body {
font-size: 13px;
color: #b8b6d4;
line-height: 1.6;
}
.card-27 {
width: 100%;
max-width: 280px;
position: relative;
overflow: hidden;
padding: 22px;
border-radius: 16px;
background: #050510;
border: 1px solid rgba(255, 255, 255, 0.08);
cursor: none;
min-height: 130px;
transition: border-color 0.4s;
}
.card-27:hover {
border-color: rgba(124, 108, 255, 0.4);
}
.card-27__aurora {
position: absolute;
inset: 0;
pointer-events: none;
}
.card-27__aurora::before,
.card-27__aurora::after {
content: "";
position: absolute;
border-radius: 50%;
filter: blur(48px);
transition:
left 0.65s ease,
top 0.65s ease,
opacity 0.4s;
opacity: 0;
}
.card-27__aurora::before {
width: 160px;
height: 160px;
background: rgba(124, 108, 255, 0.55);
left: var(--ax, 20%);
top: var(--ay, 30%);
transform: translate(-50%, -50%);
}
.card-27__aurora::after {
width: 130px;
height: 130px;
background: rgba(30, 217, 138, 0.4);
left: var(--bx, 70%);
top: var(--by, 60%);
transform: translate(-50%, -50%);
}
.card-27:hover .card-27__aurora::before,
.card-27:hover .card-27__aurora::after {
opacity: 1;
}
.card-27__content {
position: relative;
z-index: 1;
}
```
**JS:**
```js
document.querySelectorAll(".card-27").forEach(function (card) {
var aurora = card.querySelector(".card-27__aurora");
card.addEventListener("mousemove", function (e) {
var r = card.getBoundingClientRect();
var x = ((e.clientX - r.left) / r.width) * 100;
var y = ((e.clientY - r.top) / r.height) * 100;
aurora.style.setProperty("--ax", x + "%");
aurora.style.setProperty("--ay", y + "%");
aurora.style.setProperty("--bx", (100 - x) + "%");
aurora.style.setProperty("--by", (100 - y) + "%");
});
});
```
---
## 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.
Learn more
```
**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.
Open →
```
**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
```
**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.
CLICK ME
```
**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
```
**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
```
**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
Get started
```
**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
Pick your favourite modern CSS feature.
```
**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");
});
});
```
---
## 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
Smooth slide toggle
```
**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
Neon glow on check
```
**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
Draw stroke checkmark
```
**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
Bouncy pop checkbox
```
**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
Glassmorphism checkbox
```
**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
Neumorphic checkbox
```
**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
Liquid fill checkbox
```
**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
Rotating ring checkbox
```
**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
✓
Brutalist checkbox
```
**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
Gradient sweep checkbox
```
**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
✓
3D flip checkbox
```
**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
Ripple wave checkbox
```
**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
Retro pixel checkbox
```
**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
Strikethrough label
```
**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
Gooey blob checkbox
```
**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
Toggle theme
```
**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
Pulse ring checkbox
```
**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
Dash to check
```
**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
Click to cycle
```
**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
Magnetic checkbox
```
**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
Click to confetti!
```
**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
Done!
```
**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
Aurora toggle
```
**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 Menu Designs
URL: https://codefronts.com/navigation/css-circular-menus/
Description: 21 free CSS circular menu designs — radial, 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
```
**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
home
about
contact
links
bio
store
```
**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
```
**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
```
**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
```
**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
```
**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
React
```
**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
DISMISS
```
**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 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.
Learn more →
```
**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.
Discard
Save
```
**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
Account created 10:42 AM
Email verified 10:44 AM
Profile setup In progress
Workspace ready Pending
```
**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
Review →
```
**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; } }
```
---
## 16 CSS Floating Action Button Designs
URL: https://codefronts.com/components/css-floating-buttons/
Description: 16 hand-coded CSS floating action button designs — speed dial, pulse, morphing FAB, scroll-to-top, notification badge, voice action and more. Semantic HTML, copy-paste ready.
Demo count: 16
### 01. 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; }
```
### 02. 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; }
```
### 03. 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;
}
}
```
### 04. 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; }
```
### 05. 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
New project
```
**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; }
```
### 06. 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;
}
}
```
### 07. 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; }
```
### 08. 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: inline-flex;
padding: 24px;
border-radius: 16px;
background: linear-gradient(135deg, #2a1a4a 0%, #4a2a6a 50%, #ff6c8a 100%);
}
.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; }
```
### 09. 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
NEW
```
**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; }
```
### 10. 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
3
```
**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;
}
}
```
### 11. 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);
});
});
```
### 12. 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; }
```
### 13. 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)();
});
});
```
### 14. 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;
}
}
```
### 15. 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; }
```
### 16. 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
◆ Lumen
Build at the speed of thought.
Stay updated
Monthly product news. No spam.
```
**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
T
The Standard
Est. 1898 · Daily Edition · No. 9,742
```
**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
```
**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
```
**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
```
**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.
```
**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
Ready to ship?
Start free. Upgrade when you're ready. No credit card needed.
```
**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 for accessibility.
**HTML:**
```html
◯ Meridian
Payments infrastructure for the global internet.
🌐 Language
English (US)
Français
Deutsch
日本語
中文
💱 Currency
USD ($)
EUR (€)
GBP (£)
JPY (¥)
SGD (S$)
📍 Region
US
EU
APAC
LATAM
```
**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
↑
◆ Wavelength
The newsletter app for thoughtful writers.
```
**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.
Get started
```
**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;
}
.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.
Cancel
Delete
```
**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;
}
.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
Choose Pro
```
**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;
}
.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;
}
.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
⌂ Home
⌕ Search
♡ Saved
◔ Profile
```
**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;
}
.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;
}
.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
Email
```
**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;
}
.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
Notifications
```
**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;
}
.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;
}
.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;
}
.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
```
**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);
}
.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: 200px;
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;
}
.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; }
```
---
## 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
Sidebar
grid-area: l
Main content
grid-area: m
```
**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
12 span 12
6 span 6
6 span 6
4 span 4
4 span 4
4 span 4
3 span 3
3 span 3
3 span 3
3 span 3
8 span 8
4 span 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
Pull quote
grid-area: pull
Body column
grid-area: body
```
**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 1 auto-fit · minmax(220px, 1fr)
Card 2 auto-fit
Card 3 auto-fit
Card 4 auto-fit
Card 5 auto-fit
Card 6 auto-fit
Card 7 auto-fit
Card 8 auto-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)
1 nth-child(1)
2 nth-child(2)
3 nth-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 1 row 1 · h: 1.5×
Card 2 row 1 · h: 1×
Card 3 row 2 · h: 2×
Card 4 row 2 · h: 1×
Card 5 row 3 · h: 1.5×
Card 6 row 3 · h: 1×
Card 7 row 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
A1 row 1
A2 row 1
A3 row 1
A4 row 1
B1 row 2
B2 row 2
B3 row 2
C1 row 3
C2 row 3
C3 row 3
C4 row 3
D1 row 4
D2 row 4
D3 row 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 title subgrid
Body copy of variable length sits on its own subgrid row so titles always align.
A longer two-line card title here subgrid
Subgrid lets this card inherit the parent's row tracks. Bodies stay aligned regardless of
title height.
Compact title subgrid
Without subgrid these would drift. With subgrid each card's three rows lock to the parent.
```
**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
Sidebar grid-area: nav
KPI kpi · 1/4
KPI kpi · 2/4
KPI kpi · 3/4
KPI kpi · 4/4
Main chart grid-area: main
Activity feed grid-area: feed
```
**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
$0 column 1
Personal projects · 1 user
Choose
Recommended
Pro
$24 column 2 · scaled
Teams · unlimited projects
Choose
Enterprise
$96 column 3
SSO · audit logs · SLA
Talk to sales
```
**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
Sketch onboarding
Brand audit
Set up CI
Refactor auth
Email templates
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:1 span 2 rows
1:1 aspect-ratio: 1
1:1 aspect-ratio: 1
1:1 aspect-ratio: 1
1:1 aspect-ratio: 1
1:1 aspect-ratio: 1
1:1 aspect-ratio: 1
1:1 aspect-ratio: 1
1:1 aspect-ratio: 1
1:1 aspect-ratio: 1
1:1 aspect-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
Card with container queries
Resize the card and the layout switches — no media query, no JS.
body · col 2 · @container ≥ 320px
Container < 320px
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
```
**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
Hero 1 / 1 / 3 / 4
Tall 1 / 4 / 4 / 5
Thumb 1 3 / 1 / 4 / 2
Thumb 2 3 / 2 / 4 / 3
Thumb 3 3 / 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
Hero span 2 × 2
Wide span 2 × 1
Tall span 1 × 2
1 1 × 1
2 1 × 1
Banner span 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
1 span 2
2 span 1
3 span 3
4 span 1
5 span 2
6 span 1
7 span 1
8 span 2
9 span 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 Sign up step 1 / 5
2 Verify email step 2 / 5
3 Pick plan step 3 / 5
4 Add billing step 4 / 5
5 Done step 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
Source list
grid-area: side
★ Favorites
📨 Inbox
🚀 Sent
📁 Archive
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 01 scroll-snap-align: start
Slide 02 scroll-snap-align: start
Slide 03 scroll-snap-align: start
Slide 04 scroll-snap-align: start
Slide 05 scroll-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
Hero grid-area: hero
Feature grid-area: feat
Stat grid-area: stat
Sidebar grid-area: side
CTA grid-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
H 1 / 1
He 8 / 1
Li 1 / 2
Be 2 / 2
C 5 / 2
N 6 / 2
O 7 / 2
Ne 8 / 2
Na 1 / 3
Mg 2 / 3
Al 3 / 3
Si 4 / 3
P 5 / 3
S 6 / 3
Cl 7 / 3
Ar 8 / 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; }
}
```
---
## 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.
```
**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 h1 {
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 h1 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 h1 {
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 h1 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 h1 {
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 h1 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 h1 {
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 h1 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 →
$ swift install
→ resolving dependencies
→ compiling 47 modules
→ linking binary
✓ shipped in 2.3s
$ _
```
**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 h1 {
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 h1 em { color: #b8580c; font-style: normal; }
.hs-trm h1 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 h1 {
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 h1 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 h1 {
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 h1 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 h1 {
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 h1 {
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 h1 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 h1 {
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 h1 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 h1 {
margin: 0 0 22px;
font-size: clamp(40px, 7vw, 78px);
font-weight: 600; line-height: 0.95; letter-spacing: -0.02em;
}
.hs-mag h1 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
1924
— 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 h1 {
margin: 0 0 18px;
font-size: clamp(36px, 6vw, 60px);
font-weight: 600; line-height: 1.05;
}
.hs-ovn h1 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
EVERYTHING SELLS OUT · EVERYTHING SELLS OUT · EVERYTHING SELLS OUT · EVERYTHING SELLS OUT ·
EVERYTHING SELLS OUT · EVERYTHING SELLS OUT · EVERYTHING SELLS OUT · EVERYTHING SELLS OUT ·
Drop 04. Tuesday 11am EST.
72 pieces. No restock. No back-orders. No DM begging.
Set the alarm
NO RESTOCK · NO RESTOCK · NO RESTOCK · NO RESTOCK · NO RESTOCK · NO RESTOCK ·
NO RESTOCK · NO RESTOCK · NO RESTOCK · NO RESTOCK · NO RESTOCK · NO RESTOCK ·
```
**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 h1 {
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 h1 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 →
N°04 — DUCK CANVAS WORKWEAR · MADE IN PORTUGAL
```
**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 h1 {
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 h1 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 h1 {
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 h1 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
F U L L
B A S S
M O D E
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
V2 — out now
The pottery workbook for serious hands.
Start the kiln →
1,400
hand-thrown pieces logged
“Replaced three notebooks and a chalkboard.”
— Mireya, Studio Verde
★ 4.9 App Store
Android →
```
**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 h1 {
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 h1 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 h1 {
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
· chip 16-core neural
· battery 22 hours
· weight 1.24 kg
```
**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 h1 {
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 h1 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 h1 {
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 h1 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 h1 {
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 h1 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 h1 {
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 h1 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 h1 {
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 h1 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 h1 {
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 h1 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
```
**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 h1 {
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 h1 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 h1 {
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 h1 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 h1 {
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 h1 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; }
}
```
---
## 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
Email address
```
**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
Username
```
**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
SECURE TOKEN
```
**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
Full name
Full name
```
**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
Project name
```
**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
Email
We'll never share your address.
```
**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
Password
Use 12+ characters with letters, numbers, and a symbol.
```
**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
Search
```
**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
Tags
Press Enter or , to add
```
**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 `` for the country dialling code. Semantic, accessible by default, and styled to match the input seamlessly.
**HTML:**
```html
Phone
🇬🇧 +44
🇺🇸 +1
🇮🇳 +91
🇫🇷 +33
🇩🇪 +49
🇯🇵 +81
```
**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
Quantity
−
+
```
**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
Click to upload or drag & drop
PNG, JPG, or PDF · max 10 MB
```
**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
Amount
$
USD
```
**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
Start date
```
**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
From
→
To
```
**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
Brand colour
```
**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
Work email
```
**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 `