Modus UI

Crown Bar

Web (React)

A proximity-spring navigation bar in four fits — a masthead command bar, a centred pill, a dithered pixel strip and a refracting glass rail.

A navigation bar whose items swell, drop and settle on a damped spring as the pointer moves across them, with keyboard focus driving the same motion. The default modern fit is a masthead with an italic serif wordmark, the dock and actions over a serif headline; pill is a centred dock, retro a fitted strip over an ordered-dither WebGL field ramped from paper through the primary to ink, and glass a vertical rail over a Three.js field of refracting beads on a primary-tinted paper wash. Every colour comes from theme tokens (the shaders re-read them when the mode or palette changes), so it follows light and dark mode and the palette picker. The spring is disabled for reduced motion, coarse pointers and narrow viewports, and the shader fields pause off screen.

Modus

LOGO LEFT · DOCK CENTRE · ACTION RIGHT

Modus / Crown Bar

Installation

CLI

npx @modus-ui/cli add crown-bar

Manual

  1. Install three and framer-motion.
  2. Copy the code from the component tab.
  3. Create a file at components/ui/crown-bar.tsx.
  4. Paste the code.

Usage

tsx
import { CrownBar } from "@/components/ui/crown-bar";

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

Props

PropTypeDefaultDescription
variant"pill" | "modern" | "retro" | "glass""modern"Which fit to render.
proximitynumber122Distance in pixels over which the pointer influences an item.
springnumber0.19Spring stiffness of the item motion.
dampingnumber0.7Velocity damping per frame.
widthGrowthnumber17Extra width in pixels an item gains at full influence.
heightGrowthnumber16Extra height in pixels an item gains at full influence.
dropnumber3.5How far an active item drops (or leans out on the rail).
pixelSizenumber4Retro: screen pixels per field pixel.
speednumber1Retro: field animation speed.
noisenumber1Retro: weather noise and grain strength.
levelsnumber7Retro: number of palette steps.
scanlinesnumber0.32Retro: scanline overlay strength.
particlesnumber22Glass: number of visible beads (4–34).
thicknessnumber0.115Glass: refraction offset strength.
dispersionnumber0.05Glass: chromatic split between colour channels.
specularnumber0.85Glass: highlight intensity.
rimnumber0.5Glass: fresnel rim intensity.
driftnumber1Glass: bead drift and spin speed.

Comments

  • No comments yet.