copy_field() displays a monospace command, endpoint, or API token with a one-click copy button and optional secret masking toggle (secret=True).
copy_field()
secret=True
<ComponentPreview title="Copy Field (Standard & Masked Secret)">
[
{"type": "copy_field", "label": "Quick Install", "value": "pip install aiui && aiui run app.py", "secret": false},
{"type": "copy_field", "label": "Gateway API Token", "value": "aiui_live_9f8a7c6b5d4e3f2a1b", "secret": true}
]
</ComponentPreview>
<Tabs>
<Tab title="Python">
</Tab>
<Tab title="YAML">
</Tabs>
| Parameter | Type | Description |
|---|---|---|
| value | str | Exact text copied to the clipboard on click. |
value
str
| label | str | Optional label shown above the copy field. |
label
| secret | bool | Mask the value by default with an accessible show/hide toggle (default False). |
secret
bool
False