Componentmedia1.41 KB gzipZero dependencies

Dm Thread

Direct message thread: header with presence, bubbles, input.

Preview

Live Preview
Open ↗

Installation

Tokens guide →

Add to your project via CLI (zero dependencies, code you own):

npx bigbullui add dm-thread

Or install the full npm package:

npm install bigbullui

Usage

tsx3 lines
import { DmThread } from "@/components/ui/dm-thread"; <DmThread />

Source code

dm-thread.tsx + 1 helper

Zero 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 />
PropTypeDescription
namestringForm field name submitted during form serialization. (Default: "")
initialsstringConfigures initials. (Default: "")
onlinebooleanToggles online. (Default: false)
messagesDmThreadMessage[]Configures messages. (Default: [])
onSend(body: string) => voidCallback invoked on send.
onInfoClick() => voidCallback invoked on info click.