Skip to main content

Desktop app UI implementationAI reads Lanhu designs and builds resizable windows

AI reads Lanhu layout JSON and needed images, then writes the regions into your Electron, Tauri or native window code — panes, minimum sizes, scrolling and shortcuts — and refines it against a real window.

Electron · Tauri · Native desktop UI

Workflow preview

Lanhu design
MCP / Skill reads
AI writes the code
  1. 1
    Point to the design and window
  2. 2
    AI reads design and window code
  3. 3
    Write the UI by window rules
  4. 4
    Resize it, then revise
Works with MCP or Skill

How does a Lanhu design fit an existing desktop project?

Desktop UI work usually involves dividing window regions, implementing resizing, then connecting menus, shortcuts and data. AI uses MCP or Skill to retrieve Lanhu layout JSON and images, reads the Electron, Tauri or native project, and implements the interface with its panels and command system. Available window and test tools support comparison and revision.

Step 1

Your design and window entry point
A Lanhu design link, desktop project and framework, target systems, window requirements, and existing components and theme.

Step 2

MCP / Skill reads the design
Original layout JSON and design material that can be saved locally, plus supported assets downloaded when needed.

Step 3

AI implements in your project
AI implements UI, window interfaces and keyboard behavior in the project. Native permissions, installers and signing continue through the project’s workflow.

What AI does in your desktop app

AI uses the design’s regions and dimensions to write a multi-pane layout with your panels, commands and window interfaces. The wide layout is a starting point; minimum sizes, collapse behavior and independent scrolling also belong in the code.

Recreate window behavior, not a canvas

Desktop UI usually splits sidebars and content, then adds resizing, scrolling and keyboard rules. AI translates the regions into those behaviors.

Reuse the window system

AI reads the window entry point, panels and theme first, keeping your Electron, Tauri or native structure.

Keyboard and focus are first-class

Panes, minimum widths, dialogs and shortcuts follow the existing command system.

Drag the real window, then fix

Resize, switch display scaling, feed in long content — and revise against the design.

Give sidebars, lists and workspaces their own resize rules

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

Give sidebars, lists and workspaces their own resize rules
Design cueAI follows project conventionsRun and compare
Sidebar, list and detail panesSet minimum widths, collapse behavior and independent scrollingReduce the window gradually and check that the main task remains usable
Tables and dense toolbarsKeep essential columns and primary actions, with scrolling or menus for the restTry long data and inspect headers, horizontal scrolling and action positions
Icon buttons, menus and shortcutsReuse commands and give controls clear names and focus behaviorComplete common actions with Tab, Enter and Escape
Dialogs over ongoing workDefine initial focus, dismissal and the return pointClose the dialog and check focus and unfinished content

Have AI build within your desktop project

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

    Point to the design and window

    Lanhu link, project directory, and whether it is a window or a panel.

  2. 2

    AI reads design and window code

    Retrieves layout JSON and images, then inspects theme, panels and native interfaces.

  3. 3

    Write the UI by window rules

    Reuse controls for resizing, scrolling, dialogs and keyboard behavior.

  4. 4

    Resize it, then revise

    Check the minimum window, display scaling and focus restoration.

Before calling it complete: Window sizing and flexible regions · System scaling and title bars · Shortcuts, dialogs and focus

A three-pane workspace: show details when space allows

For navigation, list and detail panes, AI finds existing panels and layout code, implements the wide design, then connects detail collapse, independent scrolling and selection state. Resizing should let the user continue the current task.

Workspace layout studyWindow resize → content reflow
NavigationStable orientationKeyboard access
Primary workspace
Long content can scroll
Visible focus state
Flexible region
DetailsMinimum widthCollapse when appropriate
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 Navigation, project list and detail pane Status information along the bottom

AI implements in your project

In the desktop project Reuse existing panels and theme Confirm when details collapse and how to reopen them Scroll the list independently and preserve selection while resizing

Give this task to AI
Take responsibility for recreating this Lanhu design in the current desktop project. Read layout JSON and needed images through MCP or Skill. Inspect window entry points, panels, the theme, shared components and native interfaces, then preserve the existing UI stack and code style. Implement layout, assets, minimum window size, sidebar resizing, scrolling and dialog focus. If tools are available, run the app, compare with the design, check system scaling, resizing and keyboard operation, and fix differences. List platforms you could not verify.

Have AI refine the layout in a real window

With desktop runtime tools, have AI open the app, resize it, compare it with the design and revise pane layout and interaction code. Include keyboard and display scaling checks, and do not mark an untested system as verified.

Resize while keeping the current work

Start at the minimum window size and grow it, watching navigation, lists, the main workspace and details. Try long content and a wide table to identify scrolling regions. Select a record, resize again, and check that selection and reading position remain.

Put the mouse aside and complete the main actions

Use the keyboard to open, edit, confirm and cancel. Review initial focus, Tab order and shortcuts. After a dialog closes, focus should return to the right place. A collapsed pane needs an obvious way to reopen.

Change display scaling, then reopen the window

Change system scaling on a target platform and compare text, title bars, icons and information density. For detached inspectors or document windows, test closing, reopening and state restoration.

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 Desktop apps implementation

Will AI touch windows and system interfaces?

Existing windows, IPC and native interfaces come first. When a change is genuinely needed, confirm the scope, then let AI work within the project’s boundaries. MCP or Skill only retrieves design material — no system permissions or signing; cross-platform runs and packaging need the right environments.

Is the canvas width the minimum window size?

No. Determine the minimum from the main task, real content and system scaling — copying canvas dimensions only makes the window crowd early.

Can I use it for the web interface in Electron or Tauri?

Yes, Lanhu material can inform that frontend work. AI also needs the project’s window, menu and native-interface conventions; the design tool does not supply them.

Is the design canvas the minimum window size?

No. Confirm the minimum against the main task, real content and system scaling rather than copying the canvas dimensions.

Do I need to rebuild the theme and shortcuts?

Reuse them where possible. Have AI inspect shared styles, command registration and focus rules before adding the screen. Change a component only where the design calls for it.

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.