bsplus

CRAN status R build status Coverage Status R-CMD-check

Please note that if you are viewing this page at this package’s pkgdown site, despite the “released” tag, this site represents a recent development version of this package. The most-recent version of the development package has its own pkgdown site.

Installation

You can install the latest released version from CRAN with:

install.packages("bsplus")

or the latest development version from GitHub with:

# install.packages("devtools")
devtools::install_github("ijlyttle/bsplus")

Introduction

To see all of this in action, you are referred to the getting-started article at this package’s pkgdown site.

The goals of this package are:

Highlights

Accordion-sidebar

This family of functions lets you build another dimension to your shiny apps, although you can still use it rmarkdown HTML documents, explained further in this article.

These functions make it easier to incorporate help-documentation into your shiny apps - functions for incorporating tooltips, popovers, and modals into the labels of shiny inputs, explained further in this article.

A carousel is a Boostrap JavaScript component used to enclose a set of (typically) images, providing controls to move slides back-and-forth - as shown in this article. I think that this could be a more-useful tool if an “easy” way can be found to populate a carousel with images produced by gganimate.

Function families

In this package, there are function families for:

There are also helper functions:

Grammar and vocabulary

One of the goals of this package is to implement consistent grammar and vocabulary. To keep the namespace clean(er), many of the functions have the prefix bs_.

Let’s start with the conventions used to name the functions:

Nouns

Often we use the words element and tag interchangeably - we are talking about HTML elements. In the grammar of this documentation (and package), it can be useful to think about direct objects and indirect objects, so the word tag is used to denote direct objects, and the words element or thing are used to denote indirect objects.

In the context of a set of piped functions, the first argument will always be the direct object; the name of the first argument of many functions is tag - you will be sending the tag through the pipe.

Verbs

Let’s consider the differences between append, attach, and embed:

Acknowledgments

This package draws inspiration from shinyBS, written by Eric Bailey, and leans heavily on htmltools, written by RStudio.

Code of conduct

Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.