A versatile customer service component for Taro applications that works across H5, WeChat Mini Program, and web pages.
npm install starfish-ai-chat
- 📱 Support for H5, WeChat Mini Program, and web pages
- 💬 Multiple contact methods (phone, WeChat, online chat)
- 🎨 Customizable theme
- 🔧 Easy to integrate
- 📦 Lightweight and performant
import { StarfishChat } from 'starfish-ai-chat';
const App = () => {
return (
<StarfishChat
phoneNumber="400-123-4567"
wechatAccount="your_wechat_account"
onlineChatUrl="https://chat.example.com"
themeColor="#1890ff"
title="客服服务"
onContactSelect={(method) => {
console.log('Selected contact method:', method);
}}
/>
);
};
Prop | Type | Description |
---|---|---|
phoneNumber | string | Customer service phone number |
wechatAccount | string | WeChat official account |
onlineChatUrl | string | Online chat URL |
themeColor | string | Custom theme color (default: '#1890ff') |
title | string | Custom title (default: '客服服务') |
onContactSelect | (method: 'phone' | 'wechat' | 'online') => void | Callback when contact method is selected |
- Clone the repository
- Install dependencies:
npm install
- Start development:
npm run dev
- Build:
npm run build:component
MIT