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

@shuimo-design/react

v1.0.0-beta.3

Published

水墨风 React 组件库(next)—— 程序化宣纸、山水、墨晕与笔触

Downloads

0

Readme

@shuimo-design/react

水墨风 React 组件库。宣纸、远山、毛边、笔触、印章都是运行时生成的 SVG,包里没有位图和字体。

文档:https://shuimo-ui-next.vercel.app/react/(Vue 版:/vue/

当前 1.0.0-beta.x,API 可能变,见 CHANGELOG

安装

pnpm add @shuimo-design/react

React 18 / 19,纯 ESM。

用法

// main.tsx
import "@shuimo-design/react/style.css";
import { createInkEngine } from "@shuimo-design/react/ink"; // ink 从壳包引;core 不是直接依赖,pnpm 下解析不到
import { createRoot } from "react-dom/client";
import App from "./App";

createInkEngine(); // 不调则只有骨架样式,没有毛边和笔触
createRoot(document.getElementById("root")!).render(<App />);
import { useState } from "react";
import { MButton, MDialog } from "@shuimo-design/react";

export default function App() {
  const [open, setOpen] = useState(false);
  return (
    <>
      <MButton type="primary" onClick={() => setOpen(true)}>
        落笔
      </MButton>
      <MDialog open={open} onOpenChange={setOpen} title="山水">
        墨分五色。
      </MDialog>
    </>
  );
}

组件名与 Vue 版一致;v-model:x 对应 x / onXChange / defaultX,受控非受控都支持;具名插槽对应 render prop。MMessage.success() 等函数式 API 渲染在组件树里,树中需要一个 <MOverlayOutlet><MConfigProvider> 内含一个。

SSR(Next.js)支持;弹层类组件不进服务端 HTML。

样式按需

style.css 整份 22 KB gzip。按组件引时去掉它,改为:

import "@shuimo-design/react/style/MButton";
import "@shuimo-design/react/style/MDialog";

style/<Name> 是副作用入口,import base(层顺序、变量、reset、图标、墨迹动画)+ 该组件内部渲染的组件 + 自己的 css,重复由打包器按模块去重。散件在 @shuimo-design/react/css/<name>.css

自动补样式用 vite-plugin-imp

// vite.config.ts
import vitePluginImp from "vite-plugin-imp";

export default defineConfig({
  plugins: [
    react(),
    vitePluginImp({
      libList: [
        {
          libName: "@shuimo-design/react",
          camel2DashComponentName: false,
          replaceOldImport: false, // 组件仍从包入口引,插件只加样式 import
          style: (name) => `@shuimo-design/react/style/${name}`,
        },
      ],
    }),
  ],
});

babel-plugin-import 在 Vite 下无效:它匹配 createElement() 调用,而 Vite 的 JSX 转换在 babel 之后。

许可

MIT