English | 简体中文
@tuya-miniapp/smart-ui
is a lightweight and reliable smart MiniApp component library based on vant-weapp
, providing a complete set of UI components that adhere to the design specifications for smart MiniApp on mobile devices.
Scan the smart mini program QR code below to experience the component library examples.
Before using Smart UI, make sure you have studied the official Smart Mini Program Quick Start and Mini Program Component Introduction.
# Install via yarn (recommended)
yarn add @tuya-miniapp/smart-ui
# Install via npm
npm i @tuya-miniapp/smart-ui
Taking the button component as an example, you only need to import the corresponding custom component in the JSON file.
{
"usingComponents": {
"smart-button": "@tuya-miniapp/smart-ui/dist/button/index"
}
}
Then you can directly use the component in the TYML file.
<smart-button type="primary">Button</smart-button>
# Install project dependencies
yarn
# Compile components
yarn dev
Open Tuya MiniApp Tools, add the smart-ui/example
directory, and you can preview the examples.
@tuya-miniapp/smart-ui
provides stable support starting from the smart MiniApp base library version 2.19.0
.
This project is licensed under the MIT license. Feel free to enjoy and contribute to the open-source community.