Tabler for R

Lifecycle: stable R-CMD-check CRAN status Test coverage BuyMeACoffee

A modern dashboard framework for R using the beautiful Tabler Bootstrap theme. To render Tabler apps using a server, see Tabler Server.

Installation

Development version:

# using the R-Universe
install.packages("tabler", repos = "https://pachadotdev.r-universe.dev")

# or using the remotes package
remotes::install_github("pachadotdev/tabler")

Available layouts

  • Boxed (Default): Basic dashboard with top navbar and constrained width content area. This is the default layout.
  • Combo: Combines vertical sidebar navigation with top header.
  • Condensed: Compact layout with reduced padding/margins.
  • Fluid: Full-width layout without container constraints.
  • Fluid Vertical: Full-width layout with vertical sidebar.
  • Horizontal: Layout with horizontal navigation menu.
  • Navbar Dark: Layout with dark navbar theme.
  • Navbar Overlap: Layout where content overlaps with navbar for a modern look.
  • Navbar Sticky: Layout with sticky/fixed navbar that stays at the top when scrolling.
  • RTL: Right-to-left layout for Hebrew/Arabic languages.
  • Vertical: Vertical sidebar layout without top navbar.
  • Vertical Right: Vertical sidebar positioned on the right side.
  • Vertical Transparent: Vertical layout with transparent sidebar.

Note: tabler allows to pass layout = "navbar" and layout = "navbar-sticky-dark" which are wrappers for a light theme navbar layout and a dark theme sticky navbar layour, respectively.

Quick Start

The full documentation for each function with examples is here.

Single-script app

The following example uses the “combo” layout to recreate Shiny’s geyser example. The theme options can be adjusted from the code or the theme setting icon that can be hidden. See the example here or the multiple examples here.

layout-geyser
layout-geyser
layout-geyser

I added a UI-only example to cover the different input elements and their options here.

select
sliders
dates
radio-checkboxes
text-numeric-buttons
flags-social

Modular R package app

Create an R package with modular components:

library(tabler)

pkg_template("mydashboard")

See the package skeleton here. pkg_template() adds a DESCRIPTION and other components required for an R package to work.

I built a full dashboard that uses environment variables, SQL connections, caching, and D3 plots here.

Loading/Progress bar

I added an example with a progress bar here. The progress bar hides the app while the new plots or other elements are computed.

progress-bar

Login page

This R package provides a login page that you can connect to a database or another system. The examples cover:

sign-in
sign-out

Does it run Doom?

Yes. I tested the WebSocket compiling and running the Doom WASM version. See the code here.

doom

Differences with Shiny

  • Static plots (base, ggplot, tinyplot, etc.) render as SVG and can be downloaded with the right click button.
  • URLs are of the form my.site/myapp?year=2000&country=gbr instead of my.site/myapp?year=2000&country=%22gbr%22
  • Shiny uses camel case syntax while here I use snake case.

License

Apache License (>= 2)

Loading...