# 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.

Component · Glow · https://01orbital.dev/docs/components/side-glow

## Installation

```bash
npx shadcn@latest add @01orbital/side-glow
```

## Usage

```tsx
import { SeamLine, SideGlow } from "@/components/glow/side-glow"
import { Grid } from "@/components/grid/grid"
import { DemoLabel } from "@/components/text/demo-label"

const COPY = { edge: "edge" } as const

// The glow comes from one edge; the seam line traces that edge. Right is the
// default.
const EDGES = [
  { edge: "top", seam: "inset-x-0 top-0 h-px w-full" },
  { edge: "right", seam: "inset-y-0 right-0" },
  { edge: "bottom", seam: "inset-x-0 bottom-0 h-px w-full" },
  { edge: "left", seam: "inset-y-0 left-0" },
] as const

/** Side Glow and its seam line from each of the four edges. */
export default function SideGlowDemo() {
  return (
    <Grid cols={1} gap="sm" className="p-6 sm:grid-cols-2 lg:grid-cols-3">
      {EDGES.map(({ edge, seam }) => (
        <div key={edge} className="grid gap-2">
          <div className="dark relative isolate aspect-video overflow-hidden rounded-(--tile-radius) bg-[oklch(0.14_0.02_266)] ring-1 ring-foreground/10">
            <SideGlow edge={edge} />
            <SeamLine className={seam} />
          </div>
          <DemoLabel>{`${COPY.edge} ${edge}${edge === "right" ? ", the default" : ""}`}</DemoLabel>
        </div>
      ))}
    </Grid>
  )
}
```

This example installs with everything it uses:

```bash
npx shadcn@latest add @01orbital/side-glow-demo
```

## 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 | Default | Description |
| --- | --- | --- | --- |
| `edge?` | `"top" \| "bottom" \| "left" \| "right"` | `"right"` | The edge the glow comes in from. Defaults to "right". |

## Dependencies

npm: `cn`
