Skip to contents

muiDataGrid gives access to MUI X Data Grid, a fast and extensible React data table and React data grid, with filtering, sorting, pagination, and more.

Install

install.packages("muiDataGrid")

You can install the development version of muiDataGrid like so:

remotes::install_github("lgnbhl/muiDataGrid")

Basic examples

A minimal example:

library(muiDataGrid)

DataGrid(
  rows = head(iris)
)

Customization can be done very easily:

library(muiDataGrid)
library(dplyr)

DataGrid(
  rows = starwars,
  columns = list(
    list(field = "name", headerName = "Names", description = "Names of Starwars character"),
    list(field = "height", headerName = "Height (cm)", description = "Height in centimeter"),
    list(field = "mass", headerName = "Mass (kg)", description = "Mass in kilogram")
  ),
  initialState = list(
    pagination = list(
      paginationModel = list(pageSize = 5)
    )
  ),
  showToolbar = TRUE
)

Acknowledgements

muiDataGrid is built on top of shiny.react, the R package by Appsilon that makes it possible to use React components in Shiny and Quarto.

Contributing

If you have any issue, question or want to contribute with a pull request, don’t hesitate to write me on https://github.com/lgnbhl/muiDataGrid/

Follow Felix Luginbuhl on LinkedIn for updates.

Trademark notice

“MUI” and “MUI X Data Grid” are trademarks of MUI Inc. muiDataGrid is an independent, community-maintained R package and is not affiliated with, sponsored by, or endorsed by MUI Inc. The names are used solely to identify the underlying JavaScript library that this package wraps. See MUI’s legal information for the canonical list of MUI’s published policies.