Skip to main content

Quote Display

This example shows how to build a comprehensive quote display component that shows estimated output, fees, execution time, price impact, and alternative routes.

Overview

A good quote display should include:
  • Estimated output amount with minimum received
  • Fee breakdown (gas, bridge fees, protocol fees)
  • Estimated execution time
  • Price impact with severity indicators
  • Alternative routes for comparison

Basic Quote Display Component

Output Amount Section

Display the expected output with minimum received guarantee:
QuoteOutput.tsx

Fee Breakdown Section

Show detailed fee information:
QuoteFees.tsx

Execution Time Display

Show estimated time with visual indicator:
QuoteTime.tsx

Price Impact Indicator

Display price impact with severity levels:
QuotePriceImpact.tsx

Alternative Routes Display

Show other available routes for comparison:
QuoteAlternatives.tsx

Quote Expiry Countdown

Show when the quote expires and allow refresh:
QuoteExpiry.tsx

Styling for All Components

QuoteComponents.css

Next Steps

Full Integration

Combine all components into a complete widget

Error Handling

Handle quote and execution errors