Overlays
VSheet
Superfície edge-attached que desliza da borda para tarefas focadas (settings, details, creation flows), sem tirar o usuário do contexto. Light Mode como referência principal.
<script setup lang="ts">
import { VSheet } 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 VSheet.types.ts; o código acompanha cada mudança.
Exemplos
Variantes, tamanhos e estados, extraídos das stories da biblioteca.
Default
Painel lateral sobre a página, para editar ou detalhar algo sem sair do contexto. Cabeçalho com título, descrição e fechar; ações principais no #footer.
Ver código
<script setup lang="ts">
import { ref } from 'vue'
import { VSheet, VTextInput, VTextarea, VSwitch, VButton } from 'vueui-nova-kit'
const args = {
open: true,
side: 'right',
size: 'md',
title: 'Project settings',
description: 'Manage your project details.'
}
const name = ref('Design System')
const about = ref('')
const isPublic = ref(true)
</script>
<template>
<VSheet v-bind="args">
<VTextInput v-model="name" label="Project name" />
<VTextarea v-model="about" label="Description" placeholder="What is this project about?" />
<VSwitch v-model="isPublic" label="Visible to everyone in the workspace" />
<template #footer>
<VButton variant="ghost">Cancel</VButton>
<VButton>Save changes</VButton>
</template>
</VSheet>
</template>Sides
side: right (padrão), left, bottom e top. Escolha um lado para abrir.
Ver código
<script setup lang="ts">
import { ref } from 'vue'
import { VButton, VSheet } from 'vueui-nova-kit'
const open = ref(false)
const side = ref('right')
const show = (s) => {
side.value = s;
open.value = true;
}
</script>
<template>
<div style="display:flex;gap:8px;padding:24px;flex-wrap:wrap">
<VButton variant="outline" @click="show('right')">Right</VButton>
<VButton variant="outline" @click="show('left')">Left</VButton>
<VButton variant="outline" @click="show('bottom')">Bottom</VButton>
<VButton variant="outline" @click="show('top')">Top</VButton>
</div>
<VSheet v-model:open="open" :side="side" title="Filters" description="Narrow down the results.">
<p style="margin:0;color:var(--v-color-text-muted)">Sheet content.</p>
</VSheet>
</template>Sizes
size: sm 320px, md 480px, lg 640px e xl 800px. Escolha um tamanho para abrir.
Ver código
<script setup lang="ts">
import { ref } from 'vue'
import { VButton, VSheet } from 'vueui-nova-kit'
const open = ref(false)
const size = ref('md')
const show = (s) => {
size.value = s;
open.value = true;
}
</script>
<template>
<div style="display:flex;gap:8px;padding:24px;flex-wrap:wrap">
<VButton variant="outline" @click="show('sm')">Small · 320</VButton>
<VButton variant="outline" @click="show('md')">Medium · 480</VButton>
<VButton variant="outline" @click="show('lg')">Large · 640</VButton>
<VButton variant="outline" @click="show('xl')">Extra large · 800</VButton>
</div>
<VSheet v-model:open="open" :size="size" title="Sheet size" :description="'size="' + size + '"'">
<p style="margin:0;color:var(--v-color-text-muted)">Sheet content.</p>
</VSheet>
</template>With Header Actions
Slot #actions: ações extras no cabeçalho, ao lado do fechar (aqui, um VButton de ícone).
Ver código
<script setup lang="ts">
import { ref } from 'vue'
import { VSheet, VButton, VIcon, VTextInput, VTextarea, VSwitch } from 'vueui-nova-kit'
const args = {
open: true,
side: 'right',
size: 'md',
title: 'Project settings',
description: 'Manage your project details.'
}
const moreIcon = {
width: 24,
height: 24,
body: '<path fill=\'currentColor\' d=\'M7 12C7 13.1045 6.1045 14 5 14C3.8955 14 3 13.1045 3 12C3 10.8955 3.8955 10 5 10C6.1045 10 7 10.8955 7 12ZM14 12C14 13.1045 13.1045 14 12 14C10.8955 14 10 13.1045 10 12C10 10.8955 10.8955 10 12 10C13.1045 10 14 10.8955 14 12ZM21 12C21 13.1045 20.1045 14 19 14C17.8955 14 17 13.1045 17 12C17 10.8955 17.8955 10 19 10C20.1045 10 21 10.8955 21 12Z\'/>'
}
const name = ref('Design System')
const about = ref('')
const isPublic = ref(true)
</script>
<template>
<VSheet v-bind="args">
<template #actions>
<VButton variant="icon" size="sm" aria-label="More options"><template #icon><VIcon :icon="moreIcon" size="sm" /></template></VButton>
</template>
<VTextInput v-model="name" label="Project name" />
<VTextarea v-model="about" label="Description" placeholder="What is this project about?" />
<VSwitch v-model="isPublic" label="Visible to everyone in the workspace" />
<template #footer>
<VButton variant="ghost">Cancel</VButton>
<VButton>Save changes</VButton>
</template>
</VSheet>
</template>Full Height
fullHeight com side="bottom": ocupa a altura toda, para fluxos imersivos.
Ver código
<script setup lang="ts">
import { VSheet } from 'vueui-nova-kit'
const args = {
open: true,
side: 'bottom',
size: 'md',
title: 'Import data',
description: 'Map your columns before importing.',
fullHeight: true
}
</script>
<template>
<VSheet v-bind="args"><p style="margin:0;color:var(--v-color-text-muted)">Sheet content.</p></VSheet>
</template>Loading
loading=true.
Ver código
<script setup lang="ts">
import { VSheet } from 'vueui-nova-kit'
</script>
<template>
<VSheet
v-model="value"
open
title="Project settings"
description="Manage your project details."
loading />
</template>Disabled
disabled=true.
Ver código
<script setup lang="ts">
import { VSheet } from 'vueui-nova-kit'
</script>
<template>
<VSheet
v-model="value"
open
title="Project settings"
description="Manage your project details."
disabled />
</template>No Close Button
showClose=false: feche por Esc, pelo backdrop ou por uma ação do rodapé.
Ver código
<script setup lang="ts">
import { VSheet } from 'vueui-nova-kit'
</script>
<template>
<VSheet
v-model="value"
open
title="Project settings"
description="Manage your project details."
:show-close="false" />
</template>Not Dismissible
dismissible=false: backdrop e Esc não fecham; só o botão de fechar ou uma ação.
Ver código
<script setup lang="ts">
import { VSheet } from 'vueui-nova-kit'
</script>
<template>
<VSheet
v-model="value"
open
title="Project settings"
description="Manage your project details."
:dismissible="false" />
</template>Controlled Open
Abertura controlada com v-model:open; fecha por Esc, backdrop ou pelo botão.
Ver código
<script setup lang="ts">
import { ref } from 'vue'
import { VButton, VSheet } from 'vueui-nova-kit'
const args = {
open: true,
side: 'right',
size: 'md',
title: 'Project settings',
description: 'Manage your project details.'
}
const open = ref(false)
</script>
<template>
<div style="padding:24px"><VButton @click="open = true">Open sheet</VButton></div>
<VSheet v-bind="args" v-model:open="open">
<p style="margin:0;color:var(--v-color-text-muted)">Sheet content.</p>
<template #footer><VButton @click="open = false">Done</VButton></template>
</VSheet>
</template>Acessibilidade
Segue o padrão dialog WAI-ARIA: role="dialog" + aria-modal="true", título como heading (h2) ligado via aria-labelledby (+ aria-describedby via description; ariaLabel/ariaDescribedby como override), focus-trap dialog padrão (Tab/Shift+Tab circulam presos, foco inicial no primeiro focável), Escape + backdrop dispensável fecham (dismissible), retorno de foco ao fechar, backdrop acessível com fechamento por clique.
Estados
data-state expõe o ciclo closed → opening → open → closing durante transições Vue (v-sheet-surface). Interativos internos seguem hover/focus/pressed do sistema. Estados adicionais: disabled, loading.
Motion
| Trigger | Property | Duration | Easing |
|---|---|---|---|
| Slide in (open) | transform/opacity | --v-motion-normal (≈200ms) | --v-ease-out |
| Slide out (close) | transform/opacity | --v-motion-card-hover (150ms) | --v-ease-in |
| Backdrop fade | opacity | --v-motion-normal | --v-ease-out |
| Close button focus | outline | --v-motion-fast | --v-ease-standard |
Respeitar prefers-reduced-motion (slide/transições neutralizados).
Todas as transições respeitam prefers-reduced-motion e os tokens --v-duration-*.
Props
| Prop | Tipo | Default | Descrição |
|---|---|---|---|
open | boolean | undefined | Controls visibility. `v-model:open` (primary) — `modelValue` accepted as alias. |
modelValue | boolean | undefined | — |
side | VSheetSide | "right" | Edge the sheet slides in from. |
size | VSheetSize | "md" | Width preset for side sheets (sm 320 / md 480 / lg 640 / xl 800). |
fullHeight | boolean | false | Immersive full-viewport height (bottom → 100vh; side sheets keep edge-to-edge height). |
title | string | undefined | — |
description | string | undefined | — |
showClose | boolean | true | — |
closeLabel | string | "Close sheet" | — |
dismissible | boolean | true | Backdrop click + Escape dismiss the sheet. |
disabled | boolean | false | — |
loading | boolean | false | — |
ariaLabel | string | undefined | — |
ariaDescribedby | string | undefined | — |
rootClass | string | undefined | Optional root/surface class for composed surfaces (e.g. VDrawer). |
surfaceClass | string | undefined | — |
testIds | VSheetTestIds | undefined | — |
rootDataAttrs | Record<string, string | undefined> | undefined | Extra data-* attributes on the root wrapper (for composed surfaces like VDrawer). |
Events
| Evento | Payload | Descrição |
|---|---|---|
@update:open | value: boolean | — |
@update:modelValue | value: boolean | — |
@open-change | value: boolean | — |
@close | — | — |
@dismiss | — | — |
Slots
| Slot | Props do slot |
|---|---|
#title | — |
#header | — |
#description | — |
#actions | — |
#close | — |
#prepend | — |
#default | — |
#footer | — |
Fonte: src/components/containment/VSheet/VSheet.vue · tipos: src/components/containment/VSheet/VSheet.types.ts