How I can center the header columns on reactable?

Hi and thanks for reading me

I am working on some tables with the "reactable" package in r, but I would like to center only the headings of each column. For example:

library(reactable)
reactable(iris,
          defaultColDef = colDef(
            header = function(value) gsub(".", " ", value, fixed = TRUE),
            cell = function(value) format(value, nsmall = 1),
            align = "center",
            minWidth = 70,
            headerStyle = list(background = "#12a09a")
          ))

Apparently the option colDef(align = "center") centers the entire column, but is there an option to only center the title?

1 Like

I hope there is someone can help. I have the same question.