Cards are surfaces that display content and actions. They should be easy to read. Elements such as, text and images, should be placed on them in a way that has good hierarchy.
.linq-card-base
The base card class has no padding. Child elements inside the card are padded. The base card is just the outline, box-shadow and background color.
The base card class should used when the layout only requires the proper
outline, box-shadow and border.
Use
.linq-card
the majority of the time.
.linq-card__header
The card header consist of styles which align button actions with the main title. The card header does not have rounded corners, the parent card handles the rounded corners.
.linq-card__card-header
- background colors and padding.card-header
- layout control.card-header__primary-actions
- alignment for actions next to title.card-header__secondary-actions
- alignment for actions not next to title.linq-card
or
.mat-card
The profile card calls out key information about a user and showcases the user's image. In the example below the profile card does not have any more styles.
The example below has extra information, but the extra information styles are not part of the profile card styles. The extra information is using key/value classes, not profile card specific class names.
By design Cards, like (almost) all components, do not have a set width. The width must be set by the parent container
The heading card contains details about the heading, this could be details about their position. This card contains details about a grouped subject. This will be used when you can’t edit the fields right on that same page with the slide out panel.
A Card can contain many different types of data. Building out multiple classes to handle all the use cases is not maintainable. A better solution is to build a few utility classes for spacing, colors and layout.
Welcome to a card which only contains text. The spacing is rendered
using the class
.linq-card__space
. The space class is a utility to provide
common spacing for any details inside of the card body.
The example below is rendered using
.linq-key-value-list
. The key value list class has nothing to
do with the card and can be used anywhere. The list uses flexbox and will
display overflow items under each other to support multiple viewport sizes.
Card actions is a utility class which creates space and aligns buttons. A
div
element is required to align the button actions. A single
div
will align all items on the right. Two
div
elements will align the first items on the left and the second elements on
the right.
A card using the .linq-card__actions
class.
A card using the
.linq-card__actions
class and two div child elements.