> ## Documentation Index
> Fetch the complete documentation index at: https://ugcore.urging.ch/llms.txt
> Use this file to discover all available pages before exploring further.

# UgLib.Clipboard and Ui

> Copy text, and inspect or close every open UI.

<Badge color="green">Client</Badge> Through ug-lib.

## Clipboard

```lua theme={"dark"}
UgLib.Clipboard.Copy(text)
```

Copies 1 to 4096 characters to the player's clipboard.

## Ui

```lua theme={"dark"}
UgLib.Ui.CloseAll()
UgLib.Ui.IsOpen(kind?) -> boolean
```

* `CloseAll` closes every UI of every resource. Waiting calls end with `Closed`.
* `IsOpen(kind)` is true when a UI of that `UgLib.Enums.UiType` is open. Without `kind`, it is true when a modal is open: a dialog, a context menu, a radial or a skill check.

## Example

```lua client.lua theme={"dark"}
RegisterCommand('plate', function()
    local vehicle = UgLib.Cache.Vehicle

    if vehicle and not UgLib.Ui.IsOpen() then
        UgLib.Clipboard.Copy(GetVehicleNumberPlateText(vehicle))
        UgLib.Notify.Show({ message = 'Plate copied.' })
    end
end, false)
```


## Related topics

- [UgLib.Enums](/ug-lib/enums.md)
- [UgLib.Menu](/ug-lib/menu.md)
- [UgLib.Context](/ug-lib/context.md)
- [UgLib.Notify](/ug-lib/notify.md)
- [UgLib.Progress](/ug-lib/progress.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.