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

Chat · Components

MessageList

Scrollable chat message feed

Public export

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

Props

NameTypeRequiredDescription
messagesChatMessageData[]YesMessages to display
currentProfileIdstringYesCurrent user's profile ID to determine own messages
onloadmore() => voidNoLoad more messages (infinite scroll)
onreply(id: string) => voidNoReply to a message
onreact(id: string, emoji: string) => voidNoReact to a message

Bindable state

This component has no bindable public state.

Callback events

  • onloadmore() => void
  • onreply(id: string) => void
  • onreact(id: string, emoji: string) => void

Examples and explanation