← Back to Components

Button

Interactive controls for triggers, forms, and custom actions.

Interactive Playground

R Code

API Reference

block_button()

High-fidelity interactive triggers supporting click events, loading indicators, and form submissions.

ArgumentTypeDefaultDescription
labelcharacterrequiredLabel string on the button face.
input_idcharacterNULLOptional Shiny input trigger name.
variant'default' | 'secondary' | 'outline' | 'ghost' | 'destructive' | 'link''default'Thematic button style type.
size'default' | 'sm' | 'lg' | 'icon''default'Dimension size variant presets.
iconcharacter | shiny.tagNULLInner icon element or Lucide name.
disabledlogicalFALSEWhether the button is disabled.
classcharacterNULLCustom styling classes to merge.

update_block_button()

Dynamically refreshes buttons from R server logic, triggering loading spinners or locking user inputs.

ArgumentTypeDefaultDescription
sessionShinySessionrequiredStandard active R/Shiny session.
input_idcharacterrequiredInput trigger identifier to update.
labelcharacterNULLNew label string values to apply.
variantcharacterNULLUpdate the button's visual preset.
sizecharacterNULLUpdate button dimension sizing.
iconcharacterNULLNew Lucide icon glyph name.
disabledlogicalNULLEnable/Disable button state.
loadinglogicalNULLShow spinner icon next to button label.