Skip to main content

The C library
for user interfaces

An open source UI toolkit for building cross-platform desktop apps.

What's in LCUI?

The libraries you need to make the UI.

Portable UI library

UI library has few dependencies and no system API dependencies.

Small Graphics Library

Provide basic graphics processing capabilities for UI rendering.

Platform APIs

Provide platform related APIs, such as window management, message loop, clipboard, etc.

Router

define routes, map them to widgets, and display the appropriate widget based on the URL.

I18n

Configure translated text in multiple languages and freely switch languages at runtime.

Window Mapping

Map widget to the system window so that its content can be synchronized to the window.

Preset Widgets

Text, TextEdit, Button, ScrollBar, etc.

CSS Support

Parse CSS, select styles, and calculate styles.

XML Support

Declare User Interface with XML.

Create user interfaces from widgets

LCUI lets you build user interfaces out of individual pieces called widgets. Create your own LCUI widgets and combine them into entire screens, pages, and apps.

<?xml version="1.0" encoding="UTF-8" ?>
<lcui-app>
<resource type="text/css" src="todolist.css"/>
<ui>
<w class="task-item is-completed">
<w class="task-status" />
<text class="task-name">Download LCUI source code</text>
<w class="task-delete" />
</w>
<w class="task-item is-completed">
<w class="task-status" />
<text class="task-name">Build LCUI</text>
<w class="task-delete" />
</w>
<w class="task-item">
<w class="task-status" />
<text class="task-name">Read LCUI tutorials</text>
<w class="task-delete" />
</w>
<w class="task-item">
<w class="task-status" />
<text class="task-name">Create my LCUI application</text>
<w class="task-delete" />
</w>
</ui>
</lcui-app>
Todo List
Download LCUI source code
Build LCUI
Read LCUI tutorials
Create my LCUI application

Add interactivity wherever you need it

The widgets in LCUI are event driven. You can add event handlers to widgets in response to interactions, and then make some content or style changes in the event handlers.

<?xml version="1.0" encoding="UTF-8" ?>
<lcui-app>
<resource type="text/css" src="todolist.css"/>
<ui>
<w class="app">
<w class="header">
<text class="title">Todo list</text>
<w class="tools">
<text id="count" class="count" />
<w id="filters" class="task-filters">
<text class="task-filter" data-value="all">All</text>
<text class="task-filter" data-value="active">Active</text>
<text class="task-filter" data-value="completed">Completed</text>
</w>
</w>
</w>
<textedit id="input" class="task-input" placeholder="Add a new task..." />
<w id="list" class="task-list" />
</w>
</ui>
</lcui-app>
Todo list
Todo list
4 tasks
all
active
completed
Download LCUI source code
Build LCUI
Read LCUI tutorials
Create my LCUI application