Skip to main content

Card

Cards are surfaces that display content and actions on a single topic.

import {Card} from '@streamelements/frontend-ui';

export function MyCard() {
return <Card.Root>Content Here</Card.Root>
}

Simple Usage

Simple

Complex

Cards can have multiple variations, which include: header, cover, styled text and such.

POPULAR
Card cover
StreamElements TwitchCon2019 T-Shirt
$10.5

API

The Badge component exposes the following props for style changes:

Root

PropertyValueDefaultDescription
hoverablebooleanfalseDisplay shadow when hovering
clickablebooleanfalseDisplay pointer cursor when hovering
onClickfuncon click event handler
classNamestringclassNames string to be added to the root component
radius'sm' | 'md' | 'lg'border-radius of the corners
padding'compact' | 'regular' | 'generous'inner padding
PropertyValueDefaultDescription
classNamestringclassNames string to be added to the root component

Cover

PropertyValueDefaultDescription
imagestringURL for the image (src)
titlestringText to be displayed on tooltip (accessibility purposes)
classNamestringclassNames string to be added to the root component

Meta

PropertyValueDefaultDescription
titlestringCard title (displayed as h6)
classNamestringclassNames string to be added to the root component

Body

PropertyValueDefaultDescription
classNamestringclassNames string to be added to the root component