# copy_span_target

> **Function** in `deepagents_code`

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

Return the copy text and field label from a span style, if any.

## Signature

```python
copy_span_target(
    style: object,
) -> tuple[str, str] | None
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `style` | `object` | Yes | The Textual event style under the pointer/click. |

## Returns

`tuple[str, str] | None`

`(text, label)` when the span carries a copy marker, else `None`.

---

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