Block: Text

A Text block for configuring text to be displayed in the user interface.

Overview

The Text block is used for configuring text, to be displayed in a frame. The text has a type parameter that defines the size of the text.

Note that other text objects are also available for creating text in the ControlPanel block and the NavPanel block.

Example

Below is an example configuration.

kind: Solution
version: v0
router:
  kind: Router
  routes:
    - frame: home-frame
frames:
  home-frame:
    kind: Frame
    contents:
      my-text:
        kind: Text
        text: Hello World
        type: display-1
        align: center
        weight: bold
        margin: true
        color: danger

TextBlockConfig

Name Type Required Description
kind "Text" Yes
text string Yes A string, the text.
type TextType No A constant specifying the type of text. Valid options are display-1 to display-4, h1 to h6, and lead.
color ThemeColor No A constant specifying the theme colour of the text. Valid options are primary, secondary, success, danger, warning, info, light, dark, and link. The default is primary.
align "left" | "right" | "center" | "justify" No A constant specifying the text alignment. Valid options are left, right, center, and justify. The default is left.
weight "normal" | "light" | "bold" | "italic" No A constant specifying the text weight. Valid options are bold, italic, light, and normal. The default in normal.
margin boolean No A boolean to set whether a margin is added to the text.

TextType

  • "lead"
  • "h1"
  • "h2"
  • "h3"
  • "h4"
  • "h5"
  • "h6"
  • "display-1"
  • "display-2"
  • "display-3"
  • "display-4"

ThemeColor

  • "primary"
  • "secondary"
  • "success"
  • "danger"
  • "warning"
  • "info"
  • "light"
  • "dark"