{"id":49813891,"url":"https://github.com/soenneker/soenneker.lepton.suite","last_synced_at":"2026-06-10T00:00:59.352Z","repository":{"id":354763515,"uuid":"1225090132","full_name":"soenneker/soenneker.lepton.suite","owner":"soenneker","description":"A foundational component system for Blazor.","archived":false,"fork":false,"pushed_at":"2026-06-08T21:08:20.000Z","size":99,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-06-08T22:23:32.216Z","etag":null,"topics":["base","basecomponent","blazor","blazorlibrary","component","componentbase","csharp","dotnet","element","elements","lepton","leptoncomponent","suite","ui"],"latest_commit_sha":null,"homepage":"https://soenneker.com","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/soenneker.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":".github/SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":"soenneker","thanks_dev":"soenneker"}},"created_at":"2026-04-30T00:01:19.000Z","updated_at":"2026-06-08T20:45:47.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/soenneker/soenneker.lepton.suite","commit_stats":null,"previous_names":["soenneker/soenneker.lepton.suite"],"tags_count":19,"template":false,"template_full_name":null,"purl":"pkg:github/soenneker/soenneker.lepton.suite","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soenneker%2Fsoenneker.lepton.suite","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soenneker%2Fsoenneker.lepton.suite/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soenneker%2Fsoenneker.lepton.suite/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soenneker%2Fsoenneker.lepton.suite/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/soenneker","download_url":"https://codeload.github.com/soenneker/soenneker.lepton.suite/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soenneker%2Fsoenneker.lepton.suite/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34130642,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-09T02:00:06.510Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["base","basecomponent","blazor","blazorlibrary","component","componentbase","csharp","dotnet","element","elements","lepton","leptoncomponent","suite","ui"],"created_at":"2026-05-13T03:10:19.966Z","updated_at":"2026-06-10T00:00:57.227Z","avatar_url":"https://github.com/soenneker.png","language":"C#","funding_links":["https://github.com/sponsors/soenneker","https://thanks.dev/soenneker"],"categories":[],"sub_categories":[],"readme":"[![](https://img.shields.io/nuget/v/soenneker.lepton.suite.svg?style=for-the-badge)](https://www.nuget.org/packages/soenneker.lepton.suite/)\n[![](https://img.shields.io/github/actions/workflow/status/soenneker/soenneker.lepton.suite/publish-package.yml?style=for-the-badge)](https://github.com/soenneker/soenneker.lepton.suite/actions/workflows/publish-package.yml)\n[![](https://img.shields.io/nuget/dt/soenneker.lepton.suite.svg?style=for-the-badge)](https://www.nuget.org/packages/soenneker.lepton.suite/)\n[![](https://img.shields.io/badge/Demo-Live-blueviolet?style=for-the-badge\u0026logo=github)](https://soenneker.github.io/soenneker.lepton.suite)\n\n# ![](https://user-images.githubusercontent.com/4441470/224455560-91ed3ee7-f510-4041-a8d2-3fc093025112.png) Soenneker.Lepton.Suite\n\nSmall, composable Blazor component base classes for libraries that need clean defaults without buying into a UI framework.\n\nLepton 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.\n\n## Why Lepton\n\n- Pick exactly the component capabilities you need.\n- Keep `class`, `style`, and unmatched attributes consistent across components.\n- Get disposal and cancellation patterns without rewriting them in every base class.\n- Type against matching interfaces when you need capability-based APIs.\n\n## Install\n\n```bash\ndotnet add package Soenneker.Lepton.Suite\n```\n\n## Pick A Base\n\n| Need | Use |\n| --- | --- |\n| Plain Blazor base | `LeptonComponent` |\n| Child content | `LeptonContent` |\n| Element attributes | `LeptonElement` |\n| Child content + element attributes | `LeptonContentElement` |\n| Id + child content + element attributes | `LeptonIdentifiableContentElement` |\n| Async disposal | `LeptonDisposable` |\n| Disposable content | `LeptonDisposableContent` |\n| Disposable content element | `LeptonDisposableContentElement` |\n| Disposable identifiable content element | `LeptonDisposableIdentifiableContentElement` |\n| Disposal-bound cancellation | `LeptonCancellable` |\n| Cancellable content element | `LeptonCancellableContentElement` |\n| Cancellable identifiable content element | `LeptonCancellableIdentifiableContentElement` |\n\nEvery public base has a matching interface in `Soenneker.Lepton.Suite.Abstract`.\n\n## Product Spotlight\n\n### Consistent Element Attributes\n\nElement bases expose `Class`, `Style`, and `AdditionalAttributes`, then build render-ready attributes for you.\n\n```csharp\npublic sealed class Card : LeptonContentElement\n{\n    protected override void BuildRenderTree(RenderTreeBuilder builder)\n    {\n        builder.OpenElement(0, \"section\");\n        builder.AddMultipleAttributes(1, BuildAttributes(\"data-slot\", \"card\"));\n        builder.AddContent(2, ChildContent);\n        builder.CloseElement();\n    }\n}\n```\n\n```razor\n\u003cCard Class=\"card\" style=\"padding: 1rem\" data-state=\"open\"\u003e\n    Content\n\u003c/Card\u003e\n```\n\n`class` and `style` values are merged instead of clobbered.\n\n### Disposal Without Boilerplate\n\nDisposable bases expose `ThrowIfDisposed()` and track disposal state.\n\n```csharp\npublic abstract class ModuleBackedComponent : LeptonDisposable\n{\n    private IAsyncDisposable? _module;\n\n    public override async ValueTask DisposeAsync()\n    {\n        if (_module is not null)\n            await _module.DisposeAsync();\n\n        await base.DisposeAsync();\n    }\n}\n```\n\n### Cancellation That Follows Component Lifetime\n\nCancellable bases cancel their token during `DisposeAsync()`.\n\n```csharp\npublic abstract class LoadingComponent : LeptonCancellable\n{\n    protected Task Load()\n    {\n        ThrowIfDisposed();\n\n        return Task.Delay(TimeSpan.FromSeconds(1), CancellationToken);\n    }\n}\n```\n\n## Design\n\nCancellable types are an add-on over disposable shapes:\n\n```text\nLeptonDisposableContentElement\n  -\u003e LeptonCancellableContentElement\n\nLeptonDisposableIdentifiableContentElement\n  -\u003e LeptonCancellableIdentifiableContentElement\n```\n\nSo if you choose a cancellable element, you still get the disposable element behavior underneath it.\n\n## Notes\n\n- `AdditionalAttributes` is the unmatched-attribute parameter for element bases.\n- Identifiable element bases add `id` when `Id` is set.\n- Cancellable bases expose a protected `CancellationToken`.\n- Base classes are abstract and intended for component-library authors.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoenneker%2Fsoenneker.lepton.suite","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsoenneker%2Fsoenneker.lepton.suite","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoenneker%2Fsoenneker.lepton.suite/lists"}