linkStyle={{ backgroundColor: x + 1 !== page ? "#ffffffff" : "", color: x + 1 !== page ? "#000000ff" : "", borderColor: x + 1 !== page ? "#000000ff" : "", }} add this inline css or make custom css in index.css, it will resole the issue