smrt
Open the smrt source on GitHub Switch to dark color scheme
← All UI components

Chat · Components

ChatLayout

Main chat container with sidebar and content area. Discord/Slack-style layout with resizable room list sidebar.

Public export

typescript
import { ChatLayout } from '@happyvertical/smrt-chat/svelte';
Import path
@happyvertical/smrt-chat/svelte
Props
6
Props described
6 of 6
Bindable state
0
Callback events
2
Verified release
0.62.10

Props

NameTypeRequiredDescription
roomsChatRoomData[]YesAvailable chat rooms
currentRoomIdstringNoCurrently selected room ID
currentProfileIdstringYesCurrent user's profile ID
onselectroom(roomId: string) => voidYesCallback when a room is selected
oncreateroom() => voidNoCallback to open the create-room affordance in the room list
childrenSnippetYesMain content slot

Bindable state

This component has no bindable public state.

Callback events

  • onselectroom(roomId: string) => void
  • oncreateroom() => void

Examples and explanation