Skip to content
HuxerUIPublic

About

A modern C++20 cross-platform declarative UI framework with shared state, layout, rendering, and native platform backends.

Topics

Resources

Security policy

Stars

41 stars

Watchers

4 watching

Forks

Repository files navigation

HuxerUI logo

HuxerUI

Build human-centered user experiences.

HuxerUI is a declarative, cross-platform UI framework for C++20. The name Huxer combines H for Human, UX for User Experience, and -er for the person who creates that experience.

Quick Start

This quick start targets HuxerUI 0.5.5. The installers select the latest published SDK.

Install the SDK

Windows PowerShell

irm https://github.com/HuxerUI/HuxerUI/releases/latest/download/install.ps1 | iex

macOS, Linux, or ARM64 Termux

curl -fsSL https://github.com/HuxerUI/HuxerUI/releases/latest/download/install.sh | sh

On desktop computers, xlings install huxerui -y installs the SDK through xlings.

For toolchain requirements and SDK version selection, see Installation.

Run an application

Open a new terminal to create an application. Replace windows with a target you can build and run from your development machine.

huxerui create app hello_huxer
cd hello_huxer
huxerui doctor
huxerui run windows

The project above uses headers (#include <huxerui/huxerui.h>) and CMake. For a C++ modules project, whose sources write import huxerui; and which mcpp builds:

huxerui create app hello_modules --build-system mcpp

A library defaults to, and is recommended with, --build-system cmake,mcpp: you maintain its headers, the mcpp build generates its module interface, and consumers can either include or import it. See C++ Modules and mcpp.

Example

Replace src/app.cpp in the generated CMake project with this counter. UseState retains the count and updates the view when the button changes it.

#include <huxerui/huxerui.h>

using namespace huxerui;

[[huxerui::composable]]
View Counter() {
  auto count = UseState(0);

  return Column {
    Text::Format("Count: {}", count),
    Button("Increment").OnClick([count] { count += 1; }),
  }.With(Padding(24.0F), Spacing(12.0F));
}

View App() {
  return MaterialTheme {
    Counter(),
  };
}

const Application application{App, {.window = {.title = "Counter"}}};

Repeat the run command to try the counter.

Explore more components in the UI Gallery and complete applications in HuxerUI-Demos.

Platforms

Platform Platform integration Renderer
Windows Win32 Direct2D and DirectWrite
macOS AppKit Core Graphics and Core Text
Linux GTK 4.14 GSK, Cairo, and Pango
Web Emscripten and browser APIs Canvas 2D
Android Android View and InputConnection Android Canvas
iOS UIKit and UITextInput Core Graphics and Core Text

For build requirements and backend capabilities, see Platform Support.

Official Libraries

Library Purpose
Lib-WebView Embeds web content with navigation, JavaScript evaluation, and messaging between pages and the app.
Lib-RichEditor Edits structured rich-text documents with Markdown and JSON import and export.
Lib-CodeEditor Provides a code editor with syntax highlighting, completion, and search.
Lib-Media Plays audio and video and provides encoding, decoding, and container I/O.
Lib-SQLite Maps C++ records to SQLite with typed queries, transactions, and schema migrations.
Lib-Markdown Parses CommonMark with GFM extensions and renders themed Markdown views.
Lib-DataTable Displays virtualized tables with resizable columns and application-controlled sorting, selection, and editing.
Lib-Charts Displays interactive charts with tooltips, selection, and animated data updates.
Lib-PDF Displays PDF pages and supports asynchronous rendering, text extraction, and search.
Lib-Camera Provides camera previews, photo capture, and silent video recording.
Lib-AudioCapture Captures timestamped microphone audio as PCM and exports recordings.
Lib-QRCode Generates and decodes QR codes and barcodes with declarative views and SVG export.
Lib-Lottie Plays Lottie animations with playback and seeking controls.
Lib-Map Embeds AMap and Baidu Map views on Android and iOS.
Lib-Live2D Displays interactive Live2D Cubism characters with motion and expression controls.
Lib-PluginKit Design for a C++20 plugin toolkit with typed interfaces, package management, and isolated execution.
Lib-AVKit Planned toolkit for recording, real-time effects, timeline editing, and media export.

Documentation

Community

Join the HuxerUI community on Discord or QQ.

Discord QQ group 1090609035
Discord invitation QR code QQ group invitation QR code

License

HuxerUI is available under the terms in LICENSE.

About

A modern C++20 cross-platform declarative UI framework with shared state, layout, rendering, and native platform backends.

Topics

Resources

Security policy

Stars

41 stars

Watchers

4 watching

Forks

Releases

Packages

Contributors

Languages