Alpha: Ships on npm at 7.0.0-alpha.07.0.0-alpha.0
faq
A heading beside questions that open in place, every one closed at first.
Carried by the api-product Template. Seen on pages/harbor/pricing.json, section 3.
Variant
{
"kind": "section",
"shell": {
"inset": "contained",
"density": "section"
},
"block": {
"type": "faq",
"head": {
"eyebrow": "Questions",
"title": "Before you choose."
},
"items": [
{
"q": "What counts as a call?",
"a": "One request to any route. A tide table for 14 days is one call."
},
{
"q": "What happens past the limit?",
"a": "Calls past the month’s limit return 429 until the month turns. Nothing is billed past the plan."
},
{
"q": "Can I change plans?",
"a": "Yes, at any time. The new limit applies from the next call."
}
]
}
}
{
"title": "faq",
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "faq"
},
"head": {
"type": "object",
"properties": {
"eyebrow": {
"type": "string",
"minLength": 1,
"maxLength": 28
},
"title": {
"type": "string",
"minLength": 1,
"maxLength": 72
},
"lede": {
"type": "string",
"minLength": 1,
"maxLength": 300
},
"max": {
"type": "string",
"pattern": "^(none|\\d+(\\.\\d+)?(em|ch|px))$"
},
"ledeMax": {
"type": "string",
"pattern": "^(none|\\d+(\\.\\d+)?(em|ch|px))$"
},
"balance": {
"type": "boolean"
},
"scale": {
"type": "string",
"enum": [
"compact",
"large"
]
},
"tag": {
"type": "string",
"minLength": 1,
"maxLength": 8
},
"layout": {
"type": "string",
"enum": [
"split"
]
}
},
"required": [
"eyebrow"
],
"additionalProperties": false
},
"items": {
"minItems": 1,
"maxItems": 10,
"type": "array",
"items": {
"type": "object",
"properties": {
"q": {
"type": "string",
"minLength": 1,
"maxLength": 64
},
"a": {
"type": "string",
"minLength": 1,
"maxLength": 420
}
},
"required": [
"q",
"a"
],
"additionalProperties": false
}
},
"groups": {
"minItems": 1,
"maxItems": 4,
"type": "array",
"items": {
"type": "object",
"properties": {
"title": {
"type": "string",
"minLength": 1,
"maxLength": 24
},
"items": {
"minItems": 1,
"maxItems": 6,
"type": "array",
"items": {
"type": "object",
"properties": {
"q": {
"type": "string",
"minLength": 1,
"maxLength": 64
},
"a": {
"type": "string",
"minLength": 1,
"maxLength": 420
}
},
"required": [
"q",
"a"
],
"additionalProperties": false
}
}
},
"required": [
"title",
"items"
],
"additionalProperties": false
}
}
},
"required": [
"type",
"head"
],
"additionalProperties": false
}{
"kind": "section",
"shell": { "inset": "contained", "density": "section" },
"block": {
"type": "faq",
"head": { "eyebrow": "Questions", "title": "Before you choose." },
"items": [
{ "q": "What counts as a call?", "a": "One request to any route. A tide table for 14 days is one call." },
{ "q": "What happens past the limit?", "a": "Calls past the month’s limit return 429 until the month turns. Nothing is billed past the plan." },
{ "q": "Can I change plans?", "a": "Yes, at any time. The new limit applies from the next call." }
]
}
}Smallest that parses
{
"type": "faq",
"head": { "eyebrow": "Questions", "title": "Before you choose." },
"items": [
{ "q": "What counts as a call?", "a": "One request to any route. A tide table for 14 days is one call." },
{ "q": "What happens past the limit?", "a": "Calls past the month’s limit return 429 until the month turns. Nothing is billed past the plan." },
{ "q": "Can I change plans?", "a": "Yes, at any time. The new limit applies from the next call." }
]
}Props
From @mdxui/site@7.0.0-alpha.0. A count reads as min–max × item; a string bound is its maximum length in characters, and links its refusal.
| Prop | Type and bound | Required |
|---|---|---|
head | object | yes |
head.eyebrow | string ≤28 | yes |
head.title | string ≤72 | no |
head.lede | string ≤300 | no |
head.max | string (pattern) | no |
head.ledeMax | string (pattern) | no |
head.balance | boolean | no |
head.scale | "compact" | "large" | no |
head.tag | string ≤8 | no |
head.layout | "split" | no |
items | 1–10 × object | no |
items[].q | string ≤64 | yes |
items[].a | string ≤420 | yes |
groups | 1–4 × object | no |
groups[].title | string ≤24 | yes |
groups[].items | 1–6 × object | yes |
groups[].items[].q | string ≤64 | yes |
groups[].items[].a | string ≤420 | yes |
Use instead
text-stack: answers that stay open