Skip to Content
Hookboard
Components

Content components

Every content 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.

heading

A heading.

Does not take children.

PropertyTypeRequiredDefaultWhat it does
texttextyesThe heading text.
level"1" "2" "3" "4""2"Size, 1 being the largest.
{
  "type": "heading",
  "text": "Heading",
  "level": "2"
}

text

A run of plain text.

Does not take children.

PropertyTypeRequiredDefaultWhat it does
valuetextyesThe text.
size"xs" "sm" "md" "lg" "xl""md"Text size.
tone"default" "muted" "primary" "success" "warning" "danger""default"Color.
weight"normal" "medium" "bold""normal"Weight.
align"start" "center" "end"Alignment.
monobooleanUse the monospace face, for ids and codes.
linesnumberClamp to this many lines.
{
  "type": "text",
  "value": "Some text"
}

markdown

Formatted text written in Markdown. Raw HTML is not rendered.

Does not take children.

PropertyTypeRequiredDefaultWhat it does
valuetextyesMarkdown source.
{
  "type": "markdown",
  "value": "**Bold**, _italic_ and a [link](https://example.com)."
}

badge

A small status label.

Does not take children.

PropertyTypeRequiredDefaultWhat it does
labeltextyesThe label.
tone"default" "muted" "primary" "success" "warning" "danger""default"Color.
iconicon nameIcon before the label.
{
  "type": "badge",
  "label": "New",
  "tone": "primary"
}

icon

An icon from the built-in set.

Does not take children.

PropertyTypeRequiredDefaultWhat it does
nameicon nameyesIcon name.
size"sm" "md" "lg" "xl""md"Size.
tone"default" "muted" "primary" "success" "warning" "danger""default"Color.
{
  "type": "icon",
  "name": "bell"
}

alert

A callout for something the reader should notice.

Does not take children.

PropertyTypeRequiredDefaultWhat it does
titletextyesHeadline.
descriptiontextDetail under the headline.
tone"default" "success" "warning" "danger""default"Severity.
iconicon nameIcon override.
{
  "type": "alert",
  "title": "Heads up",
  "description": "Something needs your attention.",
  "tone": "warning"
}

A link that opens in a new tab.

Does not take children.

PropertyTypeRequiredDefaultWhat it does
labeltextyesLink text.
hrefURLyesWhere it goes.
{
  "type": "link",
  "label": "Open",
  "href": "https://example.com"
}

code

A block of preformatted code or log output, with a copy button.

Does not take children.

PropertyTypeRequiredDefaultWhat it does
valuetextyesThe code.
wrapbooleanWrap long lines.
{
  "type": "code",
  "value": "curl https://example.com"
}

time

A point in time, kept current while the card is on screen.

Does not take children.

PropertyTypeRequiredDefaultWhat it does
valueany JSONyesISO date or millisecond timestamp.
format"relative" "date" "time" "datetime""relative"How to show it.
tone"default" "muted" "primary" "success" "warning" "danger""muted"Color.
{
  "type": "time",
  "value": "{{now()}}",
  "format": "relative"
}

On this page