Skip to content
agentskit.js

ChatContainer

Headless scrollable transcript container. Auto-scroll on new messages, virtualized-ready.

Top-level wrapper for a chat transcript. DOM bindings render data-ak-chat-container; host behavior and scroll policy are framework-specific. No hardcoded styles β€” theme via data attributes and CSS variables.

#React DOM props

PropTypeDefault
childrenReactNodeβ€”
classNamestringβ€”

The React component observes transcript mutations and scrolls to the bottom; it currently has no autoScroll prop or near-bottom opt-out policy. Other bindings do not promise identical scroll behavior.

#Per-framework

FrameworkImport
Reactimport { ChatContainer } from '@agentskit/react'
Vueimport { ChatContainer } from '@agentskit/vue'
Svelteimport { ChatContainer } from '@agentskit/svelte'
Solidimport { ChatContainer } from '@agentskit/solid'
React Nativeimport { ChatContainer } from '@agentskit/react-native' β€” ScrollView-backed
Angular<ak-chat-container> β€” from AgentskitUiModule
Inkimport { ChatContainer } from '@agentskit/ink' β€” Ink <Box>

#Example

import { ChatContainer, Message, InputBar, useChat } from '@agentskit/react'

export function App() {
  const chat = useChat({ adapter: openai(...) })
  return (
    <ChatContainer>
      {chat.messages.map((m) => <Message key={m.id} message={m} />)}
      <InputBar chat={chat} />
    </ChatContainer>
  )
}

Explore nearby

Ask the docs
Ask anything about AgentsKit. Answers come from the docs corpus and cite their sources.