D20Tek.BlazorComponents.ToggleSwitch 1.11.4

dotnet add package D20Tek.BlazorComponents.ToggleSwitch --version 1.11.4
                    
NuGet\Install-Package D20Tek.BlazorComponents.ToggleSwitch -Version 1.11.4
                    
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="D20Tek.BlazorComponents.ToggleSwitch" Version="1.11.4" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="D20Tek.BlazorComponents.ToggleSwitch" Version="1.11.4" />
                    
Directory.Packages.props
<PackageReference Include="D20Tek.BlazorComponents.ToggleSwitch" />
                    
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 D20Tek.BlazorComponents.ToggleSwitch --version 1.11.4
                    
#r "nuget: D20Tek.BlazorComponents.ToggleSwitch, 1.11.4"
                    
#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 D20Tek.BlazorComponents.ToggleSwitch@1.11.4
                    
#: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=D20Tek.BlazorComponents.ToggleSwitch&version=1.11.4
                    
Install as a Cake Addin
#tool nuget:?package=D20Tek.BlazorComponents.ToggleSwitch&version=1.11.4
                    
Install as a Cake Tool

CI/CD Build Release NuGet License

d20Tek Blazor-Components

Introduction

This package suite provides custom, reusable Blazor components. These components are easy to use right out of the box, so developers can focus on building their applications. To keep the libraries small and independent, we have a project and NuGet package for each component, so that developers can just include what they need (and a huge component library).

Live demo: components.d20tek.com

Supported components: Spinner, ContentSpinner, Timer, SpanTimer, CountdownTimer, ToggleSwitch, ModalDialog, ModalFormDialog, MessageBox, MarkdownView, TogglePanel, ResultValidator, ResultAlert, ResultView, Toast, and ResultToast.

Components ship grouped by package, so a single package can contain more than one component:

NuGet package Components
D20Tek.BlazorComponents.Spinner Spinner, ContentSpinner
D20Tek.BlazorComponents.Timer Timer, SpanTimer, CountdownTimer
D20Tek.BlazorComponents.Toast Toast (ToastProvider)
D20Tek.BlazorComponents.ToggleSwitch ToggleSwitch
D20Tek.BlazorComponents.Modal ModalDialog, ModalFormDialog, MessageBox
D20Tek.BlazorComponents.Markdown MarkdownView
D20Tek.BlazorComponents.TogglePanel TogglePanel
D20Tek.BlazorComponents.Functionally ResultValidator, ResultAlert, ResultView, ResultToast

The "All" meta-package

If you would rather not reference each component package individually, install the D20Tek.BlazorComponents.All meta-package. It is a convenience bundle that transitively references the full component suite (Functionally, Markdown, Modal, Spinner, Timer, Toast, TogglePanel, and ToggleSwitch) through a single PackageReference. It ships no assemblies of its own, so you get exactly the same components as installing them one-by-one. If you only need a few components, install the individual p

Note: because the meta-package includes the Modal and Toast components, apps that use All still need to link their static CSS files - see Component-Specific Setup below.

Installation

These libraries are in NuGet packages so they are easy to add to your project. To install these packages into your solution, you can use the Package Manager. In PM, please use the following commands:

Tip: omit the -Version argument to install the latest published version of any package.

PM > Install-Package D20Tek.BlazorComponents.Spinner -Version 1.11.4
PM > Install-Package D20Tek.BlazorComponents.Timer -Version 1.11.4
PM > Install-Package D20Tek.BlazorComponents.Toast -Version 1.11.4
PM > Install-Package D20Tek.BlazorComponents.ToggleSwitch -Version 1.11.4
PM > Install-Package D20Tek.BlazorComponents.Modal -Version 1.11.4
PM > Install-Package D20Tek.BlazorComponents.Markdown -Version 1.11.4
PM > Install-Package D20Tek.BlazorComponents.TogglePanel -Version 1.11.4
PM > Install-Package D20Tek.BlazorComponents.Functionally -Version 1.11.4

Or install everything at once with the meta-package:

PM > Install-Package D20Tek.BlazorComponents.All -Version 1.11.4

To install in the Visual Studio UI, go to the Tools menu > "Manage NuGet Packages". Then search for D20Tek.BlazorComponents.Spinner and install it from there.

Read more about this release in our Release Notes.

Usage

Once you've installed the component NuGet package, you can start using it in your Blazor project. For this example we will use the Spinner component, but other components will follow the same usage pattern.

  1. You must add our namespace to your Blazor project's _Imports.razor file to make our types available to all of your pages/components.
@using D20Tek.BlazorComponents
  1. Place the component in your razor file (for example in your Index.Razor file):
<Spinner />
  1. Many components have additional parameters that you can call (see the component documentation for list of available parameters).
<Spinner Type=SpinType.Pulse Label="Loading..." />
  1. Further customization is available by defining your own CSS or styles on the component.
<Spinner Type=SpinType.Hourglass class="my-custom-spinner" style="color: red; height: 120px; width: 120px" />
  1. The ContentSpinner component allows you to spin any child content, like an image.
<ContentSpinner Size=Size.Medium>
    <img src="./images/my-image.png" style="width: 100%; height: 100%" />
</ContentSpinner>

Component-Specific Setup

Some components require a one-time setup step in addition to the standard usage above.

ModalDialog / ModalFormDialog / MessageBox - These components use a static CSS file that must be linked in your app's wwwroot/index.html (Blazor WASM) or App.razor / _Host.cshtml (Blazor Server) inside the <head> tag:

<link href="_content/D20Tek.BlazorComponents.Modal/Modal.css" rel="stylesheet" />

Toast / ResultToast - The Toast package uses a static CSS file that must be linked inside the <head> tag, and the <ToastProvider /> component must be placed once in your layout (e.g. MainLayout.razor). Register the service with builder.Services.AddToast();:

<link href="_content/D20Tek.BlazorComponents.Toast/Toast.css" rel="stylesheet" />

You can optionally configure app-wide default presentation settings that apply to every toast (both generic Show and ResultToast.ShowResult):

builder.Services.AddToast(options =>
{
    options.Position = ToastPosition.TopRight;
    options.DefaultTimeout = TimeSpan.FromSeconds(4);
    options.ShowIcon = true;
    options.Dismissible = true;
    options.Animate = true;
});

These defaults cover presentation chrome only (Position, DefaultTimeout, ShowIcon, Dismissible, Animate). Values resolve in the order: component built-in defaults → app defaults (AddToast) → per-call configure on Show/ShowResult, so any individual call can still override the app defaults. Note that DefaultTimeout seeds the timeout for generic toasts and for ResultToast success toasts; ResultToast failure toasts remain sticky by default.

Note: ResultToast (in the D20Tek.BlazorComponents.Functionally package) is built on top of Toast. When you install Functionally, the D20Tek.BlazorComponents.Toast package comes with it transitively, so no extra package reference is needed - but you still need the setup above: link Toast.css, add <ToastProvider /> to your layout, and call builder.Services.AddToast();.

Samples:

For more detailed examples on how to use the D20Tek.BlazorComponents libraries, please review the following samples:

Feedback

If you use these libraries and have any feedback, bugs, or suggestions, please file them in the Issues section of this repository.

License

This project is licensed under the MIT License.

Product 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. 
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 D20Tek.BlazorComponents.ToggleSwitch:

Package Downloads
D20Tek.BlazorComponents.All

A convenience meta-package that bundles all of the D20Tek Blazor component packages (Functionally, Markdown, Modal, Spinner, Timer, Toast, TogglePanel, ToggleSwitch). Install this to get the full component suite in one reference. If you only need a few components, install the individual packages instead.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.11.4 0 9/14/2026
1.11.3 0 9/14/2026
1.11.2 111 9/7/2026
1.11.1 108 8/28/2026
1.10.18 98 8/27/2026
1.10.17 103 8/27/2026
1.10.16 127 6/11/2026
1.10.15 149 4/28/2026
1.10.14 139 3/28/2026
1.10.13 131 3/23/2026
1.10.12 122 3/23/2026
1.10.11 130 3/22/2026
1.10.10 180 3/13/2026
1.10.9 185 3/10/2026
1.10.8 140 3/8/2026
1.10.7 137 3/8/2026
1.10.6 136 3/4/2026
1.10.5 135 3/1/2026
1.10.4 136 3/1/2026
1.10.2 145 2/13/2026
Loading failed