shatter-morph
MIT
3D shatter effect
- Works on every HTML tag
- Vue, React and plain HTML
- Six motion styles
One function breaks a card, image, table or form into real pieces, swirls them through space and rebuilds them as something else. Works with plain HTML, Vue and React.
npm install shatter-morph
3D shatter effect
Each box below is a real element. Press Shatter to change its content.
Scroll position drives the effect. Scroll back and every shard returns to its place.
<article><figure><table>Give it your elements. Scrolling does the rest.
shatterScroll('.step')
| Option | Example |
|---|---|
start |
'top 80%' |
end |
'+=1200' |
scrub |
0.25 |
hold |
0.2 |
A small core with first-class adapters for your stack.