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

@hsu-react/ui

v2.8.6

Published

一套基于 React + Ant Design 的中后台业务组件库

Readme

@hsu-react/ui

npm version license

一套基于 React + Ant Design 的中后台业务组件库,把「列表 + 搜索 + 表单弹窗 + CRUD」这类重复劳动沉淀为页面级组件,并内置 Markdown / CodeMirror / Spreadsheet / Chart / Editor 等内容组件。

📖 文档与在线示例:https://vitatsui.github.io/hsu-ui-v2

安装

pnpm add @hsu-react/ui
# peerDependencies
pnpm add react react-dom antd@^6 @ant-design/icons@^6 mobx mobx-react-lite

两条版本线并行,包名同为 @hsu-react/ui,但分仓维护:

| 版本线 | 依赖 | 仓库 | | --- | --- | --- | | 2.x(本仓库) | antd v6 | VitaTsui/hsu-ui-v2 | | 1.x | antd v5 | VitaTsui/hsu-ui,npm i @hsu-react/ui@1 |

浏览器支持

Chrome / Edge ≥ 111、Safari ≥ 16.4、Firefox ≥ 121(现代浏览器,不支持 IE),与 antd v6 的口径一致。更老的浏览器不会白屏,但焦点环、选中底色等依赖 color-mix() / :has() 的样式会失效,详见文档。

使用

import { ConfigProvider, Button } from "@hsu-react/ui";
import { get, post, del, put } from "@/services/Axios";

export default function App() {
  return (
    <ConfigProvider permissions={userPermissions} request={{ get, post, del, put }}>
      <Button type="primary">Hello Hsu UI</Button>
    </ConfigProvider>
  );
}
  • ConfigProvider.permissions — 当前用户权限码,驱动所有 hasPermi 的显隐校验。
  • ConfigProvider.request — 注入 HTTP 请求实现(库本身不绑定 HTTP 客户端)。

可选引入全局 antd 观感覆盖(产物为 scss,宿主项目需具备 scss 编译能力):

import "@hsu-react/ui/es/styles/antd-overload.scss";

开发

pnpm install  # 安装依赖
pnpm dev      # 启动 dumi 文档站
pnpm build    # father 构建 es/ + lib/ + 类型
pnpm docs:build  # 构建文档站静态产物

组件一览

通用 Button Icon Copy Operate · 布局 Panel FlexFill TabBar · 数据录入 Input Select Checkbox Switch Slider DatePicker Form FormItem Upload CodeMirror Editor SecondConf Search · 数据展示 Table Tags Descriptions Tree TextEllipsis FileCol FilePreview Chart Markdown Spreadsheet ChainGraph · 反馈 Modal · AI Chat

详见文档站。

贡献

日常开发在 develop 分支进行(feature 分支合入 develop),main 只接受来自 develop 的 PR;合入 main 后按 package.json 版本自动打 tag 并发布 npm(dist-tag 为 latest)。PR 标题遵循 Conventional Commits。

旧大版本走 <major>.x 维护分支,bugfix 直接合进去,push 后同样自动发布,但 dist-tag 是 legacy-<major> 而不是 latest —— 否则一次维护版发布会把所有人的 npm i 拽回旧大版本。(tag 名不能取 v2、2 这类,npm 会拒收任何能解析成 semver 范围的 dist-tag。)安装旧线用 npm i @hsu-react/ui@1 即可,走的是 semver,与 dist-tag 无关。

1.x(antd v5)线不在本仓库,在 VitaTsui/hsu-ui。两个仓库发同一个 npm 包,latest 只由本仓库产出。

License

MIT © VitaHsu