CheckBoxList.Core.BS5 2.0.0

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

CheckBoxList.Core.BS5

Creates a multiselection check box list based on the provided item source. Bootstrap 5 compatible.

Note: This project is based on the original CheckBoxList.Core by Ganesh Narayan Jangir. This fork adds Bootstrap 5 support and targets .NET 10.


What's New in This Fork

Bootstrap 5 Support

  • ✅ New Bootstrap5Basic template using Bootstrap 5 form-check structure
  • ✅ New Bootstrap5Inline template using form-check-inline for horizontal layouts
  • ✅ Proper checkbox/label association with id and for attributes
  • ✅ Native Bootstrap 5 styling (no custom CSS required)

.NET 10 Upgrade

  • ✅ Library upgraded from .NET Standard 2.0 to .NET 10
  • ✅ Sample project uses minimal hosting model
  • ✅ Implicit usings and nullable reference types enabled

Package Renamed

  • Package renamed from CheckBoxList.Core to CheckBoxList.Core.BS5
  • Namespace changed from CheckBoxList.Core.* to CheckBoxList.Core.BS5.*

Installation

Package Manager Console

Install-Package CheckBoxList.Core.BS5

.NET CLI

dotnet add package CheckBoxList.Core.BS5

Quick Start

1. Add Tag Helper

In _ViewImports.cshtml:

@addTagHelper *, CheckBoxList.Core.BS5

2. Controller

using CheckBoxList.Core.BS5.Models;

public IActionResult Index()
{
    List<CheckBoxItem> checkBoxItems = new List<CheckBoxItem>()
    {
        new CheckBoxItem(1, "Option 1"),
        new CheckBoxItem(2, "Option 2", isChecked: true),
        new CheckBoxItem(3, "Option 3", isDisabled: true),
        new CheckBoxItem(4, "Option 4", isChecked: true, isDisabled: true)
    };

    return View(checkBoxItems);
}

public IActionResult Result(List<int> selectedIds)
{
    return View(selectedIds);
}

3. View

@model List<CheckBoxList.Core.BS5.Models.CheckBoxItem>

<form asp-action="Result" method="post">
    <check-box-list name="selectedIds" items="Model" template="Bootstrap5Basic"></check-box-list>
    <button type="submit" class="btn btn-primary">Submit</button>
</form>

Available Templates

Template Description Output
Basic Plain HTML checkboxes <label><input>...</label><br>
Bootstrap3Basic Bootstrap 3 stacked <div class="checkbox">...
Bootstrap3Inline Bootstrap 3 inline <label class="checkbox-inline">...
Bootstrap5Basic Bootstrap 5 form-check (recommended) <div class="form-check">...
Bootstrap5Inline Bootstrap 5 inline <div class="form-check form-check-inline">...

Bootstrap 5 Output Example

<div class="form-check">
    <input class="form-check-input" type="checkbox" name="selectedIds" value="1" id="selectedIds_0">
    <label class="form-check-label" for="selectedIds_0">Option 1</label>
</div>

Documentation


Requirements

  • .NET 10 or later
  • Bootstrap 5.x (for Bootstrap 5 templates)

Credits


License

MIT

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
2.0.0 223 12/7/2025