I really like how you can quickly add and style buttons in Hype but for some reason the buttons cannot have attributes and I desperately need to be able to enable/disable them.
So, I started experimenting with creating and styling custom buttons with CSS. When the button is disabled it is greyed out and displays a small padlock icon. Also, it cannot be clicked so any actions assigned to it will not work unless it is enabled again. The button can have hover over effects and also include custom symbols as text.
Have a look yourself and let me know how this can be improved
CSS button.zip (55.1 KB)
Create an element without filling and border and edit the inner HTML by including the
<button>tag with necessary attributes.
Include your CSS in the
<head>of the document to style your buttons. In my example buttons have two states: enabled and disabled.
Enable and disable buttons with any action using the set.attribute() method.
Have fun with CSS!