A long text article where specific phrases are highlighted with a yellow background animation as they enter the viewport, with controls for highlight style and dark mode at the top

Scroll-Triggered Text Highlights

demo & code

This Scroll-Triggered Text Highlight effect mimics the experience of marking important passages with a highlighter pen as you read. Using GSAP ScrollTrigger, the highlights animate seamlessly from left to right exactly when the text enters the reader’s viewport. The component offers multiple visual styles (full background, half-height, or underline) and fully supports dark mode, making it an excellent addition to long-form articles, documentation, or educational content.

Level: Intermediate
Browser Support: Chrome 60+, Edge 79+, Firefox 60+, Safari 11+
A richly detailed wooden toggle switch with bronze inlays. When off, it shows dim runes. When on, it glows with fire effects and floating embers.

Viking Rune Wood Toggle

demo & code

This Viking Rune Wood Toggle demonstrates how far CSS styling can go without JavaScript. It recreates a physical artifact - a wooden switch with bronze inlays and magical runes - perfect for RPG game interfaces or fantasy-themed websites. The switch features a “fire” state when active, complete with pulsating runes and floating ember particles, creating an immersive, tactile experience.

Level: Advanced
Browser Support: Chrome 60+, Edge 79+, Firefox 55+, Safari 11+
A list of radio buttons with a rough, hand-drawn look on a paper-textured background. The selected item has a bouncing red dot and a jittery label.

Hand-Drawn Retro Radio Group

demo & code

This Hand-Drawn Retro Radio Group injects personality into standard forms with a nostalgic, sketchbook aesthetic. It combines a “neo-brutalist” shadow style with subtle animations - like text jitter and a bouncing selection dot - to mimic the imperfection of hand-drawn art. The background features a CSS-generated paper texture and scanline effect, making it ideal for indie game interfaces, creative blogs, or retro-themed landing pages.

Level: Intermediate
Browser Support: Chrome 60+, Edge 79+, Firefox 60+, Safari 12+
A UI background starting as white at the top with gray grid lines, fading into a vibrant teal-to-purple gradient at the bottom.

Fading Grid Gradient Background

demo & code

This Fading Grid Gradient Background creates a clean, architectural aesthetic suitable for SaaS landing pages or documentation sites. It features a technical vertical grid pattern that gently dissolves into a vibrant teal-and-purple gradient at the bottom. The effect mimics a “horizon” line, adding depth and structure to an otherwise flat page without using any images.

Level: Beginner
Browser Support: Chrome 80+, Edge 80+, Firefox 53+, Safari 15.4+
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+
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+
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+
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.

CSS Blockquote with Gradient Drop Cap

CSS Blockquote with Gradient Drop Cap

A unique drop cap is created with modern CSS techniques - its complex background is generated by layering linear-gradient and repeating-conic-gradient, while its responsive size is managed by calc().

Metallic Skeuomorphic Toggle Switches

Metallic Skeuomorphic Toggle Switches

A skeuomorphic toggle design achieved by combining multiple linear-gradients for the body and box-shadow to create a volumetric effect. The smooth switching animation and “glow” in the active state are implemented via transition with a custom cubic-bezier curve.

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.

Progress Button Microinteractions

Progress Button Microinteractions

An animated loader button using jQuery and SCSS, where progress is implemented via an @for loop that generates 101 linear-gradient rules - the state is changed through a custom attribute updated by JS.

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.

Progress Bar with Dynamic CSS Gradient

Progress Bar with Dynamic CSS Gradient

This loader achieves a liquid-smooth animation by calculating progress on the JavaScript requestAnimationFrame loop and programmatically updating the CSS linear-gradient background property to create dynamic color shifts.

Pure CSS Animated FF Conf Logoexternal link

A futuristic 3D data block where scrolling digital “circuits” are simulated purely in CSS by animating the background-position of linear-gradient patterns.

CSS Shimmer Loading Effectexternal link

A classic skeleton loader pattern implemented via pure CSS. The shimmer effect utilizes a wide linear-gradient and animates background-position to simulate a passing wave of light indicating active data fetching.

Chocolate Wafer CSS Background

Chocolate Wafer CSS Backgroundexternal link

A sophisticated striped background pattern built with pure CSS using the linear-gradient hard-stop technique. This lightweight snippet offers a high-performance, responsive UI solution that mimics complex textures without the need for external image assets.

Scroll Mask Indicatorsexternal link

A modern and clean way to indicate scrollability: the “fade-to-mist” effect is implemented using mask-image and linear-gradient, while key parameters of the fade phase are precisely tuned using @property.

Push Button (CSS 3D Button)external link

A skeuomorphic 3D button created with multi-layered box-shadow and linear-gradient to simulate volume, highlights, and shadows. On :hover, the box-shadow styles are animated, creating a “pressed” effect.

Subscribe Email Form

Subscribe Email Form

This demo features subtle but effective micro-interactions implemented entirely in CSS. The social login buttons and the primary submit button use a transform: scale(1.1) on :hover to create a satisfying “pop” effect, enhancing the user experience with minimal code.

See the Pen Subscribe Email Form.

Contact Form with SVG Animation

Contact Form with SVG Animation

This is a complete UI component blending aesthetic animation with functional form design. Staggered CSS keyframe animations bring the inline SVG to life, while the form itself features modern styling techniques, including a performant gradient-transition button and absolutely positioned Feather icons.

See the Pen Contact Form with SVG Animation.

Card Skeleton Loaderexternal link

A smooth, rhythmic pulsation that creates a sense of “alive” waiting while keeping the page structure stable.

Card UI Skeleton Screenexternal link

A complex visual placeholder structure implemented without cluttering the DOM, automatically disabling itself when content appears.

CSS Coffee Infographic

CSS Coffee Infographic

A pure CSS infographic visualizing coffee recipes through layered gradients within stylized cups.

See the Pen CSS Coffee Infographic.

CSS-Only 12-digit UPC-A Barcode Generator

CSS-Only 12-digit UPC-A Barcode Generator

A visually accurate barcode that is theoretically scannable (given correct proportions), created without images or fonts by simply styling HTML tags.

Rainbowy Dashed Divider

Rainbowy Dashed Divider

A creative divider made by layering two pseudo-elements - an animated rainbow gradient and a masking dashed line that “punches” holes in it using a linear-gradient.

See the Pen Rainbowy Dashed Divider.

Recipe Card

Recipe Card

A technically interesting solution for a UI card where recipe details (time, level) are organized via inline blocks within an unstyled list, styled using pseudo-classes for precise adjustment of child element margins and styles, avoiding excessive classes.

See the Pen Recipe Card.

90's Profile Card

90's Profile Card

The business card design showcases pure CSS, utilizing linear-gradient and a pseudo-element to create a multicolor gradient background, alongside absolute positioning for layering; it also applies the CSS filter sepia(1) to the image and a box-shadow for depth, with all text styled in the monospace font courier.

See the Pen 90's Profile Card.

Gradient Button

Gradient Button

This button implements an aesthetic “sliding gradient” hover effect using a large ::after pseudo-element filled with a multi-stop linear gradient, which is horizontally translated from -280px to -200px on hover.

See the Pen Gradient Button.

Gradient Hover Animated Ghost Buttonexternal link

The button animation uses SVG rect elements and CSS stroke-dasharray and stroke-dashoffset properties to create a sophisticated, drawing border effect that transitions smoothly on hover, highlighting the call-to-action.

CSS Gradient Buttonexternal link

A multi-layered button where the background, border, and pseudo-elements are styled with different linear-gradients. A SCSS mixin, @mixin buttonLayer, is used for reusing the styles of the pseudo-elements.

Badge Made With CSSexternal link

The badge uses background: rgba() and backdrop-filter: blur(10px) to create a translucent, frosted look. A double layer with ::before adds depth and enhances the blur effect.