css condition class react code example Example: react conditional classname <div className={`banner ${active ? "active" : ""}`}>{children}</div>