# sv11-ui > Full documentation corpus. Generated from https://sv11.ui.twango.dev/docs. # Introduction > A component registry for building AI agent interfaces with Svelte 5. sv11-ui is a component registry for building AI agent interfaces — a Svelte 5 port of [elevenlabs/ui](https://github.com/elevenlabs/ui), built on top of [shadcn-svelte](https://shadcn-svelte.com/). It provides pre-built components for voice, chat, transcription, audio, and visualization. Components are distributed via the `shadcn-svelte` CLI: ```bash npx shadcn-svelte@latest add https://sv11.ui.twango.dev/r/.json ``` For example, to install the [Orb](/docs/components/orb) component, you can run: ```bash npx shadcn-svelte@latest add https://sv11.ui.twango.dev/r/orb.json ``` ```svelte

Agent Orbs

Interactive orb visualization with agent states

{#each orbs as colors, index (index)}
{/each}
``` ## Features - **Provider-agnostic** — Wire up your own backend (ElevenLabs, OpenAI, Deepgram, custom, etc.) via `ConversationAdapter`, `TranscriptionAdapter`, and `Voice` interfaces. - **Svelte 5** — Built with runes, snippets, and modern Svelte patterns. - **Tailwind CSS 4** — Styled with tailwind-variants and tailwind-merge. - **Accessible** — Built on bits-ui primitives. Browse the full list of components at [/docs/components](/docs/components), or view the [source code](https://github.com/twangodev/sv11-ui) on GitHub. --- # Setup > Getting started with sv11-ui. sv11-ui components are distributed through the `shadcn-svelte` CLI. Each component is published as a registry entry that the CLI fetches and writes into your project alongside any required dependencies. ```bash npx shadcn-svelte@latest add https://sv11.ui.twango.dev/r/orb.json ``` ## Prerequisites Before installing sv11-ui, make sure your environment meets the following requirements: - [Node.js](https://nodejs.org/) version 18 or later - A [SvelteKit 2](https://svelte.dev/docs/kit) project - [Svelte 5](https://svelte.dev/) with runes - [Tailwind CSS 4](https://tailwindcss.com/) configured - [shadcn-svelte](https://shadcn-svelte.com/) initialized in your project. If it isn't set up yet, running an install command will prompt you through initialization. ## Installing components Install a single component by passing its registry URL to the `shadcn-svelte` CLI: ```bash npx shadcn-svelte@latest add https://sv11.ui.twango.dev/r/.json ``` For example, to add the message component: ```bash npx shadcn-svelte@latest add https://sv11.ui.twango.dev/r/message.json ``` To install every sv11-ui component at once, use the `all` entry: ```bash npx shadcn-svelte@latest add https://sv11.ui.twango.dev/r/all.json ``` The CLI downloads the component source, resolves any registry or npm dependencies, and writes the files into your project (typically under `src/lib/registry/ui//`). Once the command completes, import the component and use it in your code. --- # Usage > How to use sv11-ui components in your SvelteKit application. Once a sv11-ui component is installed, you can import it and use it in your application like any other Svelte component. The components are copied into your codebase (not hidden in a library), so you can freely edit them to suit your specific needs. --- ## Example After installing sv11-ui components, you can use them in your application like any other Svelte component. For example: ```svelte ``` --- # Providers > Provider-agnostic adapter interfaces for wiring sv11 components to any backend. sv11 components do not ship with backend bindings. Instead, they consume small TypeScript adapter interfaces — you pass an object that conforms to the interface, and the component calls into it. Components plus adapters equal a working system, and you are free to wrap ElevenLabs, OpenAI, Deepgram, the Web Speech API, or any custom service. ## ConversationAdapter Used by [ConversationBar](/docs/components/conversation-bar) to drive real-time agent conversations. Handles the full duplex session lifecycle — connecting, streaming messages in both directions, and muting the microphone. ```ts export interface ConversationAdapter { connect(config: ConversationConfig): Promise; disconnect(): void; sendMessage(text: string): void; sendContextualUpdate(text: string): void; setMuted(muted: boolean): void; } ``` The `config` passed to `connect()` is the callback bundle the adapter fires as the session progresses: ```ts export interface ConversationConfig { onConnect: () => void; onDisconnect: () => void; onMessage: (message: ConversationMessage) => void; onError: (error: Error) => void; onStatusChange: (status: AgentConnectionState) => void; onModeChange?: (mode: ConversationMode) => void; } ``` Messages use a simple source-tagged shape: ```ts export interface ConversationMessage { source: "user" | "ai"; message: string; } ``` Status and mode are narrow string-literal unions: ```ts export type AgentConnectionState = "disconnected" | "connecting" | "connected" | "disconnecting"; export type ConversationMode = "speaking" | "listening"; ``` ### Method responsibilities - **`connect(config)`** — Open the underlying transport, begin capturing microphone audio, and wire every event from the backend to the matching callback in `config`. Resolve once the session is live; reject on auth, permission, or initialization errors. - **`disconnect()`** — Tear down the session and release the microphone. Fire `onStatusChange` through `disconnecting` and end with `onDisconnect`. - **`sendMessage(text)`** — Send a user-authored text turn that the agent should treat as spoken input and respond to. - **`sendContextualUpdate(text)`** — Send out-of-band context the agent should be aware of but not respond to directly (e.g. page navigation, UI state). - **`setMuted(muted)`** — Mute or unmute the local microphone without dropping the session. ## TranscriptionAdapter Used by [SpeechInput](/docs/components/speech-input) to stream speech-to-text. The adapter owns the STT socket and emits partial and committed transcripts as they arrive. ```ts export interface TranscriptionAdapter { /** * Open connection and start capturing audio. Resolves when ready * (i.e. when `onConnect` has fired or the connection is established). * Rejects on authentication, permission, or initialization errors. */ start(callbacks: TranscriptionAdapterCallbacks): Promise; /** * Close the connection cleanly. Any in-flight partial transcript is * preserved by the component and passed to the user's `onStop` callback. */ stop(): void; /** * Close the connection AND discard any in-flight partial transcript. * The component clears partial + committed state before firing `onCancel`. */ cancel(): void; } ``` ```ts export interface TranscriptionAdapterCallbacks { onPartialTranscript?: (text: string) => void; onCommittedTranscript?: (text: string) => void; onConnect?: () => void; onDisconnect?: () => void; onError?: (error: Error) => void; } ``` ### Contract details - **`start()` resolution timing** — The returned promise must only resolve once the connection is actually ready for audio (i.e. after `onConnect` has fired or the transport is confirmed open). Rejection is reserved for authentication, permission, or initialization failures so the component can surface them to the user. - **`stop()` vs `cancel()`** — Both close the connection, but they differ in how the component treats any partial transcript still in flight. `stop()` preserves that partial and forwards it to the user's `onStop` callback, so it is the right choice when the user is committing what they said. `cancel()` causes the component to clear partial and committed state before firing `onCancel`, so it is the right choice when the user is throwing the utterance away. - **Partial vs committed** — Call `onPartialTranscript` for interim hypotheses that may still change, and `onCommittedTranscript` once the provider finalizes a segment. ## Voice Used by [VoicePicker](/docs/components/voice-picker) to render voice selection UIs. This is a plain data shape rather than a behavioral interface — you load voices from your provider and map them onto this type. ```ts export type Voice = { id: string; name: string; previewUrl?: string; description?: string; labels?: VoiceLabels; }; export type VoiceLabels = { accent?: string; gender?: string; age?: string; description?: string; descriptive?: string; "use case"?: string; use_case?: string; [key: string]: string | undefined; }; ``` Providing `previewUrl` is what enables the built-in audio preview in `VoicePicker` — omit it and the preview control is hidden. `labels` is an open-ended map with a few conventional keys; anything extra on it is still accepted for filtering and display. ## Writing your own adapter An adapter is any object that matches the interface — there is no base class, no decorator, no registration step. Wrap any SDK (ElevenLabs, OpenAI Realtime, Deepgram, Whisper, the Web Speech API, a custom WebSocket) in a module that exposes the right methods and forwards events to the supplied callbacks. For ready-made recipes per provider, see [/docs/adapters](/docs/adapters). ```svelte ``` --- # Theming > Customize sv11-ui components using CSS variables and component-level color props. sv11-ui components follow shadcn-svelte's CSS variable convention. Theming means overriding CSS custom properties such as `--background`, `--foreground`, `--primary`, and `--accent` on `:root` and `.dark`. Most components read these tokens directly, so customizing your palette in one place restyles every component at once. A handful of visualization components (orb, matrix, waveform) also expose their own color props, since their visual language doesn't map cleanly onto the shadcn token set. ## CSS variables Tokens are declared in your project's `src/app.css`. The shadcn-svelte CLI wires the standard token set into your project when you initialize it; sv11-ui components reuse those same names. Colors are expressed in the [OKLCH](https://oklch.com/) color space. The light palette lives on `:root`, the dark palette on `.dark`: ```css title="src/app.css" :root { --radius: 0.625rem; --background: oklch(1 0 0); --foreground: oklch(0.145 0 0); --primary: oklch(0.205 0 0); --primary-foreground: oklch(0.985 0 0); --accent: oklch(0.97 0 0); --accent-foreground: oklch(0.205 0 0); --muted: oklch(0.97 0 0); --muted-foreground: oklch(0.556 0 0); --border: oklch(0.922 0 0); --ring: oklch(0.708 0 0); /* ...card, popover, secondary, destructive, chart-*, sidebar-* */ } .dark { --background: oklch(0.145 0 0); --foreground: oklch(0.985 0 0); --primary: oklch(0.922 0 0); --primary-foreground: oklch(0.205 0 0); /* ... */ } ``` In addition to the standard shadcn-svelte tokens, sv11-ui declares a few documentation-oriented variables (`--surface`, `--surface-foreground`, `--code`, `--code-foreground`, `--code-highlight`, `--code-number`) and a brand accent (`--svelte-orange`) used by the docs site. Components themselves do not depend on these. ## Customizing tokens To recolor components, override the variables in your own `app.css`. For example, to change the primary color: ```css title="src/app.css" :root { --primary: oklch(0.55 0.2 250); --primary-foreground: oklch(0.985 0 0); } .dark { --primary: oklch(0.7 0.18 250); --primary-foreground: oklch(0.145 0 0); } ``` Every component that references `bg-primary` or `text-primary-foreground` updates automatically. ## Component-specific theming The following components expose dedicated color props because their rendering (WebGL shaders, SVG pixels, canvas bars) doesn't fit the shadcn token model. All other sv11-ui components inherit their colors from the standard tokens above. ### Orb The orb accepts a `colors` prop — a tuple of two color strings that are fed into the shader as `uColor1` and `uColor2`: ```svelte ``` The default palette is `["#CADCFC", "#A0B9D1"]`. Any CSS color string accepted by `THREE.Color` works (hex, `rgb(...)`, named colors). ### Matrix The matrix LED display accepts a `palette` prop with `on` and `off` colors for lit and unlit pixels: ```svelte ``` The default is `{ on: "currentColor", off: "var(--muted-foreground)" }`, so if you don't pass a palette the lit pixels follow the element's `color`, making the matrix themeable via any Tailwind text utility (`class="text-primary"`, `class="text-destructive"`, etc.). ### Waveform and LiveWaveform Both `Waveform` and `LiveWaveform` accept an optional `barColor` prop. When omitted, bars are drawn using the canvas's computed `--foreground` value: ```svelte ``` Because the default resolves from CSS, you can also tint the waveform by setting `color` on a parent element or passing a Tailwind text utility. ## Dark mode sv11-ui ships with both light and dark palettes out of the box. See [Dark mode](/docs/dark-mode) for how to wire up a theme toggle. --- For a deeper reference on the underlying token system, see [shadcn-svelte's theming docs](https://shadcn-svelte.com/docs/theming). --- # Colors > The semantic color tokens sv11-ui components are built on. sv11-ui components are styled entirely with semantic color tokens — the same [shadcn-svelte](https://shadcn-svelte.com/docs/theming) theming layer — rather than hard-coded colors. Each token is a CSS variable exposed as a Tailwind color (e.g. `--primary` → `bg-primary`, `text-primary`), so components adapt automatically to light/dark mode and any custom theme. Click a swatch to copy its Tailwind class. ### Base - `--background` → `bg-background` - `--foreground` → `text-foreground` - `--card` → `bg-card` - `--card-foreground` → `text-card-foreground` - `--popover` → `bg-popover` - `--popover-foreground` → `text-popover-foreground` - `--border` → `bg-border` - `--input` → `bg-input` - `--ring` → `bg-ring` ### Semantic - `--primary` → `bg-primary` - `--primary-foreground` → `text-primary-foreground` - `--secondary` → `bg-secondary` - `--secondary-foreground` → `text-secondary-foreground` - `--muted` → `bg-muted` - `--muted-foreground` → `text-muted-foreground` - `--accent` → `bg-accent` - `--accent-foreground` → `text-accent-foreground` - `--destructive` → `bg-destructive` ### Charts - `--chart-1` → `bg-chart-1` - `--chart-2` → `bg-chart-2` - `--chart-3` → `bg-chart-3` - `--chart-4` → `bg-chart-4` - `--chart-5` → `bg-chart-5` ### Sidebar - `--sidebar` → `bg-sidebar` - `--sidebar-foreground` → `text-sidebar-foreground` - `--sidebar-primary` → `bg-sidebar-primary` - `--sidebar-primary-foreground` → `text-sidebar-primary-foreground` - `--sidebar-accent` → `bg-sidebar-accent` - `--sidebar-accent-foreground` → `text-sidebar-accent-foreground` - `--sidebar-border` → `bg-sidebar-border` - `--sidebar-ring` → `bg-sidebar-ring` ## Using tokens Reference tokens through Tailwind utilities: ```svelte
``` Or directly as CSS variables: ```css .custom { background-color: var(--muted); color: var(--muted-foreground); } ``` ## Customizing Override any token in your global stylesheet to retheme every component at once. See [Theming](/docs/theming) for the full setup and [Dark Mode](/docs/dark-mode) for light/dark switching. ```css :root { --primary: oklch(0.55 0.22 264); --primary-foreground: oklch(0.98 0 0); } ``` --- # Dark Mode > Add light and dark themes to a sv11-ui project with mode-watcher. sv11-ui relies on [`mode-watcher`](https://github.com/svecosystem/mode-watcher) to toggle a `.dark` class on the `` element and persist the user's choice across sessions. Every component's dark styles are scoped to that class, so wiring mode-watcher into your root layout is all that's needed for themes to work. ## Install mode-watcher ```bash npm install mode-watcher ``` ## Add the watcher Render `` once near the top of your root layout so the class is applied and persisted before the rest of the tree renders: ```svelte {@render children()} ``` The sv11-ui docs site renders it with `defaultMode="system"` and `disableTransitions`, which honors the user's OS preference on first load and suppresses the color-flash animation when the class flips: ```svelte ``` See the [mode-watcher documentation](https://mode-watcher.svecosystem.com) for the full list of props. ## CSS setup sv11-ui's Tailwind entrypoint declares a custom variant that activates whenever an element has an ancestor with the `.dark` class: ```css @custom-variant dark (&:is(.dark *)); ``` The `:root` block defines the light-mode tokens, and a `.dark { ... }` block overrides them when the class is present. For example: ```css :root { --primary: oklch(0.205 0 0); } .dark { --primary: oklch(0.922 0 0); } ``` Because every token is swapped in one place, you generally won't need to write your own `dark:` utilities — the existing components already pick up the right values automatically. If you are using a `data-theme` attribute or a different selector, sv11's dark styles will not activate. ## Building a toggle `mode-watcher` exposes a `toggleMode` helper that flips between light and dark. Paired with a button from the registry, a minimal toggle looks like this: ```svelte ``` This is the same pattern the sv11-ui docs site uses in its header mode switcher. ## Reading the current mode When a component needs to branch on the active theme — for example to swap a shader uniform or an image source — import the reactive `mode` store and read `mode.current`: ```svelte ``` `mode.current` is reactive, so anything derived from it updates automatically when the user toggles themes. --- # Troubleshooting > Common issues when installing and using sv11-ui components. ## Why are my components not styled? sv11-ui assumes a Tailwind CSS 4 project with shadcn-svelte's base layer in place. Make sure the CSS entrypoint you import from your root layout (typically `src/app.css`) includes both Tailwind and the shadcn-svelte base styles: ```css @import "tailwindcss"; @import "shadcn-svelte/tailwind.css"; ``` Without the shadcn-svelte import, the CSS variables (`--background`, `--foreground`, `--primary`, etc.) that sv11 components rely on will be undefined and components will render unstyled. --- ## I ran the install command but nothing was added to my project sv11-ui distributes components through the `shadcn-svelte` CLI. Double-check that: - Your current working directory is the root of your project (where `package.json` lives). - `components.json` exists and is configured. If it isn't, the CLI will prompt you to initialize it the first time you run an `add` command. - You're pinning `shadcn-svelte@latest` so the CLI understands the current registry schema: ```bash npx shadcn-svelte@latest add https://sv11.ui.twango.dev/r/orb.json ``` --- ## Theme switching doesn't work — my app stays in light mode sv11-ui uses a `.dark` class on the `` element, managed by [`mode-watcher`](https://github.com/svecosystem/mode-watcher). Two things need to be in place: - Your root layout must render `` so the class is applied and persisted: ```svelte ``` - Your CSS must declare a dark variant bound to that class. sv11's `app.css` uses: ```css @custom-variant dark (&:is(.dark *)); ``` If you are using a `data-theme` attribute or a different selector, component dark-mode styles will not activate. --- ## Component imports fail with "module not found" SvelteKit uses the `$lib` alias, not `@/`. Registry components land under `src/lib/registry/ui//` and should be imported via `$lib/registry/ui/`: ```svelte ``` The `$lib` alias is provided by SvelteKit out of the box and points at `src/lib`. If you've overridden it or added custom aliases, check the `kit.alias` block in your `svelte.config.js` and make sure `$lib` still resolves to `src/lib`. --- ## Still stuck? If all else fails, feel free to open an issue on [GitHub](https://github.com/twangodev/sv11-ui/issues). --- # Changelog > Release history for sv11-ui, auto-generated from conventional commits. ## Unreleased ### Bug Fixes - **voice-chat:** Update sendMessage function signature ([#34](https://github.com/twangodev/sv11-ui/pull/34)) ([a259774](https://github.com/twangodev/sv11-ui/commit/a259774d86fa3452ae9c46e259973db9553aa3fd)) - **docs:** Add gap between page header and content ([#30](https://github.com/twangodev/sv11-ui/pull/30)) ([86669bb](https://github.com/twangodev/sv11-ui/commit/86669bbfa1190cef2f83c2043af6b9b035337496)) - **speaker-01:** Prevent mount effect from rewinding track switches ([#24](https://github.com/twangodev/sv11-ui/pull/24)) ([acbf05f](https://github.com/twangodev/sv11-ui/commit/acbf05ff6fcc8c56975d6410a0f0b883fae94c64)) - **changelog:** Linkify PR numbers in git-cliff output ([#23](https://github.com/twangodev/sv11-ui/pull/23)) ([78216e4](https://github.com/twangodev/sv11-ui/commit/78216e414336868d2e64499ee0d0318625cd409d)) - **orb:** Flip color ramp on dark-mode toggle ([#17](https://github.com/twangodev/sv11-ui/pull/17)) ([19d5b1e](https://github.com/twangodev/sv11-ui/commit/19d5b1e254ae381282bbaf78473e1a8efc082c7c)) - Adjust class attribute for GitHub link component to improve styling ([8b9d27e](https://github.com/twangodev/sv11-ui/commit/8b9d27eb0a0ad413b91cb930fa6127e1048e07da)) - Further finetune perlin-noise.png ([b7ec1d5](https://github.com/twangodev/sv11-ui/commit/b7ec1d59ef4308c733372dfc5ed7865789d061c5)) - Tune perlin-noise.png ([fe4745c](https://github.com/twangodev/sv11-ui/commit/fe4745c81d74ea0af8c038462dbe73e1056eda4d)) - Update shimmering-text status in README.md ([7a43f39](https://github.com/twangodev/sv11-ui/commit/7a43f39f3525b1f2fc1a5513b5141489f62ce341)) - Enhance message content styles for user and assistant variants ([949a0b2](https://github.com/twangodev/sv11-ui/commit/949a0b2fcf7a3936f8373251047700e556782c76)) - Update URLs to use the new subdomain for site configuration and documentation ([536ddb2](https://github.com/twangodev/sv11-ui/commit/536ddb21f77ac47dfed57a14d836f2f765eac363)) - Rename animation control variables for clarity and add fly transition to demo ([a5b5024](https://github.com/twangodev/sv11-ui/commit/a5b502483734ec7554a4da28c308a4761a6cc40b)) - **style:** Add missing newline for improved readability in site-footer.svelte ([575c8e7](https://github.com/twangodev/sv11-ui/commit/575c8e73761d0cc194e63db13a2e3de3950b1a63)) - Update message demo and update response features to match reference ([a7a9c8f](https://github.com/twangodev/sv11-ui/commit/a7a9c8fd8db73c3ae6938d2256b905e492e25b10)) - Update footer links for correct attribution and improve text clarity ([1341ef0](https://github.com/twangodev/sv11-ui/commit/1341ef0bd1a01626341844746547a574340d3771)) - Add missing newlines at the end of several markdown and Svelte files ([f1aa252](https://github.com/twangodev/sv11-ui/commit/f1aa252d2c76e14a62008db16270be7dd40e8e18)) - Remote duplicate title and descriptions for components ([b169370](https://github.com/twangodev/sv11-ui/commit/b16937059dca0fbc14fd9458290499af22df733f)) ### Features - **blocks:** Add voice-chat-03 ([#31](https://github.com/twangodev/sv11-ui/pull/31)) ([6b6a81a](https://github.com/twangodev/sv11-ui/commit/6b6a81a847c1861edf9bd294e2eb8ff95bd05a4d)) - **docs:** Render components grid on /docs/components index ([#29](https://github.com/twangodev/sv11-ui/pull/29)) ([194f758](https://github.com/twangodev/sv11-ui/commit/194f7586b07d3128a67d3aadd61fba59b23a0d4c)) - **docs:** Add Copy Page button + LLM-friendly markdown twins ([#28](https://github.com/twangodev/sv11-ui/pull/28)) ([9f788fa](https://github.com/twangodev/sv11-ui/commit/9f788faef8c84eb26fde2fda9ef853e6d7373574)) - **logo:** Redesign mark as sv wordmark ([#27](https://github.com/twangodev/sv11-ui/pull/27)) ([86de789](https://github.com/twangodev/sv11-ui/commit/86de7895f5783777e9cc946a718779d59896c44d)) - **speaker-01:** Port scrollable scratch waveform from elevenlabs ([#18](https://github.com/twangodev/sv11-ui/pull/18)) ([ff3a177](https://github.com/twangodev/sv11-ui/commit/ff3a17712b9dca91df65265000c83c2f6e194eef)) - Auto-generated /changelog page via git-cliff ([#16](https://github.com/twangodev/sv11-ui/pull/16)) ([56e8852](https://github.com/twangodev/sv11-ui/commit/56e88528a1d9df7099bdd25068f8e16d75aad0b8)) - Docs autogen pipeline + site buildout (landing, blocks, command palette) ([#15](https://github.com/twangodev/sv11-ui/pull/15)) ([2822b97](https://github.com/twangodev/sv11-ui/commit/2822b9734f67ff0305089e0776e955dc570f0016)) - Update user message styling with global CSS variables for improved theming ([13f15b1](https://github.com/twangodev/sv11-ui/commit/13f15b17e2da59592d4ba89ba0edde829a4c33ea)) - Add documentation for custom and ElevenLabs adapters, dark mode theming, and update navigation structure ([a0e30c4](https://github.com/twangodev/sv11-ui/commit/a0e30c4f75b6b31bfa64912d6bef56a7eb2b877b)) - Add getting started, setup, troubleshooting, and usage documentation for svagent-ui components ([3283bb4](https://github.com/twangodev/sv11-ui/commit/3283bb4e3d4417f193915f4c50a872c8f8fed867)) - Enhance audio player and visualizer components with additional state management and dynamic properties ([e40b557](https://github.com/twangodev/sv11-ui/commit/e40b5570f943d7d15c672d4028f234e7ea5aa8b4)) - Add audio-related UI components to registry.json ([e166def](https://github.com/twangodev/sv11-ui/commit/e166deffe3ee28493c910ba0461b233e9f3b9f02)) - Add predev and prebuild scripts to package.json ([34e6deb](https://github.com/twangodev/sv11-ui/commit/34e6deb772665cb0ff60e7d5bf433f37b88e1170)) - Add external script for analytics integration ([571921b](https://github.com/twangodev/sv11-ui/commit/571921ba4465a278c368e173b3284d3af11ca805)) - Add Voice Picker component with audio preview and selection functionality ([c0aab06](https://github.com/twangodev/sv11-ui/commit/c0aab0677f0c77028d0c5e066fb4fe67485896a8)) - Enhance Orb component with tone mapping and color space adjustments ([8e14b4c](https://github.com/twangodev/sv11-ui/commit/8e14b4c644fac8bb2d5712ebf920b1b812eb5304)) - Add Orb component with 3D animation and audio reactivity using Three.js ([6919e88](https://github.com/twangodev/sv11-ui/commit/6919e88b1501b7b02a8a2a98d77e448cc68b8c12)) - Add Conversation Bar component with voice and text modes, supporting provider-agnostic integration ([12adb6a](https://github.com/twangodev/sv11-ui/commit/12adb6ae1ebf6fa9aef54021aeaaccca0d1c73e0)) - Add Speech Input component with provider-agnostic transcription adapter and demo ([7b277ce](https://github.com/twangodev/sv11-ui/commit/7b277ce82a0544e0d8f460e9d0b22d7130db2b1c)) - Implement Transcript Viewer component with audio synchronization and word highlighting ([cbcfdc0](https://github.com/twangodev/sv11-ui/commit/cbcfdc09c99bb4a3b9aeb9380b82ed9fdf6467ab)) - Add Bar Visualizer component for audio frequency band visualization with animated state transitions ([a1d9122](https://github.com/twangodev/sv11-ui/commit/a1d9122e7d4d30c62385b58c583319dddd68a5f3)) - Add Matrix component for retro LED display with animations and customizable patterns ([3d65a53](https://github.com/twangodev/sv11-ui/commit/3d65a531e12ed8a30c423fc981c17abd319b7c08)) - Add Mic Selector component for audio device selection with mute toggle and live waveform preview ([44192bf](https://github.com/twangodev/sv11-ui/commit/44192bf2d2f40d36e550ff5513cb5e433eac6362)) - Add Voice Button component with live waveform feedback for voice recording ([4b5968e](https://github.com/twangodev/sv11-ui/commit/4b5968eddc38ad2ca18a306643b9dabd299def5c)) - Add vite-plugin-devtools-json for enhanced development experience ([c61dbce](https://github.com/twangodev/sv11-ui/commit/c61dbcedd76cafbc4fd547a4639d57ac225296da)) - Add Live Waveform component for real-time audio visualization and microphone input ([e0c9e41](https://github.com/twangodev/sv11-ui/commit/e0c9e419c0dbaaf1541575fc71cd8309dc4365cf)) - Add Waveform component with audio visualization and recording features ([38dca04](https://github.com/twangodev/sv11-ui/commit/38dca041d3373aa42d8182f54d438111f72cefd2)) - Update audio player status to 'Done' in README ([5f69d6e](https://github.com/twangodev/sv11-ui/commit/5f69d6ee3feaea97b7bc7a43b2ec58851693660b)) - Add Dependabot configuration for npm and GitHub Actions updates ([ff67bb4](https://github.com/twangodev/sv11-ui/commit/ff67bb44d4dd89b259d1e796d05ca7410923c2f8)) - Add Audio Player component with playback controls and demo ([8d2fbd8](https://github.com/twangodev/sv11-ui/commit/8d2fbd8f6929493bc197ab1f7e35464599926e2a)) - Add Conversation component with context management and demo ([6fea65e](https://github.com/twangodev/sv11-ui/commit/6fea65ea65fe336b89e61a46d55bc519ff5732c0)) - Add Scrub Bar component with context management and demo ([befb5f2](https://github.com/twangodev/sv11-ui/commit/befb5f253fbcf478f98d69f8dbbbb09b7191ff3f)) - Add lint:fix script to package.json for automated code formatting and linting ([a0ad951](https://github.com/twangodev/sv11-ui/commit/a0ad951f23eef6c0f35afe5062a7990c99a80387)) - Add Message and Response components with corresponding documentation and demos ([557f6b3](https://github.com/twangodev/sv11-ui/commit/557f6b3e830cc223b8d07b597e22e1b54caf5593)) - Add GitHub Actions workflow for Svelte project with linting, type checking, build, and deployment steps ([9677189](https://github.com/twangodev/sv11-ui/commit/9677189a593375172e1b96a849a434f0e6eaa416)) - Port shadcn-svelte docs site infrastructure ([51b9cb9](https://github.com/twangodev/sv11-ui/commit/51b9cb9a814d2390788127fcb268a7dc8059efeb)) - Add ShimmeringText component with animation effects ([9b352b8](https://github.com/twangodev/sv11-ui/commit/9b352b8492e222039b944bb7eb6bbdf1e71cf11a)) - Add Message, MessageContent, and MessageAvatar components for chat interface ([104587e](https://github.com/twangodev/sv11-ui/commit/104587ea3525869a47a5bf99bacf0fe9ba57b411)) - Add Avatar component with image and fallback support ([e42aa3a](https://github.com/twangodev/sv11-ui/commit/e42aa3a043f379e2851c9ea1c21c6e2b195da9fa)) - Add Response component with Streamdown integration ([11ddcfb](https://github.com/twangodev/sv11-ui/commit/11ddcfbe96787be56f5ca5e42ec9db3e4880360e)) - Add useIsMobile hook to determine mobile viewport status ([2e88991](https://github.com/twangodev/sv11-ui/commit/2e88991448424b40d5e79dd7394e49ba1ea1a7fe)) - Add useDebounce hook for debouncing values with a specified delay ([4a26386](https://github.com/twangodev/sv11-ui/commit/4a263869a10f451c6870931fc2d7a0a1c1de319e)) --- # llms.txt > Machine-readable documentation for LLMs and AI coding tools. sv11-ui publishes its documentation in formats that large language models and AI coding tools can consume directly, so assistants like Claude, ChatGPT, Cursor, and v0 can answer questions and generate code with accurate, up-to-date context. ## llms.txt The [`/llms.txt`](/llms.txt) file is an index of the entire documentation, following the [llmstxt.org](https://llmstxt.org) convention. It lists every page grouped by section, with links to the clean Markdown version of each. ```text https://sv11.ui.twango.dev/llms.txt ``` ## llms-full.txt The [`/llms-full.txt`](/llms-full.txt) file inlines the full text of every documentation page into a single file — useful for dropping the whole corpus into a model's context window in one shot. ```text https://sv11.ui.twango.dev/llms-full.txt ``` ## Markdown twins Every documentation page has a plain-Markdown twin: append `.md` to any docs URL. ```text https://sv11.ui.twango.dev/docs/components/orb # HTML page https://sv11.ui.twango.dev/docs/components/orb.md # Markdown twin ``` The twins expand the interactive examples into real `svelte` code fences and render the component API as a Markdown table, so a model sees usable source rather than rendered widgets. ## Copy Page Each documentation page has a **Copy Page** button in its header. It copies the page's Markdown to your clipboard, and its dropdown offers **View as Markdown**, **Open in ChatGPT**, and **Open in Claude** — each pre-loaded with the page so you can start asking questions immediately. --- # Adapters > Recipes for wiring common voice and transcription providers into sv11 components. sv11's voice and conversation components accept adapter objects that bridge a specific backend to a provider-agnostic interface. This section will collect recipes for implementing those adapters against common SDKs. The interface definitions themselves live on the [Providers](/docs/providers) page — the recipes here assume you have already read that reference. ## Recipes - [ElevenLabs](/docs/adapters/elevenlabs) — **TODO** - [Custom](/docs/adapters/custom) — **TODO** OpenAI and Deepgram recipes are planned. An adapter is just any object that matches the published interface, so you can wrap any SDK, HTTP endpoint, or WebSocket protocol the same way. --- # Custom > Build a ConversationAdapter against your own backend. > **TODO:** Recipe content pending. This recipe will show how to implement a [`ConversationAdapter`](/docs/providers) against a custom backend — for example, a WebSocket protocol, a streaming HTTP endpoint, or an in-process mock. Planned content: - Minimal WebSocket skeleton mapping connection lifecycle to `onStatusChange` / `onConnect` / `onDisconnect` - Wire format for emitting `ConversationMessage` objects through `onMessage` - Optional `onModeChange` handling for backends that distinguish speaking vs listening - Patterns for `sendMessage`, `sendContextualUpdate`, and `setMuted` Until this page is filled in, see [Providers](/docs/providers) for the interface definitions. --- # ElevenLabs > Wrap the @elevenlabs/client SDK in a ConversationAdapter. > **TODO:** Recipe content pending. This recipe will show how to wrap [`@elevenlabs/client`](https://www.npmjs.com/package/@elevenlabs/client) in a [`ConversationAdapter`](/docs/providers) so that ElevenLabs Agents plug into [ConversationBar](/docs/components/conversation-bar) without modifying any sv11 code. Planned content: - Installing `@elevenlabs/client` - A factory function that maps ElevenLabs session events to the `ConversationConfig` callbacks (`onConnect`, `onDisconnect`, `onMessage`, `onError`, `onStatusChange`, `onModeChange`) - Public vs private agent auth (signed URLs vs bare `agentId`) - Usage with `` Until this page is filled in, see [Providers](/docs/providers) for the interface definitions and [Custom](/docs/adapters/custom) for the general pattern. --- # Components > Browse the available components in sv11-ui. Browse the available components. Each is provider-agnostic and composable — wire them to any backend via the [adapter interfaces](/docs/providers). --- # Audio Player > A composable audio playback component with play/pause, seek, time display, and playback speed controls. ```svelte
{#each exampleTracks as song, index (song.id)} {/each}
``` ## Installation ```bash npx shadcn-svelte@latest add https://sv11.ui.twango.dev/r/audio-player.json ``` ## Usage ```svelte ``` ```svelte
``` ## Examples ### Basic Usage Pass an `AudioPlayerItem` to `AudioPlayer.Button` via the `item` prop. Activating the button loads and plays that track; the root swaps `src` automatically. ```svelte ``` ### Multiple Tracks A single `AudioPlayer.Root` can front many tracks. Each per-track `AudioPlayer.Button` only toggles playback for its own item — the shared `Progress`, `Time`, and `Duration` track whatever is currently active. ```svelte
{#each tracks as track (track.id)}
{track.data.title}
{/each}
/
``` ### Playback Speed Drop in `AudioPlayer.Speed` for a dropdown picker, or `AudioPlayer.SpeedButtonGroup` for an inline segmented control. Both write to the same shared `playbackRate` and persist across track swaps. ```svelte
``` ### Custom Controls `useAudioPlayer()` exposes the underlying state and imperative controls. Use it for bespoke UI — custom transport buttons, jump controls, speed presets — while the root still manages the `