Navigation API
Declared by <huxerui/navigation.h>.
Navigation chrome
Section titled “Navigation chrome”TopAppBar,TopAppBarTitleAlignment,TopAppBarStyle.NavigationItem: label/icon constructors,SelectedIcon, andEnabled.NavigationBarandNavigationPane: controlled selected index andOnChanged.NavigationBarStyleandNavigationPaneStyleconfigure colors, icon/label geometry, selection indicator, indication, and animation.
Drawers
Section titled “Drawers”StartDrawerandEndDrawer: content, controlledOpen, andOnOpenChanged.DrawerLayout: content-only, either-side, and both-side constructors.DrawerStyle: surface/scrim/shadow, preferred/minimum widths, minimum content width, modal reveal, edge drag width, corner radius, and optional motion.DrawerMotion: open and close animation specs.
Factory navigation
Section titled “Factory navigation”NavigationStack(factory, args...) creates a retained stack. NavigationController exposes Push, Pop, Replace, CanPop, and Depth; factory/argument overloads avoid forwarding lambdas. UseNavigation() resolves the nearest stack and UseRootNavigation() the outermost.
Routed navigation
Section titled “Routed navigation”NavigationPath<Route> stores route values and exposes Empty, Size, Routes, and equality. NavigationStack(root, State<NavigationPath<Route>>, resolver) builds destinations. RouteNavigationController<Route> exposes Push, Pop, Replace, SetPath, CanPop, and Depth. Typed UseNavigation<Route>() and UseRootNavigation<Route>() require a compatible routed stack.
Motion
Section titled “Motion”NavigationMotion controls entering/covered offsets, scale, opacity, and push/pop specs. NavigationStyle contains optional motion and Default().
See the dedicated navigation component pages and routing guide.
Complete typed-route example
Section titled “Complete typed-route example”#include <huxerui/huxerui.h>
using namespace huxerui;
struct ArticleRoute { int id = 0; bool operator==(const ArticleRoute&) const = default;};
View Article(const ArticleRoute& route) { return Text::Format("Article {}", route.id);}
View Home() { auto navigation = UseNavigation<ArticleRoute>(); return Button("Open article").OnClick([navigation] { navigation.Push(ArticleRoute {.id = 42}); });}
[[huxerui::scope]]View RoutedApplication() { auto path = UseState(NavigationPath<ArticleRoute>{}); return NavigationStack(Home, path, Article);}The path is application-owned state; the controller performs typed mutations and the resolver maps each route value to a destination View.

