Convert Figma logo to code with AI

TalkingData logoiview-weapp

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

6,576
1,168
6,576
337

Top Related Projects

23,961

A high quality UI Toolkit built on Vue.js 2.0

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

15,076

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

:dog: 一套组件化、可复用、易扩展的微信小程序 UI 组件库

Essential UI blocks for building mobile web apps.

16,552

Mobile UI elements for Vue.js

Quick Overview

iview-weapp is a UI component library for WeChat Mini Programs, based on the iView design. It provides a set of high-quality components and demos for developers to quickly build WeChat Mini Program interfaces with a consistent and attractive design.

Pros

  • Comprehensive set of UI components specifically designed for WeChat Mini Programs
  • Consistent design language based on the popular iView framework
  • Well-documented with examples and API references
  • Regular updates and maintenance from the community

Cons

  • Limited customization options compared to building components from scratch
  • Dependency on external library may increase the size of the Mini Program
  • Learning curve for developers not familiar with iView design principles
  • Some advanced features of WeChat Mini Programs may not be fully supported

Code Examples

  1. Using a Button component:
<i-button type="primary" bind:click="handleClick">Click me</i-button>
  1. Implementing a Card component:
<i-card title="Card Title" extra="Extra Content" thumb="https://i.loli.net/2017/08/21/599a521472424.jpg">
    <view slot="content">Card content</view>
    <view slot="footer">Card footer</view>
</i-card>
  1. Creating a Modal dialog:
const { $Modal } = require('../../dist/base/index');

$Modal({
    title: 'Title',
    content: 'Content',
    okText: 'OK',
    cancelText: 'Cancel'
});

Getting Started

  1. Install the iview-weapp package in your WeChat Mini Program project:
npm install iview-weapp --save
  1. In your app.json file, add the following to include the necessary components:
{
  "usingComponents": {
    "i-button": "../../dist/button/index",
    "i-card": "../../dist/card/index",
    "i-modal": "../../dist/modal/index"
  }
}
  1. Use the components in your WXML file:
<i-button type="primary">Hello iView</i-button>
  1. Don't forget to import the base styles in your WXSS file:
@import '../../dist/styles/index.wxss';

Competitor Comparisons

23,961

A high quality UI Toolkit built on Vue.js 2.0

Pros of iview

  • More comprehensive UI component library for Vue.js
  • Better documentation and examples
  • Larger community and more frequent updates

Cons of iview

  • Not specifically designed for WeChat Mini Programs
  • Potentially larger bundle size for mini program applications
  • May require more configuration to work with WeChat Mini Program environment

Code Comparison

iview (Vue.js component):

<template>
  <Button type="primary" @click="handleClick">Click me</Button>
</template>

<script>
export default {
  methods: {
    handleClick() {
      this.$Message.info('Clicked!');
    }
  }
}
</script>

iview-weapp (WeChat Mini Program component):

<i-button type="primary" bind:click="handleClick">Click me</i-button>
Page({
  handleClick() {
    $Message({
      content: 'Clicked!',
      type: 'info'
    });
  }
});

Summary

iview is a more robust and feature-rich UI component library for Vue.js applications, while iview-weapp is specifically tailored for WeChat Mini Programs. iview offers a wider range of components and better documentation, but may require additional setup for use in mini programs. iview-weapp provides a simpler integration for WeChat Mini Program developers but with a more limited set of components.

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

Pros of vant-weapp

  • More comprehensive component library with over 50 components
  • Better documentation and examples, including a playground for testing
  • More active development and frequent updates

Cons of vant-weapp

  • Larger file size due to the extensive component library
  • Steeper learning curve for developers new to the framework
  • Less customizable styling options compared to iview-weapp

Code Comparison

vant-weapp:

<van-button type="primary" bind:click="onClick">Button</van-button>
<van-cell-group>
  <van-field label="Username" placeholder="Please enter username" />
  <van-field label="Password" type="password" placeholder="Please enter password" />
</van-cell-group>

iview-weapp:

<i-button type="primary" bind:click="onClick">Button</i-button>
<i-panel title="Form">
  <i-input title="Username" placeholder="Please enter username" />
  <i-input title="Password" type="password" placeholder="Please enter password" />
</i-panel>

Both libraries offer similar functionality, but vant-weapp provides more detailed components and a slightly different syntax. The vant-weapp code example shows the use of a cell-group for form elements, while iview-weapp uses a panel component. Overall, vant-weapp offers a more extensive set of pre-built components, which can lead to faster development but may result in a larger application size.

15,076

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

Pros of weui-wxss

  • Official UI library developed by Tencent, ensuring better compatibility with WeChat Mini Program
  • Larger community and more frequent updates, providing better long-term support
  • Follows WeChat's design guidelines, offering a more native look and feel

Cons of weui-wxss

  • Limited component variety compared to iview-weapp
  • Less customization options, which may restrict design flexibility
  • Steeper learning curve for developers not familiar with WeChat's design principles

Code Comparison

weui-wxss:

.weui-btn {
  position: relative;
  display: block;
  margin-left: auto;
  margin-right: auto;
  padding-left: 14px;
  padding-right: 14px;
}

iview-weapp:

.i-btn {
  text-align: center;
  vertical-align: middle;
  touch-action: manipulation;
  cursor: pointer;
  background-image: none;
}

Both libraries provide CSS classes for buttons, but weui-wxss focuses on positioning and padding, while iview-weapp emphasizes interaction and appearance. This reflects their different approaches to UI design and implementation.

:dog: 一套组件化、可复用、易扩展的微信小程序 UI 组件库

Pros of wux-weapp

  • More comprehensive component library with over 50 components
  • Better documentation with detailed API references and examples
  • Active development with frequent updates and bug fixes

Cons of wux-weapp

  • Larger file size due to the extensive component library
  • Steeper learning curve for beginners due to more complex API
  • Less focus on UI consistency compared to iview-weapp

Code Comparison

wux-weapp:

<wux-button size="small" type="positive">Button</wux-button>
<wux-input label="Username" />
<wux-calendar />

iview-weapp:

<i-button size="small" type="success">Button</i-button>
<i-input title="Username" />
<i-date-picker />

Both libraries offer similar components, but wux-weapp generally provides more customization options and a wider range of components. iview-weapp focuses on a consistent UI design following the iView design system.

wux-weapp is better suited for projects requiring extensive customization and a wide variety of components, while iview-weapp is ideal for developers who prioritize a cohesive UI design and simpler implementation.

Consider your project requirements, team expertise, and desired UI consistency when choosing between these libraries. Both are viable options for WeChat Mini Program development, with wux-weapp offering more flexibility and iview-weapp providing a more streamlined experience.

Essential UI blocks for building mobile web apps.

Pros of ant-design-mobile

  • Larger community and more frequent updates
  • Comprehensive documentation and examples
  • Supports both React and React Native

Cons of ant-design-mobile

  • Steeper learning curve due to more complex components
  • Larger bundle size, which may impact performance

Code Comparison

iview-weapp:

<i-button type="primary" bind:click="handleClick">Click me</i-button>

ant-design-mobile:

import { Button } from 'antd-mobile';

<Button color='primary' onClick={handleClick}>Click me</Button>

Summary

iview-weapp is a UI component library specifically designed for WeChat Mini Programs, offering a lightweight solution with easy integration. It provides a set of basic components that are tailored for the WeChat ecosystem.

ant-design-mobile, on the other hand, is a more comprehensive mobile UI library that supports both React and React Native. It offers a wider range of components and more customization options, making it suitable for various mobile app development scenarios beyond WeChat Mini Programs.

While iview-weapp is more focused and easier to use for WeChat-specific projects, ant-design-mobile provides greater flexibility and features for broader mobile app development. The choice between the two depends on the specific project requirements, target platform, and development ecosystem.

16,552

Mobile UI elements for Vue.js

Pros of mint-ui

  • More comprehensive component library with a wider range of UI elements
  • Better documentation and examples for each component
  • Larger community and more frequent updates

Cons of mint-ui

  • Focused on mobile web development, less suitable for WeChat mini-programs
  • Heavier bundle size due to more components and features
  • Steeper learning curve for developers new to Vue.js

Code Comparison

mint-ui (Vue.js):

<template>
  <mt-button type="primary" @click="handleClick">Primary Button</mt-button>
</template>

<script>
import { Button } from 'mint-ui'
export default {
  components: { 'mt-button': Button }
}
</script>

iview-weapp (WeChat Mini-Program):

<i-button type="primary" bind:click="handleClick">Primary Button</i-button>
{
  handleClick() {
    // Handle click event
  }
}

mint-ui offers a more Vue.js-centric approach with single-file components, while iview-weapp uses WeChat Mini-Program's template and JavaScript structure. mint-ui requires explicit component imports, whereas iview-weapp components are globally available after initial setup. The syntax for event handling differs slightly between the two, with mint-ui using Vue.js conventions and iview-weapp following WeChat Mini-Program standards.

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

iView Weapp

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

文档

http://inmap.talkingdata.com/wx/index_prod.html

体验

使用微信扫一扫体验小程序组件示例

快速上手

使用之前

在开始使用 iView Weapp 之前,你需要先阅读 微信小程序自定义组件 的相关文档。

如何使用

到 GitHub 下载 iView Weapp 的代码,将 dist 目录拷贝到自己的项目中。然后按照如下的方式使用组件,以 Button 为例,其它组件在对应的文档页查看:

  1. 添加需要的组件。在页面的 json 中配置(路径根据自己项目位置配置):
"usingComponents": {
    "i-button": "../../dist/button/index"
}
  1. 在 wxml 中使用组件:
<i-button type="primary" bind:click="handleClick">这是一个按钮</i-button>

预览所有组件

我们内置了所有组件的示例,您可以扫描右侧的小程序码体验,或按以下方式在微信开发者工具中查看:

# 从 GitHub 下载后,安装依赖
npm install

# 编译组件
npm run dev

然后,将 examples 目录在微信开发者工具中打开即可。

License

MIT

Copyright (c) 2018-present, TalkingData