@usevyre/react @usevyre/vue

Card

A contained surface for grouping related content. Composed of optional CardHeader, 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

Prop Type Default Description
variant "default" | "elevated" | "outlined" "default" Visual style of the card surface.
class / className string Additional CSS class.

CardHeader / CardBody / CardFooter props

Props

Prop Type Default Description
class / className string Additional CSS class on the section element.