# laststudio/fluent-egui architecture

> Architecture diagram of the GitHub repository laststudio/fluent-egui, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-30). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/laststudio/fluent-egui
- Repository: https://github.com/laststudio/fluent-egui

## Overview

fluent-egui is a WinUI-inspired presentation library for egui/eframe. Application code builds a UI with FluentUi and reusable controls; those controls render themed content and return egui interactions to the caller. Its major branches include layout and composition, commands and collections, specialized platform-style surfaces, motion/backdrops, and icon support. The map focuses on runtime library modules; README-documented startup and platform capabilities are represented, but their source wiring was not sampled.

Main entry points: [`src/winui/theme.rs`](https://github.com/laststudio/fluent-egui/blob/main/src/winui/theme.rs) (Theme and palette), [`src/winui/widgets.rs`](https://github.com/laststudio/fluent-egui/blob/main/src/winui/widgets.rs) (Core widgets), [`src/winui/easy.rs`](https://github.com/laststudio/fluent-egui/blob/main/src/winui/easy.rs) (Fluent composition), [`src/winui/commands.rs`](https://github.com/laststudio/fluent-egui/blob/main/src/winui/commands.rs) (Commands and navigation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_composition["Composition and theme"]
  node_api["Fluent composition<br/>[easy.rs]"]
  node_layouts["Layout builders<br/>[layout.rs]"]
  node_theme["Theme and palette<br/>[theme.rs]"]
  node_design["Design ramps<br/>[design.rs]"]
  node_gallery["Gallery composition<br/>[gallery.rs]"]
  node_gallerysettings["Gallery settings"]
end

subgraph group_controls["Controls and commands"]
  node_widgets["Core widgets<br/>[widgets.rs]"]
  node_text["Text controls<br/>[text.rs]"]
  node_commands["Commands and navigation<br/>[commands.rs]"]
  node_collections["Collections<br/>[collections.rs]"]
  node_extended["Extended controls<br/>[extended.rs]"]
  node_datetime["Date and time<br/>[date_time.rs]"]
end

subgraph group_specialized["Specialized surfaces"]
  node_platform["Platform surfaces<br/>[platform.rs]"]
  node_guidance["Color guidance<br/>[guidance.rs]"]
end

subgraph group_runtime["Runtime presentation"]
  node_icons["Icon definitions<br/>[icons.rs]"]
  node_iconcatalog["Icon catalog<br/>[icon_catalog.rs]"]
  node_motion["Motion effects<br/>[motion.rs]"]
  node_backdrop["Window backdrops<br/>[backdrop.rs]"]
  node_shell["Native and web startup<br/>[shell.rs]"]
end

node_app(("Application UI"))
node_windows["Windows adapters"]
node_egui["egui/eframe"]

node_app -->|"composes UI"| node_api
node_api -->|"renders controls"| node_widgets
node_api -->|"composes layouts"| node_layouts
node_app -->|"configures theme"| node_theme
node_gallery -.->|"uses settings"| node_gallerysettings
node_widgets -->|"reads palette"| node_theme
node_text -->|"reads palette"| node_theme
node_commands -->|"reads palette"| node_theme
node_collections -->|"reads palette"| node_theme
node_extended -->|"reads palette"| node_theme
node_datetime -->|"reads palette"| node_theme
node_platform -->|"reads palette"| node_theme
node_guidance -->|"uses palette"| node_theme
node_widgets -.->|"uses glyphs"| node_icons
node_commands -->|"uses buttons"| node_widgets
node_collections -->|"uses controls"| node_widgets
node_platform -->|"uses controls"| node_widgets
node_shell -.->|"installs theme"| node_theme
node_shell -.->|"starts runner"| node_egui
node_backdrop -.->|"requests materials"| node_windows
node_iconcatalog -.->|"catalogs icons"| node_icons
node_motion -.->|"provides effects"| node_egui

click node_api "https://github.com/laststudio/fluent-egui/blob/main/src/winui/easy.rs"
click node_layouts "https://github.com/laststudio/fluent-egui/blob/main/src/winui/layout.rs"
click node_theme "https://github.com/laststudio/fluent-egui/blob/main/src/winui/theme.rs"
click node_design "https://github.com/laststudio/fluent-egui/blob/main/src/winui/design.rs"
click node_gallery "https://github.com/laststudio/fluent-egui/blob/main/src/winui/gallery.rs"
click node_gallerysettings "https://github.com/laststudio/fluent-egui/blob/main/src/winui/gallery_settings.rs"
click node_widgets "https://github.com/laststudio/fluent-egui/blob/main/src/winui/widgets.rs"
click node_text "https://github.com/laststudio/fluent-egui/blob/main/src/winui/text.rs"
click node_commands "https://github.com/laststudio/fluent-egui/blob/main/src/winui/commands.rs"
click node_collections "https://github.com/laststudio/fluent-egui/blob/main/src/winui/collections.rs"
click node_extended "https://github.com/laststudio/fluent-egui/blob/main/src/winui/extended.rs"
click node_datetime "https://github.com/laststudio/fluent-egui/blob/main/src/winui/date_time.rs"
click node_platform "https://github.com/laststudio/fluent-egui/blob/main/src/winui/platform.rs"
click node_guidance "https://github.com/laststudio/fluent-egui/blob/main/src/winui/guidance.rs"
click node_icons "https://github.com/laststudio/fluent-egui/blob/main/src/winui/icons.rs"
click node_iconcatalog "https://github.com/laststudio/fluent-egui/blob/main/src/winui/icon_catalog.rs"
click node_motion "https://github.com/laststudio/fluent-egui/blob/main/src/winui/motion.rs"
click node_backdrop "https://github.com/laststudio/fluent-egui/blob/main/src/winui/backdrop.rs"
click node_shell "https://github.com/laststudio/fluent-egui/blob/main/src/winui/shell.rs"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_api,node_layouts,node_theme,node_design,node_gallery,node_gallerysettings,node_app,node_egui toneBlue
class node_widgets,node_text,node_commands,node_collections,node_extended,node_datetime toneAmber
class node_platform,node_guidance toneMint
class node_icons,node_iconcatalog,node_motion,node_backdrop,node_shell toneRose
class node_windows toneIndigo
```

## Components

### Composition and theme

- [Fluent composition](https://github.com/laststudio/fluent-egui/blob/main/src/winui/easy.rs): `src/winui/easy.rs`
- [Layout builders](https://github.com/laststudio/fluent-egui/blob/main/src/winui/layout.rs): `src/winui/layout.rs`
- [Theme and palette](https://github.com/laststudio/fluent-egui/blob/main/src/winui/theme.rs): `src/winui/theme.rs`
- [Design ramps](https://github.com/laststudio/fluent-egui/blob/main/src/winui/design.rs): `src/winui/design.rs`
- [Gallery composition](https://github.com/laststudio/fluent-egui/blob/main/src/winui/gallery.rs): `src/winui/gallery.rs`
- [Gallery settings](https://github.com/laststudio/fluent-egui/blob/main/src/winui/gallery_settings.rs): `src/winui/gallery_settings.rs`

### Controls and commands

- [Core widgets](https://github.com/laststudio/fluent-egui/blob/main/src/winui/widgets.rs): `src/winui/widgets.rs`
- [Text controls](https://github.com/laststudio/fluent-egui/blob/main/src/winui/text.rs): `src/winui/text.rs`
- [Commands and navigation](https://github.com/laststudio/fluent-egui/blob/main/src/winui/commands.rs): `src/winui/commands.rs`
- [Collections](https://github.com/laststudio/fluent-egui/blob/main/src/winui/collections.rs): `src/winui/collections.rs`
- [Extended controls](https://github.com/laststudio/fluent-egui/blob/main/src/winui/extended.rs): `src/winui/extended.rs`
- [Date and time](https://github.com/laststudio/fluent-egui/blob/main/src/winui/date_time.rs): `src/winui/date_time.rs`

### Specialized surfaces

- [Platform surfaces](https://github.com/laststudio/fluent-egui/blob/main/src/winui/platform.rs): `src/winui/platform.rs`
- [Color guidance](https://github.com/laststudio/fluent-egui/blob/main/src/winui/guidance.rs): `src/winui/guidance.rs`

### Runtime presentation

- [Icon definitions](https://github.com/laststudio/fluent-egui/blob/main/src/winui/icons.rs): `src/winui/icons.rs`
- [Icon catalog](https://github.com/laststudio/fluent-egui/blob/main/src/winui/icon_catalog.rs): `src/winui/icon_catalog.rs`
- [Motion effects](https://github.com/laststudio/fluent-egui/blob/main/src/winui/motion.rs): `src/winui/motion.rs`
- [Window backdrops](https://github.com/laststudio/fluent-egui/blob/main/src/winui/backdrop.rs): `src/winui/backdrop.rs`
- [Native and web startup](https://github.com/laststudio/fluent-egui/blob/main/src/winui/shell.rs): `src/winui/shell.rs`

### Other components

- **Application UI**
- **Windows adapters**
- **egui/eframe**

## Connections

- Application UI → Fluent composition: composes UI (evidence: `README.md`)
- Fluent composition → Core widgets: renders controls (evidence: `README.md`)
- Fluent composition → Layout builders: composes layouts (evidence: `README.md`)
- Application UI → Theme and palette: configures theme (evidence: `README.md`)
- Gallery composition → Gallery settings: uses settings
- Core widgets → Theme and palette: reads palette (evidence: `src/winui/widgets.rs`)
- Text controls → Theme and palette: reads palette (evidence: `src/winui/text.rs`)
- Commands and navigation → Theme and palette: reads palette (evidence: `src/winui/commands.rs`)
- Collections → Theme and palette: reads palette (evidence: `src/winui/collections.rs`)
- Extended controls → Theme and palette: reads palette (evidence: `src/winui/extended.rs`)
- Date and time → Theme and palette: reads palette (evidence: `src/winui/date_time.rs`)
- Platform surfaces → Theme and palette: reads palette (evidence: `src/winui/platform.rs`)
- Color guidance → Theme and palette: uses palette (evidence: `src/winui/guidance.rs`)
- Core widgets → Icon definitions: uses glyphs
- Commands and navigation → Core widgets: uses buttons (evidence: `src/winui/commands.rs`)
- Collections → Core widgets: uses controls (evidence: `src/winui/collections.rs`)
- Platform surfaces → Core widgets: uses controls (evidence: `src/winui/platform.rs`)
- Native and web startup → Theme and palette: installs theme
- Native and web startup → egui/eframe: starts runner
- Window backdrops → Windows adapters: requests materials (evidence: `README.md`)
- Icon catalog → Icon definitions: catalogs icons
- Motion effects → egui/eframe: provides effects (evidence: `README.md`)
