How to customize Lumo in Vaadin 10?

I don’t want to create my own theme - I just want to customize some things.
For example I have two vertical layouts (next to each inside a horizontal layout) - i want left layout to be slightly darker than the right one. I Vaadin 8 I could just setStyleName - there’s no such method in Vaadin 10.

Also, can I somehow change theme variant from java? It would be nice to change Lumo.LIGHT to Lumo.DARK with a button.

(I read documentation but things are not clear for me yet. Right now trying to understand how things work in Baker App.)

I Vaadin 8 I could just setStyleName - there’s no such method in Vaadin 10.

It’s setClassName now.

Also, can I somehow change theme variant from java? It would be nice to change Lumo.LIGHT to Lumo.DARK with a button.

component.getElement().setAttribute("theme", "dark");

setStyleName was renamed to setClassName