Joins adjoining buttons into a single segmented control: inner corners
collapse, the shared 1px border renders once, and the hovered/focused button
raises so its full outline shows. Drop in ordinary shad_button()s (any
variant; "outline" reads best) plus optional shad_button_group_text()
label segments and shad_button_group_separator() hairlines.
Usage
shad_button_group(
...,
orientation = c("horizontal", "vertical"),
aria_label = NULL,
class = NULL
)
shad_button_group_separator(class = NULL)
shad_button_group_text(..., class = NULL)See also
shad_button(), shad_button_group_text(),
shad_button_group_separator()
Other shadshiny tier-1 components:
shad_alert(),
shad_aspect_ratio(),
shad_avatar(),
shad_badge(),
shad_breadcrumb(),
shad_button(),
shad_card(),
shad_code_block(),
shad_empty(),
shad_item(),
shad_kbd_group(),
shad_label(),
shad_progress(),
shad_scroll_fade(),
shad_separator(),
shad_shimmer(),
shad_skeleton(),
shad_spinner(),
shad_table(),
shad_typography
Examples
shad_button_group(
shad_button("Left", variant = "outline"),
shad_button("Center", variant = "outline"),
shad_button("Right", variant = "outline"),
aria_label = "Text alignment"
)
#> <div class="shad-button-group" role="group" data-orientation="horizontal" aria-label="Text alignment">
#> <button type="button" class="shad-btn shad-btn--outline">Left</button>
#> <button type="button" class="shad-btn shad-btn--outline">Center</button>
#> <button type="button" class="shad-btn shad-btn--outline">Right</button>
#> </div>