A VS Code extension for visually building LVGL UI components and generating C/H code from XML.
- 🎨 Visual Drag-and-Drop Editor - Design LVGL UI by dragging components onto a canvas
- 📦 Built-in LVGL Components - Support for all official LVGL built-in widgets
- ⚙️ Property Editor - Configure component properties through an intuitive interface
- 📐 Layout Support - Flex and Grid layout configuration for containers
- 🔧 Code Generation - Generate C and H files from your XML design
- 🌐 Internationalization - Support for English, Chinese, and Japanese
- 📋 Custom Components - Extensible architecture for custom component support
- Open VS Code
- Go to Extensions (Ctrl+Shift+X)
- Search for "Tlcsdm LVGL Builder"
- Click Install
- Download the latest
.vsixfile from Releases - Open VS Code
- Go to Extensions (Ctrl+Shift+X)
- Click the
...menu and select "Install from VSIX..." - Select the downloaded
.vsixfile
- Create a new file with the
.lvgl.xmlextension - Right-click the file and select "Open with LVGL Builder"
- Drag components from the palette onto the canvas
- Configure component properties in the properties panel
- Click "Generate Code" to create C and H files
- Right-click any XML file in the Explorer
- Select "Open with LVGL Builder"
- Design your UI using the visual editor
- Click the "Generate Code" button in the toolbar
- C and H files will be generated in the same directory as the XML file
- Object (lv_obj)
- Label (lv_label)
- Image (lv_img)
- Line (lv_line)
- Arc (lv_arc)
- Bar (lv_bar)
- Spinner (lv_spinner)
- Table (lv_table)
- Chart (lv_chart)
- Button (lv_btn)
- Button Matrix (lv_btnmatrix)
- Slider (lv_slider)
- Switch (lv_switch)
- Checkbox (lv_checkbox)
- Dropdown (lv_dropdown)
- Roller (lv_roller)
- Textarea (lv_textarea)
- Spinbox (lv_spinbox)
- List (lv_list)
- Tabview (lv_tabview)
- Tileview (lv_tileview)
- Window (lv_win)
- Calendar (lv_calendar)
- Keyboard (lv_keyboard)
- Message Box (lv_msgbox)
The extension uses LVGL XML format for storing UI designs:
<?xml version="1.0" encoding="UTF-8"?>
<lvgl version="1.0">
<obj id="screen_1" name="main_screen" x="0" y="0" width="480" height="320">
<label id="title" name="title_label" x="10" y="10" text="Hello LVGL"/>
<btn id="btn1" name="ok_button" x="10" y="50" width="100" height="40">
<label id="btn_label" name="btn_text" text="OK"/>
</btn>
</obj>
</lvgl>| Setting | Description | Default |
|---|---|---|
tlcsdm.lvglBuilder.defaultLayout |
Default layout mode for containers | flex |
tlcsdm.lvglBuilder.generateComments |
Generate comments in generated code | true |
- Node.js 22.x or later
- npm
# Install dependencies
npm install
# Compile
npm run compile
# Watch for changes
npm run watch
# Run tests
npm run test
# Lint
npm run lint
# Package extension
npx @vscode/vsce packageMIT License - see LICENSE for details.
Contributions are welcome! Please feel free to submit a Pull Request.
- LVGL - Light and Versatile Graphics Library
- fast-xml-parser - Fast XML parser for Node.js