govuk-frontend
Version:
GOV.UK Frontend contains the code you need to start building a user interface for government platforms and services.
85 lines (84 loc) • 3.07 kB
JSON
[
{
"name": "id",
"type": "string",
"required": false,
"description": "This is used for the main component and to compose the ID attribute for each item."
},
{
"name": "idPrefix",
"type": "string",
"required": false,
"description": "Optional prefix. This is used to prefix the `id` attribute for each tab item and panel, separated by `-`."
},
{
"name": "title",
"type": "string",
"required": false,
"description": "Title for the tabs table of contents."
},
{
"name": "items",
"type": "array",
"required": true,
"description": "The individual tabs within the tabs component.",
"params": [
{
"name": "id",
"type": "string",
"required": true,
"description": "Specific ID attribute for the tab item. If omitted, then `idPrefix` string is required instead."
},
{
"name": "label",
"type": "string",
"required": true,
"description": "The text label of a tab item."
},
{
"name": "attributes",
"type": "object",
"required": false,
"description": "HTML attributes (for example data attributes) to add to the tab."
},
{
"name": "panel",
"description": "The contents of each tab within the tabs component. This is referenced as a panel.",
"type": "object",
"required": true,
"params": [
{
"name": "text",
"type": "string",
"required": true,
"description": "If `html` is set, this is not required. Text to use within each tab panel. If `html` is provided, the `text` option will be ignored."
},
{
"name": "html",
"type": "string",
"required": true,
"description": "If `text` is set, this is not required. HTML to use within each tab panel. If `html` is provided, the `text` option will be ignored."
},
{
"name": "attributes",
"type": "object",
"required": false,
"description": "HTML attributes (for example data attributes) to add to the tab panel."
}
]
}
]
},
{
"name": "classes",
"type": "string",
"required": false,
"description": "Classes to add to the tabs component."
},
{
"name": "attributes",
"type": "object",
"required": false,
"description": "HTML attributes (for example data attributes) to add to the tabs component."
}
]