Glow

Glow Rig

Full-bleed lighting layer that hangs one hooded picture light above the top edge, screen blended. Overhead or corner placement, intensity and bulb color; needs a dark ground and a positioned parent.

The source comes with full access.

One payment of $149 ($49 for now) opens the source right here and lets the CLI install every paid component, with lifetime updates.

Installation

pnpm dlx shadcn add @01orbital/glow-rig
npx shadcn add @01orbital/glow-rig
yarn shadcn add @01orbital/glow-rig
bunx --bun shadcn add @01orbital/glow-rig

Part of the 01orbital library. With a license, put ORBITAL_TOKEN in .env.local and the same command installs it (licensed install, pricing).

It lands at components/glow/glow-rig.tsx, as source you own and edit.

The example also uses grain-veil and toggle-group. Install them too:

pnpm dlx shadcn add @01orbital/grain-veil @01orbital/toggle-group
npx shadcn add @01orbital/grain-veil @01orbital/toggle-group
yarn shadcn add @01orbital/grain-veil @01orbital/toggle-group
bunx --bun shadcn add @01orbital/grain-veil @01orbital/toggle-group

Usage

"use client"

import { useState } from "react"

import {
  GlowRig,
  type RigPosition,
} from "@/components/glow/glow-rig"
import { GrainVeil } from "@/components/texture/grain-veil"
import { ToggleGroup, ToggleGroupItem } from "@/components/ui/toggle-group"

// Every word on the page. Change copy here, not in the markup.
const COPY = {
  lamp: "Lamp",
} as const

const POSITIONS: { value: RigPosition; label: string }[] = [
  { value: "top-left", label: "Left" },
  { value: "overhead", label: "Center" },
  { value: "top-right", label: "Right" },
]

// The rig is the lamp, the ground is the wall; the toggle moves the lamp.
export default function GlowRigDemo() {
  const [position, setPosition] = useState<RigPosition>("overhead")
  return (
    <div className="dark relative isolate grid min-h-full w-full flex-1 place-items-center overflow-hidden bg-background text-foreground">
      <GlowRig position={position} />
      <GrainVeil blend="overlay" opacity={0.15} />
      <ToggleGroup
        aria-label={COPY.lamp}
        value={[position]}
        onValueChange={(values) => {
          const next = POSITIONS.find((p) => p.value === values[0])
          if (next) setPosition(next.value)
        }}
        className="relative z-10"
      >
        {POSITIONS.map(({ value, label }) => (
          <ToggleGroupItem key={value} value={value}>
            {label}
          </ToggleGroupItem>
        ))}
      </ToggleGroup>
    </div>
  )
}

API reference

Prop

Type

It also accepts the HTML attributes of the element it renders.

Dependencies

npm: cn. The CLI installs them for you.

No other registry pieces.