The <salla-color-picker> web component is used to select a color using a variety of input methods in a pop-up modal. Listen to events when the user changes the color or when the modal is either closed, open, or the chosen color has been submitted. Several methods can be used as well as customizable properties.
The pre-defined methods allow for calling functions built by Salla to carry out certain actvities, such as openPicker which shows or opens the color picker modal.
Method
Description
Return Type
openPicker()
Shows / opens the color picker modal.
Promise<void>
closePicker()
Closes / hides the color picker modal.
Promise<void>
destroyPicker()
Releases all resources used by the color picker instance.