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

@agentar/agentic-design-mobile

v1.0.1

Published

面向Agent的移动端组件库

Readme

@agentar/agentic-design-mobile

面向 Agent 场景的 H5 移动端组件库,基于 React 与 antd-mobile,提供对话、输入、语音、思考链等能力。


✨ 核心特性

  • 🎯 对话与消息:气泡消息(Bubble)、欢迎页(Welcome)、快捷建议(Suggestion)、提示词(Prompts),支持 Markdown 与加载态
  • ⌨️ 增强输入:单行/多行输入(Input、TextArea),支持语音切换、附件、功能入口与搜索发送
  • 🤖 Agent 表达:思考中(Think)、思考链(ThoughtChain)、加载动画(Loading),贴合 Agent 对话场景
  • 🎨 主题与样式:基于 antd-style 的 CSS-in-JS,内置 px2rem 移动端适配,支持自定义 token
  • 🌓 一键主题切换:亮/暗主题一键切换,支持持久化与自定义主题扩展
  • 📱 移动端优先:px2rem 适配多端,触屏友好;与 antd-mobile 深度结合
  • 🔧 TypeScript:完整类型定义,组件 Props 与主题类型可追溯
  • 🎤 语音能力:语音输入(AudioInput)、语音转文字(SpeechToText)、录音波形与光圈动效(SoundWave)
  • 🧩 可组合:操作栏(Actions)、长按弹窗(PopupAction)、回到顶部(BackTo)等可独立或组合使用

📦 安装

npm install @agentar/agentic-design-mobile antd-mobile react react-dom

依赖reactreact-domantd-mobile@^5


🚀 使用

使用 ThemeProvider 包裹应用后即可自定义主题:

import { ThemeProvider, Bubble, TextArea, Welcome } from '@agentar/agentic-design-mobile';
import 'antd-mobile/es/global';

function App() {
  return (
    <ThemeProvider defaultTheme="light" persistKey="my-app">
      <Welcome header={{ title: 'AI 助手' }} content={{ suggestion: { items: [], onClick: () => {} } }} />
      <Bubble role="user" content="你好" />
      <Bubble role="assistant" content="你好,有什么可以帮你?" />
      <TextArea placeholder="输入消息" search onSearch={(v) => console.log(v)} />
    </ThemeProvider>
  );
}

MCP 服务

在 Cursor、Claude Code 等支持 Model Context Protocol 的客户端中,可通过 npm 包 @agentar/agentic-design-mobile-mcp 拉取本组件库的本地 Markdown 说明与示例(get_component_listget_component_docsget_component_examples),便于 AI 按组件名查询用法与 API。

在 Cursor 中配置

在项目或用户级 MCP 配置中加入(command 使用 npx 时无需事先全局安装):

{
  "mcpServers": {
    "agentic-design-mobile-mcp": {
      "command": "npx",
      "args": ["@agentar/agentic-design-mobile-mcp"]
    }
  }
}

保存后重启或重新加载 MCP;其他客户端若支持 stdio MCP,可将 command / args 按同样方式指向该包的可执行入口。更多说明见 npm 包主页


License

ISC