Overview

Updated at:

antd-mini is an open source UI component library built on mini program custom component specifications. It extends the basic component library with ready-to-use components, so you can build mini program interfaces faster and with less repetitive work.

antd-mini supplements the basic component library with open source UI components built on the mini program custom component specifications. Use these components to reduce repetitive UI work and ship mini program features faster.

Installation

Run the following command to install antd-mini as a project dependency:

$ npm i antd-mini -S

This downloads the component library files into your project's node_modules directory.

Usage

To use a component, register it in the page's JSON file, then call it in the axml file.

Step 1: Register the component

In the page's JSON file, add the component to the usingComponents field. The key is the tag name you will use in axml, and the value is the path to the component inside antd-mini. For example, to register the Tag component:

{
    "usingComponents": {
        "tag": "antd-mini/es/Tag/index"
    }
}

Step 2: Call the component in axml

Use the registered tag name to render the component in the page's axml file:

<tag></tag>