Skip to main content

Mini program UI implementationAI reads Lanhu designs and writes pages inside the host

AI reads Lanhu layout JSON and needed images, separates host chrome — title bar, reserved controls, tabBar — from page content, and implements the page in your mini program’s conventions.

WeChat Mini Programs · WXML / WXSS · uni-app · Taro

Workflow preview

Lanhu design
MCP / Skill reads
AI writes the code
  1. 1
    Name the host and route
  2. 2
    AI reads design and settings
  3. 3
    Implement inside the boundary
  4. 4
    Verify in the host
Works with MCP or Skill

How can AI use Lanhu designs to build a mini program page?

Mini program UI work usually starts with routes and navigation, followed by templates, styles, events and subpackage assets. AI uses MCP or Skill to read Lanhu layout JSON and images, inspects page and component code, then implements the interface using your native mini program, uni-app or Taro conventions. Review and adjustment happen in the target host.

Step 1

Your design and host details
Target host, framework and base-library versions, Lanhu design link, page settings and asset directory.

Step 2

MCP / Skill reads the design
Original layout JSON returned by Lanhu, plus supported images when downloads are enabled. Available content depends on account permissions and the source interface.

Step 3

AI implements in your project
Page code, sizing choices and asset references are implemented in the project. Subpackages, resource domains, platform permissions and release use its configuration.

What AI does in your mini program

AI reads page settings to identify who supplies the title bar, reserved controls and tabBar, then writes templates and styles. Units, package references and lifecycle events follow the project rather than treating the design as one unrestricted web page.

Decide who draws what first

Mini program work usually starts with boundaries: title bar, capsule area and tabBar are the host’s; templates and events are yours. AI writes only the page.

Write in the project’s framework

After reading nearby pages and subpackage settings, AI follows your native WXML / WXSS, uni-app or Taro conventions.

Sizing is a choice

Regions that flex with the screen and details that need fixed sizes get rpx or fixed units per layout.

Finish inside the real host

Long copy, cancelled permissions, image loading and back paths get checked before revising.

Separate host-provided regions from the page you write

On a narrow screen, scroll the table horizontally to compare all columns.

Separate host-provided regions from the page you write
Design cueAI follows project conventionsRun and compare
Top title, back action and reserved controlsConfirm native or custom navigation and allow space required by the hostCheck title, back behavior and touch positions in the target mini program
Card widths, text and iconsSeparate width-dependent sizes from details that need their own sizingTry small screens and long copy to check wrapping and image proportions
Event illustrations and shared iconsAssign assets using the main-package and subpackage configurationEnter the subpackage directly and check image loading and local paths
Forms, permissions and return stateReuse supported host controls and existing page lifecycle handlingCancel permissions and re-enter the page to check form and list state

Let AI handle pages, styles and host adaptation

From a Lanhu link to a running interface: AI reads the design through MCP or Skill, writes code in your project, then runs and compares.

  1. 1

    Name the host and route

    Lanhu link, project directory, framework and target host.

  2. 2

    AI reads design and settings

    Retrieves layout JSON and images, then inspects page config, subpackages and shared components.

  3. 3

    Implement inside the boundary

    Structure, styles and events in the existing conventions.

  4. 4

    Verify in the host

    Preview the capsule area, image loading and back behavior.

Before calling it complete: System navigation and menu space · rpx, long content and image sizing · Permissions, validation and back navigation

An event signup page: put images in the right package

For an event signup page, AI retrieves the cover, artwork and form layout, checks subpackages and shared icons, then writes the template, styles and submit event. Image paths and business code belong in the correct project directories.

Host interfaceSystem navigation / reserved controls
Entry pagePage
Reusable structureComponent
Resource ownershipMain / subpackage
System and page regions have different responsibilities. A design is not a single unrestricted web page.
An example of the layout in a project. AI uses the Lanhu design data and existing project to choose components and arrange them.

Information in the Lanhu design

In the Lanhu design Shared navigation icons and an event cover Detail illustrations and a signup form

AI implements in your project

In the mini program project Reuse the current location for shared icons Reference event images using package and loading rules Connect validation and confirm whether form content survives a return

Give this task to AI
Take responsibility for recreating this Lanhu design in the current mini program project. Read layout JSON and needed images through MCP or Skill. Inspect the framework, page settings, subpackages, shared components and styles, then follow the existing code to implement the page, events and data states. Separate system navigation and the menu area from page content, choose rpx or fixed dimensions appropriately, and keep asset conventions. If tools are available, run a preview, compare with the design and fix differences. List permissions, image loading and back behavior still requiring device checks.

Have AI check the page in its target host

With development tools, have AI build a preview, compare it with Lanhu and revise templates, styles and events. Verify entry points, asset loading and permission flows; keep a list of device or release checks not yet run.

Open it through both shared and normal entry points

Check titles, reserved controls, subpackage paths and back relationships. Do not depend on data prepared only by the previous screen. Return from a detail page and inspect whether selection and scroll position survive.

Check that images load after they leave your machine

Place downloaded assets in project directories or an asset service, and check main-package, subpackage and shared-image references. Build a preview and enter the subpackage directly to inspect paths, loading and package size. Configure domains for online images as the host requires.

Try real content, permissions and failure states

Use long copy, empty lists and more data to inspect sizing choices and component defaults. Cancel a permission, trigger a failed request, resubmit, and check input, touch and back behavior on a device.

Connect to Lanhu with MCP or Skill

Choose the entry your AI tool supports. Configure your platform API Key locally and sign in to Lanhu. Give AI the design link and project directory, then ask it to read the design, inspect your code conventions and implement the UI. MCP and Skill provide the same design-reading capabilities.

AI needs access to your project to edit code and a working runtime to verify the result. MCP / Skill supplies design data, not a built-in engine converter. Enable image downloads locally when needed and follow your AI tool’s data settings.

Questions about Mini programs implementation

Can AI handle both the page and the adaptation?

With project access, yes. AI reads the design and writes pages, components, styles and events, following the existing host-area and sizing settings. MCP or Skill is not a mini program converter — preview, permissions and device checks need the right tools, and platform review is outside design retrieval.

Can every px become rpx?

Not mechanically. Content width, type, borders and icons serve different purposes. Choose units with platform components and project rules, then verify on target screens.

Can I use it with native mini programs, uni-app and Taro?

Each can use Lanhu material as a development reference. AI writes code for the current framework and host, so specify the platform, version and page path.

Can every px value in the design become rpx?

No. Content width, type, borders and icons serve different purposes. Choose units with platform components and project rules, then review the result on target screens.

Do downloaded images enter a subpackage automatically?

No. The tool retrieves images. Package placement, references and online domains need configuration and testing in the project.

Experience Lanhu MCP Now

Create an account, get your API Key and choose MCP or the standalone Skill.

Your Lanhu login credentials stay on your device.