Reactjs 聊天元素聊天 UI、React 聊天组件
npm install react-chat-elements --save// RCE CSS
import 'react-chat-elements/dist/main.css'
// MessageBox component
import { MessageBox } from 'react-chat-elements'import { ChatItem } from 'react-chat-elements'
;<ChatItem
avatar={'https://facebook.github.io/react/img/logo.svg'}
alt={'Reactjs'}
title={'Facebook'}
subtitle={'What are you doing?'}
date={new Date()}
unread={0}
/>| prop | 默认值 | 类型 | 描述 |
|---|---|---|---|
| avatar | none | string | ChatItem 的头像照片 URL |
| avatarFlexible | false | boolean | flexible ChatItem 的头像照片 |
| alt | none | string | 聊天项头像照片的替代文本 |
| title | none | string | 聊天项标题 |
| subtitle | none | string | ChatItem 标题 |
| 日期 | 无 |
暂无开放 Issues,或尚未同步最近议题。