//
A read-only text field with a one-click copy-to-clipboard button.
bun add xiod-ui1import { CopyToClipboard } from "xiod-ui/copy-to-clipboard";1<CopyToClipboard>2</CopyToClipboard>| Prop | Type | Default | Description |
|---|---|---|---|
textReq | string | - | The text to display in the field |
textToCopy | string| undefined | - | If provided, this text will be copied to clipboard instead of the `text` prop. |
tooltipText | string| undefined | Copy | Text shown in the tooltip on hover. |
copiedText | string| undefined | Copied! | Text shown in the toast after copying. |
disableTooltip | boolean| undefined | false | Disable the tooltip entirely. |
render | ReactElement<unknown, string| JSXElementConstructor<any>>| ComponentRenderFn<HTMLProps, {}>| undefined | - | Allows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a `ReactElement` or a function that returns the element to render. |
size | "default"| "sm"| "lg"| null| undefined | default |