Skip to content

Card

Content card with optional header and footer.

Import

ts
import { Card } from '@four-bytes/four-tailwind-ui'

Basic Usage

vue
<Card>
  <p>Card content goes here.</p>
</Card>

With Header

vue
<Card title="Benutzer">
  <p>Benutzerinformationen...</p>
</Card>
vue
<Card title="Einstellungen">
  <template #header-actions>
    <Button size="sm">Bearbeiten</Button>
  </template>
  
  <p>Einstellungsoptionen...</p>
  
  <template #footer>
    <Button variant="primary">Speichern</Button>
  </template>
</Card>

Props

PropTypeDefaultDescription
titlestring-Card header title
paddingbooleantrueAdd padding to content

Slots

SlotDescription
defaultCard content
header-actionsActions in header (right side)
footerCard footer

Released under the MIT License.