Skip to content

Latest commit

 

History

History
27 lines (25 loc) · 472 Bytes

state.md

File metadata and controls

27 lines (25 loc) · 472 Bytes

Widget State

By default, all Glider widgets are stateless. You can add state to a widget and its children like this:

{
  "type": "app",
  "title": "My Awesome App",
  "state": {
    "primary_color": "#FFFFFF",
    "dark": false
  },
  "theme": {
    "primary_color": {
      "type": "state_value",
      "key": "primary_color"
    },
    "accent_color": "#CDDC39",
    "dark": {
      "type": "state_value",
      "key": "dark"
    }
  },
  "home": {}
}