Card
Composable card primitives. The card family renders identically across Angular / React / Vue.
Basic card
Card title
Some quick example text to build on the card title.
Colour variant
Primary
Coloured variant via the
color attribute.Image at the top
With image
Image at the top, body below.
Header & footer
Featured
Special title treatment
With supporting text below as a natural lead-in to additional content.
Nested card
Outer card
A card can be nested inside another card's body:
Inner card
This card is slotted into the outer card's body.
Source
import { BsCard, BsCardBody, BsCardTitle, BsCardText, BsCardImg } from '@mintplayer/react-bootstrap/card';export function MyCard() { return ( <> <BsCard style={{ maxWidth: '20rem' }}> <BsCardBody> <BsCardTitle>Card title</BsCardTitle> <BsCardText>Some quick example body text.</BsCardText> </BsCardBody> </BsCard> <BsCard style={{ maxWidth: '20rem' }} {...{ color: 'primary' }}> <BsCardBody> <BsCardTitle>Primary</BsCardTitle> <BsCardText>Coloured variant via the color attribute.</BsCardText> </BsCardBody> </BsCard> <BsCard style={{ maxWidth: '20rem' }}> <BsCardImg {...{ position: 'top', src: '/favicon.svg', alt: '' }} /> <BsCardBody> <BsCardTitle>With image</BsCardTitle> <BsCardText>Image at the top, body below.</BsCardText> </BsCardBody> </BsCard> <BsCard style={{ maxWidth: '20rem' }}> <BsCardHeader>Featured</BsCardHeader> <BsCardBody> <BsCardTitle>Special title treatment</BsCardTitle> <BsCardText>With supporting text below.</BsCardText> </BsCardBody> <BsCardFooter className="text-body-secondary">2 days ago</BsCardFooter> </BsCard> {/* A card nested inside another card's body */} <BsCard style={{ maxWidth: '24rem' }}> <BsCardBody> <BsCardTitle>Outer card</BsCardTitle> <BsCard> <BsCardBody> <BsCardTitle>Inner card</BsCardTitle> <BsCardText>Slotted into the outer card's body.</BsCardText> </BsCardBody> </BsCard> </BsCardBody> </BsCard> </> );}