How do you add a class in lightning component?
We use $A. util. toggleClass to add or remove a CSS style on a component or element during runtime. To retrieve the class name on a component, use component.