OptionA.Blazor.Components 9.3.3

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

OptionA.Blazor.Components

Blazor components for use in your Blazor website

For full documentation, releasenotes and examples, go to option-a.tech. To full source can be viewed on github.

Getting started

To start using the OptionA.Blazor.Components include the required depencenies in your service provider. The package uses the default .Net Dependency Injection.

Service collection

To add the components you can use the extension method of each component, for example AddOptionAMenu or AddOptionABootstrapMenu. The bootstrap version prefills the optional configuration with bootstrap (5.3) classes. Everything in the config can be overwritten (if a config is supplied to the method this is applied after the default classes). Alternatively to add all the components in the package use the AddOptionAComponents or AddOptionABootstrapComponents extension methods.

Latest release notes

9.2.0

Overall

Added Tabs component

New features
  • Added Tabs component to create a tabbed interface
Solved Bugs
  • None

Components

Following are the currently supported components. For all components there is a Parameter AdditionalClasses to provide specific classes for that single component. RemovedClasses to remove default classes (set by the config) for that single component, and an Attributes parameter to set additional required attributes to that single component.

Buttons

<OptAButton>
<OptAButtonBar>

Buttons for in you application. Supports a name and or an icon as content, the button bar can be used to create a horizontal or vertical bar with buttons at three position, start, center, end (depending on orientation).

<OptACarousel>
<OptACarouselSlide>

A Carousel for displaying images and content in a slideshow manner. The time between slides and whether or not autoplay is on can be set.

<OptAGallery>
<OptAGalleryImage>

A gallery for displaying thumbnails of images and enlarging them when selected, either in a side panel or in a modal

<OptAmenu>
<OptAMenuDivider>
<OptAMenuGroup>
<OptAMenuItem>

A menu for creating site navigation, both horizontal and vertical. the group can hold multiple items and opend either on click or on mouseover.

<OptAModal>

A modal using the html5 <dialog> tag. Optionally draggable to be able to move it around.

Responsive

<OptAResponsive>
IResponsiveService

A component with no markup of it's own, but provides cascading parameters for the set breakpoints in the options. Optionally you can also inject the IResponsiveService in you components to provide the same information.

Usage:

<OptAResponsive>
	<SomeComponent /> @*Or other content*@
</OptAResponsive>

in SomeComponent:

<div>
    <div>@DimensionName</div>
    <div>@Dimension?.Name</div>
    <div>@Dimension?.Width</div>
    <div>@Dimension?.Height</div>
    @if (ValidDimensions != null)
    {
        @foreach(var dimension in ValidDimensions)
        {
            <div>@dimension</div>
        }
    }
    @if (BreakPoints != null)
    {
        @foreach(var breakPoint in BreakPoints)
        {
            <div>@breakPoint.Name @breakPoint.Width</div>
        }
    }
</div>

@code
{
    [CascadingParameter(Name = OptAResponsive.DimensionParameterName)]
    public NamedDimension? Dimension { get; set; }
    [CascadingParameter(Name = OptAResponsive.DimensionNameParameterName)]
    public string? DimensionName { get; set; }
    [CascadingParameter(Name = OptAResponsive.ValidDimensionsParameterName)]
    public IEnumerable<string>? ValidDimensions { get; set; }
    [CascadingParameter(Name = OptAResponsive.AllDimensionBreakPointsParameterName)]
    public IEnumerable<(string Name, int Width)>? BreakPoints { get; set; }
}

Splitter

<OptASplitter>

A splitter component, creating a draggable bar in the center of two elements to change the relative size of the two.

Usage:

<OptASplitter Orientation="Orientation.Horizontal">
    <First>
        @*first part here*@
    </First>
    <Second>
        @*second part here*@
    </Second>
</OptASplitter>

Message box

<OptAMessageBox>

A Message box component, place on the top level of the site to display messages (toasts).

Usage:

<OptAMessageBox />

Inject message sending components with the IMessageService service and call the AddMessage method to add messages with supplied MessageItem classes.

Tabs

<OptATabs />

A tab component, to display multiple tabs with content. The content can be set with the OptATab component.

Usage:

<OptATabs>
    <OptATab Title="Tab 1">
        @*Content for tab 1*@
    </OptATab>
    <OptATab Title="Tab 2">
        @*Content for tab 2*@
    </OptATab>
</OptATabs>
Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  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.

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
9.3.3 191 3/13/2025
9.3.2 159 3/13/2025
9.3.1 164 3/13/2025
9.3.0 165 3/12/2025
9.2.2 198 3/9/2025
9.2.1 135 2/23/2025
9.2.0 112 1/27/2025
9.1.3 109 1/23/2025
9.1.1 114 1/22/2025
9.1.0 133 12/4/2024
9.0.1 117 11/27/2024
9.0.0 116 11/27/2024
8.2.0 124 12/4/2024
8.1.6 116 11/27/2024
8.1.5 126 10/21/2024
8.1.4 169 2/11/2024
8.1.3 148 2/11/2024
8.1.2 156 2/10/2024
8.1.1 148 2/9/2024
8.1.0 145 2/7/2024
8.0.0 217 11/23/2023
7.5.3 152 2/11/2024
7.5.2 144 2/10/2024
7.5.1 142 2/9/2024
7.5.0 150 2/8/2024
7.4.1 161 11/5/2023
7.4.0 146 10/31/2023
7.3.2 146 10/26/2023
7.3.1 144 10/20/2023
7.3.0 163 10/14/2023
7.2.16 344 6/26/2023
7.2.15 193 6/26/2023
7.2.14 243 6/26/2023
7.2.13 219 6/26/2023
7.2.12 194 6/26/2023
7.2.11 199 6/22/2023
7.2.10 222 6/22/2023
7.2.9 269 6/12/2023
7.2.8 218 6/12/2023
7.2.7 213 6/12/2023
7.2.6 215 6/12/2023
7.2.5 225 6/12/2023
7.2.4 201 6/10/2023
7.2.3 201 6/10/2023
7.2.2 209 6/10/2023
7.2.1 208 6/10/2023
7.2.0 215 6/9/2023
7.1.3 204 6/8/2023
7.1.2 207 6/8/2023
7.1.1 213 6/8/2023
7.0.6 233 6/6/2023
7.0.5 208 6/6/2023
7.0.4 220 5/26/2023
7.0.2 215 5/26/2023
7.0.1 197 5/25/2023
7.0.0 262 4/6/2023

Made input integer nullable