build/scripts/block-library/form-input
block.json
1.5 KB
4 months ago
block.json in Gutenberg 23.2.0, at build/scripts/block-library/form-input/block.json
| 1 | { |
| 2 | "$schema": "https://schemas.wp.org/trunk/block.json", |
| 3 | "apiVersion": 3, |
| 4 | "__experimental": true, |
| 5 | "name": "core/form-input", |
| 6 | "title": "Input Field", |
| 7 | "category": "widgets", |
| 8 | "ancestor": [ "core/form" ], |
| 9 | "description": "The basic building block for forms.", |
| 10 | "keywords": [ "input", "form" ], |
| 11 | "textdomain": "default", |
| 12 | "attributes": { |
| 13 | "type": { |
| 14 | "type": "string", |
| 15 | "default": "text" |
| 16 | }, |
| 17 | "name": { |
| 18 | "type": "string" |
| 19 | }, |
| 20 | "label": { |
| 21 | "type": "rich-text", |
| 22 | "default": "Label", |
| 23 | "selector": ".wp-block-form-input__label-content", |
| 24 | "source": "rich-text", |
| 25 | "role": "content" |
| 26 | }, |
| 27 | "inlineLabel": { |
| 28 | "type": "boolean", |
| 29 | "default": false |
| 30 | }, |
| 31 | "required": { |
| 32 | "type": "boolean", |
| 33 | "default": false, |
| 34 | "selector": ".wp-block-form-input__input", |
| 35 | "source": "attribute", |
| 36 | "attribute": "required" |
| 37 | }, |
| 38 | "placeholder": { |
| 39 | "type": "string", |
| 40 | "selector": ".wp-block-form-input__input", |
| 41 | "source": "attribute", |
| 42 | "attribute": "placeholder", |
| 43 | "role": "content" |
| 44 | }, |
| 45 | "value": { |
| 46 | "type": "string", |
| 47 | "default": "", |
| 48 | "selector": "input", |
| 49 | "source": "attribute", |
| 50 | "attribute": "value" |
| 51 | }, |
| 52 | "visibilityPermissions": { |
| 53 | "type": "string", |
| 54 | "default": "all" |
| 55 | } |
| 56 | }, |
| 57 | "supports": { |
| 58 | "anchor": true, |
| 59 | "reusable": false, |
| 60 | "spacing": { |
| 61 | "margin": [ "top", "bottom" ] |
| 62 | }, |
| 63 | "__experimentalBorder": { |
| 64 | "radius": true, |
| 65 | "__experimentalSkipSerialization": true, |
| 66 | "__experimentalDefaultControls": { |
| 67 | "radius": true |
| 68 | } |
| 69 | } |
| 70 | }, |
| 71 | "style": [ "wp-block-form-input" ] |
| 72 | } |
| 73 |