← Back to Components
Nav Group
Collapsible sidebar groups, section labels, and nested leaf items for block_nav().
Interactive Playground
R Code
API Reference
block_nav()
Wraps leaf nav items, collapsible groups, and section labels. With an id it becomes a Shiny input whose value comes only from clicked block_nav_item() leaves.
| Argument | Type | Default | Description |
|---|---|---|---|
| ... | shiny.tag | tagList | required | block_nav_item(), block_nav_group(), and block_nav_label() children. |
| id | character | NULL | Optional Shiny input id. Nested leaf values must be unique and non-empty when set. |
| class | character | NULL | CSS class applied to the navigation wrapper. |
block_nav_group()
Creates a collapsible parent row that toggles nested leaf items without reporting a Shiny input value.
| Argument | Type | Default | Description |
|---|---|---|---|
| label | character | required | Group trigger label. |
| ... | block_nav_item() | required | Nested leaf navigation items. |
| icon | character | shiny.tag | NULL | Leading icon shown in the trigger. |
| value | character | NULL | Optional group identity stored as data-sb-nav-group-value; not reported as the nav input. |
| expanded | logical | TRUE | Initial disclosure state. |
| class | character | NULL | Additional classes for the group wrapper. |
block_nav_label()
Creates a non-interactive section caption inside a nav.
| Argument | Type | Default | Description |
|---|---|---|---|
| text | character | required | Caption text. |
| class | character | NULL | Additional classes for the label element. |