5.8.5 • Published 2 years ago

@picmo/popup-picker v5.8.5

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

@picmo/popup-picker

Adds support to PicMo for showing a picker in a popup element.

Requires the base PicMo package to be installed as a peer dependency.

Installation

npm install @picmo/popup-picker

Basic usage

To show a popup picker, you'll need a trigger element. This is often a button or other clickable element that can show the popup picker in response to a click event.

import { createPopup } from '@picmo/popup-picker';

const triggerButton = document.querySelector('#emoji-button');

// Create the picker
const picker = createPopup({}, {
  // The element that triggers the popup
  triggerElement: triggerButton,

  // The element to position the picker relative to - often this is also the trigger element,
  referenceElement: triggerButton,

  // specify how to position the popup
  position: 'bottom-start'
});

// The picker emits an event when an emoji is selected. Do with it as you will!
picker.addEventListener('emoji:select', event => {
  console.log('Emoji selected:', event.emoji);
});
5.8.5

2 years ago

5.8.4

2 years ago

5.8.2-beta.1.0

2 years ago

5.8.3

2 years ago

5.8.2

2 years ago

5.8.1

2 years ago

5.7.6

2 years ago

5.7.5

2 years ago

5.7.4

2 years ago

5.7.3

2 years ago

5.8.0

2 years ago

5.7.2

3 years ago

5.7.1

3 years ago

5.6.0

3 years ago

5.6.3

3 years ago

5.6.2

3 years ago

5.7.0

3 years ago

5.6.1

3 years ago

5.5.1

3 years ago

5.5.0

3 years ago

5.4.0

3 years ago

5.3.0

3 years ago

5.5.2

3 years ago

5.1.2

3 years ago

5.0.0-beta.10

3 years ago

5.2.0

3 years ago

5.1.1

3 years ago

5.1.0

3 years ago

5.0.1

3 years ago

5.0.0

3 years ago

5.0.0-beta.8

3 years ago

5.0.0-beta.9

3 years ago

5.0.0-beta.7

3 years ago

5.0.0-beta.6

3 years ago

5.0.0-beta.5

3 years ago

5.0.0-beta.4

3 years ago