demo.mp4
This is a fun project to revamp the original SVG Sine Animation. The goal is to provide a more structured and reusable component for generating animated SVG curves using React.
Demo: https://svg-sine-anim-revamp.vercel.app/
Original implementation can still be found here https://github.com/imadx/svg-sine-anim
pnpm install
pnpm dev
This React component generates an animated SVG curve. It utilizes quadratic Bezier curves to create a smooth, flowing shape that can be customized through props.
eg:
<path d="M -2000 300 q 500 0 1000 200 t 1000 0 t 1000 0 t 1000 0 t 1000 0 t 1000 0 t 1000 0 t 1000 0" fill="none" stroke="hsl(150, 100%, 50%)" stroke-width="10" stroke-linecap="round"></path>
Explanation of the SVG Path Commands:
M
- Move to the starting pointq
- Quadratic Bezier curvet
- Smooth quadratic Bezier curve
Read more on MDN