BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/sv11-twango/conversation

Conversation

sv11-twango/conversation
FreeComponent

A scroll-anchored conversation container with empty state and scroll-to-bottom button.

Live preview

live · rendered by the registry
Rendered by sv11-twango on their own page — this is the component running, not a screenshot of it.

Install it

npx shadcn@latest add http://sv11.ui.twango.dev/r/conversation.json

Source

registry itemsv11.ui.twango.dev/r/conversation.json
1<script lang="ts">
2 import type { Snippet } from "svelte";
3 import type { HTMLAttributes } from "svelte/elements";
4 import { StickToBottom } from "stick-to-bottom-svelte";
5 import { cn } from "$UTILS$.js";
6 import { setConversationContext } from "./context.js";
7
8 let {
9 class: className,
10 children,
11 initial = "smooth" as ScrollBehavior,
12 resize = "smooth" as ScrollBehavior,
13 ...restProps
14 }: HTMLAttributes<HTMLDivElement> & {
15 /** Conversation body — typically a `Conversation.Content` and optional `Conversation.ScrollButton`. */
16 children?: Snippet;
17 /**
18 * Scroll behavior used on first mount to anchor to the bottom.
19 * @default "smooth"
20 */
21 initial?: ScrollBehavior;
22 /**
23 * Scroll behavior used when content resizes (e.g. new messages streamed in)
24 * while the user is anchored to the bottom.
25 * @default "smooth"
26 */
27 resize?: ScrollBehavior;
28 } = $props();
29
30 let scrollEl: HTMLDivElement | null = $state(null);
31 let contentEl: HTMLElement | null = $state(null);
32
33 const stickToBottom = new StickToBottom({
34 scrollElement: () => scrollEl as HTMLElement,
35 contentElement: () => contentEl as HTMLElement,
36 initial,
37 resize,
38 });
39
40 setConversationContext({
41 setContentElement(el) {
42 contentEl = el;
43 },
44 get isAtBottom() {
45 return stickToBottom.isAtBottom;
46 },
47 scrollToBottom() {
48 void stickToBottom.scrollToBottom({});
49 },
50 });
51</script>
52
53<div
54 bind:this={scrollEl}
55 {...restProps}
56 data-slot="conversation"
57 role="log"
58 aria-live="polite"
59 aria-relevant="additions"
60 class={cn("relative flex-1 overflow-y-auto", className)}
61>
62 {@render children?.()}
63</div>

What it pulls in

npm packages

  • @lucide/svelte
  • stick-to-bottom-svelte

Other registry items

  • button

Facts

Registry
sv11-twango
Type
registry:ui
Access
Free
Files written
0
Licence
MIT
First indexed
2026-08-02
Last confirmed
2 days ago

Go to the source

Docs on sv11-twango sv11.ui.twango.dev twangodev/sv11-ui on GitHub Raw registry item This item as JSON

More from sv11-twango

All 29 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
Audio Playeraudio-playersv11-twangoComponentsFree2 deps
Bar Visualizerbar-visualizersv11-twangoComponentsFreeno deps
Conversation Barconversation-barsv11-twangoComponentsFree1 dep
Live Waveformlive-waveformsv11-twangoComponentsFreeno deps
Matrixmatrixsv11-twangoComponentsFreeno deps
Messagemessagesv11-twangoComponentsFree2 deps
Mic Selectormic-selectorsv11-twangoComponentsFree1 dep
Orborbsv11-twangoComponentsFree4 deps
BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex