| Title: | Composable Modern UI Blocks for Shiny |
|---|---|
| Description: | Provides composable Shiny dashboard components inspired by shadcn/ui, with R-first helpers, package-local runtime assets, scoped theming, and accessible defaults. End users do not run Node, Tailwind, Vite, or frontend build tooling. |
| Authors: | Niels van der Velden [aut, cre] |
| Maintainer: | Niels van der Velden <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.0.0.9003 |
| Built: | 2026-07-09 22:59:37 UTC |
| Source: | https://github.com/nvelden/shinyblocks |
A vertically stacked set of collapsible sections built from
block_accordion_item(). Use it to organize long content into
expand/collapse panels (FAQs, grouped settings, filters).
block_accordion( ..., id = NULL, type = c("single", "multiple"), collapsible = FALSE, open = NULL, style = NULL, class = NULL )block_accordion( ..., id = NULL, type = c("single", "multiple"), collapsible = FALSE, open = NULL, style = NULL, class = NULL )
... |
|
id |
Optional input id. When supplied, |
type |
|
collapsible |
For |
open |
Item value(s) to open initially. For |
style |
Inline CSS styles applied to the accordion wrapper. |
class |
Additional classes for the accordion wrapper. |
The trigger buttons carry aria-expanded/aria-controls, the chevron
rotates on open, and panel height animates. When id is supplied the open
item value(s) are reported to input$<id>: a string (or NULL) for
type = "single", a character vector for type = "multiple".
... supports rlang's !!! splice operator, so a programmatically built
list of items (e.g. one per row of a data frame) can be passed without
do.call():
items <- lapply(seq_len(nrow(faqs)), function(i) {
block_accordion_item(faqs$value[i], faqs$question[i], faqs$answer[i])
})
block_accordion(!!!items, id = "faq")
An htmltools tag.
Other content:
block_accordion_item(),
block_alert(),
block_alert_action(),
block_alert_description(),
block_alert_title(),
block_badge(),
block_card(),
block_card_content(),
block_card_description(),
block_card_footer(),
block_card_header(),
block_card_title(),
block_code(),
block_dialog(),
block_dropdown_menu(),
block_empty(),
block_popover(),
block_progress(),
block_separator(),
block_skeleton(),
block_spinner(),
block_table(),
block_toaster(),
block_tooltip(),
block_value_box(),
dismiss_toast(),
dropdown_menu_item(),
dropdown_menu_label(),
dropdown_menu_separator(),
inc_block_progress(),
show_toast(),
table_column(),
update_block_accordion(),
update_block_dialog(),
update_block_dropdown_menu(),
update_block_popover(),
update_block_progress(),
update_block_table(),
update_block_toaster()
A single collapsible section for block_accordion(): a trigger button
(the title) that expands or collapses its body content. Body content is
arbitrary Shiny/htmltools markup and stays live in the DOM, so reactive
outputs inside a closed panel keep working.
block_accordion_item( value, title, ..., icon = NULL, disabled = FALSE, class = NULL )block_accordion_item( value, title, ..., icon = NULL, disabled = FALSE, class = NULL )
value |
String identifying the item. Required and must be unique
within an accordion. This is the value reported to |
title |
Trigger label. A single string, or an |
... |
Panel body content ( |
icon |
Optional leading icon shown before the title: a vendored icon
name (see |
disabled |
Whether the item is non-interactive (cannot be toggled). |
class |
Additional classes for the item wrapper. |
An accordion-item tag consumed by block_accordion().
Other content:
block_accordion(),
block_alert(),
block_alert_action(),
block_alert_description(),
block_alert_title(),
block_badge(),
block_card(),
block_card_content(),
block_card_description(),
block_card_footer(),
block_card_header(),
block_card_title(),
block_code(),
block_dialog(),
block_dropdown_menu(),
block_empty(),
block_popover(),
block_progress(),
block_separator(),
block_skeleton(),
block_spinner(),
block_table(),
block_toaster(),
block_tooltip(),
block_value_box(),
dismiss_toast(),
dropdown_menu_item(),
dropdown_menu_label(),
dropdown_menu_separator(),
inc_block_progress(),
show_toast(),
table_column(),
update_block_accordion(),
update_block_dialog(),
update_block_dropdown_menu(),
update_block_popover(),
update_block_progress(),
update_block_table(),
update_block_toaster()
Create an alert
block_alert( title, ..., description = NULL, action = NULL, icon = "info", variant = c("default", "destructive", "success", "warning", "info"), class = NULL, style = NULL )block_alert( title, ..., description = NULL, action = NULL, icon = "info", variant = c("default", "destructive", "success", "warning", "info"), class = NULL, style = NULL )
title |
Alert title. Required for accessibility. |
... |
Additional alert body content. |
description |
Optional alert description. |
action |
Optional action content, such as a |
icon |
Optional icon tag or vendored icon name. |
variant |
Visual variant. |
class |
Additional classes. |
style |
Optional inline custom styles. |
An htmltools tag.
Other content:
block_accordion(),
block_accordion_item(),
block_alert_action(),
block_alert_description(),
block_alert_title(),
block_badge(),
block_card(),
block_card_content(),
block_card_description(),
block_card_footer(),
block_card_header(),
block_card_title(),
block_code(),
block_dialog(),
block_dropdown_menu(),
block_empty(),
block_popover(),
block_progress(),
block_separator(),
block_skeleton(),
block_spinner(),
block_table(),
block_toaster(),
block_tooltip(),
block_value_box(),
dismiss_toast(),
dropdown_menu_item(),
dropdown_menu_label(),
dropdown_menu_separator(),
inc_block_progress(),
show_toast(),
table_column(),
update_block_accordion(),
update_block_dialog(),
update_block_dropdown_menu(),
update_block_popover(),
update_block_progress(),
update_block_table(),
update_block_toaster()
Create an alert action
block_alert_action(..., class = NULL)block_alert_action(..., class = NULL)
... |
Alert action content, such as a |
class |
Additional classes. |
An htmltools tag.
Other content:
block_accordion(),
block_accordion_item(),
block_alert(),
block_alert_description(),
block_alert_title(),
block_badge(),
block_card(),
block_card_content(),
block_card_description(),
block_card_footer(),
block_card_header(),
block_card_title(),
block_code(),
block_dialog(),
block_dropdown_menu(),
block_empty(),
block_popover(),
block_progress(),
block_separator(),
block_skeleton(),
block_spinner(),
block_table(),
block_toaster(),
block_tooltip(),
block_value_box(),
dismiss_toast(),
dropdown_menu_item(),
dropdown_menu_label(),
dropdown_menu_separator(),
inc_block_progress(),
show_toast(),
table_column(),
update_block_accordion(),
update_block_dialog(),
update_block_dropdown_menu(),
update_block_popover(),
update_block_progress(),
update_block_table(),
update_block_toaster()
Create an alert description
block_alert_description(..., class = NULL)block_alert_description(..., class = NULL)
... |
Alert description content. |
class |
Additional classes. |
An htmltools tag.
Other content:
block_accordion(),
block_accordion_item(),
block_alert(),
block_alert_action(),
block_alert_title(),
block_badge(),
block_card(),
block_card_content(),
block_card_description(),
block_card_footer(),
block_card_header(),
block_card_title(),
block_code(),
block_dialog(),
block_dropdown_menu(),
block_empty(),
block_popover(),
block_progress(),
block_separator(),
block_skeleton(),
block_spinner(),
block_table(),
block_toaster(),
block_tooltip(),
block_value_box(),
dismiss_toast(),
dropdown_menu_item(),
dropdown_menu_label(),
dropdown_menu_separator(),
inc_block_progress(),
show_toast(),
table_column(),
update_block_accordion(),
update_block_dialog(),
update_block_dropdown_menu(),
update_block_popover(),
update_block_progress(),
update_block_table(),
update_block_toaster()
Create an alert title
block_alert_title(..., class = NULL)block_alert_title(..., class = NULL)
... |
Alert title content. |
class |
Additional classes. |
An htmltools tag.
Other content:
block_accordion(),
block_accordion_item(),
block_alert(),
block_alert_action(),
block_alert_description(),
block_badge(),
block_card(),
block_card_content(),
block_card_description(),
block_card_footer(),
block_card_header(),
block_card_title(),
block_code(),
block_dialog(),
block_dropdown_menu(),
block_empty(),
block_popover(),
block_progress(),
block_separator(),
block_skeleton(),
block_spinner(),
block_table(),
block_toaster(),
block_tooltip(),
block_value_box(),
dismiss_toast(),
dropdown_menu_item(),
dropdown_menu_label(),
dropdown_menu_separator(),
inc_block_progress(),
show_toast(),
table_column(),
update_block_accordion(),
update_block_dialog(),
update_block_dropdown_menu(),
update_block_popover(),
update_block_progress(),
update_block_table(),
update_block_toaster()
Create a badge
block_badge( label, variant = c("default", "secondary", "outline", "destructive", "success", "warning", "info", "ghost", "link"), size = c("default", "sm", "lg"), class = NULL, style = NULL )block_badge( label, variant = c("default", "secondary", "outline", "destructive", "success", "warning", "info", "ghost", "link"), size = c("default", "sm", "lg"), class = NULL, style = NULL )
label |
Badge label. |
variant |
Visual variant. |
size |
Visual size. |
class |
Additional classes. |
style |
Optional inline custom styles. |
An htmltools tag.
Other content:
block_accordion(),
block_accordion_item(),
block_alert(),
block_alert_action(),
block_alert_description(),
block_alert_title(),
block_card(),
block_card_content(),
block_card_description(),
block_card_footer(),
block_card_header(),
block_card_title(),
block_code(),
block_dialog(),
block_dropdown_menu(),
block_empty(),
block_popover(),
block_progress(),
block_separator(),
block_skeleton(),
block_spinner(),
block_table(),
block_toaster(),
block_tooltip(),
block_value_box(),
dismiss_toast(),
dropdown_menu_item(),
dropdown_menu_label(),
dropdown_menu_separator(),
inc_block_progress(),
show_toast(),
table_column(),
update_block_accordion(),
update_block_dialog(),
update_block_dropdown_menu(),
update_block_popover(),
update_block_progress(),
update_block_table(),
update_block_toaster()
Create a page body landmark
block_body(..., class = NULL)block_body(..., class = NULL)
... |
Body content. |
class |
Additional classes. |
An htmltools tag.
Other layout:
block_cluster(),
block_grid(),
block_header(),
block_page(),
block_sidebar(),
block_stack()
Static navigation landmark showing the path to the current page, following
the shadcn breadcrumb pattern. Children must be block_breadcrumb_item()
or block_breadcrumb_ellipsis() entries; a separator is inserted between
consecutive children automatically and hidden from assistive technology.
block_breadcrumb(..., separator = NULL, style = NULL, class = NULL)block_breadcrumb(..., separator = NULL, style = NULL, class = NULL)
... |
Breadcrumb entries built with |
separator |
Optional separator rendered between entries. Either a
string (e.g. |
style |
Inline CSS styles for the |
class |
Additional classes for the |
An htmltools tag: a <nav aria-label="breadcrumb"> landmark.
Other navigation:
block_breadcrumb_ellipsis(),
block_breadcrumb_item(),
block_nav(),
block_nav_group(),
block_nav_item(),
block_nav_label(),
block_tab(),
block_tabs(),
update_block_nav(),
update_block_tabs()
Placeholder for hidden entries in a long trail, following shadcn's
BreadcrumbEllipsis: a decorative ellipsis icon hidden from assistive
technology with a visually hidden text alternative.
block_breadcrumb_ellipsis(label = "More", class = NULL)block_breadcrumb_ellipsis(label = "More", class = NULL)
label |
Visually hidden text announced to assistive technology. |
class |
Additional classes for the |
An htmltools tag.
Other navigation:
block_breadcrumb(),
block_breadcrumb_item(),
block_nav(),
block_nav_group(),
block_nav_item(),
block_nav_label(),
block_tab(),
block_tabs(),
update_block_nav(),
update_block_tabs()
Create a breadcrumb entry
block_breadcrumb_item(label, href = NULL, current = FALSE, class = NULL)block_breadcrumb_item(label, href = NULL, current = FALSE, class = NULL)
label |
Entry label. A string or an |
href |
Destination URL. Ignored when |
current |
Whether this entry is the current page. Rendered as a
non-interactive |
class |
Additional classes for the |
An htmltools tag.
Other navigation:
block_breadcrumb(),
block_breadcrumb_ellipsis(),
block_nav(),
block_nav_group(),
block_nav_item(),
block_nav_label(),
block_tab(),
block_tabs(),
update_block_nav(),
update_block_tabs()
Create a modern button
block_button( label, variant = c("default", "secondary", "outline", "ghost", "destructive", "link"), size = c("default", "sm", "lg", "icon"), icon = NULL, icon_position = c("inline-start", "inline-end"), ..., class = NULL )block_button( label, variant = c("default", "secondary", "outline", "ghost", "destructive", "link"), size = c("default", "sm", "lg", "icon"), icon = NULL, icon_position = c("inline-start", "inline-end"), ..., class = NULL )
label |
Button label. |
variant |
Visual variant. |
size |
Button size. |
icon |
Optional icon tag or vendored icon name. |
icon_position |
Whether the icon appears before or after the label. |
... |
Additional attributes passed to |
class |
Additional classes. |
An htmltools tag.
Other action:
block_task_button(),
update_block_button(),
update_block_task_button()
Create a dashboard card
block_card( ..., title = NULL, description = NULL, value = NULL, footer = NULL, class = NULL, style = NULL )block_card( ..., title = NULL, description = NULL, value = NULL, footer = NULL, class = NULL, style = NULL )
... |
Card body content or composed card region tags. |
title |
Optional card title. |
description |
Optional card description. |
value |
Optional primary value. |
footer |
Optional card footer content. |
class |
Additional classes. |
style |
Optional inline custom styles. |
An htmltools tag.
Other content:
block_accordion(),
block_accordion_item(),
block_alert(),
block_alert_action(),
block_alert_description(),
block_alert_title(),
block_badge(),
block_card_content(),
block_card_description(),
block_card_footer(),
block_card_header(),
block_card_title(),
block_code(),
block_dialog(),
block_dropdown_menu(),
block_empty(),
block_popover(),
block_progress(),
block_separator(),
block_skeleton(),
block_spinner(),
block_table(),
block_toaster(),
block_tooltip(),
block_value_box(),
dismiss_toast(),
dropdown_menu_item(),
dropdown_menu_label(),
dropdown_menu_separator(),
inc_block_progress(),
show_toast(),
table_column(),
update_block_accordion(),
update_block_dialog(),
update_block_dropdown_menu(),
update_block_popover(),
update_block_progress(),
update_block_table(),
update_block_toaster()
Create card content
block_card_content(..., class = NULL)block_card_content(..., class = NULL)
... |
Card content. |
class |
Additional classes. |
An htmltools tag.
Other content:
block_accordion(),
block_accordion_item(),
block_alert(),
block_alert_action(),
block_alert_description(),
block_alert_title(),
block_badge(),
block_card(),
block_card_description(),
block_card_footer(),
block_card_header(),
block_card_title(),
block_code(),
block_dialog(),
block_dropdown_menu(),
block_empty(),
block_popover(),
block_progress(),
block_separator(),
block_skeleton(),
block_spinner(),
block_table(),
block_toaster(),
block_tooltip(),
block_value_box(),
dismiss_toast(),
dropdown_menu_item(),
dropdown_menu_label(),
dropdown_menu_separator(),
inc_block_progress(),
show_toast(),
table_column(),
update_block_accordion(),
update_block_dialog(),
update_block_dropdown_menu(),
update_block_popover(),
update_block_progress(),
update_block_table(),
update_block_toaster()
Create a card description
block_card_description(..., class = NULL)block_card_description(..., class = NULL)
... |
Card description content. |
class |
Additional classes. |
An htmltools tag.
Other content:
block_accordion(),
block_accordion_item(),
block_alert(),
block_alert_action(),
block_alert_description(),
block_alert_title(),
block_badge(),
block_card(),
block_card_content(),
block_card_footer(),
block_card_header(),
block_card_title(),
block_code(),
block_dialog(),
block_dropdown_menu(),
block_empty(),
block_popover(),
block_progress(),
block_separator(),
block_skeleton(),
block_spinner(),
block_table(),
block_toaster(),
block_tooltip(),
block_value_box(),
dismiss_toast(),
dropdown_menu_item(),
dropdown_menu_label(),
dropdown_menu_separator(),
inc_block_progress(),
show_toast(),
table_column(),
update_block_accordion(),
update_block_dialog(),
update_block_dropdown_menu(),
update_block_popover(),
update_block_progress(),
update_block_table(),
update_block_toaster()
Create a card header
block_card_header(..., class = NULL)block_card_header(..., class = NULL)
... |
Card header content. |
class |
Additional classes. |
An htmltools tag.
Other content:
block_accordion(),
block_accordion_item(),
block_alert(),
block_alert_action(),
block_alert_description(),
block_alert_title(),
block_badge(),
block_card(),
block_card_content(),
block_card_description(),
block_card_footer(),
block_card_title(),
block_code(),
block_dialog(),
block_dropdown_menu(),
block_empty(),
block_popover(),
block_progress(),
block_separator(),
block_skeleton(),
block_spinner(),
block_table(),
block_toaster(),
block_tooltip(),
block_value_box(),
dismiss_toast(),
dropdown_menu_item(),
dropdown_menu_label(),
dropdown_menu_separator(),
inc_block_progress(),
show_toast(),
table_column(),
update_block_accordion(),
update_block_dialog(),
update_block_dropdown_menu(),
update_block_popover(),
update_block_progress(),
update_block_table(),
update_block_toaster()
Create a card title
block_card_title(..., class = NULL)block_card_title(..., class = NULL)
... |
Card title content. |
class |
Additional classes. |
An htmltools tag.
Other content:
block_accordion(),
block_accordion_item(),
block_alert(),
block_alert_action(),
block_alert_description(),
block_alert_title(),
block_badge(),
block_card(),
block_card_content(),
block_card_description(),
block_card_footer(),
block_card_header(),
block_code(),
block_dialog(),
block_dropdown_menu(),
block_empty(),
block_popover(),
block_progress(),
block_separator(),
block_skeleton(),
block_spinner(),
block_table(),
block_toaster(),
block_tooltip(),
block_value_box(),
dismiss_toast(),
dropdown_menu_item(),
dropdown_menu_label(),
dropdown_menu_separator(),
inc_block_progress(),
show_toast(),
table_column(),
update_block_accordion(),
update_block_dialog(),
update_block_dropdown_menu(),
update_block_popover(),
update_block_progress(),
update_block_table(),
update_block_toaster()
Create a styled checkbox input
block_checkbox( input_id, label, value = FALSE, disabled = FALSE, style = NULL, class = NULL )block_checkbox( input_id, label, value = FALSE, disabled = FALSE, style = NULL, class = NULL )
input_id |
Input id. |
label |
Checkbox label. |
value |
Whether the checkbox starts checked. |
disabled |
Whether the control is disabled. |
style |
Inline CSS styles. |
class |
Additional classes. |
An htmltools tag.
Other forms:
block_combobox(),
block_date_picker(),
block_date_range_picker(),
block_field(),
block_field_description(),
block_field_group(),
block_field_invalid(),
block_field_label(),
block_field_legend(),
block_field_set(),
block_file_input(),
block_input(),
block_input_group(),
block_input_group_addon(),
block_radio_group(),
block_select(),
block_slider(),
block_switch(),
block_textarea(),
block_toggle_group(),
update_block_checkbox(),
update_block_combobox(),
update_block_date_picker(),
update_block_date_range_picker(),
update_block_file_input(),
update_block_input(),
update_block_radio_group(),
update_block_select(),
update_block_slider(),
update_block_switch(),
update_block_textarea(),
update_block_toggle_group()
Arrange content in a horizontal group with semantic spacing and optional wrapping.
block_cluster( ..., gap = c("sm", "md", "lg"), align = c("center", "start", "end", "stretch"), justify = c("start", "center", "end", "between"), wrap = TRUE, class = NULL )block_cluster( ..., gap = c("sm", "md", "lg"), align = c("center", "start", "end", "stretch"), justify = c("start", "center", "end", "between"), wrap = TRUE, class = NULL )
... |
Child content to arrange. Named arguments are applied to the
container as HTML attributes (the |
gap |
Spacing between children: |
align |
Cross-axis alignment: |
justify |
Main-axis distribution: |
wrap |
Whether children may wrap onto additional rows. |
class |
Additional classes. |
An htmltools tag.
Other layout:
block_body(),
block_grid(),
block_header(),
block_page(),
block_sidebar(),
block_stack()
A pre-formatted code block following the shadcn documentation code surface: bordered frame, monospace text, optional line numbers, and an optional copy-to-clipboard button.
block_code( code, language = NULL, copyable = TRUE, line_numbers = TRUE, header = FALSE, variant = c("default", "outline"), class = NULL, style = NULL, ... )block_code( code, language = NULL, copyable = TRUE, line_numbers = TRUE, header = FALSE, variant = c("default", "outline"), class = NULL, style = NULL, ... )
code |
The code string to display. |
language |
Optional programming language name to display when
|
copyable |
Logical. If |
line_numbers |
Logical. If |
header |
Logical. If |
variant |
Visual variant. One of |
class |
Additional CSS classes. |
style |
Optional inline custom styles. |
... |
Additional attributes or child elements (passed down). |
An htmltools tag.
Other content:
block_accordion(),
block_accordion_item(),
block_alert(),
block_alert_action(),
block_alert_description(),
block_alert_title(),
block_badge(),
block_card(),
block_card_content(),
block_card_description(),
block_card_footer(),
block_card_header(),
block_card_title(),
block_dialog(),
block_dropdown_menu(),
block_empty(),
block_popover(),
block_progress(),
block_separator(),
block_skeleton(),
block_spinner(),
block_table(),
block_toaster(),
block_tooltip(),
block_value_box(),
dismiss_toast(),
dropdown_menu_item(),
dropdown_menu_label(),
dropdown_menu_separator(),
inc_block_progress(),
show_toast(),
table_column(),
update_block_accordion(),
update_block_dialog(),
update_block_dropdown_menu(),
update_block_popover(),
update_block_progress(),
update_block_table(),
update_block_toaster()
block_combobox() renders a shadcn-style combobox: a trigger plus a
portal-rendered popup whose first row is a type-to-filter search box over the
choices. Like block_select() it is backed by a hidden native <select>
that carries the Shiny input value, and it supports single and multiple
selection. Reach for it over block_select() when the choice list is long
enough that users benefit from filtering (the searchable-select gap that
otherwise pushes people toward heavier third-party dropdown widgets).
block_combobox( input_id, choices, selected = NULL, placeholder = NULL, search_placeholder = NULL, empty_message = NULL, disabled = FALSE, width = NULL, class = NULL, size = c("default", "sm", "lg"), style = NULL, invalid = FALSE, multiple = FALSE, max_items = NULL )block_combobox( input_id, choices, selected = NULL, placeholder = NULL, search_placeholder = NULL, empty_message = NULL, disabled = FALSE, width = NULL, class = NULL, size = c("default", "sm", "lg"), style = NULL, invalid = FALSE, multiple = FALSE, max_items = NULL )
input_id |
Input id. |
choices |
Choice labels and values. |
selected |
Optional selected value. When |
placeholder |
Optional placeholder shown when no value is selected. |
search_placeholder |
Optional placeholder shown in the filter box.
Defaults to |
empty_message |
Message shown in the popup when the filter matches no
choices. Defaults to |
disabled |
Whether the control is disabled. |
width |
Optional CSS width value. |
class |
Additional classes. |
size |
Select size. One of |
style |
Inline CSS styles. |
invalid |
Whether to show the invalid/error state. |
multiple |
Whether multiple values can be selected. |
max_items |
Optional maximum number of selected values when
|
An htmltools tag.
block_select() for a non-searchable dropdown.
Other forms:
block_checkbox(),
block_date_picker(),
block_date_range_picker(),
block_field(),
block_field_description(),
block_field_group(),
block_field_invalid(),
block_field_label(),
block_field_legend(),
block_field_set(),
block_file_input(),
block_input(),
block_input_group(),
block_input_group_addon(),
block_radio_group(),
block_select(),
block_slider(),
block_switch(),
block_textarea(),
block_toggle_group(),
update_block_checkbox(),
update_block_combobox(),
update_block_date_picker(),
update_block_date_range_picker(),
update_block_file_input(),
update_block_input(),
update_block_radio_group(),
update_block_select(),
update_block_slider(),
update_block_switch(),
update_block_textarea(),
update_block_toggle_group()
Create a dark mode toggle
block_dark_mode_toggle(label = "Theme", class = NULL)block_dark_mode_toggle(label = "Theme", class = NULL)
label |
Button label. |
class |
Additional classes. |
An htmltools tag.
Other theme:
block_style(),
block_style_profiles(),
block_theme(),
block_theme_presets(),
update_block_theme()
A package-owned runtime input that renders a trigger button plus a popover
calendar instead of wrapping Shiny's native shiny::dateInput(). The server
value matches dateInput(): input$<id> is a length-1 Date. The control
transports an ISO yyyy-mm-dd string over a shiny.date-typed binding, so R
deserializes it as a Date with no custom handler.
block_date_picker( input_id, value = NULL, min = NULL, max = NULL, placeholder = "Pick a date", format = "yyyy-mm-dd", weekstart = 0, disabled = FALSE, invalid = FALSE, width = NULL, class = NULL, style = NULL )block_date_picker( input_id, value = NULL, min = NULL, max = NULL, placeholder = "Pick a date", format = "yyyy-mm-dd", weekstart = 0, disabled = FALSE, invalid = FALSE, width = NULL, class = NULL, style = NULL )
input_id |
Input id. |
value |
Initial date. Accepts a |
min |
Earliest selectable date, in the same accepted forms as |
max |
Latest selectable date, in the same accepted forms as |
placeholder |
Text shown on the trigger before a date is selected. |
format |
Display format for the trigger label. Supports the
|
weekstart |
First day of the week, integer 0-6 using Shiny's convention (0 = Sunday, 6 = Saturday). |
disabled |
Whether the control is disabled. |
invalid |
Whether the control should show invalid styling (sets
|
width |
Optional CSS width value (applied to the wrapper). |
class |
Additional classes for the wrapper. |
style |
Inline CSS styles for the trigger. |
Unlike dateInput(), value = NULL keeps the control empty (placeholder
first) rather than defaulting to today. This is intentional and matches
shadcn's Date Picker examples.
An htmltools tag.
Other forms:
block_checkbox(),
block_combobox(),
block_date_range_picker(),
block_field(),
block_field_description(),
block_field_group(),
block_field_invalid(),
block_field_label(),
block_field_legend(),
block_field_set(),
block_file_input(),
block_input(),
block_input_group(),
block_input_group_addon(),
block_radio_group(),
block_select(),
block_slider(),
block_switch(),
block_textarea(),
block_toggle_group(),
update_block_checkbox(),
update_block_combobox(),
update_block_date_picker(),
update_block_date_range_picker(),
update_block_file_input(),
update_block_input(),
update_block_radio_group(),
update_block_select(),
update_block_slider(),
update_block_switch(),
update_block_textarea(),
update_block_toggle_group()
A package-owned runtime input that renders a trigger button plus a popover
calendar for selecting a start/end date range, instead of wrapping Shiny's
native shiny::dateRangeInput(). The server value matches
dateRangeInput(): input$<id> is a length-2 Date c(start, end). The
control transports a two-element ISO yyyy-mm-dd array over a
shiny.date-typed binding, so R deserializes it as a Date with no custom
handler. An empty or incomplete range reports NULL.
block_date_range_picker( input_id, start = NULL, end = NULL, min = NULL, max = NULL, separator = " – ", placeholder = "Pick a date range", format = "yyyy-mm-dd", weekstart = 0, disabled = FALSE, invalid = FALSE, width = NULL, class = NULL, style = NULL )block_date_range_picker( input_id, start = NULL, end = NULL, min = NULL, max = NULL, separator = " – ", placeholder = "Pick a date range", format = "yyyy-mm-dd", weekstart = 0, disabled = FALSE, invalid = FALSE, width = NULL, class = NULL, style = NULL )
input_id |
Input id. |
start |
Initial range start. Accepts a |
end |
Initial range end, in the same accepted forms as |
min |
Earliest selectable date, in the same accepted forms as |
max |
Latest selectable date, in the same accepted forms as |
separator |
Text shown between the start and end dates on the trigger
label. Defaults to an en dash, matching |
placeholder |
Text shown on the trigger before a range is selected. |
format |
Display format for the trigger label. Supports the
|
weekstart |
First day of the week, integer 0-6 using Shiny's convention (0 = Sunday, 6 = Saturday). |
disabled |
Whether the control is disabled. |
invalid |
Whether the control should show invalid styling (sets
|
width |
Optional CSS width value (applied to the wrapper). |
class |
Additional classes for the wrapper. |
style |
Inline CSS styles for the trigger. |
Unlike dateRangeInput(), start = NULL and end = NULL keep the control
empty (placeholder first) rather than defaulting to today. This is
intentional and matches shadcn's Date Range Picker examples. Providing only
one of start/end is an error: there is no half-open initial state.
An htmltools tag.
Other forms:
block_checkbox(),
block_combobox(),
block_date_picker(),
block_field(),
block_field_description(),
block_field_group(),
block_field_invalid(),
block_field_label(),
block_field_legend(),
block_field_set(),
block_file_input(),
block_input(),
block_input_group(),
block_input_group_addon(),
block_radio_group(),
block_select(),
block_slider(),
block_switch(),
block_textarea(),
block_toggle_group(),
update_block_checkbox(),
update_block_combobox(),
update_block_date_picker(),
update_block_date_range_picker(),
update_block_file_input(),
update_block_input(),
update_block_radio_group(),
update_block_select(),
update_block_slider(),
update_block_switch(),
update_block_textarea(),
update_block_toggle_group()
A modal dialog rendered into the runtime portal root. Reports its
open/closed state to input$<id> and accepts server-driven
updates through update_block_dialog(). The runtime implements the
modal accessibility contract: Escape and overlay (outside) click
dismiss, focus moves into the dialog on open and returns to the
previously focused element on close, Tab/Shift+Tab cycle within
the dialog, and body scroll is locked while open.
block_dialog( id, title, ..., description = NULL, footer = NULL, trigger = NULL, open = FALSE, size = c("default", "sm", "lg", "xl"), hide_title = FALSE, class = NULL, style = NULL )block_dialog( id, title, ..., description = NULL, footer = NULL, trigger = NULL, open = FALSE, size = c("default", "sm", "lg", "xl"), hide_title = FALSE, class = NULL, style = NULL )
id |
Required input id. |
title |
Required dialog title. Used as the accessible name. |
... |
Body content, serialized to HTML. Children are not Shiny-bound. |
description |
Optional description below the title. |
footer |
Optional footer content (typically action buttons). Renders below the body in a right-aligned flex row. |
trigger |
Optional label string. Renders a default-variant
|
open |
Initial open state. Defaults to |
size |
Content max-width preset. One of |
hide_title |
Whether to visually hide the title while keeping
it available to assistive technology as the dialog's accessible
name. Defaults to |
class |
Additional classes for the dialog content container. |
style |
Optional inline CSS styles for the dialog content container. |
An htmltools tag.
Other content:
block_accordion(),
block_accordion_item(),
block_alert(),
block_alert_action(),
block_alert_description(),
block_alert_title(),
block_badge(),
block_card(),
block_card_content(),
block_card_description(),
block_card_footer(),
block_card_header(),
block_card_title(),
block_code(),
block_dropdown_menu(),
block_empty(),
block_popover(),
block_progress(),
block_separator(),
block_skeleton(),
block_spinner(),
block_table(),
block_toaster(),
block_tooltip(),
block_value_box(),
dismiss_toast(),
dropdown_menu_item(),
dropdown_menu_label(),
dropdown_menu_separator(),
inc_block_progress(),
show_toast(),
table_column(),
update_block_accordion(),
update_block_dialog(),
update_block_dropdown_menu(),
update_block_popover(),
update_block_progress(),
update_block_table(),
update_block_toaster()
Create an empty state
block_empty( title, ..., description = NULL, icon = NULL, action = NULL, class = NULL, style = NULL )block_empty( title, ..., description = NULL, icon = NULL, action = NULL, class = NULL, style = NULL )
title |
Empty-state title. |
... |
Additional empty-state body content. |
description |
Optional description. |
icon |
Optional icon tag or vendored icon name. |
action |
Optional action content. |
class |
Additional classes. |
style |
Optional inline custom styles. |
An htmltools tag.
Other content:
block_accordion(),
block_accordion_item(),
block_alert(),
block_alert_action(),
block_alert_description(),
block_alert_title(),
block_badge(),
block_card(),
block_card_content(),
block_card_description(),
block_card_footer(),
block_card_header(),
block_card_title(),
block_code(),
block_dialog(),
block_dropdown_menu(),
block_popover(),
block_progress(),
block_separator(),
block_skeleton(),
block_spinner(),
block_table(),
block_toaster(),
block_tooltip(),
block_value_box(),
dismiss_toast(),
dropdown_menu_item(),
dropdown_menu_label(),
dropdown_menu_separator(),
inc_block_progress(),
show_toast(),
table_column(),
update_block_accordion(),
update_block_dialog(),
update_block_dropdown_menu(),
update_block_popover(),
update_block_progress(),
update_block_table(),
update_block_toaster()
Create a field wrapper
block_field(..., class = NULL)block_field(..., class = NULL)
... |
Field content. |
class |
Additional classes. |
An htmltools tag.
Other forms:
block_checkbox(),
block_combobox(),
block_date_picker(),
block_date_range_picker(),
block_field_description(),
block_field_group(),
block_field_invalid(),
block_field_label(),
block_field_legend(),
block_field_set(),
block_file_input(),
block_input(),
block_input_group(),
block_input_group_addon(),
block_radio_group(),
block_select(),
block_slider(),
block_switch(),
block_textarea(),
block_toggle_group(),
update_block_checkbox(),
update_block_combobox(),
update_block_date_picker(),
update_block_date_range_picker(),
update_block_file_input(),
update_block_input(),
update_block_radio_group(),
update_block_select(),
update_block_slider(),
update_block_switch(),
update_block_textarea(),
update_block_toggle_group()
Create field helper text
block_field_description(..., id = NULL, class = NULL)block_field_description(..., id = NULL, class = NULL)
... |
Description content. |
id |
Optional element id. |
class |
Additional classes. |
An htmltools tag.
Other forms:
block_checkbox(),
block_combobox(),
block_date_picker(),
block_date_range_picker(),
block_field(),
block_field_group(),
block_field_invalid(),
block_field_label(),
block_field_legend(),
block_field_set(),
block_file_input(),
block_input(),
block_input_group(),
block_input_group_addon(),
block_radio_group(),
block_select(),
block_slider(),
block_switch(),
block_textarea(),
block_toggle_group(),
update_block_checkbox(),
update_block_combobox(),
update_block_date_picker(),
update_block_date_range_picker(),
update_block_file_input(),
update_block_input(),
update_block_radio_group(),
update_block_select(),
update_block_slider(),
update_block_switch(),
update_block_textarea(),
update_block_toggle_group()
Create a field group
block_field_group(..., class = NULL)block_field_group(..., class = NULL)
... |
Field content. |
class |
Additional classes. |
An htmltools tag.
Other forms:
block_checkbox(),
block_combobox(),
block_date_picker(),
block_date_range_picker(),
block_field(),
block_field_description(),
block_field_invalid(),
block_field_label(),
block_field_legend(),
block_field_set(),
block_file_input(),
block_input(),
block_input_group(),
block_input_group_addon(),
block_radio_group(),
block_select(),
block_slider(),
block_switch(),
block_textarea(),
block_toggle_group(),
update_block_checkbox(),
update_block_combobox(),
update_block_date_picker(),
update_block_date_range_picker(),
update_block_file_input(),
update_block_input(),
update_block_radio_group(),
update_block_select(),
update_block_slider(),
update_block_switch(),
update_block_textarea(),
update_block_toggle_group()
Mark a field invalid
block_field_invalid(field, message)block_field_invalid(field, message)
field |
A |
message |
Validation message shown below the control. |
A modified htmltools tag.
Other forms:
block_checkbox(),
block_combobox(),
block_date_picker(),
block_date_range_picker(),
block_field(),
block_field_description(),
block_field_group(),
block_field_label(),
block_field_legend(),
block_field_set(),
block_file_input(),
block_input(),
block_input_group(),
block_input_group_addon(),
block_radio_group(),
block_select(),
block_slider(),
block_switch(),
block_textarea(),
block_toggle_group(),
update_block_checkbox(),
update_block_combobox(),
update_block_date_picker(),
update_block_date_range_picker(),
update_block_file_input(),
update_block_input(),
update_block_radio_group(),
update_block_select(),
update_block_slider(),
update_block_switch(),
update_block_textarea(),
update_block_toggle_group()
Create a field label
block_field_label(..., `for` = NULL, class = NULL)block_field_label(..., `for` = NULL, class = NULL)
... |
Label content. |
for |
Optional input id referenced by the label. |
class |
Additional classes. |
An htmltools tag.
Other forms:
block_checkbox(),
block_combobox(),
block_date_picker(),
block_date_range_picker(),
block_field(),
block_field_description(),
block_field_group(),
block_field_invalid(),
block_field_legend(),
block_field_set(),
block_file_input(),
block_input(),
block_input_group(),
block_input_group_addon(),
block_radio_group(),
block_select(),
block_slider(),
block_switch(),
block_textarea(),
block_toggle_group(),
update_block_checkbox(),
update_block_combobox(),
update_block_date_picker(),
update_block_date_range_picker(),
update_block_file_input(),
update_block_input(),
update_block_radio_group(),
update_block_select(),
update_block_slider(),
update_block_switch(),
update_block_textarea(),
update_block_toggle_group()
Create a field set legend
block_field_legend(..., class = NULL)block_field_legend(..., class = NULL)
... |
Legend content. |
class |
Additional classes. |
An htmltools tag.
Other forms:
block_checkbox(),
block_combobox(),
block_date_picker(),
block_date_range_picker(),
block_field(),
block_field_description(),
block_field_group(),
block_field_invalid(),
block_field_label(),
block_field_set(),
block_file_input(),
block_input(),
block_input_group(),
block_input_group_addon(),
block_radio_group(),
block_select(),
block_slider(),
block_switch(),
block_textarea(),
block_toggle_group(),
update_block_checkbox(),
update_block_combobox(),
update_block_date_picker(),
update_block_date_range_picker(),
update_block_file_input(),
update_block_input(),
update_block_radio_group(),
update_block_select(),
update_block_slider(),
update_block_switch(),
update_block_textarea(),
update_block_toggle_group()
Create a field set
block_field_set(..., class = NULL)block_field_set(..., class = NULL)
... |
Field set content. |
class |
Additional classes. |
An htmltools tag.
Other forms:
block_checkbox(),
block_combobox(),
block_date_picker(),
block_date_range_picker(),
block_field(),
block_field_description(),
block_field_group(),
block_field_invalid(),
block_field_label(),
block_field_legend(),
block_file_input(),
block_input(),
block_input_group(),
block_input_group_addon(),
block_radio_group(),
block_select(),
block_slider(),
block_switch(),
block_textarea(),
block_toggle_group(),
update_block_checkbox(),
update_block_combobox(),
update_block_date_picker(),
update_block_date_range_picker(),
update_block_file_input(),
update_block_input(),
update_block_radio_group(),
update_block_select(),
update_block_slider(),
update_block_switch(),
update_block_textarea(),
update_block_toggle_group()
Runtime-rendered file picker that delegates upload transport and progress to
Shiny's native file upload binding. The server receives the same
input$<id> data frame as shiny::fileInput().
block_file_input( input_id, variant = c("button", "dropzone"), multiple = FALSE, accept = NULL, button_label = "Browse", placeholder = "No file selected", dropzone_label = "Drag files here or click to browse", dropzone_hint = NULL, dropzone_icon = NULL, dropzone_content = NULL, width = NULL, disabled = FALSE, invalid = FALSE, style = NULL, class = NULL )block_file_input( input_id, variant = c("button", "dropzone"), multiple = FALSE, accept = NULL, button_label = "Browse", placeholder = "No file selected", dropzone_label = "Drag files here or click to browse", dropzone_hint = NULL, dropzone_icon = NULL, dropzone_content = NULL, width = NULL, disabled = FALSE, invalid = FALSE, style = NULL, class = NULL )
input_id |
Input id. |
variant |
Picker variant. One of |
multiple |
Whether to allow selecting more than one file. |
accept |
Optional character vector of accepted MIME types or file
extensions. Values are comma-joined for the native |
button_label |
Text shown on the picker button. |
placeholder |
Text shown before a file is selected. |
dropzone_label |
Primary text shown inside the dropzone surface (only
used when |
dropzone_hint |
Secondary hint text shown beneath |
dropzone_icon |
Optional icon shown above the dropzone label (only used
when |
dropzone_content |
Optional |
width |
Optional CSS width value (applied to the wrapper). |
disabled |
Whether the control is disabled. |
invalid |
Whether the control should show invalid styling
(sets |
style |
Inline CSS styles for the visible control. |
class |
Additional classes for the visible control. |
An htmltools tag.
Other forms:
block_checkbox(),
block_combobox(),
block_date_picker(),
block_date_range_picker(),
block_field(),
block_field_description(),
block_field_group(),
block_field_invalid(),
block_field_label(),
block_field_legend(),
block_field_set(),
block_input(),
block_input_group(),
block_input_group_addon(),
block_radio_group(),
block_select(),
block_slider(),
block_switch(),
block_textarea(),
block_toggle_group(),
update_block_checkbox(),
update_block_combobox(),
update_block_date_picker(),
update_block_date_range_picker(),
update_block_file_input(),
update_block_input(),
update_block_radio_group(),
update_block_select(),
update_block_slider(),
update_block_switch(),
update_block_textarea(),
update_block_toggle_group()
Arrange repeated content in a responsive auto-fit grid whose columns shrink safely to the available width.
block_grid( ..., min_width = "16rem", gap = c("md", "sm", "lg"), align = c("stretch", "start", "center", "end"), class = NULL )block_grid( ..., min_width = "16rem", gap = c("md", "sm", "lg"), align = c("stretch", "start", "center", "end"), class = NULL )
... |
Child content to arrange. Named arguments are applied to the
container as HTML attributes (the |
min_width |
Minimum preferred column width as a single non-negative CSS
length or percentage (e.g. |
gap |
Spacing between children: |
align |
Cross-axis alignment: |
class |
Additional classes. |
An htmltools tag.
Other layout:
block_body(),
block_cluster(),
block_header(),
block_page(),
block_sidebar(),
block_stack()
Create a dashboard header
block_header(..., class = NULL)block_header(..., class = NULL)
... |
Header content. |
class |
Additional classes. |
An htmltools tag.
Other layout:
block_body(),
block_cluster(),
block_grid(),
block_page(),
block_sidebar(),
block_stack()
Create an icon
block_icon( name, size = c("default", "sm", "lg", "xl"), class = NULL, ..., color = c("default", "muted", "primary", "destructive", "success", "warning", "info") )block_icon( name, size = c("default", "sm", "lg", "xl"), class = NULL, ..., color = c("default", "muted", "primary", "destructive", "success", "warning", "info") )
name |
Icon name from the vendored Lucide sprite, or a custom
|
size |
Icon size. One of |
class |
Additional classes. |
... |
Additional attributes passed to the root |
color |
Semantic foreground color. |
An htmltools tag.
Wraps shiny::imageOutput() in a shadcn-styled frame (aspect box,
object-fit, border, radius, optional caption). App-author server code stays
vanilla Shiny: output$id <- shiny::renderImage(...) is unchanged. The
image's accessible name (alt) is server-controlled via
shiny::renderImage()'s returned alt; the frame cannot set it.
block_image_output( id, width = "100%", height = NULL, aspect = NULL, fit = c("cover", "contain", "fill", "none", "scale-down"), border = FALSE, rounded = TRUE, caption = NULL, click = NULL, dblclick = NULL, hover = NULL, brush = NULL, inline = FALSE, fill = FALSE, class = NULL, style = NULL )block_image_output( id, width = "100%", height = NULL, aspect = NULL, fit = c("cover", "contain", "fill", "none", "scale-down"), border = FALSE, rounded = TRUE, caption = NULL, click = NULL, dblclick = NULL, hover = NULL, brush = NULL, inline = FALSE, fill = FALSE, class = NULL, style = NULL )
id |
Shiny output id, passed verbatim to |
width, height
|
CSS lengths forwarded to the Shiny output. |
aspect |
Aspect ratio for the media box: |
fit |
|
border |
Draw a border around the media box. |
rounded |
Round the media box corners (and clip overflow). |
caption |
Optional |
click, dblclick, hover, brush
|
Forwarded to the Shiny output unchanged. |
inline, fill
|
Forwarded to the Shiny output. |
class |
Additional classes for the |
style |
Inline style for the |
For static images use htmltools::img() — no component needed. Interactive
htmlwidgets (plotly, leaflet, DT, ...) are a different mechanism and out of
scope.
An htmltools <figure> tag.
Other outputs:
block_plot_output()
Create a styled single-line text input
block_input( input_id, value = "", placeholder = NULL, type = c("text", "password", "email", "url", "tel", "search", "number"), min = NULL, max = NULL, step = NULL, width = NULL, disabled = FALSE, invalid = FALSE, style = NULL, class = NULL )block_input( input_id, value = "", placeholder = NULL, type = c("text", "password", "email", "url", "tel", "search", "number"), min = NULL, max = NULL, step = NULL, width = NULL, disabled = FALSE, invalid = FALSE, style = NULL, class = NULL )
input_id |
Input id. |
value |
Initial value. |
placeholder |
Optional placeholder text. |
type |
Input type. One of |
min |
Optional numeric lower bound. Only valid when
|
max |
Optional numeric upper bound. Only valid when
|
step |
Optional positive step size for the stepper buttons and
arrow keys. Only valid when |
width |
Optional CSS width value (applied to the wrapper). |
disabled |
Whether the control is disabled. |
invalid |
Whether the control should show invalid styling
(sets |
style |
Inline CSS styles for the input element. |
class |
Additional classes for the wrapper. |
When type = "number", the control renders increment/decrement stepper
buttons and input$<input_id> reports a numeric value (like
shiny::numericInput()): NA while the field is empty or unparseable,
a numeric scalar otherwise. All other types report a character string.
The reported type is fixed when the control first binds; switching to or
from "number" with update_block_input() does not change it.
An htmltools tag.
Other forms:
block_checkbox(),
block_combobox(),
block_date_picker(),
block_date_range_picker(),
block_field(),
block_field_description(),
block_field_group(),
block_field_invalid(),
block_field_label(),
block_field_legend(),
block_field_set(),
block_file_input(),
block_input_group(),
block_input_group_addon(),
block_radio_group(),
block_select(),
block_slider(),
block_switch(),
block_textarea(),
block_toggle_group(),
update_block_checkbox(),
update_block_combobox(),
update_block_date_picker(),
update_block_date_range_picker(),
update_block_file_input(),
update_block_input(),
update_block_radio_group(),
update_block_select(),
update_block_slider(),
update_block_switch(),
update_block_textarea(),
update_block_toggle_group()
Create an input group
block_input_group(..., class = NULL)block_input_group(..., class = NULL)
... |
Input group content. |
class |
Additional classes. |
An htmltools tag.
Other forms:
block_checkbox(),
block_combobox(),
block_date_picker(),
block_date_range_picker(),
block_field(),
block_field_description(),
block_field_group(),
block_field_invalid(),
block_field_label(),
block_field_legend(),
block_field_set(),
block_file_input(),
block_input(),
block_input_group_addon(),
block_radio_group(),
block_select(),
block_slider(),
block_switch(),
block_textarea(),
block_toggle_group(),
update_block_checkbox(),
update_block_combobox(),
update_block_date_picker(),
update_block_date_range_picker(),
update_block_file_input(),
update_block_input(),
update_block_radio_group(),
update_block_select(),
update_block_slider(),
update_block_switch(),
update_block_textarea(),
update_block_toggle_group()
Create an input group addon
block_input_group_addon(..., class = NULL)block_input_group_addon(..., class = NULL)
... |
Addon content. |
class |
Additional classes. |
An htmltools tag.
Other forms:
block_checkbox(),
block_combobox(),
block_date_picker(),
block_date_range_picker(),
block_field(),
block_field_description(),
block_field_group(),
block_field_invalid(),
block_field_label(),
block_field_legend(),
block_field_set(),
block_file_input(),
block_input(),
block_input_group(),
block_radio_group(),
block_select(),
block_slider(),
block_switch(),
block_textarea(),
block_toggle_group(),
update_block_checkbox(),
update_block_combobox(),
update_block_date_picker(),
update_block_date_range_picker(),
update_block_file_input(),
update_block_input(),
update_block_radio_group(),
update_block_select(),
update_block_slider(),
update_block_switch(),
update_block_textarea(),
update_block_toggle_group()
Create a modern Shiny page
block_page( ..., title = NULL, sidebar = NULL, header = NULL, theme_mode = c("system", "light", "dark"), theme = NULL, style = NULL, class = NULL )block_page( ..., title = NULL, sidebar = NULL, header = NULL, theme_mode = c("system", "light", "dark"), theme = NULL, style = NULL, class = NULL )
... |
Page body content. |
title |
Browser page title. |
sidebar |
Optional sidebar content. |
header |
Optional header content. |
theme_mode |
Initial theme mode. |
theme |
Optional |
style |
Optional |
class |
Additional classes for the app root. |
An htmltools tag list suitable for a Shiny UI.
Other layout:
block_body(),
block_cluster(),
block_grid(),
block_header(),
block_sidebar(),
block_stack()
Wraps shiny::plotOutput() in a shadcn-styled frame (aspect box, border,
radius, optional caption). App-author server code stays vanilla Shiny:
output$id <- shiny::renderPlot(...) is unchanged. Covers base graphics,
ggplot2, and lattice. The plot's accessible name (alt) is server-controlled
via shiny::renderPlot()'s alt; the frame cannot set it.
block_plot_output( id, width = "100%", height = NULL, aspect = NULL, border = FALSE, rounded = TRUE, caption = NULL, click = NULL, dblclick = NULL, hover = NULL, brush = NULL, inline = FALSE, fill = !inline, class = NULL, style = NULL )block_plot_output( id, width = "100%", height = NULL, aspect = NULL, border = FALSE, rounded = TRUE, caption = NULL, click = NULL, dblclick = NULL, hover = NULL, brush = NULL, inline = FALSE, fill = !inline, class = NULL, style = NULL )
id |
Shiny output id, passed verbatim to |
width, height
|
CSS lengths forwarded to the Shiny output. |
aspect |
Aspect ratio for the media box: |
border |
Draw a border around the media box. |
rounded |
Round the media box corners (and clip overflow). |
caption |
Optional |
click, dblclick, hover, brush
|
Forwarded to the Shiny output unchanged. |
inline, fill
|
Forwarded to the Shiny output. |
class |
Additional classes for the |
style |
Inline style for the |
Unlike block_image_output() there is no fit argument: shiny::renderPlot()
already renders to the media box size, so object-fit would have no visible
effect.
An htmltools <figure> tag.
Other outputs:
block_image_output()
A non-modal, portal-rendered popover anchored to a trigger button.
Popovers with an id report their open/closed state to input$<id>
and accept server-driven updates through update_block_popover().
Popovers without an id stay client-only.
block_popover( trigger, ..., id = NULL, side = c("bottom", "top", "left", "right"), align = c("center", "start", "end"), open = FALSE, style = NULL, class = NULL )block_popover( trigger, ..., id = NULL, side = c("bottom", "top", "left", "right"), align = c("center", "start", "end"), open = FALSE, style = NULL, class = NULL )
trigger |
Required label string. Renders a default-variant
|
... |
Popover body content. Serialized to HTML. |
id |
Optional input id. When supplied, |
side |
Side of the trigger to anchor on. One of |
align |
Alignment along the anchored side. One of |
open |
Initial open state. Defaults to |
style |
Optional inline CSS applied to the popover content container (string or named list). |
class |
Additional classes for the popover content container. |
An htmltools tag.
Other content:
block_accordion(),
block_accordion_item(),
block_alert(),
block_alert_action(),
block_alert_description(),
block_alert_title(),
block_badge(),
block_card(),
block_card_content(),
block_card_description(),
block_card_footer(),
block_card_header(),
block_card_title(),
block_code(),
block_dialog(),
block_dropdown_menu(),
block_empty(),
block_progress(),
block_separator(),
block_skeleton(),
block_spinner(),
block_table(),
block_toaster(),
block_tooltip(),
block_value_box(),
dismiss_toast(),
dropdown_menu_item(),
dropdown_menu_label(),
dropdown_menu_separator(),
inc_block_progress(),
show_toast(),
table_column(),
update_block_accordion(),
update_block_dialog(),
update_block_dropdown_menu(),
update_block_popover(),
update_block_progress(),
update_block_table(),
update_block_toaster()
An embedded, shadcn-style progress indicator. Unlike Shiny's native
shiny::Progress notification panel, this renders inline exactly where it is
placed in the UI. It is display-only: it exposes no meaningful input$<id>
value, but the server can drive it with update_block_progress() and
inc_block_progress().
block_progress( id, value = 0, min = 0, max = 1, message = NULL, detail = NULL, label = NULL, show_value = FALSE, indeterminate = FALSE, variant = c("default", "success", "warning", "info", "destructive"), width = NULL, class = NULL, style = NULL )block_progress( id, value = 0, min = 0, max = 1, message = NULL, detail = NULL, label = NULL, show_value = FALSE, indeterminate = FALSE, variant = c("default", "success", "warning", "info", "destructive"), width = NULL, class = NULL, style = NULL )
id |
Component id, used to address the bar from the server. Not a form
control: there is no |
value |
Current progress value. Clamped into |
min |
Lower bound. Must be finite and less than |
max |
Upper bound. Must be finite and greater than |
message |
Dynamic status line (e.g. |
detail |
Secondary muted text below the track. |
label |
Static description of what is progressing (e.g. |
show_value |
Whether to render the clamped percent at header-right. Suppressed in indeterminate mode. |
indeterminate |
Whether the bar shows an unknown-progress sweep instead of a determinate fill. |
variant |
Indicator color: one of |
width |
Optional CSS width for the component ( |
class |
Additional classes applied to the bar element
( |
style |
Optional inline styles (CSS string or named list) applied to the
bar element. Targets the same node as |
An htmltools tag.
Other content:
block_accordion(),
block_accordion_item(),
block_alert(),
block_alert_action(),
block_alert_description(),
block_alert_title(),
block_badge(),
block_card(),
block_card_content(),
block_card_description(),
block_card_footer(),
block_card_header(),
block_card_title(),
block_code(),
block_dialog(),
block_dropdown_menu(),
block_empty(),
block_popover(),
block_separator(),
block_skeleton(),
block_spinner(),
block_table(),
block_toaster(),
block_tooltip(),
block_value_box(),
dismiss_toast(),
dropdown_menu_item(),
dropdown_menu_label(),
dropdown_menu_separator(),
inc_block_progress(),
show_toast(),
table_column(),
update_block_accordion(),
update_block_dialog(),
update_block_dropdown_menu(),
update_block_popover(),
update_block_progress(),
update_block_table(),
update_block_toaster()
Renders a shadcn-style radio group where exactly one option is selected at a time. Reports the selected value through a package-local Shiny input binding.
block_radio_group( input_id, choices, selected = NULL, disabled = FALSE, invalid = FALSE, orientation = c("vertical", "horizontal"), style = NULL, class = NULL )block_radio_group( input_id, choices, selected = NULL, disabled = FALSE, invalid = FALSE, orientation = c("vertical", "horizontal"), style = NULL, class = NULL )
input_id |
Input id. |
choices |
Choice labels and values. A named character vector
( |
selected |
Optional initial value. Must match one of |
disabled |
Whether the entire group is disabled. |
invalid |
Whether the group should show invalid styling
(sets |
orientation |
Either |
style |
Inline CSS styles applied to the radio-group wrapper. |
class |
Additional classes for the wrapper. |
An htmltools tag.
Other forms:
block_checkbox(),
block_combobox(),
block_date_picker(),
block_date_range_picker(),
block_field(),
block_field_description(),
block_field_group(),
block_field_invalid(),
block_field_label(),
block_field_legend(),
block_field_set(),
block_file_input(),
block_input(),
block_input_group(),
block_input_group_addon(),
block_select(),
block_slider(),
block_switch(),
block_textarea(),
block_toggle_group(),
update_block_checkbox(),
update_block_combobox(),
update_block_date_picker(),
update_block_date_range_picker(),
update_block_file_input(),
update_block_input(),
update_block_radio_group(),
update_block_select(),
update_block_slider(),
update_block_switch(),
update_block_textarea(),
update_block_toggle_group()
block_select() renders a hidden native <select> as the Shiny input
value source, plus a package runtime overlay for the visible
shadcn-style trigger and popup.
block_select( input_id, choices, selected = NULL, placeholder = NULL, disabled = FALSE, width = NULL, class = NULL, size = c("default", "sm", "lg"), style = NULL, invalid = FALSE, multiple = FALSE, max_items = NULL )block_select( input_id, choices, selected = NULL, placeholder = NULL, disabled = FALSE, width = NULL, class = NULL, size = c("default", "sm", "lg"), style = NULL, invalid = FALSE, multiple = FALSE, max_items = NULL )
input_id |
Input id. |
choices |
Choice labels and values. |
selected |
Optional selected value. When |
placeholder |
Optional placeholder shown when no value is selected. |
disabled |
Whether the control is disabled. |
width |
Optional CSS width value. |
class |
Additional classes. |
size |
Select size. One of |
style |
Inline CSS styles. |
invalid |
Whether to show the invalid/error state. |
multiple |
Whether multiple values can be selected. |
max_items |
Optional maximum number of selected values when
|
An htmltools tag.
Other forms:
block_checkbox(),
block_combobox(),
block_date_picker(),
block_date_range_picker(),
block_field(),
block_field_description(),
block_field_group(),
block_field_invalid(),
block_field_label(),
block_field_legend(),
block_field_set(),
block_file_input(),
block_input(),
block_input_group(),
block_input_group_addon(),
block_radio_group(),
block_slider(),
block_switch(),
block_textarea(),
block_toggle_group(),
update_block_checkbox(),
update_block_combobox(),
update_block_date_picker(),
update_block_date_range_picker(),
update_block_file_input(),
update_block_input(),
update_block_radio_group(),
update_block_select(),
update_block_slider(),
update_block_switch(),
update_block_textarea(),
update_block_toggle_group()
Create a separator
block_separator( orientation = c("horizontal", "vertical"), decorative = TRUE, class = NULL )block_separator( orientation = c("horizontal", "vertical"), decorative = TRUE, class = NULL )
orientation |
Separator orientation. |
decorative |
Whether the separator is decorative only. |
class |
Additional classes. |
An htmltools tag.
Other content:
block_accordion(),
block_accordion_item(),
block_alert(),
block_alert_action(),
block_alert_description(),
block_alert_title(),
block_badge(),
block_card(),
block_card_content(),
block_card_description(),
block_card_footer(),
block_card_header(),
block_card_title(),
block_code(),
block_dialog(),
block_dropdown_menu(),
block_empty(),
block_popover(),
block_progress(),
block_skeleton(),
block_spinner(),
block_table(),
block_toaster(),
block_tooltip(),
block_value_box(),
dismiss_toast(),
dropdown_menu_item(),
dropdown_menu_label(),
dropdown_menu_separator(),
inc_block_progress(),
show_toast(),
table_column(),
update_block_accordion(),
update_block_dialog(),
update_block_dropdown_menu(),
update_block_popover(),
update_block_progress(),
update_block_table(),
update_block_toaster()
Create a dashboard sidebar
block_sidebar( ..., title = NULL, collapsible = FALSE, collapsed = FALSE, id = NULL, class = NULL )block_sidebar( ..., title = NULL, collapsible = FALSE, collapsed = FALSE, id = NULL, class = NULL )
... |
Sidebar content. |
title |
Optional sidebar title. |
collapsible |
Whether the sidebar can collapse on larger screens. |
collapsed |
Whether the sidebar starts collapsed on larger screens. |
id |
Optional sidebar DOM id. |
class |
Additional classes. |
An htmltools tag.
Other layout:
block_body(),
block_cluster(),
block_grid(),
block_header(),
block_page(),
block_stack()
Create a skeleton placeholder
block_skeleton(class = NULL, ...)block_skeleton(class = NULL, ...)
class |
Additional classes. |
... |
Additional attributes passed to |
An htmltools tag.
Other content:
block_accordion(),
block_accordion_item(),
block_alert(),
block_alert_action(),
block_alert_description(),
block_alert_title(),
block_badge(),
block_card(),
block_card_content(),
block_card_description(),
block_card_footer(),
block_card_header(),
block_card_title(),
block_code(),
block_dialog(),
block_dropdown_menu(),
block_empty(),
block_popover(),
block_progress(),
block_separator(),
block_spinner(),
block_table(),
block_toaster(),
block_tooltip(),
block_value_box(),
dismiss_toast(),
dropdown_menu_item(),
dropdown_menu_label(),
dropdown_menu_separator(),
inc_block_progress(),
show_toast(),
table_column(),
update_block_accordion(),
update_block_dialog(),
update_block_dropdown_menu(),
update_block_popover(),
update_block_progress(),
update_block_table(),
update_block_toaster()
Runtime-rendered slider with a dedicated Shiny input binding. Supports single-value and two-value range sliders.
block_slider( input_id, value, min, max, step = NULL, ticks = FALSE, orientation = c("horizontal", "vertical"), show_value = FALSE, min_label = NULL, max_label = NULL, width = NULL, disabled = FALSE, invalid = FALSE, style = NULL, class = NULL )block_slider( input_id, value, min, max, step = NULL, ticks = FALSE, orientation = c("horizontal", "vertical"), show_value = FALSE, min_label = NULL, max_label = NULL, width = NULL, disabled = FALSE, invalid = FALSE, style = NULL, class = NULL )
input_id |
Input id. |
value |
Initial value. Length 1 for a single-handle slider; length 2 for a range slider. |
min |
Numeric lower bound. |
max |
Numeric upper bound. |
step |
Step size. Defaults to |
ticks |
Whether to show tick marks on the rail. |
orientation |
Slider orientation. One of |
show_value |
Whether to render the current value above the slider. |
min_label |
Optional label displayed at the minimum end of the rail. |
max_label |
Optional label displayed at the maximum end of the rail. |
width |
Optional CSS width value for horizontal sliders. |
disabled |
Whether the control is disabled. |
invalid |
Whether the control should show invalid styling
(sets |
style |
Inline CSS styles for the slider control. |
class |
Additional classes for the wrapper. |
An htmltools tag.
Other forms:
block_checkbox(),
block_combobox(),
block_date_picker(),
block_date_range_picker(),
block_field(),
block_field_description(),
block_field_group(),
block_field_invalid(),
block_field_label(),
block_field_legend(),
block_field_set(),
block_file_input(),
block_input(),
block_input_group(),
block_input_group_addon(),
block_radio_group(),
block_select(),
block_switch(),
block_textarea(),
block_toggle_group(),
update_block_checkbox(),
update_block_combobox(),
update_block_date_picker(),
update_block_date_range_picker(),
update_block_file_input(),
update_block_input(),
update_block_radio_group(),
update_block_select(),
update_block_slider(),
update_block_switch(),
update_block_textarea(),
update_block_toggle_group()
Create a spinner
block_spinner( label = "Loading", size = c("default", "sm", "lg"), color = c("default", "muted", "primary", "destructive", "success", "warning", "info"), icon = spinner_icon_choices(), class = NULL, style = NULL )block_spinner( label = "Loading", size = c("default", "sm", "lg"), color = c("default", "muted", "primary", "destructive", "success", "warning", "info"), icon = spinner_icon_choices(), class = NULL, style = NULL )
label |
Accessible |
size |
Visual size. |
color |
Semantic color. |
icon |
Spinner icon name. One of |
class |
Additional classes. |
style |
Optional inline custom styles. |
An htmltools tag.
Other content:
block_accordion(),
block_accordion_item(),
block_alert(),
block_alert_action(),
block_alert_description(),
block_alert_title(),
block_badge(),
block_card(),
block_card_content(),
block_card_description(),
block_card_footer(),
block_card_header(),
block_card_title(),
block_code(),
block_dialog(),
block_dropdown_menu(),
block_empty(),
block_popover(),
block_progress(),
block_separator(),
block_skeleton(),
block_table(),
block_toaster(),
block_tooltip(),
block_value_box(),
dismiss_toast(),
dropdown_menu_item(),
dropdown_menu_label(),
dropdown_menu_separator(),
inc_block_progress(),
show_toast(),
table_column(),
update_block_accordion(),
update_block_dialog(),
update_block_dropdown_menu(),
update_block_popover(),
update_block_progress(),
update_block_table(),
update_block_toaster()
Arrange content in a vertical flow with package-owned semantic spacing.
block_stack( ..., gap = c("md", "sm", "lg"), align = c("stretch", "start", "center", "end"), class = NULL )block_stack( ..., gap = c("md", "sm", "lg"), align = c("stretch", "start", "center", "end"), class = NULL )
... |
Child content to arrange. Named arguments are applied to the
container as HTML attributes (the |
gap |
Spacing between children: |
align |
Cross-axis alignment: |
class |
Additional classes. |
An htmltools tag.
Other layout:
block_body(),
block_cluster(),
block_grid(),
block_header(),
block_page(),
block_sidebar()
Selects a built-in visual style profile and, optionally, layers explicit
overrides on top of it. A style profile controls visual feel — control
sizing, spacing, surface and overlay metrics, elevation, focus and disabled
treatment, and motion — through a curated set of --sb-* custom properties.
This is separate from block_theme(), which owns semantic light/dark
colour tokens.
block_style(profile = "default", ..., scope = NULL)block_style(profile = "default", ..., scope = NULL)
profile |
Built-in style profile name. Defaults to |
... |
Named token overrides from the curated allowlist, such as
|
scope |
Optional CSS selector. When supplied, the profile's tokens
(and any Scope covers every token-driven part of a profile — radii, surfaces,
borders, shadows, and the shared |
Pass the result to block_page() via its style argument. The profile is
applied page-wide: block_page() places data-sb-style="<profile>" on the
.sb-app shell, so profile tokens also reach dialog, popover, tooltip, and
select portal content (the portal root lives inside .sb-app).
Overrides use ergonomic snake-case names from a fixed allowlist (for example
control_height, surface_padding, focus_ring_width); see
block_style_profiles() for available profiles. Raw --sb-* CSS-variable
names are intentionally not accepted.
A shinyblocks_style object consumed by block_page().
Other theme:
block_dark_mode_toggle(),
block_style_profiles(),
block_theme(),
block_theme_presets(),
update_block_theme()
block_style("default") block_style("default", control_height = "2.5rem", surface_gap = "2rem")block_style("default") block_style("default", control_height = "2.5rem", surface_gap = "2rem")
Supported built-in style profiles
block_style_profiles()block_style_profiles()
A character vector of built-in style-profile names accepted by
block_style().
Other theme:
block_dark_mode_toggle(),
block_style(),
block_theme(),
block_theme_presets(),
update_block_theme()
block_style_profiles()block_style_profiles()
Create a styled switch input
block_switch( input_id, label, value = FALSE, disabled = FALSE, size = c("default", "sm", "lg"), style = NULL, class = NULL )block_switch( input_id, label, value = FALSE, disabled = FALSE, size = c("default", "sm", "lg"), style = NULL, class = NULL )
input_id |
Input id. |
label |
Switch label. |
value |
Whether the switch starts on. |
disabled |
Whether the control is disabled. |
size |
Switch size. One of |
style |
Inline CSS styles. |
class |
Additional classes. |
An htmltools tag.
Other forms:
block_checkbox(),
block_combobox(),
block_date_picker(),
block_date_range_picker(),
block_field(),
block_field_description(),
block_field_group(),
block_field_invalid(),
block_field_label(),
block_field_legend(),
block_field_set(),
block_file_input(),
block_input(),
block_input_group(),
block_input_group_addon(),
block_radio_group(),
block_select(),
block_slider(),
block_textarea(),
block_toggle_group(),
update_block_checkbox(),
update_block_combobox(),
update_block_date_picker(),
update_block_date_range_picker(),
update_block_file_input(),
update_block_input(),
update_block_radio_group(),
update_block_select(),
update_block_slider(),
update_block_switch(),
update_block_textarea(),
update_block_toggle_group()
Create a tab
block_tab(title, ..., value = NULL)block_tab(title, ..., value = NULL)
title |
Tab label. |
... |
Tab content. |
value |
Optional tab value. |
An htmltools tag.
Other navigation:
block_breadcrumb(),
block_breadcrumb_ellipsis(),
block_breadcrumb_item(),
block_nav(),
block_nav_group(),
block_nav_item(),
block_nav_label(),
block_tabs(),
update_block_nav(),
update_block_tabs()
block_table() renders a data frame or tibble as a runtime-owned shadcn
table. Cell formatting happens in R before the payload is sent to the
browser. The same formatting pipeline is reused by update_block_table(),
so a server-side refresh produces an identical payload.
block_table( data, columns = NULL, caption = NULL, max_rows = NULL, na = "", digits = NULL, rownames = FALSE, row_format = NULL, striped = FALSE, hover = TRUE, bordered = FALSE, selection = c("none", "single", "multiple"), selected = NULL, id = NULL, class = NULL, style = NULL )block_table( data, columns = NULL, caption = NULL, max_rows = NULL, na = "", digits = NULL, rownames = FALSE, row_format = NULL, striped = FALSE, hover = TRUE, bordered = FALSE, selection = c("none", "single", "multiple"), selected = NULL, id = NULL, class = NULL, style = NULL )
data |
A data frame or tibble. |
columns |
Optional named list of per-column overrides created with
|
caption |
Optional caption rendered below the table. |
max_rows |
Optional non-negative integer limiting the number of rendered rows. When rows are truncated, a footer note reports the total row count. |
na |
String used to render missing values. Defaults to |
digits |
Optional non-negative integer giving the number of decimal
places for default numeric formatting. |
rownames |
Whether to render |
row_format |
Optional |
striped |
Whether to zebra-stripe body rows. |
hover |
Whether rows highlight on hover. Defaults to |
bordered |
Whether to draw cell borders. |
selection |
Row-selection mode, following the DT idiom. One of |
selected |
Optional integer vector of 1-based row indices to select on
load. Only valid when |
id |
Optional input id. Required if the table is updated from the
server with |
class |
Additional classes on the runtime mount. |
style |
Optional inline custom styles. |
An htmltools tag.
With selection set to "single" or "multiple", rows become clickable and
the table reports its selection through Shiny inputs, mirroring the DT
package so existing DT code ports over:
input$<id> and input$<id>_rows_selected – integer vector of the
selected 1-based row indices (the bare id is a shinyblocks convenience;
_rows_selected is the DT-compatible name).
input$<id>_row_last_clicked – the 1-based index of the most
recently clicked row.
input$<id>_cell_clicked – a list with row (1-based), col
(1-based rendered column index), and value (the displayed cell text)
for the most recent click.
Push a selection from the server with update_block_table(selected = ).
Other content:
block_accordion(),
block_accordion_item(),
block_alert(),
block_alert_action(),
block_alert_description(),
block_alert_title(),
block_badge(),
block_card(),
block_card_content(),
block_card_description(),
block_card_footer(),
block_card_header(),
block_card_title(),
block_code(),
block_dialog(),
block_dropdown_menu(),
block_empty(),
block_popover(),
block_progress(),
block_separator(),
block_skeleton(),
block_spinner(),
block_toaster(),
block_tooltip(),
block_value_box(),
dismiss_toast(),
dropdown_menu_item(),
dropdown_menu_label(),
dropdown_menu_separator(),
inc_block_progress(),
show_toast(),
table_column(),
update_block_accordion(),
update_block_dialog(),
update_block_dropdown_menu(),
update_block_popover(),
update_block_progress(),
update_block_table(),
update_block_toaster()
Create styled tabs
block_tabs( ..., id = NULL, selected = NULL, variant = c("default", "line"), orientation = c("horizontal", "vertical"), class = NULL )block_tabs( ..., id = NULL, selected = NULL, variant = c("default", "line"), orientation = c("horizontal", "vertical"), class = NULL )
... |
|
id |
Optional input id. |
selected |
Optional selected tab value. |
variant |
Visual variant: |
orientation |
Layout orientation: |
class |
Additional classes. |
An htmltools tag.
Other navigation:
block_breadcrumb(),
block_breadcrumb_ellipsis(),
block_breadcrumb_item(),
block_nav(),
block_nav_group(),
block_nav_item(),
block_nav_label(),
block_tab(),
update_block_nav(),
update_block_tabs()
An action button that locks itself the instant it is clicked, shows a busy
label and spinner while work runs, and reports a shinyActionButtonValue
(usable exactly like shiny::actionButton()). By default it returns to the
ready state after the reactive flush that the click triggered; pass
auto_reset = FALSE to keep it busy until you release it with
update_block_task_button().
block_task_button( input_id, label, label_busy = "Processing…", variant = TASK_BUTTON_VARIANTS, size = TASK_BUTTON_SIZES, icon = NULL, icon_busy = NULL, icon_position = TASK_BUTTON_ICON_POSITIONS, auto_reset = TRUE, ..., class = NULL )block_task_button( input_id, label, label_busy = "Processing…", variant = TASK_BUTTON_VARIANTS, size = TASK_BUTTON_SIZES, icon = NULL, icon_busy = NULL, icon_position = TASK_BUTTON_ICON_POSITIONS, auto_reset = TRUE, ..., class = NULL )
input_id |
Input id. Required, because the busy/ready behavior depends
on a Shiny input binding. Read the click count with |
label |
Button label (ready state). |
label_busy |
Accessible and visible label shown while busy. |
variant |
Visual variant. |
size |
Button size: one of |
icon |
Optional ready-state icon: a vendored icon name or |
icon_busy |
Optional busy-state icon: a vendored icon name or
|
icon_position |
Whether the icon appears before or after the label. |
auto_reset |
When |
... |
Additional attributes passed to the button. Pass |
class |
Additional classes merged onto the runtime button element. |
Inspired by shadcn's Button visuals and bslib's input_task_button()
behavior.
An htmltools tag.
Other action:
block_button(),
update_block_button(),
update_block_task_button()
Create a styled textarea input
block_textarea( input_id, value = "", placeholder = NULL, rows = 3, width = NULL, disabled = FALSE, invalid = FALSE, resize = c("vertical", "none", "both", "horizontal"), style = NULL, class = NULL )block_textarea( input_id, value = "", placeholder = NULL, rows = 3, width = NULL, disabled = FALSE, invalid = FALSE, resize = c("vertical", "none", "both", "horizontal"), style = NULL, class = NULL )
input_id |
Input id. |
value |
Initial value. |
placeholder |
Optional placeholder text. |
rows |
Number of visible rows. |
width |
Optional CSS width value (applied to the wrapper). |
disabled |
Whether the control is disabled. |
invalid |
Whether the control should show invalid styling
(sets |
resize |
Textarea resize behavior. One of |
style |
Inline CSS styles for the textarea element. |
class |
Additional classes for the wrapper. |
An htmltools tag.
Other forms:
block_checkbox(),
block_combobox(),
block_date_picker(),
block_date_range_picker(),
block_field(),
block_field_description(),
block_field_group(),
block_field_invalid(),
block_field_label(),
block_field_legend(),
block_field_set(),
block_file_input(),
block_input(),
block_input_group(),
block_input_group_addon(),
block_radio_group(),
block_select(),
block_slider(),
block_switch(),
block_toggle_group(),
update_block_checkbox(),
update_block_combobox(),
update_block_date_picker(),
update_block_date_range_picker(),
update_block_file_input(),
update_block_input(),
update_block_radio_group(),
update_block_select(),
update_block_slider(),
update_block_switch(),
update_block_textarea(),
update_block_toggle_group()
Emits a scoped <style> block that selects and overrides shadcn token
variables.
By default the overrides apply to the whole page (every .sb-app and
runtime root). Pass scope to confine the overrides to a single
subtree, which is essential when several differently-themed regions
share one page (for example a component gallery) so a local override
does not leak into the rest of the app.
block_theme(..., preset = NULL, scope = NULL, dark = NULL)block_theme(..., preset = NULL, scope = NULL, dark = NULL)
... |
Named CSS token overrides, such as |
preset |
Optional built-in semantic color palette. One of |
scope |
Optional CSS selector. When supplied, overrides apply
only to elements matching |
dark |
Optional named list of token overrides applied only in
dark mode, overriding the corresponding |
Like shadcn, tokens have separate light and dark values. The ...
overrides apply to both light and dark mode. Pass dark to set
values that apply only in dark mode (when [data-theme="dark"] is
active), mirroring shadcn's :root / .dark token pairs. A token
present only in dark keeps the package default in light mode and the
dark value in dark mode.
An htmltools tag.
Other theme:
block_dark_mode_toggle(),
block_style(),
block_style_profiles(),
block_theme_presets(),
update_block_theme()
Supported built-in colour presets
block_theme_presets()block_theme_presets()
A character vector of built-in palette names accepted by the
preset argument of block_theme().
Other theme:
block_dark_mode_toggle(),
block_style(),
block_style_profiles(),
block_theme(),
update_block_theme()
block_theme_presets()block_theme_presets()
Mounts a single, portal-rendered region that displays transient toast
notifications fired from the server with show_toast(). Unlike
block_alert(), a toaster is not inline content: place one (per position)
near the top of your app body, then call show_toast() to push messages.
block_toaster( id, position = c("bottom-right", "bottom-center", "bottom-left", "top-right", "top-center", "top-left"), class = NULL, style = NULL )block_toaster( id, position = c("bottom-right", "bottom-center", "bottom-left", "top-right", "top-center", "top-left"), class = NULL, style = NULL )
id |
Required input id. Targets this toaster from |
position |
Screen corner/edge the stack anchors to. One of
|
class |
Additional classes for the toaster region. |
style |
Optional inline custom styles for the toaster region. |
input$<id> reports the most recent toast lifecycle event as a list with
action ("show" or "dismiss"), id (the toast id, or NULL when all
toasts are dismissed), and seq (a monotonic counter). The counter
guarantees the value changes on every show and dismiss — including
auto-dismiss, the close button, and Escape — so server observers always
fire.
An htmltools tag.
Other content:
block_accordion(),
block_accordion_item(),
block_alert(),
block_alert_action(),
block_alert_description(),
block_alert_title(),
block_badge(),
block_card(),
block_card_content(),
block_card_description(),
block_card_footer(),
block_card_header(),
block_card_title(),
block_code(),
block_dialog(),
block_dropdown_menu(),
block_empty(),
block_popover(),
block_progress(),
block_separator(),
block_skeleton(),
block_spinner(),
block_table(),
block_tooltip(),
block_value_box(),
dismiss_toast(),
dropdown_menu_item(),
dropdown_menu_label(),
dropdown_menu_separator(),
inc_block_progress(),
show_toast(),
table_column(),
update_block_accordion(),
update_block_dialog(),
update_block_dropdown_menu(),
update_block_popover(),
update_block_progress(),
update_block_table(),
update_block_toaster()
Renders a shadcn-style toggle group: a joined row of pressable
buttons for single or multiple choice (view switchers, formatting
toolbars). Reports the pressed value(s) through a package-local
Shiny input binding: a string (or NULL when nothing is pressed)
for type = "single", a character vector for type = "multiple".
block_toggle_group( input_id, choices, selected = NULL, type = c("single", "multiple"), variant = c("default", "outline"), size = c("default", "sm", "lg"), icons = NULL, icon_only = FALSE, disabled = FALSE, style = NULL, class = NULL )block_toggle_group( input_id, choices, selected = NULL, type = c("single", "multiple"), variant = c("default", "outline"), size = c("default", "sm", "lg"), icons = NULL, icon_only = FALSE, disabled = FALSE, style = NULL, class = NULL )
input_id |
Input id. |
choices |
Choice labels and values. A named character vector
( |
selected |
Optional initial value(s). For |
type |
|
variant |
Visual variant: |
size |
Item size. One of |
icons |
Optional named list mapping choice values to icons.
Each element is a vendored icon name (see |
icon_only |
Whether to hide item labels visually. Labels remain
as the accessible name ( |
disabled |
|
style |
Inline CSS styles applied to the toggle-group wrapper. |
class |
Additional classes for the wrapper. |
An htmltools tag.
Other forms:
block_checkbox(),
block_combobox(),
block_date_picker(),
block_date_range_picker(),
block_field(),
block_field_description(),
block_field_group(),
block_field_invalid(),
block_field_label(),
block_field_legend(),
block_field_set(),
block_file_input(),
block_input(),
block_input_group(),
block_input_group_addon(),
block_radio_group(),
block_select(),
block_slider(),
block_switch(),
block_textarea(),
update_block_checkbox(),
update_block_combobox(),
update_block_date_picker(),
update_block_date_range_picker(),
update_block_file_input(),
update_block_input(),
update_block_radio_group(),
update_block_select(),
update_block_slider(),
update_block_switch(),
update_block_textarea(),
update_block_toggle_group()
Wraps a trigger label with a small floating panel that opens on
hover or keyboard focus and closes on leave, blur, or Escape. The
content panel renders through [data-shinyblocks-portal-root] to
avoid clipping by ancestor overflow or transform. Tooltips have
no Shiny input binding; treat them as purely presentational.
block_tooltip( trigger, ..., side = c("top", "bottom", "left", "right"), align = c("center", "start", "end"), delay_duration = 700, style = NULL, class = NULL )block_tooltip( trigger, ..., side = c("top", "bottom", "left", "right"), align = c("center", "start", "end"), delay_duration = 700, style = NULL, class = NULL )
trigger |
Single string label rendered on the trigger button. |
... |
Tooltip content. HTML tags or text are accepted and serialized into the runtime payload. |
side |
Side relative to the trigger. One of |
align |
Alignment along the anchored side. One of |
delay_duration |
Milliseconds to wait after hover/focus before
opening. Defaults to |
style |
Optional inline CSS applied to the tooltip content container (string or named list). |
class |
Additional classes for the tooltip content container. |
An htmltools tag.
Other content:
block_accordion(),
block_accordion_item(),
block_alert(),
block_alert_action(),
block_alert_description(),
block_alert_title(),
block_badge(),
block_card(),
block_card_content(),
block_card_description(),
block_card_footer(),
block_card_header(),
block_card_title(),
block_code(),
block_dialog(),
block_dropdown_menu(),
block_empty(),
block_popover(),
block_progress(),
block_separator(),
block_skeleton(),
block_spinner(),
block_table(),
block_toaster(),
block_value_box(),
dismiss_toast(),
dropdown_menu_item(),
dropdown_menu_label(),
dropdown_menu_separator(),
inc_block_progress(),
show_toast(),
table_column(),
update_block_accordion(),
update_block_dialog(),
update_block_dropdown_menu(),
update_block_popover(),
update_block_progress(),
update_block_table(),
update_block_toaster()
Create a value box
block_value_box( title, value, ..., description = NULL, icon = NULL, variant = c("default", "accent", "destructive"), class = NULL, style = NULL )block_value_box( title, value, ..., description = NULL, icon = NULL, variant = c("default", "accent", "destructive"), class = NULL, style = NULL )
title |
Value box title. |
value |
Primary value. |
... |
Additional value box body content. |
description |
Optional value box description. |
icon |
Optional icon tag or vendored icon name. |
variant |
Visual variant. |
class |
Additional classes. |
style |
Optional inline custom styles. |
An htmltools tag.
Other content:
block_accordion(),
block_accordion_item(),
block_alert(),
block_alert_action(),
block_alert_description(),
block_alert_title(),
block_badge(),
block_card(),
block_card_content(),
block_card_description(),
block_card_footer(),
block_card_header(),
block_card_title(),
block_code(),
block_dialog(),
block_dropdown_menu(),
block_empty(),
block_popover(),
block_progress(),
block_separator(),
block_skeleton(),
block_spinner(),
block_table(),
block_toaster(),
block_tooltip(),
dismiss_toast(),
dropdown_menu_item(),
dropdown_menu_label(),
dropdown_menu_separator(),
inc_block_progress(),
show_toast(),
table_column(),
update_block_accordion(),
update_block_dialog(),
update_block_dropdown_menu(),
update_block_popover(),
update_block_progress(),
update_block_table(),
update_block_toaster()
Removes a toast from a block_toaster() before it auto-dismisses. With no
toast_id, clears every visible toast.
dismiss_toast( session = shiny::getDefaultReactiveDomain(), toaster_id, toast_id = NULL )dismiss_toast( session = shiny::getDefaultReactiveDomain(), toaster_id, toast_id = NULL )
session |
Shiny session. Defaults to the current reactive session. |
toaster_id |
Target |
toast_id |
Non-empty id of the toast to dismiss (as returned by
|
Invisibly returns NULL.
Other content:
block_accordion(),
block_accordion_item(),
block_alert(),
block_alert_action(),
block_alert_description(),
block_alert_title(),
block_badge(),
block_card(),
block_card_content(),
block_card_description(),
block_card_footer(),
block_card_header(),
block_card_title(),
block_code(),
block_dialog(),
block_dropdown_menu(),
block_empty(),
block_popover(),
block_progress(),
block_separator(),
block_skeleton(),
block_spinner(),
block_table(),
block_toaster(),
block_tooltip(),
block_value_box(),
dropdown_menu_item(),
dropdown_menu_label(),
dropdown_menu_separator(),
inc_block_progress(),
show_toast(),
table_column(),
update_block_accordion(),
update_block_dialog(),
update_block_dropdown_menu(),
update_block_popover(),
update_block_progress(),
update_block_table(),
update_block_toaster()
Adds amount to a block_progress()'s current value, clamped client-side
into [min, max]. amount may be negative (decrement). Reaching max is a
stable no-op state: the bar never auto-hides, auto-resets, or fires a
completion event. Reset with update_block_progress(value = min).
inc_block_progress( session = shiny::getDefaultReactiveDomain(), id, amount = 0.1, message, detail )inc_block_progress( session = shiny::getDefaultReactiveDomain(), id, amount = 0.1, message, detail )
session |
Shiny session. Defaults to the current reactive domain. |
id |
Component id passed to |
amount |
Signed amount to add to the current value. |
message |
Optional status line to set in the same update; |
detail |
Optional detail text to set in the same update; |
Invisibly returns NULL.
Other content:
block_accordion(),
block_accordion_item(),
block_alert(),
block_alert_action(),
block_alert_description(),
block_alert_title(),
block_badge(),
block_card(),
block_card_content(),
block_card_description(),
block_card_footer(),
block_card_header(),
block_card_title(),
block_code(),
block_dialog(),
block_dropdown_menu(),
block_empty(),
block_popover(),
block_progress(),
block_separator(),
block_skeleton(),
block_spinner(),
block_table(),
block_toaster(),
block_tooltip(),
block_value_box(),
dismiss_toast(),
dropdown_menu_item(),
dropdown_menu_label(),
dropdown_menu_separator(),
show_toast(),
table_column(),
update_block_accordion(),
update_block_dialog(),
update_block_dropdown_menu(),
update_block_popover(),
update_block_progress(),
update_block_table(),
update_block_toaster()
The showcase is a development-only asset: it ships in the source tree but is
excluded from the built package tarball, so this function only works from a
source checkout (e.g. via devtools::load_all()). It errors with a clear
message when the app cannot be found.
run_showcase(...)run_showcase(...)
... |
Arguments passed to |
The result of shiny::runApp().
Pushes a transient toast onto a block_toaster() from the server. Toasts
stack, auto-dismiss after duration, and reuse the block_alert() visual
variants and icon system.
show_toast( session = shiny::getDefaultReactiveDomain(), toaster_id, title, description = NULL, variant = "default", icon = "info", duration = 5000, dismissible = TRUE, id = NULL )show_toast( session = shiny::getDefaultReactiveDomain(), toaster_id, title, description = NULL, variant = "default", icon = "info", duration = 5000, dismissible = TRUE, id = NULL )
session |
Shiny session. Defaults to the current reactive session. |
toaster_id |
Target |
title |
Toast title. Required. |
description |
Optional secondary text. |
variant |
Visual variant. One of |
icon |
Optional icon tag or vendored icon name. Defaults to |
duration |
Finite milliseconds before auto-dismiss. Use |
dismissible |
Scalar logical; whether the toast shows a close button.
Defaults to |
id |
Optional stable non-empty toast id. Auto-generated when omitted;
supply one to target the toast later with |
Invisibly returns the toast id.
block_toaster(), dismiss_toast()
Other content:
block_accordion(),
block_accordion_item(),
block_alert(),
block_alert_action(),
block_alert_description(),
block_alert_title(),
block_badge(),
block_card(),
block_card_content(),
block_card_description(),
block_card_footer(),
block_card_header(),
block_card_title(),
block_code(),
block_dialog(),
block_dropdown_menu(),
block_empty(),
block_popover(),
block_progress(),
block_separator(),
block_skeleton(),
block_spinner(),
block_table(),
block_toaster(),
block_tooltip(),
block_value_box(),
dismiss_toast(),
dropdown_menu_item(),
dropdown_menu_label(),
dropdown_menu_separator(),
inc_block_progress(),
table_column(),
update_block_accordion(),
update_block_dialog(),
update_block_dropdown_menu(),
update_block_popover(),
update_block_progress(),
update_block_table(),
update_block_toaster()
block_table() columnDefine display options for a block_table() column
table_column( label = NULL, align = c("left", "center", "right"), format = NULL, width = NULL, digits = NULL, na = NULL, intent = NULL, emphasis = "text", class = NULL, style = NULL, header_intent = NULL, header_emphasis = "text", header_class = NULL, header_style = NULL, cell_intent = NULL, cell_emphasis = NULL, cell_class = NULL, cell_style = NULL )table_column( label = NULL, align = c("left", "center", "right"), format = NULL, width = NULL, digits = NULL, na = NULL, intent = NULL, emphasis = "text", class = NULL, style = NULL, header_intent = NULL, header_emphasis = "text", header_class = NULL, header_style = NULL, cell_intent = NULL, cell_emphasis = NULL, cell_class = NULL, cell_style = NULL )
label |
Header label. Defaults to the data column name. |
align |
Text alignment. One of |
format |
Optional function applied to the rendered column vector (after
any |
width |
Optional CSS width for the column. |
digits |
Optional non-negative integer for default numeric formatting,
overriding the table-level |
na |
Optional string for missing values, overriding the table-level |
intent |
Optional semantic styling intent applied to every |
emphasis |
How an |
class, style
|
Escape hatch: additional class / inline style applied to
every |
header_intent, header_emphasis, header_class, header_style
|
Same styling
controls applied to the column's |
cell_intent, cell_emphasis, cell_class, cell_style
|
Vectorized per-cell
styling. Each is a |
A table column specification.
Other content:
block_accordion(),
block_accordion_item(),
block_alert(),
block_alert_action(),
block_alert_description(),
block_alert_title(),
block_badge(),
block_card(),
block_card_content(),
block_card_description(),
block_card_footer(),
block_card_header(),
block_card_title(),
block_code(),
block_dialog(),
block_dropdown_menu(),
block_empty(),
block_popover(),
block_progress(),
block_separator(),
block_skeleton(),
block_spinner(),
block_table(),
block_toaster(),
block_tooltip(),
block_value_box(),
dismiss_toast(),
dropdown_menu_item(),
dropdown_menu_label(),
dropdown_menu_separator(),
inc_block_progress(),
show_toast(),
update_block_accordion(),
update_block_dialog(),
update_block_dropdown_menu(),
update_block_popover(),
update_block_progress(),
update_block_table(),
update_block_toaster()
Opens or closes items of a block_accordion() that was given an id,
mirroring the click behaviour from the server.
update_block_accordion( session = shiny::getDefaultReactiveDomain(), input_id, open, notify = TRUE )update_block_accordion( session = shiny::getDefaultReactiveDomain(), input_id, open, notify = TRUE )
session |
Shiny session. Defaults to the current reactive domain. |
input_id |
Input id passed to |
open |
Item value(s) that should be open after the update. For
|
notify |
Whether Shiny should receive an input event after the update. |
Invisibly returns NULL.
Other content:
block_accordion(),
block_accordion_item(),
block_alert(),
block_alert_action(),
block_alert_description(),
block_alert_title(),
block_badge(),
block_card(),
block_card_content(),
block_card_description(),
block_card_footer(),
block_card_header(),
block_card_title(),
block_code(),
block_dialog(),
block_dropdown_menu(),
block_empty(),
block_popover(),
block_progress(),
block_separator(),
block_skeleton(),
block_spinner(),
block_table(),
block_toaster(),
block_tooltip(),
block_value_box(),
dismiss_toast(),
dropdown_menu_item(),
dropdown_menu_label(),
dropdown_menu_separator(),
inc_block_progress(),
show_toast(),
table_column(),
update_block_dialog(),
update_block_dropdown_menu(),
update_block_popover(),
update_block_progress(),
update_block_table(),
update_block_toaster()
Send a runtime message to a block_button() created with id = "...".
Any argument left unspecified is preserved on the client. Pass NULL for
icon or style to clear them.
update_block_button( session = shiny::getDefaultReactiveDomain(), input_id, label, variant, size, icon, icon_position, disabled, style, class )update_block_button( session = shiny::getDefaultReactiveDomain(), input_id, label, variant, size, icon, icon_position, disabled, style, class )
session |
Shiny session. Defaults to the current reactive domain. |
input_id |
Input id passed to |
label |
Optional replacement label. |
variant |
Optional new visual variant. |
size |
Optional new size. |
icon |
Optional vendored icon name, |
icon_position |
Optional |
disabled |
Optional disabled state. |
style |
Optional inline CSS styles, or |
class |
Optional replacement classes for the wrapper. |
Invisibly returns NULL.
Other action:
block_button(),
block_task_button(),
update_block_task_button()
Update a runtime checkbox input
update_block_checkbox( session = shiny::getDefaultReactiveDomain(), input_id, checked, disabled, style, class, notify = TRUE )update_block_checkbox( session = shiny::getDefaultReactiveDomain(), input_id, checked, disabled, style, class, notify = TRUE )
session |
Shiny session. Defaults to the current reactive domain. |
input_id |
Input id passed to |
checked |
Optional checked state. |
disabled |
Optional disabled state. |
style |
Optional replacement inline CSS styles. |
class |
Optional replacement classes. |
notify |
Whether Shiny should receive an input event when |
Invisibly returns NULL.
Other forms:
block_checkbox(),
block_combobox(),
block_date_picker(),
block_date_range_picker(),
block_field(),
block_field_description(),
block_field_group(),
block_field_invalid(),
block_field_label(),
block_field_legend(),
block_field_set(),
block_file_input(),
block_input(),
block_input_group(),
block_input_group_addon(),
block_radio_group(),
block_select(),
block_slider(),
block_switch(),
block_textarea(),
block_toggle_group(),
update_block_combobox(),
update_block_date_picker(),
update_block_date_range_picker(),
update_block_file_input(),
update_block_input(),
update_block_radio_group(),
update_block_select(),
update_block_slider(),
update_block_switch(),
update_block_textarea(),
update_block_toggle_group()
Server-side updater for block_combobox(). Mirrors
update_block_select(): multiple, max_items, and style are create-only;
when selected is supplied without choices, it is validated for shape only
and resolved against the client's current choice list.
update_block_combobox( session = shiny::getDefaultReactiveDomain(), input_id, choices, selected, placeholder, search_placeholder, empty_message, disabled, width, class, size, invalid, notify = TRUE )update_block_combobox( session = shiny::getDefaultReactiveDomain(), input_id, choices, selected, placeholder, search_placeholder, empty_message, disabled, width, class, size, invalid, notify = TRUE )
session |
Shiny session. Defaults to the current reactive domain. |
input_id |
Input id passed to |
choices |
Optional replacement choices. |
selected |
Optional selected value. Use a character vector for
multiple selects. |
placeholder |
Optional replacement placeholder. |
search_placeholder |
Optional replacement filter-box placeholder. |
empty_message |
Optional replacement empty-state message. |
disabled |
Optional disabled state. |
width |
Optional replacement CSS width value. |
class |
Optional replacement classes. |
size |
Optional replacement size. One of |
invalid |
Optional invalid/error state. |
notify |
Whether Shiny should receive an input event when |
Invisibly returns NULL.
Other forms:
block_checkbox(),
block_combobox(),
block_date_picker(),
block_date_range_picker(),
block_field(),
block_field_description(),
block_field_group(),
block_field_invalid(),
block_field_label(),
block_field_legend(),
block_field_set(),
block_file_input(),
block_input(),
block_input_group(),
block_input_group_addon(),
block_radio_group(),
block_select(),
block_slider(),
block_switch(),
block_textarea(),
block_toggle_group(),
update_block_checkbox(),
update_block_date_picker(),
update_block_date_range_picker(),
update_block_file_input(),
update_block_input(),
update_block_radio_group(),
update_block_select(),
update_block_slider(),
update_block_switch(),
update_block_textarea(),
update_block_toggle_group()
Updates the value, bounds, and cosmetic props of a block_date_picker().
Following shiny::updateDateInput(), omitted arguments are left unchanged.
To clear the selected date from the server, pass clear = TRUE (a bare
value = NULL is ignored, matching Shiny's "missing args are ignored" rule).
update_block_date_picker( session = shiny::getDefaultReactiveDomain(), input_id, value, min, max, placeholder, disabled, invalid, class, style, notify = TRUE, clear = FALSE )update_block_date_picker( session = shiny::getDefaultReactiveDomain(), input_id, value, min, max, placeholder, disabled, invalid, class, style, notify = TRUE, clear = FALSE )
session |
Shiny session. Defaults to the current reactive domain. |
input_id |
Input id passed to |
value |
Optional replacement date ( |
min |
Optional replacement lower bound. Use |
max |
Optional replacement upper bound. Use |
placeholder |
Optional replacement placeholder text. |
disabled |
Optional disabled state. |
invalid |
Optional invalid flag. |
class |
Optional replacement classes for the wrapper. |
style |
Optional replacement inline CSS styles for the trigger. |
notify |
Whether Shiny should receive an input event when |
clear |
Whether to clear the selected date (sends an explicit empty
value). Takes precedence over |
Invisibly returns NULL.
Other forms:
block_checkbox(),
block_combobox(),
block_date_picker(),
block_date_range_picker(),
block_field(),
block_field_description(),
block_field_group(),
block_field_invalid(),
block_field_label(),
block_field_legend(),
block_field_set(),
block_file_input(),
block_input(),
block_input_group(),
block_input_group_addon(),
block_radio_group(),
block_select(),
block_slider(),
block_switch(),
block_textarea(),
block_toggle_group(),
update_block_checkbox(),
update_block_combobox(),
update_block_date_range_picker(),
update_block_file_input(),
update_block_input(),
update_block_radio_group(),
update_block_select(),
update_block_slider(),
update_block_switch(),
update_block_textarea(),
update_block_toggle_group()
Updates the range, bounds, and cosmetic props of a
block_date_range_picker(). Following shiny::updateDateRangeInput(),
omitted arguments are left unchanged, and start/end can be updated
independently. Note that the control only reports a complete range: setting
a single endpoint when the other is empty leaves the value NULL (the
trigger keeps its placeholder) until both endpoints are present, so the input
event fires but input$<id> stays empty. To clear the selected range from
the server, pass clear = TRUE (a bare start = NULL/end = NULL is
ignored, matching Shiny's "missing args are ignored" rule).
update_block_date_range_picker( session = shiny::getDefaultReactiveDomain(), input_id, start, end, min, max, separator, placeholder, disabled, invalid, class, style, notify = TRUE, clear = FALSE )update_block_date_range_picker( session = shiny::getDefaultReactiveDomain(), input_id, start, end, min, max, separator, placeholder, disabled, invalid, class, style, notify = TRUE, clear = FALSE )
session |
Shiny session. Defaults to the current reactive domain. |
input_id |
Input id passed to |
start |
Optional replacement range start ( |
end |
Optional replacement range end. |
min |
Optional replacement lower bound. Use |
max |
Optional replacement upper bound. Use |
separator |
Optional replacement separator text. |
placeholder |
Optional replacement placeholder text. |
disabled |
Optional disabled state. |
invalid |
Optional invalid flag. |
class |
Optional replacement classes for the wrapper. |
style |
Optional replacement inline CSS styles for the trigger. |
notify |
Whether Shiny should receive an input event when the range changes. Cosmetic-only updates never notify. |
clear |
Whether to clear the selected range (sends an explicit empty
range). Takes precedence over |
Invisibly returns NULL.
Other forms:
block_checkbox(),
block_combobox(),
block_date_picker(),
block_date_range_picker(),
block_field(),
block_field_description(),
block_field_group(),
block_field_invalid(),
block_field_label(),
block_field_legend(),
block_field_set(),
block_file_input(),
block_input(),
block_input_group(),
block_input_group_addon(),
block_radio_group(),
block_select(),
block_slider(),
block_switch(),
block_textarea(),
block_toggle_group(),
update_block_checkbox(),
update_block_combobox(),
update_block_date_picker(),
update_block_file_input(),
update_block_input(),
update_block_radio_group(),
update_block_select(),
update_block_slider(),
update_block_switch(),
update_block_textarea(),
update_block_toggle_group()
Send a server-driven update to a block_dialog().
update_block_dialog( session = shiny::getDefaultReactiveDomain(), input_id, open, title, description, footer, size, class, style, notify = TRUE )update_block_dialog( session = shiny::getDefaultReactiveDomain(), input_id, open, title, description, footer, size, class, style, notify = TRUE )
session |
Shiny session. Defaults to the current reactive session. |
input_id |
Dialog input id (unnamespaced; updaters namespace
via |
open |
Optional boolean. |
title |
Optional replacement title. |
description |
Optional replacement description. |
footer |
Optional replacement footer content. Pass |
size |
Optional content size: |
class |
Optional replacement classes for the dialog content container,
or |
style |
Optional replacement inline CSS styles for the dialog content
container, or |
notify |
Whether Shiny receives an input event when |
Invisibly returns NULL.
Other content:
block_accordion(),
block_accordion_item(),
block_alert(),
block_alert_action(),
block_alert_description(),
block_alert_title(),
block_badge(),
block_card(),
block_card_content(),
block_card_description(),
block_card_footer(),
block_card_header(),
block_card_title(),
block_code(),
block_dialog(),
block_dropdown_menu(),
block_empty(),
block_popover(),
block_progress(),
block_separator(),
block_skeleton(),
block_spinner(),
block_table(),
block_toaster(),
block_tooltip(),
block_value_box(),
dismiss_toast(),
dropdown_menu_item(),
dropdown_menu_label(),
dropdown_menu_separator(),
inc_block_progress(),
show_toast(),
table_column(),
update_block_accordion(),
update_block_dropdown_menu(),
update_block_popover(),
update_block_progress(),
update_block_table(),
update_block_toaster()
Updates the cosmetic and stateful props of a block_file_input(). The file
value itself is owned by Shiny's native file binding and, as with
shiny::fileInput(), cannot be set from the server; use reset = TRUE to
clear the current selection client-side.
update_block_file_input( session = shiny::getDefaultReactiveDomain(), input_id, variant, button_label, placeholder, dropzone_label, dropzone_hint, dropzone_icon, dropzone_content, accept, multiple, disabled, invalid, style, class, reset = FALSE )update_block_file_input( session = shiny::getDefaultReactiveDomain(), input_id, variant, button_label, placeholder, dropzone_label, dropzone_hint, dropzone_icon, dropzone_content, accept, multiple, disabled, invalid, style, class, reset = FALSE )
session |
Shiny session. Defaults to the current reactive domain. |
input_id |
Input id passed to |
variant |
Optional replacement variant. One of |
button_label |
Optional replacement button text. |
placeholder |
Optional replacement placeholder text. |
dropzone_label |
Optional replacement dropzone label. Use |
dropzone_hint |
Optional replacement dropzone hint. Use |
dropzone_icon |
Optional replacement dropzone icon (name string or
|
dropzone_content |
Optional replacement dropzone interior
( |
accept |
Optional replacement accepted types. Use |
multiple |
Optional flag for allowing multiple files. |
disabled |
Optional disabled state. |
invalid |
Optional invalid flag. |
style |
Optional replacement inline CSS styles for the visible control. |
class |
Optional replacement classes for the visible control. |
reset |
Whether to clear the current file selection. |
Invisibly returns NULL.
Other forms:
block_checkbox(),
block_combobox(),
block_date_picker(),
block_date_range_picker(),
block_field(),
block_field_description(),
block_field_group(),
block_field_invalid(),
block_field_label(),
block_field_legend(),
block_field_set(),
block_file_input(),
block_input(),
block_input_group(),
block_input_group_addon(),
block_radio_group(),
block_select(),
block_slider(),
block_switch(),
block_textarea(),
block_toggle_group(),
update_block_checkbox(),
update_block_combobox(),
update_block_date_picker(),
update_block_date_range_picker(),
update_block_input(),
update_block_radio_group(),
update_block_select(),
update_block_slider(),
update_block_switch(),
update_block_textarea(),
update_block_toggle_group()
Update a runtime text input
update_block_input( session = shiny::getDefaultReactiveDomain(), input_id, value, placeholder, type, min, max, step, disabled, invalid, style, class, notify = TRUE )update_block_input( session = shiny::getDefaultReactiveDomain(), input_id, value, placeholder, type, min, max, step, disabled, invalid, style, class, notify = TRUE )
session |
Shiny session. Defaults to the current reactive domain. |
input_id |
Input id passed to |
value |
Optional replacement value. |
placeholder |
Optional replacement placeholder text. |
type |
Optional input type. |
min |
Optional replacement lower bound (number type only). Use
|
max |
Optional replacement upper bound (number type only). Use
|
step |
Optional replacement step size (number type only). Use
|
disabled |
Optional disabled state. |
invalid |
Optional invalid flag. |
style |
Optional replacement inline CSS styles for the input. |
class |
Optional replacement classes for the wrapper. |
notify |
Whether Shiny should receive an input event when |
Invisibly returns NULL.
Other forms:
block_checkbox(),
block_combobox(),
block_date_picker(),
block_date_range_picker(),
block_field(),
block_field_description(),
block_field_group(),
block_field_invalid(),
block_field_label(),
block_field_legend(),
block_field_set(),
block_file_input(),
block_input(),
block_input_group(),
block_input_group_addon(),
block_radio_group(),
block_select(),
block_slider(),
block_switch(),
block_textarea(),
block_toggle_group(),
update_block_checkbox(),
update_block_combobox(),
update_block_date_picker(),
update_block_date_range_picker(),
update_block_file_input(),
update_block_radio_group(),
update_block_select(),
update_block_slider(),
update_block_switch(),
update_block_textarea(),
update_block_toggle_group()
Send a server-driven update to a block_popover().
update_block_popover( session = shiny::getDefaultReactiveDomain(), input_id, open, trigger, body, side, align, style, class, notify = TRUE )update_block_popover( session = shiny::getDefaultReactiveDomain(), input_id, open, trigger, body, side, align, style, class, notify = TRUE )
session |
Shiny session. Defaults to the current reactive session. |
input_id |
Popover input id (unnamespaced; updaters namespace
via |
open |
Optional boolean. |
trigger |
Optional replacement trigger label. |
body |
Optional replacement body content. Pass |
side |
Optional side: |
align |
Optional alignment: |
style |
Optional replacement content style (CSS string or named
list). Pass |
class |
Optional replacement content classes. Pass |
notify |
Whether Shiny receives an input event when |
Invisibly returns NULL.
Other content:
block_accordion(),
block_accordion_item(),
block_alert(),
block_alert_action(),
block_alert_description(),
block_alert_title(),
block_badge(),
block_card(),
block_card_content(),
block_card_description(),
block_card_footer(),
block_card_header(),
block_card_title(),
block_code(),
block_dialog(),
block_dropdown_menu(),
block_empty(),
block_popover(),
block_progress(),
block_separator(),
block_skeleton(),
block_spinner(),
block_table(),
block_toaster(),
block_tooltip(),
block_value_box(),
dismiss_toast(),
dropdown_menu_item(),
dropdown_menu_label(),
dropdown_menu_separator(),
inc_block_progress(),
show_toast(),
table_column(),
update_block_accordion(),
update_block_dialog(),
update_block_dropdown_menu(),
update_block_progress(),
update_block_table(),
update_block_toaster()
Sets fields on a block_progress() from the server. Following Shiny's
setProgress(), omitted arguments are left unchanged on the client. Text
fields (message, detail, label) clear when passed an explicit NULL;
numeric fields error on NULL (omit them to preserve the current value).
update_block_progress( session = shiny::getDefaultReactiveDomain(), id, value, min, max, message, detail, label, show_value, indeterminate, variant, class, style )update_block_progress( session = shiny::getDefaultReactiveDomain(), id, value, min, max, message, detail, label, show_value, indeterminate, variant, class, style )
session |
Shiny session. Defaults to the current reactive domain. |
id |
Component id passed to |
value |
Replacement progress value (clamped client-side). |
min |
Replacement lower bound. |
max |
Replacement upper bound. |
message |
Replacement status line; |
detail |
Replacement detail text; |
label |
Replacement label; |
show_value |
Whether to render the percent. |
indeterminate |
Whether to show the unknown-progress sweep. |
variant |
Replacement indicator color. |
class |
Replacement classes; |
style |
Replacement inline styles; |
Because a partial update cannot see the client's current state, min < max
is validated here only when both are supplied in the same call, and value
is not clamped server-side. The runtime is the single source of truth: it
clamps value into the merged [min, max] and reconciles range validity
(see block_progress()). Supplying min/max that invert the client's
current bounds is therefore the caller's responsibility.
Invisibly returns NULL.
Other content:
block_accordion(),
block_accordion_item(),
block_alert(),
block_alert_action(),
block_alert_description(),
block_alert_title(),
block_badge(),
block_card(),
block_card_content(),
block_card_description(),
block_card_footer(),
block_card_header(),
block_card_title(),
block_code(),
block_dialog(),
block_dropdown_menu(),
block_empty(),
block_popover(),
block_progress(),
block_separator(),
block_skeleton(),
block_spinner(),
block_table(),
block_toaster(),
block_tooltip(),
block_value_box(),
dismiss_toast(),
dropdown_menu_item(),
dropdown_menu_label(),
dropdown_menu_separator(),
inc_block_progress(),
show_toast(),
table_column(),
update_block_accordion(),
update_block_dialog(),
update_block_dropdown_menu(),
update_block_popover(),
update_block_table(),
update_block_toaster()
Update a runtime radio group input
update_block_radio_group( session = shiny::getDefaultReactiveDomain(), input_id, selected, choices, disabled, invalid, orientation, style, class, notify = TRUE )update_block_radio_group( session = shiny::getDefaultReactiveDomain(), input_id, selected, choices, disabled, invalid, orientation, style, class, notify = TRUE )
session |
Shiny session. Defaults to the current reactive domain. |
input_id |
Input id passed to |
selected |
Optional new selected value. |
choices |
Optional replacement choices. |
disabled |
Optional disabled state. |
invalid |
Optional invalid flag. |
orientation |
Optional new orientation. |
style |
Optional replacement inline CSS styles. |
class |
Optional replacement classes. |
notify |
Whether Shiny should receive an input event when
|
Invisibly returns NULL.
Other forms:
block_checkbox(),
block_combobox(),
block_date_picker(),
block_date_range_picker(),
block_field(),
block_field_description(),
block_field_group(),
block_field_invalid(),
block_field_label(),
block_field_legend(),
block_field_set(),
block_file_input(),
block_input(),
block_input_group(),
block_input_group_addon(),
block_radio_group(),
block_select(),
block_slider(),
block_switch(),
block_textarea(),
block_toggle_group(),
update_block_checkbox(),
update_block_combobox(),
update_block_date_picker(),
update_block_date_range_picker(),
update_block_file_input(),
update_block_input(),
update_block_select(),
update_block_slider(),
update_block_switch(),
update_block_textarea(),
update_block_toggle_group()
Not every block_select() argument can be changed after creation:
multiple, max_items, and style are create-only. Also note that when
selected is supplied without choices, it is validated for shape only —
the server cannot see the client's current choice list, so membership is
resolved client-side.
update_block_select( session = shiny::getDefaultReactiveDomain(), input_id, choices, selected, placeholder, disabled, width, class, size, invalid, notify = TRUE )update_block_select( session = shiny::getDefaultReactiveDomain(), input_id, choices, selected, placeholder, disabled, width, class, size, invalid, notify = TRUE )
session |
Shiny session. Defaults to the current reactive domain. |
input_id |
Input id passed to |
choices |
Optional replacement choices. |
selected |
Optional selected value. Use a character vector for
multiple selects. |
placeholder |
Optional replacement placeholder. |
disabled |
Optional disabled state. |
width |
Optional replacement CSS width value. |
class |
Optional replacement classes. |
size |
Optional replacement size. One of |
invalid |
Optional invalid/error state. |
notify |
Whether Shiny should receive an input event when |
Invisibly returns NULL.
Other forms:
block_checkbox(),
block_combobox(),
block_date_picker(),
block_date_range_picker(),
block_field(),
block_field_description(),
block_field_group(),
block_field_invalid(),
block_field_label(),
block_field_legend(),
block_field_set(),
block_file_input(),
block_input(),
block_input_group(),
block_input_group_addon(),
block_radio_group(),
block_select(),
block_slider(),
block_switch(),
block_textarea(),
block_toggle_group(),
update_block_checkbox(),
update_block_combobox(),
update_block_date_picker(),
update_block_date_range_picker(),
update_block_file_input(),
update_block_input(),
update_block_radio_group(),
update_block_slider(),
update_block_switch(),
update_block_textarea(),
update_block_toggle_group()
Update a runtime slider input
update_block_slider( session = shiny::getDefaultReactiveDomain(), input_id, value, min, max, step, orientation, show_value, min_label, max_label, disabled, invalid, style, class, notify = TRUE )update_block_slider( session = shiny::getDefaultReactiveDomain(), input_id, value, min, max, step, orientation, show_value, min_label, max_label, disabled, invalid, style, class, notify = TRUE )
session |
Shiny session. Defaults to the current reactive domain. |
input_id |
Input id passed to |
value |
Optional replacement value. One or two numeric values. |
min |
Optional lower bound. |
max |
Optional upper bound. |
step |
Optional step size. |
orientation |
Optional slider orientation. One of |
show_value |
Optional flag for rendering the current value label. |
min_label |
Optional replacement minimum label. Use |
max_label |
Optional replacement maximum label. Use |
disabled |
Optional disabled state. |
invalid |
Optional invalid flag. |
style |
Optional replacement inline CSS styles for the slider. |
class |
Optional replacement classes for the wrapper. |
notify |
Whether Shiny should receive an input event when |
Invisibly returns NULL.
Other forms:
block_checkbox(),
block_combobox(),
block_date_picker(),
block_date_range_picker(),
block_field(),
block_field_description(),
block_field_group(),
block_field_invalid(),
block_field_label(),
block_field_legend(),
block_field_set(),
block_file_input(),
block_input(),
block_input_group(),
block_input_group_addon(),
block_radio_group(),
block_select(),
block_slider(),
block_switch(),
block_textarea(),
block_toggle_group(),
update_block_checkbox(),
update_block_combobox(),
update_block_date_picker(),
update_block_date_range_picker(),
update_block_file_input(),
update_block_input(),
update_block_radio_group(),
update_block_select(),
update_block_switch(),
update_block_textarea(),
update_block_toggle_group()
Update a runtime switch input
update_block_switch( session = shiny::getDefaultReactiveDomain(), input_id, checked, disabled, size, style, class, notify = TRUE )update_block_switch( session = shiny::getDefaultReactiveDomain(), input_id, checked, disabled, size, style, class, notify = TRUE )
session |
Shiny session. Defaults to the current reactive domain. |
input_id |
Input id passed to |
checked |
Optional checked state. |
disabled |
Optional disabled state. |
size |
Optional replacement size. One of |
style |
Optional replacement inline CSS styles. |
class |
Optional replacement classes. |
notify |
Whether Shiny should receive an input event when |
Invisibly returns NULL.
Other forms:
block_checkbox(),
block_combobox(),
block_date_picker(),
block_date_range_picker(),
block_field(),
block_field_description(),
block_field_group(),
block_field_invalid(),
block_field_label(),
block_field_legend(),
block_field_set(),
block_file_input(),
block_input(),
block_input_group(),
block_input_group_addon(),
block_radio_group(),
block_select(),
block_slider(),
block_switch(),
block_textarea(),
block_toggle_group(),
update_block_checkbox(),
update_block_combobox(),
update_block_date_picker(),
update_block_date_range_picker(),
update_block_file_input(),
update_block_input(),
update_block_radio_group(),
update_block_select(),
update_block_slider(),
update_block_textarea(),
update_block_toggle_group()
Re-renders a block_table() (created with an id) by pushing a freshly
formatted payload to the browser. Every argument runs through the same
formatting pipeline as block_table(), so the refreshed table is identical
to one rendered with the same arguments at UI time.
update_block_table( session = shiny::getDefaultReactiveDomain(), id, data = NULL, columns = NULL, caption = NULL, max_rows = NULL, na = "", digits = NULL, rownames = FALSE, row_format = NULL, striped = FALSE, hover = TRUE, bordered = FALSE, loading = NULL, selection = NULL, selected = NULL )update_block_table( session = shiny::getDefaultReactiveDomain(), id, data = NULL, columns = NULL, caption = NULL, max_rows = NULL, na = "", digits = NULL, rownames = FALSE, row_format = NULL, striped = FALSE, hover = TRUE, bordered = FALSE, loading = NULL, selection = NULL, selected = NULL )
session |
Shiny session. Defaults to the current reactive domain. |
id |
Input id passed to |
data |
Optional replacement data frame. When supplied, the table re-renders with the formatting arguments below. |
columns, caption, max_rows, na, digits, rownames, row_format, striped, hover, bordered
|
Optional formatting arguments, matching |
loading |
Optional flag. |
selection |
Optional new row-selection mode ( |
selected |
Optional integer vector of 1-based row indices to select.
Pass |
Invisibly returns NULL.
Other content:
block_accordion(),
block_accordion_item(),
block_alert(),
block_alert_action(),
block_alert_description(),
block_alert_title(),
block_badge(),
block_card(),
block_card_content(),
block_card_description(),
block_card_footer(),
block_card_header(),
block_card_title(),
block_code(),
block_dialog(),
block_dropdown_menu(),
block_empty(),
block_popover(),
block_progress(),
block_separator(),
block_skeleton(),
block_spinner(),
block_table(),
block_toaster(),
block_tooltip(),
block_value_box(),
dismiss_toast(),
dropdown_menu_item(),
dropdown_menu_label(),
dropdown_menu_separator(),
inc_block_progress(),
show_toast(),
table_column(),
update_block_accordion(),
update_block_dialog(),
update_block_dropdown_menu(),
update_block_popover(),
update_block_progress(),
update_block_toaster()
Selects a tab rendered by block_tabs() from the server.
update_block_tabs( session = shiny::getDefaultReactiveDomain(), input_id, selected, notify = TRUE )update_block_tabs( session = shiny::getDefaultReactiveDomain(), input_id, selected, notify = TRUE )
session |
Shiny session. Defaults to the current reactive domain. |
input_id |
Input id passed to |
selected |
Tab value to activate. |
notify |
Whether Shiny should receive an input event after the tab is selected. |
Invisibly returns NULL.
Other navigation:
block_breadcrumb(),
block_breadcrumb_ellipsis(),
block_breadcrumb_item(),
block_nav(),
block_nav_group(),
block_nav_item(),
block_nav_label(),
block_tab(),
block_tabs(),
update_block_nav()
Send a runtime message to a block_task_button(). Any argument left
unspecified is preserved on the client. Pass NULL for icon, icon_busy,
style, or class to clear them.
update_block_task_button( session = shiny::getDefaultReactiveDomain(), input_id, state, label, label_busy, variant, size, icon, icon_busy, icon_position, disabled, style, class )update_block_task_button( session = shiny::getDefaultReactiveDomain(), input_id, state, label, label_busy, variant, size, icon, icon_busy, icon_position, disabled, style, class )
session |
Shiny session. Defaults to the current reactive domain. |
input_id |
Input id passed to |
state |
Optional |
label |
Optional replacement ready-state label. |
label_busy |
Optional replacement busy label. |
variant |
Optional new visual variant. |
size |
Optional new size. |
icon |
Optional vendored icon name, |
icon_busy |
Optional busy icon name, |
icon_position |
Optional |
disabled |
Optional disabled state. |
style |
Optional inline CSS styles, or |
class |
Optional replacement classes merged onto the runtime button
element. Pass |
Setting state = "busy" takes manual control: an automatic reset scheduled
by a click will not release the button. Send state = "ready" to release it.
Invisibly returns NULL.
Other action:
block_button(),
block_task_button(),
update_block_button()
Update a runtime textarea input
update_block_textarea( session = shiny::getDefaultReactiveDomain(), input_id, value, placeholder, rows, disabled, invalid, resize, style, class, notify = TRUE )update_block_textarea( session = shiny::getDefaultReactiveDomain(), input_id, value, placeholder, rows, disabled, invalid, resize, style, class, notify = TRUE )
session |
Shiny session. Defaults to the current reactive domain. |
input_id |
Input id passed to |
value |
Optional replacement value. |
placeholder |
Optional replacement placeholder text. |
rows |
Optional number of visible rows. |
disabled |
Optional disabled state. |
invalid |
Optional invalid flag. |
resize |
Optional textarea resize behavior. One of |
style |
Optional replacement inline CSS styles for the textarea. |
class |
Optional replacement classes for the wrapper. |
notify |
Whether Shiny should receive an input event when |
Invisibly returns NULL.
Other forms:
block_checkbox(),
block_combobox(),
block_date_picker(),
block_date_range_picker(),
block_field(),
block_field_description(),
block_field_group(),
block_field_invalid(),
block_field_label(),
block_field_legend(),
block_field_set(),
block_file_input(),
block_input(),
block_input_group(),
block_input_group_addon(),
block_radio_group(),
block_select(),
block_slider(),
block_switch(),
block_textarea(),
block_toggle_group(),
update_block_checkbox(),
update_block_combobox(),
update_block_date_picker(),
update_block_date_range_picker(),
update_block_file_input(),
update_block_input(),
update_block_radio_group(),
update_block_select(),
update_block_slider(),
update_block_switch(),
update_block_toggle_group()
Update the active theme
update_block_theme( session = shiny::getDefaultReactiveDomain(), mode = c("system", "light", "dark") )update_block_theme( session = shiny::getDefaultReactiveDomain(), mode = c("system", "light", "dark") )
session |
Shiny session. |
mode |
Theme mode: |
Invisibly returns NULL.
Other theme:
block_dark_mode_toggle(),
block_style(),
block_style_profiles(),
block_theme(),
block_theme_presets()
Send a server-driven update to a block_toaster(). Currently supports moving
the region to a different screen position without re-mounting it.
update_block_toaster( session = shiny::getDefaultReactiveDomain(), toaster_id, position )update_block_toaster( session = shiny::getDefaultReactiveDomain(), toaster_id, position )
session |
Shiny session. Defaults to the current reactive session. |
toaster_id |
Target |
position |
New screen anchor. One of |
Invisibly returns NULL.
block_toaster(), show_toast(), dismiss_toast()
Other content:
block_accordion(),
block_accordion_item(),
block_alert(),
block_alert_action(),
block_alert_description(),
block_alert_title(),
block_badge(),
block_card(),
block_card_content(),
block_card_description(),
block_card_footer(),
block_card_header(),
block_card_title(),
block_code(),
block_dialog(),
block_dropdown_menu(),
block_empty(),
block_popover(),
block_progress(),
block_separator(),
block_skeleton(),
block_spinner(),
block_table(),
block_toaster(),
block_tooltip(),
block_value_box(),
dismiss_toast(),
dropdown_menu_item(),
dropdown_menu_label(),
dropdown_menu_separator(),
inc_block_progress(),
show_toast(),
table_column(),
update_block_accordion(),
update_block_dialog(),
update_block_dropdown_menu(),
update_block_popover(),
update_block_progress(),
update_block_table()
type and icon_only are create-only. When selected is supplied
without choices, membership is resolved client-side. Replacing
choices resets item icons, so pass icons together with choices
to keep them.
update_block_toggle_group( session = shiny::getDefaultReactiveDomain(), input_id, selected, choices, icons, disabled, variant, size, style, class, notify = TRUE )update_block_toggle_group( session = shiny::getDefaultReactiveDomain(), input_id, selected, choices, icons, disabled, variant, size, style, class, notify = TRUE )
session |
Shiny session. Defaults to the current reactive domain. |
input_id |
Input id passed to |
selected |
Optional new pressed value(s). |
choices |
Optional replacement choices. |
icons |
Optional icons for the replacement |
disabled |
Optional |
variant |
Optional new visual variant. |
size |
Optional new size. |
style |
Optional replacement inline CSS styles. |
class |
Optional replacement classes. |
notify |
Whether Shiny should receive an input event when
|
Invisibly returns NULL.
Other forms:
block_checkbox(),
block_combobox(),
block_date_picker(),
block_date_range_picker(),
block_field(),
block_field_description(),
block_field_group(),
block_field_invalid(),
block_field_label(),
block_field_legend(),
block_field_set(),
block_file_input(),
block_input(),
block_input_group(),
block_input_group_addon(),
block_radio_group(),
block_select(),
block_slider(),
block_switch(),
block_textarea(),
block_toggle_group(),
update_block_checkbox(),
update_block_combobox(),
update_block_date_picker(),
update_block_date_range_picker(),
update_block_file_input(),
update_block_input(),
update_block_radio_group(),
update_block_select(),
update_block_slider(),
update_block_switch(),
update_block_textarea()