ColorPickerComponent
Represents the Kendo UI ColorPicker component for Angular.
The ColorPickerComponent
is a tool for choosing colors from Gradient and Palette views
rendered in its popup. You can preview the selected color, revert it to its previous state, or clear it.
<kendo-colorpicker [(value)]="selectedColor"></kendo-colorpicker>
Selector
kendo-colorpicker
Export Name
Accessible in templates as #kendoColorPickerInstance="kendoColorPicker"
Inputs
Name | Type | Default | Description |
---|---|---|---|
actionsLayout |
|
|
Configures the layout of the Apply and Cancel action buttons. |
activeView |
|
Sets the initially active view in the popup. Supports two-way binding. | |
adaptiveMode |
|
Enables or disables the adaptive mode. By default, adaptive rendering is disabled. | |
adaptiveSubtitle |
|
Sets the subtitle of the ActionSheet rendered instead of the Popup on small screens. By default, the ActionSheet does not render a subtitle. | |
adaptiveTitle |
|
Sets the title of the ActionSheet rendered instead of the Popup on small screens. | |
clearButton |
|
|
Specifies whether the ColorPicker displays a Clear color button. |
disabled |
|
|
Sets the disabled state of the ColorPicker. To disable it in reactive forms, see Forms Support. |
fillMode |
|
|
The fillMode property specifies the background and border styles of the ColorPicker (see example). |
format |
|
|
Specifies the output format of the ColorPicker. If the input value is in a different format, the component parses it into the specified output |
gradientSettings |
|
Configures the gradient 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 | |
iconClass |
|
A CSS class name which displays an icon in the ColorPicker button.
Takes precedence over | |
paletteSettings |
|
Configures the palette displayed in the ColorPicker popup. | |
popupSettings |
|
Configures the popup of the ColorPicker. | |
preview |
|
|
Displays Apply and Cancel action buttons and color preview panes. When enabled, the component value does not change immediately upon color selection, but only after the Apply button is clicked. The Cancel button reverts the current selection to its previous state, i.e., to the current value. |
readonly |
|
|
Sets the read-only state of the ColorPicker. |
rounded |
|
|
The rounded property specifies the border radius of the ColorPicker (see example). |
size |
|
|
The size property specifies the padding of the ColorPicker internal elements (see example). |
svgIcon |
|
Defines an SVGIcon to render within the button. The input can take either an existing Kendo SVG icon or a custom one. | |
tabindex |
|
|
Sets the |
value |
|
Sets the value of the selected color. | |
views |
|
Specifies the views rendered in the popup. By default, both the gradient and palette views are 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 |
|
Returns the current open state. Returns |
Events
Name | Type | Description |
---|---|---|
activeColorClick |
|
Fires when the left side of the ColorPicker wrapper is clicked. The event is triggered regardless of whether a ColorPicker icon is set or not. The |
activeViewChange |
|
Fires when 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 when the Popup (or ActionSheet in adaptive mode) is about to close. This event is preventable. If you cancel it, the Popup (or the ActionSheet) remains open. |
blur |
|
Fires when the ColorPicker is blurred. |
focus |
|
Fires when the ColorPicker is focused. |
open |
|
Fires when the Popup (or ActionSheet in adaptive mode) is about to open. This event is preventable. If you cancel it, the Popup (or the ActionSheet) remains closed. |
valueChange |
|
Fires when the value changes. |
Methods
blur |
---|
Blurs the ColorPicker. |
focus |
---|
Focuses the wrapper of the ColorPicker. |
reset |
---|
Clears the value of the ColorPicker. |
toggle | ||||||
---|---|---|---|---|---|---|
Toggles the Popup (or ActionSheet in adaptive mode) of the ColorPicker.
Does not trigger the | ||||||
|