View source: R/mk-multi-picker.R
mk_multi_picker | R Documentation |
Create a plain dropdown box where multiple choices can be selected. When 1 choice is selected, it displays the name of the selected item. When 2 or more choices are selected, it displays the count. It also comes with two buttons that allows people to select all items and unselect all items. In addition, if an item is checked, a check mark will appear next to the item.
mk_multi_picker(id, label = NULL, choices, selected = NULL)
id |
String. The input slot that will be used to access the value. |
label |
String. Display label/title for the checkboxes group, or NULL (default) for no label. |
choices |
Character vector. List of values to show checkboxes for. If elements of the list are named then names rather than values are displayed to the user. The values should be strings; other types (such as logicals and numbers) will be coerced to strings. |
selected |
The values that should be initially selected, if any. Default is NULL for no initial selection. |
A list of HTML elements that can be added to a UI definition.
for an example of how to use this function.
inst/examples/ex-multi-picker.R
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.