# CopyButton

Copy to clipboard with a check-morph confirmation and a legacy fallback.

- Family: Feedback, imported from `mizu-ui` or `mizu-ui/feedback`
- Docs: https://mizu.user64bit.world/components/copy-button
- Source: https://github.com/0xuser64bit/mizu/blob/main/packages/mizu/src/feedback/CopyButton.tsx

## Usage

```tsx
import { CopyButton } from "mizu-ui";

export function Swatch({ hex }: { hex: string }) {
  return <CopyButton text={hex}>{hex}</CopyButton>;
}
```

## Copy it with the shadcn CLI

```sh
npx shadcn@latest init 0xuser64bit/mizu/preset # once, where there is no components.json
npx shadcn@latest add 0xuser64bit/mizu/copy-button
```

## Props

- `text`: `string`. The string to copy.
- `feedback`: `string` (default `"Copied"`). Confirmation label shown for 1.4s.

## Accessibility

aria-label announces the copied state. Clipboard failure is reported explicitly and never claims success.

## Motion

The diamond is replaced by a check; feedback stays visible for 1.4 seconds.
