Drag points to build a clip-path polygon and copy the CSS. Presets cover triangles through octagons plus a star, a chevron and a speech bubble, and every preset is generated from actual geometry rather than typed out, so a hexagon is genuinely regular. Coordinates are percentages of the element's own box, which is what keeps the shape intact when the element is resized — a pixel-based polygon that looks right on a desktop card gets cut in half on a phone. One thing worth knowing before you ship it: clip-path hides part of the element's rendering but does not change its layout box, so the clipped-away area still takes up space and still catches clicks unless you handle that separately.
| Function | What it does |
|---|---|
| polygon() | Straight-edged shape from a point list — this tool |
| circle() | A circle with a radius and centre |
| ellipse() | Two radii and a centre |
| inset() | A rectangle inset from each edge, with optional rounding |
| path() | Full SVG path syntax, curves included |
So the shape scales with the element. A polygon in pixels is calculated against a fixed size, so the same clip that looks right on a wide desktop card slices through the middle of the element on a phone. Percentages are relative to the element's own box and survive any resize.
No, and this surprises people. It affects only what is painted — the element still occupies its full rectangle in the layout, and the invisible clipped-away parts still receive pointer events. If a clipped element is intercepting clicks it should not, that is why.
Because two points define a line, not an area. An element clipped to a degenerate path vanishes completely, which looks like a broken page rather than something you did, so the minimum is enforced.
Yes, but only smoothly between polygons with the same number of points — the browser interpolates point by point. Animating between a triangle and a hexagon jumps rather than morphs. A common trick is to give both shapes the same point count, with some points doubled up.
polygon() is straight lines only. For curves, clip-path also accepts circle(), ellipse() and a path() with Bézier commands — path() gives full curve control but is far less readable and less widely supported than polygon.
No. Everything is computed in your browser.
Points are stored and emitted as percentages of the element's own box rather than pixels, which is what makes a clipped shape survive being resized — a pixel-based polygon that looks right on a desktop card is cut in half on a phone. The preset polygons are generated trigonometrically rather than typed out, so a hexagon is genuinely regular instead of approximately so: vertices are placed at even angular intervals with the first rotated to sit at the top, which is how people expect a polygon to be oriented. The star alternates between the outer radius and an inner one at a fixed ratio, which is the only parameter that separates a star from a spiky blob. Dragging updates a single point by index rather than rebuilding the list, so the polygon's winding order is preserved — reordering points silently changes which region is inside the shape and produces a self-intersecting mess. Three points is enforced as the minimum because fewer cannot enclose an area at all, and an element clipped to a degenerate path disappears completely, which looks like a broken page rather than a user error. Worth knowing when using this: clip-path cuts the element's rendering but not its layout box, so the clipped-away area still occupies space and still receives pointer events unless you account for it.