Build Multi‑Platform Mini‑Programs Quickly with NutUI 3.0 and Taro

This article introduces NutUI 3.0’s multi‑end capabilities, explains how it integrates with Taro to enable Vue 3 developers to write a single codebase for H5 and various mini‑program platforms, and provides step‑by‑step installation and usage examples.

Aotu Lab
Aotu Lab
Aotu Lab
Build Multi‑Platform Mini‑Programs Quickly with NutUI 3.0 and Taro

Background and Motivation

As the number of deployment channels (APP, H5, and multiple mini‑program platforms) grows, developers face the pain of writing separate code for each platform. NutUI, a JD‑style component library, aims to improve developer experience by adding cross‑platform mini‑program support.

NutUI + Taro Integration

NutUI now collaborates with Taro, allowing developers to use over 30 components to build mini‑programs with a single Vue 3 codebase. Taro officially recommends NutUI for the Vue stack, enabling seamless development for H5 and various mini‑programs.

NutUI 3.0 Architecture Upgrade

Webpack upgraded to Vite, greatly improving development efficiency.

Full adoption of TypeScript.

Native support for Vue 3.

Added mini‑program development capability.

Visual and Documentation Improvements

The website, documentation, and demo have been refreshed to better showcase NutUI’s features. Documentation now includes a tab switcher for quick navigation and supports mini‑program preview demos via QR codes.

Quick Start for Mini‑Program Development

Installation

Install NutUI via npm or Yarn.

Install Taro CLI

# npm install -g @tarojs/cli
# OR yarn global add @tarojs/cli
# OR cnpm install -g @tarojs/cli
# If sass‑related errors occur, install mirror-config-china first:
npm install -g mirror-config-china

Verify Installation

taro -v

Project Initialization

taro init myApp

Select the "Vue3 + NutUI" template during the interactive setup.

On‑Demand Component Usage (Recommended)

import { createApp } from "vue";
import App from "./App.vue";
import { Button, Cell, Icon } from "@nutui/nutui-taro";
import "@nutui/nutui-taro/dist/style.css";

createApp(App).use(Button).use(Cell).use(Icon);

Global Component Usage

import { createApp } from "vue";
import App from "./App.vue";
import NutUI from "@nutui/nutui-taro";
import "@nutui/nutui-taro/dist/style.css";

createApp(App).use(NutUI);

Note: Global usage imports all components, which may increase bundle size.

Future Outlook

NutUI plans to release a React version (NutUI‑React) in Q4, continue enriching Vue components, and publish design specifications (Sketch resources) to help designers and developers maintain consistent UI standards.

Repository Links

GitHub repository: https://github.com/jdf2e/nutui

Official site: https://nutui.jd.com/3x/#/

Issue feedback: https://github.com/jdf2e/nutui/issues

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

MiniPrograminstallationtaroVue3nutuiComponentLibrary
Aotu Lab
Written by

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.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.