Overview
The Button component is a fundamental interactive element that triggers actions when clicked. It supports multiple variants, sizes, and can include icons alongside text labels.This component is deprecated. Consider using
GayaButton for new implementations.Import
Basic Usage
Variants
The Button component supports three visual variants:Sizes
Buttons come in three different sizes:With Icons
Buttons can display icons on either side of the text:States
Disabled
Full Width
Brand Support
Buttons can be styled for different brands:Props
The content to display inside the button
Function called when the button is clicked
The visual style variant of the button
The size of the button
Optional color scheme for the button
Whether the button is disabled
If true, the button will occupy 100% of the container width
If true, displays an icon alongside the text
The name of the icon to display. Required when
showIcon is true. See Icon LibraryThe position of the icon relative to the text
Text transformation applied to the button label
Optional brand theme to apply (avon, avon_v2, natura, natura_v2, theBodyShop, consultoriaDeBeleza, casaEestilo)
Optional theme mode
The HTML button type attribute
Optional CSS class name to apply custom styles
Optional ID for testing purposes
Accessibility label for screen readers. Use when text is not visible
Comprehensive accessibility attributes object including:
role: ARIA roletabIndex: Tab order- All standard ARIA attributes
Accessibility attributes for the button’s internal span element
Accessibility
ARIA Support
The Button component supports comprehensive accessibility features:Best Practices
- Always provide an
onClickhandler - Use
ariaLabelwhen button text doesn’t clearly describe the action - Ensure disabled buttons are properly indicated to screen readers
- Use appropriate button types (submit, reset, button) for form contexts
- Maintain sufficient color contrast for text and background
TypeScript
Related Components
- IconButton - For icon-only actions
- GayaButton - Modern button implementation

