facett-app
The app-framework layer over facett's egui components. Where the facett-* crates are components, facett-app is the composition layer that turns them into whole apps — navigation, a router, overlays, an app shell, and input/data widgets.
A framework in the spirit of Leptos, but honest about egui: immediate-mode, canvas-only (native and wasm from one codebase; no DOM/SSR/SEO, no signals). Everything is a Facet, headless-addressable by stable ids, theme-aware, and observable via state_json — so a whole app is robot-testable without a human.
→ GETTING-STARTED.md · template: cargo run -p facett-app --example starter_app
What's in the box
| Area | Type | What it does |
| Navigation model | NavModel / NavItem |
one hierarchical, id-keyed model → many surfaces |
| Router | Router |
route→view, back/forward, deep-link (to_hash/sync_from_hash) |
| Nav rail | Sidebar |
persistent sidebar from a NavModel (fold, collapse, active) |
| Shell (light) | NavShell |
sidebar + router + routed content + clickable breadcrumb |
| Shell (full) | AppShell |
topbar + sidebar + mounted Facet panes + statusbar |
| Split layout | SplitPane |
host two Facets with a draggable divider (master+detail / compare) |
| Select | Dropdown |
themed combobox (open-state in the struct, not egui memory) |
| Dialog | Modal |
scrim + centred panel + Esc; title/body/buttons |
| Popover | Popover |
an anchored floating panel attached to a trigger |
| Command palette | NavPalette |
Ctrl-K fuzzy palette over the NavModel (owned ids, no leak) |
| Menu bridge | nav_commands |
NavModel → facett_menu::Commands: drive facett-menu's palette/menubar/context-menu from the same model (AppShell::with_menubar) |
| Notifications | Toasts / Level |
levelled queue with TTL (deterministic tick) |
| Nested tabs | TabView |
an in-content tab strip (distinct from the deck's tabs) |
| Tree | Tree |
hierarchical single-select navigator over a NavModel |
| Widgets | Accordion / Stepper / Pagination |
collapsible sections / bounded int / pager |
| Date | DatePicker |
a month calendar (no chrono/time dep; wasm-safe) |
| Colour | ColorPicker |
preset swatches + egui colour editor; observable hex |
Design principles ("the facett way")
- Implement
Facet(or a borrowed widget + a*ViewFacet). - Keep observable state in the struct (FC-1 of the component contract) — never in egui memory.
- Headless-addressable via ids (
navigate/select/set_*); exposestate_json. - Theme-aware (
look::Theme); keyboard-first. - One model → many surfaces (a
NavModeldrives sidebar, breadcrumb, …).
Status
Built per the framework adoption plan (workspace_nordisk/facett-ramverk-inforandeplan.md): Fas 0 (skeleton) · Fas 1 (nav backbone) · Fas 2 (AppShell) · Fas 3 (overlays) · Fas 4 (widgets) · Fas 5 (DX) — done. Fas 6 (release) is the manual nornir-gated step.
Everything is demoed in facett-demo (the nav, shell, overlay, widgets tabs) and builds for wasm32-unknown-unknown.