ai-response-formatter-tailwind
v1.0.5
Published
Format the AI response you receive and display it beautifully to the user.
Readme
AI Response Formatter with Tailwind CSS
A React component library for formatting and displaying AI chat responses with Tailwind CSS styling.
Installation
npm i ai-response-formatter-tailwindUsage
import AiResponseFormatter from 'ai-response-formatter-tailwind';
function App() {
const aiResponse = `
# Welcome to AI Response Formatter!
This is a **simple** and *effective* way to format AI responses with Tailwind classes.
## Features:
- Converts **Markdown** to HTML
- Supports *bold* and *italic* styling and headings
`;
const formattedResponse = AiResponseFormatter(aiResponse);
return (
<div className="app-container">
<div dangerouslySetInnerHTML={{ __html: formattedResponse }} />
</div>
);
}
export default App;Requirements
- React 16.8+
- Tailwind CSS 3.0+
License
MIT
