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
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Active state

Thread ID:





143738 Apr 3,2019 11:20 AM UTC Apr 4,2019 09:22 AM UTC React - EJ 2 1
Tags: Sidebar
Rikard Schouwstra
Asked On April 3, 2019 11:20 AM UTC

I am styling the sidebar and I would like to know how to add an active class to the current selected <li> based on what component imported the sidebar component. Any help would be appreciated.


Ashokkumar Balasubramanian [Syncfusion]
Replied On April 4, 2019 09:22 AM UTC

Hi Rikard, 
We have checked your query at our end. We suspect that, you have followed the below sample to create the application. For this sample, we are not customizing the active li element styles in application level, so only you are not able to identify which component you are selected.  
Our ListView component, we were able to differentiate each state (hover, active, default). So, you can use the e-active class to customize the corresponding styles for selected component.    
//menuList is a id of ListView component 
#menuList.e-listview .e-list-item.e-active
        background: green; 
Please let us know, If the provided information’s are helpful to resolve your problem or not. If not, please share the screenshot of your problem or sample. 
Ashokkumar B. 


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon