does anyone know of wrappers for material-UI or bo...
# announcements
n
does anyone know of wrappers for material-UI or bootstrap around kotlinx-html ? seems like what i find is all just for react or in kotlin-js context in this project i'd like to reduce the amount of js and just generate html and css using typesafe builders
👀 1
s
• Isnt material ui pretty much js based? • What do you expect a bootstrap wrapper to do for you (isnt it only classes?)
n
yeah pretty much would like to have a DSL for creating html with the correct classes
r
on JVM side?
n
yes, from kotlinx-html would make this a lot simpler since i need nothing else that js would do anyways, i'd rather just build the html on the jvm side
r
I don't know such solution
But in my opinion (a bit non-objective as the creator of KVision 😉), this is exactly what Kotlin/JS was designed for ;-)
n
in that case i need to somehow serialize the data (via json) and send to the frontend that runs js i hoped i could have it all on jvm only
s
@Nikky What are you trying to achieve? If you want the browser to execute your code, you need to embed/serve JS or use KotlinJS to transpile to it.
n
no, i do not need to execute any javascript, just need to build html, the required js is precompiled anyways
c
I would just extend kotlinx-html Also there's this: https://github.com/sametkurumahmut/kotlin-mdl-js Looks outdated, but you could use it as an example and create your own.
n
this is for kotlin2js the components use
document
and such to create themself the readme seems to be outdated
but at least most of the work for mdl would be already done
c
Yes, but as I said, you can use it as an example.
s
You’re using Ktor or Spring or something to actually run the server, right? You’ll probably need to write your own DSL that extends
kotlinx.html
. Shouldn’t be too hard. Include the static CSS in the html’s header, then just wrap the
div
extension to add the proper CSS class.
n
i might try that, or just throw the full package with react as frontend at it
i am using ktor indeed
s
Unfortunately I believe you might need to write these extensions yourself.