> For the complete documentation index, see [llms.txt](https://docs.rlib.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.rlib.io/dev/references/uclass/route.md).

# assign

`:assign(` [**ᵗᵉˣᵗ**](https://wiki.facepunch.com/gmod/string)  id, [**ᵃⁿʸ**](https://wiki.facepunch.com/gmod/any)  data`)`

## ▸ Parameters

&#x20;     ***`str`**`   ``id`*\
&#x20;                            id used for object's data

&#x20;     ***`any`**`   ``data`*\
&#x20;                            data to attach

## ▸ Description

&#x20;        Attaches data to a specified panel

## ▸ Example

{% tabs %}
{% tab title="Example 1" %}

```lua
/*
*   panel
*/

local cat          = ui.rlib( mod, 'category', self.scr    )
:assign            ( 'name', 'Ammo'                        )

/*
*   print example
*/

print( cat.name )
> 'Ammo'
```

{% endtab %}
{% endtabs %}
