Adliance.AspNetCore.Buddy.GuiKit 10.2.0.14

Prefix Reserved
dotnet add package Adliance.AspNetCore.Buddy.GuiKit --version 10.2.0.14
                    
NuGet\Install-Package Adliance.AspNetCore.Buddy.GuiKit -Version 10.2.0.14
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Adliance.AspNetCore.Buddy.GuiKit" Version="10.2.0.14" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Adliance.AspNetCore.Buddy.GuiKit" Version="10.2.0.14" />
                    
Directory.Packages.props
<PackageReference Include="Adliance.AspNetCore.Buddy.GuiKit" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Adliance.AspNetCore.Buddy.GuiKit --version 10.2.0.14
                    
#r "nuget: Adliance.AspNetCore.Buddy.GuiKit, 10.2.0.14"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Adliance.AspNetCore.Buddy.GuiKit@10.2.0.14
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Adliance.AspNetCore.Buddy.GuiKit&version=10.2.0.14
                    
Install as a Cake Addin
#tool nuget:?package=Adliance.AspNetCore.Buddy.GuiKit&version=10.2.0.14
                    
Install as a Cake Tool

Adliance.AspNetCore.Buddy.GuiKit

The GuiKit Buddy provides a set of UI components, tag helpers, and static assets (CSS, JS, fonts) for building consistent ASP.NET Core web applications.

Features

  • Bundled and minified CSS and JavaScript assets
  • Razor tag helpers for common UI components
  • Application Insights integration helper

Setup

Register the services in your ASP.NET Core application:

using Adliance.AspNetCore.Buddy.GuiKit.Extensions;

// In Program.cs or Startup.ConfigureServices:
services.AddApplicationInsightsIfConfigured();

AddApplicationInsightsIfConfigured reads the APPLICATIONINSIGHTS_CONNECTION_STRING environment variable and configures Application Insights telemetry automatically if it is present. It also registers AppInsightsJavaScript, which can be injected into Razor views to render the Application Insights JavaScript snippet.

Serve static files with app.UseGuiKitStaticFiles() instead of app.UseStaticFiles(), so browsers cache them: files requested with a version (?v=..., like the CSS and JavaScript of GuiKit's layouts) for a year, and GuiKit's fonts and images for a week. The version is the app's InformationalVersion (AppVersion.Current, which the app's own files can use as well: href="~/styles.css?v=@AppVersion.Current"), so a new build of the app (eg. with an updated GuiKit) loads them again. During development, browsers check every file for changes instead.

Layout

GuiKit ships a base layout, _AgkLayout, with GuiKit's CSS and JavaScript, FontAwesome, the Application Insights snippet and the htmx configuration for a Content Security Policy. An app's own layout builds on it:

@{
    Layout = "_AgkLayout";
}

@section Header
{
    <title>My App</title>
}

<partial name="_Navigation"/>
<main>
    @RenderBody()
</main>

Its sections are Header (additional content of <head>) and Scripts (additional scripts at the end of <body>), both optional. AgkStylesheets and AgkScripts replace GuiKit's own min.css/min.js, eg. with a theme's bundle that already contains them - the MADx layouts (_MadxCommonLayout, _MadxLoginLayout) build on _AgkLayout that way.

Tag Helpers

Add the tag helpers to your _ViewImports.cshtml:

@addTagHelper *, Adliance.AspNetCore.Buddy.GuiKit
Tag Helper Description
<agk-button> Renders a <button> with a text, an optional icon (icon-position left or right), a color (Primary, Secondary or Danger) and a size; supports asp-* routing (sets formaction)
<agk-chart> Renders a chart with Apache ECharts (bundled); its options are the model (serialized to JSON, camelCase) or set in a <script> child, eg. <script>const options = { series: [...] };</script>
<agk-chat> Renders a chat of <agk-chat-question> (right) and <agk-chat-answer> (left) bubbles; is-loading shows a typing indicator
<agk-checkbox> Renders a labeled checkbox with an optional placeholder next to it, bound to a bool
<agk-form-element> Renders a form element's label and help text around custom content
<agk-input> Renders a labeled <input>, optionally with an icon and help text
<agk-link> Renders a link (<a>) that looks like a button, with the same text, icon, color and size as <agk-button>; href or asp-* routing
<agk-loading> Renders a loading indicator
<agk-modal> Renders a modal dialog (HTML popover) with a title, a close button and a dark backdrop; opened by a button with popovertarget="{id}"; content can be loaded via htmx (like <agk-panel>) each time it opens
<agk-notification> Renders a notification/alert component
<agk-panel> Renders a panel/card component
<agk-password> Renders a labeled password <input> with an eye icon inside it that toggles the password's visibility, optionally with an icon and help text
<agk-rating> Renders a labeled rating of 5 stars, bound to a nullable int; readonly="true" only displays it
<agk-select> Renders a labeled <select>, optionally with an icon and help text
<agk-textarea> Renders a labeled <textarea>, optionally with an icon and help text
<agk-upload> Renders a labeled file upload (<input type="file">), optionally with an icon and help text
<agk-title> Renders a styled page title

Styling

Layout

  • <section> (within <main>) lays out panels next to each other, <fieldset> does the same for form elements within a panel. Up to 4 children share a row equally (1 child takes the full width, 2 half of it, 3 a third, ...). How many columns there are at most depends on the width of the section/fieldset itself (container queries), not on the width of the screen.
  • A <select> written by hand (eg. into <agk-form-element>) gets the same dropdown arrow as <agk-select> when it's wrapped into a <div class="select">; without it, it keeps the browser's own arrow.

Page transitions

Navigating between pages of the app shows a subtle transition: the nav stays in place and the content fades out and back in. It uses the browser's cross-document view transitions (no JavaScript needed); in browsers without support, and for users who reduce motion in their OS settings, pages simply switch as before. It can be tuned with --agk-page-transition-duration, or switched off with @view-transition { navigation: none; } in the app's own CSS.

Content Security Policy

GuiKit works with a strict Content Security Policy, without 'unsafe-inline' or 'unsafe-eval':

  • app.UseGuiKitContentSecurityPolicy() sends a strict policy with every response (register it before static files). It only allows the app's own origin plus the request's nonce for inline scripts and styles, and Application Insights if it's configured. More sources can be allowed, or the policy tried out without blocking anything:
    app.UseGuiKitContentSecurityPolicy(options =>
    {
        options.Add("img-src", "https://images.example.com");
        options.ReportOnly = true;
    });
    
  • Apps that build their own policy use HttpContext.GetGuiKitCspNonce() (in Adliance.AspNetCore.Buddy.GuiKit.Extensions), a random nonce for the current request, eg. script-src 'self' 'nonce-{nonce}'; style-src 'self' 'nonce-{nonce}'.
  • Every inline <script> in a view that uses GuiKit's tag helpers automatically gets that nonce, and so do GuiKit's own inline scripts (eg. of <agk-chart>, or the Application Insights snippet).
  • htmx inserts scripts and styles of the content it loads, which need the nonce as well - the MADx layouts already configure this, other layouts add <meta name="htmx-config" content='{"inlineScriptNonce":"@Context.GetGuiKitCspNonce()","inlineStyleNonce":"@Context.GetGuiKitCspNonce()"}'/>.
  • GuiKit itself sets no inline styles (a chart's height, for example, is set by its JavaScript).

Theming

All styles are built from CSS variables, which are defined (and documented) in css/tokens.css. They are named --agk-{component}-{property}[-{variant}], eg. --agk-button-background-hover or --agk-input-padding-block-lg. Variables starting with --_ are private to a component and not meant to be overridden.

Override them on :root, eg.:

:root {
    --agk-color-primary: #004488;
    --agk-button-radius: 0;
}

All GuiKit styles are in cascade layers (agk.reset, agk.tokens, agk.base, agk.components, agk.layout, agk.overlays, agk.theme). CSS of an app that isn't in a layer always wins over them, regardless of its specificity - so no !important is needed to override GuiKit styles. Themes that are distributed as a package (like the MADx one) put their overrides into @layer agk.theme { ... }.

Application Insights JavaScript

To inject the Application Insights JavaScript snippet into your layout, inject AppInsightsJavaScript and render the script tag:

@inject Adliance.AspNetCore.Buddy.GuiKit.AppInsightsJavaScript AppInsightsJavaScript

@Html.Raw(AppInsightsJavaScript.Script)
Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Adliance.AspNetCore.Buddy.GuiKit:

Package Downloads
Adliance.AspNetCore.Buddy.GuiKit.Madx

Library of CSS, JavaScript, TagHelpers and layouts for a commonly shared Adliance UI, but themed for MADx.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
10.2.0.14 39 10/1/2026
10.2.0.13 45 10/1/2026
10.2.0.12 48 10/1/2026
10.2.0.11 49 9/30/2026
10.2.0.10 47 9/30/2026
10.2.0.7 43 9/30/2026
10.2.0.6 46 9/30/2026
10.2.0.5 45 9/30/2026
10.2.0.4 44 9/30/2026
10.2.0.3 50 9/30/2026
10.2.0.2 48 9/30/2026
10.2.0.1 49 9/30/2026
10.1.0.31 106 9/23/2026
10.1.0.30 116 9/9/2026
10.1.0.29 125 9/9/2026
10.1.0.28 149 8/20/2026
10.1.0.27 128 8/20/2026
10.1.0.26 129 8/19/2026
10.1.0.25 133 8/18/2026
10.1.0.24 122 8/18/2026
Loading failed