react if classname equals code example Example: add condition inside a className in reactjs className={`banner ${active ? "active" : ""}`}