A component that groups multiple buttons together with shared borders and styling.
button
- Copy Demo
Installation
You can run either of the following commands:
Update the imports to match your project setup.
Usage
You can use the ButtonGroup component in combination with the Button component.
use crate::components::ui::button::{Button, ButtonVariant};
use crate::components::ui::button_group::ButtonGroup;<ButtonGroup>
<Button variant=ButtonVariant::Outline>"First"</Button>
<Button variant=ButtonVariant::Outline>"Second"</Button>
<Button variant=ButtonVariant::Outline>"Third"</Button>
</ButtonGroup>Examples
With Separator
Button Group with visual separators between adjacent Button components for improved visual clarity. This example demonstrates how to use ButtonGroupSeparator in Leptos to create segmented button controls with clear boundaries and enhanced usability in Rust UI components.
- Copy Demo
With Icons
Button Group component supporting icon Button components with both horizontal and vertical orientations. This example shows how to combine Lucide icons with button groups in Leptos for creating compact toolbar interfaces and icon-based navigation in Rust applications.
- Copy Demo