Card

The Card component provides a reusable pattern for card in the interface.

Meta first

ALT
Eyebrow

Heading

This is the meta (after title)

Atoms are the fundemental building blocks. They are rarely used just by them self but mostly used to build more advanced components.

ALT
This is the meta (before title)

123 AVC Heading

Atoms are the fundemental building blocks. They are rarely used just by them self but mostly used to build more advanced components.

Only slot

Here we've only sent data to the slot and nothing with the parameters.

Heading

SubHeading

Atoms are the fundemental building blocks. They are rarely used just by them self but mostly used to build more advanced components.

Card with a collapsible body

ALT

Heading

Atoms are the fundemental building blocks. They are rarely used just by them self but mostly used to build more advanced components.

Card images

The images can be set to cover 100% of the width or if you wish set padded to true to keep the image in the middle. You can also set a background color which can be seen in the example with padding.

ALT
Jun 10

Heading

Atoms are the fundemental building blocks. They are rarely used just by them self but mostly used to build more advanced components.

ALT

123 AVC Heading

Atoms are the fundemental building blocks. They are rarely used just by them self but mostly used to build more advanced components.

Card with date badge

Cards with date badges can be used to show the date of the card.

ALT
Jun 10

With image

lorem ipsum dolor sit amet, consectetur adipiscing elit

Jun 10

With Placeholder

lorem ipsum dolor sit amet, consectetur adipiscing elit

Jun 10

Without image

lorem ipsum dolor sit amet, consectetur adipiscing elit

Buttons

You can configure a card with buttons that will be rendered in the footer.

Linked card

Links whole card.

Container Aware

Enables container awareness on the component (adjusts layout depending on available space).


Resize the preview above to see the card's container aware feature.

Inset Inherit

Demonstrate inset inheritance on the component & subcomponents (adjusts padding depending on available space).


Resize the preview above to see the card and nested accordion inherit the inset spacing.

Card has action

Adds visual effect to indicate that the card has an action attached (i.e. a link)

Hightlight Card

A modifier to highlight the card.

ALT

TEST

Atoms are the fundemental building blocks. They are rarely used just by them self but mostly used to build more advanced components.

Accent

Gives the card a more plain styling with accent colors

Heading

SubHeading

Atoms are the fundemental building blocks. They are rarely used just by them self but mostly used to build more advanced components.

Heading

SubHeading

Atoms are the fundemental building blocks. They are rarely used just by them self but mostly used to build more advanced components.

Flat UI

Gives the card a flat style

API

Parameter Default Description
A smaller heading above the primary one
The card heading
A subheading below the heading, explaining more stuff.
Small text below title, in meta style.
The card content
[] Array with buttons that has parameters like href, text and attributeList.
false A url to an image.
16:9 The ratio of the image
false If the content should be collapsible.
A tags array
A hyperlink to another location.
The text of the link, if not set, the link will not be displayed.
false Preformatted date
false Display date as a badge. Requires image to be set.
false If the card should have a placeholder, if the image is missing.
false An array with the same specification as the icon component
The background color of the icon
default The background color of the image.
false If the meta should be displayed before the heading.
false If the headings should be displayed above the image.

CSS API

Variable Default Type Values Description
var(--border-width) range - Controls the width of card borders and internal dividers.
var(--border-radius) range - Border Radius
var(--space) range - Controls padding inside the card and spacing between card elements.
var(--color--surface) color - Controls the card surface, text contrast, border, and alternate layout colors.
var(--color--primary) color - Controls highlighted card details, including accent borders and accented header backgrounds.
var(--shadow-color) rgba - Shadow Color
var(--shadow-amount) range - Multiplier for elevation shadows. 0 = none, 1 = default.
var(--color--surface-border) color - Manual companion token for borders on surface elements.
var(--color--surface-alt) color - Manual companion token for subtle surface backgrounds.
var(--color--secondary) color - Controls the background shown behind transparent images and SVG illustrations.
var(--color--surface-contrast) color - Used for text and icons on surface backgrounds with less contrast.
var(--color--surface-contrast-muted) color - Derived muted contrast for text and icons on surface backgrounds.
var(--corner-shape) select square, round, squircle, circular, bevel, scoop Corner Shape
var(--base) range - Main unit that drives radius and spacing scales.
var(--color--primary-contrast) color - Primary Contrast
var(--font-size-200) range - One step above base in the type scale. Equivalent to h6/subtitle.
var(--font-size-100) range - Base font size.

Similar components