Vitral 0.2
Painel

Card

Um contêiner para um único conteúdo: uma imagem de cabeçalho opcional, título e subtítulo, o conteúdo e um rodapé de ações.

Importação

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

Básico

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

Lido de packages/vue/src/components/Card/types.ts, então diz o que o componente aceita de fato.

Props

NomeTipoDescrição
titlestring—
subtitlestring—

Mais pt, dt e unstyled de BaseProps; veja pass-through e modo sem estilo.

Slots

NomeProps do slotDescrição
header—Acima do corpo, de borda a borda: uma imagem ou um banner.
title—Substitui o texto de `title`.
subtitle—Substitui o texto de `subtitle`.
default——
footer——