Modus UI

Terrace Dusk

Web (React)

Fifteen breathing terraces stepping down from left to right, cut from your theme's tones.

A full-bleed Three.js shader of fifteen grained bars that step down from left to right and breathe on a slow pulse. The bars are a lightness ramp on the theme's primary hue and the ground above them is the theme background, so it reads as ink terraces on paper in light mode and as dusk in dark mode, following the palette picker. It fills its positioned parent, pauses when off screen and renders a still frame when the user prefers reduced motion.

Modus / Terrace Dusk

Installation

CLI

npx @modus-ui/cli add terrace-dusk

Manual

  1. Install three.
  2. Copy the code from the component tab.
  3. Create a file at components/ui/terrace-dusk.tsx.
  4. Paste the code.

Usage

tsx
import { TerraceDusk } from "@/components/ui/terrace-dusk";

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

Props

PropTypeDefaultDescription
huenumber0Hue rotation in degrees (-180 to 180).
saturationnumber1Saturation multiplier (0 to 2).
brightnessnumber1Brightness multiplier (0.35 to 1.65).
baseColorstringtheme primary, deepColour of the bars at the bottom.
startColorstringtheme primary, lightGradient colour on the left side.
endColorstringtheme primaryGradient colour on the right side.
horizonColorstringtheme backgroundColour above the stepped horizon.
backgroundColorstring"hsl(var(--background))"Colour behind the canvas.

Comments

  • No comments yet.