Tenekon.Extensions.Blazor.Prelude 1.0.1-alpha

Prefix Reserved
This is a prerelease version of Tenekon.Extensions.Blazor.Prelude.
dotnet add package Tenekon.Extensions.Blazor.Prelude --version 1.0.1-alpha
                    
NuGet\Install-Package Tenekon.Extensions.Blazor.Prelude -Version 1.0.1-alpha
                    
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="Tenekon.Extensions.Blazor.Prelude" Version="1.0.1-alpha" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Tenekon.Extensions.Blazor.Prelude" Version="1.0.1-alpha" />
                    
Directory.Packages.props
<PackageReference Include="Tenekon.Extensions.Blazor.Prelude" />
                    
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 Tenekon.Extensions.Blazor.Prelude --version 1.0.1-alpha
                    
#r "nuget: Tenekon.Extensions.Blazor.Prelude, 1.0.1-alpha"
                    
#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 Tenekon.Extensions.Blazor.Prelude@1.0.1-alpha
                    
#: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=Tenekon.Extensions.Blazor.Prelude&version=1.0.1-alpha&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Tenekon.Extensions.Blazor.Prelude&version=1.0.1-alpha&prerelease
                    
Install as a Cake Tool

Tenekon.Extensions.Blazor.Prelude

GitHub .NET Blazor

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:

  1. child components contribute setup information
  2. Prelude waits until that setup is finished
  3. 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:

  • ProfileMenu owns 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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • 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.