ColorPickerComponent
Represents the Kendo UI ColorPicker component for Angular.
The ColorPicker is a powerful tool for choosing colors from Gradient and Palette views which are rendered in its popup. It supports previewing the selected color, reverting it to its previous state or clearing it completely.
Selector
kendo-colorpicker
Export Name
Accessible in templates as #kendoColorPickerInstance="kendoColorPicker"
Inputs
Name | Type | Default | Description |
---|---|---|---|
actionsLayout |
|
Configures the layout of the The possible values are:
| |
activeView |
|
Sets the initially active view in the popup. The property supports two-way binding. The supported values are:
| |
clearButton |
|
|
Specifies whether the ColorPicker should display a 'Clear color' button. |
disabled |
|
|
Sets the disabled state of the ColorPicker. To learn how to disable the component in reactive forms, refer to the article on Forms Support. |
fillMode |
|
The fillMode property specifies the background and border styles of the ColorPicker (see example). The possible values are:
| |
format |
|
Specifies the output format of the ColorPicker. If the input value is in a different format, it will be parsed into the specified output The supported values are:
| |
gradientSettings |
|
Configures the gradient that is displayed in the ColorPicker popup. | |
icon |
|
Defines the name of an existing icon in the Kendo UI theme.
Provide only the name of the icon without the For example, | |
iconClass |
|
A CSS class name which displays an icon in the ColorPicker button.
Takes precedence over | |
paletteSettings |
|
Configures the palette that is displayed in the ColorPicker popup. | |
popupSettings |
|
Configures the popup of the ColorPicker. | |
preview |
|
|
Displays When enabled, the component value will not change immediately upon
color selection, but only after the The |
readonly |
|
|
Sets the read-only state of the ColorPicker. |
rounded |
|
The rounded property specifies the border radius of the ColorPicker (see example). The possible values are:
| |
size |
|
The size property specifies the padding of the ColorPicker internal elements (see example). The possible values are:
| |
svgIcon |
|
Defines an SVGIcon to be rendered within the button. The input can take either an existing Kendo SVG icon or a custom one. | |
tabindex |
|
|
Specifies the tabindex of the component. |
value |
|
Specifies the value of the initially selected color. | |
views |
|
Specifies the views that will be rendered in the popup. By default both the gradient and palette views will be rendered. |
Fields
Name | Type | Default | Description |
---|---|---|---|
container |
|
Provides a reference to a container element inside the component markup. The container element references the location of the appended popup— for example, inside the component markup. | |
isFocused |
|
Indicates whether the ColorPicker wrapper is focused. | |
isOpen |
|
Indicates whether the ColorPicker popup is open. |
Events
Name | Type | Description |
---|---|---|
activeColorClick |
|
Fires each time the left side of the ColorPicker wrapper is clicked. The event is triggered regardless of whether a ColorPicker icon is set or not. The ActiveColorClickEvent event provides the option to prevent the popup opening. |
activeViewChange |
|
Fires each time the view is about to change.
Used to provide a two-way binding for the |
cancel |
|
Fires when the user cancels the current color selection. Fires on preview pane or 'Cancel' button click. |
close |
|
Fires each time the popup is about to close. This event is preventable. If you cancel it, the popup will remain open. |
blur |
|
Fires each time the ColorPicker is blurred. |
focus |
|
Fires each time ColorPicker is focused. |
open |
|
Fires each time the popup is about to open. This event is preventable. If you cancel it, the popup will remain closed. |
valueChange |
|
Fires each time the value is changed. |
Methods
blur |
---|
Blurs the ColorPicker. |
focus |
---|
Focuses the wrapper of the ColorPicker. |
reset |
---|
Clears the value of the ColorPicker. |
toggle | ||||||
---|---|---|---|---|---|---|
Toggles the popup of the ColorPicker.
Does not trigger the | ||||||
|