Use this tag for questions related to the reactable package. The reactable package provides functions to create interactive data tables in the R programming language, based on the React Table library and made with reactR.
Questions tagged [reactable]
180 questions
1
vote
1 answer
reactable custom cell rendering with HTML content does not render HTML
I am using a custom cell rendering function for one column with reactable that combines both columns of a dataframe, one of which is already HTML (
something
). I cannot get the HTML rendering to work. Here is a minimal…
Remko Duursma
- 2,741
- 17
- 24
1
vote
1 answer
How to change the row selection checkbox icon from "tick mark" to "xmark" in reactable?
I would like to change checkbox icon for row selection from "tick mark" to "xmark" on reactable in shiny. Not sure how to do this.
Here is my attempt:
library(shiny)
library(reactable)
library(shinyWidgets)
ui <- fluidPage(
titlePanel("row…

Mohamad Sahil
- 165
- 2
- 12
1
vote
0 answers
How to store tippy tooltips in a data.frame and render them through reactable?
To bypass this issue, I am trying to store tippy tooltips in a data.frame column and render them in reactable without using the cell attribute in colDef. I tried the following example to show tooltips with dogs pictures when hovering on the dog…

Gion Mors
- 313
- 1
- 3
- 20
1
vote
1 answer
How to generate dynamical `color_tiles` in {reactablefmtr}
Is there a way to generate the column defitions for color_tiles dynamically? Here is my current approach which does not work correctly, as the tiles are always colored by the last class-column that I…

eastclintw00d
- 2,250
- 1
- 9
- 18
1
vote
0 answers
R: How to conditionally mark red in the exact same positions from another reactable
I have two reactables: one from avg_sepal and the other from avg_petal which are both defined in my code.
The first reactable is based on avg_sepal which marks cells conditionally in red:
So the red cells are in the following positions:
(row 1,…

shsh
- 684
- 1
- 7
- 18
1
vote
1 answer
Create new columns conditionally in reactable from R
I am trying to make a reactable with the following (I succeeded making the first but not 2 and 3):
If a row in any column is above 5 or below 0.1, color that cell red.
Create a new column that counts the number of red cells for every row. For…

shsh
- 684
- 1
- 7
- 18
1
vote
1 answer
quarto - reactable output not shown if followed by other output
I have a function which produces multiple tables, e.g. one a reactable, the other the simple printout of a dataframe.
When using the function in a quarto document and rendering it, the output of the reactable is omitted unless it comes last in the…

zoowalk
- 2,018
- 20
- 33
1
vote
1 answer
Get filtered data in reactable in shiny
I have a shiny application that lets the user filter data, eventually the user should be able to download the filtered data but I cannot access the filtered/shown data from reactable.
An MWE would be the following: (Note that the getReactableState()…

David
- 9,216
- 4
- 45
- 78
1
vote
1 answer
How to add an icon in front of specific column name of reactable
R Gurus,
I am struggling with a unique problem with adding an icon in front of certain column names in a reactable.
library(htmltools)
library(dplyr)
library(tippy)
data <- as_tibble(mtcars[1:6, ], rownames = "car") %>%
select(car:hp)
# See the…

M.Qasim
- 1,827
- 4
- 33
- 58
1
vote
1 answer
Incorrect figure position when rendering a html file with Quarto
Using Quarto Markdown in RStudio, I'm trying to position a figure (ggplot2 barplot) to the right hand side of a table (reactable). When I render the page (to html), the figure is displaying to the right of the code and not to the right of my table…

Beatdown
- 187
- 2
- 7
- 20
1
vote
0 answers
How to include Shiny element inside dropdown area in reactable
I want to include a slider input inside a dropdown area of a reactable.
This is my code:
library(reactable)
library(tidyverse)
library(shinyWidgets)
df <- data.frame(areas = c('A', 'B', 'C', 'D'),
col = c('Trick', 'Trick', 'Trick',…

Laura
- 675
- 10
- 32
1
vote
1 answer
Row-wise conditional formatting in Shiny Reactable table
I have the following dataframe that I am importing into a Shiny app:
final_odds <- structure(list(player_prop = c("Aaron Jones: Rush + Rec Yards",
"Aaron Jones: Rush + Rec Yards", "Aaron Rodgers:…

Sam Hoppen
- 355
- 2
- 9
1
vote
0 answers
Always Visible Scrollbar on Shiny Reactable Table
I have built a Shiny app and one page has a very wide reactable table. Some users are having trouble navigating the width of the table. How can I add horizontal and vertical scroll bars they can click and drag? Here is a minimal…

pyll
- 1,688
- 1
- 26
- 44
1
vote
2 answers
What would be the best practice to use JavaScript function in reactable?
In reactable it is possible to use JavaScript functions, like in this example:
reactable(iris, columns = list(
Species = colDef(
cell = JS("function(cellInfo) {
return '' + cellInfo.value + ''
}")
)
))
However, all examples…

gss
- 1,334
- 6
- 11
1
vote
0 answers
Cross-reference a section inside a field in a table?
Is it possible to cross-reference a section inside a field in a table with omething like the following?
# using "asis" results
a <- c(1,2)
b <- c("\@ref(some-section-id)")
df <- data.frame(a,b)
kableExtra::kable(df,
format = "markdown")
When…

Our
- 986
- 12
- 22