BlazorEmo 1.0.0

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

🎨 BlazorEmo

A modern, fully accessible emoji picker component for Blazor WebAssembly and Server applications.

.NET Blazor License WCAG

✨ Features

  • πŸ” Live Search - Filter 1,800+ emojis by name or keywords in real-time
  • πŸ“ 9 Categories - Smileys, People, Animals, Food, Travel, Activities, Objects, Symbols, Flags
  • πŸ•’ Recent Emojis - Automatic tracking via localStorage (max 30)
  • ⌨️ Full Keyboard Navigation - Tab, arrow keys, Enter, Escape support
  • β™Ώ Screen Reader Accessible - ARIA labels, roles, and live regions
  • πŸŒ™ Dark Mode - Programmatic control + automatic system preference detection
  • 🎯 WCAG 2.1 AA Compliant - Text contrast exceeds AAA standards (7:1+)
  • πŸ”” Event Callbacks - Track opens, category changes, and searches
  • ⚑ Virtualization - Efficient rendering of large emoji datasets
  • 🎨 No Dependencies - Works standalone without service registration

πŸ“¦ Installation

dotnet add package BlazorEmo

πŸš€ Quick Start

1. No Registration Required

The EmoPicker component works standalone without any service registration.

2. Use the Component

@page "/"
@using BlazorEmo.Components
@using BlazorEmo.Models

<button @onclick="() => isPickerOpen = true">
    πŸ˜€ Pick an Emoji
</button>

<EmoPicker IsOpen="@isPickerOpen"
           OnEmojiSelected="HandleEmojiSelected"
           OnClose="() => isPickerOpen = false"
           UseCompleteDataset="true"
           UseVirtualization="true"
           DarkMode="@isDarkMode" />

<p>Selected: @selectedEmoji</p>

@code {
    private bool isPickerOpen = false;
    private bool isDarkMode = false;
    private string selectedEmoji = "";

    private void HandleEmojiSelected(Emo emoji)
    {
        selectedEmoji = emoji.Char;
        isPickerOpen = false;
    }
}

🎨 Dark Mode

BlazorEmo supports both programmatic dark mode control and automatic system preference detection.

Programmatic Control

<EmoPicker DarkMode="@isDarkMode"
           IsOpen="@isPickerOpen"
           OnEmojiSelected="HandleEmojiSelected"
           OnClose="() => isPickerOpen = false" />

<button @onclick="() => isDarkMode = !isDarkMode">
    πŸŒ™ Toggle Dark Mode
</button>

System Preference Detection

The picker automatically detects and responds to the user's system color scheme preference via CSS @media (prefers-color-scheme: dark).

Dark Mode Features

  • WCAG AAA contrast ratios (7:1+) in both light and dark modes
  • Smooth color transitions between themes
  • All interactive elements clearly visible
  • Enhanced focus indicators for better accessibility
  • Windows High Contrast mode support

πŸ“– API Reference

Parameters

Parameter Type Default Description
IsOpen bool false Controls whether the picker is visible
OnEmojiSelected EventCallback<Emo> Required Fired when an emoji is selected
OnClose EventCallback - Fired when the picker should close
OnOpened EventCallback - Fired when the picker opens
OnCategoryChanged EventCallback<string> - Fired when category tab changes
OnSearchChanged EventCallback<string> - Fired when search text changes
OnBeforeClose Func<Task<bool>> - Async validation before close (return false to prevent)
OnError EventCallback<Exception> - Fired when an error occurs
UseCompleteDataset bool false Use full emoji dataset vs lite version
UseVirtualization bool true Enable virtualization for performance
DarkMode bool false Enable dark theme styling

Emo Model

public class Emo
{
    public string Code { get; set; }      // "1f600"
    public string Char { get; set; }      // "πŸ˜€"
    public string Name { get; set; }      // "Grinning Face"
    public string[] Keywords { get; set; } // ["smile", "happy"]
    public string? Category { get; set; }  // "Smileys & Emotion"
}

β™Ώ Accessibility Features

WCAG 2.1 Level AA Compliance

  • βœ… 1.4.3 Contrast (Minimum) - 7:1+ contrast ratios (exceeds AAA)
  • βœ… 1.4.11 Non-text Contrast - UI components meet 3:1 minimum
  • βœ… 2.1.1 Keyboard - Full keyboard navigation support
  • βœ… 2.4.7 Focus Visible - Clear focus indicators
  • βœ… 2.5.5 Target Size - 44x44px minimum touch targets
  • βœ… 4.1.2 Name, Role, Value - Proper ARIA labels and roles

Keyboard Navigation

Key Action
Tab Navigate between search, tabs, and emojis
Shift+Tab Navigate backwards
Arrow Keys Navigate between tabs and emoji grid
Enter / Space Select focused emoji or activate tab
Escape Close picker
Home / End Jump to first/last item

Screen Reader Support

  • ARIA live regions announce search results
  • ARIA labels on all interactive elements
  • Screen reader-only descriptions for context
  • Proper semantic roles (dialog, tablist, tab, tabpanel, searchbox)

πŸ§ͺ Event Callbacks

Track user interactions with the emoji picker:

<EmoPicker IsOpen="@isPickerOpen"
           OnEmojiSelected="HandleEmojiSelected"
           OnClose="CloseHandler"
           OnOpened="() => pickerOpenCount++"
           OnCategoryChanged="category => currentCategory = category"
           OnSearchChanged="query => currentSearch = query" />

@code {
    private int pickerOpenCount = 0;
    private string currentCategory = "";
    private string currentSearch = "";

    private void HandleEmojiSelected(Emo emoji)
    {
        Console.WriteLine($"Selected: {emoji.Name}");
        // Analytics tracking, logging, etc.
    }
}

🎯 Performance

Virtualization

The picker uses virtualization by default to efficiently render large emoji datasets. Only visible emojis are rendered in the DOM.


<EmoPicker UseCompleteDataset="true"
           UseVirtualization="true" />


<EmoPicker UseCompleteDataset="false"
           UseVirtualization="false" />

Recent Emojis

Recently used emojis are stored in browser localStorage (max 30) and automatically displayed in the "Recent" tab for quick access.

πŸ› οΈ Development

Prerequisites

  • .NET 10 SDK
  • Visual Studio 2026 or VS Code with C# Dev Kit

Build

dotnet build

Run Tests

dotnet test

Run Demo

cd BlazorEmo.Demo
dotnet run

Then navigate to the displayed URL (typically https://localhost:5001) to see the interactive demo.

πŸ—ΊοΈ Roadmap

Future enhancements being considered:

  • Custom emoji support
  • Emoji skin tone variations
  • Custom styling/theming API
  • i18n/localization support
  • Emoji search result highlighting
  • Favorites/pinned emojis
  • Recent emojis sync across devices
  • Configurable emoji categories
  • Copy to clipboard helper
  • Emoji preview on hover

πŸ“ License

This project is licensed under the MIT License.

πŸ™ Acknowledgments

  • Emoji data provided by Unicode CLDR
  • Icons and categories based on Unicode Emoji Standard

πŸ“ž Support

For issues and questions, please visit:


Made with ❀️ by LoneWorx LLC

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 (2)

Showing the top 2 NuGet packages that depend on BlazorEmo:

Package Downloads
BlazorRTE

Rich text editor for Blazor (.NET 10) with keyboard accessibility, ARIA support, emoji picker (1800+ emojis via BlazorEmo), emoji autocomplete (first-item auto-selected on open), XSS protection. Tested on Chrome, Edge, Firefox. Native Blazor component. GPL-3.0 for open-source.

BlazorChat

Real-time chat component for Blazor. Context-scoped threads, rich text via BlazorRTE, emoji reactions via BlazorEmo. Community edition β€” InMemory transport only. Requires BlazorChat.Server (commercial) for production SignalR-backed messaging.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.0 120 2/7/2026

BlazorEmo v1.0.0 - Initial Release

Features:
- 1,800+ emojis across 9 categories (Smileys, People, Animals, Food, Travel, Activities, Objects, Symbols, Flags)
- Full emoji picker with live search and category organization
- WCAG 2.1 Level AA compliant (text contrast exceeds AAA standards at 7:1+)
- Full keyboard navigation and screen reader support
- Programmatic dark mode with automatic system preference detection
- Smooth color transitions between light and dark themes
- LocalStorage-based recent emoji tracking (max 30 emojis)
- Event callbacks for analytics (OnOpened, OnCategoryChanged, OnSearchChanged)
- Virtualization support for efficient rendering of large datasets
- Works with both Blazor WebAssembly and Server
- No service registration required - works standalone
- Windows High Contrast mode support