--- layout : 'default' css : 'card' element : 'card' elementType : 'view' title : 'Card' description : 'A card view lists site content as a playing card' type : 'UI View' themes : ['Default', 'Basic'] --- <%- @partial('header') %>

Types

Card

A single card.

Stevie Feliciano
Joined in 2014
Stevie Feliciano is a library scientist living in New York City. She likes to spend her time reading, running, and writing.

Cards

A group of cards.

Customizing your views

Cards are designed to be flexible to your content. Meta content can include custom elements related to your content. Each child element inside the extra content or meta group will be automatically formatted to be spaced appropriately.

This example includes a category group, a sign-up date, and a friend count which are arbitrary class names used to format users as cards.

Elliot Fu
Elliot Fu is a film-maker from New York.
Helen Troy
Helen Troy is an archivist living in New York, who enjoys cooking, fine art, and gardening.
Jenny Hess
Jenny is a student studying Media Management at the New School.
Veronika Ossi
Veronika Ossi is a set designer living in New York who enjoys kittens, music, and partying.
Stevie Feliciano
Joined in 2014
Stevie Feliciano is a library scientist living in New York City.
Steve Jobes
Stevie Jobes is a fictional character designed to resemble someone familiar to readers.

Content

Header

A card can contain a header

Equal Size Cards

If your cards have content that vary in length you must set a min-height for that content area, or the whole card.

For example:

/* Sets card height to about two lines of description */ #my-container .card .description { min-height: 35px; }
Elliot Fu
Friend
Elliot Fu is a film-maker from New York.
Veronika Ossi
Friend
Veronika Ossi is a set designer living in New York who enjoys kittens, music, and partying.
Jenny Hess
Friend
Jenny is a student studying Media Management at the New School

Metadata

A card can contain content metadata

You can include an arbitrary amount of metadata using your own class conventions, all child elements will automatically be spaced
Cute Dog
2 days ago Animals

Link

A card can contain contain links as images, headers, or inside content

To make the entire content of a card link, check out the link variation below
Cute Dog
Check our this excellent resource on dogs.

Actions

A card can contain common actions

Common actions may contain special formatting, like "star" or "heart". To attach events, on a user action, please check out the state behavior.
Cute Dog
Favorite

Description

A card can contain a description with a single or multiple paragraphs

Cute Dog
2 days ago

Cute dogs come in a variety of shapes and sizes. Some cute dogs are cute for their adorable faces, others for their tiny stature, and even others for their massive size.

Many people also have their own barometers for what makes a cute dog.

Extra Content

A card can contain extra content meant to be formatted separately from the main content

Cute Dog
2 days ago

Cute dogs come in a variety of shapes and sizes. Some cute dogs are cute for their adorable faces, others for their tiny stature, and even others for their massive size.

Many people also have their own barometers for what makes a cute dog.

121 Votes

Image

A card can contain an image

Cute Dog
2 days ago

Cute dogs come in a variety of shapes and sizes. Some cute dogs are cute for their adorable faces, others for their tiny stature, and even others for their massive size.

Many people also have their own barometers for what makes a cute dog.

121 Votes

Variations

Link Card

A card can be formatted so that the entire contents link to another page

Cute Dog
Animals
Click to view more information about this dog at dog.com
Matt

Floated Content

Any content element can be floated left or right

You can include an arbitrary amount of metadata using your own class conventions, all child elements will automatically be spaced
Cute Dog
2 days ago Animals
Here's a description of a cute dog.
Matt

Column count

A group of cards can set how many cards should exist in a row

Doubling

A group of cards can double its column width for mobile

Resize your browser to a smaller size to see the cards stack after reaching mobile breakpoints