Convert Figma logo to code with AI

wechat-miniprogram logoweui-miniprogram

小程序WeUI组件库

2,216
549
2,216
67

Top Related Projects

27,134

A UI library by WeChat official design team, includes the most useful widgets/modules in mobile web applications.

轻量、可靠的小程序 UI 组件库

一套高质量的微信小程序 UI 组件库

4,517

一款基于 Taro 框架开发的多端 UI 组件库

Essential UI blocks for building mobile web apps.

💰 A mobile UI toolkit, based on Vue.js 2, designed for financial scenarios.

Quick Overview

WeUI for Mini Program is an official WeChat design team UI library for WeChat Mini Programs. It provides a set of basic components and styles that adhere to WeChat's design guidelines, allowing developers to create consistent and visually appealing mini programs quickly.

Pros

  • Officially supported by WeChat, ensuring compatibility and adherence to platform guidelines
  • Comprehensive set of UI components tailored for WeChat Mini Programs
  • Regular updates and maintenance, keeping up with WeChat platform changes
  • Easy to integrate and use within WeChat Mini Program projects

Cons

  • Limited to WeChat Mini Program ecosystem, not suitable for other platforms
  • Customization options may be restricted to maintain consistency with WeChat's design language
  • Learning curve for developers not familiar with WeChat Mini Program development
  • Dependency on WeChat's platform and potential limitations imposed by it

Code Examples

  1. Using a WeUI button component:
<button class="weui-btn weui-btn_primary">Primary Button</button>
  1. Implementing a WeUI cell group:
<view class="weui-cells">
  <view class="weui-cell">
    <view class="weui-cell__bd">Cell 1</view>
    <view class="weui-cell__ft">Details</view>
  </view>
  <view class="weui-cell">
    <view class="weui-cell__bd">Cell 2</view>
    <view class="weui-cell__ft">Details</view>
  </view>
</view>
  1. Creating a WeUI form:
<form>
  <view class="weui-cells__title">Personal Information</view>
  <view class="weui-cells weui-cells_form">
    <view class="weui-cell">
      <view class="weui-cell__hd">
        <label class="weui-label">Name</label>
      </view>
      <view class="weui-cell__bd">
        <input class="weui-input" placeholder="Enter your name"/>
      </view>
    </view>
  </view>
</form>

Getting Started

  1. Install WeUI for Mini Program in your project:

    npm install weui-miniprogram
    
  2. Import the WeUI styles in your app.wxss file:

    @import 'weui-miniprogram/weui-wxss/dist/style/weui.wxss';
    
  3. Use WeUI components in your WXML files as shown in the code examples above.

  4. For more advanced components, refer to the official documentation and examples provided in the GitHub repository.

Competitor Comparisons

27,134

A UI library by WeChat official design team, includes the most useful widgets/modules in mobile web applications.

Pros of weui

  • More comprehensive UI component library, covering a wider range of elements and layouts
  • Suitable for both web and WeChat Mini Program development
  • Longer development history and larger community support

Cons of weui

  • Requires more setup and configuration for use in WeChat Mini Programs
  • May include unnecessary components for developers focused solely on Mini Programs
  • Potentially larger file size due to broader scope

Code Comparison

weui-miniprogram:

<mp-cells title="带说明的列表项">
  <mp-cell value="标题文字" footer="说明文字"></mp-cell>
</mp-cells>

weui:

<div class="weui-cells__title">带说明的列表项</div>
<div class="weui-cells">
  <div class="weui-cell">
    <div class="weui-cell__bd">标题文字</div>
    <div class="weui-cell__ft">说明文字</div>
  </div>
</div>

The weui-miniprogram example uses custom components specific to Mini Programs, while the weui example uses standard HTML with CSS classes. The weui-miniprogram version is more concise but less flexible, while the weui version offers more control over the structure but requires more markup.

轻量、可靠的小程序 UI 组件库

Pros of vant-weapp

  • More comprehensive component library with over 50 components
  • Better documentation and examples
  • More frequent updates and active community support

Cons of vant-weapp

  • Larger file size due to more components
  • Steeper learning curve for beginners
  • May require more customization to match specific design requirements

Code Comparison

weui-miniprogram:

<mp-cells title="带说明的列表项">
  <mp-cell value="标题文字" footer="说明文字"></mp-cell>
</mp-cells>

vant-weapp:

<van-cell-group title="带说明的列表项">
  <van-cell title="标题文字" value="说明文字" />
</van-cell-group>

Both libraries offer similar functionality, but vant-weapp provides more customization options and a wider range of components. weui-miniprogram follows the official WeChat design guidelines more closely, which may be preferable for some projects.

vant-weapp is generally more suitable for complex applications with diverse UI requirements, while weui-miniprogram is ideal for simpler projects that prioritize adherence to WeChat's design language.

Ultimately, the choice between these libraries depends on the specific needs of your project, such as design requirements, performance considerations, and development team preferences.

一套高质量的微信小程序 UI 组件库

Pros of iview-weapp

  • Offers a more extensive set of UI components, providing developers with a wider range of pre-built elements
  • Provides a more customizable theming system, allowing for easier brand integration and visual consistency
  • Includes more advanced components like charts and data visualization tools

Cons of iview-weapp

  • Less official support and updates compared to weui-miniprogram, which is maintained by the WeChat team
  • May have a steeper learning curve due to its more complex component structure and API
  • Potentially larger bundle size, which could impact app performance on lower-end devices

Code Comparison

weui-miniprogram:

<mp-cells title="带说明的列表项">
  <mp-cell value="标题文字" footer="说明文字"></mp-cell>
</mp-cells>

iview-weapp:

<i-cell-group>
  <i-cell title="单行列表" label="附加描述" value="详细信息"></i-cell>
</i-cell-group>

Both examples show how to create a basic list item with a title and additional information. The syntax is similar, but iview-weapp offers more granular control over the content structure within the cell.

4,517

一款基于 Taro 框架开发的多端 UI 组件库

Pros of taro-ui

  • Cross-platform compatibility: Supports multiple platforms including WeChat Mini Program, H5, React Native
  • Rich component library: Offers a wide range of UI components for various use cases
  • Active community and frequent updates: Regular releases and improvements

Cons of taro-ui

  • Steeper learning curve: Requires knowledge of React and Taro framework
  • Larger bundle size: May result in slightly larger app sizes due to cross-platform support

Code Comparison

weui-miniprogram:

<mp-cells title="带说明的列表项">
  <mp-cell value="标题文字" footer="说明文字"></mp-cell>
</mp-cells>

taro-ui:

import { AtList, AtListItem } from 'taro-ui'

<AtList>
  <AtListItem title='标题文字' note='说明文字' />
</AtList>

Summary

weui-miniprogram is specifically designed for WeChat Mini Programs, offering a lightweight and easy-to-use UI library. It closely follows WeChat's design guidelines and is ideal for developers focusing solely on the WeChat platform.

taro-ui, on the other hand, provides a more versatile solution for developers looking to create cross-platform applications. It offers a richer set of components and the flexibility to deploy on multiple platforms, but comes with a steeper learning curve and potentially larger app sizes.

The choice between the two depends on the project requirements, target platforms, and developer expertise.

Essential UI blocks for building mobile web apps.

Pros of ant-design-mobile

  • More comprehensive component library with a wider range of UI elements
  • Better support for React Native, enabling cross-platform development
  • More frequent updates and active community contributions

Cons of ant-design-mobile

  • Larger bundle size, which may impact performance on slower devices
  • Steeper learning curve due to more complex API and customization options
  • Less optimized for WeChat Mini Program environment

Code Comparison

weui-miniprogram:

<mp-cells title="带说明的列表项">
  <mp-cell value="标题文字" footer="说明文字"></mp-cell>
</mp-cells>

ant-design-mobile:

import { List } from 'antd-mobile';

<List header='带说明的列表项'>
  <List.Item extra='说明文字'>标题文字</List.Item>
</List>

The code comparison shows that weui-miniprogram uses custom elements specific to WeChat Mini Program, while ant-design-mobile uses more standard React components. This reflects the different focus and target platforms of each library.

💰 A mobile UI toolkit, based on Vue.js 2, designed for financial scenarios.

Pros of mand-mobile

  • More comprehensive component library with over 30 UI components
  • Supports both Vue.js and React frameworks
  • Better documentation and examples for developers

Cons of mand-mobile

  • Larger bundle size due to more components and features
  • Steeper learning curve for developers new to the library
  • Less specific to WeChat Mini Program environment

Code Comparison

mand-mobile (Vue.js):

<template>
  <md-button type="primary" @click="handleClick">Click me</md-button>
</template>

<script>
import { Button } from 'mand-mobile'
export default {
  components: { 'md-button': Button },
  methods: {
    handleClick() {
      console.log('Button clicked')
    }
  }
}
</script>

weui-miniprogram:

<button class="weui-btn weui-btn_primary" bindtap="handleClick">Click me</button>

<script>
Page({
  handleClick() {
    console.log('Button clicked')
  }
})
</script>

The code comparison shows that mand-mobile uses Vue.js component syntax, while weui-miniprogram uses WeChat Mini Program's native syntax. mand-mobile offers more flexibility in terms of framework choice, but weui-miniprogram is more tailored to the WeChat Mini Program environment.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

WeUI组件库简介

这是一套基于样式库weui-wxss开发的小程序扩展组件库,同微信原生视觉体验一致的扩展组件库,由微信官方设计团队和小程序团队为微信小程序量身设计,令用户的使用感知更加统一。

如何使用

详细使用参考文档

开发

  1. 初始化
npm run init
  1. 执行命令:
npm run dev
  1. 构建组件库:
npm run build

适配 DarkMode

在根结点(或组件的外层结点)增加属性 data-weui-theme="dark",即把 WeUI 组件切换到 DarkMode 的表现,如:

<view data-weui-theme="dark">
    ...
</view>

NPM DownloadsLast 30 Days