bs_offcanvas | R Documentation |
Create a Bootstrap offcanvas
bs_offcanvas( id = "offcanvas", header, title = NULL, body, offcanvas_attr = c(class = "offcanvas offcanvas-start", tabindex = "-1", `aria-labelledby` = "offcanvasLabel"), header_attr = c(class = "offcanvas-header"), title_attr = c(class = "offcanvas-title", id = "offcanvasLabel"), body_attr = c(class = "offcanvas-body"), title_function = h5 )
id |
A string, the id for the div of the offcanvas. |
header |
A string, the HTML to display in the header of the offcanvas. |
title |
A string, the HTML to display in the title of the offcanvas. |
body |
A string, the HTML to display in the body of the offcanvas. |
offcanvas_attr |
A named list or named vector, names are attribute names and values are attribute values. Added to the div wrapping the offcanvas content. |
header_attr |
A named list or named vector, names are attribute names and values are attribute values. Added to the div wrapping the offcanvas header. |
title_attr |
A named list or named vector, names are attribute names and values are attribute values. Added to the tag containing the offcanvas title. |
body_attr |
A named list or named vector, names are attribute names and values are attribute values. Added to the div wrapping the offcanvas body. |
title_function |
A function, most likely from the html5 package, containing the attr parameter to be used to generate the title, defaults to h5. |
A string of HTML.
bs_offcanvas( header = "Hello", body = p("This is a offcanvas.") )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.