loopey
Version:
A React UI component library for chat widgets.
63 lines (45 loc) • 1.15 kB
Markdown
```tsx
import { Button, ChatWidget, AdvancedChatWidget } from "loopey";
function App() {
return (
<div>
<Button>Click me</Button>
{/* Simple Chat Widget */}
<ChatWidget onSendMessage={(msg) => console.log(msg)} />
{/* Advanced Chat Widget with Markdown support */}
<AdvancedChatWidget
title="Chat Support"
companyName="Your Company"
greeting="Hello! How can I help you today?"
onSendMessage={(msg) => console.log(msg)}
primaryColor="#2563eb"
/>
</div>
);
}
```
The CSS is automatically included when you import the components - no additional CSS imports needed!React UI component library for chat widgets.
```bash
npm install my-chat-widget
```
```tsx
import { Button } from "my-chat-widget";
import "my-chat-widget/dist/style.css";
function App() {
return <Button>Click me</Button>;
}
```
- Components are in `src/components/`
- Build with:
```bash
npm run build
```
1. Build the library: `npm run build`
2. Publish to npm: `npm publish --access public`
MIT