Introducing Aceternity UI Pro - 70+ premium component packs and templates to build amazing websites.
Logo

Canvas Reveal Effect

A dot background that expands on hover, as seen on Clerk's website

Open in

Sheetal is Nisha

Nisha is Munni

Munni is Aditi

Installation

Run the following command

npx shadcn@latest add https://ui.aceternity.com/registry/canvas-reveal-effect.json

Section

Open in

With insomnia, nothing's real. Everything is far away. Everything is a copy, of a copy, of a copy

Static

Open in

I'm static and I know it.

Props

ComponentProp NameTypeDefault ValueDescription
CanvasRevealEffectanimationSpeednumber0.4Animation speed, where 0.1 is slower and 1.0 is faster.
CanvasRevealEffectopacitiesnumber[][0.3, 0.3, 0.3, 0.5, 0.5, 0.5, 0.8, 0.8, 0.8, 1]Array of opacities for the effect.
CanvasRevealEffectcolorsnumber[][][[0, 255, 255]]Array of RGB color arrays to use in the effect.
CanvasRevealEffectcontainerClassNamestringAdditional class name(s) for the container div.
CanvasRevealEffectdotSizenumberSize of the dots in the effect.
CanvasRevealEffectshowGradientbooleantrueWhether to show the gradient overlay effect.
DotMatrixcolorsnumber[][][[0, 0, 0]]Array of RGB color arrays for the dots. Default is black.
DotMatrixopacitiesnumber[][0.04, 0.04, 0.04, 0.04, 0.04, 0.08, 0.08, 0.08, 0.08, 0.14]Array of opacities for the dots.
DotMatrixtotalSizenumber4Total size of the effect area.
DotMatrixdotSizenumber2Size of the individual dots.
DotMatrixshaderstringCustom shader code to apply to the dots.
DotMatrixcenter("x" | "y")[]["x", "y"]Array indicating whether to center the effect on the x and/or y axis.
ShaderMaterialsourcestringGLSL source code for the shader.
ShaderMaterialuniformsUniformsUniform variables for the shader.
ShaderMaterialmaxFpsnumber60Maximum frames per second for the shader animation.
ShadersourcestringGLSL source code for the shader.
ShaderuniformsUniformsUniform variables for the shader.
ShadermaxFpsnumber60Maximum frames per second for the shader animation.

The inspiration for this effect is directly taken from Clerk's website.

Build websites faster and 10x better than your competitors with Aceternity UI Pro

With the best in class components and templates, stand out from the crowd and get more attention to your website. Trusted by founders and entrepreneurs from all over the world.

Go Pro
Manu is the man! He is the best front-end developer I have worked with. He took the requirements and quite literally ran with them. We are super happy with the result and product we go...

John Shahawy

Founder at Rogue and Moonbeam

A product by Aceternity
Building in public at @mannupaaji