I notice when I click a button, there is little or no indication the button has been clicked.

1 Answer 46 Views
Button
Peter
Top achievements
Rank 1
Peter asked on 20 May 2021, 02:00 PM

I notice that when I set a button background color, clicking on that styled button gives no indication of whether the button is clicked. Is there a proper way to change the color of a button and still have it behave like a button (that is, show indication when clicked).

 

<Button icon="cut" title="On Peak" style={{ backgroundColor: "red" }} >
On Peak
</Button>

1 Answer, 1 is accepted

Sort by
0
Krissy
Telerik team
answered on 21 May 2021, 09:09 AM

Hi Peter,

Clicking the button does by default give a visual indication that it is clicked by making the background color darker.

In the case where red is the background color, this different may indeed not be easily noticeable, which is why what I can suggest as another approach is to customize the focus style through the CSS which will allow you to use any color you desire: 
https://stackblitz.com/edit/react-qj3axm-6fwn7j?file=app%2Fmain.jsx 

Hope this is helpful.

Regards,
Krissy
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Peter
Top achievements
Rank 1
commented on 21 May 2021, 02:29 PM

Thanks, Perfect!
Tags
Button
Asked by
Peter
Top achievements
Rank 1
Answers by
Krissy
Telerik team
Share this question
or