Components

Card

Display content in a card with a header, body and footer.

Usage

<template>
  <UCard>
    <template #header>
      <Placeholder class="h-8" />
    </template>

    <Placeholder class="h-32" />

    <template #footer>
      <Placeholder class="h-8" />
    </template>
  </UCard>
</template>

API

Props

Prop Default Type
as

'div'

any

The element or component this component should render as.

ui

Partial<{ root: string; header: string; body: string; footer: string; }>

Slots

Slot Type
header

{}

default

{}

footer

{}

Theme

app.config.ts
export default defineAppConfig({
  ui: {
    card: {
      slots: {
        root: 'bg-white dark:bg-gray-900 ring ring-gray-200 dark:ring-gray-800 divide-y divide-gray-200 dark:divide-gray-800 rounded-lg shadow',
        header: 'p-4 sm:px-6',
        body: 'p-4 sm:p-6',
        footer: 'p-4 sm:px-6'
      }
    }
  }
})