# Product inventory

<figure><img src="https://3723856256-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FGnixyIfIYFWroNtVmZo6%2Fuploads%2Fgit-blob-aefdadcdbc925c68fef07942f7038e1c72a71a04%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

## Overview

This block displays the inventory level of a product and provides visual feedback when the inventory falls below a specified inventory\_threshold. It is designed to alert users when stock is low, using customizable settings for appearance and behavior.

## Common use cases

* Use this block to alert customers when product inventory is low, encouraging them to purchase before stock runs out
* Ensure the product and inventory\_threshold settings are configured correctly to provide accurate inventory alerts
* Display stock availability information on product pages and product cards

## Block settings

### General

| Setting                | Description                 | Options                   |
| ---------------------- | --------------------------- | ------------------------- |
| Show advanced settings | Reveals visibility settings | Checkbox (default: false) |

### Content

| Setting             | Description                                        | Options                   |
| ------------------- | -------------------------------------------------- | ------------------------- |
| Product             | Select the product to display inventory for        | Product picker            |
| Inventory threshold | Minimum stock level before showing inventory alert | Number input (default: 5) |

### Spacing

| Setting                   | Description                                          | Options                   |
| ------------------------- | ---------------------------------------------------- | ------------------------- |
| Enable horizontal padding | Adds horizontal padding around the inventory display | Checkbox (default: false) |
| Enable top padding        | Adds top padding around the inventory display        | Checkbox (default: false) |
| Enable bottom padding     | Adds bottom padding around the inventory display     | Checkbox (default: false) |

### Color

| Setting    | Description             | Options                                                                                                                                                                                                                                                      |
| ---------- | ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Text color | Controls the text color | <p>• Default (default)<br>• Alternative<br>• Primary background<br>• Primary foreground<br>• Secondary background<br>• Secondary foreground<br>• Tertiary background<br>• Tertiary foreground<br>• Neutral background<br>• Neutral foreground<br>• Shade</p> |

### Style

| Setting     | Description                                          | Options                                                                                                                                                           |
| ----------- | ---------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Font family | Controls the font family used for the inventory text | <p>• Standard<br>• Heading<br>• Subheading<br>• Accent<br><br>Visible when font size contains 'type--'</p>                                                        |
| Font size   | Controls the font size of the inventory text         | <p>• Smaller<br>• Small<br>• Default (default)<br>• Big<br>• Bigger<br>• Heading 1<br>• Heading 2<br>• Heading 3<br>• Heading 4<br>• Heading 5<br>• Heading 6</p> |

### Layout

| Setting              | Description                   | Options                                        |
| -------------------- | ----------------------------- | ---------------------------------------------- |
| Horizontal alignment | Controls horizontal alignment | <p>• Left (default)<br>• Center<br>• Right</p> |

### Display

| Setting    | Description                        | Options                                                                                                                            |
| ---------- | ---------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
| Visibility | Controls when the block is visible | <p>• All (default)<br>• Mobile only<br>• Desktop only</p><p><br><br>Visible when <strong>Show advanced settings</strong> is on</p> |
