Skip to content

background-image

An image the page's background takes while the blocks after it show.

Where it sits

Body In the body Inside its texts
The store’s home Yes Yes
A custom page Yes Yes
A product’s page Yes Yes
An event’s page Yes Yes
A portfolio’s page Yes Yes
A lesson No No
An article Yes No

A text holds it as a <block type="background-image" props="…"></block> element: its props are those below but type, which the element’s own type names.

See Bodies for how a body holds its blocks.

Props

Name Type Required Description
id string Yes The block’s id, unique within its body.
type "background-image" Yes The block’s type.
src string No An external URL, when no fileId names a store file. Defaults to "".
width number No Its width in pixels.
height number No Its height in pixels.
fileId string No A store file’s id, listed in the read’s files.
hidden boolean No Whether the block is hidden: it, and every block it holds, doesn’t show.

JSON Schema

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "The block's id, unique within its body."
    },
    "type": {
      "type": "string",
      "const": "background-image",
      "description": "The block's type."
    },
    "src": {
      "default": "",
      "type": "string",
      "description": "An external URL, when no `fileId` names a store file."
    },
    "width": {
      "type": "number",
      "description": "Its width in pixels."
    },
    "height": {
      "type": "number",
      "description": "Its height in pixels."
    },
    "fileId": {
      "type": "string",
      "description": "A store file's id, listed in the read's `files`."
    },
    "hidden": {
      "type": "boolean",
      "description": "Whether the block is hidden: it, and every block it holds, doesn't show."
    }
  },
  "required": [
    "id",
    "type"
  ],
  "description": "An image the page's background takes while the blocks after it show.",
  "additionalProperties": false
}

Type to search…

↑↓ navigate↵ selectEsc close