> For the complete documentation index, see [llms.txt](https://gtadocs.gta-explore.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://gtadocs.gta-explore.com/card-menu/client-exports.md).

# Client Exports

## OpenMenu

This export opens the card menu with the given options.

### Example

<pre class="language-lua"><code class="lang-lua">local cards = {
    {
        image = "https://cfx-nui-oss_cardmenu/images/families.png",
        label = "Families",
    },
    {
        image = "https://cfx-nui-oss_cardmenu/images/vagos.webp",
        label = "Vagos",
    },
    {
        image = "https://cfx-nui-oss_cardmenu/images/ballas.webp",
        label = "Ballas",
    },
    {
        image = "https://cfx-nui-oss_cardmenu/images/lostmc.webp",
        label = "Lost MC",
    }
}

<strong>exports.oss_cardmenu:OpenCardMenu({
</strong>    line = 2,
    canClose = true,
    cards = cards,
    color = "white",
    callback = function (data)
        ShowNotification("Gang Selection", data.label, "You're now a member of ~b~"..data.label.."~s~.")
    end
})
</code></pre>

### Options

<table><thead><tr><th width="131" data-type="checkbox">Mandatory</th><th width="125">Option</th><th width="124">Type</th><th>Purpose</th></tr></thead><tbody><tr><td>true</td><td>line</td><td>integer</td><td>Maximum number of cards per line.</td></tr><tr><td>true</td><td>cards</td><td>table (array)</td><td>Cards data containing <code>label</code> and <code>image</code> as mandatory data, and any additional data for callback.</td></tr><tr><td>true</td><td>callback</td><td>function</td><td>Function called with the selected card data as argument.</td></tr><tr><td>false</td><td>canClose</td><td>boolean</td><td>Allows the player to close the menu with <strong>Esc</strong>.</td></tr><tr><td>false</td><td>color</td><td>string</td><td>Any CSS color (hex, color, rgba, ect.)</td></tr></tbody></table>

## CloseMenu

This export closes the card menu.

### Example

```lua
exports.oss_cardmenu()
```
