Card

A bordered block with an optional head, body and foot. As a link it lifts on hover.

Edit page

Example

Use it

Clone the repository, run two commands and build on a working base.

Installation

Plain card

No head and no foot: a border, a radius and padding.

Example.jsx
<a className='card' href='/docs/installation'>
  <div className='card-head'>
    <PiRocketLaunch className='c-accent' />
    <h3 className='title-card m-b-0'>Use it</h3>
  </div>
  <p className='card-body'>Clone, install, start.</p>
  <span className='card-foot'>Installation <PiArrowRight /></span>
</a>

Parts

ClassWhat it is
cardthe block: border, radius, padding, a column of its parts
card-heada row of an icon and a heading, with a gap below
card-bodythe text, muted, takes the free height
card-foota row at the bottom, under a hairline

On an a the card gets a hover border and shadow. Cards in one row line up their feet, because the body takes the free height.

Variables

VariableDefaultWhat it sets
$card-padding24pxinner padding
$card-gap16pxspace between head, body and foot
$card-radius12pxcorner radius
$card-linevar(--line)border colour
$card-backgroundvar(--page)background
$card-hover-linevar(--muted)border colour of a link card on hover
$card-shadow0 8px 24px rgba($dark, .06)shadow of a link card on hover