We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Custom Browse Button

I've created a custom drop zone and some custom css to change the color of the Browse button. Here are two properties of the control:

ShowFileList=false
AutoUpload=true


After a user clicks browse, the button never returns to it's previous color.

So, it starts out as forest green. Turns brown when Browsing. And after the file is processed, it stays brown.

How can I get it back to the original color once I've processed the uploaded file?



1 Reply

SP Sureshkumar P Syncfusion Team February 20, 2023 11:05 AM UTC

Hi Keith,

It sounds like the button color change on click may be due to a CSS :active or :focus state that is being applied to the button, and this state is not automatically reset when the file is processed. To get the button to return to its original color after the file is processed, you can use JavaScript to reset the button's class or style after the file has been uploaded.

If you're still having difficulty achieving your desired result, we recommend that you provide us with your exact component rendering code example with custom styles. This will help us to better understand your specific situation and provide you with an exact solution as quickly as possible.

Regards,

Sureshkumar P


Loader.
Up arrow icon