Skip to main content

Card

Usage

Definition

Cards provided a visible, unifying container for content and related actions.

Cards are flexible. They can contain text, media, dynamic data, design elements, UI controls, or actions. Cards are usually interactive and may contain multiple related actions.

Common Characteristics

All cards have a rectangular container with a solid background and 4px rounded corners. The minimum height and width is 80px x 80px.

Cards may be any height and width needed (subject to minimums), and any aspect ratio needed.

Flexible Content

Cards are intentionally flexible to allow designers to display content as needed. Cards may include headings, text, dynamic data, interactive elements, and other PRISM components.

Default Elements

  • White background
  • 1px, smoke (#babcbe) stroke
  • 16px minimum padding on all sides

Options

Default elements can be changed and additional elements added as needed. Designers and developers can optionally:

  • Change the default background color
  • Change the default stroke color
  • Hide the stroke
  • Change the minimum padding to 8px for slim cards.
  • Add a 40px high footer for one or more Actions (text, icons, or both)
  • Add media: top-aligned, left-aligned, or as a background
  • Media can have an optional margin

Cards may have an optional footer. The footer has the following defined rules:

  • 40px tall and the same width as the card body
  • Separated from the card body by a divider
  • Can only contain Actions (text, icons, or both)
  • Text Actions are anchored to the left
  • Icon Actions are anchored to the right
  • Actions can be nested in a menu

Examples

See the Design tab for examples

Do

Use cards to visually organize and unify content.

Use cards to summarize the key elements of a larger data set.

Insert content wisely. If in doubt, consult with PRISM UX leaders.

Change defaults with a clear rationale such as branding or a specific state.

Don't

Overload cards with too many details. For example, a search result might be presented in a card, but not an entire details page.

Use transparent or semi-transparent backgrounds.

Code

Basic Usage Examples

Live Editor
Result
Loading...
Live Editor
Result
Loading...

Card with Tabs

Live Editor
Result
Loading...

Dark Variant

Live Editor
Result
Loading...
Live Editor
Result
Loading...

Multiple Cards

Live Editor
Result
Loading...

Actionable Cards

Live Editor
Result
Loading...
Live Editor
Result
Loading...
Live Editor
Result
Loading...

No Border

Live Editor
Result
Loading...
Live Editor
Result
Loading...
Live Editor
Result
Loading...

Inline Forms

Live Editor
Result
Loading...

Horizontal

Live Editor
Result
Loading...

More Examples

Live Editor
Result
Loading...
Live Editor
Result
Loading...
Live Editor
Result
Loading...
Live Editor
Result
Loading...
Live Editor
Result
Loading...

Design

Card Anatomy

Card titles are always left-aligned. Titles should always be the largest size font on the card. Minimum font size for a card title is 14px.

Body text should be smaller and in lighter color than the title. The default font is Roboto in Charcoal (#4A4A4A). If there is linked text in the body, follow PRISM link styling standards.

Variable Elements

  • Width/height (subject to minimums), aspect ratio
  • Content, data, controls, actions

  • Text Actions can be nested in a menu
  • Text Actions can have an icon
  • Icon Actions can be nested in a menu
  • A footer can contain both text and icon Actions

Examples

Examples below are meant to illustrate intended flexibility of the [UX Specification][#design], rather than prescribe, coded solutions.

A card can have an image overlay with a minimum height and minimum width of 80px

In a horizontal card, media takes up 30% of the card. Keep the content and actions item succinct and not overcrowded.

White is the default background color for the card, and can be changed to other background fill. Maintain a good legibility between background fill and content element.

Card with a table design, currency input, and buttons.

Card with chips and footer action

Avoid

Overloading cards with too many details

Transparent or semi-transparent background

Wrapping text around media

Inconsistent padding

Swapping the position of the footer