Can I develop apps for plasma with HTML, CSS and JS?

Hi,

Can someone point out if there’s a framework or a (better) known way of developing apps for plasma desktop with HTML, CSS and Javascript (react is even better)?

If not, can you please share what are the options for someone with the above skills.

I’m really willing to get into it, but not on the expense of learning the whole set from scratch, so I want to check my options.

All help appreciated!

Most KDE stuff is developed with Qt, which does have a JS-like configuration language (I’m not quite sure if that’s the right name for it) called QML, which can do some simple stuff, but usually you will have to pass more involved programming over to C++ or Python.

Other than that, you could try using Electron or something similar to that, but they aren’t as Plasma-friendly as Qt is, as it’s a more general JS desktop application framework.

View QML more like something that replace HTML and CSS in this case. QML is here to add component to the screen and arrange them how you like.

And you could technicly use javascript to handle all the logic, since QML can interprete it.

However as you said, when a lot of logic is involved C++ is prefered for 2 reasons:

  • performance
  • But also because it allows you to fully use the Qt “ecosystem” to do what ever you want and then pass the result to QML to update the UI based on that.

If you don’t really care about performance but you still want to use Qt behind the scene, you can do it with python, since it as official support.
And I think I’ve heard about rust and Java, but I don’t know how official this is, so it might be hard to setup.

Tldr: QML handle the UI, but just like html you can had some small Javascript snippets in it. C++ is usually there for heavy logic, but you can check out python for that to

Suggestion: why not contribute to the KDE web team? We could use (a lot) more web folks.

We don’t use React. We use mostly Hugo and a few other technologies spread out. But the tech is much easier to onboard if you know HTML, (S)CSS and JS.

2 Likes