If you use a bs_accordion_sidebar()
, you will have to call the function
use_bs_accordion_sidebar()
somewhere in your UI. This attaches some
JavaScript needed for your accordion sidebar to work properly.
All of these functions return a bsplus_accsidebar
object,
(which is also an htmltools::tag
, <div/>
), so you can
compose an accordion sidebar by piping. There are three parts to this system:
A constructor function for the accordion-sidebar, bs_accordion_sidebar()
A function to set options for subsequent panels, bs_set_opts()
A function to append a panel-set to an accordion-sidebar, bs_append()
The verb append is used to signify that you can append an arbitrary
number of panels-sets to an accordion-sidebar.
For the constructor, bs_accordion_sidebar()
,
it is your responsibility to ensure that id
is unique
among HTML elements in your page. If you have non-unique id
's, strange things may
happen to your page.