Skip to content
Back to skills

Bslib

ASecurity

R bslib package for Bootstrap theming. Use for modern Bootstrap 5 themes in Shiny and R Markdown.

  • 5 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added June 5, 2026
datago

Security analysis

A100/100

Scanned June 5, 2026

npx -y skills add LeoLin990405/r-analytics-skill --skill bslib --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Bslib?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Bslib
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/leolin990405-bslib/badge)](https://www.skillsdirectory.com/skills/leolin990405-bslib)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: bslib
description: R bslib package for Bootstrap theming. Use for modern Bootstrap 5 themes in Shiny and R Markdown.
---

# bslib Package

Bootstrap theming for Shiny and R Markdown.

## Shiny Theme

```r
library(shiny)
library(bslib)

ui <- page_fluid(
  theme = bs_theme(
    bootswatch = "flatly",
    primary = "#0d6efd",
    font_scale = 1.1
  ),
  # UI content
)
```

## Bootswatch Themes

```r
# Available themes
bootswatch_themes()

# Use theme
bs_theme(bootswatch = "darkly")
bs_theme(bootswatch = "minty")
bs_theme(bootswatch = "sandstone")
```

## Custom Theme

```r
theme <- bs_theme(
  bg = "#ffffff",
  fg = "#000000",
  primary = "#0d6efd",
  secondary = "#6c757d",
  success = "#198754",
  info = "#0dcaf0",
  warning = "#ffc107",
  danger = "#dc3545",
  base_font = font_google("Roboto"),
  heading_font = font_google("Montserrat"),
  code_font = font_google("Fira Code")
)
```

## Layout Components

```r
# Cards
card(
  card_header("Title"),
  card_body("Content"),
  card_footer("Footer")
)

# Sidebar layout
page_sidebar(
  sidebar = sidebar("Sidebar content"),
  "Main content"
)

# Navbar
page_navbar(
  title = "App",
  nav_panel("Tab 1", "Content 1"),
  nav_panel("Tab 2", "Content 2")
)
```

## Value Boxes

```r
value_box(
  title = "Revenue",
  value = "$10,000",
  showcase = bsicons::bs_icon("currency-dollar"),
  theme = "success"
)
```

## Theme Picker (Dev)

```r
# Interactive theme customization
run_with_themer(shinyApp(ui, server))
```

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.