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

Chat · Components

ChatTabs

Facebook-style expandable chat tabs

Public export

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

Props

NameTypeRequiredDescription
tabsChatTabState[]YesActive chat tabs
messagesByRoomRecord<string, ChatMessageData[]>NoMessages keyed by roomId
currentProfileIdstringNoCurrent user's profile ID
onexpand(roomId: string) => voidYesExpand a tab
oncollapse(roomId: string) => voidYesCollapse a tab
onclose(roomId: string) => voidYesClose a tab
onsend(roomId: string, content: string) => voidNoSend a message in a tab

Bindable state

This component has no bindable public state.

Callback events

  • onexpand(roomId: string) => void
  • oncollapse(roomId: string) => void
  • onclose(roomId: string) => void
  • onsend(roomId: string, content: string) => void

Examples and explanation