Questions tagged [bslib]

Use this tag for questions about bslib, an R package which provides tools for customizing Bootstrap themes directly from R.

53 questions
7
votes
1 answer

How to find out which scss variable is used by rmarkdown / bslib to color each page element?

How can i find out which bootstrap scss variable is used by rmarkdown / bslib to color page elements? e.g. for coloring the TOC background? Here is a page's yaml output: html_document: self_contained: false theme: version: 4 …
Brani
  • 6,454
  • 15
  • 46
  • 49
6
votes
1 answer

on bslib package and shinydashboard

This a question on bslib, by the way, a great package. I'd like to know if it is primarily intended for shiny and flexdashborad or it will be also operative with shinydashboard. Thanks!
Sebastian
  • 95
  • 6
3
votes
1 answer

Using bslib::accordion as a replacement for shinydashboard::sidebarMenu

How can I use bslib for a similar behaviour as shinydashboard? In particular, I am interested in a sidebar with accordions. When one item is selected, I would like to select a predefined page_fluid object. I tried to define an accordion that looks…
Karsten W.
  • 17,826
  • 11
  • 69
  • 103
2
votes
1 answer

Dynamically change the class of a bslib value box in Shiny

I use a value_box from the bslib-package to display values in a Shiny dashboard. The shown value depends on user input via various selectors which requires me to dynamically update the value box. This works well for the title and value using the…
Dave
  • 960
  • 6
  • 13
2
votes
1 answer

Expand Plotly output in Quarto HTML document to full screen

I would like to make plotly output from a chunk in a Quarto HTML document expandable to a full screen view. bslib seems to offer such a solution via card(full_screen = TRUE,...) which is documented at…
Matt Summersgill
  • 4,054
  • 18
  • 47
2
votes
1 answer

Selecting a tab inside nav_menu toggles the dropdown

I have a question about nav_menu and nav_select from bslib. When I try to select a tab that is nested inside a nav_menu, the page navigates to the new tab, but it also opens the nav_menu dropdown list as it were clicked, instead of selected from the…
teofil
  • 2,344
  • 1
  • 8
  • 17
2
votes
2 answers

bslib::value_box within bs4Dash displays not as intended

I am trying to adapt for my own application the last example in this documentation of creating valueBoxes with "showcase"d sparklines made interactive via plotly. The example does not go as far as rendering within a shiny app and the bslib package…
bikeactuary
  • 447
  • 4
  • 18
2
votes
1 answer

bslib card's `full_screen` feature is not working within shiny but works within markdown

library(shiny) library(bslib) #> #> Attaching package: 'bslib' #> The following object is masked from 'package:utils': #> #> page ui <- fluidPage( bslib::card(full_screen = T, bslib::card_header("Full screen is not working…
Riyadh
  • 33
  • 3
2
votes
1 answer

Collapsible sidebar using bslib without additional JS?

I'm looking to shift from {shinydashboard} and {bs4Dash} towards {bslib} while keeping the nice feature of having a global collapsible sidebar in my apps. In this {bslib} vignette some functions such as layout_sidebar() or page_navbar() are used as…
Michaël Weber
  • 136
  • 1
  • 8
2
votes
1 answer

Change global font size in bookdown bs4 HTML book?

I have created a bs4 theme bookdown book. However, I am having no luck changing the global font size to be smaller. In the _output.yml file, I have added the following bslib options: font_scale and font-size-base, but neither had any effect on the…
max
  • 4,141
  • 5
  • 26
  • 55
1
vote
1 answer

How to keep a consistent bslib::value_box height in a shiny app when one value_box should change background color dynamically?

I would like to display several value boxes in a Shiny application. One of the valueboxes should change colors based on the selected value that will be displayed. In the example below, the color will change if input the value is above a certain…
Leon Samson
  • 405
  • 3
  • 12
1
vote
1 answer

Make bslib::card_header dynamic

I am building a shiny server module. The UI part is a bslib::card(), like this: my_mod_ui <- function(id) { ns <- shiny::NS(id) bslib::card( id=id, full_screen = TRUE, # the following does not work properly: …
Karsten W.
  • 17,826
  • 11
  • 69
  • 103
1
vote
2 answers

How to line up ui elements using style argument in shiny app that uses bslib 5

I developed a shiny app ui layout that works with bslib 4, but when I switch to bslib 5 my formatting falls apart. I'm not sure why? Here is my code library(shiny) library(bslib) ui <- navbarPage("My App", id = "navbar", theme =…
ifoxfoot
  • 195
  • 7
1
vote
2 answers

Can bslib nested card fullscreen behavior show just the nested card?

When I use the option full_screen = TRUE with nested cards, clicking the fullscreen icon maximizes both cards. Can it be set to show just the internal card as fullscreen? library(shiny) library(bslib) ui = page( card( full_screen = F, …
matt
  • 318
  • 3
  • 11
1
vote
1 answer

Customising DT::datatable using css in a shiny app that uses bslib

I'm trying to apply custom css styling to a DT::datatable in a shiny app. When a user selects a row in the table, I want the selected row to be yellow with black text, instead of the default blue with white text. I'm having trouble doing this…
rosella
  • 38
  • 5
1
2 3 4