# Shimmer Button

> A solid button with a slow pass of light.

A band of light crosses it every few seconds. It asks for attention on a primary action without blinking or pulsing.

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

It installs to `components/galactrex/shimmer-button.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 { ShimmerButton } from "@/components/galactrex/shimmer-button";

<ShimmerButton onClick={start}>Start free</ShimmerButton>
```

## Props

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `children` | `ReactNode` | — | Label. |
| `every` | `number` | `2.6` | Seconds between passes. |
| `duration` | `number` | `1.1` | Seconds per pass. |
| `...button props` | `ButtonHTMLAttributes` | — | onClick, disabled, type and the rest. |

## Variants

- **Primary.** The one action on a pricing or launch page.

## Accessibility

- A real button; the light is an aria-hidden layer.

## Motion

- One transform loop with a pause between passes.
- Reduced motion: no shimmer.
