The clip-path property in CSS lets you define complex shapes and creative masks for elements - going far beyond simple rectangles. In this collection, you’ll find inspiring clip-path examples that show how to craft custom shapes, dynamic transitions, artistic layouts, and interactive hover effects, all with pure HTML and CSS. From polygons and circles to intricate SVG paths, clip-path opens up a world of creative design possibilities without relying on heavy graphics.
101 CSS clip-path Examples
Kinetic clip-path Text Rotator
demo & codeStatic text is a relic of print media. In the digital realm, typography should possess momentum and weight. This component transforms a standard headline into a kinetic event. By synchronizing rotation with advanced clipping masks, we create the illusion of text being physically “printed” or “wiped” into existence at high velocity. It is visceral, rhythmic, and designed to command attention without screaming.
Clip-Path Shapes Explorer
demo & codeThis Clip-Path Shapes Explorer serves as both a learning tool and a generator for CSS polygons. It allows users to cycle through a library of pre-defined shapes (triangles, hexagons, stars, etc.) and instantly see the result rendered in the browser. The tool also provides the exact CSS code needed to recreate the shape, complete with syntax highlighting.
Magnifying Glass Navigation
demo & codeNavigation should not be a static list; it should be a spotlight on user intent. This component reimagines the humble tab bar as a physical instrument. By simulating a magnifying glass that glides over options, we create a tactile sense of selection. It transforms the active state from a mere color change into a focused, immersive event.
Elastic Animated Star Rating
demo & codeThis Elastic Animated Star Rating component turns a mundane feedback form into a delightful micro-interaction. Instead of simple color changes, the stars spring to life with a satisfying “elastic” pop when clicked. The animation logic handles both filling (bouncing in) and emptying (shrinking away) states, making the interaction feel physically responsive and engaging.
Modern CSS Star Rating Component
demo & codeThis 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.
Rounded Triangle CSS Image Mask
demo & codeThis 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.
Staggered Panel Curtain Menu
demo & codeThe Staggered Panel Curtain Menu is a creative full-screen navigation concept that breaks the traditional “fade-in” mold. It uses a series of vertical panels that drop down at slightly different intervals, creating a sophisticated “curtain” reveal. This effect is achieved by combining the precision of GSAP with the flexibility of CSS clip-path and variable fonts, making it an ideal choice for high-end creative portfolios or modern agency websites.
Cursor-Tracking Spotlight Reveal Effect
demo & codeThis Cursor-Tracking Spotlight Reveal Effect creates a sophisticated “x-ray” or “flashlight” interaction. Initially, the user sees plain text. As the mouse moves, a circular mask follows the cursor, revealing a hidden image underneath and simultaneously inverting the text color to white within the circle. This technique adds depth and playfulness to portfolio links or gallery items without disrupting the layout.
3D Landscape
A scenic forest landscape with a house that smoothly tilts and rotates following the mouse movement, revealing the scene’s depth through a parallax effect.
See the Pen 3D Landscape.
CSS Messi
A highly detailed, scalable vector-style portrait of an athlete created entirely with CSS clip-path polygons, layering shapes, shadows, and highlights without any image files or SVG tags.
See the Pen CSS Messi.
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.
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.
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.
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.
Squircle Image Web Component
Images take on an aesthetic, modern squircle shape (resembling iOS icons) with a soft drop shadow that perfectly follows their contour.
See the Pen Squircle Image Web Component.
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.
Animated Navigation
A spotlight navigation menu where the active state is highlighted by a moving “light beam” element.
See the Pen Animated Navigation.
Simple SVG Clip-Path Reveal
A rhythmic animation where an image is revealed through a burger-shaped SVG clip mask, with layers scaling in sequence via GSAP.
See the Pen Simple SVG Clip-Path Reveal.
Image Hover Effect
A unique, visually impressive effect where the user moves a “liquid,” morphing lens to compare two scenes, demonstrating advanced use of SVG and DOM manipulation for visual UX.
See the Pen Image Hover Effect.
Invisible Gallery
An emotionally charged and technically complex component that uses kinetic animations simulating digital glitches or geometric transformations to dramatically reveal hidden content.
See the Pen Invisible Gallery.
Responsive CSS Grid: Books
A unique, dynamic, and responsive collage of images that uses advanced CSS techniques to create a 3D-like geometric pattern.
See the Pen Responsive CSS Grid: Books.
Invert Radius Shape with Cool Hover Effect
A sophisticated hover effect utilizing CSS Houdini to animate a complex image mask.
See the Pen Invert Radius Shape with Cool Hover Effect.
Range Slider
A highly stylized range slider utilizing box-shadow on the slider thumb to render the track, masked by a clip-path polygon on the parent container to create a unique slanted aesthetic.
See the Pen Range Slider.
Amateur Radio Badge 3D
A highly sophisticated holographic badge simulation utilizing CSS 3D transforms and layered mix-blend-mode effects. JavaScript tracks mouse movement to dynamically update CSS variables, driving complex parallax shifts, lighting gradients, and SVG-masked glares for a realistic, tactile depth experience.
See the Pen Amateur Radio Badge 3D.
Full Screen Slider
A cinematic landing page powered by GSAP ScrollSmoother and Observer plugins. It features a complex preloader sequence transitioning into a full-screen slider where images are revealed via intricate clip-path polygon animations triggered by scroll gestures.
See the Pen Full Screen Slider.
High Five Button
A delightful “High Five” interaction button powered by GSAP and MorphSVGPlugin.
See the Pen High Five Button.
Rating Stars
A sophisticated star rating component featuring fractional fills implemented via CSS clip-path. The JavaScript class generates SVG stars and orchestrates a staggered entrance animation, while SCSS keyframes drive complex scale, rotate, and shockwave effects for a tactile, gamified feel.
See the Pen Rating Stars.
IKEA Room Gallery Redesign
A sophisticated React/Redux e-commerce SPA featuring seamless page transitions powered by GSAP. It utilizes clip-path animations for cinematic reveals and the Draggable plugin for interactive product grids, creating a fluid, app-like shopping experience.
See the Pen IKEA Room Gallery Redesign.
Kill the Ketchup
A powerful visual effect of a red liquid “flood” filling the screen, suitable for loading screens, game level transitions, or creative overlays.
See the Pen Kill the Ketchup.
Slider #2
An immersive, cinematic slider that feels like a high-budget interactive installation, thanks to its complex animations, custom cursor, and comprehensive input support.
See the Pen Slider #2.
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().
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.
See the Pen Product Plan Cards with CSS Ribbons.
Animated Portfolio with SVG ClipPath Hover Effect
This interactive portfolio showcases a masonry-style layout built with two overlapping CSS Grids, where grid-row: span and grid-column: span create the complex pattern. The key interaction is a unique “spotlight” reveal effect on hover, powered by a JavaScript-controlled SVG <clipPath> that dynamically updates the position of a <circle> mask to follow the mouse.
See the Pen Animated Portfolio with SVG ClipPath Hover Effect.
Pac-Man Password Reveal with GSAP
This component provides a delightful user experience by replacing the standard “show/hide” password icon with animated Pac-Man characters. The entire interaction is driven by two GSAP timelines, which not only move the characters but also change the input’s background and letter spacing, creating a fully immersive and playful UI.
See the Pen Pac-Man Password Reveal with GSAP.
Animated Slider with Morphing Effects
This cinematic slider interface leverages GSAP timelines and sophisticated clip-path polygon transformations to orchestrate fluid transitions between full-screen slides and an overlay navigation system.
See the Pen Animated Slider with Morphing Effects.
100-Year Clock Wheel
This demo showcases a multi-ring clock with rotating elements where each date/time value is generated and positioned using trigonometry. A key feature is the dynamic localization of month and day names using the Intl.DateTimeFormat API and language selection via the native <dialog> element.
See the Pen 100-Year Clock Wheel.
Interactive Spotlight Effect
An interactive “spotlight” effect created with clip-path: circle(), whose position is controlled via CSS variables. JavaScript tracks the cursor and updates the variables inside a requestAnimationFrame loop for a smooth and performant animation.
See the Pen Interactive Spotlight Effect.
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.
Slider with Animated Icons
Smooth visual representation of the slider track fill using the CSS clip-path property and the --slider-percentage variable. The tooltip showing the current value is animated with GSAP, including a slight rotation to simulate “wobbling” during drag.
See the Pen Slider with Animated Icons.
Range Slider with Value and Ruler
An unconventional use of datalist to create a custom ruler scale under the slider, where tick marks are styled using box-shadow and linear-gradient, and their visibility is controlled by CSS variables within media queries.
See the Pen Range Slider with Value and Ruler.
Pagination with Morphing Numbers
This interactive pagination features a fluid numerical transition achieved solely through CSS clip-path animations, where JavaScript toggles the body class to trigger the complex morphing sequence on the SVG elements.
See the Pen Pagination with Morphing Numbers.
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.
See the Pen Lighthouse Single-Div CSS Illustration.
Pure CSS 3D Animated Cat Model
Complex yet high-performance 3D rendering in the browser: the model is built on CSS Box Model Hacking principles, where each polygon is positioned in space using translate and rotate for continuous 360-degree animation.
See the Pen Pure CSS 3D Animated Cat Model.
CSS Triangles with pow() and sqrt()
A demonstration of creating perfectly equilateral CSS triangles using the native pow() and sqrt() mathematical functions inside calc(). This showcases how to achieve geometric precision without preprocessors, relying solely on modern CSS.
See the Pen CSS Triangles with pow() and sqrt().
CSS Accordion with Custom Animated Arrows
A pure CSS accordion based on native <details>/<summary> elements, where the standard marker is hidden, and a custom animated chevron arrow is created and controlled exclusively via clip-path: polygon() and the rotate property upon expansion.
See the Pen CSS Accordion with Custom Animated Arrows.
Photo Gallery Grid Animation with CSS Clip-Path
A showcase of the creative application of clip-path to create an “unfolding” image effect on hover, where the interaction not only changes the shape but also uses z-index to elevate the element and overlap neighboring tiles.
See the Pen Photo Gallery Grid Animation with CSS Clip-Path.
Responsive Speech Bubbles using CSS Container Queries
A stylish, pure CSS solution for creating speech bubbles with custom tails using the :after pseudo-element and the advanced clip-path: polygon() property to give the content frame a unique, angled edge shape.
Dynamic Carousel Slider with Infinite Scroll
A full-screen, scroll-hijacked slider orchestrated by a single GSAP timeline, achieving a sophisticated transition effect by simultaneously animating clip-path on image layers and translating text elements.
See the Pen Dynamic Carousel Slider with Infinite Scroll.
Animated Apple Tear Strip with React and GSAP
This interactive animation, built with React and GSAP, lets the user “tear” a stylized seal. The complex effect is achieved by tracking cursor movement with Draggable.create() and then smoothly changing properties like clip-path and box-shadow to simulate the tear.
See the Pen Animated Apple Tear Strip with React and GSAP.
1980's Pop Magazine Pullquote
This demo showcases advanced CSS features like clip-path and shape-outside for creating non-rectangular layouts, while leveraging modern CSS units like clamp() and dvh for a fully responsive design across devices.
See the Pen 1980's Pop Magazine Pullquote.
CSS Glitch Image Effect
The key feature is the control of animation parameters via CSS variables, which allows for easy changes to the speed and intensity of the glitch. The animation itself is built on three layered elements, each with unique offsets, shadows, and clipping animations (@keyframes glitch-top/bottom).
See the Pen CSS Glitch Image Effect.
Cyberpunk Glitch Input
Here is an advanced example of an interactive UI element built entirely with CSS. The demo is technically notable for its approach to visualizing activity: it uses pseudo-elements and CSS variables to create glow effects, scanning lines, and a “data stream” that activates on input focus.
See the Pen Cyberpunk Glitch Input.