Search results

ColorPickerModel API in JavaScript ColorPicker API control

Interface for a class ColorPicker

Properties

beforeClose

EmitType<BeforeOpenCloseEventArgs>

Triggers before closing the ColorPicker popup.

beforeModeSwitch

EmitType<ModeSwitchEventArgs>

Triggers before Switching between ColorPicker mode.

beforeOpen

EmitType<BeforeOpenCloseEventArgs>

Triggers before opening the ColorPicker popup.

beforeTileRender

EmitType<PaletteTileEventArgs>

Trigger while rendering each palette tile.

change

EmitType<ColorPickerEventArgs>

Triggers while changing the colors. It will be triggered based on the showButtons property. If the property is false, the event will be triggered while selecting the colors. If the property is true, the event will be triggered while apply the selected color.

created

EmitType<Event>

Triggers once the component rendering is completed.

onModeSwitch

EmitType<ModeSwitchEventArgs>

Triggers after Switching between ColorPicker mode.

open

EmitType<OpenEventArgs>

Triggers while opening the ColorPicker popup.

select

EmitType<ColorPickerEventArgs>

Triggers while selecting the color in picker / palette, when showButtons property is enabled.

columns

number

It is used to render the ColorPicker palette with specified columns.

createPopupOnClick

boolean

Specifies the popup element creation on open.

cssClass

string

This property sets the CSS classes to root element of the ColorPicker which helps to customize the UI styles.

disabled

boolean

It is used to enable / disable ColorPicker component. If it is disabled the ColorPicker popup won’t open.

enableOpacity

boolean

It is used to enable / disable the opacity option of ColorPicker component.

enablePersistence

boolean

To enable or disable persisting component’s state between page reloads and it is extended from component class.

enableRtl

boolean

Enable or disable rendering component in right to left direction.

inline

boolean

It is used to render the ColorPicker component as inline.

locale

string

Overrides the global culture and localization value for this component. Default global culture is ‘en-US’.

mode

ColorPickerMode

It is used to render the ColorPicker with the specified mode.

modeSwitcher

boolean

It is used to show / hide the mode switcher button of ColorPicker component.

noColor

boolean

It is used to enable / disable the no color option of ColorPicker component.

presetColors

{ [key: string]: string[] }

It is used to load custom colors to palette.

showButtons

boolean

It is used to show / hide the control buttons (apply / cancel) of ColorPicker component.

value

string

It is used to set the color value for ColorPicker. It should be specified as Hex code.