Superfícies

VSection

Componente5 exemplos7 propsA2UI · Section

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.

Importação
<script setup lang="ts">
import { VSection } from 'vueui-nova-kit'
</script>

Uso

Exemplo
<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
vue
<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
vue
<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
vue
<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
vue
<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
vue
<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-labelledby apontando 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

TriggerPropertyDurationEasing
Hoverbackground150msease-out
Focusoutline150msease-out
Elevatedbox-shadow150msease-out

Respeitar prefers-reduced-motion.

Todas as transições respeitam prefers-reduced-motion e os tokens --v-duration-*.

Props

PropTipoDefaultDescrição
titlestring——
descriptionstring——
iconstring——
headingLevelVSectionHeadingLevel"2"—
sizeVSectionSize"md"—
variantVSectionVariant"default"—
ariaLabelstring——

Events

Não emite eventos.

Slots

SlotProps do slot
#icon—
#title—
#description—
#header—
#actions—
#default—
#footer—

Fonte: src/components/containment/VSection/VSection.vue · tipos: src/components/containment/VSection/VSection.types.ts