Skip to Content
Kokonut UI

BG-10BackgroundsNew, October 21, 2026

Rain Glass Background

A hero seen through a rainy window. Drops gather and run, each a tiny lens on the view, and dragging wipes the fog off the glass.

Install with
no extra packages

PRODither Reveal Hero and more like it are in Kokonut UI Pro

Installation

Rain Glass Background is a free, open-source React component in the Kokonut UI Backgrounds collection. Add it with the shadcn CLI, which copies the source into components/kokonutui/rain-glass-background.tsx, so the code is yours to change.

npx shadcn@latest add @kokonutui/rain-glass-background

Usage

import RainGlassBackground from "@/components/kokonutui/rain-glass-background";

export default function Example() {
  return <RainGlassBackground />;
}

Props

src
stringDefault built-in

The view behind the window. Served with CORS so WebGL can read it.

title
stringDefault "Stay in when it rains."
children
ReactNode

Content under the headline.

rain
numberDefault 0.6

How hard it rains, from 0 (a few drops) to 1 (a downpour).

interactive
booleanDefault true

Set false for a window you can't wipe.

className
string

Extra classes for the root element.

Dependencies

NeedsVersionComes from
cn from lib/utils.tsshadcn init
React19Your app
Tailwind CSS4Your app

No provider, font or global CSS to set up: the file works as soon as it lands.