Skip to content

wiringbits/st-material-ui-demo-slinky

 
 

Repository files navigation

Material-ui 5 for Scala demo

This demonstrates using Scala.js with React and Material-ui.

This is accomplished by using these Scala.js wrappers:

Note that st-material-ui is also available for scalajs-react.

I just want to see it

You can see this deployed at https://oyvindberg.github.io/st-material-ui-demo/

The source code is here

Install

You need to explicitly install the following software:

Other software will be downloaded automatically by the commands below.

Prepare

Before doing anything, including before importing in an IDE, run

$ npm install

Development

Open two terminals. In the first one, start sbt and, within, continuously build the Scala.js project:

$ sbt
...
> ~fastLinkJS
...

In the second one, start the Vite development server with

$ npm run dev
...

Follow the URL presented to you by Vite to open the application.

You can now continuously edit the Main.scala file, and Vite will automatically reload the page on save.

Production build

Make a production build with

$ npm run build

You can then find the built files in the dist/ directory. You will need an HTTP server, such as python3 -m http.server, to open the files, as Vite rewrites <script> tags to prevent cross-origin requests.

About

Mui 5 demos for Slinky - thanks to ScalablyTyped

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Scala 93.7%
  • JavaScript 3.9%
  • HTML 1.7%
  • CSS 0.7%