← 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.
| Argument | Type | Default | Description |
|---|---|---|---|
| label | character | required | Label string on the button face. |
| input_id | character | NULL | Optional 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. |
| icon | character | shiny.tag | NULL | Inner icon element or Lucide name. |
| disabled | logical | FALSE | Whether the button is disabled. |
| class | character | NULL | Custom styling classes to merge. |
update_block_button()
Dynamically refreshes buttons from R server logic, triggering loading spinners or locking user inputs.
| Argument | Type | Default | Description |
|---|---|---|---|
| session | ShinySession | required | Standard active R/Shiny session. |
| input_id | character | required | Input trigger identifier to update. |
| label | character | NULL | New label string values to apply. |
| variant | character | NULL | Update the button's visual preset. |
| size | character | NULL | Update button dimension sizing. |
| icon | character | NULL | New Lucide icon glyph name. |
| disabled | logical | NULL | Enable/Disable button state. |
| loading | logical | NULL | Show spinner icon next to button label. |