Skip to main content
This schema can be extended to add additional fields

Properties

  • label (string) - minLength: 1 - maxLength: 100 (required)
  • color (object)
    • button (string)
    • label (string) - minLength: 2 - maxLength: 10
    • border (string)
    • iconColor (string) - pattern: ^#([a-fA-F0-9]{6}|[a-fA-F0-9]{3})$... - Button icon color
  • buttonStyle (object - style component reference)
  • textStyle (object - style component reference)
  • tracking (object - ref: event_tracking)

Schema

{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "definitions": {},
  "title": "Base button schema",
  "description": "This schema can be extended to add additional fields",
  "type": "object",
  "required": [
    "label"
  ],
  "properties": {
    "label": {
      "type": "string",
      "minLength": 1,
      "maxLength": 100
    },
    "color": {
      "type": "object",
      "required": [],
      "additionalProperties": false,
      "properties": {
        "button": {
          "type": "string"
        },
        "label": {
          "type": "string",
          "minLength": 2,
          "maxLength": 10
        },
        "border": {
          "type": "string"
        },
        "iconColor": {
          "type": "string",
          "pattern": "^#([a-fA-F0-9]{6}|[a-fA-F0-9]{3})$",
          "description": "Button icon color"
        }
      }
    },
    "buttonStyle": {
      "$ref": "style/button.json"
    },
    "textStyle": {
      "$ref": "style/text.json"
    },
    "tracking": {
      "$ref": "event_tracking.json"
    }
  }
}