Modus UI

Ink Fountain

Web (React)

Primary ink strokes fanning rightward from a source on the left edge.

Hundreds of tapered strokes fan out rightward from a source just off the left edge, thickening as they travel, in the theme's primary with muted tails and foreground tips. It fills its positioned parent, follows the active theme and palette in light and dark mode, pauses when off screen and renders a still frame when the user prefers reduced motion.

Modus / Ink Fountain

Installation

CLI

npx @modus-ui/cli add ink-fountain

Manual

  1. Copy the code from the component tab.
  2. Create a file at components/ui/ink-fountain.tsx.
  3. Paste the code.

Usage

tsx
import { InkFountain } from "@/components/ui/ink-fountain";

export default function Example() {
  return (
    <div className="relative h-[500px] w-full overflow-hidden">
      <InkFountain />
      <div className="relative z-10 p-8">
        <h1>Content over the background</h1>
      </div>
    </div>
  );
}

Props

PropTypeDefaultDescription
speednumber0.7Animation speed multiplier (0–3).
sizenumber0.8Stroke width multiplier.
lengthnumber1.2Stroke length multiplier (0.35–2.5).
densitynumber0.8Stroke count multiplier (0.25–2.5).
opacitynumber1Opacity of the effect layer (0.05–1).
huenumber0Hue rotation in degrees applied to the final frame.
saturationnumber1Saturation multiplier applied to the final frame.
brightnessnumber1Brightness multiplier applied to the final frame.
backgroundColorstringundefinedCSS background. Defaults to the theme background.

Comments

  • No comments yet.