Soenneker.Lepton.Suite
4.0.87
Prefix Reserved
dotnet add package Soenneker.Lepton.Suite --version 4.0.87
NuGet\Install-Package Soenneker.Lepton.Suite -Version 4.0.87
<PackageReference Include="Soenneker.Lepton.Suite" Version="4.0.87" />
<PackageVersion Include="Soenneker.Lepton.Suite" Version="4.0.87" />
<PackageReference Include="Soenneker.Lepton.Suite" />
paket add Soenneker.Lepton.Suite --version 4.0.87
#r "nuget: Soenneker.Lepton.Suite, 4.0.87"
#:package Soenneker.Lepton.Suite@4.0.87
#addin nuget:?package=Soenneker.Lepton.Suite&version=4.0.87
#tool nuget:?package=Soenneker.Lepton.Suite&version=4.0.87
Soenneker.Lepton.Suite
Small, composable Blazor component base classes for libraries that need clean defaults without buying into a UI framework.
Lepton gives component authors a consistent foundation for child content, element attributes, IDs, async disposal, and cancellation. It is not a component library. It is the base layer you build component libraries on.
Why Lepton
- Pick exactly the component capabilities you need.
- Keep
class,style, and unmatched attributes consistent across components. - Get disposal and cancellation patterns without rewriting them in every base class.
- Type against matching interfaces when you need capability-based APIs.
Install
dotnet add package Soenneker.Lepton.Suite
Pick A Base
| Need | Use |
|---|---|
| Plain Blazor base | LeptonComponent |
| Child content | LeptonContent |
| Element attributes | LeptonElement |
| Child content + element attributes | LeptonContentElement |
| Id + child content + element attributes | LeptonIdentifiableContentElement |
| Async disposal | LeptonDisposable |
| Disposable content | LeptonDisposableContent |
| Disposable content element | LeptonDisposableContentElement |
| Disposable identifiable content element | LeptonDisposableIdentifiableContentElement |
| Disposal-bound cancellation | LeptonCancellable |
| Cancellable content element | LeptonCancellableContentElement |
| Cancellable identifiable content element | LeptonCancellableIdentifiableContentElement |
Every public base has a matching interface in Soenneker.Lepton.Suite.Abstract.
Product Spotlight
Consistent Element Attributes
Element bases expose Class, Style, and AdditionalAttributes, then build render-ready attributes for you.
public sealed class Card : LeptonContentElement
{
protected override void BuildRenderTree(RenderTreeBuilder builder)
{
builder.OpenElement(0, "section");
builder.AddMultipleAttributes(1, BuildAttributes("data-slot", "card"));
builder.AddContent(2, ChildContent);
builder.CloseElement();
}
}
<Card Class="card" style="padding: 1rem" data-state="open">
Content
</Card>
class and style values are merged instead of clobbered.
Disposal Without Boilerplate
Disposable bases expose ThrowIfDisposed() and track disposal state.
public abstract class ModuleBackedComponent : LeptonDisposable
{
private IAsyncDisposable? _module;
public override async ValueTask DisposeAsync()
{
if (_module is not null)
await _module.DisposeAsync();
await base.DisposeAsync();
}
}
Cancellation That Follows Component Lifetime
Cancellable bases cancel their token during DisposeAsync().
public abstract class LoadingComponent : LeptonCancellable
{
protected Task Load()
{
ThrowIfDisposed();
return Task.Delay(TimeSpan.FromSeconds(1), CancellationToken);
}
}
Design
Cancellable types are an add-on over disposable shapes:
LeptonDisposableContentElement
-> LeptonCancellableContentElement
LeptonDisposableIdentifiableContentElement
-> LeptonCancellableIdentifiableContentElement
So if you choose a cancellable element, you still get the disposable element behavior underneath it.
Notes
AdditionalAttributesis the unmatched-attribute parameter for element bases.- Identifiable element bases add
idwhenIdis set. - Cancellable bases expose a protected
CancellationToken. - Base classes are abstract and intended for component-library authors.
| Product | Versions 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. |
-
net10.0
- Microsoft.AspNetCore.Components (>= 10.0.12)
- Soenneker.Atomics.Resources (>= 4.0.44)
- Soenneker.Atomics.ValueBools (>= 4.0.44)
- Soenneker.Extensions.String (>= 4.0.762)
NuGet packages (21)
Showing the top 5 NuGet packages that depend on Soenneker.Lepton.Suite:
| Package | Downloads |
|---|---|
|
Soenneker.Blazor.TomSelect
A Blazor interop library for the select user control library, Tom Select |
|
|
Soenneker.Blazor.FilePond
A Blazor interop library for the file upload library FilePond |
|
|
Soenneker.Blazor.Masonry
A lightweight, responsive Blazor component for Masonry (the cascading grid layout library) — perfect for image grids, cards, and dynamic content. |
|
|
Soenneker.Blazor.Turnstile
Renders a Cloudflare Turnstile widget in Blazor and exposes its token and lifecycle events. |
|
|
Soenneker.Blazor.DataTables
A Blazor interop library for DataTables |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 4.0.87 | 0 | 9/16/2026 |
| 4.0.86 | 27 | 9/16/2026 |
| 4.0.85 | 63 | 9/16/2026 |
| 4.0.84 | 277 | 9/15/2026 |
| 4.0.83 | 2,596 | 9/13/2026 |
| 4.0.82 | 658 | 9/13/2026 |
| 4.0.81 | 672 | 9/13/2026 |
| 4.0.80 | 1,448 | 9/12/2026 |
| 4.0.79 | 407 | 9/12/2026 |
| 4.0.78 | 1,339 | 9/12/2026 |
| 4.0.76 | 2,948 | 9/9/2026 |
| 4.0.75 | 1,096 | 9/8/2026 |
| 4.0.74 | 1,405 | 9/8/2026 |
| 4.0.73 | 1,946 | 9/8/2026 |
| 4.0.72 | 1,586 | 9/7/2026 |
| 4.0.71 | 1,225 | 9/7/2026 |
| 4.0.70 | 453 | 9/7/2026 |
| 4.0.69 | 996 | 9/7/2026 |
| 4.0.68 | 1,978 | 9/5/2026 |
| 4.0.67 | 2,069 | 9/4/2026 |