--- layout : 'default' css : 'card' element : 'card' elementType : 'view' title : 'Card' description : 'A card displays site content in a manner similar to a playing card' type : 'UI View' themes : ['Default', 'Basic', 'GitHub'] --- <%- @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
Steve Jobes is a fictional character designed to resemble someone familiar to readers.

Content

Image

A card can contain an image

Cards can use reveal or dimmers to easily show additional content, or options on hover
Team Fu & Hess
Create in Sep 2014
$('.special.cards .image').dimmer({ on: 'hover' });
Add Friend
Team Fu
Create in Sep 2014
Add Friend
Team Hess
Create in Aug 2014

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

Buttons

A card can contain buttons

Elliot Fu
Elliot Fu is a film-maker from New York.
Add Friend
Veronika Ossi
Veronika Ossi is a set designer living in New York who enjoys kittens, music, and partying.
Add Friend
Jenny Hess
Jenny is a student studying Media Management at the New School
Add Friend

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

Variations

Fluid Card

A fluid card takes up the width of its container

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

Rating:
Rating:
Rating:
Rating:
Rating:
Rating:
Rating:
Rating:

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