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

papyrai-ui

v1.0.1

Published

Paper-style Web Components for AI applications

Readme

papyrai-ui

文档版本

Paper-style Web Components for AI applications

首页

是什么

一个类纸风格的 Web Components 组件库,专为 AI 应用场景设计。

灵感来源:既然有免费 AI,能不能做个完全免费、通用、原始的 AI UI?

目前就是写着玩的阶段,Bug 多,勿喷。(且没太多时间和精力)


预览

AI组件

SVG图标

快速开始

npm install papyrai-ui
npm run dev

项目

papyrai-ui (papyrus + ai + ui) 是一个类纸风格的 Web Components 组件库,专为 AI 应用场景设计。

特性

  • 18 个 AI 专属组件 - 思考指示器、流式文本、消息气泡、提示输入、工具调用、推理过程、反馈、引用、源卡片、令牌使用、安全过滤、幻觉提示、未找到、假装错误、置信度、差异对比、成本显示、模型徽章
  • SVG 图标系统 - 8 种 logo 模板 + 50 个手绘风格图标
  • 69 个基础组件 - 覆盖 Elements、Inputs、Navigation、Overlays、Layout、Data 六大类
  • 类纸视觉风格 - 纸张纹理、阴影效果、手写字体
  • 完整主题支持 - 亮色/暗色主题,CSS 变量驱动
  • 框架无关 - 基于 Web Components,兼容 React/Vue/Angular/原生 HTML

技术栈

| 技术 | 说明 | |------|------| | Lit | Web Components 基础类 (~6KB) | | Rollup | 打包工具 | | VitePress | 文档站点 |

组件命名

| 类型 | 前缀 | 示例 | |------|------|------| | AI 组件 | ai- | <ai-thinking>, <ai-stream> | | SVG 组件 | svg- | <svg-logo>, <svg-icon> | | 基础组件 | p- | <p-button>, <p-modal> |


使用

// 引入全部组件
import 'papyrai-ui';

// 或按需引入
import 'papyrai-ui/components/ai-thinking';
<!-- AI 组件 -->
<ai-thinking></ai-thinking>
<ai-stream></ai-stream>
<ai-message role="assistant">你好!</ai-message>
<ai-prompt placeholder="请输入提示词..."></ai-prompt>

<!-- 基础组件 -->
<p-button variant="primary">点击我</p-button>
<p-card>
  <div slot="header">标题</div>
  内容区域
</p-card>
<p-input label="用户名" placeholder="请输入"></p-input>

主题切换

// 切换到暗色主题
document.documentElement.setAttribute('data-theme', 'dark');

// 切换到亮色主题(默认)
document.documentElement.removeAttribute('data-theme');

版本

当前版本:1.0.0


License

MIT

npm run build

npm pack

npm login

npm publish