dom-cutout

Cut the silhouette of one DOM element out of another — because a background-colored border is a promise your gradient will break.

MJ
createCutout(avatar, star, { gap: 4 })

Installation

npm install dom-cutout

Usage

Vanilla DOM createCutout() with elements you own — attach, live options, teardown. No framework. React Step-by-step usage of <Cutout> and the headless useCutout hook — every demo above, as copy-paste code