Kirigami forms and configurations
Recently a new submodule has landed in Kirigami: “Forms”.
Until this point, Kirigami had only offered the classic “FormLayout” component. which is used for configuration pages throughoug systemsettings, Plasma, and some apps. It’s the classical form used in desktop toolkits for decades:

This is a fairly clean layout which however is starting to slowly become outdated, as modern toolkits are starting to use a different layout nowdays, based on “cards”



Unfortunately FormLayout very bound to the classic layout, and it wasn’t really possible to adapt it to the new look in a compatible way which didn’t break existing applications in unexpected ways.
This is also the reason a new approach was done provided by kirigami addons: “FormCard”, which is used by a lot of applications; for instance here in NeoChat:

We wanted to have this new style of forms in the base Kirigami API, so after a review of the existing FormCard, we decided to make several changes, for two main reasons: First, FormCard is bound to the card style of form as much as FormLayout was bound to the classic flat style. Also, it tried to provide ready-made components for every kind of control; so it had its own TextField, its own RadioButton and so on — effectively becoming its own separate toolkit.
So we opted instead to go down the route of having a more generic API, so the Forms module includes containers that define a semantic structure of a form, which contains all the normal controls — such as textfields, checkboxes and radiobuttons.
This is a code example of the new API:
import QtQuick.Controls as QQC
import org.kde.kirigami as Kirigami
Kirigami.Form {
Kirigami.FormGroup {
title: "Global Settings"
Kirigami.FormEntry {
contentItem: QQC.CheckBox {
text: "Show Sidebar"
}
}
Kirigami.FormEntry {
contentItem: QQC.CheckBox {
text: "Auto Save"
}
}
}
Kirigami.FormGroup {
title: "Theme Options"
Kirigami.FormEntry {
title: "Colors:"
contentItem: QQC.CheckBox {
text: "Dark Theme"
}
}
Kirigami.FormSeparator {}
Kirigami.FormEntry {
contentItem: QQC.CheckBox {
text: "High Contrast"
}
}
...
}
}
which will look like this:

Or, in mobile mode:

Semantically, a Form will contain one or more FormGroup objects, each of which will contain one or more FormEntry objects. Then a FormEntry will contain the control which represents the configuration of the particular thing. It can be a single control (like a button or a checkbox) or it can be any layout with completely custom contents.
I already ported 4 modules of systemsettings to the new system: the landing page, the “workspace options” kcm, the mouse settings and the touchpad settings.

But wait… this page looks exactly the same as before; why?
A key was to do an API that was as much as separated from any appearance as possible, as we don’t know how UI design trends will evolve in the future. But this also allows us another thing: to have two separate implementations: the new one “card based” and a legacy one which looks exactly like the current FormLayout components. This is used only in systemsettings, so we can port all the kcms without introducing glaring visual inconsistencies, and when we are done, flick the switch and convert the look of everything all in one go.
Since most of KDE’s QML applications already use the existing card-style kirigamiaddons FormCard components, the new look will be used there.
And then in the future, when trends change again, we can re-style all the settings pages in one go.
A call to action
We ideally want the whole set of systemsettings kcms to be ported as soon as possible to the new system, so we can have soon a nice visual overhaul in the whole systemsettings.
In order for this to happen, we need the help of everyone, so… patches welcome 
As an example, this is the merge request that ported the first four kcms.
When porting, it’s also possible to see how the kcm will look with the new system as well, to make sure it works well for when we flick the switch. If we run in a terminal:
KDE_KIRIGAMI_FORMS_STYLE=cards systemsettingsWe get systemsettings using the new style for pages already ported:


Porting from FormLayout to the new Form/FormGroup/FormEntry system should be really straightforward; it should be possible to make good progress in little time.
With your help, soon KDE’s settings will benefit from greater consistency, a more modern style, and easier adaptation to future designs.