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 | Yes | Yes |
| An article | Yes | Yes |
A text holds it as a <block type="pricing" 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 |
"pricing" |
Yes | The block’s type. |
plans |
array of object |
Yes | Each plan: its name, price (as shown), optional discountedPrice, description and highlight, its features (a name, or a name with a description and a state) and up to two actions. |
footnote |
string |
No | A note under the plans. |
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": "pricing",
"description": "The block's type."
},
"plans": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"price": {
"type": "string"
},
"discountedPrice": {
"type": "string"
},
"description": {
"type": "string"
},
"highlight": {
"type": "boolean"
},
"features": {
"type": "array",
"items": {
"anyOf": [
{
"type": "string"
},
{
"type": "object",
"properties": {
"name": {
"type": "string"
},
"description": {
"type": "string"
},
"state": {
"type": "string",
"enum": [
"available",
"beta",
"unavailable",
"unsupported"
]
}
},
"required": [
"name"
],
"additionalProperties": false
}
]
}
},
"primaryAction": {
"type": "object",
"properties": {
"label": {
"type": "string"
},
"href": {
"type": "string"
},
"variant": {
"type": "string",
"enum": [
"primary",
"secondary",
"ghost"
]
},
"showArrow": {
"type": "boolean"
}
},
"required": [
"label",
"href"
],
"additionalProperties": false
},
"secondaryAction": {
"type": "object",
"properties": {
"label": {
"type": "string"
},
"href": {
"type": "string"
},
"variant": {
"type": "string",
"enum": [
"primary",
"secondary",
"ghost"
]
},
"showArrow": {
"type": "boolean"
}
},
"required": [
"label",
"href"
],
"additionalProperties": false
}
},
"required": [
"name",
"price",
"features"
],
"additionalProperties": false
},
"description": "Each plan: its `name`, `price` (as shown), optional `discountedPrice`, `description` and `highlight`, its `features` (a name, or a name with a `description` and a `state`) and up to two actions."
},
"footnote": {
"type": "string",
"description": "A note under the plans."
},
"hidden": {
"type": "boolean",
"description": "Whether the block is hidden: it, and every block it holds, doesn't show."
}
},
"required": [
"id",
"type",
"plans"
],
"description": "Plans side by side, with their prices and features.",
"additionalProperties": false
}