> For the complete documentation index, see [llms.txt](https://lanefox.gitbook.io/vault/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://lanefox.gitbook.io/vault/guides/how-to.../modify-the-ui-appearance.md).

# Use UI Components

It's pretty straightforward to work with the Inventory UI components. The demo example project provides prefab templates with working versions of typical gear, weapon and backpack inventories that are ready to go and network synced. There are also examples for typical things like chests that popup an inventory window.

The Net code is not in the UI space. The UI components just talk to the Inventory class that they are bound to and will send requests through it which simplifies the UI code quite a bit.

### Inventory Ui

![](/files/-M9GQ7TabjA6cXSuzOil)

This component requires a `GridLayoutGroup` to function. The restrictions are essentially Slot Types, or locks, where only items with corresponding restrictions or lock types can be slotted into this inventory. If there are no restrictions then it is ... well... unrestricted.

The array of restrictions will also operate as an index restriction for the Grid. This means that in the above example the first slot \[0] on the grid will be restricted to Head armor, and so forth.

If you want the inventory to bind to the player then simply check the box and ensure that your Player code is doing something like this:

```
    public override void OnStartClient()
    {
        if (isLocalPlayer)
        {
            Vault.OnPlayerSpawn.Invoke(this);
        }
        
    [...]
```

Note: If you have more than one local player, you'll have to start looking into how to support that as the built-in systems assume there is only one local player.

### ItemUiPlug

![](/files/-M9GSt-X6STw0R11K4xh)

This is what is on every slot in the system. If you can put something there, it's an `ItemUiPlug`. There's several references for updating the UI of Slots. If you examine the Template Slot prefab in the demo example then you can see how each part works. Really, you can override all of this and do whatever you want and just use the script for the interactive code bits.

If you're extending functionality to add more input support, context menus or other things that relate directly to the slots and their function then this is where you're looking.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://lanefox.gitbook.io/vault/guides/how-to.../modify-the-ui-appearance.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
