This kind of interaction will require leaflet.js - either directly via {leaflet}, or indirectly via {tmap}.
Consider something along these lines (one look at Antarctica will tell you why I don't think that leaflet is well suited for global datasets); it is nicely interactive though.
library(sf)
library(tmap) # for the World dataset only
library(dplyr)
library(leaflet)
data("World")
chrt_src <- World %>%
st_transform(4326) %>% # leaflet likes WGS84
select(name, pop_est) %>%
mutate(popup_label = paste("<b>",
name,
"</b><br>population estimate:",
pop_est))
pal <- colorBin(palette = "RdYlGn",
bins = c(0, 10e6, 50e6, 100e6, 500e6, Inf),
domain = chrt_src$pop_est)
leaflet(data = chrt_src) %>%
addProviderTiles("CartoDB.Positron") %>%
addPolygons(color = NA,
fillColor = ~pal(pop_est),
popup = ~popup_label)