Loam.Data
3.24.0
dotnet add package Loam.Data --version 3.24.0
NuGet\Install-Package Loam.Data -Version 3.24.0
<PackageReference Include="Loam.Data" Version="3.24.0" />
<PackageVersion Include="Loam.Data" Version="3.24.0" />
<PackageReference Include="Loam.Data" />
paket add Loam.Data --version 3.24.0
#r "nuget: Loam.Data, 3.24.0"
#:package Loam.Data@3.24.0
#addin nuget:?package=Loam.Data&version=3.24.0
#tool nuget:?package=Loam.Data&version=3.24.0
Loam
Pure C# themed controls for Avalonia applications.
Loam gives Avalonia apps a complete themed control set with a familiar, compact API, runtime theming, and no XAML.
Status: v3.1.0 released โ published as
Loamon NuGet. Over the v2 baseline, v3 adds end-to-end theme consistency, Material You, ergonomics fixes, and new shell controls; 3.1 splits charts, pickers, and heavy data controls into opt-in satellite packages (Loam.Charts,Loam.Pickers,Loam.Data). The full solution builds clean with 458 headless/unit tests passing. See the v3 plan and review, the v3 โ v3.1 and v2 โ v3 migration guides, the Development Plan, and the project memory (decisions, progress log, learnings, and the per-component status tracker).
๐ Documentation
A full documentation site (built with VitePress) lives in docs/
โ guides (getting started, theming, C# authoring) plus a documented, example-rich page for every
component group. It is published to GitHub Pages automatically via
.github/workflows/docs.yml (set repository Settings โ Pages โ Source
to GitHub Actions; the site publishes to https://araxis.github.io/loam/).
Run the docs locally:
cd docs
npm install
npm run docs:dev # local preview at http://localhost:5173
npm run docs:build # static build โ docs/.vitepress/dist
What Loam is
- Familiar API. Component parameters use predictable names (
Variant,Color,Size,Dense,Elevation, โฆ); types live inLoam.Controls(e.g.Button,TextField,DataGrid<T>, theDialogService). - Polished look. Role-based light/dark colors, tonal surfaces, elevation/shadows, click ripple, state layers, and a full typography scale, all token-driven.
- Pure C#. Controls,
ControlThemes, and templates are authored in C# โ no.axaml. - Self-contained. Pickers (date/time/color) and the calendar are custom-built โ no dependency on
Avalonia's FluentTheme
Calendarโ and ship in the opt-inLoam.Pickerspackage. - Modular. A lean core plus opt-in satellites (
Loam.Charts,Loam.Pickers,Loam.Data); add only the control groups you use. Namespaces stayLoam.Controlsacross the split. - Highly themeable. A
LoamThemedata model with light/dark color schemes, compatibility palettes, and runtime token swapping. - Cross-platform. One library targeting Avalonia 12 everywhere it runs.
What Loam is not
- Not a drop-in Razor port โ you still build Avalonia views; Loam shrinks the mental gap.
- Not a framework wrapper. Loam is an independent control library built directly on Avalonia.
Quick start
Install the core package after a release is published, or reference src/Loam/Loam.csproj while
developing from this repository. Add the satellite packages for the control groups you use โ each
depends on the core package, and namespaces stay Loam.Controls:
dotnet add package Loam
dotnet add package Loam.Charts # PieChart, BarChart, LineChart
dotnet add package Loam.Pickers # DatePicker, TimePicker, ColorPicker, DateRangePicker, MonthCalendar
dotnet add package Loam.Data # DataGrid<T>, SimpleTable, TreeView, Pagination
1. Register the theme in your Application (add Avalonia's FluentTheme for the base controls
Loam composes, then LoamTheme, then a registrar for each satellite you reference):
using Avalonia;
using Avalonia.Styling;
using Avalonia.Themes.Fluent;
using Loam.Theming;
public sealed class App : Application
{
public override void Initialize()
{
Styles.Add(new FluentTheme()); // base templates for the window shell + built-in controls
Styles.Add(new LoamTheme()); // Loam's pure-C# theming + core control themes on top
Styles.Add(new LoamCharts()); // only if you reference Loam.Charts
Styles.Add(new LoamPickers()); // only if you reference Loam.Pickers
Styles.Add(new LoamData()); // only if you reference Loam.Data
RequestedThemeVariant = ThemeVariant.Light;
}
}
2. Build UI with Loam controls (object initializers, no XAML):
using Loam;
using Loam.Controls;
var form = new StackPanel
{
Spacing = 12,
Children =
{
new Text { Text = "Sign in", Typo = Typo.H5 },
new TextField { Label = "Email", Variant = Variant.Outlined },
new TextField { Label = "Password", Variant = Variant.Outlined },
new Button { Content = "Continue", Variant = Variant.Filled, Color = LoamColor.Primary },
},
};
3. Show a dialog / snackbar (no provider component โ uses the window's overlay layer):
var ok = await DialogService.For(this).ConfirmAsync("Delete?", "This cannot be undone.", "Delete", "Cancel");
SnackbarService.For(this).Add(ok ? "Deleted" : "Cancelled", LoamColor.Info);
Theming
LoamTheme projects a LoamThemeData into Avalonia resources, with light/dark theme dictionaries.
The default data includes role-based color schemes, compatibility palettes, typography, shadows,
shape, spacing, stroke, density, field metrics, state layers, motion, layout, and z-index.
var theme = new LoamTheme();
theme.SetPrimary(Colors.Indigo); // recolor the primary at runtime
theme.SetPalette(customLight, customDark); // swap whole palettes
Application.Current!.RequestedThemeVariant = ThemeVariant.Dark; // flip light/dark
All control colors resolve from tokens (LoamTokens), so theme/variant changes restyle the tree
automatically. Per-control overrides use the same Loam knobs: Variant, Color, Size,
Dense, Elevation, Outlined, Square, etc.
Component catalog
| Area | Controls |
|---|---|
| Primitives | Text, Icon, Button, IconButton, ToggleIconButton, ButtonGroup, Fab, Paper, Card (+CardHeader/CardMedia/CardContent/CardActions), Divider, Chip/ChipSet, Badge, Avatar/AvatarGroup |
| Layout & shell | Container, ResponsiveGrid/Col, Spacer, Hidden, ScrollToTop, Layout, AppBar, Drawer, MainContent |
| Inputs | Field, TextField, NumericField, MaskedTextField (+Mask), Select, Autocomplete, CheckBox, Switch, Radio/RadioGroup, Slider, Rating, ToggleGroup, FileUpload, Form |
Pickers (Loam.Pickers) |
DatePicker, TimePicker, ColorPicker, DateRangePicker (+ self-contained MonthCalendar) |
| Overlays & feedback | DialogService/MessageBoxAsync, SnackbarService, CommandPalette, Overlay, Popover, Tooltip, Menu, Alert, ProgressLinear, ProgressCircular, Skeleton, Collapse |
| Data display | List/ListItem/ListSubheader, Tabs, ExpansionPanels, Timeline, Carousel, Stepper โ plus (Loam.Data) SimpleTable, DataGrid<T>, TreeView, Pagination |
| Navigation | Link, Breadcrumbs, NavMenu/NavLink/NavGroup, NavigationRail, BottomNavigation |
Charts (Loam.Charts) |
PieChart, BarChart, LineChart (+ donut mode) |
| Effects | Ripple |
Groups tagged with a package name ship in that opt-in satellite (since 3.1); everything else is in the
core Loam package. See the v3 โ v3.1 migration guide.
See memory/component-inventory.md for the full component catalog
and the live status of each control, including documented future enhancements such as richer
DataGrid inline-edit, picker clock-face/HSV editing, and stacked/time-series charts.
Run the gallery
dotnet run --project samples/Loam.Gallery
The gallery has a side menu and focused pages for the component catalog.
Repository layout
| Path | Purpose |
|---|---|
src/Loam/ |
The core control library (net8.0, packable as Loam). |
src/Loam.Charts/ |
Chart controls satellite (packable as Loam.Charts). |
src/Loam.Pickers/ |
Picker controls satellite (packable as Loam.Pickers). |
src/Loam.Data/ |
Data controls satellite (packable as Loam.Data). |
samples/Loam.Gallery/ |
Live component gallery. |
tests/Loam.Tests/ |
Headless + unit tests (xUnit + Avalonia.Headless). |
DEVELOPMENT_PLAN.md |
Phased roadmap with per-phase & per-component Definition of Done. |
memory/ |
Decisions (ADRs), research findings, progress log, learnings, component tracker. |
Tech
- Avalonia 12.x, .NET 8 library target, C# pure code-only UI.
- xUnit +
Avalonia.Headless.XUnitfor behavior tests;.slnxsolution; SDK pinned viaglobal.json. - Build:
dotnet buildยท Test:dotnet testยท Pack all four packages:dotnet pack Loam.slnx.
License
MIT.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 3.24.0 | 166 | 6/16/2026 |
| 3.23.0 | 120 | 6/15/2026 |
| 3.22.0 | 125 | 6/15/2026 |
| 3.21.0 | 126 | 6/15/2026 |
| 3.20.0 | 115 | 6/15/2026 |
| 3.19.0 | 121 | 6/14/2026 |
| 3.18.0 | 118 | 6/14/2026 |
| 3.17.0 | 117 | 6/14/2026 |
| 3.16.0 | 121 | 6/14/2026 |
| 3.15.0 | 113 | 6/14/2026 |
| 3.14.0 | 119 | 6/14/2026 |
| 3.13.0 | 115 | 6/14/2026 |
| 3.12.0 | 124 | 6/14/2026 |
| 3.11.0 | 118 | 6/14/2026 |
| 3.10.0 | 129 | 6/14/2026 |
| 3.9.0 | 117 | 6/14/2026 |
| 3.8.0 | 115 | 6/14/2026 |
| 3.7.0 | 115 | 6/14/2026 |
| 3.6.0 | 118 | 6/14/2026 |
| 3.5.0 | 110 | 6/14/2026 |
Loam 3.24.0: Loam.Charts adds ScatterChart and BubbleChart โ the first charts on numeric X and Y axes (a new XYChartBase with nice-number domains, XMin/XMax/YMin/YMax, AxisTickCount, axis formatters). Data is a ScatterPoint(X, Y, Size, Label) list via Points or multiple ScatterSeries via Series; scatter draws even markers, bubble sizes markers by Size (area-proportional). Hover/click resolve the datapoint; tooltips show (x, y). ChartPoint gains X/Size; adds public helpers Charts.MapLinear, Charts.Extent, Charts.BubbleRadius. Additive. See https://araxis.github.io/loam/guide/changelog