SmugglerCode.Blazor.UI 1.0.12

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

SmugglerCode.Blazor.UI

A reusable Blazor UI component library.

This library provides well-structured, customizable UI components built with Blazor for modern web applications.
Currently, the library includes a Button component, with more components planned and actively being developed.


Components

Button

A flexible button component with multiple styles, interactivity options, and support for child content.

Features
  • Supports predefined button types (Primary, Alert)
  • Accepts a Label string or arbitrary child content
  • Handles click events via EventCallback
  • CSS class management based on button type
  • Hover-based coloring for visual feedback
  • IsVisible flag to show or hide the button (default: true)
  • IsDisable flag to enable or disable the button
  • Inherits disabled state from parent components via cascading parameter
Usage example
@using SmugglerCode.Blazor.UI.Components.Buttons

<Button 
    Label="Click me" 
    Type="ButtonType.Primary" 
    IsVisible="true" 
    IsDisable="false"
    OnClick="@OnButtonClicked" />

@code {
    private void OnButtonClicked()
    {
        // Your click handling logic here
    }
}

TextBox

A generic input component for text-based user input with type safety and event handling.

Features
  • Supports two-way binding via Text and TextChanged
  • Optional OnEnter callback for Enter key handling
  • IsDisabled and inherited cascading IsDisabled support
  • IsVisible flag to toggle component visibility
  • Applies disabled attribute and styles when disabled
  • Switching between dynamic or fixed sizing for the text box
Usage example
@using SmugglerCode.Blazor.UI.Components.Inputs

<TextBox Text="@value"
         TextChanged="@((int? val) => value = val)"
         OnEnter="@OnEnterPressed"
         IsDisabled="false"
         IsVisible="true" />

@code {
    private int? value;

    private void OnEnterPressed(int? val)
    {
        Console.WriteLine($"Enter pressed, value: {val}");
    }
}

Usage example dynamic sizing

@using SmugglerCode.Blazor.UI.Components.Common

<DynamicCssScope IsDynamicSize="_isDynamicSize">

        <TextBox @bind-Value="_customerName"></TextBox>
        <TextBox @bind-Value="_customerLastName"></TextBox>
        ...

</DynamicCssScope>


A fully-featured, keyboard-accessible dropdown / combobox for Blazor that supports filtering, templating and dynamic (cascading) disabled state.

Key features

  • Generic <DropDown<T>> works with any type � simple strings or full POCOs
  • Optional client-side filtering textbox (ShowFilter)
  • Property binding via PropertyName when T is a complex object
  • Custom rendering with ItemTemplate
  • Dynamic sizing and inherited disabled scope
  • Full keyboard support and screen-reader friendly ARIA roles
  • Zero-JS setup apart from a small helper script

Import only once in app.razor: <link href="/_content/SmugglerCode.Blazor.UI/smugglercode-font.css" rel="stylesheet" />

Usage


@page "/example"

<DropDown TValue="Country"
          Items="Countries"
          SelectedItem="@selected"
          SelectedItemChanged="OnCountryChanged"
          PropertyName="Name"
          ShowFilter />

@code {
    private List<Country> Countries = CountryService.All;
    private Country? selected;

    private void OnCountryChanged(Country? value) => selected = value;
}

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
1.0.12 126 9/13/2025
1.0.10 197 6/24/2025
1.0.9 185 6/24/2025
1.0.8 181 6/24/2025
1.0.7 194 6/24/2025
1.0.6 181 6/14/2025
1.0.5 263 6/13/2025
1.0.4 329 6/10/2025
1.0.3 192 6/2/2025
1.0.2 193 6/2/2025
1.0.1 185 6/1/2025
1.0.0 158 5/31/2025