productList: AdminLTE3 product list container

Description Usage Arguments Author(s) Examples

View source: R/useful-items.R

Description

productList creates a container to display commercial items in an elegant container. Insert in a box.

productListItem creates a product item to insert in productList.

Usage

1
2
3
productList(...)

productListItem(..., image = NULL, title = NULL, subtitle = NULL, color = NULL)

Arguments

...

product description.

image

image url, if any.

title

product name.

subtitle

product price.

color

price color. Valid color are listed below:

  • primary: \Sexpr[results=rd, stage=render]{bs4Dash:::rd_color_tag("#007bff")}.

  • secondary: \Sexpr[results=rd, stage=render]{bs4Dash:::rd_color_tag("#6c757d")}.

  • info: \Sexpr[results=rd, stage=render]{bs4Dash:::rd_color_tag("#17a2b8")}.

  • success: \Sexpr[results=rd, stage=render]{bs4Dash:::rd_color_tag("#28a745")}.

  • warning: \Sexpr[results=rd, stage=render]{bs4Dash:::rd_color_tag("#ffc107")}.

  • danger: \Sexpr[results=rd, stage=render]{bs4Dash:::rd_color_tag("#dc3545")}.

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
# Box with productList
if (interactive()) {
 library(shiny)
 library(bs4Dash)
 
 shinyApp(
  ui = dashboardPage(
    dashboardHeader(),
    dashboardSidebar(),
    dashboardBody(
     box(
      title = "Product List",
      status = "primary",
      productList(
        productListItem(
          image = "https://www.pngmart.com/files/1/Haier-TV-PNG.png", 
          title = "Samsung TV", 
          subtitle = "$1800", 
          color = "warning",
          "This is an amazing TV, but I don't like TV!"
        ),
        productListItem(
          image = "https://upload.wikimedia.org/wikipedia/commons/7/77/IMac_Pro.svg", 
          title = "Imac 27", 
          subtitle = "$4999", 
          color = "danger",
          "This is were I spend most of my time!"
        )
      )
     )
    ),
    title = "Product List"
  ),
  server = function(input, output) { }
 )
}

hiplot/bs4Dash2 documentation built on Dec. 20, 2021, 3:51 p.m.