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: Chrome 105+, Edge 105+, Firefox 121+, Safari 15.4+
Card component showing a city skyline; on hover, two dark panels slide in from the left covering the image, followed by neon text appearing letter by letter.

Split Staggered Reveal Cards

demo & code

This Split Staggered Reveal Card creates a dramatic, cinematic effect suitable for portfolios or featured content sections. Upon interaction, the background image recedes while two semi-transparent overlays slide in to create a high-contrast backdrop. Simultaneously, the title and description animate in with a precise staggered delay - letters for the title and words for the paragraph - powered by CSS variables.

Level: Intermediate
Browser Support: Chrome 88+, Edge 88+, Firefox 87+, Safari 14+
Close-up of text with a link showing a light blue highlighter background that collapses into an underline with a small arrow on hover.

Stylish Highlighter Link Hover Animation

demo & code

This Highlighter Link Hover Effect provides a sophisticated micro-interaction for inline text links, moving beyond the standard static underline. By default, the link is covered by a soft, semi-transparent background fill; upon hovering, this “highlighter” block collapses into a thin underline while a directional arrow slides in from the right.

Level: Beginner
Browser Support: Chrome 36+, Edge 12+, Firefox 16+, Safari 9+
Minimalist black text on white background showing a nested folder structure drawn with ASCII pipe characters

Pure CSS ASCII File Tree

demo & code

This Pure CSS ASCII File Tree brings the nostalgia of command-line directory structures to the web without typing a single pipe character manually. By cleverly utilizing CSS pseudo-elements (::before), it automatically draws the connecting lines (, , ) for nested lists. It’s perfect for technical documentation, sitemaps, or retro-themed interfaces.

Level: Beginner
Browser Support: Chrome 4+, Edge 12+, Firefox 3.5+, Safari 3.1+
A simple illustration of a bicycle created entirely with pure CSS.

Bicycle

A pure CSS bicycle illustration constructed from geometric primitives using absolute positioning and vmin units for responsiveness. conic-gradient simulates wheel spokes, transform: skewX shapes the frame, and inset box-shadow adds depth, while pseudo-elements efficiently duplicate components like wheels.

See the Pen Bicycle.

A pure CSS illustration of the cartoon character Dipper Pines from Gravity Falls.

Dipper Pines from Gravity Falls

A pure CSS character illustration of Dipper Pines, constructed from geometric primitives using absolute positioning and vmin units for responsiveness. The design leverages border-radius, transform, clip-path masking, and pseudo-elements to shape detailed features like the signature pine tree hat and hair, all styled with CSS variables and a custom web font.

See the Pen Dipper Pines from Gravity Falls.

A cute cartoon illustration of a giraffe created entirely with pure CSS.

Giraffe

A pure CSS cartoon illustration of a giraffe constructed from geometric primitives using absolute positioning. It leverages box-shadow for efficient pattern repetition (spots, clouds), clip-path for complex shapes like the mane, and CSS variables for a consistent pastel color palette.

See the Pen Giraffe.

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 modern nested list with custom graphic icons and smooth hover effects.

Nested List Style

An elegant, modern list of track properties featuring custom graphic icons and smooth micro-interactions like padding shifts and color changes on hover.

See the Pen Nested List Style.

A file tree diagram created with pure CSS, showing nested lists with connecting lines.

OST Tree

A pure CSS tree diagram constructed from nested lists where pseudo-elements with borders form the connecting branches.

See the Pen OST Tree.

A collection of skeuomorphic buttons with soft, 3D-like styling created with pure CSS gradients.

Soft Button Styling

A collection of skeuomorphic buttons rendered entirely in CSS using complex gradient layering and calc()-driven geometry variables.

See the Pen Soft Button Styling.

An animated button that morphs from a rectangle with text into a circle with a bouncing up arrow.

Up Arrow

A rectangular button smoothly shrinks into a circle, the text fades out, and an upward-pointing arrow begins to cyclically rise within it.

See the Pen Up Arrow.

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.

Pure CSS Entity Visualizer

Pure CSS Entity Visualizer

An automated text annotation interface powered by Sass loops that visualizes semantic entity types using pseudo-elements and data attributes.

See the Pen Pure CSS Entity Visualizer.

Kinetic CSS Loader

Kinetic CSS Loader

A smooth, rhythmic, and mesmerizing loader that looks complex but is implemented simply and efficiently.

See the Pen Kinetic CSS Loader.

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).

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.

CSS Rage Button

CSS Rage Button

A playful button that shakes, reddens, and “curses” with increasing intensity upon each click (or hover for the secondary button), visualizing a gradual loss of composure.

See the Pen CSS Rage Button.

Product Plan Cards with CSS Ribbons

Product Plan Cards with CSS Ribbons

A pure CSS pricing component that creates a dimensional ‘ribbon’ aesthetic solely through ::after pseudo-elements and clip-path geometry. The layout leverages CSS Custom Properties for distinct color themes and calc with negative margins to extend elements beyond the parent container, creating a folded paper effect without any JavaScript dependencies.

Pure CSS Liquid Wave Illusion

Pure CSS Liquid Wave Illusion

This demo creates a captivating liquid wave illusion using a single ::before pseudo-element inside multiple overflow: hidden containers. The fluid motion is the result of two simultaneous @keyframes animations - one controlling top and the other transform: rotateZ.

See the Pen Pure CSS Liquid Wave Illusion.

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.

Checkbox Hamburger Menu Animation

Checkbox Hamburger Menu Animation

A demonstration of step-by-step CSS transformation to create a cross effect: on :checked, the middle bar either gets opacity: 0 or scales down, while the top and bottom bars simultaneously rotate and translate.

CSS Cat Illustration with Tracking Eyes

CSS Cat Illustration with Tracking Eyes

An illustration of a cat created entirely in CSS, featuring interactive eyes that follow the cursor. JavaScript uses Math.atan2 to calculate the gaze angle, while all of the cat’s details - from the body to the whiskers - are implemented using pseudo-elements, box-shadow, and gradients.

Dark Mode Toggle Switch

Dark Mode Toggle Switch

A toggle switch implemented using a single <input type="checkbox"> and pseudo-elements. The “button” effect and its movement are achieved through complex, multi-layered box-shadow and the shifting of the ::before element.

See the Pen Dark Mode Toggle Switch.

Neon Icon Hover Effect

Neon Icon Hover Effect

A navigation menu with a neon glow and a complex hover effect. Icons and text use the CSS drop-shadow filter to create a glow effect, while the element’s color is controlled via an inline CSS variable --clr.

See the Pen Neon Icon Hover Effect.

Page Indicator Animation

Page Indicator Animation

A full vertical slider with scroll-snap points. The navigation indicator is dynamically animated using the Intersection Observer API, which tracks when a slide enters the viewport.

See the Pen Page Indicator Animation.

Change Bass Color with Hue

Change Bass Color with Hue

A simple example of media control - a click event in vanilla JS is used both to control the HTML5 Audio API and to dynamically change the hue-rotate CSS filter.

See the Pen Change Bass Color with Hue.

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.

Ticket

Ticket

A ticket layout where data (date, code) is generated on the fly with vanilla JS and inserted into the HTML - styling is done using CSS Grid, drop-shadow, and reusable SVG symbols via the <use> tag.

See the Pen Ticket.

BMO CSS Illustration with nth-child

BMO CSS Illustration with nth-child

An example of creating CSS art using pseudo-elements and nth-of-type, enhanced with a JS easter egg - a mouseover spam detector to call the Vibration API.

CSS Hamburger Click Effect

CSS Hamburger Click Effect

Explore the technique of creating a three-line hamburger using a single <span> tag and two pseudo-elements, - which are then animated into an ‘X’ via a combination of CSS properties rotate(45deg) and translate.

See the Pen CSS Hamburger Click Effect.

FAQ Accordion with Font Awesome Icons

FAQ Accordion with Font Awesome Icons

The “Accordion/FAQ” functionality is implemented using pure JavaScript, which handles the click on the parent element and toggles the active class on the FAQ container. The visual highlight is the icon change via CSS display: none/block properties.

Gender Toggle Button with Bounce Effect

Gender Toggle Button with Bounce Effect

This interactive toggle switch demonstrates advanced animation work, where delayed class toggling in jQuery coordinates the knob movement and a stylish “color fill” text effect, created in CSS using overflow: hidden; and pseudo-elements.

Neumorphic Multi-Buttons with CSS Feedback

Neumorphic Multi-Buttons with CSS Feedback

An effective button group where the hover effect is created via inset box-shadow - and the click confirmation animation is implemented using transform and opacity on the ::after pseudo-element.

Simple YouTube API Search App

Simple YouTube API Search App

A simple search client for the YouTube API written in vanilla JS - data is fetched using fetch, and the results list is generated on the fly and injected into the DOM via innerHTML.

See the Pen Simple YouTube API Search App.

Vue Add to Cart Animation

Vue Add to Cart Animation

This Vue.js component showcases a clean implementation of the “Add to Cart” micro-interaction using reactive data and CSS animation. The main technical feature is the dynamic counter display via a CSS ::before pseudo-element and the count attribute, alongside the “Pop” effect upon update.

See the Pen Vue Add to Cart Animation.

Animated UI Radio Button with CSS Keyframes

Animated UI Radio Button with CSS Keyframes

This custom radio button UI employs pure CSS @keyframes and transform properties to create a dynamic, liquid-like squash-and-stretch animation upon selection - the smooth UI transition is managed by complex jQuery state logic that precisely adds and removes animation classes.

Art Deco Card

Art Deco Card

An elegant Art Deco style card created purely with CSS/SCSS, utilizing a sophisticated technique with pseudo-elements to construct complex, multi-layered geometric borders and corners.

See the Pen Art Deco Card.

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.

Card with Glitch Effect

Card with Glitch Effectexternal link

This Cyberpunk-inspired card features a complex box-shadow offset and text-shadow for the core CRT aesthetic, paired with a dynamic :hover state that uses transform to instantly swap the terminal view for a social icon grid.

Buttonexternal link

The main button has a semi-transparent background, the ::before pseudo-element contains the animated gradient, and ::after has a solid dark background that “cuts out” the inner part, leaving only the border visible.

Fancy Title with CSS Responsive Frame

Fancy Title with CSS Responsive Frame

Creating a complex decorative title where breaks in the border are elegantly implemented using CSS Grid and pseudo-elements. Padding sizes adapt dynamically thanks to a CSS variable calculated by a mixin.

Virtual Credit Card UIexternal link

A demonstration of “living” cards with two looped @keyframes animations - one for smooth background panning, and another for creating a shimmering gradient highlight.

Rainbow Shadow Button

Rainbow Shadow Button

Featuring a modern aesthetic, this button generates a soft aura using a blurred and offset pseudo-element whose color dynamics are precisely controlled by the oklch function and longer hue interpolation within the linear-gradient.

See the Pen Rainbow Shadow Button.

Inverted Border Boxes

Inverted Border Boxes

A demonstration of a non-trivial technique for creating inverted rounded corners using ::before pseudo-elements and box-shadow. This trick allows you to “carve out” complex shapes from parent blocks, bypassing the limitations of standard border-radius.

See the Pen Inverted Border Boxes.

Arrow Icon Animation

Arrow Icon Animation

A technically advanced use of ::before and ::after pseudo-elements to create an arrow. jQuery toggles the .right class, and CSS animates the left and transform: rotate() properties of the pseudo-elements, creating a “switch” or 3D flip effect.

See the Pen Arrow Icon Animation.

Bootstrap 5 Breadcrumb Example

Bootstrap 5 Breadcrumb Example

A chevron-style Bootstrap customization where SCSS darken creates a gradient depth. The geometry relies on ::after border hacks, with :nth-child controlling color progression and z-index stacking.

See the Pen Bootstrap 5 Breadcrumb Example.

Eye-Catching Bootstrap 5 Button

Eye-Catching Bootstrap 5 Button

A vibrant CTA button featuring a neon linear gradient and a continuous ‘shine’ animation implemented via a moving radial gradient on the ::before pseudo-element. On hover, it scales up and intensifies its colored drop-shadow for enhanced interactivity.

See the Pen Eye-Catching Bootstrap 5 Button.

Simple Subscribe Form

Simple Subscribe Form

This demo’s lively backdrop is created by injecting animated creatures into the form’s ::before and ::after pseudo-elements using Base64 data:image URLs. This visual flair is complemented by polished, pure CSS micro-interactions - the email input elegantly expands its width on :focus, while the submit button provides a tactile 3D press effect by manipulating box-shadow and transform: translateY().

See the Pen Simple Subscribe Form.

Pure CSS Star Rating from 0 to 8 with Colored Points of the Star

Pure CSS Star Rating from 0 to 8 with Colored Points of the Star

This star rating component is a showcase of static state management using a modular, class-based system. The rating is set by applying classes like .one and .half to the main container, which then declaratively styles the individual points of the star without any JavaScript or form inputs.