Bricks Schema 中文文档:阴影控件

📄 原始资料  |  展开查看原始 JSON(box-shadow.json){ “$schema”: “https://json-schema.org/draft/2020-12/schema”, “$id”: “bricks://controls/box-shadow”, “schemaVersion”: “2.3”, “title”: “Box Shadow Control”, “description”: “Box shadow settings”, “controlProperties”: [ “type”, “label”, “group”, “css”, “h…

📄 原始资料  |  展开查看原始 JSON(box-shadow.json)
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "bricks://controls/box-shadow",
  "schemaVersion": "2.3",
  "title": "Box Shadow Control",
  "description": "Box shadow settings",
  "controlProperties": [
    "type",
    "label",
    "group",
    "css",
    "hasRequired",
    "tab"
  ],
  "type": "object",
  "properties": {
    "values": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "inset": {
            "type": "boolean"
          },
          "color": {
            "description": "Color value in various formats",
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "hex": {
                    "type": "string",
                    "pattern": "^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$"
                  }
                },
                "required": [
                  "hex"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "rgb": {
                    "type": "string",
                    "pattern": "^rgba?\\("
                  }
                },
                "required": [
                  "rgb"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "hsl": {
                    "type": "string",
                    "pattern": "^hsla?\\("
                  }
                },
                "required": [
                  "hsl"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "raw": {
                    "type": "string",
                    "description": "Raw color value or CSS variable",
                    "descriptionZh": "原始颜色值或 CSS 变量。"
                  }
                },
                "required": [
                  "raw"
                ]
              }
            ],
            "descriptionZh": "各种格式的颜色值。"
          },
          "h": {
            "type": "string"
          },
          "v": {
            "type": "string"
          },
          "blur": {
            "type": "string"
          },
          "spread": {
            "type": "string"
          }
        }
      }
    }
  },
  "titleZh": "阴影控件",
  "descriptionZh": "盒子阴影设置。"
}

前言

盒子阴影设置。

基本信息

  • 英文名称Box Shadow Control
  • 中文名称:阴影控件
  • Schema IDbricks://controls/box-shadow
  • Schema 版本2.3
  • 类型object

属性

  • values (array)

Schema 定义

完整 JSON 定义

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "bricks://controls/box-shadow",
  "schemaVersion": "2.3",
  "title": "Box Shadow Control",
  "description": "Box shadow settings",
  "controlProperties": [
    "type",
    "label",
    "group",
    "css",
    "hasRequired",
    "tab"
  ],
  "type": "object",
  "properties": {
    "values": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "inset": {
            "type": "boolean"
          },
          "color": {
            "description": "Color value in various formats",
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "hex": {
                    "type": "string",
                    "pattern": "^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$"
                  }
                },
                "required": [
                  "hex"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "rgb": {
                    "type": "string",
                    "pattern": "^rgba?\\("
                  }
                },
                "required": [
                  "rgb"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "hsl": {
                    "type": "string",
                    "pattern": "^hsla?\\("
                  }
                },
                "required": [
                  "hsl"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "raw": {
                    "type": "string",
                    "description": "Raw color value or CSS variable",
                    "descriptionZh": "原始颜色值或 CSS 变量。"
                  }
                },
                "required": [
                  "raw"
                ]
              }
            ],
            "descriptionZh": "各种格式的颜色值。"
          },
          "h": {
            "type": "string"
          },
          "v": {
            "type": "string"
          },
          "blur": {
            "type": "string"
          },
          "spread": {
            "type": "string"
          }
        }
      }
    }
  },
  "titleZh": "阴影控件",
  "descriptionZh": "盒子阴影设置。"
}

补充说明

更多细节可参考 Bricks 官方 Academy 文档