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

Background Ripple Effect

A grid of cells that ripple when clicked.

Open in

Interactive Background Boxes Ripple Effect

Hover over the boxes above and click.To be used on backgrounds of hero sections OR Call to Action sections. I beg you don't use it everywhere.

Installation

Run the following command

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

Add this in your globals.css file

  --animate-cell-ripple: cell-ripple var(--duration, 200ms) ease-out none 1
  var(--delay, 0ms);
 
  @keyframes cell-ripple {
    0% {
      opacity: 0.4;
    }
    50% {
      opacity: 0.8;
    }
    100% {
      opacity: 0.4;
    }
  }

Props

Background Ripple Effect Props

PropTypeDefaultDescriptionRequired
rowsnumber8Number of rows in the grid.No
colsnumber27Number of columns in the grid.No
cellSizenumber56Size of each square cell in pixels.No

DivGrid Props

PropTypeDefaultDescriptionRequired
rowsnumber-Number of rows in the grid.Yes
colsnumber-Number of columns in the grid.Yes
cellSizenumber-Size of each cell in pixels.Yes
borderColorstring-CSS color value for cell borders.Yes
fillColorstring-CSS color value for cell fill.Yes
clickedCell{ row: number; col: number } | nullnullThe currently clicked cell coordinates.No
onCellClick(row: number, col: number) => voidundefinedCallback function called when a cell is clicked.No
interactivebooleanfalseWhether cells respond to mouse interactions.No
classNamestringundefinedAdditional CSS classes to apply to the grid container.No

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
This service exceeded our expectations, since not only was the development technically flawless, but Manu and his team also acted as strategic partners by encouraging us to add ...

Georg Weingartner

CMO at Renderwork

A product by Aceternity
Building in public at @mannupaaji