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

wedux-ui

v0.6.1

Published

微信小程序组件库,支持主题切换

Readme

wedux-ui

轻量、可定制的微信小程序原生组件库

npm version license platform

零依赖 · CSS 变量主题 · 深色模式 · 50+ 组件 · 表单驱动


安装

npm install wedux-ui

安装后在微信开发者工具中点击 工具 → 构建 npm,等待构建完成。

注意:本组件库使用 SCSS 编写,微信开发者工具不会自动编译 SCSS,需在 project.config.json 中添加 "useCompilerPlugins": ["sass"]

在项目全局样式文件 app.scss 中引入:

@import './miniprogram_npm/wedux-ui/styles/index.scss';

如需在页面中直接使用图标字体(iconfont 类名),额外引入:

@import './miniprogram_npm/wedux-ui/styles/iconfont.scss';

快速上手

在页面或组件的 .json 中注册:

{
  "usingComponents": {
    "w-button": "wedux-ui/components/button/button"
  }
}

.wxml 中使用:

<w-button type="primary" bind:tap="onTap">提交</w-button>

组件一览

通用Button ButtonGroup FloatButton Icon

布局Flex Layout Divider

数据展示Avatar AvatarGroup Badge Card Ellipsis GradientText H Highlight List ListItem NumberAnimation QrCode Tag Watermark Tree

数据录入Form FormItem Input Textarea InputOtp Select Switch Radio RadioGroup Checkbox CheckboxGroup Rate Stepper DatePicker TimePicker Calendar ColorPicker TreeSelect Upload

导航NavigationBar TabBar BackTop

反馈Drawer Popover Tooltip InfiniteScroll

主题ThemeProvider

主题定制

通过 ThemeProvider 组件覆盖设计变量:

<w-theme-provider theme="{{theme}}">
  <w-button type="primary">自定义主题</w-button>
</w-theme-provider>
const { lightTheme } = require('wedux-ui/components/theme-provider/presets');

Page({
  data: {
    theme: {
      ...lightTheme,
      '--w-primary-color': '#8b5cf6',
    },
  },
});

也可以通过组件级 CSS 变量精确控制单个组件:

page {
  --w-btn-height: 44px;
  --w-btn-radius: 12px;
  --w-input-radius: 8px;
}

开发

pnpm install   # 安装依赖
pnpm format    # 格式化代码
pnpm build     # 构建 npm 产物

使用微信开发者工具打开项目根目录即可预览 Demo。

协议

MIT