Reasoning
Collapsible reasoning UI for assistant "thinking" traces.
Default
Thinking...
This is a reasoning component. 1
This is a reasoning component. 2
This is a reasoning component. 3
This is a reasoning component. 4
This is a reasoning component. 5
<script setup>
import { ref } from 'vue'
const streaming = ref(true)
setTimeout(() => {
streaming.value = false
}, 3000)
</script>
<template>
<PReasoning :streaming="streaming" :title="streaming ? 'Thinking...' : 'Thought'">
<div v-for="i in 5" :key="i">
<p>This is a reasoning component. {{ i }}</p>
</div>
</PReasoning>
</template>
Simple
Thought
<template>
<PReasoning variant="simple" :expand="false" title="Thought">
<div v-for="i in 5" :key="i">
<p>This is a reasoning component. {{ i }}</p>
</div>
</PReasoning>
</template>
Props
| Name | Type | Default | Description |
|---|---|---|---|
| variant | 'default' | 'simple' | default | simple drops the card background, border and trigger padding |
| streaming | boolean | true | Streaming state; drives the shimmer |
| expand | boolean | true | Expanded state, applied whenever the value changes |
| title | ComponentText | - | Title text |
| shimmerVariant | 'sunrise' | 'bubble' | 'tonic' | 'spring' | 'twilight' | - | Gradient preset forwarded to the inner Shimmer Text while streaming |
Slots
| Name | Description |
|---|---|
| default | Reasoning content |