Feedback e status

VSkeleton

Componente7 exemplos7 propsA2UI · Skeleton

Placeholder de carregamento flexível para conteúdo que está a caminho: melhora a velocidade percebida e mantém o utilizador envolvido enquanto dashboard, cartões, tabelas e gráficos carregam. O skeleton deve espelhar forma e layout do conteúdo real para uma transição coesa (Pro tip: "Use VSkeleton to match the shape and layout of your real content for a smoother, more cohesive loading experience.").

Importação
<script setup lang="ts">
import { VSkeleton } 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 VSkeleton.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 { VSkeleton } from 'vueui-nova-kit'
</script>

<template>
  <VSkeleton />
</template>

Avatar

Variação Avatar. Props: variant="avatar".

Ver código
vue
<script setup lang="ts">
import { VSkeleton } from 'vueui-nova-kit'
</script>

<template>
  <VSkeleton variant="avatar" />
</template>

Card

Variação Card. Props: variant="card".

Ver código
vue
<script setup lang="ts">
import { VSkeleton } from 'vueui-nova-kit'
</script>

<template>
  <VSkeleton variant="card" />
</template>

Table Row

Variação Table Row. Props: variant="table-row".

Ver código
vue
<script setup lang="ts">
import { VSkeleton } from 'vueui-nova-kit'
</script>

<template>
  <VSkeleton variant="table-row" />
</template>

Chart

Variação Chart. Props: variant="chart".

Ver código
vue
<script setup lang="ts">
import { VSkeleton } from 'vueui-nova-kit'
</script>

<template>
  <VSkeleton variant="chart" />
</template>

Paused

Variação Paused. Props: paused=true.

Ver código
vue
<script setup lang="ts">
import { VSkeleton } from 'vueui-nova-kit'
</script>

<template>
  <VSkeleton paused />
</template>

Disabled

Variação Desabilitado. Props: disabled=true.

Ver código
vue
<script setup lang="ts">
import { VSkeleton } from 'vueui-nova-kit'
</script>

<template>
  <VSkeleton disabled />
</template>

Acessibilidade

Semântica nativa primeiro, foco visível, labels acessíveis e teclado conforme o padrão WAI-ARIA correspondente.

Estados

Default · Hover · Focus-visible · Pressed/Active quando aplicável · Disabled · Loading quando aplicável.

Motion

TriggerPropertyDurationEasing
Hoverbackground/transform100msstandard
Focusoutline/box-shadow100msstandard
Enter/Exitopacity/transform160msstandard

Respeitar prefers-reduced-motion.

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

Props

PropTipoDefaultDescrição
variantVSkeletonVariant"text"Content pattern rendered by the skeleton.
sizeVSkeletonSize"md"Scale of shapes within the selected variant.
linesnumber3Number of text lines when `variant` is `text`.
animatedbooleantrueEnables the shimmer animation while content is loading.
pausedbooleanfalseFreezes the shimmer while keeping the placeholder visible.
disabledbooleanfalseMarks the placeholder unavailable and removes motion.
ariaLabelstring—Accessible name announced to assistive technology.

Events

Não emite eventos.

Slots

SlotProps do slot
#default—

Fonte: src/components/feedback/VSkeleton/VSkeleton.vue · tipos: src/components/feedback/VSkeleton/VSkeleton.types.ts