explaingit

tencent/weui-wxss

Analysis updated 2026-06-24

15,279LessAudience · developerComplexity · 2/5LicenseSetup · easy

TLDR

Official WeChat-styled UI component stylesheet for WeChat Mini Programs, written in wxss. Provides buttons, cells, dialogs, toasts, and icons in WeChat native look.

Mindmap

mindmap
  root((weui-wxss))
    Inputs
      wxss import
      data-weui-theme attribute
    Outputs
      Styled buttons
      Cells and lists
      Dialogs and toasts
      Icons
    Use Cases
      Build a WeChat Mini Program UI
      Match WeChat native styling
      Add dark mode to a mini program
    Tech Stack
      WXSS
      Less
      WeChat Mini Program
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Style a new WeChat Mini Program to match WeChat native UI

USE CASE 2

Add a dark mode theme to an existing mini program via data-weui-theme

USE CASE 3

Use the rpx sizing variant to keep layouts responsive across phone sizes

USE CASE 4

Pull individual components like dialog or toast into a custom mini program

What is it built with?

WXSSLessWeChat

How do you get it running?

Difficulty · easy Time to first run · 30min

Only works inside the WeChat Mini Program runtime, not the general web.

MIT license, free to use commercially with attribution.

In plain English

WeUI for wxss is a UI component library created by WeChat's official design team, specifically for building WeChat Mini Programs. WeChat Mini Programs are lightweight apps that run inside the WeChat chat app without needing to be downloaded separately, and wxss is their CSS-like styling language. This library provides ready-made visual components that match WeChat's native look and feel, so developers building mini programs can quickly create interfaces that feel consistent with the WeChat platform. The component library includes commonly used interface elements: buttons, cells (rows used in list layouts), dialogs (popup messages), progress indicators, toast notifications (brief status messages), article layouts, action sheets (bottom-up menus), and icons. The README is written in Chinese and notes the library is a pure UI/style library -- if you want a version with logic and behavior encapsulated, WeChat also offers a separate component library. To use it, you import the provided wxss stylesheet file directly into your mini program. Dark mode is supported by adding a data-weui-theme="dark" attribute to the root element. The library provides two sizing variants: a default version using px units and an rpx version (WeChat's responsive pixel unit). It is released under the MIT license.

Copy-paste prompts

Prompt 1
Show me how to import weui-wxss into a fresh WeChat Mini Program and use the button styles
Prompt 2
Give me a wxml snippet that renders a weui cell list with icons and a switch on the right
Prompt 3
Explain how to enable dark mode in weui-wxss and which CSS variables I can override
Prompt 4
Compare weui-wxss with the logic-bundled WeUI component library and tell me when to pick each

Frequently asked questions

What is weui-wxss?

Official WeChat-styled UI component stylesheet for WeChat Mini Programs, written in wxss. Provides buttons, cells, dialogs, toasts, and icons in WeChat native look.

What language is weui-wxss written in?

Mainly Less. The stack also includes WXSS, Less, WeChat.

What license does weui-wxss use?

MIT license, free to use commercially with attribution.

How hard is weui-wxss to set up?

Setup difficulty is rated easy, with roughly 30min to a first successful run.

Who is weui-wxss for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Scan in gitsafehub Deploy in gitdeployhub tencent on gitmyhub

Verify against the repo before relying on details.