Please find definitions for and use cases for each under their respective
sections
Description
A card is a flexible and extensible content container. It includes options
for headers and footers, a wide variety of content, contextual background
colors, and powerful display options.
Examples and variants
Marketing cards (default)
The Card will be used for all marketing purposes, or the typical
applications of a card in UIs. Examples are: Landing pages,
tiles/widgets, visually enhanced links or buttons to lead to another
page, navigation, etc.
Each card is modular. Anything and everything EXCEPT the
title and the action link can be removed from the card. The bare minimum
required for a card to be complete is the title of the card and the action
link.
A card with an image in it should have the minimum width of 3 columns.
Images in cards should have appropriate visually balanced ratios (4:3/
16:9/ square, etc.) There are no specific instructions, however
designers please make sure if you are using multiple cards in a row,
that all the images have the same height.
Title will truncate at 2 lines. Body copy (or paragraph text) will
truncate at 3 lines.
White card is the only one with a border stroke, to show distinction
against a white background.
In mobile view, cards will stack one on top of each other.
If there is no date in the bottom left corner of the card, that space
will be taken by the action link-styled button. See examples below.
To create a stretched-link card, add the .card-linked class to
the main .card element. This will negate any links in the text, so use it carefully.
Marketing cards have color variations available. Use these classes on the
main .card element:
.card-primary
.card-secondary
.card-accent
.card-white
Grey is the default, no extra class necessary.
Accessibility considerations
Since the title is cut off at two lines, it is helpful to put a title attribute on the .code-title element.
Accent color
New RDE product is out! Explore Data is finally out and making
BIG waves in the data ecosystem.
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Negat
enim summo bono afferre incrementum diem. Multa sunt dicta ab
antiquis de contemnendis ac despiciendis rebus humanis; Atque
haec ita iustitiae propria sunt, ut sint virtutum reliquarum
communia. Quis animo aequo videt eum, quem inpure ac flagitiose
putet vivere? Ad eas enim res ab Epicuro praecepta dantur. Ut
scias me intellegere, primum idem esse dico voluptatem, quod
ille don.
Primary color
New RDE product is out! Explore Data is finally out and making
BIG waves in the data ecosystem.
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec
venenatis dolor quis.
Linked card
This whole card is a link!
Use .card-linked on the main .card element
to get it.
White card
This whole card is a link!
Use .card-linked on the main .card element
to get it.
<article class="card card-primary"> <section class="card-body"> <div class="card-subtitle">Primary color</div> <img src="https://placehold.co/600x400" alt="Placeholder image" /> <h1 class="card-title" title="New RDE product is out! Explore Data is finally out and making BIG waves in the data ecosystem."> New RDE product is out! Explore Data is finally out and making BIG waves in the data ecosystem. </h1> <p class="card-text"> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec venenatis dolor quis. </p> </section> <footer class="card-footer"> <time datetime="09-29-2023">29 September, 2023</time> <a href="#">Link to article</a> </footer></article>
Limited card group
When a design calls for cards to be limited in how many are visible based
on viewport, use .card-group-limited. Default is limited to 2
rows, that can be adjusted with the --rows-visible CSS custom
property.
Cards are 100% width unless their width is specified.
The Complex Card is a modular card that will used on transactional
pages. Two immediate applications are dataset lists on search results
pages, study home pages, and list items in ReDMAS application pages.
Anything can be removed from the card as needed.
The right-corner label is STATUS only. Which indicates that it will only
have terms like- New, Recently Added, Approved, Rejected, Pending
Review, etc. It is a column of its own
Badges in the body of the card will always be GREY and are data-related
tags- examples are- NANDA, Journal of Economic Literature, Contains
restricted data,
The bare minimum on the card should be a title, to make it complete.
The checkbox will align with the top-most text (either brow text, or if
there is no brow text, then the title. Checked state will only change
the checkbox, the rest of the card remains as-is.
In mobile view, the right-corner label will go below the title (mockup
below)
Accessibility considerations
When including a checkbox, add an id attribute to the title element,
and an aria-labelledby attribute to the input for the checkbox.
Brow text
Mental health & well-being in times of COVID-19: A mixed
methods study
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec
venenatis dolor quis.
Journal article · 2021
Mental health & well-being in times of COVID-19: A mixed
methods study
Status label
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec
venenatis dolor quis.
Journal article · 2021
Mental health & well-being in times of COVID-19: A mixed
methods study for which there is a super long title so we can
test how line clamp works with a super long title because
sometimes there are super long titles with description and
more
Status label
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec
venenatis dolor quis.
Mental health & well-being in times of COVID-19: A mixed
methods study
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec
venenatis dolor quis.
Mental health & well-being in times of COVID-19: A mixed
methods study
Mental health & well-being in times of COVID-19: A mixed
methods study
Status label
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec
venenatis dolor quis.
Always grey
This too
Of course
Mental health & well-being in times of COVID-19: A mixed
methods study
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec
venenatis dolor quis.
Always grey
This too
Of course
<!-- Complex card with everything --><article class="card card-complex"> <div class="card-check"> <input class="form-check-input" id="card-check" name="card-check" type="checkbox" value="true" aria-labelledby="card-title" /> </div> <section class="card-body"> <header> <div class="card-header"> <div class="card-subtitle">Journal article · 2021</div> <h1 class="card-title" id="card-title"> Mental health & well-being in times of COVID-19: A mixed methods study </h1> </div> <div class="badge badge-primary">Status label</div> </header> <p class="card-text"> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec venenatis dolor quis. </p> </section> <footer class="card-footer"> <button class="btn btn-link">Link 1</button> <button class="btn btn-link">Link 2</button> <button class="btn btn-link">Link 3</button> </footer></article>
Card Bucket
Card bucket is used to display a series of content. Current use case is
StatSnap specific. Width can be 3 columns, 4 columns, or 6 columns; height
varies by content selected. Mix and match atoms and molecules from Design
System to meet specific use case (i.e. secondary buttons, body text,
etc.).
The Card with offset icon is to promote an Archive's statistical fact to
public. It can have a link that takes the user to the corresponding
page.
The icon is intentionally run over to the block. It is to decrease
user's attention to the icon because the icon is not the main content of
the card. The main attention will go to the main text.
card-linked version
To get the hover state add the class .card-linked to .card-offset-icon class.
73,973
Studies
12,536,973,973
Publications
1,973,909
The max icon size is 96 x 96 px ( 6rem x 6 rem), Use BS5 column
classes to control the width of cards. watermelon watermelon
watermelon.
Use BS5 column classes to control the width of cards.
Testing
New RDE product is out! Explore Data is finally out and making BIG
waves in the data ecosystem.
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec
venenatis dolor quis.
<div class="row"> <div class="col-12 col-md-6"> <article class="card card-accent"> <section class="card-body"> <div class="card-subtitle">Testing</div> <h1 class="card-title"> New RDE product is out! Explore Data is finally out and making BIG waves in the data ecosystem. </h1> <p class="card-text"> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec venenatis dolor quis. </p> </section> </article> </div></div>