A modern web page layout featuring alternating colored sections divided by sharp diagonal lines, demonstrating advanced CSS geometry.

Dynamic Diagonal Layouts

This is a Dynamic CSS Diagonal Layouts component. It demonstrates how to create striking, angled section dividers without relying on bulky SVG backgrounds or brittle magic numbers. Its function is to provide a mathematically precise, responsive framework for creating non-rectangular web layouts using modern CSS trigonometric functions (tan()) and pseudo-elements.

Technologies:
HTML SCSS JavaScript
Difficulty: Advanced
Browser Support (as of Mar 2026):
Chrome Chrome 111+ Edge Edge 111+ Firefox Firefox 108+ Safari Safari 15.4+
Features:
CSS Trigonometry Pseudo-elements Clip-path CSS Variables
Code by: Nils Binder Nils Binder
License: MIT

See the Pen Dynamic Diagonal Layouts.

UI card showing four selectable theme presets (Dark, Sunset, Sunrise, Light) with a sliding icon picker and live color swatch previews.

Dynamic Variable Multi-Theme Dashboard

This is a Dynamic Variable Multi-Theme Dashboard. It orchestrates entire UI shifts by remapping root-level CSS custom properties to predefined theme palettes. Its function is to provide a seamless visual state manager for applications requiring multiple aesthetic environments without reloading the DOM.

Technologies:
Pug SCSS JavaScript
Difficulty: Intermediate
Browser Support (as of Mar 2026):
Chrome Chrome 88+ Edge Edge 88+ Firefox Firefox 84+ Safari Safari 14.1+
Features:
Live CSS Variable Mapping Animated Icon Reel Swatch Previews Dynamic Layout Selection
Code by: Ryan Parag Ryan Parag
License: MIT
Geometric abstract art featuring six panels with blinking neon pink and blue sections that simulate 3D cubes using CSS conic gradients and keyframe animations.

Generative Glitch Cube Art

This is Generative Glitch Cube Art. It is a piece of procedural digital art created entirely with CSS. Its function is to demonstrate how complex, three-dimensional geometry and dynamic lighting effects can be simulated without JavaScript or SVG, relying solely on multi-layered conic-gradient backgrounds and CSS custom property animation.

Technologies:
HTML SCSS
Difficulty: Advanced
Browser Support (as of Mar 2026):
Chrome Chrome 85+ Edge Edge 85+ Safari Safari 16.4+ Firefox Firefox 128+
Features:
Conic Gradients CSS @property Glitch Animation No JavaScript
License: MIT

See the Pen Generative Glitch Cube Art.

Two responsive buttons with iridescent glowing borders that react to mouse position, shown in both light and dark mode variants

Mouse-Reactive Iridescent Button

This is a Mouse-Reactive Iridescent Button. It uses a sophisticated layering of CSS conic gradients and JavaScript pointer tracking to create a button with a vibrant, shimmering border that physically follows the user’s cursor. Its function is to provide a high-end, tactile micro-interaction that makes a standard call-to-action feel like a premium, light-sensitive object.

Technologies:
HTML SCSS JavaScript
Difficulty: Intermediate
Browser Support (as of Mar 2026):
Chrome Chrome 122+ Edge Edge 122+ Firefox Firefox 128+ Safari Safari 16.4+
Features:
Mouse Tracking Iridescent Glow CSS @property Display-P3 Colors
Code by: LukyVJ LukyVJ
License: MIT
Loading...
<main>
  <div class="container">
    <div>
      <button>
        <div class="inner">
          Cancel <span>Esc</span>
        </div>
      </button>
      <button>
        <div class="inner">
          Enjoy <span>Shift</span>
        </div>
      </button>
    </div>
  </div>

  <div class="container" data-theme="dark">
    <div>
      <button>
        <div class="inner">
          Cancel <span>Esc</span>
        </div>
      </button>
      <button>
        <div class="inner">
          Enjoy <span>Shift</span>
        </div>
      </button>
    </div>
  </div>
</main>

<div id="info-box" data-info-chrome="Rendering in Chrome" data-info-safari="Rendering in Safari" data-info-firefox="Rendering in Firefox" data-presentation-width="70vw" data-presentation-height="70vh" data-inspiration="https://twitter.com/avstorm/status/1646204829826445312?s=20" data-hidden-onload="true"></div>
@charset "UTF-8";
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap");
@layer properties {
  @property --button-shadow-opacity {
    syntax: "<number>";
    inherits: true;
    initial-value: 0;
  }
  @property --button-shadow-spread {
    syntax: "<number>";
    inherits: true;
    initial-value: 0;
  }
  @property --button-bg-opacity {
    syntax: "<number>";
    inherits: true;
    initial-value: 0;
  }
  @property --button-after-opacity {
    syntax: "<number>";
    inherits: true;
    initial-value: 0;
  }
  @property --coord-y {
    syntax: "<number>";
    inherits: true;
    initial-value: 0;
  }
  @property --coord-x {
    syntax: "<number>";
    inherits: true;
    initial-value: 0;
  }
}
:root {
  --debug: 0;
  --context-bg: hsl(0deg 0% 99%);
  --bg-container: hsl(0deg 0% 96%);
  --bg-button: hsl(179deg 7% 97%);
  --color-button: hsl(359deg 1% 35%);
  --button-shadow-opacity: 0;
  --button-shadow-spread: 0;
  --button-bg-opacity: 0;
  --button-after-opacity: 0;
  --btn-border-color: transparent;
  --btn-border-size: 0;
  --btn-inner-shadow: 1;
  --container-border-color: rgb(0 0 0 / 8%);
  --container-box-shadow-color: rgb(0 0 0 / 12%);
  --timing: .3s;
  --transitions:
    --coord-y .075s linear,
    --coord-x .075s linear,
    --button-shadow-opacity var(--timing) ease,
    --button-shadow-spread var(--timing) ease,
    --button-bg-opacity var(--timing) ease,
    --button-after-opacity var(--timing) ease,
    opacity var(--timing) ease,
    box-shadow var(--timing) ease,
    background-image var(--timing) ease;
}

*,
*:before,
*:after {
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  outline: calc(var(--debug) * 1px) dotted hsl(calc(var(--debug) * 10 * 1deg), 60%, 60%);
}

html,
body,
main {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  background: var(--context-bg);
  font-family: "Inter", sans-serif;
}

main {
  --col: 2;
  --row: 1;
  display: grid;
  place-items: center;
  grid-template-columns: repeat(var(--col), 1fr);
  grid-template-rows: repeat(var(--row), 1fr);
}
@media (max-width: 720px) {
  main {
    --col: 1;
    --row: 2;
  }
}
main .container {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  background: var(--context-bg);
  transform: scale(1);
}
main .container > div {
  background: var(--bg-container);
  padding: 2em;
  border: 1px solid var(--container-border-color);
  border-radius: 0.9em;
  box-shadow: 0 6px 12px -6px var(--container-box-shadow-color);
  display: flex;
  grid-gap: 16px;
}
main button {
  all: unset;
  --coord-y: 0;
  --coord-x: 0;
  --color-red: color(display-p3 0.95 0.06 0.02 / var(--button-bg-opacity));
  --color-orange: color(display-p3 0.97 0.61 0.07 / var(--button-bg-opacity));
  --color-olive: color(display-p3 0.83 0.87 0.04 / var(--button-bg-opacity));
  --color-lime: color(display-p3 0.31 0.89 0.05 / var(--button-bg-opacity));
  --color-teal: color(display-p3 0.12 0.88 0.88 / var(--button-bg-opacity));
  --color-tealer: color(display-p3 0.15 0.8 0.93 / var(--button-bg-opacity));
  --color-blue: color(display-p3 0.14 0.47 0.99 / var(--button-bg-opacity));
  --color-purple: color(display-p3 0.38 0.14 0.99 / var(--button-bg-opacity));
  --color-purpler: color(display-p3 0.73 0.04 0.94 / var(--button-bg-opacity));
  --color-pink: color(display-p3 0.93 0.03 0.85 / var(--button-bg-opacity));
  cursor: pointer;
  color: var(--color-button);
  border-radius: 0.8em;
  font-weight: 600;
  box-shadow: 0 8px calc(var(--button-shadow-spread) * 1px) -8px rgb(0 0 0/calc(var(--button-shadow-opacity) * 1%));
  border: 1px solid var(--btn-border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  background-color: rgba(0, 0, 0, 0.06);
  background-image: conic-gradient(from 180deg, var(--color-red) 0%, var(--color-orange) 10%, var(--color-olive) 20%, var(--color-lime) 30%, var(--color-teal) 40%, var(--color-tealer) 50%, var(--color-blue) 60%, var(--color-purple) 70%, var(--color-purpler) 80%, var(--color-pink) 90%, var(--color-red) 100%);
  background-size: calc(100% + 2px);
  background-position: -1px -1px;
  transition: var(--transitions);
}
@supports not (color: color(display-p3 0.93 0.03 0.85)) {
  main button {
    --color-red: hsl(3 93% 48% / var(--button-bg-opacity));
    --color-orange: hsl(26 91% 52% / var(--button-bg-opacity));
    --color-olive: hsl(65 89% 46% / var(--button-bg-opacity));
    --color-lime: hsl(122 86% 48% / var(--button-bg-opacity));
    --color-teal: hsl(181 78% 50% / var(--button-bg-opacity));
    --color-tealer: hsl(193 76% 53% / var(--button-bg-opacity));
    --color-blue: hsl(219 95% 56% / var(--button-bg-opacity));
    --color-purple: hsl(269 95% 56% / var(--button-bg-opacity));
    --color-purpler: hsl(292 93% 47% / var(--button-bg-opacity));
    --color-pink: hsl(327 96% 47% / var(--button-bg-opacity));
  }
}
main button .inner {
  padding: 0.55em 0.85em;
  background: var(--bg-button);
  border-radius: 0.7em;
  display: flex;
  align-items: center;
  justify-content: center;
  grid-gap: 12px;
  box-shadow: inset 0 calc(var(--btn-inner-shadow)*2px) calc(var(--btn-inner-shadow)*1px) rgba(255, 255, 255, 0.9), inset 0 calc(var(--btn-inner-shadow)*-2px) calc(var(--btn-inner-shadow)*3px) rgba(0, 0, 0, 0.03);
}
main button:before, main button:after {
  pointer-events: none;
  border-radius: 0.8em;
  content: "";
  display: block;
  position: absolute;
  width: 100%;
  height: 100%;
  transition: var(--transitions);
  background-image: conic-gradient(from 180deg, var(--color-red) 0%, var(--color-orange) 10%, var(--color-olive) 20%, var(--color-lime) 30%, var(--color-teal) 40%, var(--color-tealer) 50%, var(--color-blue) 60%, var(--color-purple) 70%, var(--color-purpler) 80%, var(--color-pink) 90%, var(--color-red) 100%);
}
main button:before {
  z-index: -1;
  filter: saturate(1.2);
  display: none;
}
main button:after {
  filter: saturate(2) blur(5px);
  transform: translate(calc(calc(var(--coord-x)/1.5) * 1px), calc(calc(var(--coord-y)/1.5) * -1px));
  width: 180%;
  height: 180%;
  opacity: calc(var(--button-after-opacity)/3);
}
main button span {
  pointer-events: none;
  font-size: 0.85em;
  padding: 4px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 6px;
  font-weight: 400;
}
main button:hover {
  --button-shadow-opacity: 16;
  --button-shadow-spread: 16;
  --button-after-opacity: 0.7;
  --button-bg-opacity: 0.15;
  transition: var(--transitions);
}
main button:hover:active {
  --button-shadow-opacity: 26;
  --button-shadow-spread: 26;
  --button-after-opacity: 0.9;
  --button-bg-opacity: 0.25;
}
main button:not(:hover) {
  --button-shadow-opacity: 0;
  --button-shadow-spread: 0;
  --coord-y: 0;
  --coord-x: 0;
  --button-bg-opacity: 0;
}
main [data-theme=dark] {
  --context-bg: hsl(0deg 0% 8%);
  --bg-container: hsl(0deg 0% 10%);
  --bg-button: var(--bg-container);
  --color-button: hsl(0deg 0% 66%);
  --btn-border-color: rgb(255 255 255 / 5%);
  --btn-inner-shadow: 1;
  --btn-border-size: 1;
  --container-border-color: rgb(255 255 255 / 8%);
  --container-box-shadow-color: rgb(0 0 0 / 80%);
}
main [data-theme=dark] button:hover {
  --button-after-opacity: 0.5;
  --button-bg-opacity: 0.18;
}
main [data-theme=dark] button:hover:active {
  --button-after-opacity: 0.75;
  --button-bg-opacity: 0.22;
}
main [data-theme=dark] button .inner {
  box-shadow: inset 0 calc(var(--btn-inner-shadow)*2px) calc(var(--btn-inner-shadow)*3px) rgba(255, 255, 255, 0.01), inset 0 calc(var(--btn-inner-shadow)*-2px) calc(var(--btn-inner-shadow)*3px) rgba(0, 0, 0, 0.25);
}
main [data-theme=dark] button span {
  border: 1px solid rgba(255, 255, 255, 0.1);
}
function getCursorPosition(element, event) {
  const rect = element.getBoundingClientRect();
  const centerX = rect.left + rect.width / 2;
  const centerY = rect.top + rect.height / 2;
  const x = event.clientX - centerX;
  const y = centerY - event.clientY;
  return { x, y };
}

const buttons = document.querySelectorAll("button");
[...buttons].map((button) => {
  button.addEventListener("pointermove", (event) => {
    const { x, y } = getCursorPosition(event.target, event);
    button.style.setProperty("--coord-x", x);
    button.style.setProperty("--coord-y", y);
  });
  button.addEventListener("pointerleave", (event) => {
    button.style.setProperty("--coord-x", 0);
    button.style.setProperty("--coord-y", 0);
  });
});
A 3D skeuomorphic toggle switch designed to look like a frying pan, with a slider handle resembling a raw egg that changes from a clear yolk to a fried white egg when toggled

Skeuomorphic Egg Toggle Switch

This is a Skeuomorphic Egg Toggle Switch. It transforms a standard binary input into a playful, highly tactile 3D object resembling an egg sliding in a frying pan. Its function is to inject personality and physical weight into a micro-interaction, replacing flat state changes with an immersive, multi-layered physics simulation entirely rendered in CSS.

Technologies:
HTML CSS JavaScript
Difficulty: Intermediate
Browser Support (as of Mar 2026):
Chrome Chrome 105+ Edge Edge 105+ Firefox Firefox 121+ Safari Safari 15.4+
Features:
3D Rotation Skeuomorphic Design CSS Keyframes Multi-layered Shadows
Code by: Jon Kantner Jon Kantner
License: MIT
Interactive SVG star rating with a circular burst animation and physics-based pop effect when a rating is selected

Bursting Animated SVG Star Rating

The Bursting Animated SVG Star Rating is an explosive feedback component for user reviews. It replaces standard instantaneous state changes with a multi-layered animation sequence consisting of a ring expansion, radial line “sparks,” and an elastic fill. Its function is to provide high-fidelity tactile validation for user input within forms.

Technologies:
HTML SCSS JavaScript
Difficulty: Intermediate
Browser Support (as of Mar 2026):
Chrome Chrome 80+ Edge Edge 80+ Firefox Firefox 63+ Safari Safari 13.1+
Features:
Burst Micro-interaction Staggered Animation ARIA-compliant
Code by: Jon Kantner Jon Kantner
License: MIT
Rotating circular text loader with dynamic variable font-weight and opacity transitions using CSS variables

Circular Variable Font Loading Spinner

This is a Circular Variable Font Loading Spinner. It arranges individual characters into a radial path, creating a sophisticated typographic loop. Its function is to serve as a high-fidelity alternative to standard SVG or icon-based loaders, utilizing the weight-axis of variable fonts to simulate organic growth and motion.

Technologies:
HTML SCSS Babel
Difficulty: Intermediate
Browser Support (as of Mar 2026):
Chrome Chrome 92+ Edge Edge 92+ Firefox Firefox 90+ Safari Safari 15.4+
Features:
Variable Typography Radial Positioning Staggered Animation
Code by: David Aerne David Aerne
License: MIT
Dark navigation menu with large text and floating images that follow the cursor, featuring a vertical parallax panning effect using JS.

Interactive Vertical Parallax Cursor Navigation

This is an Interactive Vertical Parallax Cursor Navigation. It combines large-scale typography with a dynamic image-reveal system. Its function is to provide an immersive, tactile menu experience for high-end creative portfolios, where the user’s cursor physically “steers” the list and uncovers visual content linked to each item.

Technologies:
HTML CSS JavaScript
Difficulty: Intermediate
Browser Support (as of Mar 2026):
Chrome Chrome 80+ Edge Edge 80+ Firefox Firefox 75+ Safari Safari 13.1+
Features:
Cursor Image Tracking Vertical Panning WAAPI Animation Fluid Typography
Code by: Hyperplexed Hyperplexed
License: MIT
Layered Dynamic Card Swiper with radial fanning hover effects and data-driven state transitions

Layered Dynamic Card Swiper

This is a Layered Dynamic Card Swiper. It replaces linear carousels with a 3D-stacked deck logic. Its function is to provide a high-fidelity interaction for decision-based interfaces (like discovery or voting), utilizing data attributes to trigger complex spatial transitions between card groups.

Technologies:
HTML CSS JavaScript
Difficulty: Intermediate
Browser Support (as of Mar 2026):
Chrome Chrome 88+ Edge Edge 88+ Firefox Firefox 89+ Safari Safari 15+
Features:
State mapping Radial fanning CSS-only hover
Code by: Hyperplexed Hyperplexed
License: MIT

See the Pen Layered Dynamic Card Swiper.

Interactive floating image gallery with smooth mouse-tracking parallax and hover-reveal tiles using Web Animations API.

Mouse-Reactive Floating Image Gallery

This is a Mouse-Reactive Floating Image Gallery. It places an oversized grid of visual assets behind the viewport, hidden by the overflow. Its function is to provide an immersive, explorative navigation experience where the user’s cursor physically steers the scene across a scattered landscape of content.

Technologies:
HTML CSS JavaScript
Difficulty: Intermediate
Browser Support (as of Mar 2026):
Chrome Chrome 36+ Edge Edge 12+ Firefox Firefox 48+ Safari Safari 9+
Features:
Mouse Tracking Smooth Panning Hover Reveal Dynamic Layout
Code by: Hyperplexed Hyperplexed
License: MIT