Page tree
Skip to end of metadata
Go to start of metadata
Magnolia Compatibility


6.0(tick)

Vaadin's ColorPicker component wrapped in a custom field.

Installing

Maven is the easiest way to install the module.

<dependency> 
  <groupId>info.magnolia.ui</groupId>
  <artifactId>magnolia-ui-color-picker-field</artifactId>
  <version>1.0</version> <!-- Magnolia 6 -->
</dependency>

Source Code

The source for this module can be found here:  https://github.com/magnolia-community/color-picker-field

Issues, Bugs and Improvements

Report them here: https://github.com/magnolia-community/color-picker-field/issues

Configuration

Simply configure the color picker as a field in your dialog or app:

/my-module/dialogs/color-picker-example.yaml
form:
  tabs:
    - name: tabColor
      label: Color Picker
      fields:
        - name: color
          label: Color
          class: info.magnolia.ui.field.ColorPickerFieldDefinition

actions:
  commit:
    class: info.magnolia.ui.admincentral.dialog.action.SaveDialogActionDefinition
  cancel:
    class: info.magnolia.ui.admincentral.dialog.action.CancelDialogActionDefinition

Known Issues

  • Closing the dialog (i.e. Save and Cancel) does not automatically close the color picker. You must pick the color, click "OK" and then Save.
  • The "name" of the color picker must be "color". Limited to one picker per form.