if active class then change another class value css reactjs code example Example: dynsmic calss in react add className={`box ${isBoxVisible ? "" : "hidden"}`}