> ## Documentation Index
> Fetch the complete documentation index at: https://docs.jaksam-scripts.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Close inventory

> Closes the inventory UI. Can either close a specific inventory or close the entire inventory UI.

Closes the inventory UI. Can either close a specific inventory or close the entire inventory UI.

<CodeGroup>
  ```lua Export theme={null}
  exports['jaksam_inventory']:closeInventory(inventoryId)
  ```

  ```lua Example theme={null}
  -- Close the entire inventory UI
  exports['jaksam_inventory']:closeInventory()

  -- Close a specific inventory (e.g., a stash)
  exports['jaksam_inventory']:closeInventory('police_stash_1')

  -- Force close inventory after a specific event
  AddEventHandler('myScript:forceCloseInventory', function()
      exports['jaksam_inventory']:closeInventory()
  end)
  ```
</CodeGroup>

### Parameters

| Name          | Data Type     | Description                                                                                                                    |
| ------------- | ------------- | ------------------------------------------------------------------------------------------------------------------------------ |
| `inventoryId` | string \| nil | If provided, removes only the specified inventory from the UI. If nil, closes the entire inventory UI and all open inventories |

### Return value

None.


## Related topics

- [Client](/jaksam-inventory/functions/client/index.md)
- [Installation](/drugs-creator/installation.md)
- [Set jaksam weapon wheel](/jaksam-inventory/functions/client/set-jaksam-weapon-wheel.md)
- [Action Buttons](/jaksam-inventory/guides/action-buttons.md)
