Color Variants
Different color options available for the button component
Color Variants
React Button Pro comes with several color variants to match your application's design system.
Example
Available Colors
The following color variants are available:
primary
- Primary brand color (default)secondary
- Secondary brand colorneutral
- Neutral/gray colorinfo
- Blue color for informational actionserror
- Red color for destructive actionswarning
- Orange/yellow color for cautionary actionssuccess
- Green color for successful actions
Usage
Best Practices
-
Color Usage:
- Use primary for main actions
- Use secondary for alternative actions
- Use error for destructive actions
- Use success for confirmatory actions
- Use warning for cautionary actions
- Use info for informational actions
- Use neutral for less important actions
-
Accessibility:
- Ensure sufficient color contrast
- Don't rely solely on color to convey meaning
- Consider color-blind users
-
Consistency:
- Use consistent colors for similar actions
- Follow your design system's color guidelines
- Maintain visual hierarchy
-
Context:
- Choose colors appropriate to the action
- Consider the surrounding UI elements
- Use color to guide user attention
Last updated on