Skip to content

codefroglabs/Blazor.FeatureManagement

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Blazor.FeatureManagement

Provides a component for integrating with Microsoft.FeatureManagement in Blazor applications.

Getting Started

Installation

Install the NuGet package:

dotnet add package Blazor.FeatureManagement

Configuration

Enable Feature Management in your Program.cs.

Component usage

By default, if the feature flag is disabled, the content inside the FeatureFlag component will not be rendered. You can optionally provide fallback text or a render fragment to display when the feature is disabled.

Basic usage

@page "/example"
@using Blazor.FeatureManagement

<h1>Feature Management Example</h1>
<FeatureFlag Name="MyFeature">
    <h2>My Feature is enabled!</h2>
</FeatureFlag>

Disable content with fallback text

@page "/example"
@using Blazor.FeatureManagement
<h1>Feature Management Example</h1>
<FeatureFlag Name="MyFeature" FallbackText="My Feature is disabled">
    <h2>My Feature is enabled!</h2>
</FeatureFlag>

Disable content with fallback render fragment

@page "/example"
@using Blazor.FeatureManagement
<h1>Feature Management Example</h1>
<FeatureFlag Name="MyFeature">
    <ChildContent>
        <h2>My Feature is enabled!</h2>
    </ChildContent>
    <FallbackContent>
        <h2>My Feature is disabled</h2>
    </FallbackContent>
</FeatureFlag>

About

Adds blazor components for integration with Microsoft.FeatureManagement

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages