# Pull-chain light

A pendant lamp you switch by tugging its pull chain. Space toggles it from the keyboard.

Tier: Free

## Installation

```bash
npx shadcn add @fetaui/pull-chain-light
```

## Usage

```tsx
import { PullChainLight } from '@/components/fetaui/pull-chain-light'

export function Example() {
  return <PullChainLight title="Desk lamp" onChange={setLit} />
}
```

## API

| Prop | Type | Default |
|---|---|---|
| title | string | Desk lamp |
| on | boolean |  |
| defaultOn | boolean | false |
| onChange | (on) => void |  |
| disabled | boolean | false |
| animated | boolean | true |

## When to use

- For a playful on and off moment.

## When not to use

- For product settings: use Switch.

## Accessibility

- The pull is a native switch.
- The state is announced as a status.

## Motion

- Pulling past 22 px switches the lamp on release. A click or tap tugs it once.
- The chain snaps back with a bounce, the pull swings and the lamp sways on its wire.
- On, the bulb flickers as it catches, the light breathes gently and dust drifts through it.
- With reduced motion, the switch flips and nothing moves, with the dust held still.
- Swift uses an SF Symbol lamp.
