Skip to content
GitHub

Clipboard

A component to copy text to the clipboard.

Installation

Usage

Controlled

Use the onStatusChange prop to control the clipboard value programmatically.

Examples

Icon Only

Different Icons

Use the copied prop on <ClipboardIndicator /> to customize the icon shown when copied.

Add a children to the <ClipboardIndicator /> to customize the icon shown when not copied.

Value Text

Use <ClipboardValue /> to display the value as text instead of an input field.

https://x.com/vinihvc

Custom Timeout

Use the timeout prop on <Clipboard /> to customize how long the copied state is shown.

API Reference

Clipboard

Root wrapper. Manages copy state and value.

ClipboardTrigger

Triggers copy to clipboard on click.

ClipboardInput

Input showing the value to copy. Often hidden or read-only.

ClipboardIndicator

Icon that changes based on copy state (e.g. copy vs check).

ClipboardValue

Text display of the value. Use when input is not needed.


For a complete list of props, see the Ark UI documentation.