Custom to Widgets Migration
This guide helps you migrate from fully custom UI implementations to pre-built Fanfare widgets. Widgets provide a faster path to integration while still supporting customization.Benefits of Widgets
| Benefit | Description |
|---|---|
| Less Code | No need to build state management or UI |
| Automatic Updates | Bug fixes and improvements without code changes |
| Consistent UX | Battle-tested user experience patterns |
| Accessibility | Built-in accessibility features |
| i18n Support | Multi-language support out of the box |
| Theming | Customizable via CSS variables |
Migration Approach
Option 1: Full Widget Replacement
Replace your entire custom UI with a widget:Option 2: Partial Customization with Slots
Keep some custom elements while using the widget structure:Option 3: Render Props for Full Control
Use render props to maintain full control while leveraging widget state:Queue Migration
Custom Queue UI
Widget Replacement
Draw Migration
Custom Draw UI
Widget Replacement
Auction Migration
Custom Auction UI
Widget Replacement
Experience Journey Migration
Custom Journey Flow
Widget Replacement
Styling Comparison
Custom CSS (Before)
Widget CSS Variables (After)
What to Keep Custom
Not everything should be a widget. Keep custom implementations for:- Unique brand experiences that differ significantly from standard patterns
- Complex integrations with other systems (shopping cart, user profiles)
- Custom animations beyond what CSS variables support
- A/B testing different UI approaches
Migration Checklist
- Identify which custom UIs can be replaced with widgets
- Install
@waitify-io/fanfare-sdk-solid - Register web components at app startup
- Replace custom UIs with widgets one at a time
- Migrate event handling from hooks to widget events
- Update styling to use CSS variables
- Test all flows thoroughly
- Remove unused hook code
Related
- Widgets Overview - Widget reference
- Theming - Theme customization
- Component Customization - Slots and render props
- Headless Mode - When to keep using hooks