# Bounding Box Selector

Figma-style selection rectangle that snaps around a target.

> For the complete documentation index, see [llms.txt](/llms.txt). Markdown variants are available by appending `.md` to any URL or sending an `Accept: text/markdown` header. An agent skill is available at [/.well-known/agent-skills/site-skill.md](/.well-known/agent-skills/site-skill.md).

## Installation

<TabsTrigger value="cli">Command</TabsTrigger>
<TabsTrigger value="manual">Manual</TabsTrigger>

```bash
npx shadcn@latest add @framecn/bounding-box-selector
```

<Step>Copy and paste the following code into your project.</Step>

<Step>Update the import paths to match your project setup.</Step>

## Usage

```tsx
import { BoundingBoxSelector } from "@/components/framecn/bounding-box-selector";
```

```tsx
<BoundingBoxSelector />
```

## API Reference

### BoundingBoxSelector

| Prop               | Type        | Default     |
| ------------------ | ----------- | ----------- |
| `children`         | `ReactNode` | `-`         |
| `borderColor`      | `string`    | `"#0ea5e9"` |
| `handleColor`      | `string`    | `"#0ea5e9"` |
| `borderWidth`      | `number`    | `2`         |
| `appearAt`         | `number`    | `15`        |
| `background`       | `string`    | `"#fafafa"` |
| `speed`            | `number`    | `1`         |
| `className`        | `string`    | `-`         |
| `fps`              | `number`    | `30`        |
| `durationInFrames` | `number`    | `90`        |
| `width`            | `number`    | `1000`      |
| `height`           | `number`    | `500`       |

## Notes

  The component reads its size from the wrapped child via `display:
  inline-block`. Pass children with explicit `width`/`height` for pixel-perfect
  placement.