NTComponents.Extensions
2.0.0-preview.2
See the version list below for details.
dotnet add package NTComponents.Extensions --version 2.0.0-preview.2
NuGet\Install-Package NTComponents.Extensions -Version 2.0.0-preview.2
<PackageReference Include="NTComponents.Extensions" Version="2.0.0-preview.2" />
<PackageVersion Include="NTComponents.Extensions" Version="2.0.0-preview.2" />
<PackageReference Include="NTComponents.Extensions" />
paket add NTComponents.Extensions --version 2.0.0-preview.2
#r "nuget: NTComponents.Extensions, 2.0.0-preview.2"
#:package NTComponents.Extensions@2.0.0-preview.2
#addin nuget:?package=NTComponents.Extensions&version=2.0.0-preview.2&prerelease
#tool nuget:?package=NTComponents.Extensions&version=2.0.0-preview.2&prerelease
NTComponents
NTComponents is a Blazor WebAssembly project that provides a set of reusable UI components for building modern web applications based on Google's Material 3 spec. The components are designed to be highly customizable and easy to use.
Features
- Form Components: Includes various form components like
TnTInputFilewith advanced features. - Toast Notifications: Provides a service for displaying toast notifications with different styles and messages.
- Theming: Supports theming with customizable color schemes and styles.
- Grid: A data grid component modified from FluentDataGrid.
- Scheduler: A scheduler component with week view and event management.
Toast Notifications
Place one NTToast near the route or layout level. The component is static-rendering friendly and loads the JavaScript bridge used by both browser JavaScript and INTToastService.
<NTToast />
Use INTToastService from interactive Blazor code:
@inject INTToastService ToastService
<button @onclick="SaveAsync">Save</button>
@code {
private async Task SaveAsync() {
await ToastService.ShowSuccessAsync("Saved", "Your changes were saved.");
}
}
For static SSR markup or native HTML handlers, call the JavaScript bridge directly and guard the call in case the module has not loaded yet:
<button onclick="window.NTToast?.queueToast({ title: 'Saved', message: 'Your changes were saved.', variant: 'success' })">
Save
</button>
JavaScript options are title, message, variant, timeout, showClose, icon, backgroundColor, textColor, and iconColor. Variants are default, success, info, warning, error, and assert.
Best practices:
- Use
NTToastwithINTToastService; legacyTnTToastusesITnTToastServiceand is a separate host/service pair. - Prefer semantic helpers such as
ShowSuccessAsync,ShowInfoAsync,ShowWarningAsync,ShowErrorAsync, andShowAssertAsync. - Keep toast copy short and status-focused.
- Let the default four-second timeout handle normal messages. Use
timeout: 0only when explicit dismissal is required. - Use
errororassertonly for high-priority messages because they use assertive accessibility announcements.
Getting Started
Prerequisites
- .NET 9 or .NET 10 SDK
Install
Install from NuGet (package id: NTComponents):
dotnet add package NTComponents
Or add the package reference in your project file.
Building the Project
- Restore the NuGet packages:
dotnet restore
- Build the solution:
dotnet build
Usage
In your Program.cs file add the following to register any library services (see LiveTest for examples):
// builder is the WebAssemblyHostBuilder or WebApplicationBuilder
builder.Services.AddNTComponents();
Then use components in your pages (see LiveTest samples for exact component names and parameters):
@page "/"
<h3>Example</h3>
<TnTButton OnClick="() => Console.WriteLine("Clicked")">Click me</TnTButton>
Theming
Themes can be generated using Google's Material 3 designer. Export your theme as a json file and drop it in the wwwroot folder. Inside your App.razor file, add the following code:
<NTComponents.TnTThemeDesign ThemeFile="your-theme.json" />
Dark, light, and system themes can be applied by setting the Theme property of the TnTThemeDesign component.
Contributing
Contributions are welcome!
License
This project is licensed under the MIT License. See the LICENSE file for more details.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | 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
- NTComponents (>= 2.0.0-preview.2)
-
net9.0
- NTComponents (>= 2.0.0-preview.2)
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 |
|---|---|---|
| 2.0.0-preview.14 | 119 | 6/12/2026 |
| 2.0.0-preview.13 | 37 | 6/12/2026 |
| 2.0.0-preview.12 | 42 | 6/11/2026 |
| 2.0.0-preview.11 | 41 | 6/11/2026 |
| 2.0.0-preview.10 | 38 | 6/11/2026 |
| 2.0.0-preview.9 | 35 | 6/11/2026 |
| 2.0.0-preview.8 | 42 | 6/10/2026 |
| 2.0.0-preview.7 | 34 | 6/10/2026 |
| 2.0.0-preview.6 | 40 | 6/10/2026 |
| 2.0.0-preview.5 | 37 | 6/10/2026 |
| 2.0.0-preview.4 | 37 | 6/9/2026 |
| 2.0.0-preview.3 | 42 | 6/9/2026 |
| 2.0.0-preview.2 | 39 | 6/9/2026 |
| 2.0.0-preview.1 | 46 | 6/5/2026 |
| 1.48.0 | 211 | 4/15/2026 |
| 1.47.0 | 483 | 4/15/2026 |
| 1.46.0 | 110 | 4/6/2026 |
| 1.45.1 | 867 | 4/2/2026 |
| 1.45.0 | 106 | 4/1/2026 |
| 1.44.5 | 210 | 4/1/2026 |