Your ImageYour Image
  • About
  • Templates10
  • Blocks81New
  • Icons1635
  • Graphics4K
  • Components107New
  • About
  • Components
  • Pricing
  • Contact
Book an Intro call
Book an Intro call
  • About
  • Works
  • Pricing
  • Templates
  • Blocks
  • components
  • Graphic
  • Backgrounds
  • Designs
  • Icons
  • Logos
  • Flags
  • Privacy
  • Terms
  • Contact
© 2025Made with by Ali Imam

  • Gradient Mesh
  • Gradient Wave
  • Shader Ripple
  • Shader Lines
  • Shader RGB
  • Particles Highlight
  • Particle Circle
  • Void Animation
  • Gradient Bars
  • Render Canvas
  • Fireball
  • Scroll Progress
  • Shine Border
  • Dot Pattern
  • Grid Pattern

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 dampening={0.001} lineWidth={20} trails={300} />
    </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.
Gradient BarsFireball

On This Page

InstallationUsageRenderCanvas