@usevyre/react@usevyre/vue

Card

A contained surface for grouping related content. Composed of optionalCardHeader, CardBody, and CardFooter sub-components.


Anatomy

Component

Card title

Card body content goes here.

import { Card, CardHeader, CardBody, CardFooter, Button, Badge } from "@usevyre/react";

<Card>
  <CardHeader>
    <Badge variant="teal">Component</Badge>
    <h3>Card title</h3>
  </CardHeader>
  <CardBody>
    <p>Card body content goes here.</p>
  </CardBody>
  <CardFooter>
    <Button variant="ghost" size="sm">Cancel</Button>
    <Button variant="accent" size="sm">Confirm</Button>
  </CardFooter>
</Card>

Variants

Default
Elevated
Outlined
<Card variant="default">Default</Card>
<Card variant="elevated">Elevated (shadow)</Card>
<Card variant="outlined">Outlined (border)</Card>

Card props

Props

PropTypeDefaultDescription
variant"default" | "elevated" | "outlined""default"Visual style of the card surface.
class / classNamestringAdditional CSS class.

CardHeader / CardBody / CardFooter props

Props

PropTypeDefaultDescription
class / classNamestringAdditional CSS class on the section element.