s-m-r-t
Open the s-m-r-t source on GitHub Switch to dark color scheme
← All UI components

Messages · Components

ThreadView

Conversation thread with collapsible messages

Public export

typescript
import { ThreadView } from '@happyvertical/smrt-messages/svelte';
Import path
@happyvertical/smrt-messages/svelte
Props
5
Props described
5 of 5
Bindable state
0
Callback events
2
Verified release
0.44.0

Props

NameTypeRequiredDescription
messagesMessageData[]YesMessages in the thread to display.
activeMessageIdstringNoID of the currently active or expanded message.
initialCollapsedSet<string>NoSet of message IDs to start in collapsed state.
onmessageclick(message: MessageData) => voidNoCalled when user clicks on a message to expand it.
onreply(message: MessageData) => voidNoCalled when user clicks reply on a message.

Bindable state

This component has no bindable public state.

Callback events

  • onmessageclick(message: MessageData) => void
  • onreply(message: MessageData) => void

Examples and explanation