Color Picker Field Flow
Server-side implementation of the <color-picker-field> webcomponent
ColorPickerField component for Vaadin Flow
This project is the Component wrapper implementation of <color-picker-field>
element
for use from the server side with Vaadin Flow.
Converted vs. Raw Value
There are two implementations of the color picker:
ColorPickerField
- Provides the value automatically converted to ajava.awt.Color
ColorPickerFieldRaw
- Provides the value as raw CSS ColorString
Running the component demo
Starting the test/demo server:
mvn jetty:run
This deploys demo at http://localhost:8080
Installing the component
Run from the command line:
mvn clean install -DskipTests
Using the component in a Flow application
To use the component in an application using maven,
add the following dependency to your pom.xml
:
<dependency>
<groupId>com.github.juchar</groupId>
<artifactId>color-picker-field-flow</artifactId>
<version>${component.version}</version>
</dependency>
Flow documentation
Documentation for flow can be found in Flow documentation.
Contributing
- Use the coding conventions from Flow coding conventions
- Submit a pull request with detailed title and description
- Wait for response from the author
License
Apache License 2.0
Sample code
ColorPickerField colorPickerField = new ColorPickerField("As Color", Color.BLUE, "#fff"); colorPickerField.setPinnedPalettes(true); colorPickerField.setHexEnabled(false); colorPickerField.setPalette(Color.RED, Color.GREEN, Color.BLUE); colorPickerField.addValueChangeListener(event -> System.out.println(event.getValue())); colorPickerField.setChangeFormatButtonVisible(true); colorPickerField.setWidth("400px");
Links
Compatibility
Was this helpful? Need more help?
Leave a comment or a question below. You can also join
the chat on Discord or
ask questions on StackOverflow.
Version
Initial Release
- Released
- 2019-07-18
- Maturity
- BETA
- License
- Apache License 2.0
Compatibility
- Framework
- Vaadin 13+
- Browser
- N/A
Color Picker Field Flow - Vaadin Add-on Directory
Server-side implementation of the# ColorPickerField component for Vaadin Flow
This project is the Component wrapper implementation of [``](https://github.com/Juchar/color-picker-field) element
for use from the server side with [Vaadin Flow](https://github.com/vaadin/flow).
## Converted vs. Raw Value
There are two implementations of the color picker:
- `ColorPickerField`- Provides the value automatically converted to a `java.awt.Color`
- `ColorPickerFieldRaw` - Provides the value as raw CSS Color `String`
## Running the component demo
Starting the test/demo server:
```
mvn jetty:run
```
This deploys demo at http://localhost:8080
## Installing the component
Run from the command line:
- `mvn clean install -DskipTests`
## Using the component in a Flow application
To use the component in an application using maven,
add the following dependency to your `pom.xml`:
```
com.github.juchar
color-picker-field-flow
${component.version}
```
## Flow documentation
Documentation for flow can be found in [Flow documentation](https://github.com/vaadin/flow-and-components-documentation/blob/master/documentation/Overview.asciidoc).
## Contributing
- Use the coding conventions from [Flow coding conventions](https://github.com/vaadin/flow/tree/master/eclipse)
- [Submit a pull request](https://www.digitalocean.com/community/tutorials/how-to-create-a-pull-request-on-github) with detailed title and description
- Wait for response from the author
## License
Apache License 2.0