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

@huibo-ui/react-antd

v1.1.0

Published

antd 兼容层 — 接收 antd 原生 props,内部转换为 huibo-ui,实现丝滑平替

Readme

@huibo-ui/react-antd

antd 兼容层 —— 接收 antd 原生 props,内部转换为 huibo-ui,实现零改写平替迁移。

你的业务代码(保持 antd 写法不变)
        ↓  import { Button, Form, message, ... } from '@huibo-ui/react-antd'
兼容层(接收原生 antd props,内部转换 + 转发)
        ↓
@huibo-ui/react(React 包装)
        ↓
hb-* 自定义元素(Stencil Web Components)

快速开始(3 步)

1. 改 import 来源(推荐 codemod 一键完成):

node tools/migrate-from-antd.mjs src/ --compat

只做一件事:from 'antd' → from '@huibo-ui/react-antd'(含 antd/es/* 深路径类型)。不改 prop、不改标签、不改事件签名。

2. 应用入口注册自定义元素 + 注入令牌 + 对齐 antd 观感(必做,否则白屏或系统性变色):

// main.tsx
import 'huibo-ui/styles.css'; // --hb-* 设计令牌
import { applyAntdDefaultTheme } from '@huibo-ui/react-antd';
applyAntdDefaultTheme(); // antd v5 默认观感;有项目定制主题用 applyAntdTokens(token) 覆盖
import 'huibo-ui/components/hb-button'; // 按需注册用到的 hb-*(或全量 import 'huibo-ui')

3. 跑 tsc + 对照支持矩阵 review:详见迁移指南 · 方案 B。

已支持的实例 / 静态 / 子 API

  • Form.useForm / Form.useWatch / 顶层 useWatch(实时联动)
  • Modal.useModal / Modal.confirm/info/warning/success/error
  • message.success/error/warning/info
  • Input.{TextArea,Search,Password} / Select.{Option,OptGroup} / DatePicker.RangePicker
  • Radio.{Group,Button} / Checkbox.Group / Descriptions.Item / Space.Compact / Upload.Dragger / Skeleton.{Input,Button} / Layout.{Header,Sider,Content}
  • 样式桥:applyAntdTokens / applyAntdDefaultTheme / ANTD_V5_DEFAULT_TOKENS
  • 类型:ColumnsType / TableProps / TableRowSelection / Rule / RuleObject / TreeDataNode ...

测试

pnpm test:compat   # 兼容层回归(jest + jsdom)