---
title: "Storefront slots and blocks"
description: "Render plugin content in fixed storefront slots with declarative blocks and forms."
---

> Documentation Index
> Fetch the complete documentation index at: https://edgecart.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Storefront slots and blocks

Plugins can add content to the storefront through fixed slots. The host renders
validated blocks as text and form controls; plugins do not inject scripts into
the storefront.

## Slots

Declare blocks per slot in the manifest:

```json
{
  "capabilities": ["storefront:ui"],
  "hooks": ["storefront:slot", "storefront:action"],
  "storefront": {
    "slots": {
      "product.detail.below": [
        {
          "type": "callout",
          "tone": "info",
          "title": "Loyalty members",
          "text": "Earn points on this order."
        }
      ]
    }
  }
}
```

Available slots:

- `product.detail.below`
- `product.detail.sidebar`
- `cart.footer`
- `cart.empty`
- `checkout.beforeSubmit`
- `storefront.footer`
- `storefront.chat`

The storefront fetches slot blocks from `GET /api/store/plugins/ui?slot=…`.
Responses are `private` so a shared cache cannot mix stores.

## Blocks

Use the same declarative block shapes as the admin UI, with storefront-safe
types such as text, callout, image, button, link, table, form, and iframe.

- Blocks are bounded data; the host validates types, sizes, and URLs.
- Iframes use a sandbox without `allow-same-origin`.
- Absolute HTTPS iframe URLs must be in `allowedHosts`, or the plugin must hold
  `network:request:unrestricted`.
- Static plugin assets are served by the assets Worker from a separate origin.

## Forms

A storefront form posts to:

```http
POST /api/store/plugins/forms/:installId/:formId
```

The host validates the submitted values against the manifest's form schema,
then invokes the plugin's `storefront:action` hook in the sandbox. Raw plugin
errors are not echoed to the shopper.

## Limits

- Request bodies are capped while streaming.
- UI responses are `private`.
- Only active, approved, non-yanked installations render.
- Blocks that fail validation are omitted rather than rendered partially.

## Related

- [Admin UI with Block Kit](https://edgecart.dev/plugins/admin-ui)
- [Capabilities and hooks](https://edgecart.dev/plugins/capabilities-hooks)
- [Storefront appearance](https://edgecart.dev/merchants/storefront)

Source: https://edgecart.dev/plugins/storefront/index.mdx
