Skip to contents

Create a ColorPicker component

Usage

calcite_color_picker(...)

Arguments

...

named attributes passed to htmltools::tag()

Value

an object of class calcite_component which is a subclass of shiny.tag

Details

Properties

The following properties are provided by this component:

NameAttributeDescriptionValuesReflects to Attribute
allowEmptyallow-emptyWhen true, an empty color (null) will be allowed as a value. When false, a color value is enforced, and clearing the input or blurring will restore the last valid value.booleanTRUE
alphaChannelalpha-channelWhen true, the component will allow updates to the color's alpha value.booleanFALSE
channelsDisabledchannels-disabledWhen true, hides the RGB/HSV channel inputs.booleanFALSE
clearableclearableWhen true, an empty color (null) will be allowed as a value. When false, a color value is enforced, and clearing the input or blurring will restore the last valid value.booleanTRUE
disableddisabledWhen true, interaction is prevented and the component is displayed with lower opacity.booleanTRUE
formatformatThe format of value. When "auto", the format will be inferred from value when set."auto" | "hex" | "hexa" | "hsl" | "hsl-css" | "hsla" | "hsla-css" | "hsv" | "hsva" | "rgb" | "rgb-css" | "rgba" | "rgba-css"TRUE
hexDisabledhex-disabledWhen true, hides the hex input.booleanFALSE
messageOverridesNAUse this property to override individual strings used by the component.Check API referenceFALSE
numberingSystemnumbering-systemSpecifies the Unicode numeral system used by the component for localization."arab" | "arabext" | "latn"TRUE
savedDisabledsaved-disabledWhen true, hides the saved colors section.booleanTRUE
scalescaleSpecifies the size of the component."l" | "m" | "s"TRUE
storageIdstorage-idSpecifies the storage ID for colors.stringTRUE
valuevalueThe component's value, where the value can be a CSS color string, or a RGB, HSL or HSV object. The type will be preserved as the color is updated.(HSL & ObjectWithAlpha) | (HSV & ObjectWithAlpha) | (RGB & ObjectWithAlpha) | HSL | HSV | RGB | stringFALSE

Events

The following events are observed by shiny:

EventDescription
calciteColorPickerChangeFires when the color value has changed.
calciteColorPickerInputFires as the color value changes. Similar to the calciteColorPickerChange event with the exception of dragging. When dragging the color field or hue slider thumb, this event fires as the thumb is moved.

Examples

calcite_color_picker()
#> <calcite-color-picker></calcite-color-picker>