Learn R Programming

tablerDash (version 0.1.5)

tablerAvatar: Create a Boostrap 4 avatar

Description

Build a tabler avatar

Usage

tablerAvatar(name = NULL, url = NULL, size = NULL, status = NULL, color = NULL)

Arguments

name

Avatar placeholder. If not NULL, url cannot be used.

url

Avatar image if any. If not NULL, name cannot be used.

size

Avatar size. NULL, "sm", "md", "lg", "xl" or "xxl".

status

Avatar status. See https://preview.tabler.io/docs/colors.html for valid statuses.

color

Avatar background color. See https://preview.tabler.io/docs/colors.html for valid colors.

Author

David Granjon, dgranjon@ymail.com

Examples

Run this code
if(interactive()){
 library(shiny)
 library(tablerDash)

 shiny::shinyApp(
   ui = tablerDashPage(
    navbar = NULL,
    footer = NULL,
    title = "test",
    body = tablerDashBody(
     tablerAvatar(
      name = "DG",
      size = "xxl"
     ),
     tablerAvatar(
      name = "DG",
      color = "orange"
     ),
     tablerAvatar(
      name = "DG",
      status = "warning"
     ),
     tablerAvatar(url = "https://image.flaticon.com/icons/svg/145/145852.svg")
    )
   ),
   server = function(input, output) {}
 )
}

Run the code above in your browser using DataLab