Skip to contents

CRAN Status Build Status codecov lifecycle

Interactive data tables for R, based on the React Table library and made with reactR.

Features

  • Sorting, filtering, pagination
  • Grouping and aggregation
  • Built-in column formatting
  • Custom rendering via R or JavaScript — use Shiny HTML tags and HTML widgets in tables
  • Expandable rows and nested tables
  • Conditional styling
  • Works seamlessly within R Markdown documents and Shiny apps

Installation

You can install reactable from CRAN with:

install.packages("reactable")

Or install the development version from GitHub with:

# install.packages("devtools")
devtools::install_github("glin/reactable")

Usage

To create a table, use reactable() on a data frame or matrix:

Sepal.Length
Sepal.Width
Petal.Length
Petal.Width
Species
5.1
3.5
1.4
0.2
setosa
4.9
3
1.4
0.2
setosa
4.7
3.2
1.3
0.2
setosa
4.6
3.1
1.5
0.2
setosa
5
3.6
1.4
0.2
setosa
5.4
3.9
1.7
0.4
setosa
4.6
3.4
1.4
0.3
setosa
5
3.4
1.5
0.2
setosa
4.4
2.9
1.4
0.2
setosa
4.9
3.1
1.5
0.1
setosa
1–10 of 150 rows
...

You can embed tables in R Markdown or Quarto documents:

```{r}
library(reactable)

reactable(iris)
```

Or use them in Shiny applications:

library(shiny)
library(reactable)

ui <- fluidPage(
  reactableOutput("table")
)

server <- function(input, output) {
  output$table <- renderReactable({
    reactable(iris)
  })
}

shinyApp(ui, server)

To learn more about using reactable, check out the examples below.

Browser Support

IE / Edge
IE / Edge
Firefox
Firefox
Chrome
Chrome
Safari
Safari
Opera
Opera
IE 11*, Edge last 2 versions last 2 versions last 2 versions last 2 versions

* Support for Internet Explorer 11 was deprecated in reactable v0.4.0.

License

MIT