Modus UI

Ink Rush

Web (React)

Rounded ink strokes rushing out of a high vanishing point, in the theme ink and accent.

Two hundred rounded strokes fly out of a vanishing point set high in the frame, mixing --foreground, --muted-foreground and --primary and leaving short trails that fade into --background. In light mode it reads as ink on paper; it follows palette and mode changes live. It fills its positioned parent, pauses when off screen and renders a still frame when the user prefers reduced motion.

Modus / Ink Rush

Installation

CLI

npx @modus-ui/cli add ink-rush

Manual

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

Usage

tsx
import { InkRush } from "@/components/ui/ink-rush";

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

Props

PropTypeDefaultDescription
speednumber1Animation speed multiplier (0–3).
sizenumber1Field-of-view scale multiplier.
lengthnumber1Length / reach multiplier (0.35–2.5).
densitynumber1Streak 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.
backgroundColorstringtheme --backgroundBackground colour behind the canvas.

Comments

  • No comments yet.