# Scanline Background

> A whole phosphor screen to set content on.

Fine lines, a slow refresh bar and curved-glass edges. Where Scanline textures an existing panel, this is the backdrop of a section.

- Family: Backgrounds
- Plan: Creative. Included with Creative.
- Requires: React, Tailwind CSS v4 and the motion package
- Page with a live preview: https://galactrex.com/ui/scanline-background/
- Licence: https://galactrex.com/ui/license/

## Install

```sh
npx @galactrex/ui login   # once, with an API key from https://galactrex.com/account/
npx @galactrex/ui add scanline-background
```

It installs to `components/galactrex/scanline-background.tsx`, with the shared motion helpers beside it. First time in a project: `npx @galactrex/ui init` (setup guide: https://galactrex.com/docs/ui-components-setup/).

## Usage

```tsx
import { ScanlineBackground } from "@/components/galactrex/scanline-background";

<section className="relative overflow-hidden">
  <ScanlineBackground />
  <h1 className="relative">Channel 3</h1>
</section>
```

## Props

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `spacing` | `number` | `4` | Gap between lines in px. |
| `opacity` | `number` | `0.14` | Line strength, 0 to 1. |
| `sweep` | `boolean` | `true` | A refresh bar sweeping down. |
| `speed` | `number` | `7` | Seconds per sweep. |
| `vignette` | `boolean` | `true` | Darken the edges like curved glass. |
| `color` | `string` | `var(--gxui-ink)` | Line colour. |
| `className` | `string` | — | Extra classes for the outer element. |

## Variants

- **Broadcast.** Lines, sweep and vignette.
- **Flat panel.** `vignette={false} sweep={false}`.

## Accessibility

- Decorative only and aria-hidden; never takes pointer events.

## Motion

- Transform-only sweep.
- Stops offscreen.
- Reduced motion: no sweep.
