bsselect: bsselect

Description Usage Arguments See Also

Description

Function to generate a drop-down menu with the bootstrap-select jQuery plugin in an R Markdown document

Usage

1
2
3
4
5
6
bsselect(vector, selected = NULL, type = c("text", "img", "iframe"),
  frame_height = "500", frame_width = "100%", align_right = FALSE,
  dropup_auto = TRUE, header = FALSE, live_search = FALSE,
  box_width = FALSE, live_search_style = "contains", show_tick = FALSE,
  size = "auto", style = NULL, width = NULL, height = NULL,
  elementId = NULL, ...)

Arguments

vector

A named vector of values to send to the bootstrap-select dropdown menu.

selected

The selected option; if NULL defaults to the first element of vector.

type

One of "text", "img", or "iframe".

frame_height

The height of the image or iframe. Defaults to 500px.

frame_width

The width of the image or iframe.

align_right

Whether to align the menu to the right instead of the left. Defaults to FALSE.

dropup_auto

Creates a drop-up menu automatically if there is not enough space to drop down. Defaults to TRUE.

header

Adds a header to the top of the menu.

live_search

When TRUE, adds a search box to the drop-down menu. Defaults to FALSE.

box_width

One of "auto", "fit", a css-width in pixels, or FALSE.

live_search_style

One of "contains" (the default) or "startsWith".

show_tick

Whether to show a check mark next to the selected option. Defaults to FALSE.

size

The number of items to show in the window. Defaults to "auto"; if FALSE, shows every option.

style

Add the value to the button's style. Options include "btn-primary", "btn-info", "btn-success", "btn-warning", and "btn-danger".

width

The width of the htmlwidget.

height

The height of the htmlwidget.

elementId

The element ID.

See Also

https://silviomoreto.github.io/bootstrap-select/


walkerke/bsselectR documentation built on May 3, 2019, 10:46 p.m.