page_popup: Adds a modal dialog (popup) to a website

View source: R/page_popup.R

page_popupR Documentation

Adds a modal dialog (popup) to a website

Description

Adds a button which triggers a modal dialog (popup) with specified content.

Usage

page_popup(text = "Popup", ..., title = text, footer = NULL,
  wraps = NA, sizes = NA, breakpoints = NA, conditions = "",
  id = NULL)

Arguments

text

Text in the triggering button.

...

Elements to appear in the popup's body area.

title

Content to appear in the popup's header area. Defaults to text.

footer

A list of elements to include in the footer.

wraps

The class of wrapper to place elements in; either "row", "col", or "" (to not wrap the element). Can specify 1 for every element, or a different class for each element.

sizes

The relative size of each wrapper, between 1 and 12, or "auto"; default is equal size.

breakpoints

Bootstrap breakpoint of each wrapper; one of "" (extra small), "sm", "md", "lg", "xl", or "xxl".

conditions

A character for each element representing the conditions in which that should be showing (e.g., c("", "input_a == a", "")); "" means the element's display is not conditional. Adding "lock: " before the condition will disable inputs rather than hide the element.

id

Unique ID of the section.

Details

See the Bootstrap grid documentation.

Value

A character vector of the content to be added.

Examples

## Not run: 
page_popup(
  "<h1>Title</h1>",
  "<p>body</p>",
)

## End(Not run)

uva-bi-sdad/community documentation built on Oct. 12, 2023, 1:18 p.m.