By the end of this session, you should be able to:
{bslib}bslib::bs_themer(){thematic}brand.yml that works with shiny apps<div class="form-group shiny-input-container">
<label class="control-label" id="dept-label" for="dept">
Select Department
</label>
<div>
<select id="dept" class="form-control">
<option value="Ancient Near Easter Art" selected>Ancient Near Easter Art</option>
<option value="American">American</option>
</select>
</div>
</div>{bslib}{bslib}?brand.yml{bslib}layout_sidebar()layout_column_wrap()layout_columns()page_sidebar()/sidebar()page_navbar()/ navbar()page_fillable()/layout_runApp("layouts/app_card.R")page_sidebar()runApp("layouts/app_sidebar.R")layout_column_wrap()runApp("layouts/app_layout_column.R")See runApp("layouts/app_bslib_box_dynamic.R")
Modify the value_box code in layouts/app_bslib_box_layout.R. Try out the following:
If you like, paste it into the Cascadia-R slack channel.
runApp("layouts/app_navbar.R")<div class="form-group shiny-input-container">
<label class="control-label" id="dept-label" for="dept">
Select Department
</label>
<div>
<select id="dept" class="form-control">
<option value="Ancient Near Easter Art" selected>Ancient Near Easter Art</option>
<option value="American">American</option>
</select>
</div>
</div>Set of rules that define how HTML content is presented in the browser
{bslib} and {thematic}bslib::bs_themer() as an argument to bslib::ui_*() functionsthematic::thematic_theme() to the app code (before runApp())run_with_themer() on an app to style itTry running the following code below and change the background and foreground variables, as well as primary and maybe even the font. Cut and paste your bs_theme_update() code into the Slack to share your creation.
brand.ymlbrand.yml?_brand.ymlbrand.yml compatibilitybslib)thematic plot stylingrevealjs)brand.yml examplelogo: #set logo
small: owl-logo.png
medium: owl-logo.png
large: owl-logo.png
color:
palette: #set color values (for elements)
black: "#1A1A1A"
white: "#F7F7F7"
light-yellow: "#ECE58B"
grey: "#908D90"
pink: "#FFeD8F"
bg: "#413041"
fg: "#EEE8D5"
foreground: light-yellow #set colors for elements
background: bg
primary: grey
danger: pink
dark: "#413041"
typography: #set fonts
fonts:
- family: Roboto
source: google
base: Roboto
headings: Roboto
monospace: Courier_brand.yml with bslibgraph TD A["brand.yml"] --> B["bs_theme()"] B --> C["custom.scss"] B --> D["thematic"]
brand.yml takes precedencebs_theme()brand.yml into bslib() layouts and plots using thematic().scss file_brand.yml file and try uncommenting the various lines, especially foreground and backgroundapp_bs_themer.R and see changes.run_with_themer() for the app and apply the themes again_brand.yml affects the themes?brand.yml.scss file.Prioritizing accessibility leads to better UX!
{rintrojs}{cicerone} - but that project is now depracated{rintrojs} - walk through UI elements
introBox()data.step and data.intro to each UI element. tabPanel("Tree Explorer",
rintrojs::introjsUI(), #initialize rintrojs
actionButton("help", "Help", icon = icon("circle-question")),
introBox( #Wrapper for UI element
selectInput("covariates", "Click Box to Add Covariates",
choices = covariateNames, multiple=TRUE),
data.step = 1, #Step Number
data.intro = "<p>Welcome to the Palmer Penguin dataset. We're going to try to predict the Species of Penguin (Adelie, Chinstrap, Gentoo) using a conditional inference decision tree using the {party} package.
Click the selector box to start adding a feature to the model."
), #Wrapper for UI element
https://bit.ly/shinyowl/layouts/