Equilateral triangular images with soft rounded corners achieved through CSS masking and trigonometric math, overlapping on a vibrant background.

Rounded Triangle CSS Image Mask

demo & code

This Rounded Triangle CSS Image Mask offers a mathematically perfect way to shape visuals into equilateral triangles with soft, professional edges. It is an ideal choice for high-end portfolio galleries, creative team sections, or landing pages where standard rectangular or circular crops feel too conventional. By leveraging modern CSS math, the shape remains perfectly symmetrical regardless of the image dimensions.

Level: Intermediate
Browser Support: Chrome 105+, Edge 105+, Firefox 121+, Safari 15.4+
Dark UI button with a metallic linear gradient shine that follows the cursor position, featuring radial glows on the edges.

Mouse-Tracking Linear Shine Button

demo & code

This Mouse-Tracking Linear Shine Button adds a high-end, tactile feel to your UI. Unlike standard hover effects that simply swap colors, this component tracks the user’s cursor position to drag a realistic light reflection across the button’s surface. Built with React and Tailwind CSS, it utilizes reactive CSS variables to control gradient positions, creating a dynamic lighting effect that feels physical and responsive.

Level: Intermediate
Browser Support: Chrome 49+, Edge 79+, Firefox 32+, Safari 8+
Split-screen interface where the left column images slide and crossfade in sync with the scrolling right column, featuring progress indicators.

Scroll-Driven Image Swapper

demo & code

This Scroll-Driven Image Swapper demonstrates the bleeding edge of web animation. It uses the native CSS Scroll-driven Animations API to create a complex parallax-like effect where two columns of different heights scroll in sync. As you scroll, the images in the shorter column slide and crossfade to match the context of the taller column. Crucially, the code implements a Progressive Enhancement strategy: it checks for native browser support and falls back to GSAP ScrollTrigger for browsers that haven’t implemented the spec yet.

Level: Advanced
Browser Support: Chrome 115+, Edge 115+. Firefox/Safari (via GSAP Polyfill)
Collection of four distinct progress bar styles: solid orange, purple gradient, diagonal stripes, and a neon bordered style, all displaying percentage values.

Semantic Custom Progress Bar Kit

demo & code

This Semantic Custom Progress Bar Kit offers a robust way to display data visualization using a “semantic-first” approach. Instead of writing empty div soup, you define your data using standard HTML5 <progress> tags. The accompanying JavaScript then “hydrates” these tags, converting them into four distinct, visually rich styles ranging from simple solids to complex gradients and striped patterns, perfect for dashboards or skill portfolios.

Level: Intermediate
Browser Support: Chrome 60+, Edge 79+, Firefox 55+, Safari 11+
Holographic trading card with 3D tilt effect and iridescent gradients using CSS @property and mask-image for shimmering lines.

Holographic 3D Interactive Card

demo & code

This Holographic 3D Interactive Card is a premium UI component inspired by rare physical trading cards. It features a sophisticated depth effect where the logo floats independently from the iridescent background, reacting dynamically to mouse movements or touch input. The use of modern CSS APIs ensures high-performance rendering of complex gradients and masks, creating a truly immersive “collectible” feel for digital assets.

Level: Advanced
Browser Support: Chrome 85+, Edge 85+, Safari 16.4+, Firefox 128+
Five distinct range slider designs arranged vertically: a red square thumb, a pill shape with a hollow center, a triangular pointer, and a circular button style

Geometric Custom Range Sliders

demo & code

These Geometric Custom Range Sliders push the boundaries of form styling by abandoning the standard “circle on a line” look. Created by CSS math wizard Ana Tudor, this set utilizes SCSS trigonometry to generate complex thumb shapes (like triangles and hollow pills) and CSS Mask Composition to carve out negative space. The result is a set of distinct, scalable inputs that rely on a single HTML <input> tag without any wrapper divs.

Level: Advanced
Browser Support: Chrome 84+, Edge 84+, Firefox 70+, Safari 15.4+
Dark UI card displaying a vibrant purple-yellow gradient on hover with staggered animated text elements.

Twitch Style Gradient Hover Card

demo & code

This Twitch Style Gradient Hover Card brings a high-energy interactive element to your UI, perfect for feature highlights or gaming profiles. It combines a sliding background gradient that utilizes responsive vmin units with a JavaScript-powered staggered text reveal. The result is a fluid animation where the background shifts dynamically while the subtitle types itself in word by word.

Level: Intermediate
Browser Support: Chrome 88+, Edge 88+, Firefox 89+, Safari 15+
Dark blue background with a series of animated vertical bars revealing the white text 'Álvaro Montoro' and 'CSS Aficionado'.

Staggered Bars Reveal Animation

demo & code

This Staggered Bars Reveal Animation creates a cinematic intro for landing pages using zero JavaScript. By orchestrating a single pseudo-element (::after) with complex linear-gradient backgrounds, the component simulates seven distinct bars sliding into place. The animation cleverly shifts the background-position of each gradient strip sequentially, creating a rhythmic “wipe” effect that culminates in the text appearing.

Level: Intermediate
Browser Support: Chrome 100+, Edge 100+, Safari 14+, Firefox 90+
Stylized night scene drawn in CSS, featuring yellow flowers blooming, green grass swaying, and translucent bubbles with red hearts floating upwards.

Blooming Night Garden Animation

demo & code

This Blooming Night Garden Animation is a delightful example of “CSS Art,” where HTML elements are shaped into complex illustrations using code. It features a complete scene with a textured night sky, procedurally blooming flowers, swaying grass, and a particle system of floating hearts, all brought to life through choreographed CSS keyframes.

Level: Intermediate
Browser Support: Chrome 100+, Edge 100+, Safari 14+, Firefox 90+
Dark-themed grid of placeholder cards with a shimmering gradient animation that flows sequentially from left to right.

Staggered Gradient Skeleton Loader

demo & code

This Staggered Gradient Skeleton Loader improves perceived performance by providing a visual structure while content fetches in the background. Unlike static placeholders, this Vue.js component utilizes a calculated delay system to create a “wave” animation across the grid, guiding the user’s eye naturally from top-left to bottom-right without using complex JavaScript animation libraries.

Level: Beginner
Browser Support: Chrome 100+, Edge 100+, Safari 14+, Firefox 90+
Background image card with a smooth bottom black gradient overlay created using the CSS border-image fill property for better text contrast

Border Image Fill Gradient Overlay

demo & code

The Border Image Fill Gradient Overlay is a minimalist CSS technique used to add a decorative or functional gradient over background images. Unlike traditional methods that require extra HTML markup or ::before/::after pseudo-elements, this approach uses a single, underutilized property to enhance text contrast and visual depth.

Level: Beginner
Browser Support: Chrome 15+, Edge 12+, Firefox 15+, Safari 6+
A sleek dark card UI with a central logo and a dynamic background of randomized characters revealed by a radial gradient mask following the mouse.

Hyperplexed Evervault Card Hover Effect

demo & code

This Hyperplexed Evervault Card Hover Effect utilizes dynamic character generation and CSS masking to create a high-tech “decryption” visual. It replicates the sophisticated card interactions found on the Evervault website, blending procedural text with mouse-responsive radial gradients.

Level: Intermediate
Browser Support: Chrome 80+, Edge 80+, Firefox 75+, Safari 13+
Retro 80s scene with a neon sun, scrolling grid floor, palm trees, and the back of a DeLorean car driving into the horizon

Pure CSS Synthwave 80s Animation

demo & code

This Pure CSS Synthwave 80s Animation captures the nostalgic aesthetic of the 1980s retrowave genre. It features a complete animated scene: an infinite neon grid, a setting sun with scanlines, shaking palm trees, and a DeLorean driving into the distance. The scene is brought to life with a driving synthwave audio track and intricate CSS-only motion.

Level: Advanced
Browser Support: Chrome 60+, Edge 79+, Firefox 55+, Safari 11+
Analog clock styled as a watermelon slice with pink face, green rind, and seed markers using CSS gradients

Watermelon Themed Analog Clock

demo & code

This Watermelon CSS Analog Clock transforms a standard timekeeping UI into a playful, summery vector illustration. By leveraging SCSS pre-processing for generative design and CSS Gradients for complex shapes, it reduces HTML markup while maintaining a vibrant, flat-design aesthetic.

Level: Beginner
Browser Support: Chrome 60+, Edge 79+, Firefox 55+, Safari 11+
A detailed illustration of a house with surrounding trees and foliage, created entirely with pure CSS.

Line House

A pure CSS illustration of a house constructed from geometric primitives using clip-path for complex shapes and transform for perspective. It features a warm color palette managed via CSS variables, extensive drop-shadow usage for foliage density, and linear-gradient for detailed window reflections.

See the Pen Line House.

A detailed vector-style portrait of a person created entirely with pure CSS.

Profile CSS Drawing

A stylish, detailed vector-style portrait with depth and shadows, fully implemented using pure CSS gradients and clipping paths.

See the Pen Profile CSS Drawing.

A monochrome illustration of a knight in armor holding a shield and sword, created entirely with pure CSS.

Warrior

A pure CSS illustration of a knight constructed from geometric primitives. It employs repeating-linear-gradient for shield textures, clip-path for armor shaping, and extensive box-shadow duplication to render limbs and details efficiently, creating a stark, high-contrast monochrome aesthetic.

See the Pen Warrior.

A navigation menu where a spotlight effect highlights the currently active menu item.

Animated Navigation

A spotlight navigation menu where the active state is highlighted by a moving “light beam” element.

See the Pen Animated Navigation.

Interactive login form that performs a 3D flip animation when switching between color themes.

Animated Sign-In Form with Theme Switcher

An interactive login form that performs a 360-degree 3D flip animation to seamlessly transition between vibrant, gradient-based color themes triggered by a JavaScript state manager.

Dark-themed nested to-do list with custom gradient markers and hover-reveal sub-tasks.

Little Details

A stylized nested to-do list employing advanced CSS pseudo-elements for custom markers and hover-based reveal logic for sub-tasks. JavaScript handles basic DOM manipulation for adding/removing items, while the dark UI features gradient borders and tooltip interactions.

See the Pen Little Details.

Ergonomic Toggle (CSS)

Ergonomic Toggle (CSS)

A hyper-realistic skeuomorphic toggle switch crafted entirely in CSS using advanced box-shadows and gradients to simulate depth and lighting.

See the Pen Ergonomic Toggle (CSS).

Holographic Name Card with Hover Effects

Holographic Name Card with Hover Effects

An interactive 3D holographic card where JavaScript maps pointer coordinates to scoped CSS Custom Properties like --pointer-x. The physical lighting simulation relies on complex gradient layering, mask-image, and mix-blend-mode, all dynamically driven by these calculated values to create realistic depth and glare.

Skull Toggle (CSS)

Skull Toggle (CSS)

A playful skeleton toggle switch animated purely with CSS. The skull handle slides via @keyframes triggered by the :checked state, while a complex hand assembly - constructed from gradients and box-shadows - slides in to “push” the toggle, creating a whimsical, interactive narrative without JavaScript.

See the Pen Skull Toggle (CSS).

Metal/Glass Button

Metal/Glass Button

A high-quality simulation of a metallic surface that “plays” with light following the mouse cursor, creating a tactile sensation of premium material.

See the Pen Metal/Glass Button.

React Radio Player

React Radio Player

A tactile, interactive player that looks and behaves like a real gadget, featuring smooth power-on animations and live audio streaming.

See the Pen React Radio Player.

List Styles

List Styles

An aesthetically pleasing, modern todo list featuring a vibrant gradient theme and an intuitive hierarchy creation function without complex control buttons.

See the Pen List Styles.

Creative Section Design

Creative Section Design

A visually rich, animated section with cards that respond to hover (a colored border appears), creating a sense of interactivity and depth.

See the Pen Creative Section Design.

Simple HTML Charting with CSS Grid, Writing Mode, and Vue

Simple HTML Charting with CSS Grid, Writing Mode, and Vue

A lightweight, colorful, and animated chart demonstrating data visualization capabilities using pure CSS and Vue without heavy dependencies.

Interactive Gooey Buttons

Interactive Gooey Buttons

Interactive buttons featuring a fluid, mouse-tracking glow effect powered by CSS custom properties. JavaScript calculates cursor coordinates to dynamically position radial gradients and text shadows, while CSS filters create a ‘gooey’ liquid animation that responds organically to user interaction.

See the Pen Interactive Gooey Buttons.

DOM-Based Platformer with Gamepad API Support

DOM-Based Platformer with Gamepad API Support

A DOM-based platformer engine that constructs levels from numeric arrays, utilizing document.elementFromPoint for real-time collision detection and physics simulation. The JavaScript game loop manages gravity, gamepad support, and level transitions, while intricate CSS gradients and animations bring the tile-based world and character to life.

Pure CSS Pricing Plans with Gradient Ribbons

Pure CSS Pricing Plans with Gradient Ribbons

A pricing component where complex ribbon geometry is calculated via SCSS trigonometry and sculpted using conic-gradient alongside mask-composite. The organic, fluid connections between shapes are achieved through the filter: blur() contrast() technique, creating a scalable vector-like aesthetic entirely within CSS without relying on runtime JavaScript or external SVG assets.

3D Neon Toggle On/Off Switch

3D Neon Toggle On/Off Switch

An advanced 3D toggle switch simulating a physical button with a neon glow. The effect is implemented in pure CSS using an <input type="checkbox">, and the state transition (ON/OFF) is achieved through a complex interplay of box-shadow and 3D transforms.

See the Pen 3D Neon Toggle On/Off Switch.

3D Toggle On/Off Switch v2

3D Toggle On/Off Switch v2

The use of gradients to create a realistic metallic effect and highlights on the button. Various types of linear-gradient and radial-gradient are applied to create a multi-layered background, and clip-path precisely clips the shapes of the pseudo-elements.

See the Pen 3D Toggle On/Off Switch v2.

CSS Day/Night Lighthouse Illustration

CSS Day/Night Lighthouse Illustration

A purely CSS rendering of a complex lighthouse scene at sunset/night. The “checkbox hack” is used to toggle between day and night modes. All graphics - from the lighthouse itself to the sea, clouds, and stars - are created exclusively using CSS gradients and box-shadow.

Single Div CSS Computer

Single Div CSS Computer

A demonstration of pixel art creation using only CSS gradients and box-shadow animation, without a single image file or extra HTML elements.

See the Pen Single Div CSS Computer.

Multi-Card Spotlight Effect

Multi-Card Spotlight Effect

An interactive 3D card effect where JavaScript tracks pointermove, calculates the relative cursor position, and passes it to --ratio-x and --ratio-y CSS variables, while CSS uses calc() to drive rotateX and rotateY.

See the Pen Multi-Card Spotlight Effect.

Animated Ratings Component

Animated Ratings Component

This interactive rating component stands out with three unique 3D effects, built using advanced Sass (loops, gradient randomization), - and showcases SVG facial animation via path morphing in pure JS.

See the Pen Animated Ratings Component.

React Color Gradient Palette

React Color Gradient Palette

This React component library demonstrates a technically clean solution for displaying color gradients.

See the Pen React Color Gradient Palette.

Realistic MPK Mini MIDI Controller in Pure CSS

Realistic MPK Mini MIDI Controller in Pure CSS

Pure CSS skeuomorphism in action - a complete replica of a MIDI controller where every knob, pad, and key is drawn by layering dozens of gradients and shadows.

Cursor Following Halftone Rings with CSS @property

Cursor Following Halftone Rings with CSS @property

A cursor effect creating dynamic halftone rings is implemented using CSS Custom Properties and transition properties for smooth mouse-following, requiring minimal JavaScript to update coordinates.

Intersecting Diagonals Pattern

Intersecting Diagonals Pattern

A pattern generated with just one background property, showcasing advanced use of CSS gradients and background-size to create a complex, repeating texture, with flexible customization via custom CSS properties.

See the Pen Intersecting Diagonals Pattern.

Lighthouse Single-Div CSS Illustration

Lighthouse Single-Div CSS Illustration

The entire scene is constructed from a combination of gradients (linear-gradient/radial-gradient) and precise element positioning using background-position.

Button with Animated Gradient

Button with Animated Gradient

Achieve a premium, vibrant glow and pulsating background with this component, which utilizes high-performance CSS animations and dynamic box-shadow effects, all orchestrated by TypeScript and the GSAP library.

See the Pen Button with Animated Gradient.

Neomorphic Calendar Card Component

Neomorphic Calendar Card Component

A neomorphic calendar card component with SCSS-driven depth and complex CSS transformations, featuring a concise vanilla JavaScript implementation to display the live UTC date and month.

Pro-Mode Toggle Switch w/ Guard

Pro-Mode Toggle Switch w/ Guard

Dual input[type="checkbox"] system for two-step activation, showcasing mastery in creating logic without JavaScript and detailed UI using a repeating-linear-gradient background and complex pseudo-elements."

See the Pen Pro-Mode Toggle Switch w/ Guard.

Color Clipping Effect with CSS Gradients and GSAP

Color Clipping Effect with CSS Gradients and GSAP

A sleek text hover and intro animation, implemented using GSAP to smoothly transition CSS gradient stops via modern CSS variables, ensuring high performance and clean, maintainable code.

Spotlight Cursor on Responsive Image

Spotlight Cursor on Responsive Image

A unique, zero-dependency “flashlight” UI effect achieved by dynamically positioning a large, transparent-to-radial-gradient element via Vanilla JavaScript mousemove, and using the powerful CSS mix-blend-mode: exclusion to create the inverted color effect over the background image.

Pure CSS Loader #10/2020 - No SVG Arcs

Pure CSS Loader #10/2020 - No SVG Arcs

An elegant loader built purely with CSS/SASS that leverages CSS Houdini’s @property to define and smoothly animate custom numeric properties, enabling a high-performance rotation and hue-shifting loop.

Light and Shadow Mouse Tracking

Light and Shadow Mouse Tracking

A showcase of powerful interactive styling, where JS logic calculates cursor distance and direction to control a moving shadow and the intensity of a border glow via CSS variables and pseudo-elements.

See the Pen Light and Shadow Mouse Tracking.

Responsive Banners with CSS Grid and Variables

Responsive Banners with CSS Grid and Variables

This component leverages the power of CSS Grid for precise layout control and CSS Custom Properties to dynamically inject data like color schemes. It features decorative CSS Counters and complex background layering for a polished, modern component without relying on JavaScript for styling.

Card with Illumination Effect

Card with Illumination Effect

An example of how to achieve an impressive pseudo-3D interface using pseudo-elements (::before) and CSS transforms. The effect is built by layering elements (.light-layer, .darken) with different box-shadow and gradients to simulate the play of light and shadow on the surface.

See the Pen Card with Illumination Effect.