Box
The Box component provides a reusable pattern for box in the interface.
A basic box
Boxes with images
Simple box with images displayed in a grid with a desktiop width of three.
Boxes with icons
A box with an icon, is simply a box with an svg image.
API
| Parameter | Default | Description |
|---|---|---|
|
heading
|
The heading of the block | |
|
content
|
Short text to describe target content. | |
|
meta
|
String or array of strings containing the meta information | |
|
secondaryMeta
|
String or array of strings containing the secondary meta information | |
|
link
|
Simple href link | |
|
ratio
|
1:1 | Ratio of the block |
|
date
|
Preformatted date | |
|
dateBadge
|
Display date as a badge. | |
|
image
|
false | Image object (see image component), svg or raster image. |
|
icon
|
Icon name as a string. |
CSS API
| Variable | Default | Type | Values | Description |
|---|---|---|---|---|
|
--c-box--border-radius
|
var(--border-radius) | range | - | Border Radius |
|
--c-box--space
|
var(--space) | range | - | Base spacing unit. Used for padding and margin inside components. |
|
--c-box--color--primary
|
var(--color--primary) | color | - | Primary |
|
--c-box--shadow-color
|
var(--shadow-color) | rgba | - | Shadow Color |
|
--c-box--shadow-amount
|
var(--shadow-amount) | range | - | Multiplier for elevation shadows. 0 = none, 1 = default. |
|
--c-box--corner-shape
|
var(--corner-shape) | select | square, round, squircle, circular, bevel, scoop | Corner Shape |
|
--c-box--color--primary-contrast
|
var(--color--primary-contrast) | color | - | Primary Contrast |
|
--c-box--font-size-400
|
var(--font-size-400) | range | - | Three steps above base in the type scale. Equivalent to h4. |