Customization
Customizing the Widget
Learn how to customize the OpenCX Widget’s appearance and behavior
Styling
CSS Variables
The widget uses CSS variables for easy theming. Override these in your CSS:
Custom CSS Classes
Target these classes to customize specific components:
Behavior Customization
Message Display
Customize how messages are rendered:
Input Validation
Add custom input validation:
Advanced Customization
Custom Components (React)
Create your own components while using our hooks:
Platform Integration
Customize platform-specific behavior:
Event Handling
Subscribe to specific events:
Best Practices
-
Maintain Accessibility
- Keep color contrast ratios WCAG compliant
- Ensure keyboard navigation works
- Add proper ARIA labels
-
Responsive Design
- Use relative units (rem, em) for sizing
- Test on different screen sizes
- Implement mobile-first design
-
Performance
- Minimize custom CSS overrides
- Use efficient event handlers
- Implement proper cleanup in custom components
-
Branding
- Keep customizations consistent with your brand
- Test changes across different themes
- Document custom styles for team reference
Was this page helpful?