Componentmedia1.41 KB gzipZero dependencies
Dm Thread
Direct message thread: header with presence, bubbles, input.
Preview
Live Preview
Installation
Tokens guide →Add to your project via CLI (zero dependencies, code you own):
npx bigbullui add dm-threadOr install the full npm package:
npm install bigbulluiUsage
tsx3 lines
import { DmThread } from "@/components/ui/dm-thread"; <DmThread />Source code
dm-thread.tsx + 1 helperZero third-party dependencies (2 local files shown in tabs below).
tsxdm-thread.tsx144 lines
"use client"; import * as React from "react";import { cn } from "./lib/utils"; export interface DmThreadMessage { id: string; body: string; mine?: boolean; time: string;} export interface DmThreadProps extends React.HTMLAttributes<HTMLDivElement> { name?: string; initials?: string; online?: boolean; messages?: DmThreadMessage[]; onSend?: (body: string) => void;Props
Interactive Prop Playground
Tweak parsed AST props below to generate ready-to-paste JSX.
tsx3 lines
import { DmThread } from "@/components/ui/dm-thread"; <DmThread />| Prop | Type | Description |
|---|---|---|
| name | string | Form field name submitted during form serialization. (Default: "") |
| initials | string | Configures initials. (Default: "") |
| online | boolean | Toggles online. (Default: false) |
| messages | DmThreadMessage[] | Configures messages. (Default: []) |
| onSend | (body: string) => void | Callback invoked on send. |
| onInfoClick | () => void | Callback invoked on info click. |