> Agent-readable docs index: /llms.txt. Download /docs.zip to grep all markdown files locally.

---
title: ui
description: Create and interact with cheat menu controls
icon: layout
---

The `ui` namespace lets you create menu controls and read menu state. Use `ui.create` to build groups and items, `ui.find` to locate existing controls, and the `MenuGroup` / `MenuItem` methods to configure them.

## get\_alpha

```lua
ui.get_alpha(): number
```

> Returns the menu opacity as a unit interval (value in the range \[0, 1]).

<Schema title="Returns">
  <SchemaField name="alpha" type="number">
    The menu opacity, in the range \[0, 1].
  </SchemaField>
</Schema>

## get\_size

```lua
ui.get_size(): vector
```

> Returns the current menu size.

<Schema title="Returns">
  <SchemaField name="size" type="vector">
    The current menu size.
  </SchemaField>
</Schema>

## get\_position

```lua
ui.get_position(): vector
```

> Returns the current menu position.

<Schema title="Returns">
  <SchemaField name="position" type="vector">
    The current menu position.
  </SchemaField>
</Schema>

## get\_mouse\_position

```lua
ui.get_mouse_position(): vector
```

> Returns the current mouse position.

<Schema title="Returns">
  <SchemaField name="position" type="vector">
    The current mouse position.
  </SchemaField>
</Schema>

## get\_binds

```lua
ui.get_binds(): table
```

> Returns a table of pointers to hotkeys.

<Schema title="Returns">
  <SchemaField name="binds" type="table">
    A table of pointers to hotkeys.
  </SchemaField>
</Schema>

<AccordionGroup>
  <Accordion title="struct hotkey">
    <Schema>
      <SchemaField name="name" type="string">
        hotkey name.
      </SchemaField>

      <SchemaField name="mode" type="number">
        hotkey mode (1: Hold, 2: Toggle).
      </SchemaField>

      <SchemaField name="value" type="any">
        hotkey value.
      </SchemaField>

      <SchemaField name="active" type="boolean">
        hotkey state.
      </SchemaField>

      <SchemaField name="reference" type="MenuItem">
        Pointer to the menu item.
      </SchemaField>
    </Schema>
  </Accordion>
</AccordionGroup>

## get\_style

```lua
ui.get_style([ name: string ]): color
```

```lua
ui.get_style([ name: string ]): table
```

> Returns the color of the Style Option. Pass `nil` to return a table with the style options.

<Schema title="Parameters">
  <SchemaField name="name" type="string">
    Optional. The name of the style option. Pass `nil` to return a table with all style options.
  </SchemaField>
</Schema>

<Schema title="Returns">
  <SchemaField name="style" type="color">
    The color of the Style Option, or a table of style options when `name` is omitted.
  </SchemaField>
</Schema>

## get\_icon

```lua
ui.get_icon(name: string): string
```

> Returns the unicode converted string corresponding the fontawesome icon.

<Schema title="Parameters">
  <SchemaField name="name" type="string" required>
    The fontawesome icon name.
  </SchemaField>
</Schema>

<Schema title="Returns">
  <SchemaField name="icon" type="string">
    The unicode converted string corresponding to the fontawesome icon.
  </SchemaField>
</Schema>

## create

> Creates and returns a menu group object.

<Tabs>
  <Tab title="Group">
    ```lua
    ui.create(group: string): MenuGroup
    ```

    <Schema title="Parameters">
      <SchemaField name="group" type="string" required>
        Group name.
      </SchemaField>
    </Schema>

    <Schema title="Returns">
      <SchemaField name="group" type="MenuGroup">
        The created menu group object.
      </SchemaField>
    </Schema>
  </Tab>

  <Tab title="Tab">
    ```lua
    ui.create(tab: string, group: string[, column: number]): MenuGroup
    ```

    <Schema title="Parameters">
      <SchemaField name="tab" type="string" required>
        Tab name.
      </SchemaField>

      <SchemaField name="group" type="string" required>
        Group name.
      </SchemaField>

      <SchemaField name="column" type="number">
        Optional. Column ID (1: Left 2: Right or `nil` for automatic alignment.).
      </SchemaField>
    </Schema>

    <Schema title="Returns">
      <SchemaField name="group" type="MenuGroup">
        The created menu group object.
      </SchemaField>
    </Schema>
  </Tab>
</Tabs>

## find

> Returns the `MenuItem`, `MenuGroup`, or `esp_group` object that corresponds to the specified path.

<Tabs>
  <Tab title="Item example">
    ```lua
    ui.find(category: string, tab: string, group: string, item: string): MenuItem
    ```

    <Schema title="Parameters">
      <SchemaField name="category" type="string" required>
        Category name, e.g. "Aimbot" or "Visuals".
      </SchemaField>

      <SchemaField name="tab" type="string" required>
        Tab name that belongs to the category.
      </SchemaField>

      <SchemaField name="group" type="string" required>
        Name of group with the item.
      </SchemaField>

      <SchemaField name="item" type="string" required>
        The needed item.
      </SchemaField>
    </Schema>

    <Schema title="Returns">
      <SchemaField name="item" type="MenuItem">
        The `MenuItem` object that corresponds to the specified path.
      </SchemaField>
    </Schema>

    ```lua
    ui.find(category: string, tab: string, sub_tab: string, group: string, item: string): MenuItem
    ```

    <Schema title="Parameters">
      <SchemaField name="category" type="string" required>
        Category name, e.g. "Aimbot" or "Visuals".
      </SchemaField>

      <SchemaField name="tab" type="string" required>
        Tab name that belongs to the category.
      </SchemaField>

      <SchemaField name="sub_tab" type="string" required>
        Sub-tab name.
      </SchemaField>

      <SchemaField name="group" type="string" required>
        Name of group with the item.
      </SchemaField>

      <SchemaField name="item" type="string" required>
        The needed item.
      </SchemaField>
    </Schema>

    <Schema title="Returns">
      <SchemaField name="item" type="MenuItem">
        The `MenuItem` object that corresponds to the specified path.
      </SchemaField>
    </Schema>
  </Tab>

  <Tab title="Sub-item example">
    ```lua
    ui.find(category: string, tab: string, group: string, item: string, sub_item): MenuItem
    ```

    <Schema title="Parameters">
      <SchemaField name="category" type="string" required>
        Category name, e.g. "Aimbot" or "Visuals".
      </SchemaField>

      <SchemaField name="tab" type="string" required>
        Tab name that belongs to the category.
      </SchemaField>

      <SchemaField name="group" type="string" required>
        Name of group with the item.
      </SchemaField>

      <SchemaField name="item" type="string" required>
        The item with a group (gear) attached.
      </SchemaField>

      <SchemaField name="sub_item" type="any" required>
        The sub-item in the item group.
      </SchemaField>
    </Schema>

    <Schema title="Returns">
      <SchemaField name="item" type="MenuItem">
        The `MenuItem` object that corresponds to the specified path.
      </SchemaField>
    </Schema>

    ```lua
    ui.find(category: string, tab: string, sub_tab: string, group: string, item: string, sub_item): MenuItem
    ```

    <Schema title="Parameters">
      <SchemaField name="category" type="string" required>
        Category name, e.g. "Aimbot" or "Visuals".
      </SchemaField>

      <SchemaField name="tab" type="string" required>
        Tab name that belongs to the category.
      </SchemaField>

      <SchemaField name="sub_tab" type="string" required>
        Sub-tab name.
      </SchemaField>

      <SchemaField name="group" type="string" required>
        Name of group with the item.
      </SchemaField>

      <SchemaField name="item" type="string" required>
        The item with a group (gear) attached.
      </SchemaField>

      <SchemaField name="sub_item" type="any" required>
        The sub-item in the item group.
      </SchemaField>
    </Schema>

    <Schema title="Returns">
      <SchemaField name="item" type="MenuItem">
        The `MenuItem` object that corresponds to the specified path.
      </SchemaField>
    </Schema>
  </Tab>

  <Tab title="Group example">
    ```lua
    ui.find(category: string, tab: string, group: string): MenuGroup
    ```

    <Schema title="Parameters">
      <SchemaField name="category" type="string" required>
        Category name, e.g. "Aimbot" or "Visuals".
      </SchemaField>

      <SchemaField name="tab" type="string" required>
        Tab name that belongs to the category.
      </SchemaField>

      <SchemaField name="group" type="string" required>
        Name of the needed group.
      </SchemaField>
    </Schema>

    <Schema title="Returns">
      <SchemaField name="group" type="MenuGroup">
        The `MenuGroup` object that corresponds to the specified path.
      </SchemaField>
    </Schema>

    ```lua
    ui.find(category: string, tab: string, sub_tab_name: string, group: string): MenuGroup
    ```

    <Schema title="Parameters">
      <SchemaField name="category" type="string" required>
        Category name, e.g. "Aimbot" or "Visuals".
      </SchemaField>

      <SchemaField name="tab" type="string" required>
        Tab name that belongs to the category.
      </SchemaField>

      <SchemaField name="sub_tab" type="string" required>
        Sub-tab name.
      </SchemaField>

      <SchemaField name="group" type="string" required>
        Name of the needed group.
      </SchemaField>
    </Schema>
  </Tab>

  <Tab title="Global item example">
    ```lua
    ui.find(group_name: string, item_name: string): MenuItem
    ```

    <Schema title="Parameters">
      <SchemaField name="group_name" type="string" required>
        Global group name, e.g. "Settings".
      </SchemaField>

      <SchemaField name="item_name" type="string" required>
        Item name, e.g. "Dpi Scale".
      </SchemaField>
    </Schema>

    <Schema title="Returns">
      <SchemaField name="item" type="MenuItem">
        The `MenuItem` object that corresponds to the specified path.
      </SchemaField>
    </Schema>
  </Tab>

  <Tab title="ESP Item example">
    ```lua
    ui.find(category: string, tab: string, sub_tab: string, group: string, item_category: string, item: string): esp_group
    ```

    <Schema title="Parameters">
      <SchemaField name="category" type="string" required>
        Category name.
      </SchemaField>

      <SchemaField name="tab" type="string" required>
        Tab name.
      </SchemaField>

      <SchemaField name="sub_tab" type="string" required>
        Sub-tab name.
      </SchemaField>

      <SchemaField name="group" type="string" required>
        Group name.
      </SchemaField>

      <SchemaField name="item_category" type="string" required>
        Item category name.
      </SchemaField>

      <SchemaField name="item" type="string" required>
        Item name.
      </SchemaField>
    </Schema>

    <Schema title="Returns">
      <SchemaField name="group" type="esp_group">
        The `esp_group` object that corresponds to the specified path.
      </SchemaField>
    </Schema>

    <Note>
      This can return multiple items or `nil` on failure.
    </Note>
  </Tab>
</Tabs>

## sidebar

```lua
ui.sidebar([name: string, icon_name: string]): string, string
```

> Gets or sets the sidebar tab name and an icon. See [fontawesome icons](https://fontawesome.com/v6/search) for `icon_name` values.

<Schema title="Parameters">
  <SchemaField name="name" type="string">
    Optional. Sidebar tab name.
  </SchemaField>

  <SchemaField name="icon_name" type="string">
    Optional. Icon name (Brand icons are currently not supported).
  </SchemaField>
</Schema>

<Schema title="Returns">
  <SchemaField name="name" type="string">
    The sidebar tab name.
  </SchemaField>

  <SchemaField name="icon_name" type="string">
    The sidebar icon name.
  </SchemaField>
</Schema>

## localize

```lua
ui.localize(lang: string, str: string[, localized: string]): string
```

```lua
ui.localize(lang: string, str: string[, localized: string]): nil
```

> Returns the localized string for the specified language code. If `localized` is present, the `str` will be localized accordingly.

<Schema title="Parameters">
  <SchemaField name="lang" type="string" required>
    Language code.
  </SchemaField>

  <SchemaField name="str" type="string" required>
    String to localize or to get the localized string from.
  </SchemaField>

  <SchemaField name="localized" type="string">
    Optional. The localized variant.
  </SchemaField>
</Schema>

<Schema title="Returns">
  <SchemaField name="localized" type="string">
    The localized string, or `nil` when setting a localization.
  </SchemaField>
</Schema>

# `MenuGroup`

## switch

```lua
group:switch(name: string[, init: boolean]): MenuItem
```

> Creates and returns a menu item object, or throws an error on failure.

<Schema title="Parameters">
  <SchemaField name="name" type="string" required>
    Item name.
  </SchemaField>

  <SchemaField name="init" type="boolean">
    Default value.
  </SchemaField>
</Schema>

<Schema title="Returns">
  <SchemaField name="item" type="MenuItem">
    The created menu item object.
  </SchemaField>
</Schema>

## slider

```lua
group:slider(name: string, min: number, max: number[, init: number, scale: number, tooltip: function]): MenuItem
```

> Creates and returns a menu item object, or throws an error on failure.

<Schema title="Parameters">
  <SchemaField name="name" type="string" required>
    Item name.
  </SchemaField>

  <SchemaField name="min" type="number" required>
    Minimum allowed value.
  </SchemaField>

  <SchemaField name="max" type="number" required>
    Maximum allowed value.
  </SchemaField>

  <SchemaField name="init" type="number">
    Default value.
  </SchemaField>

  <SchemaField name="scale" type="number">
    Display value multiplier. Can be used for decimal places.
  </SchemaField>

  <SchemaField name="tooltip" type="string / function">
    A string appends itself to the display value. A function allows you to access the raw display value and displays anything it returns.
  </SchemaField>
</Schema>

<Schema title="Returns">
  <SchemaField name="item" type="MenuItem">
    The created menu item object.
  </SchemaField>
</Schema>

## combo

```lua
group:combo(name: string, items: any[, ...]): MenuItem
```

> Creates and returns a menu item object, or throws an error on failure.

<Schema title="Parameters">
  <SchemaField name="name" type="string" required>
    Item name.
  </SchemaField>

  <SchemaField name="items" type="any" required>
    One or more comma separated values that will be added to the combo. Alternatively, a table of strings that will be added.
  </SchemaField>

  <SchemaField name="..." type="any">
    Additional values to add to the combo.
  </SchemaField>
</Schema>

<Schema title="Returns">
  <SchemaField name="item" type="MenuItem">
    The created menu item object.
  </SchemaField>
</Schema>

## selectable

```lua
group:selectable(name: string, items: any[, ...]): MenuItem
```

> Creates and returns a menu item object, or throws an error on failure.

<Schema title="Parameters">
  <SchemaField name="name" type="string" required>
    Item name.
  </SchemaField>

  <SchemaField name="items" type="any" required>
    One or more comma separated values that will be added to the combo. Alternatively, a table of strings that will be added.
  </SchemaField>

  <SchemaField name="..." type="any">
    Additional values to add to the combo.
  </SchemaField>
</Schema>

<Schema title="Returns">
  <SchemaField name="item" type="MenuItem">
    The created menu item object.
  </SchemaField>
</Schema>

## color\_picker

> Creates and returns a menu item object, or throws an error on failure.

<Tabs>
  <Tab title="Simple">
    ```lua
    group:color_picker(name: string[, color: color]): MenuItem
    ```

    <Schema title="Parameters">
      <SchemaField name="name" type="string" required>
        Item name.
      </SchemaField>

      <SchemaField name="color" type="color">
        Optional. Initial color value.
      </SchemaField>
    </Schema>

    <Schema title="Returns">
      <SchemaField name="item" type="MenuItem">
        The created menu item object.
      </SchemaField>
    </Schema>
  </Tab>

  <Tab title="Multi-Color">
    ```lua
    group:color_picker(name: string, colors: table): MenuItem
    ```

    <Schema title="Parameters">
      <SchemaField name="name" type="string" required>
        Item name.
      </SchemaField>

      <SchemaField name="colors" type="table" required>
        Table containing tables with a string index, and those tables should contain one or multiple color objects. Check UI examples.
      </SchemaField>
    </Schema>

    <Schema title="Returns">
      <SchemaField name="item" type="MenuItem">
        The created menu item object.
      </SchemaField>
    </Schema>
  </Tab>
</Tabs>

## button

```lua
group:button(name: string[, callback: function, alt_style: boolean]): MenuItem
```

> Creates and returns a menu item object, or throws an error on failure.

<Schema title="Parameters">
  <SchemaField name="name" type="string" required>
    Item name.
  </SchemaField>

  <SchemaField name="callback" type="function">
    Optional. Function that will be called when the button is clicked.
  </SchemaField>

  <SchemaField name="alt_style" type="boolean">
    Optional. Pass true to enable the alternative style for the specified button.
  </SchemaField>
</Schema>

<Schema title="Returns">
  <SchemaField name="item" type="MenuItem">
    The created menu item object.
  </SchemaField>
</Schema>

## hotkey

```lua
group:hotkey(name: string[, default_key: number]): MenuItem
```

> Creates and returns a menu item object, or throws an error on failure. See [virtual key codes](https://docs.microsoft.com/en-us/windows/win32/inputdev/virtual-key-codes) for `default_key` values.

<Schema title="Parameters">
  <SchemaField name="name" type="string" required>
    Item name.
  </SchemaField>

  <SchemaField name="default_key" type="number">
    Optional. Default key.
  </SchemaField>
</Schema>

<Schema title="Returns">
  <SchemaField name="item" type="MenuItem">
    The created menu item object.
  </SchemaField>
</Schema>

## input

```lua
group:input(name: string[, text: string]): MenuItem
```

> Creates and returns a menu item object, or throws an error on failure.

<Schema title="Parameters">
  <SchemaField name="name" type="string" required>
    Item name.
  </SchemaField>

  <SchemaField name="text" type="string">
    Optional. Default value.
  </SchemaField>
</Schema>

<Schema title="Returns">
  <SchemaField name="item" type="MenuItem">
    The created menu item object.
  </SchemaField>
</Schema>

## list

```lua
group:list(name: string, items: any[, ...]): MenuItem
```

> Creates and returns a menu item object, or throws an error on failure.

<Schema title="Parameters">
  <SchemaField name="name" type="string" required>
    Item name.
  </SchemaField>

  <SchemaField name="items" type="any" required>
    One or more comma separated values that will be added to the combo. Alternatively, a table of strings that will be added.
  </SchemaField>

  <SchemaField name="..." type="any">
    Additional values to add to the list.
  </SchemaField>
</Schema>

<Schema title="Returns">
  <SchemaField name="item" type="MenuItem">
    The created menu item object.
  </SchemaField>
</Schema>

## listable

```lua
group:listable(name: string, items: any[, ...]): MenuItem
```

> Creates and returns a menu item object, or throws an error on failure.

<Schema title="Parameters">
  <SchemaField name="name" type="string" required>
    Item name.
  </SchemaField>

  <SchemaField name="items" type="any" required>
    One or more comma separated values that will be added to the combo. Alternatively, a table of strings that will be added.
  </SchemaField>

  <SchemaField name="..." type="any">
    Additional values to add to the list.
  </SchemaField>
</Schema>

<Schema title="Returns">
  <SchemaField name="item" type="MenuItem">
    The created menu item object.
  </SchemaField>
</Schema>

## label

```lua
group:label(text: string): MenuItem
```

> Creates and returns a menu item object, or throws an error on failure.

<Schema title="Parameters">
  <SchemaField name="text" type="string" required>
    Label text.
  </SchemaField>
</Schema>

<Schema title="Returns">
  <SchemaField name="item" type="MenuItem">
    The created menu item object.
  </SchemaField>
</Schema>

## texture

```lua
group:texture(texture: texture[, size: vector, color: color, mode: string, rounding: number]): MenuItem
```

> Creates and returns a menu item object, or throws an error on failure.

<Tip>
  Create the texture via the [`load_image`](/csgo/api-reference/namespaces/render#load_image) function.
</Tip>

<Schema title="Parameters">
  <SchemaField name="texture" type="texture" required>
    Image object.
  </SchemaField>

  <SchemaField name="size" type="vector">
    Optional. Size of the image.
  </SchemaField>

  <SchemaField name="color" type="color">
    Optional. Color of the texture.
  </SchemaField>

  <SchemaField name="mode" type="string">
    Optional. f for fill, r for repeat.
  </SchemaField>

  <SchemaField name="rounding" type="number">
    Optional. Image border rounding.
  </SchemaField>
</Schema>

<Schema title="Returns">
  <SchemaField name="item" type="MenuItem">
    The created menu item object.
  </SchemaField>
</Schema>

# `MenuItem`

## get

```lua
item:get(): any
```

> Returns the value of the menu item.

<Schema title="Returns">
  <SchemaField name="value" type="any">
    The value of the menu item.
  </SchemaField>
</Schema>

## id

```lua
item:id(): number
```

> Returns the unique id of the menu item.

<Schema title="Returns">
  <SchemaField name="id" type="number">
    The unique id of the menu item.
  </SchemaField>
</Schema>

<Heading level={2} id="list-1">
  list
</Heading>

```lua
item:list(): table
```

> Returns the list of items. `combo` / `selectable` menu item objects only.

<Schema title="Returns">
  <SchemaField name="list" type="table">
    The list of items.
  </SchemaField>
</Schema>

## type

```lua
item:type(): string
```

> Returns the type of the menu item.

<Schema title="Returns">
  <SchemaField name="type" type="string">
    The type of the menu item.
  </SchemaField>
</Schema>

## override

```lua
item:override(value: any[, ...])
```

> Overrides the item value without changing the menu / config values. If the `value` argument is `nil` or missing, the override is undone.

<Schema title="Parameters">
  <SchemaField name="value" type="any" required>
    The value to which the menu item will be set.
  </SchemaField>

  <SchemaField name="..." type="any">
    Additional values for the override.
  </SchemaField>
</Schema>

## get\_override

```lua
item:get_override(): any
```

> Returns the value of the menu item it's overriden to.

<Schema title="Returns">
  <SchemaField name="value" type="any">
    The value the menu item is overriden to.
  </SchemaField>
</Schema>

## update

```lua
item:update(...)
```

> Updates the values of the menu item.

<Schema title="Parameters">
  <SchemaField name="..." type="any">
    The new values for the menu item.
  </SchemaField>
</Schema>

## reset

```lua
item:reset()
```

> Resets the menu item to it's original value.

## set

```lua
item:set(value: any[, ...])
```

> Sets the value of the menu item.

<Schema title="Parameters">
  <SchemaField name="value" type="any" required>
    The value to which the menu item will be set.
  </SchemaField>

  <SchemaField name="..." type="any">
    Additional values to set.
  </SchemaField>
</Schema>

## name

```lua
item:name([value: any])
```

> Gets or sets the name of the menu item.

<Schema title="Parameters">
  <SchemaField name="value" type="any">
    New name.
  </SchemaField>
</Schema>

## tooltip

```lua
item:tooltip([value: any])
```

> Gets or sets the tooltip of the menu item (depending on the presence of the `value` parameter).

<Schema title="Parameters">
  <SchemaField name="value" type="any">
    New tooltip text.
  </SchemaField>
</Schema>

## visibility

```lua
item:visibility([state: boolean])
```

> Gets or sets the menu item visibility depending on the value of `state`.

<Schema title="Parameters">
  <SchemaField name="state" type="boolean">
    New visibility state.
  </SchemaField>
</Schema>

## disabled

```lua
item:disabled([state: boolean])
```

> Gets or sets the menu item disabled state depending on the value of `state`.

<Schema title="Parameters">
  <SchemaField name="state" type="boolean">
    New disabled state.
  </SchemaField>
</Schema>

## set\_callback

```lua
item:set_callback(callback: function[, force_call: boolean])
```

> Sets the callback to the specified menu item.

<Schema title="Parameters">
  <SchemaField name="callback" type="function" required>
    Function that will be called when the menu item is interacted with.
  </SchemaField>

  <SchemaField name="force_call" type="boolean">
    Pass true to call the callback function after setup.
  </SchemaField>
</Schema>

## unset\_callback

```lua
item:unset_callback(callback: function)
```

> Unsets the callback that was set via the `:set_callback` function.

<Schema title="Parameters">
  <SchemaField name="callback" type="function" required>
    Lua function that was passed to the `:set_callback` function.
  </SchemaField>
</Schema>

<Heading level={2} id="color_picker-1">
  color_picker
</Heading>

> Attaches a color picker to the current menu item object.

<Tabs>
  <Tab title="Simple">
    ```lua
    item:color_picker([color: color]): MenuItem
    ```

    <Schema title="Parameters">
      <SchemaField name="color" type="color">
        Optional. Initial color value.
      </SchemaField>
    </Schema>

    <Schema title="Returns">
      <SchemaField name="item" type="MenuItem">
        The menu item object with the color picker attached.
      </SchemaField>
    </Schema>
  </Tab>

  <Tab title="Multi-Color">
    ```lua
    item:color_picker([colors: table]): MenuItem
    ```

    <Schema title="Parameters">
      <SchemaField name="colors" type="table">
        Table containing tables with a string index, and those tables should contain one or multiple color objects. Check UI examples.
      </SchemaField>
    </Schema>

    <Schema title="Returns">
      <SchemaField name="item" type="MenuItem">
        The menu item object with the color picker attached.
      </SchemaField>
    </Schema>
  </Tab>
</Tabs>

<Heading level={2} id="create-1">
  create
</Heading>

```lua
item:create(): MenuGroup
```

> Attaches a group (gear) to the current menu item object.

<Schema title="Returns">
  <SchemaField name="group" type="MenuGroup">
    The attached group object.
  </SchemaField>
</Schema>

## parent

```lua
item:parent(): MenuItem
```

```lua
item:parent(): MenuGroup
```

> Returns the parent object of the menu item.

<Schema title="Returns">
  <SchemaField name="parent" type="MenuItem">
    The parent object of the menu item, either a `MenuItem` or a `MenuGroup`.
  </SchemaField>
</Schema>
