chatBox: Create a chat box for the main body of a dashboard.

Description Usage Arguments See Also

View source: R/boxes.R

Description

A chatBox displays chatMessages as main box content, an optinal contactList on header, and an optional newMessage reminder on header. The contactList are created by chatContactList which in turn contains multiple chatContacts.

Create a chat contact list for the chat box header.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
chatBox(..., textInputId, btnInputId, placeholder = "Type Message ...",
  title = "chatBox", status = "warning", solidHeader = FALSE,
  background = NULL, width = 6, height = NULL, admin = "Guang Yang",
  adminImg = paste0("ygdashboard", "-",
  as.character(utils::packageVersion("ygdashboard")), "/img/yg.jpg"),
  client = "Ex Machina", clientImg = paste0("ygdashboard", "-",
  as.character(utils::packageVersion("ygdashboard")), "/img/exmachina.jpg"),
  contactList = NULL, newMessage = NULL)

chatMessage(name, image, text, position = c("left", "right"),
  timestamp = "Just Now")

chatContactList(..., .list = NULL)

chatContact(name, image = NULL, date = "Just Now", text = NULL)

Arguments

...

For chat message, this should consist of chatMessages.

title

Optional title.

status

The status of the item This determines the item's background color. Valid statuses are listed in validStatuses.

solidHeader

Should the header be shown with a solid color background?

background

If NULL (the default), the background of the box will be white. Otherwise, a color string. Valid colors are listed in validColors.

width

The width of the box, using the Bootstrap grid system. This is used for row-based layouts. The overall width of a region is 12, so the default valueBox width of 4 occupies 1/3 of that width. For column-based layouts, use NULL for the width; the width is set by the column that contains the box.

height

The height of a box, in pixels or other CSS unit. By default the height scales automatically with the content.

.list

An optional list containing messages to put in the chatBox same as the ... arguments, but in list format. This can be useful when working with programmatically generated chatMessage.

...

For chat contacts, this should consist of chatContacts.

See Also

box for usage examples.

Other boxes: box, calendarBox, carouselBox, infoBox, socialWigetBox, tabBox, timelineBox, valueBox


gyang274/ygdashboard documentation built on Jan. 6, 2018, 12:50 a.m.