# NOT RUN {
data <- MASS::Cars93[20:49, c("Make", "MPG.city", "MPG.highway")]
## By default, icon_sets() assigns red circles to the lowest-third values,
## orange circles to the middle-third values,
## and green to the top-third values
reactable(data,
defaultColDef = colDef(cell = icon_sets(data)))
## Assign custom colors
reactable(data,
defaultColDef = colDef(cell = icon_sets(data,
colors = c("tomato", "grey", "dodgerblue"))))
## Assign icons from Font Awesome's icon library
reactable(data,
defaultColDef = colDef(cell = icon_sets(data,
icons = c("arrow-down","minus","arrow-up"))))
# }
Run the code above in your browser using DataLab