# NOT RUN {
data <- MASS::road[11:17, ]
## By default, the minimum and maximum values are bold with a red and green font color respectively
reactable(data,
defaultColDef = colDef(
style = highlight_min_max(data)))
## Assign a different font color to the min and max values
reactable(data,
defaultColDef = colDef(
style = highlight_min_max(data,
min_font_color = "orange",
max_font_color = "blue")))
## Highlight the background of the cell for the min and max values in each column
reactable(data,
defaultColDef = colDef(
style = highlight_min_max(data,
min_highlighter = "salmon",
max_highlighter = "skyblue")))
# }
Run the code above in your browser using DataLab