# Text With Copy Button

Display text alongside a button that copies the text to the clipboard.

---

## Default

```tsx
import { TextWithCopyButton } from '@vercel/geistcn/components';
import type { JSX } from 'react';

export function Component(): JSX.Element {
  return (
    <TextWithCopyButton
      ellipsis
      successMessage="Copied to clipboard"
      textLabel="Copy"
      textToCopy="lipsum"
    />
  );
}
```

## With Small and Tertiary

```tsx
import { TextWithCopyButton } from '@vercel/geistcn/components';
import type { JSX } from 'react';

export function Component(): JSX.Element {
  return (
    <TextWithCopyButton
      ellipsis
      successMessage="Copied hashed digest to clipboard"
      textLabel="Copy config digest"
      textToCopy="edgeConfigData.digest"
    />
  );
}
```
