Skip to content
Storybook

Card

Container for a related group of content with header, content slot and footer actions.

Preview

React · live from the Storybook

HTML and CSS

The same component as plain HTML with pixels-ui.css, no framework needed.

Team members

Manage your team and their account permissions.

  • OROlivia Rhyeolivia@pixels.ioAdmin
  • PBPhoenix Bakerphoenix@pixels.ioEditor

Usage

  • Outlined for dense layouts, Raised to lift interactive cards.

Installation

Included in the core files. No extra install.

HTML
<link rel="stylesheet" href="/css/pixels-tokens.css">
<link rel="stylesheet" href="/css/pixels-ui.css">
<script src="/js/pixels-ui.js" defer></script>

Examples

Raised

px-card--raised.

Upgrade to Pro

Unlimited projects, brand kits and priority support.

API reference

Class / attributeTypeDescription
px-card · px-card--raisedclassOutlined / Raised (Figma Elevation).
px-card__head · __title · __desc · __body · __footclassSlots.

Figma properties

Card4 variants · page “Data display”Open

Container for a related group of content with header, content slot and footer actions. Outlined for dense layouts, Raised to lift interactive cards. Swap the Content slot with your own component.

PropertyTypeValues
TitleText“Team members”
DescriptionText“Manage your team and their account permissions.”
Content swapInstance swap—
FooterBoolean—
ElevationVariantOutlined Raised
DirectionVariantLTR RTL

Design tokens

Component tokens from the Figma Component collection. Override them to restyle just this component.

TokenAliasLight value
--px-card-bordercolor-border-neutral-subtle#f2f4f7
--px-card-radiusradius-2020px
--px-card-paddingspacing-2020px
--px-card-gapspacing-1616px

Accessibility

  • Use <article> or <section> with a heading.