npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

vue-llm-ui

v0.2.1

Published

Vue 3 component for rendering streamed LLM text with embedded interactive blocks

Readme

vue-llm-ui

a Vue 3 component that renders streamed LLM text with embedded interactive blocks. markdown flows normally, and when the LLM emits a block like 【{type:"chart", ...}】, it gets swapped out for a real Vue component with the parsed JSON as props.

handles partial/malformed JSON during streaming gracefully via automatic repair.

install

npm install vue-llm-ui

usage

<script setup>
import { ref } from 'vue'
import { LLMRenderer } from 'vue-llm-ui'
import 'vue-llm-ui/style.css'
import MyChartComponent from './components/MyChart.vue'

const streamedText = ref('')

const blocks = [
  { type: 'chart', component: MyChartComponent },
]
</script>

<template>
  <LLMRenderer :text="streamedText" :blocks="blocks" />
</template>

as text streams in character by character, LLMRenderer parses it in real time. regular text renders as markdown with syntax-highlighted code blocks (via shiki). when it encounters a block delimiter, it looks up the type in your registry and renders your component, passing the full parsed JSON object as a block prop.

block syntax

blocks are delimited with full-width brackets:

【{type:"buttons", buttons:[{text:"Click me", primary:true}]}】

the LLM writes these inline with its response. during streaming, incomplete blocks show a loading state. malformed JSON gets auto-repaired where possible, with a fallback error state if it can't be fixed.

blocks inside markdown code fences are left alone - they won't be parsed.

writing block components

a block component receives one prop - block - which is the parsed JSON object:

<script setup>
const props = defineProps<{
  block: {
    type: string
    title?: string
    datasetId?: string
  }
}>()
</script>

<template>
  <div>{{ block.title }}</div>
</template>

props

| prop | type | default | description | |------|------|---------|-------------| | text | string | required | the streamed text to render | | blocks | BlockSpec[] | [] | component registry mapping types to Vue components | | theme | string | 'rose-pine' | shiki theme for code highlighting |

available themes: rose-pine, rose-pine-moon, rose-pine-dawn, vitesse-dark, vitesse-light, github-dark, github-light, dracula, nord, one-dark-pro

included components

the library ships with a couple of example block components you can use directly or reference when building your own:

  • ButtonsComponent - interactive button group
  • RadioButtonsComponent - radio button form
import { ButtonsComponent, RadioButtonsComponent } from 'vue-llm-ui'

exports

import {
  LLMRenderer,
  MarkdownRenderer,
  GenericBlockComponent,
  ButtonsComponent,
  RadioButtonsComponent,
  getShikiHighlighter,
} from 'vue-llm-ui'

license

MIT