Skip to content

andregoepel/design-blazor

Repository files navigation

AndreGoepel.Design.Blazor

An app-neutral design system for Blazor: an emerald-accented light/dark token palette, a Radzen reskin, self-hosted fonts, and a small set of shell / login building blocks. It has no dependency on any application — consume it from any Blazor app or library to get a consistent look without pulling in unrelated stacks.

Extracted from the marten-identity project, where it originated as the "AppFoundation" UI.

Install

dotnet add package AndreGoepel.Design.Blazor

Use

Reference the stylesheets after Radzen's material-base.css, and load the theme + nav scripts, in your host page (App.razor):

<link rel="stylesheet" href="_content/AndreGoepel.Design.Blazor/css/fonts.css" />
<link rel="stylesheet" href="_content/Radzen.Blazor/css/material-base.css" />
<link rel="stylesheet" href="_content/AndreGoepel.Design.Blazor/css/design.css" />
<script src="_content/AndreGoepel.Design.Blazor/js/theme.js"></script>
<script src="_content/AndreGoepel.Design.Blazor/js/nav.js"></script>

Then build with Radzen components and the ag-* helper classes, and use the shell:

<AppShell BrandName="Acme">
    <Sidebar>@* NavLinks + ag-nav-section groups *@</Sidebar>
    <TopbarActions><ThemeToggle /></TopbarActions>
    <ChildContent>@Body</ChildContent>
</AppShell>

What's inside

  • Design tokens (--ag-*) for light + dark, and a remap of Radzen's --rz-* variables onto them.
  • ag-* helper classes — cards, buttons, badges, forms, grids, empty states, the app shell, and the login card.
  • ComponentsAppShell, AppPageTitle, LoginShell, AppIcon, ThemeToggle, PageHeader, StatusBadge, EmptyState, RowActions, IconButton, DataCard, GridToolbar, FilterBar, CardForm, FormField, SettingToggleRow, StatTile, LinkButton, InfoBox, and the cascading BreadcrumbState.
  • Services & optionsConfirmService (standardised confirm/delete dialogs) and DesignBlazorOptions (e.g. the BrandName AppPageTitle appends to document titles), registered via services.AddDesignBlazor(o => o.BrandName = "Acme") (call after AddRadzenComponents()).
  • Self-hosted fonts (Manrope / Space Grotesk / JetBrains Mono) — nothing is fetched from Google at runtime. Regenerate with scripts/fetch-fonts.py.

See DESIGN.md for the full guidelines.

License

MIT © André Göpel

About

App-neutral Blazor design system (tokens, Radzen reskin, shell/login components, self-hosted fonts)

Resources

License

Stars

1 star

Watchers

0 watching

Forks

Packages

 
 
 

Contributors