Title: | Customize Your Web Apps with Fancy Effects |
---|---|
Description: | Add fancy CSS effects to your 'shinydashboards' or 'shiny' apps. 100% compatible with 'shinydashboardPlus' and 'bs4Dash'. |
Authors: | David Granjon [aut, cre], RinteRface [cph] |
Maintainer: | David Granjon <[email protected]> |
License: | GPL (>= 2) | file LICENSE |
Version: | 0.2.0 |
Built: | 2024-10-24 02:42:25 UTC |
Source: | https://github.com/rinterface/shinyeffects |
Allow to apply a blur effect on a given element.
blurContainer(tag)
blurContainer(tag)
tag |
Element to apply the blur effect. |
Allow to apply a blur effect on a given element.
setBlur(intensity = 2)
setBlur(intensity = 2)
intensity |
Blur intensity. |
if (interactive()) { library(shiny) library(shinydashboard) library(shinydashboardPlus) library(shinyEffects) boxTag <- box( title = "A box", status = "warning", solidHeader = FALSE, collapsible = TRUE, p("Box Content") ) shinyApp( ui = dashboardPage( header = dashboardHeader(), sidebar = dashboardSidebar(), body = dashboardBody( setBlur(), fluidRow(blurContainer(boxTag), boxTag) ), controlbar = dashboardControlbar(), title = "DashboardPage" ), server = function(input, output) { } ) }
if (interactive()) { library(shiny) library(shinydashboard) library(shinydashboardPlus) library(shinyEffects) boxTag <- box( title = "A box", status = "warning", solidHeader = FALSE, collapsible = TRUE, p("Box Content") ) shinyApp( ui = dashboardPage( header = dashboardHeader(), sidebar = dashboardSidebar(), body = dashboardBody( setBlur(), fluidRow(blurContainer(boxTag), boxTag) ), controlbar = dashboardControlbar(), title = "DashboardPage" ), server = function(input, output) { } ) }
Allow to apply a perspective effect on a given element.
setPersp( id = NULL, class = NULL, direction = "Y", angle = 45, depth = 600, side = "left", hover = FALSE )
setPersp( id = NULL, class = NULL, direction = "Y", angle = 45, depth = 600, side = "left", hover = FALSE )
id |
Use this argument if you want to target an individual element. |
class |
The element to which the persp should be applied. |
direction |
Perspective direction: "X" or "Y". |
angle |
Rotation intensity: numeric, 45 by default. |
depth |
Perspective depth: numeric, 600 by default. |
side |
Perspective side: "left" or "right". |
hover |
Whether to apply the persp effect on hover. FALSE by default. |
if (interactive()) { library(shiny) library(shinydashboard) library(shinydashboardPlus) library(shinyEffects) boxTag <- box( id = "mybox", title = "A box", status = "warning", solidHeader = FALSE, collapsible = TRUE, p("Box Content") ) shinyApp( ui = dashboardPage( header = dashboardHeader(), sidebar = dashboardSidebar(), body = dashboardBody( setPersp(id = "mybox", angle = 45), tags$h2("Add Perspective effects"), br(), boxTag ), controlbar = dashboardControlbar(), title = "DashboardPage" ), server = function(input, output) { } ) }
if (interactive()) { library(shiny) library(shinydashboard) library(shinydashboardPlus) library(shinyEffects) boxTag <- box( id = "mybox", title = "A box", status = "warning", solidHeader = FALSE, collapsible = TRUE, p("Box Content") ) shinyApp( ui = dashboardPage( header = dashboardHeader(), sidebar = dashboardSidebar(), body = dashboardBody( setPersp(id = "mybox", angle = 45), tags$h2("Add Perspective effects"), br(), boxTag ), controlbar = dashboardControlbar(), title = "DashboardPage" ), server = function(input, output) { } ) }
Allow to apply a pulse animation on a given element.
setPulse(id = NULL, class = NULL, duration = 1, iteration = 5)
setPulse(id = NULL, class = NULL, duration = 1, iteration = 5)
id |
Use this argument if you want to target an individual element. |
class |
The element to which the pulse should be applied. For example, class is set to box. All elements having the box class will be affected. |
duration |
Pulse frequency. 1s by default. |
iteration |
Pulse iteration. 5 by default. |
if (interactive()) { library(shiny) library(shinydashboard) library(shinydashboardPlus) library(shinyEffects) boxTag <- boxPlus( title = "A box", status = "warning", solidHeader = FALSE, collapsible = TRUE, p("Box Content") ) shinyApp( ui = dashboardPage( header = dashboardHeader(), sidebar = dashboardSidebar(), body = dashboardBody( setPulse(class = "box", duration = 1, iteration = 100), setPulse(id = "my-progress", duration = 1, iteration = 100), tags$h2("Add pulse animation to the box class"), fluidRow(boxTag, boxTag), tags$h2("Add pulse animation only to the first element using id"), tagAppendAttributes( progressBar( value = 10, striped = TRUE, animated = TRUE, vertical = TRUE ), id = "my-progress" ), progressBar( value = 50, status = "warning", size = "xs", vertical = TRUE ) ), controlbar = dashboardControlbar(), title = "DashboardPage" ), server = function(input, output) { } ) }
if (interactive()) { library(shiny) library(shinydashboard) library(shinydashboardPlus) library(shinyEffects) boxTag <- boxPlus( title = "A box", status = "warning", solidHeader = FALSE, collapsible = TRUE, p("Box Content") ) shinyApp( ui = dashboardPage( header = dashboardHeader(), sidebar = dashboardSidebar(), body = dashboardBody( setPulse(class = "box", duration = 1, iteration = 100), setPulse(id = "my-progress", duration = 1, iteration = 100), tags$h2("Add pulse animation to the box class"), fluidRow(boxTag, boxTag), tags$h2("Add pulse animation only to the first element using id"), tagAppendAttributes( progressBar( value = 10, striped = TRUE, animated = TRUE, vertical = TRUE ), id = "my-progress" ), progressBar( value = 50, status = "warning", size = "xs", vertical = TRUE ) ), controlbar = dashboardControlbar(), title = "DashboardPage" ), server = function(input, output) { } ) }
Allow to apply a shadow on a given element.
setShadow(id = NULL, class = NULL)
setShadow(id = NULL, class = NULL)
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. |
if (interactive()) { library(shiny) library(shinydashboard) library(shinydashboardPlus) library(shinyEffects) boxTag <- box( title = "A box", 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( progressBar( value = 10, striped = TRUE, animated = TRUE, vertical = TRUE ), id = "my-progress" ), progressBar( value = 50, status = "warning", size = "xs", ) ), controlbar = dashboardControlbar(), title = "DashboardPage" ), server = function(input, output) { } ) }
if (interactive()) { library(shiny) library(shinydashboard) library(shinydashboardPlus) library(shinyEffects) boxTag <- box( title = "A box", 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( progressBar( value = 10, striped = TRUE, animated = TRUE, vertical = TRUE ), id = "my-progress" ), progressBar( value = 50, status = "warning", size = "xs", ) ), controlbar = dashboardControlbar(), title = "DashboardPage" ), server = function(input, output) { } ) }
Allow to apply a shake animation on a given element.
setShake(id = NULL, class = NULL, duration = 0.82)
setShake(id = NULL, class = NULL, duration = 0.82)
id |
Use this argument if you want to target an individual element. |
class |
The element to which the shake should be applied. For example, class is set to box. |
duration |
Shake total duration. 0.82s by default. |
if (interactive()) { library(shiny) library(shinydashboard) library(shinydashboardPlus) library(shinyEffects) boxTag <- box( title = "A box", status = "warning", solidHeader = FALSE, collapsible = TRUE, p("Box Content") ) shinyApp( ui = dashboardPage( header = dashboardHeader(), sidebar = dashboardSidebar(), body = dashboardBody( setShake(class = "box"), setShake(id = "my-progress"), tags$h2("Add shake to the box class"), fluidRow(boxTag, boxTag), tags$h2("Add shake only to the first element using id"), tagAppendAttributes( progressBar( value = 10, striped = TRUE, animated = TRUE, vertical = TRUE ), id = "my-progress" ), progressBar( value = 50, status = "warning", size = "xs", ) ), controlbar = dashboardControlbar(), title = "Shake Effect" ), server = function(input, output) { } ) }
if (interactive()) { library(shiny) library(shinydashboard) library(shinydashboardPlus) library(shinyEffects) boxTag <- box( title = "A box", status = "warning", solidHeader = FALSE, collapsible = TRUE, p("Box Content") ) shinyApp( ui = dashboardPage( header = dashboardHeader(), sidebar = dashboardSidebar(), body = dashboardBody( setShake(class = "box"), setShake(id = "my-progress"), tags$h2("Add shake to the box class"), fluidRow(boxTag, boxTag), tags$h2("Add shake only to the first element using id"), tagAppendAttributes( progressBar( value = 10, striped = TRUE, animated = TRUE, vertical = TRUE ), id = "my-progress" ), progressBar( value = 50, status = "warning", size = "xs", ) ), controlbar = dashboardControlbar(), title = "Shake Effect" ), server = function(input, output) { } ) }
Allow to apply a zoom on a given element.
setZoom(id = NULL, class = NULL, scale = 1.05)
setZoom(id = NULL, class = NULL, scale = 1.05)
id |
Use this argument if you want to target an individual element. |
class |
The element to which the zoom should be applied. For example, class is set to box. |
scale |
Zoom scale. 1.05 by default (5% bigger than the normal). We do not recommand using higher values, except in some particular cases. |
if (interactive()) { library(shiny) library(shinydashboard) library(shinydashboardPlus) library(shinyEffects) boxTag <- box( title = "A box", status = "warning", solidHeader = FALSE, collapsible = TRUE, p("Box Content") ) shinyApp( ui = dashboardPage( header = dashboardHeader(), sidebar = dashboardSidebar(), body = dashboardBody( setZoom(class = "box"), setZoom(id = "my-progress"), tags$h2("Add zoom to the box class"), fluidRow(boxTag, boxTag), tags$h2("Add zoom only to the first element using id"), tagAppendAttributes( progressBar( value = 10, striped = TRUE, animated = TRUE, vertical = TRUE ), id = "my-progress" ), progressBar( value = 50, status = "warning", size = "xs", ) ), controlbar = dashboardControlbar(), title = "DashboardPage" ), server = function(input, output) { } ) }
if (interactive()) { library(shiny) library(shinydashboard) library(shinydashboardPlus) library(shinyEffects) boxTag <- box( title = "A box", status = "warning", solidHeader = FALSE, collapsible = TRUE, p("Box Content") ) shinyApp( ui = dashboardPage( header = dashboardHeader(), sidebar = dashboardSidebar(), body = dashboardBody( setZoom(class = "box"), setZoom(id = "my-progress"), tags$h2("Add zoom to the box class"), fluidRow(boxTag, boxTag), tags$h2("Add zoom only to the first element using id"), tagAppendAttributes( progressBar( value = 10, striped = TRUE, animated = TRUE, vertical = TRUE ), id = "my-progress" ), progressBar( value = 50, status = "warning", size = "xs", ) ), controlbar = dashboardControlbar(), title = "DashboardPage" ), server = function(input, output) { } ) }
A gallery of all components available in shinyEffects.
shinyEffectsGallery()
shinyEffectsGallery()
if (interactive()) { shinyEffectsGallery() }
if (interactive()) { shinyEffectsGallery() }