← Back to Components
Tabs
Structured navigation tabs that keep horizontal labels reachable with contained scrolling on narrow layouts.
Interactive Playground
R Code
API Reference
block_tabs()
Sleek reactive card panels organizing dashboard tabs dynamically.
| Argument | Type | Default | Description |
|---|---|---|---|
| id | character | NULL | Optional Shiny input ID for the active tab value. |
| ... | shiny.tag | tagList | required | Tab layout child views created via block_tab(). |
| selected | character | NULL | Name of initial selected active view. |
| variant | 'default' | 'line' | 'default' | Visual tab list style. |
| orientation | 'horizontal' | 'vertical' | 'horizontal' | Tab list direction; horizontal lists scroll within narrow containers when labels do not fit. |
| class | character | NULL | Styling classes applied on layouts wrapper. |
update_block_tabs()
Selects an active tab from the Shiny server.
| Argument | Type | Default | Description |
|---|---|---|---|
| session | Shiny session | current domain | Session used to send the update message. |
| input_id | character | required | Input ID passed to block_tabs(). |
| selected | character | required | Tab value to activate. |
| notify | logical | TRUE | Whether to notify Shiny after selecting the tab. |
block_tab()
Wraps content sections placed inside tabs.
| Argument | Type | Default | Description |
|---|---|---|---|
| title | character | required | Label string shown in tabs select row. |
| ... | shiny.tag | tagList | required | UI elements to display inside the tab's pane. |
| value | character | NULL | Unique value key representing tab. |