Installation
Install the MessageText component using the shadcn CLI:Usage
Props
string
required
The message text content to render. Supports markdown formatting.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
A text rendering component for message content with markdown support and proper whitespace handling.
pnpm dlx shadcn@latest add https://registry.intface.io/message-text.json
npx shadcn@latest add https://registry.intface.io/message-text.json
yarn shadcn@latest add https://registry.intface.io/message-text.json
bunx --bun shadcn@latest add https://registry.intface.io/message-text.json
import MessageText from "@/components/chat/message-text";
export default function ChatMessage() {
const messageContent = `
Hello! This is a **markdown** message with:
- List items
- Code: \`console.log("hello")\`
- [Links](https://example.com)
Multiple paragraphs are preserved.
`;
return (
<div className="message">
<MessageText className="text-sm">
{messageContent}
</MessageText>
</div>
);
}
