DevKit.Shared.RazorComponent 2026.3.19

There is a newer version of this package available.
See the version list below for details.
dotnet add package DevKit.Shared.RazorComponent --version 2026.3.19
                    
NuGet\Install-Package DevKit.Shared.RazorComponent -Version 2026.3.19
                    
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="DevKit.Shared.RazorComponent" Version="2026.3.19" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="DevKit.Shared.RazorComponent" Version="2026.3.19" />
                    
Directory.Packages.props
<PackageReference Include="DevKit.Shared.RazorComponent" />
                    
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 DevKit.Shared.RazorComponent --version 2026.3.19
                    
#r "nuget: DevKit.Shared.RazorComponent, 2026.3.19"
                    
#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 DevKit.Shared.RazorComponent@2026.3.19
                    
#: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=DevKit.Shared.RazorComponent&version=2026.3.19
                    
Install as a Cake Addin
#tool nuget:?package=DevKit.Shared.RazorComponent&version=2026.3.19
                    
Install as a Cake Tool

DevKit.Shared.Razor

Biblioteca de componentes Razor reutilizables para aplicaciones Blazor, optimizada para facilitar el desarrollo de interfaces modernas.

Instalación

El paquete se puede instalar usando NuGet:

dotnet add package DevKit.Shared.RazorComponent

También está disponible en el Visual Studio Package Manager:

Install-Package DevKit.Shared.RazorComponent

Uso de Componentes

1. Autocomplete<T>

Componente genérico para búsqueda y selección con soporte para debounce asíncrono.

<Autocomplete @bind-Value="selectedItem" 
               SearchHandler="SearchHandler" 
               DisplayItem="@(item => item.Name)" 
               MinCharacters="2" 
               DebounceInterval="300" 
               OnSelected="OnItemSelected" />

@code {
    private Item selectedItem;

    private async Task<List<Item>> SearchHandler(string searchTerm, CancellationToken token)
    {
        return await _service.SearchItems(searchTerm, token);
    }

    private void OnItemSelected(Item item)
    {
        // Manejar selección
    }
}
Parámetros Principales
  • SearchHandler: Función asíncrona que maneja la búsqueda de elementos.
  • DisplayItem: Selector para definir el texto a mostrar por item.
  • MinCharacters: Mínimo de caracteres para iniciar la búsqueda.
  • DebounceInterval: Tiempo de espera (ms) antes de ejecutar la búsqueda.
  • Clearable: Permite mostrar el botón de limpieza.
  • Class: Clases CSS personalizadas para el input.

2. ComboBox<TItem, TValue>

Componente de selección simple con soporte para tipos genéricos y reflexión opcional.

<ComboBox @bind-Value="selectedValue" 
          Items="options" 
          Placeholder="Seleccione una opción..." 
          TextField="Descripcion"
          ValueField="Id" />

@code {
    private int selectedValue;
    private List<OptionItem> options = new List<OptionItem>();
}
Parámetros Principales
  • Items: Lista de elementos disponibles.
  • TextField: Nombre de la propiedad a mostrar (por defecto "Descripcion").
  • ValueField: Nombre de la propiedad valor (por defecto "Id").
  • TextSelector / ValueSelector: Selectores opcionales para evitar reflexión.
  • Placeholder: Texto inicial del select.

Personalización de Estilos

El componente Autocomplete permite sobrescribir las siguientes clases para adaptarse al diseño de tu aplicación:

.autocomplete-container { /* Contenedor principal */ }
.autocomplete-container .dropdown-menu { /* Menú de sugerencias */ }
.input-icon { /* Ícono de búsqueda */ }
.dropdown-item.active { /* Ítem seleccionado mediante teclado */ }
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.

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
2026.3.20 0 3/20/2026
2026.3.19 36 3/19/2026
2026.2.27 91 2/27/2026
2026.1.22 102 1/23/2026
2026.1.21 95 1/22/2026
2026.1.18 95 1/17/2026
2026.1.17 101 1/17/2026
2026.1.15 95 1/15/2026
2026.1.9 107 1/10/2026
2025.11.11 315 11/11/2025
2025.10.26 203 10/26/2025
2025.10.10 141 10/10/2025
2025.9.12 121 9/13/2025
2025.9.5 142 9/5/2025
2025.9.2 200 9/2/2025
2025.9.1 205 9/2/2025
2025.8.22 189 8/22/2025
2025.8.21 194 8/21/2025
2025.8.19 201 8/19/2025
2025.8.12 168 8/10/2025
Loading failed