Superfícies
VSection
Contentor flexível para organizar conteúdo relacionado numa secção clara e estruturada. Suporta cabeçalho (ícone, título, descrição), ações, área de conteúdo arbitrária e rodapé opcional.
<script setup lang="ts">
import { VSection } from 'vueui-nova-kit'
</script>Uso
<script setup lang="ts">
</script>
<template>
</template>Playground
Os controles abaixo são gerados a partir das props declaradas em VSection.types.ts; o código acompanha cada mudança.
Exemplos
Variantes, tamanhos e estados, extraídos das stories da biblioteca.
Default
Variação Padrão. Estado padrão do componente; use a aba Controls para experimentar as props ao vivo.
Ver código
<script setup lang="ts">
import { VSection } from 'vueui-nova-kit'
const args = {
size: 'md',
variant: 'default',
title: 'Personal Information',
description: 'Manage your public profile and personal details.'
}
</script>
<template>
<VSection v-bind="args">
<div>Full name · Location · Email · Bio</div>
</VSection>
</template>With Icon And Actions
Variação Com ícone e ações. Props: icon="user". Slots usados: #actions, #footer.
Ver código
<script setup lang="ts">
import { VSection, VButton } from 'vueui-nova-kit'
const args = {
size: 'md',
variant: 'default',
title: 'Personal Information',
description: 'Manage your public profile and personal details.',
icon: 'user'
}
</script>
<template>
<VSection v-bind="args">
<template #actions><VButton variant="ghost" size="sm">Edit</VButton></template>
<div>Profile fields go here.</div>
<template #footer>ⓘ Your profile information is visible to your team members.</template>
</VSection>
</template>Variants
Variação Variantes.
Ver código
<script setup lang="ts">
import { VSection } from 'vueui-nova-kit'
</script>
<template>
<div style="display:grid;gap:16px;">
<VSection data-test-id="docs-section-variant-default" title="Team" description="Manage team members and permissions." variant="default">Default</VSection>
<VSection data-test-id="docs-section-variant-elevated" title="Settings" description="Adds subtle shadow." variant="elevated">Elevated</VSection>
<VSection data-test-id="docs-section-variant-bordered" title="Documentation" description="Uses a clear border." variant="bordered">Bordered</VSection>
<VSection data-test-id="docs-section-variant-borderless" title="Integrations" description="No border for a cleaner look." variant="borderless">Borderless</VSection>
<VSection data-test-id="docs-section-variant-tinted" title="Upgrade" description="Subtle background tint." variant="tinted">Tinted</VSection>
</div>
</template>Sizes
Variação Tamanhos.
Ver código
<script setup lang="ts">
import { VSection } from 'vueui-nova-kit'
</script>
<template>
<div style="display:grid;gap:16px;">
<VSection data-test-id="docs-section-size-sm" size="sm" title="Small title" description="A compact section.">Small</VSection>
<VSection data-test-id="docs-section-size-md" size="md" title="Medium title" description="A balanced section.">Medium</VSection>
<VSection data-test-id="docs-section-size-lg" size="lg" title="Large title" description="A spacious section with more room.">Large</VSection>
</div>
</template>Heading Level3
Variação Heading Level3. Props: headingLevel="3", title="Seção com h3".
Ver código
<script setup lang="ts">
import { VSection } from 'vueui-nova-kit'
</script>
<template>
<VSection
title="Seção com h3"
description="Manage your public profile and personal details."
heading-level="3" />
</template>Acessibilidade
- Landmark
<section>nativo aria-labelledbyapontando para o heading quando há título- Ações internas focáveis por teclado
- Anel de foco visível em secções
interactive - Contraste WCAG AA para título e descrição
Estados
Default · Hover · Focus-visible (quando interactive) · Disabled · Loading
Motion
| Trigger | Property | Duration | Easing |
|---|---|---|---|
| Hover | background | 150ms | ease-out |
| Focus | outline | 150ms | ease-out |
| Elevated | box-shadow | 150ms | ease-out |
Respeitar prefers-reduced-motion.
Todas as transições respeitam prefers-reduced-motion e os tokens --v-duration-*.
Props
| Prop | Tipo | Default | Descrição |
|---|---|---|---|
title | string | — | — |
description | string | — | — |
icon | string | — | — |
headingLevel | VSectionHeadingLevel | "2" | — |
size | VSectionSize | "md" | — |
variant | VSectionVariant | "default" | — |
ariaLabel | string | — | — |
Events
Não emite eventos.
Slots
| Slot | Props do slot |
|---|---|
#icon | — |
#title | — |
#description | — |
#header | — |
#actions | — |
#default | — |
#footer | — |
Fonte: src/components/containment/VSection/VSection.vue · tipos: src/components/containment/VSection/VSection.types.ts