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="actions" 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 |
"actions" |
Yes | The block’s type. |
actions |
array of object |
Yes | The buttons, each with its label, href, variant and whether it shows an arrow. |
alignment |
"start" or "center" or "end" |
No | How its content aligns: start, center or end. |
secondaryDefaultVariant |
"secondary" or "ghost" |
No | The look of every button after the first that names no variant. |
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": "actions",
"description": "The block's type."
},
"actions": {
"type": "array",
"items": {
"type": "object",
"properties": {
"label": {
"type": "string"
},
"href": {
"type": "string"
},
"variant": {
"type": "string",
"enum": [
"primary",
"secondary",
"ghost"
]
},
"showArrow": {
"type": "boolean"
}
},
"required": [
"label",
"href"
],
"additionalProperties": false
},
"description": "The buttons, each with its `label`, `href`, `variant` and whether it shows an arrow."
},
"alignment": {
"type": "string",
"enum": [
"start",
"center",
"end"
],
"description": "How its content aligns: `start`, `center` or `end`."
},
"secondaryDefaultVariant": {
"type": "string",
"enum": [
"secondary",
"ghost"
],
"description": "The look of every button after the first that names no `variant`."
},
"hidden": {
"type": "boolean",
"description": "Whether the block is hidden: it, and every block it holds, doesn't show."
}
},
"required": [
"id",
"type",
"actions"
],
"description": "A row of link buttons.",
"additionalProperties": false
}