Skip to content

API and examples

Start with alicorn:ui for a routine single-window app. It provides typed app state, layout scopes, text, common controls, and a native ui.run lifecycle. Move to the lower-level runtime or host API only when your application needs the additional control.

The convenience package covers rows, columns, panels, boxes, virtual lists, text fields, checkboxes, sliders, icons, and buttons. It writes ordinary nodes into the existing runtime. Your application keeps domain state and handles the result of user actions.

The API reference lists the public surface and migration boundaries.

Alicorn’s retained motion API animates presentation values while keeping target layout and hit geometry stable. Motion can be interrupted and retargeted; the host schedules presentation-only work while a response is active.

Explore examples/09_retained_motion in the repository.

Virtual lists let applications describe a bounded visible window instead of creating a UI node for every logical item. Give rows stable keys so identity survives changes in ordering and visibility.

See examples/03_async_list and the other numbered lessons in the examples directory.