Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

setShadow

Custom shadows


Description

Allow to apply a shadow on a given element.

Usage

setShadow(id = NULL, class = NULL)

Arguments

id

Use this argument if you want to target an individual element.

class

The element to which the shadow should be applied. For example, class is set to box.

Examples

if (interactive()) {

  library(shiny)
  library(shinydashboard)
  library(shinydashboardPlus)
  library(shinyWidgets)

  boxTag <- box(
   title = "Closable box, with label",
   closable = TRUE,
   label = boxLabel(
    text = 1,
    status = "danger"
   ),
   status = "warning",
   solidHeader = FALSE,
   collapsible = TRUE,
   p("Box Content")
  )

  shinyApp(
   ui = dashboardPage(
     header = dashboardHeader(),
     sidebar = dashboardSidebar(),
     body = dashboardBody(

      setShadow(class = "box"),
      setShadow(id = "my-progress"),

      tags$h2("Add shadow to the box class"),
      fluidRow(boxTag, boxTag),
      tags$h2("Add shadow only to the first element using id"),
      tagAppendAttributes(
       shinydashboardPlus::progressBar(
        value = 10,
        striped = TRUE,
        animated = TRUE
       ),
       id = "my-progress"
      ),
      shinydashboardPlus::progressBar(
        value = 50,
        status = "warning"
      ),
      shinydashboardPlus::progressBar(
        value = 20,
        status = "danger"
      )
     ),
     controlbar = dashboardControlbar(),
     title = "DashboardPage"
   ),
   server = function(input, output) { }
  )
}

shinyWidgets

Custom Inputs Widgets for Shiny

v0.6.0
GPL-3
Authors
Victor Perrier [aut, cre, cph], Fanny Meyer [aut], David Granjon [aut], Ian Fellows [ctb] (Methods for mutating vertical tabs & updateMultiInput), Wil Davis [ctb] (numericRangeInput function), Spencer Matthews [ctb] (autoNumeric methods), JavaScript and CSS libraries authors [ctb, cph] (All authors are listed in LICENSE.md)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.