- MDUI : A Material Design 3 (Material You) library of Web Components.
- Laminar : A Native Scala.js UI library
- Dependencies Version
- Scala 3.4.2
- ScalaJs 1.16.0
- Laminar 17.0.0
This is a binding from MDUI to Laminar. MDUI is a good UI library based on web components and does not rely on any framework. Very suitable for use as a universal component library.
This project contains two modules
- The code generator in the directory src , work in the JVM, where most of the code comes from the generator in laminar-shoelace-components
- Scalajs under MDUI, used for publishing scalajs projects. The automatically generated binding will be placed in this project for easy publishing
- Removed most of the rules originally defined for Shoelaces and removed some hard code.
- Try to generator all code from
custom-elements.json
, support more type. - Adjustments have been made to the supported types, and the support for enumeration properties has been well received
- Added separate compilation processing for @ mdui/icon, which can be used like using Laminar tags
The generated code has not been fully tested, and there may be some incomplete attributes, which are entirely generated based on mdui's custom elements. json. But the effect is great, the quality of the source code is very high
sbt :
libraryDependencies += "io.github.elgca" %%% "laminar-mdui" % "0.2.0"
compile
npm install
sbt run
using:
import elgca.laminar.components.mdui
mdui.Button(
_.variant.elevated,
"This is Button"
)
//使用Icon
mdui.Button(
_.slots.icon(
mdui.Icon(_.name := "360")
)
)
//Or
mdui.Button(
_.slots.icon(
mdui.icon.Icon10mp()
)
)
This project is provided under the MIT license.****