@wordpress/block-library
Version:
Block library for the WordPress editor.
121 lines (120 loc) • 2.48 kB
JSON
{
"$schema": "https://schemas.wp.org/trunk/block.json",
"__experimental": true,
"apiVersion": 3,
"name": "core/tabs",
"title": "Tabs",
"description": "Display content in a tabbed interface to help users navigate detailed content with ease.",
"version": "1.0.0",
"category": "design",
"textdomain": "default",
"allowedBlocks": [
"core/tabs-menu",
"core/tab-panels"
],
"attributes": {
"activeTabIndex": {
"type": "number",
"default": 0
},
"editorActiveTabIndex": {
"type": "number",
"role": "local"
}
},
"supports": {
"align": true,
"anchor": true,
"color": {
"text": false,
"background": false
},
"layout": {
"default": {
"type": "flex",
"flexWrap": "nowrap",
"justifyContent": "stretch",
"verticalAlignment": "stretch",
"orientation": "vertical"
},
"allowSwitching": false,
"allowVerticalAlignment": true,
"allowJustification": true,
"allowOrientation": true,
"allowSizingOnChildren": true
},
"html": false,
"interactivity": true,
"spacing": {
"blockGap": true,
"margin": true,
"padding": true
},
"typography": {
"fontSize": true,
"__experimentalFontFamily": true
},
"renaming": true
},
"example": {
"attributes": {
"className": "is-example"
},
"innerBlocks": [
{
"name": "core/tabs-menu",
"attributes": {},
"innerBlocks": [
{
"name": "core/tabs-menu-item",
"attributes": {}
}
]
},
{
"name": "core/tab-panels",
"attributes": {},
"innerBlocks": [
{
"name": "core/tab",
"attributes": {
"label": "Tab 1"
},
"innerBlocks": [
{
"name": "core/paragraph",
"attributes": {
"content": "Pariatur commodo sint mollit. Veniam Lorem labore voluptate fugiat. Ad nulla est labore cillum cillum qui nostrud do incididunt eiusmod."
}
}
]
},
{
"name": "core/tab",
"attributes": {
"label": "Tab 2"
}
},
{
"name": "core/tab",
"attributes": {
"label": "Tab 3"
}
}
]
}
]
},
"providesContext": {
"core/tabs-activeTabIndex": "activeTabIndex",
"core/tabs-editorActiveTabIndex": "editorActiveTabIndex"
},
"usesContext": [
"core/tabs-list",
"core/tabs-id"
],
"editorScript": "file:./index.js",
"editorStyle": "file:./index.css",
"style": "file:./style-index.css",
"viewScriptModule": "@wordpress/block-library/tabs/view"
}