Introducing Taro UI: A Multi‑Platform UI Component Library for Taro

Taro UI is a multi‑end UI component library built by the Aotu Lab, offering easy installation, rich components, and seamless adaptation across WeChat mini‑programs, H5, and ReactNative, with detailed quick‑start instructions and code examples for developers.

JD Tech
JD Tech
JD Tech
Introducing Taro UI: A Multi‑Platform UI Component Library for Taro

Taro UI is a UI component library created by Aotu Lab for the Taro multi‑end development framework, aiming to provide a high‑quality, easy‑to‑use set of components that run on WeChat mini‑programs, H5, and ReactNative.

Features

Simple to use : supports npm installation and automatic dependency handling.

Framework support : built on Taro and integrates seamlessly.

Multi‑platform adaptation : a single component works on mini‑programs, H5, and ReactNative.

Beautiful style : designed by the AT‑UI designer for modern flat aesthetics.

Rich component set : covers most common scenarios.

On‑demand import : import only the components you need to keep bundle size minimal.

Multiple themes : several built‑in theme colors (available from version 1.1).

Quick Start

Install Taro CLI

$ npm install -g @tarojs/cli
$ yarn global add @tarojs/cli

Initialize a project

$ taro init myApp

Install Taro UI

$ cd myApp
$ npm i taro-ui

Use the components

Import the component in your code and follow the documentation.

import { AtButton } from 'taro-ui'

Example

Add the following code to /myApp/src/pages/index/index.jsx:

import Taro, { Component, Config } from '@tarojs/taro'
import { View } from '@tarojs/components'
import { AtButton } from 'taro-ui'
import './index.scss'

export default class Index extends Component {
  config: Config = {
    navigationBarTitleText: '首页'
  }
  render () {
    return (
      <View className='index'>
        <AtButton type='primary'>按钮文案</AtButton>
      </View>
    )
  }
}

Compile and preview

Run the appropriate npm script or npx command for the target platform.

# WeChat mini‑program preview
$ npm run dev:weapp
# or
$ taro build --type weapp --watch
# H5 preview
$ npm run dev:h5
# or
$ taro build --type h5 --watch

Feedback

Issues and suggestions can be submitted on the GitHub repository.

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.

frontendDocumentationmulti-platformUI componentsTaronpm
JD Tech
Written by

JD Tech

Official JD technology sharing platform. All the cutting‑edge JD tech, innovative insights, and open‑source solutions you’re looking for, all in one place.

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.