npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@unif/react-native-chat

v4.3.3

Published

Unif React Native 聊天组件:消息、输入、附件和交互展示

Readme

@unif/react-native-chat

基于 @unif/react-native-design 的 TypeScript 聊天 UI 组件库,支持独立组件和完整聊天布局,可供其他 React Native 项目复用。

文档站 · 组件源码 · 运行示例 · 常见问题 · 开发资料

提供什么

| 用途 | 组件 | | -------------- | --------------------------------------------------- | | 聊天布局与消息 | Chat、MessageList、Message | | 输入与附件 | Composer、Attachments、Suggestions | | 交互与反馈 | Confirmation、Process、ProcessingProgress、Feedback | | 来源与引用 | Sources、Citation |

组件负责展示和事件;应用负责会话、草稿、文件上传、Agent 请求和业务处理。Markdown 使用 react-native-marked。

最小用法

在已配置 Design ThemeProvider 的应用中使用受控输入:

import { useState } from 'react';
import { Composer } from '@unif/react-native-chat';

export function ChatInput({ onSend }: { onSend: (text: string) => void }) {
  const [text, setText] = useState('');

  return (
    <Composer
      value={text}
      onChangeText={setText}
      primaryAction={{ kind: 'send', onPress: onSend }}
    />
  );
}

发送事件交付原始文字;发送后是否清空输入由应用决定。键盘避让由页面负责,MessageList 的父容器需要有界高度。

本地开始

从仓库根目录执行,Node 版本见 .nvmrc:

yarn install --immutable --mode=skip-build
yarn web

仓库自带 Yarn;没有全局命令时可用 node .yarn/releases/yarn-4.11.0.cjs 代替 yarn。原生示例及检查入口见 example。

文档