Layout e grids
VCardGrid
`VCardGrid` organiza cards em uma grade CSS. Use `cols` para um número fixo de colunas (ou um mapa por breakpoint: `{ default, sm, md, lg, xl }`), `minCardWidth` para colunas automáticas que se adaptam à largura do container, e `gap` (escala de espaçamento) para o respiro entre cards.
<script setup lang="ts">
import { VCardGrid } from 'vueui-nova-kit'
</script>Uso
<CardGrid :cols="3" :gap="6"> <Card v-for="item in items" :key="item.id"> <template #media> <img :src="item.image" :alt="item.title" /> </template> <h3>{{ item.title }}</h3> <p>{{ item.description }}</p> </Card> </CardGrid>Playground
Os controles abaixo são gerados a partir das props declaradas em VCardGrid.types.ts; o código acompanha cada mudança.
Exemplos
Variantes, tamanhos e estados, extraídos das stories da biblioteca.
Default
Grade padrão de 3 colunas com gap=6. Cada card traz mídia, título, descrição, status (VBadge), responsável (VAvatar) e ação (VButton). Use Controls para alterar cols e gap ao vivo.
Ver código
<script setup lang="ts">
import { VCardGrid, VCard, VIcon, VBadge, VAvatar, VButton } from 'vueui-nova-kit'
const args = {
cols: 3,
gap: 6
}
const items = [
{
id: 'alps',
title: 'Rota dos Alpes',
description: 'Trilhas panorâmicas e vistas inesquecíveis.',
icon: {
width: 24,
height: 24,
body: '<path fill=\'none\' stroke=\'currentColor\' stroke-linecap=\'round\' stroke-linejoin=\'round\' stroke-width=\'2\' d=\'M15.4651 9.1794L16.7409 12.4141C16.8933 12.8006 17.1994 13.1067 17.5859 13.2591L20.8206 14.5349C21.0117 14.6102 21.1372 14.7947 21.1372 15C21.1372 15.2053 21.0117 15.3898 20.8206 15.4651L17.5859 16.7409C17.1994 16.8933 16.8933 17.1994 16.7409 17.5859L15.4651 20.8206C15.3898 21.0117 15.2053 21.1372 15 21.1372C14.7947 21.1372 14.6102 21.0117 14.5349 20.8206L13.2591 17.5859C13.1067 17.1994 12.8006 16.8933 12.4141 16.7409L9.1794 15.4651C8.9883 15.3898 8.8628 15.2053 8.8628 15C8.8628 14.7947 8.9883 14.6102 9.1794 14.5349L12.4141 13.2591C12.8006 13.1067 13.1067 12.8006 13.2591 12.4141L14.5349 9.1794C14.6102 8.9883 14.7947 8.8628 15 8.8628C15.2053 8.8628 15.3898 8.9883 15.4651 9.1794ZM6.7151 3.1794L7.2131 4.4419C7.3655 4.8285 7.6715 5.1345 8.0581 5.2869L9.3206 5.7849C9.5117 5.8602 9.6372 6.0447 9.6372 6.25C9.6372 6.4553 9.5117 6.6398 9.3206 6.7151L8.0581 7.2131C7.6715 7.3655 7.3655 7.6715 7.2131 8.0581L6.7151 9.3206C6.6398 9.5117 6.4553 9.6372 6.25 9.6372C6.0447 9.6372 5.8602 9.5117 5.7849 9.3206L5.2869 8.0581C5.1345 7.6715 4.8285 7.3655 4.4419 7.2131L3.1794 6.7151C2.9883 6.6398 2.8628 6.4553 2.8628 6.25C2.8628 6.0447 2.9883 5.8602 3.1794 5.7849L4.4419 5.2869C4.8285 5.1345 5.1345 4.8285 5.2869 4.4419L5.7849 3.1794C5.8602 2.9883 6.0447 2.8628 6.25 2.8628C6.4553 2.8628 6.6398 2.9883 6.7151 3.1794Z\'/>'
},
hue: 220,
status: 'Aberto',
person: 'MC'
},
{
id: 'files',
title: 'Arquivos do projeto',
description: '24 itens · atualizado há 2 h',
icon: {
width: 24,
height: 24,
body: '<path fill=\'none\' stroke=\'currentColor\' stroke-linecap=\'round\' stroke-linejoin=\'round\' stroke-width=\'2\' d=\'M3 7C3 5.3431 4.3431 4 6 4L8.6716 4C9.202 4 9.7107 4.2107 10.0858 4.5858L11.4142 5.9142C11.7893 6.2893 12.298 6.5 12.8284 6.5L18 6.5C19.6569 6.5 21 7.8431 21 9.5L21 17C21 18.6569 19.6569 20 18 20L6 20C4.3431 20 3 18.6569 3 17Z\'/>'
},
hue: 160,
status: 'Sincronizado',
person: 'RL'
},
{
id: 'meeting',
title: 'Reunião de equipe',
description: 'Amanhã, às 10:00',
icon: {
width: 24,
height: 24,
body: '<path fill=\'none\' stroke=\'currentColor\' stroke-linecap=\'round\' stroke-linejoin=\'round\' stroke-width=\'2\' d=\'M5 12L9.66667 17L19 7\'/>'
},
hue: 30,
status: 'Agendado',
person: 'JP'
},
{
id: 'analytics',
title: 'Analytics',
description: '12,4 mil visualizações, +12%',
icon: {
width: 24,
height: 24,
body: '<path fill=\'none\' stroke=\'currentColor\' stroke-linecap=\'round\' stroke-linejoin=\'round\' stroke-width=\'2\' d=\'M6 6H17.5C17.77614 6 18 6.22386 18 6.5V18M7.2 16.8L17.4 6.6\'/>'
},
hue: 280,
status: 'Em alta',
person: 'BA'
},
{
id: 'design',
title: 'Design System',
description: '142 componentes publicados',
icon: {
width: 24,
height: 24,
body: '<path fill=\'none\' stroke=\'currentColor\' stroke-linecap=\'round\' stroke-linejoin=\'round\' stroke-width=\'2\' d=\'M5 3L15 3C16.6569 3 18 4.3431 18 6L18 7C19.6569 7 21 8.3431 21 10L21 18C21 19.6569 19.6569 21 18 21L6 21C4.3431 21 3 19.6569 3 18L3 5C3 3.8954 3.8954 3 5 3ZM3 5C3 6.1046 3.8954 7 5 7L18 7M21 12L18 12C16.8954 12 16 12.8954 16 14C16 15.1046 16.8954 16 18 16L21 16\'/>'
},
hue: 340,
status: 'Estável',
person: 'CN'
},
{
id: 'docs',
title: 'Documentação',
description: '56 artigos revisados',
icon: {
width: 24,
height: 24,
body: '<path fill=\'none\' stroke=\'currentColor\' stroke-linecap=\'round\' stroke-linejoin=\'round\' stroke-width=\'2\' d=\'M14 2H8C5.79086 2 4 3.79086 4 6V18C4 20.2091 5.79086 22 8 22H16C18.2091 22 20 20.2091 20 18V8L14 2ZM14 2V5C14 6.65685 15.3431 8 17 8H20M8 13H12M8 17H16\'/>'
},
hue: 190,
status: 'Revisado',
person: 'DS'
}
]
const mediaStyle = (hue) => `display:flex;align-items:center;justify-content:center;aspect-ratio:16/9;color:#fff;background:linear-gradient(135deg,hsl(${hue} 70% 55%),hsl(${(hue + 50) % 360} 70% 40%))`
</script>
<template>
<VCardGrid v-bind="args" aria-label="Projetos">
<VCard v-for="item in items" :key="item.id" :data-test-id="'v-cardgrid-card-' + item.id" :title="item.title" :description="item.description" variant="elevated">
<template #media><div :style="mediaStyle(item.hue)"><VIcon :icon="item.icon" size="lg" /></div></template>
<template #header-trailing><VBadge size="sm">{{ item.status }}</VBadge></template>
<template #avatar-group><VAvatar :initials="item.person" size="sm" :alt="item.person" /></template>
<template #actions><VButton size="sm" variant="ghost">Abrir</VButton></template>
</VCard>
</VCardGrid>
</template>Columns
Mesma coleção com 2, 3 e 4 colunas (cols), empilhadas para comparação. O número de colunas é fixo, independente da largura.
Ver código
<script setup lang="ts">
import { VCardGrid, VCard } from 'vueui-nova-kit'
const items = [
{
id: 'alps',
title: 'Rota dos Alpes',
description: 'Trilhas panorâmicas e vistas inesquecíveis.',
icon: {
width: 24,
height: 24,
body: '<path fill=\'none\' stroke=\'currentColor\' stroke-linecap=\'round\' stroke-linejoin=\'round\' stroke-width=\'2\' d=\'M15.4651 9.1794L16.7409 12.4141C16.8933 12.8006 17.1994 13.1067 17.5859 13.2591L20.8206 14.5349C21.0117 14.6102 21.1372 14.7947 21.1372 15C21.1372 15.2053 21.0117 15.3898 20.8206 15.4651L17.5859 16.7409C17.1994 16.8933 16.8933 17.1994 16.7409 17.5859L15.4651 20.8206C15.3898 21.0117 15.2053 21.1372 15 21.1372C14.7947 21.1372 14.6102 21.0117 14.5349 20.8206L13.2591 17.5859C13.1067 17.1994 12.8006 16.8933 12.4141 16.7409L9.1794 15.4651C8.9883 15.3898 8.8628 15.2053 8.8628 15C8.8628 14.7947 8.9883 14.6102 9.1794 14.5349L12.4141 13.2591C12.8006 13.1067 13.1067 12.8006 13.2591 12.4141L14.5349 9.1794C14.6102 8.9883 14.7947 8.8628 15 8.8628C15.2053 8.8628 15.3898 8.9883 15.4651 9.1794ZM6.7151 3.1794L7.2131 4.4419C7.3655 4.8285 7.6715 5.1345 8.0581 5.2869L9.3206 5.7849C9.5117 5.8602 9.6372 6.0447 9.6372 6.25C9.6372 6.4553 9.5117 6.6398 9.3206 6.7151L8.0581 7.2131C7.6715 7.3655 7.3655 7.6715 7.2131 8.0581L6.7151 9.3206C6.6398 9.5117 6.4553 9.6372 6.25 9.6372C6.0447 9.6372 5.8602 9.5117 5.7849 9.3206L5.2869 8.0581C5.1345 7.6715 4.8285 7.3655 4.4419 7.2131L3.1794 6.7151C2.9883 6.6398 2.8628 6.4553 2.8628 6.25C2.8628 6.0447 2.9883 5.8602 3.1794 5.7849L4.4419 5.2869C4.8285 5.1345 5.1345 4.8285 5.2869 4.4419L5.7849 3.1794C5.8602 2.9883 6.0447 2.8628 6.25 2.8628C6.4553 2.8628 6.6398 2.9883 6.7151 3.1794Z\'/>'
},
hue: 220,
status: 'Aberto',
person: 'MC'
},
{
id: 'files',
title: 'Arquivos do projeto',
description: '24 itens · atualizado há 2 h',
icon: {
width: 24,
height: 24,
body: '<path fill=\'none\' stroke=\'currentColor\' stroke-linecap=\'round\' stroke-linejoin=\'round\' stroke-width=\'2\' d=\'M3 7C3 5.3431 4.3431 4 6 4L8.6716 4C9.202 4 9.7107 4.2107 10.0858 4.5858L11.4142 5.9142C11.7893 6.2893 12.298 6.5 12.8284 6.5L18 6.5C19.6569 6.5 21 7.8431 21 9.5L21 17C21 18.6569 19.6569 20 18 20L6 20C4.3431 20 3 18.6569 3 17Z\'/>'
},
hue: 160,
status: 'Sincronizado',
person: 'RL'
},
{
id: 'meeting',
title: 'Reunião de equipe',
description: 'Amanhã, às 10:00',
icon: {
width: 24,
height: 24,
body: '<path fill=\'none\' stroke=\'currentColor\' stroke-linecap=\'round\' stroke-linejoin=\'round\' stroke-width=\'2\' d=\'M5 12L9.66667 17L19 7\'/>'
},
hue: 30,
status: 'Agendado',
person: 'JP'
},
{
id: 'analytics',
title: 'Analytics',
description: '12,4 mil visualizações, +12%',
icon: {
width: 24,
height: 24,
body: '<path fill=\'none\' stroke=\'currentColor\' stroke-linecap=\'round\' stroke-linejoin=\'round\' stroke-width=\'2\' d=\'M6 6H17.5C17.77614 6 18 6.22386 18 6.5V18M7.2 16.8L17.4 6.6\'/>'
},
hue: 280,
status: 'Em alta',
person: 'BA'
}
]
const counts = [
2,
3,
4
]
</script>
<template>
<div style="display:flex;flex-direction:column;gap:32px">
<VCardGrid v-for="n in counts" :key="n" :cols="n" :gap="4" :aria-label="n + ' colunas'" :data-test-id="'docs-cardgrid-cols-' + n">
<VCard v-for="item in items.slice(0, n)" :key="item.id" :title="item.title" :description="item.description" variant="outlined" size="sm" />
</VCardGrid>
</div>
</template>Gaps
Efeito do gap na escala de espaçamento: gap=1 (compacto), gap=6 (padrão) e gap=12 (arejado).
Ver código
<script setup lang="ts">
import { VCardGrid, VCard } from 'vueui-nova-kit'
const items = [
{
id: 'alps',
title: 'Rota dos Alpes',
description: 'Trilhas panorâmicas e vistas inesquecíveis.',
icon: {
width: 24,
height: 24,
body: '<path fill=\'none\' stroke=\'currentColor\' stroke-linecap=\'round\' stroke-linejoin=\'round\' stroke-width=\'2\' d=\'M15.4651 9.1794L16.7409 12.4141C16.8933 12.8006 17.1994 13.1067 17.5859 13.2591L20.8206 14.5349C21.0117 14.6102 21.1372 14.7947 21.1372 15C21.1372 15.2053 21.0117 15.3898 20.8206 15.4651L17.5859 16.7409C17.1994 16.8933 16.8933 17.1994 16.7409 17.5859L15.4651 20.8206C15.3898 21.0117 15.2053 21.1372 15 21.1372C14.7947 21.1372 14.6102 21.0117 14.5349 20.8206L13.2591 17.5859C13.1067 17.1994 12.8006 16.8933 12.4141 16.7409L9.1794 15.4651C8.9883 15.3898 8.8628 15.2053 8.8628 15C8.8628 14.7947 8.9883 14.6102 9.1794 14.5349L12.4141 13.2591C12.8006 13.1067 13.1067 12.8006 13.2591 12.4141L14.5349 9.1794C14.6102 8.9883 14.7947 8.8628 15 8.8628C15.2053 8.8628 15.3898 8.9883 15.4651 9.1794ZM6.7151 3.1794L7.2131 4.4419C7.3655 4.8285 7.6715 5.1345 8.0581 5.2869L9.3206 5.7849C9.5117 5.8602 9.6372 6.0447 9.6372 6.25C9.6372 6.4553 9.5117 6.6398 9.3206 6.7151L8.0581 7.2131C7.6715 7.3655 7.3655 7.6715 7.2131 8.0581L6.7151 9.3206C6.6398 9.5117 6.4553 9.6372 6.25 9.6372C6.0447 9.6372 5.8602 9.5117 5.7849 9.3206L5.2869 8.0581C5.1345 7.6715 4.8285 7.3655 4.4419 7.2131L3.1794 6.7151C2.9883 6.6398 2.8628 6.4553 2.8628 6.25C2.8628 6.0447 2.9883 5.8602 3.1794 5.7849L4.4419 5.2869C4.8285 5.1345 5.1345 4.8285 5.2869 4.4419L5.7849 3.1794C5.8602 2.9883 6.0447 2.8628 6.25 2.8628C6.4553 2.8628 6.6398 2.9883 6.7151 3.1794Z\'/>'
},
hue: 220,
status: 'Aberto',
person: 'MC'
},
{
id: 'files',
title: 'Arquivos do projeto',
description: '24 itens · atualizado há 2 h',
icon: {
width: 24,
height: 24,
body: '<path fill=\'none\' stroke=\'currentColor\' stroke-linecap=\'round\' stroke-linejoin=\'round\' stroke-width=\'2\' d=\'M3 7C3 5.3431 4.3431 4 6 4L8.6716 4C9.202 4 9.7107 4.2107 10.0858 4.5858L11.4142 5.9142C11.7893 6.2893 12.298 6.5 12.8284 6.5L18 6.5C19.6569 6.5 21 7.8431 21 9.5L21 17C21 18.6569 19.6569 20 18 20L6 20C4.3431 20 3 18.6569 3 17Z\'/>'
},
hue: 160,
status: 'Sincronizado',
person: 'RL'
},
{
id: 'meeting',
title: 'Reunião de equipe',
description: 'Amanhã, às 10:00',
icon: {
width: 24,
height: 24,
body: '<path fill=\'none\' stroke=\'currentColor\' stroke-linecap=\'round\' stroke-linejoin=\'round\' stroke-width=\'2\' d=\'M5 12L9.66667 17L19 7\'/>'
},
hue: 30,
status: 'Agendado',
person: 'JP'
}
]
const gaps = [
1,
6,
12
]
</script>
<template>
<div style="display:flex;flex-direction:column;gap:32px">
<VCardGrid v-for="g in gaps" :key="g" :cols="3" :gap="g" :aria-label="'gap ' + g" :data-test-id="'docs-cardgrid-gap-' + g">
<VCard v-for="item in items" :key="item.id" :title="item.title" :description="item.description" variant="filled" size="sm" />
</VCardGrid>
</div>
</template>Responsive Breakpoints
Colunas por breakpoint: cols={ default: 1, sm: 2, lg: 4 }. Redimensione a janela (ou use o viewport do Storybook): 1 coluna abaixo de 640px, 2 a partir de 640px e 4 a partir de 1024px. Os breakpoints seguem a largura da janela.
Ver código
<script setup lang="ts">
import { VCardGrid, VCard, VIcon } from 'vueui-nova-kit'
const args = {
cols: {
default: 1,
sm: 2,
lg: 4
},
gap: 4
}
const items = [
{
id: 'alps',
title: 'Rota dos Alpes',
description: 'Trilhas panorâmicas e vistas inesquecíveis.',
icon: {
width: 24,
height: 24,
body: '<path fill=\'none\' stroke=\'currentColor\' stroke-linecap=\'round\' stroke-linejoin=\'round\' stroke-width=\'2\' d=\'M15.4651 9.1794L16.7409 12.4141C16.8933 12.8006 17.1994 13.1067 17.5859 13.2591L20.8206 14.5349C21.0117 14.6102 21.1372 14.7947 21.1372 15C21.1372 15.2053 21.0117 15.3898 20.8206 15.4651L17.5859 16.7409C17.1994 16.8933 16.8933 17.1994 16.7409 17.5859L15.4651 20.8206C15.3898 21.0117 15.2053 21.1372 15 21.1372C14.7947 21.1372 14.6102 21.0117 14.5349 20.8206L13.2591 17.5859C13.1067 17.1994 12.8006 16.8933 12.4141 16.7409L9.1794 15.4651C8.9883 15.3898 8.8628 15.2053 8.8628 15C8.8628 14.7947 8.9883 14.6102 9.1794 14.5349L12.4141 13.2591C12.8006 13.1067 13.1067 12.8006 13.2591 12.4141L14.5349 9.1794C14.6102 8.9883 14.7947 8.8628 15 8.8628C15.2053 8.8628 15.3898 8.9883 15.4651 9.1794ZM6.7151 3.1794L7.2131 4.4419C7.3655 4.8285 7.6715 5.1345 8.0581 5.2869L9.3206 5.7849C9.5117 5.8602 9.6372 6.0447 9.6372 6.25C9.6372 6.4553 9.5117 6.6398 9.3206 6.7151L8.0581 7.2131C7.6715 7.3655 7.3655 7.6715 7.2131 8.0581L6.7151 9.3206C6.6398 9.5117 6.4553 9.6372 6.25 9.6372C6.0447 9.6372 5.8602 9.5117 5.7849 9.3206L5.2869 8.0581C5.1345 7.6715 4.8285 7.3655 4.4419 7.2131L3.1794 6.7151C2.9883 6.6398 2.8628 6.4553 2.8628 6.25C2.8628 6.0447 2.9883 5.8602 3.1794 5.7849L4.4419 5.2869C4.8285 5.1345 5.1345 4.8285 5.2869 4.4419L5.7849 3.1794C5.8602 2.9883 6.0447 2.8628 6.25 2.8628C6.4553 2.8628 6.6398 2.9883 6.7151 3.1794Z\'/>'
},
hue: 220,
status: 'Aberto',
person: 'MC'
},
{
id: 'files',
title: 'Arquivos do projeto',
description: '24 itens · atualizado há 2 h',
icon: {
width: 24,
height: 24,
body: '<path fill=\'none\' stroke=\'currentColor\' stroke-linecap=\'round\' stroke-linejoin=\'round\' stroke-width=\'2\' d=\'M3 7C3 5.3431 4.3431 4 6 4L8.6716 4C9.202 4 9.7107 4.2107 10.0858 4.5858L11.4142 5.9142C11.7893 6.2893 12.298 6.5 12.8284 6.5L18 6.5C19.6569 6.5 21 7.8431 21 9.5L21 17C21 18.6569 19.6569 20 18 20L6 20C4.3431 20 3 18.6569 3 17Z\'/>'
},
hue: 160,
status: 'Sincronizado',
person: 'RL'
},
{
id: 'meeting',
title: 'Reunião de equipe',
description: 'Amanhã, às 10:00',
icon: {
width: 24,
height: 24,
body: '<path fill=\'none\' stroke=\'currentColor\' stroke-linecap=\'round\' stroke-linejoin=\'round\' stroke-width=\'2\' d=\'M5 12L9.66667 17L19 7\'/>'
},
hue: 30,
status: 'Agendado',
person: 'JP'
},
{
id: 'analytics',
title: 'Analytics',
description: '12,4 mil visualizações, +12%',
icon: {
width: 24,
height: 24,
body: '<path fill=\'none\' stroke=\'currentColor\' stroke-linecap=\'round\' stroke-linejoin=\'round\' stroke-width=\'2\' d=\'M6 6H17.5C17.77614 6 18 6.22386 18 6.5V18M7.2 16.8L17.4 6.6\'/>'
},
hue: 280,
status: 'Em alta',
person: 'BA'
},
{
id: 'design',
title: 'Design System',
description: '142 componentes publicados',
icon: {
width: 24,
height: 24,
body: '<path fill=\'none\' stroke=\'currentColor\' stroke-linecap=\'round\' stroke-linejoin=\'round\' stroke-width=\'2\' d=\'M5 3L15 3C16.6569 3 18 4.3431 18 6L18 7C19.6569 7 21 8.3431 21 10L21 18C21 19.6569 19.6569 21 18 21L6 21C4.3431 21 3 19.6569 3 18L3 5C3 3.8954 3.8954 3 5 3ZM3 5C3 6.1046 3.8954 7 5 7L18 7M21 12L18 12C16.8954 12 16 12.8954 16 14C16 15.1046 16.8954 16 18 16L21 16\'/>'
},
hue: 340,
status: 'Estável',
person: 'CN'
},
{
id: 'docs',
title: 'Documentação',
description: '56 artigos revisados',
icon: {
width: 24,
height: 24,
body: '<path fill=\'none\' stroke=\'currentColor\' stroke-linecap=\'round\' stroke-linejoin=\'round\' stroke-width=\'2\' d=\'M14 2H8C5.79086 2 4 3.79086 4 6V18C4 20.2091 5.79086 22 8 22H16C18.2091 22 20 20.2091 20 18V8L14 2ZM14 2V5C14 6.65685 15.3431 8 17 8H20M8 13H12M8 17H16\'/>'
},
hue: 190,
status: 'Revisado',
person: 'DS'
},
{
id: 'billing',
title: 'Faturamento',
description: 'Próximo ciclo em 8 dias',
icon: {
width: 24,
height: 24,
body: '<path fill=\'none\' stroke=\'currentColor\' stroke-linecap=\'round\' stroke-linejoin=\'round\' stroke-width=\'2\' d=\'M5 3L15 3C16.6569 3 18 4.3431 18 6L18 7C19.6569 7 21 8.3431 21 10L21 18C21 19.6569 19.6569 21 18 21L6 21C4.3431 21 3 19.6569 3 18L3 5C3 3.8954 3.8954 3 5 3ZM3 5C3 6.1046 3.8954 7 5 7L18 7M21 12L18 12C16.8954 12 16 12.8954 16 14C16 15.1046 16.8954 16 18 16L21 16\'/>'
},
hue: 100,
status: 'Ativo',
person: 'AR'
},
{
id: 'planejamento',
title: 'Planejamento 2026',
description: '3 marcos no próximo trimestre',
icon: {
width: 24,
height: 24,
body: '<path fill=\'none\' stroke=\'currentColor\' stroke-linecap=\'round\' stroke-linejoin=\'round\' stroke-width=\'2\' d=\'M15.4651 9.1794L16.7409 12.4141C16.8933 12.8006 17.1994 13.1067 17.5859 13.2591L20.8206 14.5349C21.0117 14.6102 21.1372 14.7947 21.1372 15C21.1372 15.2053 21.0117 15.3898 20.8206 15.4651L17.5859 16.7409C17.1994 16.8933 16.8933 17.1994 16.7409 17.5859L15.4651 20.8206C15.3898 21.0117 15.2053 21.1372 15 21.1372C14.7947 21.1372 14.6102 21.0117 14.5349 20.8206L13.2591 17.5859C13.1067 17.1994 12.8006 16.8933 12.4141 16.7409L9.1794 15.4651C8.9883 15.3898 8.8628 15.2053 8.8628 15C8.8628 14.7947 8.9883 14.6102 9.1794 14.5349L12.4141 13.2591C12.8006 13.1067 13.1067 12.8006 13.2591 12.4141L14.5349 9.1794C14.6102 8.9883 14.7947 8.8628 15 8.8628C15.2053 8.8628 15.3898 8.9883 15.4651 9.1794ZM6.7151 3.1794L7.2131 4.4419C7.3655 4.8285 7.6715 5.1345 8.0581 5.2869L9.3206 5.7849C9.5117 5.8602 9.6372 6.0447 9.6372 6.25C9.6372 6.4553 9.5117 6.6398 9.3206 6.7151L8.0581 7.2131C7.6715 7.3655 7.3655 7.6715 7.2131 8.0581L6.7151 9.3206C6.6398 9.5117 6.4553 9.6372 6.25 9.6372C6.0447 9.6372 5.8602 9.5117 5.7849 9.3206L5.2869 8.0581C5.1345 7.6715 4.8285 7.3655 4.4419 7.2131L3.1794 6.7151C2.9883 6.6398 2.8628 6.4553 2.8628 6.25C2.8628 6.0447 2.9883 5.8602 3.1794 5.7849L4.4419 5.2869C4.8285 5.1345 5.1345 4.8285 5.2869 4.4419L5.7849 3.1794C5.8602 2.9883 6.0447 2.8628 6.25 2.8628C6.4553 2.8628 6.6398 2.9883 6.7151 3.1794Z\'/>'
},
hue: 260,
status: 'Rascunho',
person: 'PM'
}
]
const mediaStyle = (hue) => `display:flex;align-items:center;justify-content:center;aspect-ratio:16/9;color:#fff;background:linear-gradient(135deg,hsl(${hue} 70% 55%),hsl(${(hue + 50) % 360} 70% 40%))`
</script>
<template>
<VCardGrid v-bind="args" aria-label="Responsivo por breakpoint">
<VCard v-for="item in items" :key="item.id" :title="item.title" :description="item.description" variant="elevated" size="sm">
<template #media><div :style="mediaStyle(item.hue)"><VIcon :icon="item.icon" /></div></template>
</VCard>
</VCardGrid>
</template>Auto Fill Min Width
Com minCardWidth=240 o número de colunas é calculado pela largura do container: cada card nunca fica menor que 240px e as colunas aumentam/diminuem sozinhas. O container abaixo é redimensionável (arraste o canto inferior direito).
Ver código
<script setup lang="ts">
import { VCardGrid, VCard, VIcon } from 'vueui-nova-kit'
const args = {
cols: 3,
gap: 4,
minCardWidth: 240
}
const items = [
{
id: 'alps',
title: 'Rota dos Alpes',
description: 'Trilhas panorâmicas e vistas inesquecíveis.',
icon: {
width: 24,
height: 24,
body: '<path fill=\'none\' stroke=\'currentColor\' stroke-linecap=\'round\' stroke-linejoin=\'round\' stroke-width=\'2\' d=\'M15.4651 9.1794L16.7409 12.4141C16.8933 12.8006 17.1994 13.1067 17.5859 13.2591L20.8206 14.5349C21.0117 14.6102 21.1372 14.7947 21.1372 15C21.1372 15.2053 21.0117 15.3898 20.8206 15.4651L17.5859 16.7409C17.1994 16.8933 16.8933 17.1994 16.7409 17.5859L15.4651 20.8206C15.3898 21.0117 15.2053 21.1372 15 21.1372C14.7947 21.1372 14.6102 21.0117 14.5349 20.8206L13.2591 17.5859C13.1067 17.1994 12.8006 16.8933 12.4141 16.7409L9.1794 15.4651C8.9883 15.3898 8.8628 15.2053 8.8628 15C8.8628 14.7947 8.9883 14.6102 9.1794 14.5349L12.4141 13.2591C12.8006 13.1067 13.1067 12.8006 13.2591 12.4141L14.5349 9.1794C14.6102 8.9883 14.7947 8.8628 15 8.8628C15.2053 8.8628 15.3898 8.9883 15.4651 9.1794ZM6.7151 3.1794L7.2131 4.4419C7.3655 4.8285 7.6715 5.1345 8.0581 5.2869L9.3206 5.7849C9.5117 5.8602 9.6372 6.0447 9.6372 6.25C9.6372 6.4553 9.5117 6.6398 9.3206 6.7151L8.0581 7.2131C7.6715 7.3655 7.3655 7.6715 7.2131 8.0581L6.7151 9.3206C6.6398 9.5117 6.4553 9.6372 6.25 9.6372C6.0447 9.6372 5.8602 9.5117 5.7849 9.3206L5.2869 8.0581C5.1345 7.6715 4.8285 7.3655 4.4419 7.2131L3.1794 6.7151C2.9883 6.6398 2.8628 6.4553 2.8628 6.25C2.8628 6.0447 2.9883 5.8602 3.1794 5.7849L4.4419 5.2869C4.8285 5.1345 5.1345 4.8285 5.2869 4.4419L5.7849 3.1794C5.8602 2.9883 6.0447 2.8628 6.25 2.8628C6.4553 2.8628 6.6398 2.9883 6.7151 3.1794Z\'/>'
},
hue: 220,
status: 'Aberto',
person: 'MC'
},
{
id: 'files',
title: 'Arquivos do projeto',
description: '24 itens · atualizado há 2 h',
icon: {
width: 24,
height: 24,
body: '<path fill=\'none\' stroke=\'currentColor\' stroke-linecap=\'round\' stroke-linejoin=\'round\' stroke-width=\'2\' d=\'M3 7C3 5.3431 4.3431 4 6 4L8.6716 4C9.202 4 9.7107 4.2107 10.0858 4.5858L11.4142 5.9142C11.7893 6.2893 12.298 6.5 12.8284 6.5L18 6.5C19.6569 6.5 21 7.8431 21 9.5L21 17C21 18.6569 19.6569 20 18 20L6 20C4.3431 20 3 18.6569 3 17Z\'/>'
},
hue: 160,
status: 'Sincronizado',
person: 'RL'
},
{
id: 'meeting',
title: 'Reunião de equipe',
description: 'Amanhã, às 10:00',
icon: {
width: 24,
height: 24,
body: '<path fill=\'none\' stroke=\'currentColor\' stroke-linecap=\'round\' stroke-linejoin=\'round\' stroke-width=\'2\' d=\'M5 12L9.66667 17L19 7\'/>'
},
hue: 30,
status: 'Agendado',
person: 'JP'
},
{
id: 'analytics',
title: 'Analytics',
description: '12,4 mil visualizações, +12%',
icon: {
width: 24,
height: 24,
body: '<path fill=\'none\' stroke=\'currentColor\' stroke-linecap=\'round\' stroke-linejoin=\'round\' stroke-width=\'2\' d=\'M6 6H17.5C17.77614 6 18 6.22386 18 6.5V18M7.2 16.8L17.4 6.6\'/>'
},
hue: 280,
status: 'Em alta',
person: 'BA'
},
{
id: 'design',
title: 'Design System',
description: '142 componentes publicados',
icon: {
width: 24,
height: 24,
body: '<path fill=\'none\' stroke=\'currentColor\' stroke-linecap=\'round\' stroke-linejoin=\'round\' stroke-width=\'2\' d=\'M5 3L15 3C16.6569 3 18 4.3431 18 6L18 7C19.6569 7 21 8.3431 21 10L21 18C21 19.6569 19.6569 21 18 21L6 21C4.3431 21 3 19.6569 3 18L3 5C3 3.8954 3.8954 3 5 3ZM3 5C3 6.1046 3.8954 7 5 7L18 7M21 12L18 12C16.8954 12 16 12.8954 16 14C16 15.1046 16.8954 16 18 16L21 16\'/>'
},
hue: 340,
status: 'Estável',
person: 'CN'
},
{
id: 'docs',
title: 'Documentação',
description: '56 artigos revisados',
icon: {
width: 24,
height: 24,
body: '<path fill=\'none\' stroke=\'currentColor\' stroke-linecap=\'round\' stroke-linejoin=\'round\' stroke-width=\'2\' d=\'M14 2H8C5.79086 2 4 3.79086 4 6V18C4 20.2091 5.79086 22 8 22H16C18.2091 22 20 20.2091 20 18V8L14 2ZM14 2V5C14 6.65685 15.3431 8 17 8H20M8 13H12M8 17H16\'/>'
},
hue: 190,
status: 'Revisado',
person: 'DS'
},
{
id: 'billing',
title: 'Faturamento',
description: 'Próximo ciclo em 8 dias',
icon: {
width: 24,
height: 24,
body: '<path fill=\'none\' stroke=\'currentColor\' stroke-linecap=\'round\' stroke-linejoin=\'round\' stroke-width=\'2\' d=\'M5 3L15 3C16.6569 3 18 4.3431 18 6L18 7C19.6569 7 21 8.3431 21 10L21 18C21 19.6569 19.6569 21 18 21L6 21C4.3431 21 3 19.6569 3 18L3 5C3 3.8954 3.8954 3 5 3ZM3 5C3 6.1046 3.8954 7 5 7L18 7M21 12L18 12C16.8954 12 16 12.8954 16 14C16 15.1046 16.8954 16 18 16L21 16\'/>'
},
hue: 100,
status: 'Ativo',
person: 'AR'
},
{
id: 'planejamento',
title: 'Planejamento 2026',
description: '3 marcos no próximo trimestre',
icon: {
width: 24,
height: 24,
body: '<path fill=\'none\' stroke=\'currentColor\' stroke-linecap=\'round\' stroke-linejoin=\'round\' stroke-width=\'2\' d=\'M15.4651 9.1794L16.7409 12.4141C16.8933 12.8006 17.1994 13.1067 17.5859 13.2591L20.8206 14.5349C21.0117 14.6102 21.1372 14.7947 21.1372 15C21.1372 15.2053 21.0117 15.3898 20.8206 15.4651L17.5859 16.7409C17.1994 16.8933 16.8933 17.1994 16.7409 17.5859L15.4651 20.8206C15.3898 21.0117 15.2053 21.1372 15 21.1372C14.7947 21.1372 14.6102 21.0117 14.5349 20.8206L13.2591 17.5859C13.1067 17.1994 12.8006 16.8933 12.4141 16.7409L9.1794 15.4651C8.9883 15.3898 8.8628 15.2053 8.8628 15C8.8628 14.7947 8.9883 14.6102 9.1794 14.5349L12.4141 13.2591C12.8006 13.1067 13.1067 12.8006 13.2591 12.4141L14.5349 9.1794C14.6102 8.9883 14.7947 8.8628 15 8.8628C15.2053 8.8628 15.3898 8.9883 15.4651 9.1794ZM6.7151 3.1794L7.2131 4.4419C7.3655 4.8285 7.6715 5.1345 8.0581 5.2869L9.3206 5.7849C9.5117 5.8602 9.6372 6.0447 9.6372 6.25C9.6372 6.4553 9.5117 6.6398 9.3206 6.7151L8.0581 7.2131C7.6715 7.3655 7.3655 7.6715 7.2131 8.0581L6.7151 9.3206C6.6398 9.5117 6.4553 9.6372 6.25 9.6372C6.0447 9.6372 5.8602 9.5117 5.7849 9.3206L5.2869 8.0581C5.1345 7.6715 4.8285 7.3655 4.4419 7.2131L3.1794 6.7151C2.9883 6.6398 2.8628 6.4553 2.8628 6.25C2.8628 6.0447 2.9883 5.8602 3.1794 5.7849L4.4419 5.2869C4.8285 5.1345 5.1345 4.8285 5.2869 4.4419L5.7849 3.1794C5.8602 2.9883 6.0447 2.8628 6.25 2.8628C6.4553 2.8628 6.6398 2.9883 6.7151 3.1794Z\'/>'
},
hue: 260,
status: 'Rascunho',
person: 'PM'
}
]
const mediaStyle = (hue) => `display:flex;align-items:center;justify-content:center;aspect-ratio:16/9;color:#fff;background:linear-gradient(135deg,hsl(${hue} 70% 55%),hsl(${(hue + 50) % 360} 70% 40%))`
</script>
<template>
<div style="resize:horizontal;overflow:auto;width:100%;min-width:260px;padding:12px;border:1px dashed var(--v-color-border, #8884)">
<VCardGrid v-bind="args" aria-label="Auto-fill">
<VCard v-for="item in items" :key="item.id" :title="item.title" :description="item.description" variant="elevated" size="sm">
<template #media><div :style="mediaStyle(item.hue)"><VIcon :icon="item.icon" /></div></template>
</VCard>
</VCardGrid>
</div>
</template>Selectable Cards
Cards selecionáveis: cada VCard usa interactive e selected; o estado vive no pai (clique alterna). Útil para escolha de planos, templates ou itens em lote.
Ver código
<script setup lang="ts">
import { ref } from 'vue'
import { VCardGrid, VCard, VIcon } from 'vueui-nova-kit'
const items = [
{
id: 'alps',
title: 'Rota dos Alpes',
description: 'Trilhas panorâmicas e vistas inesquecíveis.',
icon: {
width: 24,
height: 24,
body: '<path fill=\'none\' stroke=\'currentColor\' stroke-linecap=\'round\' stroke-linejoin=\'round\' stroke-width=\'2\' d=\'M15.4651 9.1794L16.7409 12.4141C16.8933 12.8006 17.1994 13.1067 17.5859 13.2591L20.8206 14.5349C21.0117 14.6102 21.1372 14.7947 21.1372 15C21.1372 15.2053 21.0117 15.3898 20.8206 15.4651L17.5859 16.7409C17.1994 16.8933 16.8933 17.1994 16.7409 17.5859L15.4651 20.8206C15.3898 21.0117 15.2053 21.1372 15 21.1372C14.7947 21.1372 14.6102 21.0117 14.5349 20.8206L13.2591 17.5859C13.1067 17.1994 12.8006 16.8933 12.4141 16.7409L9.1794 15.4651C8.9883 15.3898 8.8628 15.2053 8.8628 15C8.8628 14.7947 8.9883 14.6102 9.1794 14.5349L12.4141 13.2591C12.8006 13.1067 13.1067 12.8006 13.2591 12.4141L14.5349 9.1794C14.6102 8.9883 14.7947 8.8628 15 8.8628C15.2053 8.8628 15.3898 8.9883 15.4651 9.1794ZM6.7151 3.1794L7.2131 4.4419C7.3655 4.8285 7.6715 5.1345 8.0581 5.2869L9.3206 5.7849C9.5117 5.8602 9.6372 6.0447 9.6372 6.25C9.6372 6.4553 9.5117 6.6398 9.3206 6.7151L8.0581 7.2131C7.6715 7.3655 7.3655 7.6715 7.2131 8.0581L6.7151 9.3206C6.6398 9.5117 6.4553 9.6372 6.25 9.6372C6.0447 9.6372 5.8602 9.5117 5.7849 9.3206L5.2869 8.0581C5.1345 7.6715 4.8285 7.3655 4.4419 7.2131L3.1794 6.7151C2.9883 6.6398 2.8628 6.4553 2.8628 6.25C2.8628 6.0447 2.9883 5.8602 3.1794 5.7849L4.4419 5.2869C4.8285 5.1345 5.1345 4.8285 5.2869 4.4419L5.7849 3.1794C5.8602 2.9883 6.0447 2.8628 6.25 2.8628C6.4553 2.8628 6.6398 2.9883 6.7151 3.1794Z\'/>'
},
hue: 220,
status: 'Aberto',
person: 'MC'
},
{
id: 'files',
title: 'Arquivos do projeto',
description: '24 itens · atualizado há 2 h',
icon: {
width: 24,
height: 24,
body: '<path fill=\'none\' stroke=\'currentColor\' stroke-linecap=\'round\' stroke-linejoin=\'round\' stroke-width=\'2\' d=\'M3 7C3 5.3431 4.3431 4 6 4L8.6716 4C9.202 4 9.7107 4.2107 10.0858 4.5858L11.4142 5.9142C11.7893 6.2893 12.298 6.5 12.8284 6.5L18 6.5C19.6569 6.5 21 7.8431 21 9.5L21 17C21 18.6569 19.6569 20 18 20L6 20C4.3431 20 3 18.6569 3 17Z\'/>'
},
hue: 160,
status: 'Sincronizado',
person: 'RL'
},
{
id: 'meeting',
title: 'Reunião de equipe',
description: 'Amanhã, às 10:00',
icon: {
width: 24,
height: 24,
body: '<path fill=\'none\' stroke=\'currentColor\' stroke-linecap=\'round\' stroke-linejoin=\'round\' stroke-width=\'2\' d=\'M5 12L9.66667 17L19 7\'/>'
},
hue: 30,
status: 'Agendado',
person: 'JP'
},
{
id: 'analytics',
title: 'Analytics',
description: '12,4 mil visualizações, +12%',
icon: {
width: 24,
height: 24,
body: '<path fill=\'none\' stroke=\'currentColor\' stroke-linecap=\'round\' stroke-linejoin=\'round\' stroke-width=\'2\' d=\'M6 6H17.5C17.77614 6 18 6.22386 18 6.5V18M7.2 16.8L17.4 6.6\'/>'
},
hue: 280,
status: 'Em alta',
person: 'BA'
},
{
id: 'design',
title: 'Design System',
description: '142 componentes publicados',
icon: {
width: 24,
height: 24,
body: '<path fill=\'none\' stroke=\'currentColor\' stroke-linecap=\'round\' stroke-linejoin=\'round\' stroke-width=\'2\' d=\'M5 3L15 3C16.6569 3 18 4.3431 18 6L18 7C19.6569 7 21 8.3431 21 10L21 18C21 19.6569 19.6569 21 18 21L6 21C4.3431 21 3 19.6569 3 18L3 5C3 3.8954 3.8954 3 5 3ZM3 5C3 6.1046 3.8954 7 5 7L18 7M21 12L18 12C16.8954 12 16 12.8954 16 14C16 15.1046 16.8954 16 18 16L21 16\'/>'
},
hue: 340,
status: 'Estável',
person: 'CN'
},
{
id: 'docs',
title: 'Documentação',
description: '56 artigos revisados',
icon: {
width: 24,
height: 24,
body: '<path fill=\'none\' stroke=\'currentColor\' stroke-linecap=\'round\' stroke-linejoin=\'round\' stroke-width=\'2\' d=\'M14 2H8C5.79086 2 4 3.79086 4 6V18C4 20.2091 5.79086 22 8 22H16C18.2091 22 20 20.2091 20 18V8L14 2ZM14 2V5C14 6.65685 15.3431 8 17 8H20M8 13H12M8 17H16\'/>'
},
hue: 190,
status: 'Revisado',
person: 'DS'
}
]
const selected = ref([
'files'
])
const toggle = (id) => {
selected.value = selected.value.includes(id) ? selected.value.filter((i) => i !== id) : [...selected.value, id];
}
</script>
<template>
<VCardGrid :cols="3" :gap="4" aria-label="Seleção de itens">
<VCard v-for="item in items" :key="item.id" :data-test-id="'docs-cardgrid-select-' + item.id" :title="item.title" :description="item.description" variant="outlined" interactive :selected="selected.includes(item.id)" @click="toggle(item.id)">
<template #icon><VIcon :icon="item.icon" /></template>
</VCard>
</VCardGrid>
</template>Loading State
Estado de carregamento: cada VCard com loading exibe skeletons e mantém a grade estável até o conteúdo chegar.
Ver código
<script setup lang="ts">
import { VCardGrid, VCard } from 'vueui-nova-kit'
const items = [
{
id: 'alps',
title: 'Rota dos Alpes',
description: 'Trilhas panorâmicas e vistas inesquecíveis.',
icon: {
width: 24,
height: 24,
body: '<path fill=\'none\' stroke=\'currentColor\' stroke-linecap=\'round\' stroke-linejoin=\'round\' stroke-width=\'2\' d=\'M15.4651 9.1794L16.7409 12.4141C16.8933 12.8006 17.1994 13.1067 17.5859 13.2591L20.8206 14.5349C21.0117 14.6102 21.1372 14.7947 21.1372 15C21.1372 15.2053 21.0117 15.3898 20.8206 15.4651L17.5859 16.7409C17.1994 16.8933 16.8933 17.1994 16.7409 17.5859L15.4651 20.8206C15.3898 21.0117 15.2053 21.1372 15 21.1372C14.7947 21.1372 14.6102 21.0117 14.5349 20.8206L13.2591 17.5859C13.1067 17.1994 12.8006 16.8933 12.4141 16.7409L9.1794 15.4651C8.9883 15.3898 8.8628 15.2053 8.8628 15C8.8628 14.7947 8.9883 14.6102 9.1794 14.5349L12.4141 13.2591C12.8006 13.1067 13.1067 12.8006 13.2591 12.4141L14.5349 9.1794C14.6102 8.9883 14.7947 8.8628 15 8.8628C15.2053 8.8628 15.3898 8.9883 15.4651 9.1794ZM6.7151 3.1794L7.2131 4.4419C7.3655 4.8285 7.6715 5.1345 8.0581 5.2869L9.3206 5.7849C9.5117 5.8602 9.6372 6.0447 9.6372 6.25C9.6372 6.4553 9.5117 6.6398 9.3206 6.7151L8.0581 7.2131C7.6715 7.3655 7.3655 7.6715 7.2131 8.0581L6.7151 9.3206C6.6398 9.5117 6.4553 9.6372 6.25 9.6372C6.0447 9.6372 5.8602 9.5117 5.7849 9.3206L5.2869 8.0581C5.1345 7.6715 4.8285 7.3655 4.4419 7.2131L3.1794 6.7151C2.9883 6.6398 2.8628 6.4553 2.8628 6.25C2.8628 6.0447 2.9883 5.8602 3.1794 5.7849L4.4419 5.2869C4.8285 5.1345 5.1345 4.8285 5.2869 4.4419L5.7849 3.1794C5.8602 2.9883 6.0447 2.8628 6.25 2.8628C6.4553 2.8628 6.6398 2.9883 6.7151 3.1794Z\'/>'
},
hue: 220,
status: 'Aberto',
person: 'MC'
},
{
id: 'files',
title: 'Arquivos do projeto',
description: '24 itens · atualizado há 2 h',
icon: {
width: 24,
height: 24,
body: '<path fill=\'none\' stroke=\'currentColor\' stroke-linecap=\'round\' stroke-linejoin=\'round\' stroke-width=\'2\' d=\'M3 7C3 5.3431 4.3431 4 6 4L8.6716 4C9.202 4 9.7107 4.2107 10.0858 4.5858L11.4142 5.9142C11.7893 6.2893 12.298 6.5 12.8284 6.5L18 6.5C19.6569 6.5 21 7.8431 21 9.5L21 17C21 18.6569 19.6569 20 18 20L6 20C4.3431 20 3 18.6569 3 17Z\'/>'
},
hue: 160,
status: 'Sincronizado',
person: 'RL'
},
{
id: 'meeting',
title: 'Reunião de equipe',
description: 'Amanhã, às 10:00',
icon: {
width: 24,
height: 24,
body: '<path fill=\'none\' stroke=\'currentColor\' stroke-linecap=\'round\' stroke-linejoin=\'round\' stroke-width=\'2\' d=\'M5 12L9.66667 17L19 7\'/>'
},
hue: 30,
status: 'Agendado',
person: 'JP'
},
{
id: 'analytics',
title: 'Analytics',
description: '12,4 mil visualizações, +12%',
icon: {
width: 24,
height: 24,
body: '<path fill=\'none\' stroke=\'currentColor\' stroke-linecap=\'round\' stroke-linejoin=\'round\' stroke-width=\'2\' d=\'M6 6H17.5C17.77614 6 18 6.22386 18 6.5V18M7.2 16.8L17.4 6.6\'/>'
},
hue: 280,
status: 'Em alta',
person: 'BA'
},
{
id: 'design',
title: 'Design System',
description: '142 componentes publicados',
icon: {
width: 24,
height: 24,
body: '<path fill=\'none\' stroke=\'currentColor\' stroke-linecap=\'round\' stroke-linejoin=\'round\' stroke-width=\'2\' d=\'M5 3L15 3C16.6569 3 18 4.3431 18 6L18 7C19.6569 7 21 8.3431 21 10L21 18C21 19.6569 19.6569 21 18 21L6 21C4.3431 21 3 19.6569 3 18L3 5C3 3.8954 3.8954 3 5 3ZM3 5C3 6.1046 3.8954 7 5 7L18 7M21 12L18 12C16.8954 12 16 12.8954 16 14C16 15.1046 16.8954 16 18 16L21 16\'/>'
},
hue: 340,
status: 'Estável',
person: 'CN'
},
{
id: 'docs',
title: 'Documentação',
description: '56 artigos revisados',
icon: {
width: 24,
height: 24,
body: '<path fill=\'none\' stroke=\'currentColor\' stroke-linecap=\'round\' stroke-linejoin=\'round\' stroke-width=\'2\' d=\'M14 2H8C5.79086 2 4 3.79086 4 6V18C4 20.2091 5.79086 22 8 22H16C18.2091 22 20 20.2091 20 18V8L14 2ZM14 2V5C14 6.65685 15.3431 8 17 8H20M8 13H12M8 17H16\'/>'
},
hue: 190,
status: 'Revisado',
person: 'DS'
}
]
</script>
<template>
<VCardGrid :cols="3" :gap="4" aria-label="Carregando">
<VCard v-for="item in items" :key="item.id" loading />
</VCardGrid>
</template>Acessibilidade
Checklist literal ("Accessibility — Built with accessibility in mind"):
- ARIA roles and labels support.
- Keyboard navigation (Tab, Enter, Space).
- Visible focus states.
- Sufficient color contrast.
- Works with screen readers.
- Meaningful alternative text for media.
- Support for dynamic content updates.
Props
| Prop | Tipo | Default | Descrição |
|---|---|---|---|
cols | VGridCols | 3 | Número fixo de colunas, ou mapa por breakpoint ({ default, sm, md, lg, xl }). Ignorado quando `minCardWidth` é definido. |
minCardWidth | number | — | Largura mínima de cada card (px). Ativa o modo auto-fill: o número de colunas se adapta à largura do container. |
gap | VCardGridGap | 6 | — |
ariaLabel | string | — | — |
Events
Não emite eventos.
Slots
Sem slots.
Fonte: src/components/grid/VCardGrid/VCardGrid.vue · tipos: src/components/grid/VCardGrid/VCardGrid.types.ts