diff --git a/packages/emoji-mart-react/react.tsx b/packages/emoji-mart-react/react.tsx index 978a87d5..da44f3e2 100644 --- a/packages/emoji-mart-react/react.tsx +++ b/packages/emoji-mart-react/react.tsx @@ -11,6 +11,11 @@ export default function EmojiPicker(props) { } useEffect(() => { + const PickerElement = window?.customElements.get('em-emoji-picker') + if (PickerElement) { + instance.current = new PickerElement({ ...props, ref }) + return + } instance.current = new Picker({ ...props, ref }) return () => {