css-animationcanvas-animationasset-animationcomplex-animationplayground

css-animation

svg Basic Animation

test
ExampleComponent: () => {
    const canvasDomRef = useRef<HTMLCanvasElement>(null);
    useEffect(() => {
        const canvas = canvasDomRef.current as HTMLCanvasElement;
        if(!canvas) return;
        const ctx = canvas.getContext("2d");
        if(!ctx) return;
        // ...
    }, [])
    return (
        <canvas ref={canvasDomRef} width={150} height={150} className="border border-gray-400"></canvas>
    )
  },