Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
src
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

scalajs-react-mdl

An easy way to use JavaScript dependent MDL components with Scala.js React.

Getting started

  1. Clone this repository
  2. Publish to the local sbt repository
$ sbt publishLocal
  1. Add the following dependency to your scalajs-react project
libraryDependencies += "com.payalabs" %%% "scalajs-react-mdl" % "0.2.0-SNAPSHOT"

Using an MDL component

Write the normal ReactTag for whichever MDL component you would like to use and call .material at the end:

import com.payalabs.scalajs.react.mdl.MaterialAble

div(className := "mdl-button mdl-js-button mdl-button--fab mdl-button--colored")(
  i(className := "material-icons")("add")
).material

The material method returns a ReactComponent that will automatically upgrade the element (adding event listeners, ripples, etc.) once it is in the DOM.

About

Use Material Design Lite components from React in Scala.js!

Resources

License

Releases

No releases published

Packages

No packages published
You can’t perform that action at this time.