The ui5-color-palette-item component represents a color in the the ui5-color-palette.
Properties
selected
| Description | Defines if the component is selected. Note: Only one item must be selected per ui5-color-palette. If more than one item is defined as selected, the last one would be considered as the selected one. |
| Type | boolean |
| Default | false |
| Since | 2.0.0 |
| Description | Defines the tooltip of the component. When not set, the color value is used as the tooltip. |
| Type | string | undefined |
| Default | undefined |
| Since | 2.22.0 |
value
| Description | Defines the colour of the component. Note: The value should be a valid CSS color. |
| Type | string |
| Default | "" |
Slots
No slots available for this component.
Events
click
| Description | Fired when the component is activated either with a mouse/tap or by using the Enter or Space key. Note: The event will not be fired if the disabled property is set to true. |
| Type | CustomEvent<ColorPaletteItemNativeClickEventDetail> |
| Parameters | altKey: boolean Returns whether the "ALT" key was pressed when the event was triggered. ctrlKey: boolean Returns whether the "CTRL" key was pressed when the event was triggered. metaKey: boolean Returns whether the "META" key was pressed when the event was triggered. shiftKey: boolean Returns whether the "SHIFT" key was pressed when the event was triggered. |
| Since | 2.22.0 |
| Bubbles | Yes |
| Cancelable | Yes - via preventDefault() |
Methods
No methods available for this component.
CSS Parts
No CSS parts available for this component.
CSS Custom States
No CSS custom states available for this component.