Components

Team Chat Channel

Team Chat Channel component.

Client Only

Installation

pnpm dlx @docyrus/cli add @docyrus/ui-team-chat-channel
UI Primitives(10 components)
npx shadcn@latest add avatar button dropdown-menu input popover scroll-area scroller separator skeleton tooltip

Usage

import {
  TeamChatChannel
} from "@docyrus/ui/components/team-chat-channel";
import type {
  ChatUser,
  ChatPost,
  PostAttachment,
  PostReaction,
  LinkPreview,
  LinkedEntity,
  EntitySearchResult,
  DataSourceOption,
  CreatePostPayload,
  TeamChatChannelProps,
  PresetEmoji
} from "@docyrus/ui/components/team-chat-channel";

<TeamChatChannel />

API Reference

PropTypeDefault
classNamestring—

Components

ComponentDescription
TeamChatChannelPublic export
EntityMentionInputInternal — entity-mention-input.tsx
PostActionsInternal — post-actions.tsx
PostAttachmentsInternal — post-attachments.tsx
PostCardInternal — post-card.tsx
PostComposerInternal — post-composer.tsx
PostContentInternal — post-content.tsx
PostEmptyStateInternal — post-empty-state.tsx
PostEntityLinkInternal — post-entity-link.tsx
PostLinkPreviewInternal — post-link-preview.tsx
PostReactionsInternal — post-reactions.tsx
PostThreadInternal — post-thread.tsx
TeamChatProviderInternal — team-chat-context.tsx

Type Exports

TypeDescription
ChatUser—
ChatPost—
PostAttachment—
PostReaction—
LinkPreview—
LinkedEntity—
EntitySearchResult—
DataSourceOption—
CreatePostPayload—
TeamChatChannelProps—
PresetEmoji—

Type Reference

ChatUser

FieldTypeDescription
idstring—
firstnamestring | null—
lastnamestring | null—

ChatPost

FieldTypeDescription
idstring—
contentstring—
attachmentsArray<PostAttachment> | null—
reactionsArray<PostReaction>—
hashtagsArray<string>—

PostAttachment

FieldTypeDescription
idstring—

PostReaction

FieldTypeDescription
emojistring—
countnumber—

LinkPreview

FieldTypeDescription
urlstring—
titlestring—
descriptionstring—

LinkedEntity

FieldTypeDescription
idstring—
iconstring—

EntitySearchResult

FieldTypeDescription
iconstring—

DataSourceOption

FieldTypeDescription
idstring—
namestring—
iconstring—

CreatePostPayload

FieldTypeDescription
contentstring—
attachmentsArray<File>—
hashtagsArray<string>—

TeamChatChannelProps

FieldTypeDescription
postsArray<ChatPost>—
currentUserChatUser—
usersArray<ChatUser>—
channelNamestring—
isLoadingboolean—
isCreatePendingboolean—
isDeletePendingboolean—
onCreatePost(payload: CreatePostPayload) => void | Promise<void>—
onUpdatePost(postId: string, content: string, options?: { removedAttachmentIds?: Array<string>; newFiles?: Array<File> }) => void | Promise<void>—
onDeletePost(postId: string) => void | Promise<void>—
onToggleReaction(postId: string, emoji: string) => void | Promise<void>—
onUploadFile(file: File) => Promise<PostAttachment>—
onFetchLinkPreview(url: string) => Promise<LinkPreview | null>—
dataSourcesArray<DataSourceOption>—
onSearchEntity(dataSourceId: string, query: string) => Promise<Array<EntitySearchResult>>—
onLoadReplies(postId: string) => Promise<Array<ChatPost>>—
maxHeightnumber | string—
classNamestring—

PresetEmoji

"\ud83d\udc4d" | "\u2764\ufe0f" | "\ud83d\ude02" | "\ud83d\ude2e" | "\ud83c\udf89" | "\ud83d\udd25" | "\ud83d\udc40" | "\ud83d\udca1"

On this page