> For the complete documentation index, see [llms.txt](https://corem.gitbook.io/corem/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://corem.gitbook.io/corem/crm-radialmenu/exports.md).

# Exports

{% hint style="danger" %}
Prior experience as a developer or basic programming skills are recommended to effectively navigate this section of the documentation.
{% endhint %}

The **crm-radialmenu** script allows you to dynamically add or remove menus and items using exports.

> **💡qb-radiamenu bridge**
>
> If a script supports **qb-radialmenu** exports, you don’t need to reconfigure anything.\
> crm-radialmenu includes an automatic compatibility bridge.

***

### 🔹 add

*Add a new menu **or** add new items to an existing menu.*

```lua
-- Add a new item to an existing menu:
exports['crm-radialmenu']:add(
    {
        crm_menu = "crm-citizen",
        crm_items = {
            {
                crm_id = 'crm-test-item-1',
                crm_title = "New Item 1",
                crm_icon = "globe",
                crm_close = true,
                crm_click = function() 
                    print('New Item 1 Clicked')
                end,
            },
            {
                crm_id = 'crm-test-item-2',
                crm_title = "New Item 2",
                crm_icon = "globe",
                crm_close = true,
                crm_action = {crm_type = "crm-client", crm_event = "qb-phone:client:GiveContactDetails", crm_args = {}},
            },
        },
    }
)

-- Add a new menu to the radial:
exports['crm-radialmenu']:add(
    {
        crm_id = 'crm-new-menu',
        crm_title = "My New Menu",
        crm_icon = "car",
        crm_items = {
            {
                crm_id = 'crm-new-menu-1',
                crm_title = "Menu Item 1",
                crm_icon = "car",
                crm_close = true,
                crm_command = "commandname", -- Execute /commandname
            },
        },
    }
)
```

***

### 🔹 remove

Remove items from an existing menu or remove an entire menu by ID.

```lua
-- Remove an item from an existing menu:
exports['crm-radialmenu']:remove(
    {crm_menu = "crm-citizen", crm_items = {"crm-test-item-1", "crm-test-item-2"}}
)

-- Remove a menu from the radial:
exports['crm-radialmenu']:remove("crm-new-menu")
```


---

# 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:

```
GET https://corem.gitbook.io/corem/crm-radialmenu/exports.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
