Modus UI

Bough Study

Web (React)

A painterly canvas tree that grows, sways and regrows in ink drawn from your theme.

A branching tree drawn on a 2D canvas in an ink ramp from the foreground up to the palette's primary, on the page ground. It grows from the trunk outwards, sways with layered wind, bends towards the pointer and shakes on click, then fades and grows a new one while motes drift around the canopy. It fills its positioned parent, re-reads the theme when the mode or palette changes, pauses when off screen and stays still when the user prefers reduced motion.

Modus / Bough Study

Installation

CLI

npx @modus-ui/cli add bough-study

Manual

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

Usage

tsx
import { BoughStudy } from "@/components/ui/bough-study";

export default function Example() {
  return (
    <div className="relative h-[500px] w-full overflow-hidden">
      <BoughStudy />
    </div>
  );
}

Props

PropTypeDefaultDescription
speednumber1Animation speed multiplier (0 to 3).
sizenumber1Tree size (0.65 to 1.5). Below 1 the tree is centred.
particleAmountnumber1Particle count multiplier (0 to 2, 50 particles at 1).
opacitynumber1Canvas opacity.
huenumber0Hue rotation in degrees.
saturationnumber1Saturation multiplier.
brightnessnumber1Brightness multiplier.
backgroundColorstringhsl(var(--background))Colour behind the tree, any CSS colour.
colorsRGB[]Theme ramp (--foreground → --primary)Branch inks from trunk to tips, as { r, g, b } objects.

Comments

  • No comments yet.