← All Components
<mth-emoji-picker>
Accessible emoji picker with keyword search, categories, skin tones, recent history, and 2D roving focus.
When NOT to use: Use a lightweight @methane-ui/css layout class instead of a custom element when static CSS suffices.
Live Interactive Preview
Ready · interact with <mth-emoji-picker>, or toggle Theme, Direction (LTR/RTL), or props above.
Multi-Framework Playground & Snippets
<script type="module" src="@methane-ui/ui/emoji-picker"></script>
<mth-emoji-picker columns="6" skin-tone="0"></mth-emoji-picker>import '@methane-ui/ui/emoji-picker';
import '@methane-ui/react';
export function Example() {
return <mth-emoji-picker columns="6" skin-tone="0"></mth-emoji-picker>;
}<script setup lang="ts">
import '@methane-ui/ui/emoji-picker';
</script>
<template>
<mth-emoji-picker columns="6" skin-tone="0"></mth-emoji-picker>
</template>import { Component, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import '@methane-ui/ui/emoji-picker';
import { MthEmojiPickerDirective } from '@methane-ui/angular';
@Component({
standalone: true,
schemas: [CUSTOM_ELEMENTS_SCHEMA],
imports: [MthEmojiPickerDirective],
template: `<mth-emoji-picker columns="6" skin-tone="0"></mth-emoji-picker>`,
})
export class ExampleComponent {}<script lang="ts">
import '@methane-ui/ui/emoji-picker';
import MthEmojiPicker from '@methane-ui/svelte/MthEmojiPicker.svelte';
</script>
<MthEmojiPicker columns="6" skin-tone="0"></MthEmojiPicker>Properties & Attributes
| Property | Attribute | Type | Default | Description |
|---|---|---|---|---|
value | value | string | "" | Currently selected emoji string. |
label | label | string | "" | Accessible label for the picker trigger and panel. |
inline | inline | boolean | false | Renders the picker panel inline instead of a trigger-backed popover. |
open | open | boolean | false | Controls whether the popover panel is open when inline is false. |
disabled | disabled | boolean | false | Disables interaction with trigger and picker controls. |
columns | columns | number | 6 | Number of grid columns used for 2D arrow-key navigation. |
skinTone | skin-tone | number | 0 | Active Fitzpatrick skin tone modifier index (0 = default, 1-5 = tones). |
recentLimit | recent-limit | number | 12 | Maximum number of recently picked emojis retained. |
emojis | — | ReadonlyArray<unknown> | null | null | Optional custom emoji dataset overriding the built-in curated set. |
Events
| Event | Detail Type | Description |
|---|---|---|
mth-select | { emoji: string; name: string; category: string } | Fired when an emoji is picked from the grid. |
mth-change | { value: string } | Fired when the selected emoji value changes. |
mth-open | undefined | Cancelable event fired before opening the popover. |
mth-after-open | undefined | Fired after the popover opens. |
mth-close | undefined | Cancelable event fired before closing the popover. |
mth-after-close | undefined | Fired after the popover closes. |
APG Keyboard Matrix
| Key | Direction | When | Expected Behavior |
|---|---|---|---|
| ArrowLeft / ArrowRight / ArrowUp / ArrowDown | both | emoji grid focused | moves focus across emoji grid cells (RTL-aware) |
| Home / End | both | emoji grid focused | moves focus to first or last emoji in grid |
| Enter / Space | both | emoji button focused | selects emoji and fires mth-select |
| Escape | both | popover mode open | closes picker popover and restores focus |
Accessibility Checklist
| Category | Requirement | Verified By |
|---|---|---|
| aria | All aria-* IDREFs resolve within the same DOM root (ADR-003). | scanSameRootAria |
| focus | delegatesFocus: true with zero host internals.role (ADR-014). | lint-plugin & spec-compiler |
| contrast | Renders legible borders, focus outlines, and selection indicators under forced-colors: active. | Playwright forced-colors matrix |
| keyboard | Implements all 4 APG keyboard transitions across LTR/RTL. | mth-emoji-picker.spec.test.ts |
| states | Exposes ElementInternals CustomStateSet flags: :state(open), :state(disabled). | Conformance suite |
| i18n | Routes 10 UI/ARIA strings through @methane-ui/core i18n catalog. | Locale context test |