Bubbles

Soft bubbles rising and wobbling under water. They drift away from the cursor.

no dependenciesMIT · free

Deep dive.

Installation

npx shadcn@latest add https://ombakui.com/r/bubbles.json

Usage

import { Bubbles } from "@/components/bubbles";

<Bubbles className="h-[480px] bg-slate-950 text-sky-300" count={50}>
  <h1>Deep dive.</h1>
</Bubbles>

Props

PropTypeDefaultDescription
childrenReactNode–Content rendered on top of the bubbles.
countnumber40Number of bubbles.
colorstring"currentColor"Bubble color. Any CSS color; defaults to the element's text color.
minSizenumber2Smallest bubble radius in px.
maxSizenumber12Largest bubble radius in px.
speednumber1Rising speed multiplier.
interactivebooleantrueBubbles drift away from the cursor.
classNamestring–