Your Image
25

Render Canvas

PreviousNext

A dynamic animated canvas component that renders trails following the cursor with configurable physics and color cycling.

Installation

pnpm dlx shadcn@latest add https://aliimam.in/r/render-canvas.json

Usage

import { RenderCanvas } from "@/components/ui/render-canvas"
export default function Page() {
  return (
    <div>
       <RenderCanvas />
    </div>
  );
}

RenderCanvas

Renders a dynamic canvas with animated trails.

PropTypeDefaultDescription
trailsnumber80Number of trail lines rendered.
sizenumber50Number of nodes per trail line.
frictionnumber0.5Friction applied to line movement.
dampeningnumber0.025Dampening factor for velocity transfer.
tensionnumber0.99Spring tension applied along line nodes.
lineWidthnumber10Width of the line strokes.
colorHuenumber285Base hue for HSLA stroke color.
colorSaturationnumber100Saturation of HSLA stroke color.
colorLightnessnumber50Lightness of HSLA stroke color.
opacitynumber0.025Opacity of strokes.
enableColorCyclebooleantrueEnable dynamic color cycling for trails.
colorCycleSpeednumber0.0015Speed of hue wave for color cycling.
colorCycleAmplitudenumber85Amplitude of hue wave for color cycling.
widthnumber700Canvas width in pixels.
heightnumber650Canvas height in pixels.
classNamestring""Additional Tailwind/CSS classes applied to wrapper div.

AI

Listining

Zindagi Tere Naam (From "Yodha")

Vishal Mishra, Kaushal Kishore