components/CopyButton
import { … } from 'zidane-ui'ui/src/components/CopyButton.tsx
const agent = createAgent({ ...basic, provider })
await agent.run({ prompt: 'build a REST API' })cat packages/server/src/handlers/very-long-folder-name/another-nested-directory/session-title-generator.ts | head -n 200 # a long line scrolls inside the frame
$ bun test 41 passed
Components#
CopyButtonComponent#
Renders a small icon button that copies text to the clipboard. The clipboard glyph
swaps to a check for 1.2 seconds after a copy, and the accessible name changes to the
copied label. A refused clipboard write fails silently.
function CopyButton(props: CopyButtonProps): ElementParameters
| Name | Type | Description |
|---|---|---|
| props | CopyButtonProps | Component props. |
Returns
ElementProps
| Name | Type | Default | Description |
|---|---|---|---|
| className? | string | Extra classes on the button. | |
| label? | string | Accessible name and tooltip. Defaults to the | |
| reveal? | boolean | false | Hide the button until the nearest |
| style? | CSSProperties | Inline styles on the root element, merged after the component's own. | |
| text | string | The text written to the clipboard. |
Interfaces#
CopyButtonPropsInterface#
Props for CopyButton.
interface CopyButtonPropsProperties
| Name | Type | Default | Description |
|---|---|---|---|
| className? | string | Extra classes on the button. | |
| label? | string | Accessible name and tooltip. Defaults to the | |
| reveal? | boolean | false | Hide the button until the nearest |
| style? | CSSProperties | Inline styles on the root element, merged after the component's own. | |
| text | string | The text written to the clipboard. |