Clip-path

Also called CSS clip-path or clipping path

A CSS property that cuts an element to a shape, such as a circle, an inset rectangle, or a polygon, and hides everything outside it.

What is Clip-path?

clip-path draws an invisible outline and shows only the part of the element inside it. The basic shapes are circle(), ellipse(), inset() for a rectangle with optional rounded corners, and polygon() for any straight-edged shape. The element keeps its full size in the layout; only the visible part changes.

It is a favorite for reveal animations, because browsers animate clip-path smoothly: grow a circle() from 0% to reveal a photo, or shrink an inset() to wipe content in. Avatars, hexagon badges, angled hero sections, and diagonal image crops are common static uses.

Two shapes animate smoothly only when they use the same function, and polygons need the same number of points in both states. Everything outside the clip is cut off, including box shadows, and it stops receiving clicks. For a shadow, wrap the element and put filter: drop-shadow() on the wrapper.

Often confused with

Mask
A mask reads transparency from an image or gradient, so its edges can fade. Clip-path cuts a crisp geometric shape.
Overflow
Overflow hides content that spills outside an element’s box. Clip-path hides any part of the element itself, in any shape.
All terms

Mask

A CSS technique that uses an image or gradient to set how visible each part of an element is, often used to fade edges softly.

Reveal animation

An entrance where a moving edge uncovers an element, as if a curtain slides away, usually built with an animated clip-path.

Before/after slider

A comparison control that stacks two versions of an image and lets people drag a divider to reveal more of one or the other.

Morph

A transition where one shape smoothly changes its size, corners, and contents into another, like a small pill growing into a full card.