IA

VThoughtLine

Componente4 exemplos6 propsA2UI · ThoughtLine

Linha expansível de raciocínio do agente com timer, trace de passos e resumo ao concluir.

Importação
<script setup lang="ts">
import { VThoughtLine } 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 VThoughtLine.types.ts; o código acompanha cada mudança.

Exemplos

Variantes, tamanhos e estados, extraídos das stories da biblioteca.

Thinking

Variação Thinking. Props: label="Reasoning".

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

const steps = [
  { id: 'scan', label: 'Scanning documentation' },
  { id: 'rank', label: 'Ranking candidate answers' },
]
</script>

<template>
  <VThoughtLine label="Reasoning" :steps="steps" />
</template>

Complete

Variação Complete. Props: label="Reasoning", duration=3600.

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

const steps = [
  { id: 'scan', label: 'Scanning documentation' },
  { id: 'rank', label: 'Ranking candidate answers' },
  { id: 'draft', label: 'Drafting response outline' },
]
</script>

<template>
  <VThoughtLine label="Reasoning" :steps="steps" :duration="3600" />
</template>

Expanded

Variação Expandido. Props: label="Reasoning", defaultExpanded=true.

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

const steps = [
  { id: 'scan', label: 'Scanning documentation' },
  { id: 'rank', label: 'Ranking candidate answers' },
]
</script>

<template>
  <VThoughtLine label="Reasoning" :steps="steps" default-expanded />
</template>

Collapsed Trace

Variação Recolhido Trace. Props: label="Reasoning", duration=2100.

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

const steps = [
  {
    id: 'only',
    label: 'Validated release notes against changelog',
  },
]
</script>

<template>
  <VThoughtLine label="Reasoning" :steps="steps" :duration="2100" />
</template>

Acessibilidade

Header como <button> com aria-expanded. Trace oculto quando colapsado.

Estados

Thinking (timer ativo) · Complete (duration > 0) · Expanded/Collapsed trace.

Motion

TriggerPropertyDurationEasing
Expand traceheight/opacity200msease-out
Step revealopacity/transformstagger 60msease-out

Respeitar prefers-reduced-motion.

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

Props

PropTipoDefaultDescrição
labelstring"Thinking"—
stepsVThoughtLineStep[][]—
durationnumber0—
motionVMotionLevelV_MOTION_DEFAULT ("expressive")—
defaultExpandedbooleanfalse—
ariaLabelstring——

Events

EventoPayloadDescrição
@update:expandedvalue: boolean—

Slots

Sem slots.

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