Skip to Content
Hookboard
Components

Data components

Every data component a card can use, with its properties and an example.

Each component is an object with a type and the properties listed for it. Text and number properties may also hold a {{ }} template or a { "$bind": "…" } object; see Data, state and bindings. Every component also accepts the common properties.

stat

One figure with a label and an optional change indicator.

Does not take children.

PropertyTypeRequiredDefaultWhat it does
labeltextyesWhat the figure measures.
valueany JSONyesThe figure.
unittextUnit shown after the figure.
deltatextChange since last period, e.g. +12%.
trend"up" "down" "flat"Direction of the change.
good"up" "down""up"Which direction counts as good. Colors the delta.
{
  "type": "stat",
  "label": "Visitors",
  "value": "1,284",
  "delta": "+12%",
  "trend": "up"
}

progress

A progress bar.

Does not take children.

PropertyTypeRequiredDefaultWhat it does
valuenumberyesCurrent value.
maxnumber100Value at 100%.
labeltextLabel above the bar.
showValuebooleanShow the percentage.
tone"primary" "success" "warning" "danger""primary"Bar color.
{
  "type": "progress",
  "value": 64,
  "label": "Disk",
  "showValue": true
}

meter

A ring gauge for a value within a range.

Does not take children.

PropertyTypeRequiredDefaultWhat it does
valuenumberyesCurrent value.
maxnumber100Top of the range.
labeltextLabel under the figure.
unittextUnit after the figure.
tone"primary" "success" "warning" "danger""primary"Ring color.
{
  "type": "meter",
  "value": 72,
  "unit": "%",
  "label": "CPU"
}

keyValue

A list of label and value pairs.

Does not take children.

PropertyTypeRequiredDefaultWhat it does
itemslist of objectsyesThe rows.
items[].labeltextyesLabel.
items[].valueany JSONyesValue.
layout"rows" "columns""rows"Rows put the value on the right; columns stack them.
{
  "type": "keyValue",
  "items": [
    {
      "label": "Status",
      "value": "Running"
    },
    {
      "label": "Region",
      "value": "eu-north"
    }
  ]
}

table

A table of rows.

Does not take children.

PropertyTypeRequiredDefaultWhat it does
columnslist of objectsyesThe columns.
columns[].keytextyesKey of each row to show.
columns[].labeltextColumn heading.
columns[].align"start" "end"Alignment.
columns[].format"text" "number" "date" "datetime" "relative" "badge"How to format values.
rowsany JSONyesA list of row objects, usually a binding.
emptytext"Nothing here"Text shown when there are no rows.
maxRowsnumberShow at most this many rows.
{
  "type": "table",
  "columns": [
    {
      "key": "day",
      "label": "Day"
    },
    {
      "key": "visits",
      "label": "Visits",
      "align": "end",
      "format": "number"
    }
  ],
  "rows": [
    {
      "day": "Mon",
      "visits": 120,
      "signups": 8
    },
    {
      "day": "Tue",
      "visits": 180,
      "signups": 14
    },
    {
      "day": "Wed",
      "visits": 150,
      "signups": 11
    },
    {
      "day": "Thu",
      "visits": 210,
      "signups": 19
    },
    {
      "day": "Fri",
      "visits": 260,
      "signups": 23
    }
  ]
}

list

A simple list of items, each with a title and optional details.

Does not take children.

PropertyTypeRequiredDefaultWhat it does
itemslist of objectsyesThe items.
items[].titletextyesMain line.
items[].descriptiontextSecond line.
items[].iconicon nameLeading icon.
items[].metatextShort text on the right.
items[].hrefURLMakes the item a link.
emptytext"Nothing here"Text shown when the list is empty.
{
  "type": "list",
  "items": [
    {
      "title": "First item",
      "description": "A detail",
      "icon": "circle-check"
    },
    {
      "title": "Second item",
      "meta": "2m"
    }
  ]
}

On this page