Rim Glow

Wrapper that rims its content with a currentColor glow inside and out, in dim, steady or breathing states. Can also cover the viewport as a presence overlay; breathing holds steady under reduced motion.

Open the preview in a new tab

The source comes with full access.

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

Installation

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

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/rim-glow.tsx, as source you own and edit.

The example also uses card and item. Install them too:

pnpm dlx shadcn add @01orbital/card @01orbital/item
npx shadcn add @01orbital/card @01orbital/item
yarn shadcn add @01orbital/card @01orbital/item
bunx --bun shadcn add @01orbital/card @01orbital/item

Usage

import { cn } from "cn"

import { RimGlow } from "@/components/glow/rim-glow"
import { Card, CardContent } from "@/components/ui/card"
import {
  Item,
  ItemContent,
  ItemDescription,
  ItemMedia,
  ItemTitle,
} from "@/components/ui/item"

// Every word on the page. Change copy here, not in the markup.
const COPY = {
  title: "Assistant",
  body: "Reading three files and drafting the migration plan…",
} as const

export default function RimGlowDemo({
  animate = false,
}: {
  // Breathe the rim; the card's play button turns it on.
  animate?: boolean
}) {
  return (
    <div className="dark relative isolate grid min-h-full w-full flex-1 place-items-center overflow-hidden bg-background text-foreground">
      {/* The rim takes the card's radius and glows in the current color. */}
      <RimGlow
        state={animate ? "breathing" : "steady"}
        spread={28}
        className="w-full max-w-md rounded-xl text-primary"
      >
        <Card>
          <CardContent>
            <Item>
              <ItemMedia>
                <span
                  aria-hidden="true"
                  className={cn(
                    "size-2 rounded-full bg-primary",
                    animate && "animate-pulse motion-reduce:animate-none"
                  )}
                />
              </ItemMedia>
              <ItemContent>
                <ItemTitle>{COPY.title}</ItemTitle>
                <ItemDescription>{COPY.body}</ItemDescription>
              </ItemContent>
            </Item>
          </CardContent>
        </Card>
      </RimGlow>
    </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.

On this page