Open nabiila-29 opened 11 months ago
Hi, I think this is technically possible if you hide the column headers with CSS and mark up a column as row headers (to be effectively the same as <th>
). But I wouldn't really recommend it with reactable, as pretty much every feature assumes a column-wise table. There won't be any useful pagination, filtering, sorting, etc. So I'd really recommend creating this manually as an HTML table or using a different package.
To hide column headers and mark up a column as row headers, here's a quick example:
reactable(
MASS::Cars93[, c("Model", "Manufacturer", "Min.Price")],
columns = list(
Model = colDef(rowHeader = TRUE, style = list(fontWeight = "bold"))
),
defaultColDef = colDef(headerStyle = list(display = "none")),
bordered = TRUE
)
Example:
The idea is to create an information like above without any border