| Title: | Accessible Data Tables with Rijksoverheid Styling |
|---|---|
| Description: | Provides accessible, keyboard-navigable data tables and themed visualizations using the 'gt' and 'DT' packages, with Rijksoverheid styling guidelines. |
| Authors: | ROvis team [cre, aut] |
| Maintainer: | ROvis team <[email protected]> |
| License: | EUPL (>= 1.2) |
| Version: | 0.1.0 |
| Built: | 2026-10-21 12:18:54 UTC |
| Source: | https://github.com/rivm-syso/ROvis.table |
Rendering an accessible, keyboard-navigable (with customJS) data table
table with options for sorting and page length.
ro_dt_table(data, caption, sorting = FALSE, pagelength = 10)ro_dt_table(data, caption, sorting = FALSE, pagelength = 10)
data |
Data frame or tibble. The data to display in the table. |
caption |
Character. Table caption/title (displayed above the table). |
sorting |
Logical. Should column sorting be enabled? Default is |
pagelength |
Integer. Number of rows to display per page. Default is |
data table html
Other DT:
ro_dt_theme()
# In your Shiny server: if (interactive()) { ro_dt_table( data = my_data, caption = "Aantal gevallen per groep", sorting = TRUE, pagelength = 20 ) }# In your Shiny server: if (interactive()) { ro_dt_table( data = my_data, caption = "Aantal gevallen per groep", sorting = TRUE, pagelength = 20 ) }
Returns a Shiny tags object containing custom CSS styles for DT tables,
following preliminary Rijksoverheid huisstijl.
ro_dt_theme(base_family = "RijksoverheidSansWebText", sorting = FALSE)ro_dt_theme(base_family = "RijksoverheidSansWebText", sorting = FALSE)
base_family |
Character. Font family to use for table text. Default is "RijksoverheidSansWebText". If not installed, Verdana is used, then Arial, then the first font found on your device, whichever is installed first. |
sorting |
Logical. If |
A shiny.tags object with a <head> tag containing
custom CSS for DT tables.
Other DT:
ro_dt_table()
if (interactive()) { ui <- fluidPage( ro_dt_theme(sorting = FALSE), DTOutput("mytable") ) server <- function(input, output, session) { output$mytable <- renderDT(datatable(iris, rownames = FALSE, options(list(ordering=FALSE)))) } shinyApp(ui, server) }if (interactive()) { ui <- fluidPage( ro_dt_theme(sorting = FALSE), DTOutput("mytable") ) server <- function(input, output, session) { output$mytable <- renderDT(datatable(iris, rownames = FALSE, options(list(ordering=FALSE)))) } shinyApp(ui, server) }
This function implements a stylized theme for gt tables.
ro_gt_theme(df, ROfont = FALSE, ...)ro_gt_theme(df, ROfont = FALSE, ...)
df |
Dataframe. |
ROfont |
Default is FALSE, will change to TRUE for next major release (1.0.0). If Rijksoverheid font is not available on your device, Verdana is used, then Arial, then the first font found on your device, whichever is installed first. |
... |
For internal use. Leave empty. |
gt table object.
## Not run: ro_gt_theme(df) ## End(Not run)## Not run: ro_gt_theme(df) ## End(Not run)