Is there no pushbutton widget in main UI?

I just started using main UI and one of the first things I wanted to do is add a push button with an icon (have done it in Habpanel)

When using “add widget” there is no button under “standard library”, seems to me like quits a standard widget. I thought I have seen on some YT video the same list with a button as first item (not 100% sure)

There seem to be an oh-button component, can this be used directly by adding it to the code ?

Any widget can have an action so you can make any widget behave like a button.

The oh-button is a component that can be used to construct a more complicated compound widget (there are examples on the marketplace for details).

But if you want simple, you can use an oh-label-card or oh-label-item (depending on whether the widget appears on it’s own or as a row inside a list card) and just set the action to do what ever you want it to do (command an Item, run a rule, open a pop-over, etc.). You can use expressions to change icon, color, text, etc. based on the state of the Item if desired.

For an example see Door and Lock Combo which is a simple list item widget that shows two Item (a door sensor and a smart lock opener). The icon, badge text, and colors change based on the state of the Items. Clicking anywhere on the widget commands the lock to open/close.

As someone who in the beginning(and to be honest, often today) struggled a lot with the examples and documentation because I don’t have the proper background, let me try to help you with the simple solution @rlkoshak suggests.

You could add a Label card. And guess what, it can do much more than just be a label :upside_down_face: . you could configure it like this. (of Course use your own item). And it would toggle the item (DG_Zimmer1_MainLight) if you click the lower part of the widget.

You can customize this Labelcard even more to the point where it shows a icon, trend line, and does many more things :smiley:
I hope this points you in the right direction.

@rlkoshak @borderbridge,

Thanks for your help, I’ll give it a try.