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

demo & code

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.

Level: Intermediate
Browser Support [As of Mar 2026]: Chrome 105+, Edge 105+, Firefox 121+, Safari 15.4+
High-contrast 3D toggle switch with an elastic slingshot animation and viewport-wide stretching effects using CSS keyframes.

Slingshot Elastic Stretch Toggle

demo & code

The Slingshot Elastic Stretch Toggle is an experimental UI switch that utilizes exaggerated spatial movement to signal state changes. It replaces the standard sliding thumb with a “dual-handle” system that appears to shoot across the viewport using a high-velocity slingshot effect. Its function is to provide an high-energy alternative to traditional toggles, making a simple boolean selection feel like a physical, kinetic event.

Level: Intermediate
Browser Support [As of Mar 2026]: Chrome 86+, Edge 86+, Firefox 85+, Safari 15.4+
A bright yellow button with an animated dashed border that draws itself around the perimeter on hover, along with corner dots that appear sequentially.

Animated Border Drawing Button

demo & code

This is an Animated Border Drawing Button. It transforms a standard call-to-action into a multi-stage micro-interaction. Upon hovering over the button, the component triggers a sequential animation where four corner dots appear, followed by four dashed border lines that “draw” themselves around the button’s perimeter, creating a high-end, futuristic feel.

Level: Intermediate
Browser Support [As of Mar 2026]: Chrome 105+, Edge 105+, Firefox 121+, Safari 15.4+
A video game character select screen with a large image of Ryu and a row of selectable character portraits at the bottom

CSS :has() Character Select Screen

demo & code

This is a CSS :has() Character Select Screen. It replicates the classic user interface of a fighting game’s selection menu, using modern CSS to handle all state logic. Its function is to demonstrate how the :has() pseudo-class can completely replace JavaScript for managing visibility in a selection-based UI, triggering changes in the main content area based on the state of a radio button group.

Level: Beginner
Browser Support [As of Mar 2026]: Chrome 105+, Edge 105+, Firefox 121+, Safari 15.4+
A settings panel UI featuring a notification icon and text that dynamically change from 'Off' to 'On' when the adjacent toggle switch is activated

CSS :has() Notification Toggle

demo & code

This is a CSS :has() Notification Toggle. It provides a fully functional, state-aware UI switch for settings panels without a single line of JavaScript. Its function is to allow the user to toggle a binary state (notifications on/off) and have the entire UI — including icons, labels, and descriptive text — update instantly based purely on the state of a hidden checkbox.

Level: Beginner
Browser Support [As of Mar 2026]: Chrome 105+, Edge 105+, Firefox 121+, Safari 15.4+
A full-screen vertical slider with a 'melt' transition between sections, a side indicator, and radio buttons to change the animation type

Scroll-Driven View Transitions

demo & code

This is a Scroll-Driven View Transitions component. It simulates app-like, full-screen transitions between content sections using only native CSS properties. Its function is to replace traditional vertical scrolling with a more engaging, cinematic experience, where each scroll action triggers a complex animation (like a “melt”, slide, or zoom) rather than a simple positional change.

Level: Intermediate
Browser Support [As of Mar 2026]: Chrome 115+, Edge 115+
A fan-like arrangement of rectangular image cards that spread apart gracefully when hovered, creating a fluid radial carousel

Interactive Radial Image Carousel

demo & code

This is an Interactive Radial CSS Image Carousel. It arranges a deck of image cards into a curved, fan-like layout. Its function is to provide an engaging, space-saving gallery interface where hovering over a card gracefully shifts its neighbors away along a circular path, bringing the focused item into clear view without relying on JavaScript math.

Level: Advanced
Browser Support [As of Mar 2026]: Chrome 119+, Edge 119+, Firefox (partial), Safari 26.2+
Circular layout of avatar images that dynamically expand and separate on hover, featuring a bright gradient background

Dynamic Circular Avatar Gallery

demo & code

This is a Dynamic Circular Avatar Gallery. It arranges a series of profile images into a perfect circle that smoothly expands when interacted with. Its function is to showcase user groups or team members in a compact, engaging format, using cutting-edge CSS math instead of JavaScript to handle complex radial positioning and dynamic item counting.

Level: Advanced
Browser Support [As of Mar 2026]: Chrome 119+, Edge 119+
Circular popover menu spreading out radially using CSS trigonometry and sibling-index

Trigonometric Radial Popover Menu

demo & code

This is a Trigonometric Radial Popover Menu. It replaces heavy JavaScript positioning arrays with native CSS mathematics and the HTML Popover API. Its function is to reveal secondary actions in a circular layout on demand, expanding the interactive surface area without permanently cluttering the interface.

Level: Advanced
Browser Support [As of Mar 2026]: Chrome 139+, Edge 139+
E-commerce product grid with a sidebar filter demonstrating pure CSS logic using the :has pseudo-class

E-commerce Product Filter

demo & code

This is a Pure CSS E-commerce Product Filter. It replaces JavaScript-based array filtering with native CSS relationship selectors. Its function is to toggle product visibility based on multiple checkbox states within a sidebar, offering an instant, script-free sorting mechanism for catalog grids.

Level: Intermediate
Browser Support [As of Mar 2026]: Chrome 105+, Edge 105+, Firefox 121+, Safari 15.4+
Dark pill-shaped button with a glowing cosmic hover effect revealing a 3D rotating particle galaxy inside

Cosmic 3D Galaxy Button

demo & code

This is a Cosmic 3D Galaxy Button. It replaces a standard solid color hover state with a dynamic, multi-layered particle system. Its function is to serve as a high-impact primary call-to-action, using spatial depth and global page illumination to draw maximum user focus.

Level: Advanced
Browser Support [As of Feb 2026]: Chrome 105+, Edge 105+, Firefox 121+, Safari 15.4+
Minimalist white wallet card UI expanding to reveal bank card options and cash amounts using a pure CSS click interaction

Expandable Wallet Payment Card

demo & code

This is an Expandable Wallet Payment Card. It uses pure CSS to manage complex UI states without JavaScript. Its function is to conceal secondary actions — like selecting a payment method or adding funds — behind a compact primary view showing the balance. The interaction is self-contained, optimizing screen real estate while keeping critical functions one click away.

Level: Intermediate
Browser Support [As of Feb 2026]: Chrome 105+, Edge 105+, Firefox 121+, Safari 15.4+
Dark UI showing two video thumbnails; a circular custom cursor follows the mouse, displaying a 'Play' icon dynamically over the content

Cinematic Context-Aware Video Cursor

demo & code

Standard video controls are an interruption — a layer of clutter between the viewer and the content. We wanted to remove that barrier. This component transforms the user’s intent into the interface itself. By morphing the cursor into a context-aware controller, we achieve a symbiosis of navigation and action. It creates an immersive, cinematic experience where the UI dissolves, leaving only the story.

Level: Intermediate
Browser Support [As of Feb 2026]: Chrome 105+, Edge 105+, Firefox 121+, Safari 15.4+
Minimalist article grid where the mouse pointer is replaced by a circular 'Read' badge that changes color based on the hovered item.

Dynamic Article Hover Cursor

demo & code

The mouse cursor is the primary bridge between user and interface, yet it often remains a passive arrow. This component reimagines the cursor as an active participant in the narrative. By morphing the pointer into a contextual “Read” badge that reacts to specific content, we reduce cognitive load and create a more intent-driven browsing experience. It feels less like clicking links and more like exploring a curated magazine.

Level: Intermediate
Browser Support [As of Feb 2026]: Chrome 105+, Edge 105+, Firefox 121+, Safari 15.4+
Interactive gold star rating UI with 5 stars where the selection is handled purely by the CSS :has selector, showing a smooth scale effect on the active star.

Modern CSS Star Rating Component

demo & code

This Modern CSS Star Rating Component represents a major shift in UI development, moving complex logic from JavaScript to pure CSS. It utilizes the powerful :has() selector to track sibling states, allowing the UI to highlight stars both before and after the interaction point. The stars themselves are created using clip-path instead of bulky SVG icons, resulting in a lightweight, scalable, and highly performant rating system.

Level: Intermediate
Browser Support [As of Feb 2026]: Chrome 105+, Edge 105+, Firefox 121+, Safari 15.4+
A collection of skeuomorphic toggle switches with wooden handles, detailed shadows, and varied designs (sliding, rocking, and pill-shaped) in 'ON' and 'OFF' states.

Skeuomorphic Wood Texture Toggles

demo & code

This collection of Skeuomorphic Wood Texture Toggles brings a tactile, nostalgic feel to digital interfaces. It showcases four distinct variations of toggle switches (sliding, dotted handle, separated track, and embedded text), all unified by a realistic wood grain texture and intricate lighting effects. The implementation demonstrates the power of modern CSS features like :has() to control complex state changes without a single line of JavaScript.

Level: Intermediate
Browser Support [As of Feb 2026]: Chrome 105+, Edge 105+, Firefox 121+, Safari 15.4+
Minimalist dark navigation bar with a glassmorphism sliding background highlight that follows the mouse using CSS Anchor Positioning.

CSS Anchor Positioning Navigation Effect

demo & code

This CSS Anchor Positioning Navigation Effect is a masterclass in modern web standards, achieving a complex “sliding highlight” interaction entirely without JavaScript. By leveraging the new Anchor Positioning API alongside the :has() selector, the component allows a single background element to tether itself to whichever menu item is currently hovered, creating a premium, app-like feel with minimal code overhead.

Level: Advanced
Browser Support [As of Jan 2026]: Chrome 125+, Edge 125+
Minimalist toggle switch morphing from a sun icon to a moon icon using pure CSS transitions and the :has selector

Pure CSS Morphing Dark Mode Toggle

demo & code

This Pure CSS Morphing Dark Mode Toggle is a sophisticated implementation of a theme switcher that eliminates the need for JavaScript. By utilizing the modern CSS :has() relational selector and complex transform logic, the component morphs a sun icon into a moon icon seamlessly. It offers a premium feel through the use of custom cubic-bezier timing and modular CSS construction.

Level: Intermediate
Browser Support [As of Jan 2026]: Chrome 105+, Edge 105+, Safari 15.4+, Firefox 121+
Dark purple button with a sparkle icon and 'Generate Site' text; on hover, small white stars float around it

Sparkle Generate Button

demo & code

This Sparkle Generate Button adds a touch of delight to AI or creative tools. When hovered, the button doesn’t just change color - it emits a cloud of floating “sparkles” (particles) that drift and rotate. The effect is powered by CSS variables for performance, with a lightweight JavaScript snippet to randomize the particle paths, ensuring the animation feels organic and magical every time.

Level: Intermediate
Browser Support [As of Jan 2026]: Chrome 60+, Edge 79+, Firefox 55+, Safari 11+
An adaptive CSS grid that smoothly reorganizes its layout as items are added or removed.

Always Great Grid

An interactive, “living” grid that smoothly morphs and adapts layout upon adding/removing items or resizing the container, maintaining a harmonious bento-style structure.

See the Pen Always Great Grid.

A 3D scene with a soda can and rocks that creates a depth effect on hover using only CSS.

CSS-Only 3D Animation

Upon hovering over the soda can, it “comes alive” (changing angle/label), while the foreground rocks slide apart, creating a dynamic 3D depth effect entirely via CSS.

See the Pen CSS-Only 3D Animation.

A bold, neobrutalist-style email input field that animates on focus and validation.

Neobrutalist Subscribe Form

A bold, responsive input field that pops out upon activation; valid email entry triggers a bright green arrow button sliding in, which playfully animates on hover.

See the Pen Neobrutalist Subscribe Form.

An elegant search bar with a floating label that animates on focus and expands the search button.

Search Input

An elegant search bar that “levitates” upon focus, with a search button that dynamically expands to reveal text only when there is a query to submit.

See the Pen Search Input.

A minimalist dimmer slider that cycles through brightness levels with each click.

Smart Home Lighting Multi-State Switch

A minimalist dimmer slider that increases brightness (white bar width) with each click and resets to off after reaching the maximum level.

An expanding image gallery where hovering over an item causes it to widen and reveal more content.

Animated Grid Tracks with :has()

A pure CSS expanding gallery powered by the modern :has() selector. Hovering triggers a grid-template-columns transition, widening the active item while revealing content via opacity and transform animations, all styled with blend modes for a tinted monochrome aesthetic.

See the Pen Animated Grid Tracks with :has().

A fully functional Connect 4 game board implemented entirely in CSS.

Can :has() Connect 4?

A fully functional Connect 4 game implemented entirely in CSS, utilizing the :has() selector to manage complex game state, enforce turn-taking via CSS counters, and detect win conditions (vertical, horizontal, diagonal).

See the Pen Can :has() Connect 4?.

An isometric text cube created with pure CSS, showing text on its different faces and rotating in 3D space.

CSS Cube

A pure CSS isometric text cube constructed via 3D transforms and trigonometry-based SCSS calculations. It features dynamic styling controlled by :has() and CSS variables, allowing for runtime theme switching (tritone/monotone/dim) and dark mode adaptation without JavaScript logic.

See the Pen CSS Cube.

Tailwind Fluid Grid

Tailwind Fluid Grid

An impressive, “living” gallery where the active image smoothly expands, pushing neighbors aside, while inactive elements elegantly dim and desaturate, focusing attention on the content.

See the Pen Tailwind Fluid Grid.

:has() Pseudo-Class Selector

:has() Pseudo-Class Selector

An elegant and intuitive menu that helps the user focus on the item of interest by visually dimming the others.

See the Pen :has() Pseudo-Class Selector.

Checkout Radios

Checkout Radios

A modern checkout form component utilizing the powerful CSS :has() selector to style parent containers based on the state of nested radio inputs.

See the Pen Checkout Radios.

Theme Toggle

Theme Toggle

A smooth and striking transition between light and dark themes, where the background fills with “blinds” from the center outwards (or vice versa, thanks to symmetric --i indices), while the button playfully rotates.

See the Pen Theme Toggle.

Glowing Dropdown

Glowing Dropdown

A futuristic custom select menu leveraging CSS Houdini to animate gradient coordinates and dimensions for a fluid, neon-glow effect.

See the Pen Glowing Dropdown.

Glowing Tabs

Glowing Tabs

A navigation menu leveraging CSS Houdini API to animate custom variables for smooth transitions. JavaScript calculates element geometry to drive a dynamic “glowing” background that slides between tabs, while CSS gradients and the :has() selector create a polished, depth-rich visual style.

See the Pen Glowing Tabs.

Full Viewport Gallery: Pure CSS

Full Viewport Gallery: Pure CSS

A pure CSS image gallery that leverages the advanced :has() pseudo-class and radio input hacks to orchestrate state changes without JavaScript. The layout utilizes CSS Grid variables to dynamically translate the viewport, creating a smooth, easing-based transition between full-screen images controlled entirely by sibling combinators and checked states.

See the Pen Full Viewport Gallery: Pure CSS.

Wall of Text: Blogged

Wall of Text: Blogged

A futuristic, interactive blog card featuring AI-generated content fetched dynamically via JavaScript. The layout utilizes advanced CSS techniques like :has() for expandable sections, masking and blend modes for rich graphical elements, and variable-driven cursor tracking animations, creating a dynamic and engaging reading experience.

See the Pen Wall of Text: Blogged.

CSS-Only Slider

CSS-Only Slider

A high-performance, interactive gallery featuring smooth sliding animations and functional navigation (pagination and arrows), achieved entirely with pure CSS, eliminating the need for script dependencies.

See the Pen CSS-Only Slider.

LapisCordis: A Greco-Roman Mythological Card Game

LapisCordis: A Greco-Roman Mythological Card Game

A high-quality, atmospheric Trading Card Game (TCG) interface featuring smooth animations, a tangible sense of depth, and “magical” visual effects upon interaction.

Star Rating with CSS :has()

Star Rating with CSS :has()

A fully functional rating widget that responds to hover and click events, illuminating the appropriate number of stars and updating the digit on the right, creating a dynamic interface feel without a single line of JS.

See the Pen Star Rating with CSS :has().

Tri-State Theme Toggle with light-dark()

Tri-State Theme Toggle with light-dark()

A practical example of the new light-dark() CSS function combined with native Web Components to create a flexible theme switcher. The entire system is controlled via data-attributes and includes an additional high-contrast mode for better accessibility.

CSS List Filtering with :has()

CSS List Filtering with :has()

A comprehensive demonstration of CSS :has() selector and Container Queries capabilities. :has() is used to toggle between light/dark themes and to dynamically filter cards by category without using JavaScript.

See the Pen CSS List Filtering with :has().

CSS Style Switcher with :has()

CSS Style Switcher with :has()

An example of powerful reactivity with :has() - theme switching not only changes colors but also radically reworks the layout, adds stylized shadows, and even changes fonts and background SVG patterns.

See the Pen CSS Style Switcher with :has().

Filter Items in Subgrid with :has()

Filter Items in Subgrid with :has()

A multi-faceted demonstration that implements dynamic card filtering in pure CSS using the :has() selector and radio buttons. CSS Subgrid is used for perfect vertical alignment, and :has() is also leveraged for contextual styling - cards with a special element automatically change their appearance without JS.

Mac Dock Magnify Effect with :has

Mac Dock Magnify Effect with :has

A Dock menu where the scaling effect on hover is implemented entirely in CSS using :hover and :has() selectors - this allows scaling not only the active element but also its neighbors.

Button-Like Checkboxes and Radios with Accessibility

Button-Like Checkboxes and Radios with Accessibility

Fully semantic form elements given a modern “button-like” design with an emphasis on accessibility and clean code. It demonstrates flexible style management via CSS Variables and automatic adaptation for users with dark theme preferences.

AutoSort ToDo List (CSS Only)

AutoSort ToDo List (CSS Only)

A ToDo list with a unique feature: automatic sorting of completed tasks to the end of the list, implemented without JavaScript, using the Flexbox order property and the powerful CSS :has() selector.

See the Pen AutoSort ToDo List (CSS Only).

Breadcrumb Separators with :has()

Breadcrumb Separators with :has()

This component showcases a modern and efficient way to style breadcrumb separators using the powerful CSS :has() selector, allowing precise placement of ::after elements only between active links, thus eliminating the need for JavaScript.

Color Scheme Switcher with :has()

Color Scheme Switcher with :has()

A color scheme switcher demonstrating the power of modern CSS: dynamic theme change (Dark, Light, High-contrast) occurs instantly and exclusively via the native :has() selector, without a single line of JavaScript.

Layout Switcher with :has()

Layout Switcher with :has()

Discover a pure CSS solution for dynamic layout switching between List and Grid views. It leverages the powerful CSS :has() selector to conditionally apply grid-template-columns based on the state of a radio input, all without a single line of JavaScript.

See the Pen Layout Switcher with :has().

Light/Dark Theme Switch with CSS Color-Scheme

Light/Dark Theme Switch with CSS Color-Scheme

A magnificent theme switch featuring a day-night effect, leveraging advanced CSS capabilities like color-scheme: light-dark and &:has(input:checked) to automatically invert background colors and gradients.

Reflection with Progressive Blur in CSS

Reflection with Progressive Blur in CSS

Progressive Blur for the lower screen half is implemented to simulate fog: the effect is created by layering multiple elements with varying backdrop-filter: blur() values, precisely masked using mask: linear-gradient().

Pure CSS Slideshow

Pure CSS Slideshow

A unique CSS-only image slider that uses advanced CSS properties like @property and :has() to control image transitions and UI elements. The background-position and nested radio buttons simulate a complex, fragmented image reveal effect without any JavaScript.

See the Pen Pure CSS Slideshow.

CSS Staircase Hover Effect Using :has()

CSS Staircase Hover Effect Using :has()

This “staircase” hover effect is a prime example of the power of the new CSS :has() selector. It enables elements to react to the state of their siblings, creating a complex and elegant animation without JavaScript.