Skip to content
Editor EditorEmojiMenu

EditorEmojiMenu

A colon menu that inserts an emoji.

On this page

Examples

Emoji

The menu opens after the colon and one more character, so times like 12:30 are left alone.

grinning
smile
joy
slight_smile
wink
heart_eyes
thinking
sunglasses
cry
angry
thumbsup
thumbsdown
clap
pray
wave
muscle
heart
fire
star
sparkles
tada
rocket
bulb
white_check_mark
x
warning
bug
pushpin
paperclip
coffee

Type : then at least one letter, for example :smile.

Razor
<div class="flex w-full max-w-2xl flex-col gap-3">
    <KlyFormField Label="Emoji" Help="Type : then at least one letter, for example :smile.">
        <KlyEditor Value="@("")" Name="emoji" Placeholder="Type :smile" data-testid="editor-emoji">
            <KlyEditorEmojiMenu />
        </KlyEditor>
    </KlyFormField>
</div>

API

KlyEditorEmojiMenu

The emoji menu: opens when ":" is typed followed by at least one character, and inserts the emoji as text.

Parameters

Name Type Default Description
Char string Character that opens the menu.
Class string Classes added to the root element, merged last so they win over the theme.
Items IReadOnlyList<EditorEmojiItem> Emoji of the menu. Defaults to Defaults .
Label string Accessible name of the list.
Limit int 42 Most options shown at a time.
Size KlySize KlySize.Md Size of the menu, from Xs to Xl . Values: Xs, Sm, Md, Lg, Xl.
Ui EditorMenuUi Per-instance class overrides of the slots of the menu, see EditorMenuUi .

Ui slots

Ui takes a EditorMenuUi with one class string per slot, merged after the theme.

Slot Styles
Root Classes merged into the root slot of KlyEditorSuggestionMenu , KlyEditorMentionMenu and KlyEditorEmojiMenu , after the theme and the app configuration.
Content Classes merged into the content slot of KlyEditorSuggestionMenu , KlyEditorMentionMenu and KlyEditorEmojiMenu , after the theme and the app configuration.
Listbox Classes merged into the listbox slot of KlyEditorSuggestionMenu , KlyEditorMentionMenu and KlyEditorEmojiMenu , after the theme and the app configuration.
Item Classes merged into the item slot of KlyEditorSuggestionMenu , KlyEditorMentionMenu and KlyEditorEmojiMenu , after the theme and the app configuration.
Icon Classes merged into the icon slot of KlyEditorSuggestionMenu , KlyEditorMentionMenu and KlyEditorEmojiMenu , after the theme and the app configuration.
Body Classes merged into the body slot of KlyEditorSuggestionMenu , KlyEditorMentionMenu and KlyEditorEmojiMenu , after the theme and the app configuration.
ItemLabel Classes merged into the itemLabel slot of KlyEditorSuggestionMenu , KlyEditorMentionMenu and KlyEditorEmojiMenu , after the theme and the app configuration.
ItemDescription Classes merged into the itemDescription slot of KlyEditorSuggestionMenu , KlyEditorMentionMenu and KlyEditorEmojiMenu , after the theme and the app configuration.
Empty Classes merged into the empty slot of KlyEditorSuggestionMenu , KlyEditorMentionMenu and KlyEditorEmojiMenu , after the theme and the app configuration.

EditorEmojiItem

An entry of KlyEditorEmojiMenu .

Parameters

Name Type Description
Emoji string The emoji inserted into the text.
Keywords string Extra words the typed text is matched against.
Name string What the user types after the colon to find it: :smile .