> For the complete documentation index, see [llms.txt](https://legacy-docs.aragon.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://legacy-docs.aragon.org/developers/tools/aragonui/data-entry/textcopy.md).

# TextCopy

A read-only text input component that allows the user to copy the value to the clipboard.

Extra props will be passed to the `TextInput` component which is used internally.

## Usage <a href="#usage" id="usage"></a>

```jsx
<TextCopy value="Something to copy" />
```

## Demonstration

![](/files/g6fsm9W878lBDLj94mBt)

## Props <a href="#props" id="props"></a>

#### `adornment` <a href="#adornment" id="adornment"></a>

| TYPE         | DEFAULT VALUE |
| ------------ | ------------- |
| `React node` | None          |

Allows to set an adornment that will get used on the left side of the text field (in left to right languages). The copy button is always displayed on the other side.

#### `autofocus` <a href="#autofocus" id="autofocus"></a>

| TYPE      | DEFAULT VALUE |
| --------- | ------------- |
| `Boolean` | `false`       |

Focus the text field when the component gets mounted.

#### `message` <a href="#message" id="message"></a>

| TYPE     | DEFAULT VALUE |
| -------- | ------------- |
| `String` | `"Copied"`    |

The message that gets displayed when the copy is successful.

#### `monospace` <a href="#monospace" id="monospace"></a>

| TYPE      | DEFAULT VALUE |
| --------- | ------------- |
| `Boolean` | `true`        |

Set this to false to disable the use of the monospace font (e.g. for Ethereum addresses).

#### `onCopy` <a href="#oncopy" id="oncopy"></a>

| TYPE                 | DEFAULT VALUE |
| -------------------- | ------------- |
| `Function` or `null` | None          |

When not set, a toast will get displayed on copy, with the `message` provided.

When set to `null`, disables the message entirely.

When set to a function, calls this function when the copy is successful, with the `message` as a parameter.

#### `value` <a href="#value" id="value"></a>

| TYPE     | DEFAULT VALUE |
| -------- | ------------- |
| `String` | None          |

The field content (single line).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://legacy-docs.aragon.org/developers/tools/aragonui/data-entry/textcopy.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
