Modus UI

Night Gate

Web (React)

A serif link pill floating over a drifting field of ink specks and pulsing motes.

An italic serif link in a translucent pill with an inked arrow badge, floating over two canvas fields: a slow upward drift of ink specks and motes in the theme's primary and foreground colours that wander, bounce and pulse with a glow. Colours come from the theme tokens and are re-read when the theme or palette changes, so the field is ink on paper in light mode and light on dark in dark mode. It fills its positioned parent, pauses when off screen or the tab is hidden, and renders a still frame when the user prefers reduced motion.

Modus / Night Gate

Installation

CLI

npx @modus-ui/cli add night-gate

Manual

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

Usage

tsx
import { NightGate } from "@/components/ui/night-gate";

export default function Example() {
  return (
    <div className="relative h-[400px] w-full overflow-hidden">
      <NightGate label="Begin the journey" href="/start" />
    </div>
  );
}

Props

PropTypeDefaultDescription
labelstring"Step inside"Button text.
huenumber0Hue rotation in degrees (-180 to 180).
saturationnumber1Saturation multiplier (0 to 2).
brightnessnumber1Brightness multiplier (0.35 to 1.65).
starColorsstring[]Theme primary, foreground and muted inkCSS colours for the motes; alpha is applied per frame.
hrefstring"#"Link target. "#" does not navigate.
onClickMouseEventHandler<HTMLAnchorElement>-Called when the link is clicked.

Comments

  • No comments yet.