# Photo Straighten

Levels a tilted horizon with a degree ruler.

Tier: Free

## Installation

```bash
npx shadcn add @fetaui/photo-straighten
```

## Usage

```tsx
import { PhotoStraighten } from '@fetaui/components/photo-straighten'

export function Example() {
  return <PhotoStraighten src="/coast.jpg" alt="Coast" tilt={4.2} onChange={save} />
}
```

## API

| Prop | Type | Default |
|---|---|---|
| src | string | required |
| alt | string | required |
| tilt | number | 0 |
| defaultAngle | number | 0 |
| autoLevel | () => Promise<number> | opposite of tilt |
| onChange | (angle) => void |  |
| animated | boolean | true |

## When to use

- In any photo edit flow.

## When not to use

- For free rotation past 15 degrees.

## Accessibility

- The ruler is a slider with a readable angle.
- The angle is always shown as text, and Level is announced.

## Motion

- The photo and ruler follow the drag and the thirds grid fades in.
- Release throws, then settles on a 450 ms spring and snaps within 0.6 degrees.
- With reduced motion, it stops where released.
