# copy_span_style

> **Function** in `deepagents_code`

📖 [View in docs](https://reference.langchain.com/python/deepagents-code/tui/widgets/_copy_spans/copy_span_style)

Build the style that marks a span as click-to-copy.

## Signature

```python
copy_span_style(
    text: str,
    label: str,
) -> TStyle
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `text` | `str` | Yes | The text copied to the clipboard when the span is clicked. |
| `label` | `str` | Yes | The field label used to word the success toast. |

## Returns

`TStyle`

A style carrying only the copy metadata, so it can be combined with a
visual style (e.g. `TStyle(dim=True) + copy_span_style(...)`).

---

[View source on GitHub](https://github.com/langchain-ai/deepagents/blob/2069079e09546060f5b52b2cd4f0e3c813e820f3/libs/code/deepagents_code/tui/widgets/_copy_spans.py#L20)