timeline: AdminLTE2 timeline block

Description Usage Arguments Author(s) Examples

Description

timelineBlock creates a timeline block that may be inserted in a box or outside.

timelineLabel creates a timeline label element to highlight an event.

timelineItem creates a timeline item that contains information for a given event like the title, description, date, ...

timelineItemMedia create a specific container for images.

timelineStart indicates a starting point.

timelineEnd indicates an end point.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
timelineBlock(..., reversed = TRUE, width = 6)

timelineLabel(..., color = NULL)

timelineItem(
  ...,
  icon = NULL,
  color = NULL,
  time = NULL,
  title = NULL,
  border = TRUE,
  footer = NULL
)

timelineItemMedia(image = NULL, height = NULL, width = NULL)

timelineStart(icon = shiny::icon("clock-o"), color = NULL)

timelineEnd(icon = shiny::icon("hourglass-end"), color = NULL)

Arguments

...

any element.

reversed

Whether the timeline is reversed or not.

width

media width in pixels.

color

item color: see here for a list of valid colors https://adminlte.io/themes/AdminLTE/pages/UI/general.html. See below:

  • light-blue (primary status): \Sexpr[results=rd, stage=install]{shinydashboardPlus:::rd_color_tag("#3c8dbc")}.

  • red (danger status): \Sexpr[results=rd, stage=install]{shinydashboardPlus:::rd_color_tag("#dd4b39")}.

  • green (success status): \Sexpr[results=rd, stage=install]{shinydashboardPlus:::rd_color_tag("#00a65a")}.

  • aqua (info status): \Sexpr[results=rd, stage=install]{shinydashboardPlus:::rd_color_tag("#00c0ef")}.

  • yellow (warning status): \Sexpr[results=rd, stage=install]{shinydashboardPlus:::rd_color_tag("#f39c12")}.

  • blue: \Sexpr[results=rd, stage=install]{shinydashboardPlus:::rd_color_tag("#0073b7")}.

  • navy: \Sexpr[results=rd, stage=install]{shinydashboardPlus:::rd_color_tag("#001F3F")}.

  • teal: \Sexpr[results=rd, stage=install]{shinydashboardPlus:::rd_color_tag("#39CCCC")}.

  • olive: \Sexpr[results=rd, stage=install]{shinydashboardPlus:::rd_color_tag("#3D9970")}.

  • lime: \Sexpr[results=rd, stage=install]{shinydashboardPlus:::rd_color_tag("#01FF70")}.

  • orange: \Sexpr[results=rd, stage=install]{shinydashboardPlus:::rd_color_tag("#FF851B")}.

  • fuchsia: \Sexpr[results=rd, stage=install]{shinydashboardPlus:::rd_color_tag("#F012BE")}.

  • purple: \Sexpr[results=rd, stage=install]{shinydashboardPlus:::rd_color_tag("#605ca8")}.

  • maroon: \Sexpr[results=rd, stage=install]{shinydashboardPlus:::rd_color_tag("#D81B60")}.

  • black: \Sexpr[results=rd, stage=install]{shinydashboardPlus:::rd_color_tag("#111")}.

  • gray: \Sexpr[results=rd, stage=install]{shinydashboardPlus:::rd_color_tag("#d2d6de")}.

icon

item icon. Expect icon.

time

item date or time.

title

item title.

border

Whether to display a border between the header and the body. TRUE by default.

footer

item footer if any.

image

media url or path.

height

media height in pixels.

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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
if (interactive()) {
 library(shiny)
 library(shinydashboard)
 library(shinydashboardPlus)
 
 shinyApp(
  ui = dashboardPage(
    dashboardHeader(),
    dashboardSidebar(),
    dashboardBody(
     h3("When Reversed = TRUE, can be displayed inside a box"),
     box(
      title = "Timeline",
      status = "info",
      timelineBlock(
       width = 12,
       timelineEnd(color = "red"),
       timelineLabel(2018, color = "teal"),
       timelineItem(
        title = "Item 1",
        icon = icon("gears"),
        color = "olive",
        time = "now",
        footer = "Here is the footer",
        "This is the body"
       ),
       timelineItem(
        title = "Item 2",
        border = FALSE
       ),
       timelineLabel(2015, color = "orange"),
       timelineItem(
        title = "Item 3",
        icon = icon("paint-brush"),
        color = "maroon",
        timelineItemMedia(image = "https://placehold.it/150x100"),
        timelineItemMedia(image = "https://placehold.it/150x100")
       ),
       timelineStart(color = "purple")
      )
     ),
     h3("When Reversed = FALSE, can be displayed out of a box"),
     timelineBlock(
       reversed = FALSE,
       timelineEnd(color = "red"),
       timelineLabel(2018, color = "teal"),
       timelineItem(
        title = "Item 1",
        icon = icon("gears"),
        color = "olive",
        time = "now",
        footer = "Here is the footer",
        "This is the body"
       ),
       timelineItem(
        title = "Item 2",
        border = FALSE
       ),
       timelineLabel(2015, color = "orange"),
       timelineItem(
        title = "Item 3",
        icon = icon("paint-brush"),
        color = "maroon",
        timelineItemMedia(image = "https://placehold.it/150x100"),
        timelineItemMedia(image = "https://placehold.it/150x100")
       ),
       timelineStart(color = "purple")
     )
    ),
    title = "timelineBlock"
  ),
  server = function(input, output) { }
 )
}

shinydashboardPlus documentation built on Sept. 16, 2021, 1:06 a.m.