PXD
v0.2.1-dev

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

NameTypeDefaultDescription
variant'default' | 'simple'defaultsimple drops the card background, border and trigger padding
streamingbooleantrueStreaming state; drives the shimmer
expandbooleantrueExpanded state, applied whenever the value changes
titleComponentText-Title text
shimmerVariant'sunrise' | 'bubble' | 'tonic' | 'spring' | 'twilight'-Gradient preset forwarded to the inner Shimmer Text while streaming

Slots

NameDescription
defaultReasoning content

Source

Source