You can combine and display content in grid, row and column layouts. You can combine different layouts to achieve more complex placements. There are three main types of layouts:
column - layout places children in a single column with a small gap between them
row - layout places children in a single row with a small gap between them
grid - layout places children across a grid with 2, 4 or 6 columns
You can use any elements inside a layout block, but layouts work best with div and card elements.
Layouts automatically adapt to the smaller screen sizes to ensure all elements have sufficient space.
Column is a simple layout which places its children in a column with a small gap between them. We recommend starting your layouts with a column and then adding grid and row layouts as children.
Use the following syntax to define column layout:
Parameter | Type | Description |
|---|---|---|
|
| Height of items in pixels (automatic by default) |
|
| Minimum height of items in pixels |
|
| Maximum height of items in pixels |
Row is a simple layout which places its children in a row with a small gap between them. When items do not fit on the screen, row layout would wrap them into the next line. On the small screens, row layout is displayed as a column.
Use the following syntax to define row layout:
Parameter | Type | Description |
|---|---|---|
|
| Width of items in pixels |
|
| Minimum width of items in pixels (~300px by default) |
|
| Maximum width of items in pixels |
Grid layout places its children in 2, 4 or 6 columns with a small gap between them. On a smaller screen, the number of columns is divided by two. You can specify col-span and row-span parameters on the children blocks to span elements across multiple columns.
Use the following syntax to define grid layout:
Parameter | Type | Description |
|---|---|---|
|
| Number of columns 2, 4 or 6 (default) |
|
| Row height in pixels (~150px by default) |
|
| Minimum row height of items in pixels |
|
| Maximum row height of items in pixels |
Division is a simple container which wraps a fragment of the document. Divisions are useful when you want to group a few elements together without applying any styling.
A card is a universal container which allows displaying an image, video or text. The cards are designed in a way that allows them to adapt to the available space in the layout. Use height, min-height and ratio parameters to help the system maintain the correct size.
If the first element of the card is an image or a video, this element will be used as a cover (unless it has parameter .not-a-cover). The cover element is shown on the top of the card. You can control the height of the cover by setting the height parameter.
If the cover element is the only element on the card, it will automatically take the entire space of the card. Keep in mind, since the card is empty, its height will be equal to 0, unless you explicitly specify height, min-height or ratio parameters.
You can also make cover element a background for the card using .cover parameter. You might want to combine .cover with .text-light or .text-dark as well as .text-shadow parameters to ensure the text is visible in both dark and light modes.
The layout will keep covers aspect ratio the same and crop parts of the image to adapt to the available space. The algorithm will try to keep center of the image visible. You can change this behaviour by adding following parameters.
Parameter | Description |
|---|---|
| Instead of cropping image, the layout will add empty space around image, so entire image is always visible |
| Stretch image to match cover size, desregarding aspect ratio |
| Position image in a way that its top part is always visible (ie. crop bottom part only) |
| Position image in a way that its bottom part is always visible (ie. crop top part only) |
| Position image in a way that its left side is always visible (ie. crop right part only) |
| Position image in a way that its right side is always visible (ie. crop left part only) |
If the last element of the card is a paragraph which only contains links, these links are displayed as buttons under the card.
You can use parameters to emphasize a card on the page, this is useful when you create a layout with multiple cards and want to emphasize some of them.
A full reference of parameters you can add to the card.
Parameter | Type | Description |
|---|---|---|
|
| Link associated with the card |
|
| Card height in pixels (automatic by default) |
|
| Minimum card height in pixels |
|
| Card aspect ratio as width to height |
|
| Card cover image will be displayed as background |
|
| Card without background color |
|
| Lowest emphasis card (lightest background) |
|
| Low emphasis card (light background) |
|
| High emphasis card (dark background) |
|
| Highest emphasis card (darkest background) |
|
| Primary card (bright color background) |
|
| Secondary card (color background) |
|
| Text will always appear black on the card, this is useful when displaying text over a bright picture |
|
| Text will always appear white on the card, this is useful when displaying text over a dark picture |
|
| Text will have a shadow, this helps to add contrast when displaying text over a picture |