Tenekon.Extensions.Blazor.Prelude
1.0.1-alpha
Prefix Reserved
dotnet add package Tenekon.Extensions.Blazor.Prelude --version 1.0.1-alpha
NuGet\Install-Package Tenekon.Extensions.Blazor.Prelude -Version 1.0.1-alpha
<PackageReference Include="Tenekon.Extensions.Blazor.Prelude" Version="1.0.1-alpha" />
<PackageVersion Include="Tenekon.Extensions.Blazor.Prelude" Version="1.0.1-alpha" />
<PackageReference Include="Tenekon.Extensions.Blazor.Prelude" />
paket add Tenekon.Extensions.Blazor.Prelude --version 1.0.1-alpha
#r "nuget: Tenekon.Extensions.Blazor.Prelude, 1.0.1-alpha"
#:package Tenekon.Extensions.Blazor.Prelude@1.0.1-alpha
#addin nuget:?package=Tenekon.Extensions.Blazor.Prelude&version=1.0.1-alpha&prerelease
#tool nuget:?package=Tenekon.Extensions.Blazor.Prelude&version=1.0.1-alpha&prerelease
Tenekon.Extensions.Blazor.Prelude
Prelude helps a parent component wait for child components before rendering a section's final UI.
Use it when the parent owns the final markup, but child components contribute links, wrappers, attributes, or delayed state needed to build that markup.
What Problem It Solves
Sometimes the parent component is responsible for the visible section, but it cannot render that section correctly until child components have finished contributing setup information.
Prelude gives that pattern a direct shape:
- child components contribute setup information
- Prelude waits until that setup is finished
- the parent renders the final section from the completed result
This is useful for menus assembled from contributed actions, panels with contributed wrappers, reusable headers, and small delayed status surfaces.
If normal parameters and ordinary child content are already enough, you do not need Prelude.
Installation
dotnet add package Tenekon.Extensions.Blazor.Prelude
@using Tenekon.Extensions.Blazor.Prelude
Quick Example
In this simplified example, ProfileMenu owns the menu markup. ProfileHeader contributes the links.
ProfileMenu.razor
@using Microsoft.AspNetCore.Components
@using Tenekon.Extensions.Blazor.Prelude
<PreludeSection Value="_menu"
Prelude="MenuLinks">
<nav class="profile-menu" aria-label="Profile menu">
@foreach (var item in _menu.Items) {
<a href="@item.Href">@item.Label</a>
}
</nav>
</PreludeSection>
@code {
private readonly MenuLinkCollection _menu = new();
[Parameter]
public RenderFragment? MenuLinks { get; set; }
}
ProfileHeader.razor
@using Microsoft.AspNetCore.Components.Rendering
<ProfileMenu MenuLinks="ContributeMenuLinks" />
@code {
private void ContributeMenuLinks(RenderTreeBuilder __builder)
{
<MenuLinkContributor Label="Edit profile" Href="/profile/edit" />
<MenuLinkContributor Label="Security" Href="/profile/security" />
}
}
The important part is the split:
ProfileMenuowns the shared state and the final markup- child components contribute to that state during the prelude
- the menu renders only after that state is ready
The omitted MenuLinkCollection and MenuLinkContributor are just the small support types around that pattern. The full runnable version is in Recipe 1.
When Prelude Fits
Prelude coordinates one section inside normal Blazor rendering.
Use it when:
- a parent owns the final markup for a section
- child components provide part of the information needed for that markup
- the section should wait until that setup work is finished
Do not use it when:
- normal parameters and child content are already enough
- the problem is global application state or page-wide orchestration
- the delayed work is hidden inside unrelated third-party components
Which Type Should I Use?
| Type | Use it when |
|---|---|
PreludeSection<TValue> |
A parent should wait for shared section state before rendering the final content. |
DeferredPreludeBase |
A prelude component needs to add more prelude work in a later pass. |
CooperativePreludeBase |
A prelude component has delayed or asynchronous work, and the section must keep waiting for it. |
ContentDelay |
You need to tell Prelude when that delayed work is really finished. |
Most consumers start with PreludeSection<TValue>.
Cookbook
Use the cookbook for full runnable examples and broader patterns:
- Recipe 1: collect local menu items before rendering
- Recipe 2: let contributors wrap section-owned content
- Recipe 3: prepare nested reusable parts together
- Recipe 5: add more prelude work in a later pass
- Recipe 6: wait for delayed or asynchronous work
Compatibility
- Target framework:
net10.0 - Runtime dependency:
Microsoft.AspNetCore.App - Additional runtime package dependencies: none
Development
git clone https://github.com/tenekon/Tenekon.Extensions.Blazor.Prelude.git
cd Tenekon.Extensions.Blazor.Prelude
dotnet test Tenekon.Extensions.Blazor.Prelude.slnx
| 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
- No dependencies.
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 |
|---|---|---|
| 1.0.1-alpha | 93 | 4/6/2026 |
See the README and cookbook for usage patterns, supported scenarios, and full examples.