Message
Message distinguishes user and assistant rows while keeping message content in child components.
Practical React example
Compose a conversation row with its author role, content and optional metadata.
Before you copy and paste
Keep the example in the React rendering environment required by the imported component. Copy components/agents/message.tsx and its returned support files from the Code tab; preserve the project-relative paths.
Listed package dependencies: clsx, lucide-react, motion, react, react-dom, tailwind-merge.
Use the Code tab for the component files and installation instructions, then adapt the imports in this example to your project.
Compose a conversation row with its author role, content and optional metadata
// Usage adapted from beUI's pinned MIT source.
// Copyright (c) 2026 Saurabh Chauhan. See ./LICENSES.md.
"use client";
import { ChatPreview } from "@/components/previews/agents/chat-preview";
export function MessagePreview() {
return (
<ChatPreview
showAvatars
showMetadata
assistantVariant="ghost"
placeholder="Ask a follow-up…"
/>
);
}
Usage example adapted from beUI's pinned MIT source. Retain the source licence notices when copying.
Use a stable message ID as the React key and preserve the role from trusted conversation data. Keep timestamps and actions associated with the correct message.
Customization
- MessageProps.from
- Required; MessageFrom.
- MessageProps.animateIn
- Optional; boolean. Plays a trailing-edge pop-up once when this message row mounts.
- MessageProps.children
- Required; ReactNode.
- MessageGroupProps.spacing
- Optional; "compact" | "default".
- MessageAvatarProps.placeholder
- Optional; boolean. Keep an empty avatar slot so grouped messages remain aligned.
- MessageTypingProps.label
- Optional; string.
- MessageBubbleProps.variant
- Optional; MessageBubbleVariant.
- MessageBubbleProps.align
- Optional; MessageBubbleAlign. Defaults to the surrounding Message alignment when omitted.
- MessageBubbleProps.animateIn
- Optional; boolean. Plays the bubble entrance once when this component mounts.
- MessageBubbleProps.children
- Optional; ReactNode.
- MessageBubbleContentProps.render
- Optional; ReactElement. Replaces the content element while preserving bubble styling.
- MessageBubbleGroupProps.spacing
- Optional; "compact" | "default".
- MessageBubbleCollapsibleProps.open
- Optional; boolean.
- MessageBubbleCollapsibleProps.defaultOpen
- Optional; boolean.
Integration notes
- Do not render untrusted model output as raw HTML without a suitable sanitization policy.
- An entrance animation should not replay every time a streamed message gains another token.
Component source: beUI documentation . These examples describe the version imported into Rendyn. Upstream APIs may have changed; retain the source licence notices when adapting the code.
Give your agent taste.
The best way to use Rendyn is through MCP. Let your agent find the right component, compare previews and bring the source into your project.
All components are free. Sign up only to connect MCP.