Card

The Card component is a small box used to display a numerical value. Typically used in multiples to highlight key metrics or KPIs.

Example JSON

Below are two examples of the JSON required to define a Card.

{
    "type": "Card",
    "options": {
        "title": "Click through rate",
        "value": 5,
        "units": "%",
        "icon": "dashboard"
    }
},
{
    "type": "Card",
    "options": {
        "title": "Impressions",
        "value": "1,364",
        "units": "views",
        "icon": "confetti",
        "highlighted": true
    }
}

Options

KeyDescription
titleThe title of the Card.
valueThe numerical value to display in the Card

Font size

The font size of the different parts of the component can be overriden using the *_size keys, and can take on any of the following values (in increasing order):

  • xs
  • sm
  • lg
  • xl
  • 2xl
  • 3xl
  • 4xl

Width

For details on the width key, please see here.

Icon

Icons are powered by the Tabler Icons package which provides over 1,250 different icons. Simply use the icon name provided on the Tabler Icons website in place of the icon key in your JSON.

Highlighted background

By setting the highlighted key to true, this changes the background to an accent colour to help draw attention to the card. The colour chosen is dictated by the theme applied to your report. Refer to the Themes section for more details.

Theming

The text inside a Card component is controlled by the typography theme, as the font uses the heading font family (which is controlled by typography themes).

Example

Missing something?

Hybiscus is continuously improving and adding new features. If you think we are missing a critical feature, please do not hesitate to contact us and offer your feedback at support@hybiscus.dev