Vitral 0.2.18
Panel

Card

A container for one piece of content: an optional header image, a title and subtitle, the content and a footer of actions.

Import

main.ts
import { Card } from '@vitral/vue';

Basic

Simple card

Cards group related content and actions. They have no role of their own; put a heading in the title slot when the card belongs in the page outline.

<script setup lang="ts">import { Card } from '@vitral/vue';</script> <template>    <Card title="Simple card" style="width: 22rem">        <p style="margin: 0">Cards group related content and actions. They have no role of their own; put a heading in the title slot when the card belongs in the page outline.</p>    </Card></template>

API

Read from packages/vue/src/components/Card/types.ts, so it says what the component actually accepts.

Props

NameTypeDescription
title string—
subtitle string—

Plus pt, dt and unstyled from BaseProps, see pass-through and unstyled mode.

Slots

NameSlot propsDescription
header —Above the body, edge to edge: an image or a banner.
title —Replaces the `title` text.
subtitle —Replaces the `subtitle` text.
default ——
footer ——