Skip to Content

Side Glow

Soft blue edge glow anchored to one side of a positioned parent: top, right, bottom or left. Comes with SeamLine, a one-pixel overlay-blended rule for marking a panel edge.

View as Markdown
pnpm dlx shadcn add @01orbital/side-glow

Usage

import { SeamLine, SideGlow } from "@/components/glow/side-glow"

// The glow and its seam on one edge of a panel.
export default function SideGlowDemo() {
  return (
    <div className="dark relative isolate grid min-h-full w-full flex-1 place-items-center overflow-hidden bg-background text-foreground">
      <div className="relative isolate h-72 w-full max-w-md">
        <SideGlow edge="right" />
        <SeamLine className="inset-y-0 right-0" />
      </div>
    </div>
  )
}

Examples

Rail Ticketside-glow-rail-ticket

Train ticket example showing SideGlow: a mobile ticket lit along its top edge, with the journey above a dashed tear line and the seat details below.

pnpm dlx shadcn add @01orbital/side-glow-rail-ticket

Install Commandside-glow-install-command

Getting-started card example showing SideGlow and SeamLine: a card lit along its left edge, with a copyable install command.

pnpm dlx shadcn add @01orbital/side-glow-install-command

Anatomy

Side Glow is built from 2 parts. In the example they nest like this:

SideGlow
SeamLine
  • SideGlow: A soft blue glow that comes in from one edge of a section, for the background behind its content. Put it inside a positioned parent: it fills that parent, clips itself to it, ignores the pointer and is hidden from assistive tech.
  • SeamLine: A one-pixel vertical line of white, blended in overlay mode so it lightens the surface under it. It is decorative and hidden from assistive tech.

API reference

SideGlow

A soft blue glow that comes in from one edge of a section, for the background behind its content. Put it inside a positioned parent: it fills that parent, clips itself to it, ignores the pointer and is hidden from assistive tech.

Prop

Type

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

SeamLine

A one-pixel vertical line of white, blended in overlay mode so it lightens the surface under it. It is decorative and hidden from assistive tech.

It is absolutely positioned with no height of its own: place it with className, for example inset-y-0 right-0.

It accepts the HTML attributes of the element it renders.

Dependencies

npm: cn. The CLI installs them for you. cn merges Tailwind class names, in place of clsx and tailwind-merge.