<!-- Generated by scripts/gen-docs.mts from the JSDoc in registry/. Do not edit; run `pnpm run docs`. -->

# copyText

Puts text on the clipboard: through the Clipboard API, or a text selection where the page may not use it (plain http, an older browser). Resolves whether it worked; never throws.

```tsx
import { copyText } from "@/lib/ouro/share";
```

## Example

```tsx
if (await copyText(url)) toast("Link copied");
```

## Parameters

| Parameter | Type |
| --- | --- |
| `text` | `string` |

## Returns

`Promise<boolean>`
