starfish-ai-chat
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

Taro Customer Service Component

A versatile customer service component for Taro applications that works across H5, WeChat Mini Program, and web pages.

Installation

npm install starfish-ai-chat

Features

  • 📱 Support for H5, WeChat Mini Program, and web pages
  • 💬 Multiple contact methods (phone, WeChat, online chat)
  • 🎨 Customizable theme
  • 🔧 Easy to integrate
  • 📦 Lightweight and performant

Usage

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);
      }}
    />
  );
};

Props

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

Development

  1. Clone the repository
  2. Install dependencies: npm install
  3. Start development: npm run dev
  4. Build: npm run build:component

License

MIT

Package Sidebar

Install

npm i starfish-ai-chat

Weekly Downloads

5

Version

1.0.1

License

MIT

Unpacked Size

30.9 kB

Total Files

21

Last publish

Collaborators

  • zxc0woool