āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā ā š shadcn/directory/elevenlabs/ui/components/response ā āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā
<ComponentPreview name="response-demo" description="A live scrolling response visualization with smooth animations." marginOff />
npx @elevenlabs/cli@latest components add response
</TabsContent>
<TabsContent value="manual">
<Steps>
<Step>Install the following dependencies:</Step>
npm install streamdown
<Step>Copy and paste the following code into your project.</Step>
<ComponentSource name="response" title="components/ui/response.tsx" /><Step>Update the import paths to match your project setup.</Step>
</Steps> </TabsContent> </CodeTabs>import { Response } from "@/components/ui/response"
<Response>This is a simple text response.</Response>
The Response component supports full markdown rendering:
<Response>
{`# Heading
This is a paragraph with **bold** and *italic* text.
- List item 1
- List item 2
- List item 3
\`\`\`javascript
const greeting = "Hello, world!"
console.log(greeting)
\`\`\`
`}
</Response>
Perfect for streaming AI responses character-by-character:
const [response, setResponse] = useState("")
// As tokens arrive, append to response
const handleStream = (token: string) => {
setResponse((prev) => prev + token)
}
return <Response>{response}</Response>
import { Message, MessageAvatar, MessageContent } from "@/components/ui/message"
import { Response } from "@/components/ui/response"
export default ({ streamingResponse }) => (
<Message from="assistant">
<MessageAvatar src="/ai-avatar.jpg" name="AI" />
<MessageContent>
<Response>{streamingResponse}</Response>
</MessageContent>
</Message>
)
A memoized wrapper around Streamdown that renders streaming markdown with smooth animations.
Extends all props from the Streamdown component.
| Prop | Type | Description |
| --------- | ------------ | ------------------------------ |
| children | ReactNode | Content to render (markdown) |
| className | string | Optional CSS classes |
| ...props | Streamdown | All Streamdown component props |
streamdown for smooth markdown streaming animationsā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā