Button Group
How to use button groups in React Button Pro
Button Group
Learn how to group multiple buttons together for related actions.
Basic Group
Mixed Styles
Outline Group
Usage
Basic Implementation
With Selection
Props
ButtonGroup Props
Prop | Type | Default | Description |
---|---|---|---|
className | string | - | Additional CSS classes |
children | ReactNode | - | Button components |
orientation | 'horizontal' | 'vertical' | 'horizontal' | Group orientation |
spacing | 'none' | 'sm' | 'md' | 'lg' | 'none' | Space between buttons |
Best Practices
-
Group Organization:
- Group related actions together
- Maintain logical order
- Consider frequency of use
- Keep groups focused
-
Visual Design:
- Use consistent styling
- Consider button hierarchy
- Maintain proper spacing
- Ensure clear boundaries
-
Accessibility:
- Use proper ARIA roles
- Maintain keyboard navigation
- Consider screen readers
- Provide clear labels
-
Responsive Design:
- Handle small screens
- Consider touch targets
- Allow wrapping when needed
- Maintain usability
Examples
With Icons
Vertical Orientation
With Spacing
Custom Styling
Last updated on