> For the complete documentation index, see [llms.txt](https://wiki.redmodding.org/scripting-cyberpunk/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://wiki.redmodding.org/scripting-cyberpunk/scripting/game-systems/ui-scripting/.inkwidget-files.md).

# .inkWidget Files

A brief overview of .inkWidget files

Generally, UI elements (such as menus, HUDs, notifications, etc.) are defined under `.inkWidget` in the game files, which you can view with [WolvenKit](https://wiki.redmodding.org/wolvenkit/) (it isn't scary, I promise 🙂). You can find these files in `base/gameplay/gui` for the base game and `ep1/gameplay/gui` for Phantom Liberty.

In these files you can see the full foundation for the whole UI tree, the properties for each ink widget, etc. To know what `.inkWidget` file a specific UI element came from, you can use Ink Inspector and check the `Context` tab (as visible in the picture above).

{% hint style="info" %}
For more documentation about `.inkWidget` files, look here: [Interface definitions: .inkwidget files](https://wiki.redmodding.org/cyberpunk-2077-modding/for-mod-creators-theory/files-and-what-they-do/file-formats/inkwidgets-a-custom-interface)
{% endhint %}

### Preview

<figure><img src="https://1927068511-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Ffwsaoju1TBAUvMpI6NIw%2Fuploads%2Ff1dYBleEcBTTnFUHvWo8%2Fimage.png?alt=media&amp;token=1a3a982c-96b1-4938-a7f9-b99a32bb76be" alt=""><figcaption><p>The <code>.inkWidget</code> file for the inventory screen</p></figcaption></figure>

## Library Items

The important property (for us) is `libraryItems`, which represents the collection of UI components that can be used from this file. The first component, commonly named `Root`, usually represents the full foundation of the UI as a whole, while the other library items usually represent common re-usable components (such as buttons) that can be spawned into the root for use.

You can [manually spawn these common components](/scripting-cyberpunk/scripting/game-systems/ui-scripting/guide-to-ui-basics/ui-basics-part-3-adding-ink-widgets.md#spawning-library-items) to a menu (or another context) to add additional features for your mod while also having a native looking feel to it.

### Properties

You'll see that with each library item, you'll have the respective `inkGameController` and the root widget (that then contains child widgets, and so on).

{% hint style="info" %}
For documentation about ink controllers, look here: [Broken mention](broken://pages/vYHzIVRKBHCHt2Bg61n2)
{% endhint %}

### Example

<figure><img src="https://1927068511-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Ffwsaoju1TBAUvMpI6NIw%2Fuploads%2FE4taFNba3d6ptwZd9Q3c%2FUntitled.png?alt=media&amp;token=580bf27f-1966-4c93-a270-c57c39cca019" alt=""><figcaption><p>An example of the inventory screen in-game (with <a href="/scripting-cyberpunk/scripting/game-systems/ui-scripting.md#ink-inspector">Ink Inspector</a>) and the respective <code>.inkWidget</code> file for the menu</p></figcaption></figure>

## Finding A `.inkWidget` File

To find the `.inkWidget` file for your respective widget, use [Ink Inspector](/scripting-cyberpunk/scripting/game-systems/ui-scripting.md#ink-inspector) and select your ink widget. In the [Context](/scripting-cyberpunk/scripting/game-systems/ui-scripting.md#context-tab) tab, you'll see the respective `.inkWidget` file that widget spawned from.

You can open that file with [WolvenKit](https://wiki.redmodding.org/wolvenkit/) and see.
