Files
Liu afa800dfaf build(xmake): fix package name, target naming and example install
- Remove per-lib set_project() calls that overrode the global lcui
  project name; xmake show now correctly reports the project as lcui.
- Move per-lib set_version() into the corresponding target() block so
  each sub-library keeps an independent version usable for standalone
  packaging.
- Add set_default(false) and set_group(examples) to all pandagl
  examples so they are no longer picked up by xmake package.
- Rename targets to use dashes for consistency:
    pandagl_cairo_example  -> pandagl-cairo-example
    preview_block_layout   -> preview-block-layout
    preview_flex_layout    -> preview-flex-layout
    preview_scrollbar      -> preview-scrollbar
    preview_widget_opacity -> preview-widget-opacity
- Bump yutil submodule to drop its set_project() call as well.
2026-06-01 22:27:07 +08:00
..

libui-router

(English/中文)

libui-router is the UI binding layer that connects librouter to libui widgets.

It ships two widgets:

  • router-link — a clickable widget that triggers navigation; mirrors <router-link> from Vue Router. Toggles router-link-active and router-link-exact-active classes based on the current route.
  • router-view — a route outlet that renders the matched component for the current route.

Usage

#include <ui.h>
#include <ui_router.h>

ui_init();
ui_register_router_link();
ui_register_router_view();

/* Now "router-link" and "router-view" widget types are available. */

When LCUI is used as a whole, lcui_init() already calls these registration functions through lcui_widgets_init(); this lib only needs to be called manually if you embed libui-router without the LCUI top-level shell.

License

MIT licensed.