AI Chat Fancy Stable

StreamingText

Renders a growing string as a live token stream: the appended delta lands tinted and settles, with an optional block cursor while the response is in flight

Preview

Installation

pnpm add fancy-ui-svelte
import { StreamingText } from 'fancy-ui-svelte'

Usage

svelte
<script lang="ts">
  import { StreamingText } from 'fancy-ui-svelte';
</script>

<StreamingText />

Examples

Basic Usage

Markdown Streaming

Props

PropTypeDefaultDescription
text *string-The accumulated text so far, not the latest delta; reassign as chunks arrive
streaming booleanfalseShow a soft block cursor after the last character
markdown booleanfalseRender as markdown instead of the tinted plain-text stream; disables the delta tint
settleMs number350How long a newly arrived chunk stays tinted in ms, plain mode only
tintColor string-Colour a chunk fades from, and the cursor's fill; sets --ft-tint-color
onComplete () => void-Called once when streaming goes from true to false