component
Message List
The scrolling transcript, wallpaper included.
Install
npx shadcn@latest add https://whatsapp-components.crafter.run/r/message-list.jsonWrites 5 files into your project, and installs clsx and tailwind-merge.
Preview
Scrolls on its own, wallpaper included.
Pass pattern= for a flat wallpaper.
Horizontal padding is a percentage, so the transcript keeps WhatsApp’s margins at any width.
demos/message-list.tsx
import { MessageBubble } from "@/registry/whatsapp/message-bubble";
import { MessageList } from "@/registry/whatsapp/message-list";
export default function Demo() {
return (
<MessageList className="h-[260px] rounded-lg">
<MessageBubble direction="in">
Scrolls on its own, wallpaper included.
</MessageBubble>
<MessageBubble direction="out">
Pass pattern={false} for a flat wallpaper.
</MessageBubble>
<MessageBubble direction="in">
Horizontal padding is a percentage, so the transcript keeps
WhatsApp’s margins at any width.
</MessageBubble>
</MessageList>
);
}Props
Read from MessageListProps in the component source at build time.
| Prop | Type | Default |
|---|---|---|
childrenrequired | ReactNode | — |
className | string | — |
patternHide the doodles behind the transcript. | boolean | true |
Files
- registry/whatsapp/message-list.tsx
- registry/whatsapp/chat-background.tsx
- registry/whatsapp/cn.ts
- registry/whatsapp/whatsapp.css
- LICENSE