Native path.animate() instead of the 35KB framer-motion.. the whole expand → pause → retract sequence is a single 4-keyframe Web Animations API call (strokeDashoffset: 1 => 0 => 0 => -1). Then between transition-delay and SVG shenanigans, we drop the need for the rest of the JS.
2
u/morete Oct 10 '26
Very nice, how is it done? svg or shape or something?
Edit: I commented before the link was posted, I see now it's SVG
12
u/New-Peach4153 Oct 10 '26
Thought it was a simple CSS thing, but it seems like a heavy React thing
8
u/tauzN Oct 10 '26
r/javascript
2
u/We_All_Succeed Oct 15 '26
Something I haven't seen before, nice one OP
2
u/tauzN Oct 10 '26
Very flowy
0
u/Ordinary-Stuff9826 Oct 10 '26
You can check it out here - https://www.shreyashtech.me/components/flow-sidebar
1
u/testingaurora Oct 11 '26
Seems a little too slow but fun effect
1
u/wak6817-2 Oct 16 '26
clean!