Skip to main content

createPopup

Creates a popup picker.

import { createPopup } from '@picmo/popup-picker';
createPopup(pickerOptions: PickerOptions, popupOptions: PopupOptions): PopupPickerController

Creates a popup emoji picker to be triggered by another element, usually a button.

Arguments

pickerOptions

Type: Partial<PickerOptions>

The options to use when creating the popup picker.

note

When creating a popup picker, the autoFocus picker option deaults to auto so that the picker receives focus as soon as it is opened. This differs from an inline PicMo picker, which defaults to none.

popupOptions

Type: Partial<PickerOptions>

The options to use when creating the popup picker.

Return value

The PopupPickerController instance that was created.