Need help with LCUI?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

Global Rank
Topics of expertise
China, ShenZhen
3.3K Stars 298 Forks MIT License 3.4K Commits 8 Opened issues


A small C library for building user interfaces with C, XML and CSS.

Services available


Need anything else?

Contributors list


A small C library for building user interfaces with C, XML and CSS.

License Github Release Github All Releases Repo size Code size

Table of contents


LCUI (LC's UI Library) is a small C library for building user interfaces.



  • Written in C: Suitable for small applications written primarily in C.language designed for LCUI, it makes it easier to create interactive UIs.
  • Cross platform: Support for Windows and Linux, you can write Windows Desktop apps and Universal Windows Platform apps, as well as Linux Desktop apps.
  • XML + CSS: Includes XML and CSS parsers, you can use XML and CSS to describe interface structure and style.
  • Web-like development experience: Since the design and implementation of LCUI's functions, including layout, CSS, and renderer, are mostly referenced from MDN documents and some popular web front-end development libraries, its development experience and interface effects will have some similarities to web pages. If you already have experience writing web pages with HTML and CSS, it will be easier to get started.
  • Flexible: Support for adapting the interface to screens of different pixel densities by setting global scaling. Support for using screen density related sp and dp units to describe position and size of the elements.



CI Status
Windows Windows Build status
Linux Linux Build Status Linux Build Status Linux Build Status "GitHub Actions
OSX OSX Build Status


Hello App LC Finder
LCUI Router App LC Design

Related projects

Want to know what LCUI can do? You can view the following projects:

  • LCUI CLI - Command line interface for rapid LCUI development.
  • LCUI Router - The official router for LCUI. It provides a similar development experience to the Vue Router and make building multiple views applications with LCUI a breeze.
  • LC Design - A UI component framework for building LCUI application.
  • LC Finder - An image manager, it uses most of the features of LCUI, and you can use it as a reference to evaluate whether LCUI's performance and development complexity meets your needs.
  • Trad - A language based on JavaScript syntax that can be compiled into C, it preset LCUI bindings, provides React like development experience, makes it painless to create interactive UIs based on LCUI.
  • LCUI Quick Start - A minimal LCUI application.
  • LCUI Router App - A very simple browser-like application to show the LCUI and LCUI Router features.
  • LC Design App - A minimal LCUI application for preview LC Design component library.

Design references

  • SDL — X11 driver code reference
  • FreeType — Data structure naming style reference
  • LevelDB — Function naming style reference
  • jQuery — Widget operation method naming style reference
  • MDN — CSS standard reference

Quick start


Create new LCUI project

Quickly create an LCUI project using lcui-cli:

# Install lcui-cli and lcpkg
npm install -g @lcui/cli lcpkg

Create an LCUI project named myapp

lcui create myapp

Go into project directory

cd myapp

Install dependencies

lcpkg install

Run it

lcpkg run start

Install LCUI for existing project

Use lcpkg to quick install LCUI in your project directory:

# Initialize the lcpkg configuration file to tell lcpkg about your project
lcpkg init

Download and install the compiled LCUI library from GitHub

lcpkg install

After successful installation, follow the help documentation output by lcpkg to configure your project's build configuration.

Manual compilation and installation

If you want to manually compile LCUI from source code:

  1. Open CMD window, and run following command in the LCUI source directory to install the dependency libraries:
    lcpkg install
    # If you want compile for x64 CPU architecture
    lcpkg install --arch x64
    # If you want compile for Universal Windows Platform (UWP)
    lcpkg install --platform uwp
    lcpkg install --arch x64 --platform uwp
  2. Rename
    in the include directory to
  3. Open the
    file with Visual Studio, and then build LCUI.


# Install the dependencies
sudo apt-get install libpng-dev libjpeg-dev libxml2-dev libfreetype6-dev libx11-dev

Clone this repository

git clone

Go into the repository


Generate automake configure script


Check the build environment and configure automake scripts




If you wnat install LCUI

sudo make install

Go into test directory

cd test

Run helloworld application


Note: If you want to customize the compiler, compile flags, install location, and other configuration items, read the INSTALL file.


The roadmap for this project is divided into primary and secondary roadmaps, with the primary roadmap developed by the project maintainer and the secondary roadmap developed by the open source community contributors and developers like you.

Primary Roadmap

  • Make project code more standardized, readable, and maintainable
  • Improve relevant development tools and sample applications to improve the development efficiency and make it easier to use

Secondary Roadmap

  • Explore new GUI development methods to make LCUI unique
  • Accessbility support
  • Research SDL, imgui and other similar open source projects, and try to fill in what LCUI is missing
  • Refactor the existing graphics processing interface to make it easy to integrate with mainstream 2D graphics libraries and bring better graphics rendering performance to LCUI
  • Add driver support for Mac OS, Android and iOS
  • Add more mouse cursor styles
  • Add clipboard support


Think LCUI is slow to update? there are many ways to contribute to LCUI.

LCUI has adopted the code of conduct defined by the Contributor Covenant. This document is used across many open source communities, and we think it articulates our values well. For more, see the Code of Conduct.


The English version of the documentation is not available, because the author does not have time to write the English version, please read the files in the test directory and related projects to learn how to use LCUI.


  1. Why develop it?
  • Explore and experiment new GUI development way
  • Let other developers share about how to write better code
  • Make it easier for me to find better jobs to make more money
  • Pass the time
  1. Is this a browser kernel? Or a development library like Electron that integrates the browser environment?

    No, you can think of it as a traditional GUI development library that applied some Web technologies.

  2. What do I need to pay attention to if I'm going to use it?

    We recommend that your project meet the following requirements:

- The user interface is simple and does not require advanced features such as tables, animations, and transformations.
- The code design is reasonable, and the core function code and UI logic code are independent of each other. Even if you find that the requirements are not met after using LCUI, you can easily migrate to other GUI libraries.
  1. Why do I choose the LCUI instead of Electron?

    In contrast to fully functional Electron, these features of LCUI, such as small binary file size and low memory usage, are not worth mentioning, except for technical research and share, you have no reason to use LCUI.

  2. Is it the same as writing a web page?

    Not exactly, there are the following differences need to be noted:

- The interface description file format is XML, slightly different from HTML.
- You need to implement all the features of your application in C code, which is much less development efficiency than JavaScript.
- No `

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.