CopyButton API
import { CopyButton } from '@editora/ui-react';
Props
| Prop | Type | Description |
|---|---|---|
animation | 'scale' | 'pulse' | 'none' | |
ariaLabel | string | |
block | boolean | |
copiedIcon | React.ReactNode | |
copiedLabel | React.ReactNode | |
disabled | boolean | |
download | string | boolean | |
failedIcon | React.ReactNode | |
failedLabel | React.ReactNode | |
headless | boolean | |
href | string | Makes it a link that looks like a button (a real <a>: new tab, address on hover, announced as a link). Goes through NavigationProvider like Sidebar and Breadcrumb links. |
icon | string | |
iconOnly | boolean | |
iconPosition | 'start' | 'end' | |
label | React.ReactNode | |
loading | boolean | |
loadingLabel | string | |
onCopy | (detail: { value: string; success: boolean }) => void | |
onNavigate | (detail: ComponentNavigateDetail<{ href: string }>) => void | Runs before a link button is followed; detail.preventDefault() keeps the page. |
radius | number | string | |
recipe | 'classic' | 'solid' | 'soft' | 'surface' | 'outline' | 'ghost' | |
rel | string | |
resetAfter | number | |
scale | '1' | '2' | '3' | '4' | |
size | 'sm' | 'md' | 'lg' | |
state | 'idle' | 'loading' | 'error' | 'success' | |
target | string | |
theme | 'default' | 'dark' | 'brand' | |
tone | 'neutral' | 'info' | 'success' | 'warning' | 'danger' | |
type | 'button' | 'submit' | 'reset' | |
value (required) | string | |
variant | ButtonProps['variant'] | 'icon' |
Also accepts the standard HTML and React props of the element it renders (className, style, id, aria-*, data-*, event handlers).