TechGems.StaticComponents
1.4.0
dotnet add package TechGems.StaticComponents --version 1.4.0
NuGet\Install-Package TechGems.StaticComponents -Version 1.4.0
<PackageReference Include="TechGems.StaticComponents" Version="1.4.0" />
<PackageVersion Include="TechGems.StaticComponents" Version="1.4.0" />
<PackageReference Include="TechGems.StaticComponents" />
paket add TechGems.StaticComponents --version 1.4.0
#r "nuget: TechGems.StaticComponents, 1.4.0"
#:package TechGems.StaticComponents@1.4.0
#addin nuget:?package=TechGems.StaticComponents&version=1.4.0
#tool nuget:?package=TechGems.StaticComponents&version=1.4.0
Static Components
Static Components is a minimalistic ASP.NET Core library that allows you to write UI components while maintaining full compatibility with Razor Pages and MVC. With this library you can create your own static components, which makes it synergize perfectly with AlpineJS, HTMX, and the "low-JS" approach to building web applications.
How it works
A component consists of two files: a C# code-behind class that inherits from StaticComponent, and a Razor view (.cshtml) that serves as its template. The class is automatically available as a tag helper in your Razor pages.
// ~/Pages/Components/HelloWorldComponent.cshtml.cs
using Microsoft.AspNetCore.Razor.TagHelpers;
using TechGems.StaticComponents;
namespace Sample.Views.Components;
public class HelloWorldComponent : StaticComponent
{
public HelloWorldComponent()
{
}
public string GreetMessage { get; set; }
}
@using Sample.Views.Components;
@model HelloWorldComponent
<div>Hello world! @Model.GreetMessage</div>
There are more use cases and configurations you can set with Static Components. To see more, go to our documentation.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 is compatible. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. 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 is compatible. 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 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. |
-
net10.0
- Newtonsoft.Json (>= 13.0.4)
-
net6.0
- Newtonsoft.Json (>= 13.0.4)
-
net7.0
- Newtonsoft.Json (>= 13.0.4)
-
net8.0
- Newtonsoft.Json (>= 13.0.4)
-
net9.0
- Newtonsoft.Json (>= 13.0.4)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on TechGems.StaticComponents:
| Package | Downloads |
|---|---|
|
TechGems.ViteDotNet
Vite.NET is an integration tool for MVC and Razor pages backends. |
|
|
TechGems.PinesUI
An ASP.NET Core component library built on Pines UI, using AlpineJS, TailwindCSS, and Static Components. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.4.0 | 53 | 9/9/2026 |
| 1.4.0-beta | 35 | 9/9/2026 |
| 1.3.4 | 135 | 8/4/2026 |
| 1.3.2 | 1,350 | 6/18/2026 |
| 1.3.1 | 132 | 6/18/2026 |
| 1.3.1-beta | 120 | 6/17/2026 |
| 1.3.0-beta | 103 | 5/25/2026 |
| 1.2.0 | 185 | 3/25/2026 |
| 1.2.0-beta | 117 | 3/25/2026 |
| 1.1.1 | 150 | 3/12/2026 |
| 1.1.0 | 125 | 3/9/2026 |
| 1.1.0-alpha | 122 | 2/18/2026 |
| 1.0.0 | 142 | 2/11/2026 |
- Add attribute passthrough for headless input components. Components inheriting StaticInputBase now expose an AdditionalAttributes collection holding the HTML attributes a consumer wrote that weren't bound to a C# property, which can be applied to any element in the component's template with the new static-attributes tag helper.
- class and style merge with the values authored in the template, and the new class-replace attribute lets a consumer discard the component's classes when a merge can't express the override.