{"id":13732957,"url":"https://github.com/ijlyttle/bsplus","last_synced_at":"2025-04-05T15:06:31.445Z","repository":{"id":46597212,"uuid":"50553069","full_name":"ijlyttle/bsplus","owner":"ijlyttle","description":"Shiny and R Markdown addons to Bootstrap 3","archived":false,"fork":false,"pushed_at":"2023-04-14T20:06:59.000Z","size":4115,"stargazers_count":148,"open_issues_count":44,"forks_count":21,"subscribers_count":12,"default_branch":"main","last_synced_at":"2025-03-29T14:07:26.652Z","etag":null,"topics":["bootstrap3","r","rmarkdown","shiny"],"latest_commit_sha":null,"homepage":"http://ijlyttle.github.io/bsplus/","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ijlyttle.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2016-01-28T03:46:15.000Z","updated_at":"2025-03-21T21:44:04.000Z","dependencies_parsed_at":"2023-09-24T18:12:27.356Z","dependency_job_id":null,"html_url":"https://github.com/ijlyttle/bsplus","commit_stats":{"total_commits":203,"total_committers":7,"mean_commits":29.0,"dds":"0.35467980295566504","last_synced_commit":"d3b56b268e774203a49747e6c572ce116597d089"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ijlyttle%2Fbsplus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ijlyttle%2Fbsplus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ijlyttle%2Fbsplus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ijlyttle%2Fbsplus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ijlyttle","download_url":"https://codeload.github.com/ijlyttle/bsplus/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247353745,"owners_count":20925329,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bootstrap3","r","rmarkdown","shiny"],"created_at":"2024-08-03T03:00:35.956Z","updated_at":"2025-04-05T15:06:31.429Z","avatar_url":"https://github.com/ijlyttle.png","language":"R","funding_links":[],"categories":["R","Tools","UI Components"],"sub_categories":["Packages","Bootstrap"],"readme":"# bsplus\n\n\u003c!-- badges: start --\u003e\n[![CRAN status](https://www.r-pkg.org/badges/version/bsplus)](https://cran.r-project.org/package=bsplus)\n[![R build status](https://github.com/ijlyttle/bsplus/workflows/R-CMD-check/badge.svg)](https://github.com/ijlyttle/bsplus/actions)\n[![Coverage Status](https://img.shields.io/codecov/c/github/ijlyttle/bsplus/main.svg)](https://codecov.io/github/ijlyttle/bsplus?branch=main)\n[![R-CMD-check](https://github.com/ijlyttle/bsplus/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/ijlyttle/bsplus/actions/workflows/R-CMD-check.yaml)\n\u003c!-- badges: end --\u003e\n\nPlease note that if you are viewing this page at this package's [pkgdown site](https://ijlyttle.github.io/bsplus/), 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](https://ijlyttle.github.io/bsplus/dev/). \n\n## Installation\n\nYou can install the latest released version from CRAN with:\n\n```\ninstall.packages(\"bsplus\")\n```\n\nor the latest development version from GitHub with:\n\n```R\n# install.packages(\"devtools\")\ndevtools::install_github(\"ijlyttle/bsplus\")\n```\n\n## Introduction\n\nTo see all of this in action, you are referred to the [getting-started article](https://ijlyttle.github.io/bsplus/articles/bsplus.html) at this package's **pkgdown** site. \n\nThe goals of this package are:\n\n- to provide a framework to use Bootstrap's JavaScript-markup API: https://getbootstrap.com/docs/3.3/javascript/\n- to provide functions that work for both **rmarkdown** HTML documents and for **shiny** apps - the only exceptions are some functions that work with only the UI side of **shiny**.\n- to promote composition of HTML using pipes.\n\n### Highlights\n\n#### Accordion-sidebar\n\nThis 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](https://ijlyttle.github.io/bsplus/articles/accordion_sidebar.html).\n\n#### Shiny-help links\n\nThese 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](https://ijlyttle.github.io/bsplus/articles/shiny_help_links.html).\n\n#### Carousel\n\nA carousel is a [Boostrap JavaScript component](https://getbootstrap.com/javascript/#carousel) used to enclose a set of (typically) images, providing controls to move slides back-and-forth - as shown in this [article](https://ijlyttle.github.io/bsplus/articles/carousel.html). 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**](https://github.com/thomasp85/gganimate).\n\n### Function families \n\nIn this package, there are function families for:\n\n- collapsible elements: `bs_collapse()`\n- accordion panels: `bs_accordion()`\n- accordion-sidebar sets: `bs_accordion_sidebar()`\n- tooltips: `bs_embed_tooltip()`\n- popovers: `bs_embed_popover()`\n- modals: `bs_modal()`\n- carousels: `bs_carousel()`\n\nThere are also helper functions:\n\n- embed help-links into **shiny** inputs: `shiny_iconlink()`, `shinyInput_label_embed()`\n- set `data-` and `aria-` attributes of tags: `bs_set_data()`, `bs_set_aria()`\n\n## Grammar and vocabulary\n\nOne 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_`.\n\nLet's start with the conventions used to name the functions:\n\n- `bs_noun()`, used to create a `tag`. For example, use `bs_accordion()` to create an accordion panel-set.\n\n- `bs_verb(tag, ...)`, used to take an action on a `tag`. For example, use `bs_append()` to append a panel to an accordion panel-set.\n\n- `bs_verb_noun(tag, ...)` used to take an action on a `tag` using a `thing`. For example, use `bs_embed_tooltip()` to embed a tooltip into a `tag`.\n\n- `use_bs_noun()` used to add a bit of Javascript to your HTML, just like the **shinyjs** function `useShinyJS()`. This is necessary for `bs_accordion_sidebar()`, `bs_embed_tooltip()`, or `bs_embed_popover()` to work properly.\n\n### Nouns\n\nOften 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.\n\nIn 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.\n\n### Verbs\n\n- `bs_append(tag, ...)` used to append something to a tag, perhaps a panel into an accordion-group.\n- `bs_attach_foo(tag, ...)` used to attach the `id` of an element (foo) to another tag, for example, you could create a modal window using `bs_modal()`, then you could *attach* the `id` of the modal window to the tag using `bs_attach_modal()`\n- `bs_emded_foo(tag, ...)` used to embed something (a foo) into a tag, for example, `bs_embed_tooltip()`\n- `bs_set_opts(tag, ...)` used to set some options for the items yet to be appended to a tag.\n\nLet's consider the differences between `append`, `attach`, and `embed`:\n\n- You can *append* more than one element to a tag, i.e., you could append multiple panels to an accordion-group.\n- You can *attach* only one id of a thing to a tag. When we are attaching, we attach the `id` of an element, not the element itself. However, we can attach an `id` of an element to more than one tag.\n- You can *embed* only one thing into a tag. i.e., into a given tag, you can embed a tooltip or a popover, modifying the tag's attributes and setting a child element in the tag.\n\n## Acknowledgments\n\nThis package draws inspiration from [**shinyBS**](https://ebailey78.github.io/shinyBS/), written by Eric Bailey, and leans heavily on [**htmltools**](https://CRAN.R-project.org/package=htmltools), written by RStudio.\n\n## Code of conduct\n\nPlease note that this project is released with a [Contributor Code of Conduct](https://ijlyttle.github.io/bsplus/CONDUCT.html). By participating in this project you agree to abide by its terms.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fijlyttle%2Fbsplus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fijlyttle%2Fbsplus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fijlyttle%2Fbsplus/lists"}