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

@stream-kit/ui

v0.2.0-alpha.9

Published

Shared Svelte 5 UI primitives for Stream Kit plugins and the desktop app

Readme

@stream-kit/ui

Shared Svelte 5 UI primitives for Stream Kit.

The app uses this package to render first-party screens and declarative plugin menu pages. Plugin menu page authors should define page schemas from @stream-kit/plugin; Stream Kit renders those schemas with these components.

Installation (plugin authors)

Add as a dev dependency when you build custom Svelte views or dashboard widgets. Zip plugins that use declarative page blocks only do not need this package.

npm install --save-dev @stream-kit/ui @stream-kit/plugin @stream-kit/core

At runtime Stream Kit resolves @stream-kit/ui from the plugin host import map (/plugin-host/@stream-kit/ui/*). Do not bundle @stream-kit/ui into your plugin entry. Externalize it in your Vite or Rollup config alongside svelte, @stream-kit/plugin, and @stream-kit/core.

Match the npm version to the Stream Kit app version you target so types align with the host bundles.

App Usage

<script lang="ts">
	import { Button, Container, Heading, tooltip, tooltipSnippet } from '@stream-kit/ui';
</script>

<Container size="md" class="py-8">
	<Heading level={1} subTitle="Rendered by Stream Kit">
		Hello
	</Heading>

	<Button {@attach tooltip('App-owned UI')}>Click me</Button>
	<Button {@attach tooltip(() => tooltipSnippet(details, item))}>Details</Button>
</Container>

Plugin Page Usage

Plugins do not pass Svelte components or HTML for menu pages. They provide declarative page definitions:

import type { Plugin } from '@stream-kit/plugin';

const plugin: Plugin = (app) => ({
	name: 'Hello World',
	menuItems: [
		{
			title: 'Hello World',
			icon: 'ri:hand-heart-line',
			page: {
				title: 'Hello World',
				blocks: [{ type: 'text', text: 'Rendered by Stream Kit.' }]
			}
		}
	]
});

export default plugin;

Plugin custom views

Built-in-style plugins with customViews or dashboard widgets can import Svelte components:

<script lang="ts">
	import { Button } from '@stream-kit/ui/button';
	import { Container } from '@stream-kit/ui/container';
	import type { PluginCustomViewProps } from '@stream-kit/plugin';

	let { app }: PluginCustomViewProps = $props();
</script>

<Container size="md" class="px-6 py-6">
	<Button onclick={() => app.toast.create({ title: 'Hello' })}>Click me</Button>
</Container>

External zip plugins cannot register customViews; they use declarative page blocks instead.

Notes

  • Components assume the Stream Kit Tailwind theme is present in the host app.
  • This package must not import from @stream-kit/app, $lib, SvelteKit routes, app stores, app i18n, or Tauri APIs.
  • Plugin menu pages must not use raw HTML, {@html}, or plugin-provided Svelte components.
  • Page block types and the generic PageBlocks renderer live in @stream-kit/ui/blocks.
  • Button blocks may define an onClick handler; the plugin controls that callback.