setPersp: Custom perspective effect

Description Usage Arguments Examples

View source: R/setPersp.R

Description

Allow to apply a perspective effect on a given element.

Usage

1
2
3
4
5
6
7
8
9
setPersp(
  id = NULL,
  class = NULL,
  direction = "Y",
  angle = 45,
  depth = 600,
  side = "left",
  hover = FALSE
)

Arguments

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.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
 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) { }
  )
}

DivadNojnarg/shinyEffects documentation built on May 18, 2021, 7:09 p.m.