Change color of button on hover.
Have succeeded in changing the color of the icon with on hover but not with the button.
Someone who can assist with help
Is for mobile app
Please John.
Please check the demo updated link and omlhttps://personal-qmzjggmd.outsystemscloud.com/PreviewInDevices/?IsMobilePreview=True&DeviceName=Smartphone&URL=/ButtonColor/Test?_ts=638135305713350947
let me know if it works for you
Hi John,
Add this class to css, and use in button
.btn-class:hover {
background-color: yellow;
}
Change the color you want
Hope that it helps you
Hi @John Forsberg
Add the below CSS to your screen & apply custom-btn class to your button:
.custom-btn:hover { background-color: orange; border-color: orange; }
Sharing the oml for reference.
RegardsKrishnanand Pathak
Hey!
You need to apply custom css for the button and the solution given by Krishnanand Pathak is correct.
Hello john
Select the button you want to modify by clicking on it.
In the Properties tab, click on the "Style" section.
Click on the "+" button next to "Advanced" to add a new CSS class to the button.
In the "Class Name" field, give a name to the CSS class, for example "hover-color".
In the "Selector" field, type ".hover-color:hover".
In the "Properties" field, add the CSS properties you want to change when the button is hovered over. For example, to change the background color to blue, you can add:
css
Copy code
background-color: blue;
Save the CSS class by clicking on the "Ok" button.
Apply the CSS class to the button by adding the class name to the "Class" property in the "Style" section of the button's properties. For example, add "hover-color" to the "Class" property
Hi Srinivas Singadi
I am new to outsystem and am having a bit of trouble finding my way around the program. Can you get an example of what you describe.
John
Hi @John Forsberg ,
On test screen I added the below CSS class named custom-btn:
Then applied the class over the button named Hover Me.
Sharing the oml again for better understanding.RegardsKrishnanand Pathak
Thanks for the help but I have tried your example.
But I have several buttons with different colors.
And if I change the color with your solution on the button style, only the Border around the button will change color.
Please check the below demo link :https://personal-qmzjggmd.outsystemscloud.com/PreviewInDevices/?IsMobilePreview=True&DeviceName=Smartphone&URL=/ButtonColor/Test?_ts=638135305713350947There are three button with different background-color applied when hover.
All button will change the background color not only border color.And for different colors for different button use different class like below
.custom-btn-orange:hover { background-color: orange; border-color: orange; } .custom-btn-green:hover { background-color: green; border-color: green; } .custom-btn-blue:hover { background-color: blue; border-color: blue; }
Updated oml is attached for reference
Hope this will help
Thanks will look into it
We misunderstand each other. The color of the button in your example way by Theme Editor. and when you hover on button you get the color that controls
.Custom-Btn-orange: Hover {
Background-Color: Orange;
Border-Color: Orange;
But I have buttons that have different colors basically.
And then at Hover, the color should be changed.
As it is now in your example, it is a color on the button before Hover.
I want to be able to have individual color on the buttons before hover
Works Perfect as I want.
Once again thanks for the help