Use the Card component to display lists of data to your users. Cards can contain content, images, and actions, and are a great alternative to the table component; especially, if you want to present an image for each card. You can switch between vertical and horizontal variants of the card using the settings panel.

Cards are highly flexible and have a lot of configuration options. We'll dive into those below

12701270

πŸ“˜

Cards Block

Want to quickly convert your data to a list of cards? Use the Cards Block instead

Layout

The card component has two different layout modes. Vertical and Horizontal. The vertical mode has every component aligned vertically, whereas the horizontal mode has the image left of the text elements.

For example purposes, I've loaded a list of countries into the database, with flags as images connected to it. In vertical mode, this looks like the following screenshot

Vertical Mode

21262126

Vertical Cards Mode

As you can see, there's 3 items per row. However, this is purely dependent on the screen size. When you change the width of your browser window this can easily change to 1 (narrow or mobile), or 4 (or more) when you make your window wider.

The vertical mode is enabled by default, but in case horizontal mode is enabled, all you have to do is deselect "Horizontal" from the Settings Panel.

The order of elements visible in a card is from top to bottom, Image, Title, Subtitle and Description.

Horizontal Mode

To enable horizontal mode, you need to check Horizontal in the Settings Panel.

246246

Immediately, the design will change into horizontal mode, which looks like the following screenshot

21162116

Horizontal Cards Mode

As you can see, the image has shifted to the left of the text elements, where the text elements themselves have not changed.

Card Elements

The card consists of several default elements, which are bindable through Handlebars or JavaScript functions. Read more about binding in our Bindings documentation. All elements can be configured in the settings panel.

Element

Description

Title

The top-most text element inside a card, printed as the largest font and bold

Subtitle

Directly below the title

Description

Below the subtitle, in the smallest font.

Image

The image which can be displayed on top, or on the left of the card (depending on layout mode)

Button

Next to the default elements, there's an optional button element. You can enable the button by checking the Button in the settings panel

488488

The button text can be configured through Bindings, or simply text as demonstrated above. The button will then be added to the card as displayed below

18081808

Right now the button doesn't do anything yet, when you click it, but that can be configured through the Define Actions button in the settings panel.

πŸ‘

Define Actions

To learn more about defining actions, read the Actions documentation


What’s Next

Quickly convert your data to a list of cards? Check the Blocks page to learn more about the Cards Block

Did this page help you?