How to use the clip-path generator
- Choose a shape type: polygon, circle, ellipse or inset.
- For polygons, drag the points on the image, or select one and use the arrow keys (Shift moves 10%). Add point after selected inserts a point halfway to the next one; you can remove points down to three.
- For circles and ellipses, set the radius and drag the center.
- For inset, set how far each side moves in and round the corners.
- Preview on a photo or a gradient, then copy the code.
Ideas
- Hexagon or octagon avatars for team pages.
- Slanted section edges using Slant bottom on full-width banners.
- Arrow and chevron shapes for step indicators.
- Reveal animations: transition from a small circle to a full one on hover.
- Ticket and tag shapes for pricing and labels.
Browser support
clip-path with basic shapes works in all current browsers. The export also includes -webkit-clip-path for older Safari versions. Clipped elements keep their full box for layout, so leave enough spacing around them.
How it works
clip-path draws a shape over the element and hides everything outside it. The polygon() function takes a list of points, each written as x and y percentages of the element’s width and height, so the shape scales with the element. circle(), ellipse() and inset() describe simpler shapes with a radius or edge offsets. The generator keeps your points in order as you drag, add or remove them, and writes the matching polygon() value.
Worked examples
Example 1: hexagon team photos
Load Hexagon and switch the fill to Photo to preview it on an image. Apply the exported CSS to each square team photo. Because the points are percentages, the shape scales with any photo size. Add a little extra spacing between items, because clipped elements keep their full rectangular box.
Example 2: a slanted hero section
Load Slant bottom and apply it to a full-width hero banner. The bottom edge drops from 100% on the left to 80% on the right, giving the page a dynamic edge. Increase the slant by dragging the bottom-right point up, or use the arrow keys for precise control.
Example 3: a hover reveal
Use a Circle small (35% radius) as the resting state and Circle (50%) as the hover state, with transition: clip-path 0.4s. Both use the circle function, so the browser animates smoothly between them. Keep the motion short, and add a reduced-motion rule if the effect is large.
Common mistakes
- Mismatched point counts: polygons only animate when both have the same number of points.
- Clipping focus rings: clipped elements also clip their outlines, so add a focus style on a parent.
- Hiding essential content: clipped areas are still in the layout but invisible.