Skip to main content

Components

Card

Display content or actions related to a single subject

banner-Card
Square Icon

Selected Theme

Select brand or tribe name to preview style

Default

Usage

Display content or actions related to a single subject

import { Card, CardHeader, CardBody, CardFooter, Body, Grid } from 'legion-ui';

Variant

Cards can be given a variety of visual styles. There are three variants: shadow, flat, and bordered.

Flat Card
card variant
Sub Title
Some quick example text to build on the card title and content.
Bordered Card
card variant
Sub Title
Some quick example text to build on the card title and content.
Shadow Card
card variant
Sub Title
Some quick example text to build on the card title and content.
<div className="wrapper-display-component-three">
<div className="item-three" style="text-align: unset;">
<Card variant="flat">
<CardHeader>
<Body as="h5" size="lg_bold" color="tertiary800">
Flat Card
</Body>
</CardHeader>
<CardBody>

Hoverable

You can apply a fancy hover animation with the hoverable prop and you can use the pressable property to allow users to interact with the entirety of its surface to trigger its main action, be it an expansion, a link to another screen or some other behavior.

card variant
Hoverable Card
Some quick example text to build on the card title and content.
card variant
Pressable Card
Some quick example text to build on the card title and content.
card variant
Hover & Press Card
Some quick example text to build on the card title and content.
//variant hoverable
<div className="item-three" style="text-align: unset;">
<Card variant="bordered" hoverable>
<img src="https://teddys-minio-teddys-dev.vsan-apps.playcourt.id/legion/component/card/apple.png" alt="card variant" />
<CardBody>
<Body as="h6" size="lg_bold" color="tertiary800" mb={1} >
Hoverable Card
</Body>
<Body size="sm_regular" color="tertiary500">

Example

Jane Doe

Front-end Engineer | Legion | Jakarta


Heading

Card title

Some quick example text to build on the card title and make up the bulk of the card's content.

1 Nov, 11:47AM

card
Card title
Some quick example text to build on the card title and make up the bulk of the card's content.
Card title
card

Some quick example text to build on the card title and make up the bulk of the card's content.

Card title
Some quick example text to build on the card title and make up the bulk of the card's content.
card
Card title
Some quick example text to build on the card title.
Card titleRead more

Additional notes

No.Full NameAgeActions
1Eric Clapton77
2Adam Sandler56
3Jennifer Aniston53
4Ben Stiller56
5Brooklyn Decker35
Card title
Some quick example text to build on the card title and make up the bulk of the card's content.
Sources
Some quick example text to build on the card title and make up the bulk of the card's content.
<div className="grid-colum-two">
// CARD 1
<div className="item-three">
<Card variant="bordered">
<CardHeader style="display: flex; flex-direction: column; align-items: center;">
<Avatar size="large" src="https://xsgames.co/randomusers/assets/avatars/female/76.jpg" />
<Heading size="h6" color="tertiary800">
Jane Doe
</Heading>

Props

propertypropTyperequireddefaultdescription
backgroundColor System-add background color with color system format
colorColor System-add color with color system format
elevationelevation0 | elevation1 | elevation2 | elevation3 | elevation4 | elevation5-Elevation helps to provide separation from the background and can be used to indicate when a card is clickable
variantshadow | bordered | flat-flatThe card variant style
hoverableboolean-falseWhether the card can be hovered by the user
pressableboolean-falseWhether the card should allow users to interact with the card.