GithubHelp home page GithubHelp logo

codemettle / scalajs-react-components Goto Github PK

View Code? Open in Web Editor NEW

This project forked from chandu0101/scalajs-react-components

0.0 3.0 1.0 3.61 MB

Reusable scalajs-react components

Home Page: http://chandu0101.github.io/sjrc/

License: Apache License 2.0

Scala 91.91% HTML 0.68% JavaScript 7.42%

scalajs-react-components's Introduction

scalajs-react-components

Join the chat at https://gitter.im/chandu0101/scalajs-react-components

Reusable scalajs-react components.

We are trying to make the experience of using javascript components in scala.js as good as possible by adding typed wrappers.

Adding types to javascript is a lot of guesswork, and we're certain to have gotten them wrong some places. Bug reports and/or pull requests are very much welcome! :)

Wrappers for javascript components:

These components require you to provide javascript yourself.

  • Material-ui 0.18.1
  • Elemental-ui 0.6.1
  • Semantic-ui 0.68.5
  • Google maps (downloads js directly from google)
  • React GeomIcon (react-geomicons: 2.1.10)
  • React Infinite (react-infinite, 0.11.0)
  • Spinner (react-spinner, 0.2.7)
  • React Select (react-select: 1.0.0-rc.5)
  • React TagsInput (react-tagsinput, 3.16.1)
  • React Slick (react-slick: 0.14.11)

Components written in scala.js

  • DefaultSelect
  • Pager
  • ReactDraggable
  • ReactListView
  • ReactPopOver
  • ReactSearchBox
  • ReactTable
  • ReactTreeView

Gotchas

You have to call apply even when components dont have children:

MuiRaisedButton(label = "label")()

Setup

SBT

Add these dependencies to you sbt build file

libraryDependencies ++= Seq(
  "com.github.japgolly.scalajs-react" %%% "core" % "1.1.0",
  "com.github.japgolly.scalajs-react" %%% "extra" % "1.1.0",
  "com.olvind" %%% "scalajs-react-components" % "1.0.0-M2"
)

This repository includes an example project, by all means use it as a template for your own.

ScalaCSS

In order to use the scala.js components, you need to make sure you load their CSS:

GlobalRegistry.register(<component>.Style)

See here for more details

Full Demo With Code Examples

Online :

http://chandu0101.github.io/scalajs-react-components

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

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

Example project

We've included an example project to give you an idea how to use the components

scalajs-react-components's People

Contributors

oyvindberg avatar chandu0101 avatar rleibman avatar tpdi avatar giabao avatar coreyauger avatar atooni avatar jhegedus42 avatar enijns avatar daxten avatar aparo avatar oganix avatar bpressure avatar fmcgough avatar jonas avatar mproch avatar gitter-badger avatar williamho avatar

Watchers

Steven Scott avatar Cliff Ford avatar James Cloos avatar

Forkers

srushingiv

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.