# CRT Power-Off

> Switches content off like an old television.

The picture flares, collapses to a bright line, shrinks to a dot and fades; switching on runs it backwards. For closing panels, ending sessions, game over and 'lights out'.

- Family: Originals
- Plan: Creative. Included with Creative.
- Requires: React, Tailwind CSS v4 and the motion package
- Page with a live preview: https://galactrex.com/ui/crt-off/
- 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 crt-off
```

It installs to `components/galactrex/crt-off.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 { CRTOff } from "@/components/galactrex/crt-off";

<CRTOff on={screenOn}>
  <GameScreen />
</CRTOff>
```

## Props

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `children` | `ReactNode` | — | The content. |
| `on` | `boolean` | — | False switches it off; true switches it on. |
| `duration` | `number` | `0.55` | Seconds for the switch. |
| `onDone` | `(on: boolean) => void` | — | Called when the switch finishes. |
| `className` | `string` | — | Extra classes for the outer element. |

## Variants

- **Power off.** Close a panel with a click.
- **Power on.** Start a screen from a dot.

## Accessibility

- Switched-off content is aria-hidden and takes no pointer events.

## Motion

- Keyframes of scale, opacity and brightness only.
- Reduced motion: a plain fade.
