BlazorEmo 1.0.0
dotnet add package BlazorEmo --version 1.0.0
NuGet\Install-Package BlazorEmo -Version 1.0.0
<PackageReference Include="BlazorEmo" Version="1.0.0" />
<PackageVersion Include="BlazorEmo" Version="1.0.0" />
<PackageReference Include="BlazorEmo" />
paket add BlazorEmo --version 1.0.0
#r "nuget: BlazorEmo, 1.0.0"
#:package BlazorEmo@1.0.0
#addin nuget:?package=BlazorEmo&version=1.0.0
#tool nuget:?package=BlazorEmo&version=1.0.0
π¨ BlazorEmo
A modern, fully accessible emoji picker component for Blazor WebAssembly and Server applications.
β¨ 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:
- Repository: Azure DevOps
Made with β€οΈ by LoneWorx LLC
| Product | Versions 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. |
-
net10.0
- Microsoft.AspNetCore.Components.Web (>= 10.0.2)
- Microsoft.Extensions.Http (>= 10.0.0)
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