socialBox: AdminLTE2 social box

Description Usage Arguments Author(s) Examples

View source: R/boxes.R

Description

Create social box

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
socialBox(
  ...,
  src = NULL,
  title = NULL,
  subtitle = NULL,
  width = 6,
  height = NULL,
  collapsible = TRUE,
  closable = TRUE,
  comments = NULL,
  footer = NULL,
  footer_padding = TRUE
)

Arguments

...

body content. May include attachmentBlock for instance.

src

header image, if any.

title

box title.

subtitle

box subtitle.

width

box width (between 1 and 12).

height

box height.

collapsible

If TRUE, display a button in the upper right that allows the user to collapse the box.

closable

If TRUE, display a button in the upper right that allows the user to close the box.

comments

slot for boxComments.

footer

box footer, if any.

footer_padding

TRUE by default: whether the footer has margin or not.

Author(s)

David Granjon, dgranjon@ymail.com

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
35
36
37
if (interactive()) {
 library(shiny)
 library(shinydashboard)
 shinyApp(
  ui = dashboardPage(
    dashboardHeader(),
    dashboardSidebar(),
    dashboardBody(
     socialBox(
      title = "Social Box",
      subtitle = "example-01.05.2018",
      src = "https://adminlte.io/themes/AdminLTE/dist/img/user4-128x128.jpg",
      "Some text here!",
      attachmentBlock(
       src = "https://adminlte.io/themes/AdminLTE/dist/img/photo1.png",
       title = "Test",
       title_url = "https://google.com",
       "This is the content"
      ),
      comments = tagList(
       lapply(X = 1:10, FUN = function(i) {
        boxComment(
          src = "https://adminlte.io/themes/AdminLTE/dist/img/user3-128x128.jpg",
          title = paste("Comment", i),
          date = "01.05.2018",
          paste0("The ", i, "-th comment")
        )
       })
      ),
      footer = "The footer here!"
     )
    ),
    title = "socialBox"
  ),
  server = function(input, output) { }
 )
}

dsciencelabs/shinydashboardPlus documentation built on Dec. 20, 2021, 2:10 a.m.