Ember addon for vanilla-picker color picker library.
- Ember.js v3.28 or above
- Ember CLI v3.28 or above
- Node.js v14 or above
ember install ember-picker
You can change all global configuration settings via config/environment.js
file.
Please check vanilla-picker site for more configuration details.
ENV['ember-picker'] = {
parent: undefined,
popup: 'right',
template: undefined,
layout: 'default',
alpha: true,
editor: true,
editorFormat: 'hex',
cancelButton: false,
color: undefined,
onChange: undefined,
onDone: undefined,
onOpen: undefined,
onClose: undefined,
};
Example as a component
Example as a modifer
If you would like access to the picker instance in order to call some methods directly, for example to hide or show programmatically, pass an action to registerAPI
// save the picker instance to use later
@action
saveApi(picker) {
this.picker = picker;
}
// programmatically open the picker
@action
openPicker() {
this.picker.show();
}
See the Contributing guide for details.
This project is licensed under the MIT License.