# Configuration

Slots, weight, item images, and changing the colours and slot size.

## No settings of its own

The redesign has no config file. It follows the settings ox_inventory already reads from `server.cfg`, and shows whatever they say.

## Slots and weight

```cfg server.cfg
setr inventory:slots 50
setr inventory:weight 30000
```

| Setting | Default | What the interface does with it |
| --- | --- | --- |
| `inventory:slots` | `50` | Number of player slots. The grid scrolls to fit more. |
| `inventory:weight` | `30000` | Maximum carry weight, shown in the weight bar. |

The [ox_inventory documentation](https://overextended.dev/docs/ox_inventory) lists every other setting. All of them work as before.

## Item images

Item images are PNG files in `ox_inventory/web/images`, named after the item. The redesign loads them the same way ox_inventory always has.

To add an image for your own item, place a PNG named after the item in that folder. The bundled artwork is 512×512 with a transparent background; matching that keeps your items consistent with the rest.

If you keep images somewhere else, the usual setting still applies:

```cfg server.cfg
setr inventory:imagepath "nui://ox_inventory/web/images"
```

An item with no image leaves its slot blank.

## Customise the look

All styling lives in `web/src/index.scss`. Changing it needs [Node.js](https://nodejs.org) 18 or later on your own computer.

The variables at the top of the file set the theme:

| Variable | Controls |
| --- | --- |
| `$cyan`, `$violet`, `$pink` | Accent colours |
| `$text`, `$muted` | Text colours |
| `$font` | Font family |
| `--slot-size` | Size of each slot |
| `--grid-gap` | Space between slots |

After changing them, build the interface again and restart the resource:

```bash ox_inventory/web
npm install --legacy-peer-deps
npm run build
```

Then run `ensure ox_inventory` in the server console.

## Preview in a browser

You can work on the interface without starting a server. The preview shows a player inventory and a vehicle trunk filled with sample items, and updates as you save.

```bash ox_inventory/web
npm install --legacy-peer-deps --no-package-lock
npm run dev:browser
```

This opens `http://127.0.0.1:5173/`. The sample items exist only in this preview and are never included in the built interface.

## Font

The interface asks for the **Inter** font and falls back to Segoe UI, then Arial. No font file is bundled, so players without Inter installed see the fallback.
