Dot Swell

An ocean surface drawn as dots in perspective, rolling with swells and lifting toward the cursor.

no dependenciesMIT · free

Open water.

Installation

npx shadcn@latest add https://ombakui.com/r/dot-swell.json

Usage

import { DotSwell } from "@/components/dot-swell";

<DotSwell className="h-[480px] bg-slate-950 text-cyan-300" amplitude={30}>
  <h1>Open water.</h1>
</DotSwell>

Props

PropTypeDefaultDescription
childrenReactNode–Content rendered on top.
colorstring"currentColor" (set it with a text-* class)Dot color.
columnsnumber48Columns of dots across the surface.
rowsnumber22Rows of dots from front to back.
amplitudenumber26Wave height in px.
speednumber1Animation speed multiplier.
interactivebooleantrueThe surface bulges up under the cursor.
classNamestring–