harana / scalajs-react-color

Scala.js facade for the react-color library.

GitHub

scalajs-react-color

Build Status Maven Central Scala.js

Scala.js facade for the react-color library.

Setup

SBT

Add these dependencies to your build file:

libraryDependencies ++= Seq(
  "com.github.japgolly.scalajs-react" %%% "core" % "1.2.3",
  "com.github.japgolly.scalajs-react" %%% "extra" % "1.2.3",
  "com.harana" %%% "scalajs-react-color" % "1.1.0"
)

The artifacts are published to Sonatype so ensure you have it included:

resolvers += Resolver.sonatypeRepo("releases")

Usage

Examples:

BlockPicker(width = 170, color = RGB(200,200,200), colors = js.Array("#000000", "#333333", "#666666", "#999999"))
ChromePicker(color = "#333333", disableAlpha = true, onChange = onChange)
CirclePicker(circleSize = 50, circleSpacing = 10, onSwatchHover = onChange)
CompactPicker(colors = js.Array("#abcabc", "#defdef"))
GithubPicker(triangle = "top-right")
HuePicker(width = 16, height = 400, direction = "vertical")
PhotoshopPicker(header = "My Title", onAccept = onAccept, onCancel = onCancel)
SketchPicker(disableAlpha = true, width = 300, presetColors = js.Array(SketchColor("#ffffff", "White")))
SliderPicker()
SwatchesPicker(width = 100, height = 100)
TwitterPicker(width = 500, colors = js.Array("#5cd244"))

Demo

This will start a web server on http://localhost:8080:

sbt 
fastOptJS::webpack
demo/compile:fastOptJS::startWebpackDevServer

License

BSD 3

Harana

Harana is an AI-powered data catalog.

It automatically imports metadata from all your favourite tools: Confluence, AWS Glue, Kafka, PostgreSQL, MySQL, Oracle, SQL Server, IBM DB2, SQLite, Hive, CouchDB, MongoDB, HBase, Cassandra, ElasticSearch, DynamoDB, Salesforce, SugarCRM, Excel, CSV, XML, JSON.