Skip to content
Oleksandr Sochka edited this page Apr 15, 2015 · 10 revisions

Widgets

Widgets are high-level abstractions, pieces using which Pages are built.

From developer's view widget is a directory located in resources and called WIDGET_NAME where WIDGET_NAME is widget's unique name. It should have the following layout:

  • widget.json (required, contains the most important descriptional information about widget. Example for summator widget:
{
    "description": "Description of widget \"summator\"",
    "schema": {
      "type": "object",
      "title": "Summator settings",
      "properties": {
        "title": {
          "type": "string",
          "title": "Widget title"
        },
        "a": {
          "type": "integer",
          "title": "Default value for first input"
        },
        "b": {
          "type": "integer",
          "title": "Default value for second input"
        },
        "aDisabled": {
          "type": "boolean",
          "title": "Should first field be disabled?"
        }
      }
    }
  }
  • widget.html (optional)
  • widget.js (optional)
  • icon.png (optional small icon)
  • bower.json (not designed as for now, implementation should be delayed).
Clone this wiki locally