BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/prompt-kit/chat-container

Chat Container

prompt-kit/chat-container
FreeComponent

A component for creating chat interfaces with intelligent auto-scrolling behavior, designed to provide a smooth and responsive user experience

Live preview

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

Install it

npx shadcn@latest add https://raw.githubusercontent.com/ibelick/prompt-kit/HEAD/public/c/chat-container.json

Source

chat-container.tsxraw.githubusercontent.com/ibelick/prompt-kit/HEAD/public/c/chat-container.json
1"use client"
2
3import { cn } from "@/lib/utils"
4import { StickToBottom } from "use-stick-to-bottom"
5
6export type ChatContainerRootProps = {
7 children: React.ReactNode
8 className?: string
9} & React.HTMLAttributes<HTMLDivElement>
10
11export type ChatContainerContentProps = {
12 children: React.ReactNode
13 className?: string
14} & React.HTMLAttributes<HTMLDivElement>
15
16export type ChatContainerScrollAnchorProps = {
17 className?: string
18 ref?: React.RefObject<HTMLDivElement>
19} & React.HTMLAttributes<HTMLDivElement>
20
21function ChatContainerRoot({
22 children,
23 className,
24 ...props
25}: ChatContainerRootProps) {
26 return (
27 <StickToBottom
28 className={cn("flex overflow-y-auto", className)}
29 resize="smooth"
30 initial="instant"
31 role="log"
32 {...props}
33 >
34 {children}
35 </StickToBottom>
36 )
37}
38
39function ChatContainerContent({
40 children,
41 className,
42 ...props
43}: ChatContainerContentProps) {
44 return (
45 <StickToBottom.Content
46 className={cn("flex w-full flex-col", className)}
47 {...props}
48 >
49 {children}
50 </StickToBottom.Content>
51 )
52}
53
54function ChatContainerScrollAnchor({
55 className,
56 ...props
57}: ChatContainerScrollAnchorProps) {
58 return (
59 <div
60 className={cn("h-px w-full shrink-0 scroll-mt-4", className)}
61 aria-hidden="true"
62 {...props}
63 />
64 )
65}
66
67export { ChatContainerRoot, ChatContainerContent, ChatContainerScrollAnchor }

What it pulls in

npm packages

  • use-stick-to-bottom

Files it writes

  • components/prompt-kit/chat-container.tsx

Facts

Registry
prompt-kit
Type
registry:ui
Access
Free
Files written
1
Licence
the repository states none
First indexed
2026-08-02
Last confirmed
today

Go to the source

Docs on prompt-kit prompt-kit.com ibelick/prompt-kit on GitHub Raw registry item This item as JSON

More from prompt-kit

All 23 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
Chain Of Thoughtchain-of-thoughtprompt-kitComponentsFree1 dep
Code Blockcode-blockprompt-kitComponentsFree1 dep
Feedback Barfeedback-barprompt-kitComponentsFree1 dep
File Uploadfile-uploadprompt-kitComponentsFreeno deps
Imageimageprompt-kitComponentsFreeno deps
Jsx Previewjsx-previewprompt-kitComponentsFree1 dep
Loaderloaderprompt-kitComponentsFreeno deps
Markdownmarkdownprompt-kitComponentsFree5 deps · 2 files
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