Description Usage Arguments Value Examples
If your page renders weirdly, it might be because a crosstalk component like
crosstalk::filter_select()
is injecting unexpected css into
your page, which happens because they try to use the Bootstrap css library by
default. The unstrap()
function prevents that from happening.
1 | unstrap(x)
|
x |
a crosstalk component, such as |
The component x
but with any "boostrap"
dependency removed from its
html_dependencies
attribute.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | # The fs object will inject css into your page.
if (requireNamespace("crosstalk", quietly = TRUE)) {
df <- crosstalk::SharedData$new(mtcars)
fs <- crosstalk::filter_select(
id = "myselector",
label = "select something",
sharedData = df,
group = ~cyl
)
# The fs_nobootstrap object won't inject css into your page.
fs_nobootstrap <- unstrap(fs)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.