A comprehensive currency management system that handles currency display, selection, and conversion. Supports 180+ currencies with live exchange rates, smart caching, and locale-aware formatting.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/fgrreloaded/rigidui/llms.txt
Use this file to discover all available pages before exploring further.
Installation
Usage
- Basic Setup
- Static Rates
- With Source Currency
- Custom Loader
Features
Real-time Conversion
Convert monetary values between 180+ currencies with live exchange rates or your custom rates.
Smart Caching
Automatically caches exchange rates and currency data for faster loading and offline resilience.
Flexible Rate Sources
Use static rates, live API data, or your custom rate fetching function with configurable refresh intervals.
Global Support
Supports 180+ currencies with proper symbols, names, and locale-aware formatting.
Production Ready
SSR-safe, TypeScript support, error handling, fallback mechanisms, and optimized performance.
Smart Refresh
Intelligent rate refreshing that only fetches when needed, respecting your specified intervals.
API Reference
CurrencyProvider
The content to wrap with the currency provider
The currency code (e.g., “USD”) against which all provided exchange rates are relative. This is required.
An initial object of exchange rates, relative to
fixedBaseCurrencyCode. Example: { "EUR": 0.92, "INR": 83.5 } if fixedBaseCurrencyCode is “USD”.A user-provided async function that returns a promise resolving to an object of exchange rates, relative to
fixedBaseCurrencyCode. The returned object should have currency codes as keys (e.g., “EUR”, “INR”) and positive numbers as values representing conversion rates.Interval in milliseconds to call
fetchRatesFunction. Requires fetchRatesFunction to be set. Minimum recommended value is 60000 (1 minute).The currency code to be selected by default. The component will try to find this code in the fetched list of available currencies.
A custom component to display while loading data (e.g., currency names or exchange rates).
CurrencySelector
Additional CSS class for the selector
CurrencyDisplay
The monetary value to display. Should be a positive number.
The currency code of the input
value. If not provided, the value is assumed to be in the fixedBaseCurrencyCode set in the CurrencyProvider.Additional CSS class for the display
Examples
E-commerce Integration
Multi-Currency Dashboard
The component automatically handles caching and persistence of exchange rates and user’s selected currency in localStorage for better performance and user experience.