Getting Started with WeUI‑WXSS for WeChat Mini Programs
WeUI‑WXSS is the official WeChat design team's UI library that brings native‑look components like button, cell, dialog, and toast to mini programs, offering a unified visual experience and simple integration via provided WXSS files.
Overview
WeUI‑WXSS is an official UI component library created by the WeChat design team for WeChat Mini Programs. It extends the WeUI web style definitions to match the native visual experience of the Mini Program platform.
Provided Components
The library ships with a set of basic UI elements, each implemented as a WXSS style file and a corresponding WXML markup template:
button cell dialog progress toast article actionsheet iconVisual Specification
All visual guidelines are maintained in the weui-design repository, ensuring that component styles follow the official WeChat design specifications.
Previewing the Library
Open the dist directory with the WeChat Web Developer Tools. The directory contains example pages that demonstrate each component in a running Mini Program environment.
Usage
Component markup and example WXML files are located under dist/example/. Review these files to see the required structure for each component.
To apply the full style set globally, import the main stylesheet in app.wxss (or any top‑level WXSS file): @import "./dist/style/weui.wxss"; For a smaller bundle, import only the needed widget styles. Each widget has its own WXSS file under dist/style/widget/. Example for the button component:
@import "./dist/style/widget/button.wxss";License
The project is released under the MIT License (http://opensource.org/licenses/MIT), permitting free use, modification, and distribution.
Contribution
Contributors can file issues or submit pull requests to the repository to fix bugs, add components, or improve compliance with the design guidelines.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Aotu Lab
Aotu Lab, founded in October 2015, is a front-end engineering team serving multi-platform products. The articles in this public account are intended to share and discuss technology, reflecting only the personal views of Aotu Lab members and not the official stance of JD.com Technology.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
