flagcn
blockcurrency-pickersource: ok · hit
Currency Picker
A searchable currency picker with ISO codes, localized names, and native symbols.
npx shadcn add "https://flagcn.dev/r/currency-picker.json"free
Visual style
terminal-mono
Tags auto-generated by rules on 9/24/2026 — empty means no evidence, not lack of support.
Dependencies
Bundle weight · light@tabler/icons-react
Registry dependencies
buttoninputbadge
Files3 · source cached 10/15/2026, 10:31:03 AM
src/components/flags/currency-picker.tsx
// SPDX-License-Identifier: MIT
import { Badge } from "@/components/ui/badge"
import * as React from "react"
import { currencyData, type CurrencyCode } from "./data/currencies"
import { SearchPicker, type SearchPickerProps } from "./search-picker"
export interface CurrencyPickerProps extends Omit<SearchPickerProps, "items" | "value" | "defaultValue" | "onValueChange" | "placeholder" | "searchPlaceholder" | "emptyMessage"> {
value?: CurrencyCode
defaultValue?: CurrencyCode
onValueChange?: (code: CurrencyCode) => void
currencies?: readonly CurrencyCode[]
placeholder?: string
searchPlaceholder?: string
emptyMessage?: string
}
export function CurrencyPicker({
currencies,
placeholder = "Select a currency",
searchPlaceholder = "Search currencies…",
emptyMessage = "No currencies found.",
onValueChange,
...props
}: CurrencyPickerProps) {
const items = React.useMemo(() => {
const allowed = currencies ? new Set(currencies) : undefined
return currencyData.filter((currency) => !allowed || allowed.has(currency.code)).map((currency) => ({
value: currency.code,
label: `${currency.code} — ${currency.name}`,
description: currency.native,
searchValue: `${currency.symbol} ${currency.symbolNative}`,
trailing: <Badge variant="outline" className="min-w-8 justify-center font-mono">{currency.symbol}</Badge>,
}))
}, [currencies])
return <SearchPicker items={items} placeholder={placeholder} searchPlaceholder={searchPlaceholder} emptyMessage={emptyMessage} onValueChange={(code) => onValueChange?.(code as CurrencyCode)} {...props} />
}
src/components/flags/search-picker.tsx
// SPDX-License-Identifier: MIT
import { IconCheck, IconChevronDown, IconSearch } from "@tabler/icons-react"
import * as React from "react"
import { Button } from "@/components/ui/button"
import { Input } from "@/components/ui/input"
import { cn } from "@/lib/utils"
export interface SearchPickerItem {
value: string
label: string
description?: string
searchValue?: string
leading?: React.ReactNode
trailing?: React.ReactNode
disabled?: boolean
}
export interface SearchPickerProps {
items: readonly SearchPickerItem[]
value?: string
defaultValue?: string
onValueChange?: (value: string) => void
placeholder: string
searchPlaceholder: string
emptyMessage: string
disabled?: boolean
name?: string
className?: string
triggerClassName?: string
contentClassName?: string
"aria-label"?: string
}
export function SearchPicker({
items,
value,
defaultValue,
onValueChange,
placeholder,
searchPlaceholder,
emptyMessage,
disabled,
name,
className,
triggerClassName,
contentClassName,
"aria-label": ariaLabel,
}: SearchPickerProps) {
const [internalValue, setInternalValue] = React.useState(defaultValue)
const [query, setQuery] = React.useState("")
const [phase, setPhase] = React.useState<"closed" | "open" | "closing">("closed")
const [activeIndex, setActiveIndex] = React.useState(0)
const rootRef = React.useRef<HTMLDivElement>(null)
const triggerRef = React.useRef<HTMLButtonElement>(null)
const searchRef = React.useRef<HTMLInputElement>(null)
const closeTimerRef = React.useRef<number | undefined>(undefined)
const listId = React.useId()
const currentValue = value ?? internalValue
const selectedItem = items.find((item) => item.value === currentValue)
const open = phase === "open"
const filteredItems = React.useMemo(() => {
const normalized = query.trim().toLocaleLowerCase()
if (!normalized) return items
return items.filter((item) => `${item.label} ${item.description ?? ""} ${item.value} ${item.searchValue ?? ""}`.toLocaleLowerCase().includes(normalized))
}, [items, query])
const close = React.useCallback((restoreFocus = false) => {
window.clearTimeout(closeTimerRef.current)
setPhase((current) => current === "closed" ? current : "closing")
closeTimerRef.current = window.setTimeout(() => {
setPhase("closed")
if (restoreFocus) triggerRef.current?.focus()
}, 150)
}, [])
React.useEffect(() => () => window.clearTimeout(closeTimerRef.current), [])
React.useEffect(() => {
if (!open) return
const onPointerDown = (event: PointerEvent) => {
if (!rootRef.current?.contains(event.target as Node)) close()
}
document.addEventListener("pointerdown", onPointerDown)
return () => document.removeEventListener("pointerdown", onPointerDown)
}, [close, open])
React.useEffect(() => {
if (open) requestAnimationFrame(() => searchRef.current?.focus())
}, [open])
function selectItem(item: SearchPickerItem) {
if (item.disabled) return
if (value === undefined) setInternalValue(item.value)
onValueChange?.(item.value)
setQuery("")
close(true)
}
return (
<div ref={rootRef} data-slot="search-picker" className={cn("relative min-w-0 w-full", className)}>
{name ? <input type="hidden" name={name} value={currentValue ?? ""} /> : null}
<Button
ref={triggerRef}
type="button"
variant="outline"
role="combobox"
aria-expanded={open}
aria-controls={listId}
aria-haspopup="listbox"
aria-label={ariaLabel ?? placeholder}
disabled={disabled}
className={cn("h-10 min-w-0 w-full justify-between px-3 font-normal sm:h-9", triggerClassName)}
onClick={() => {
if (open) close()
else {
window.clearTimeout(closeTimerRef.current)
setActiveIndex(0)
setPhase("open")
}
}}
>
<span className={cn("flex min-w-0 items-center gap-2", !selectedItem && "text-muted-foreground")}>
{selectedItem?.leading}
<span className="truncate">{selectedItem?.label ?? placeholder}</span>
</span>
<IconChevronDown data-icon="inline-end" aria-hidden="true" />
</Button>
{phase !== "closed" ? (
<div
data-origin="top"
className={cn("t-dropdown absolute z-50 mt-1 w-full min-w-64 overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md", phase === "open" ? "is-open" : "is-closing", contentClassName)}
onKeyDown={(event) => {
if (event.key === "Escape") close(true)
if (event.key === "ArrowDown") {
event.preventDefault()
setActiveIndex((index) => Math.min(index + 1, filteredItems.length - 1))
}
if (event.key === "ArrowUp") {
event.preventDefault()
setActiveIndex((index) => Math.max(index - 1, 0))
}
if (event.key === "Enter" && filteredItems[activeIndex]) {
event.preventDefault()
selectItem(filteredItems[activeIndex])
}
}}
>
<div className="relative border-b p-2">
<IconSearch aria-hidden="true" className="pointer-events-none absolute start-4 top-1/2 size-4 -translate-y-1/2 text-muted-foreground" />
<Input
ref={searchRef}
value={query}
onChange={(event) => { setQuery(event.target.value); setActiveIndex(0) }}
placeholder={searchPlaceholder}
aria-label={searchPlaceholder}
aria-controls={listId}
aria-activedescendant={filteredItems[activeIndex] ? `${listId}-${filteredItems[activeIndex].value}` : undefined}
className="h-9 ps-8 shadow-none"
/>
</div>
<div id={listId} role="listbox" className="max-h-72 overflow-y-auto p-1">
{filteredItems.length ? filteredItems.map((item, index) => (
<button
key={item.value}
id={`${listId}-${item.value}`}
type="button"
role="option"
aria-selected={item.value === currentValue}
disabled={item.disabled}
data-active={index === activeIndex || undefined}
className="flex min-h-10 w-full items-center gap-2 rounded-sm px-2 py-2 text-start text-sm outline-none hover:bg-accent hover:text-accent-foreground data-[active]:bg-accent data-[active]:text-accent-foreground focus-visible:ring-ring/30 focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-40 sm:min-h-9"
onPointerMove={() => setActiveIndex(index)}
onClick={() => selectItem(item)}
>
{item.leading}
<span className="min-w-0 flex-1">
<span className="block truncate">{item.label}</span>
{item.description ? <span className="block truncate text-xs text-muted-foreground">{item.description}</span> : null}
</span>
{item.trailing}
<IconCheck aria-hidden="true" className={cn("size-4", item.value === currentValue ? "opacity-100" : "opacity-0")} />
</button>
)) : <p className="px-3 py-8 text-center text-sm text-muted-foreground">{emptyMessage}</p>}
</div>
</div>
) : null}
</div>
)
}
src/components/flags/data/currencies.ts
// SPDX-License-Identifier: MIT
// Generated by scripts/generate-country-data.mjs from countries-list,
// i18n-iso-countries, and libphonenumber-js. Do not edit by hand.
export const currencyData = [
{
"code": "AED",
"name": "United Arab Emirates Dirham",
"native": "درهم إماراتي",
"symbol": "AED",
"symbolNative": "د.إ.",
"numeric": "784",
"decimals": 2
},
{
"code": "AFN",
"name": "Afghan Afghani",
"native": "افغانۍ",
"symbol": "؋",
"symbolNative": "؋",
"numeric": "971",
"decimals": 2
},
{
"code": "ALL",
"name": "Albanian Lek",
"native": "Leku shqiptar",
"symbol": "ALL",
"symbolNative": "Lekë",
"numeric": "008",
"decimals": 2
},
{
"code": "AMD",
"name": "Armenian Dram",
"native": "հայկական դրամ",
"symbol": "֏",
"symbolNative": "֏",
"numeric": "051",
"decimals": 2
},
{
"code": "ANG",
"name": "Netherlands Antillean Guilder",
"native": "Nederlands-Antilliaanse gulden",
"symbol": "ANG",
"symbolNative": "NAf.",
"numeric": "532",
"decimals": 2,
"withdrawn": true
},
{
"code": "AOA",
"name": "Angolan Kwanza",
"native": "kwanza angolano",
"symbol": "Kz",
"symbolNative": "Kz",
"numeric": "973",
"decimals": 2
},
{
"code": "ARS",
"name": "Argentine Peso",
"native": "peso argentino",
"symbol": "$",
"symbolNative": "$",
"numeric": "032",
"decimals": 2
},
{
"code": "AUD",
"name": "Australian Dollar",
"native": "Australian Dollar",
"symbol": "$",
"symbolNative": "$",
"numeric": "036",
"decimals": 2
},
{
"code": "AWG",
"name": "Aruban Florin",
"native": "Arubaanse gulden",
"symbol": "AWG",
"symbolNative": "Afl.",
"numeric": "533",
"decimals": 2
},
{
"code": "AZN",
"name": "Azerbaijani Manat",
"native": "Azərbaycan Manatı",
"symbol": "₼",
"symbolNative": "₼",
"numeric": "944",
"decimals": 2
},
{
"code": "BAM",
"name": "Bosnia-Herzegovina Convertible Mark",
"native": "Bosanskohercegovačka konvertibilna marka",
"symbol": "KM",
"symbolNative": "KM",
"numeric": "977",
"decimals": 2
},
{
"code": "BBD",
"name": "Barbadian Dollar",
"native": "Barbadian Dollar",
"symbol": "$",
"symbolNative": "$",
"numeric": "052",
"decimals": 2
},
{
"code": "BDT",
"name": "Bangladeshi Taka",
"native": "বাংলাদেশী টাকা",
"symbol": "৳",
"symbolNative": "৳",
"numeric": "050",
"decimals": 2
},
{
"code": "BHD",
"name": "Bahraini Dinar",
"native": "دينار بحريني",
"symbol": "BHD",
"symbolNative": "د.ب.",
"numeric": "048",
"decimals": 3
},
{
"code": "BIF",
"name": "Burundian Franc",
"native": "franc burundais",
"symbol": "BIF",
"symbolNative": "FBu",
"numeric": "108",
"decimals": 0
},
{
"code": "BMD",
"name": "Bermudan Dollar",
"native": "Bermudian Dollar",
"symbol": "$",
"symbolNative": "$",
"numeric": "060",
"decimals": 2
},
{
"code": "BND",
"name": "Brunei Dollar",
"native": "Dolar Brunei",
"symbol": "$",
"symbolNative": "$",
"numeric": "096",
"decimals": 2
},
{
"code": "BOB",
"name": "Bolivian Boliviano",
"native": "boliviano",
"symbol": "Bs",
"symbolNative": "Bs",
"numeric": "068",
"decimals": 2
},
{
"code": "BOV",
"name": "Bolivian Mvdol",
"native": "MVDOL boliviano",
"symbol": "BOV",
"symbolNative": "BOV",
"numeric": "984",
"decimals": 2
},
{
"code": "BRL",
"name": "Brazilian Real",
"native": "Real brasileiro",
"symbol": "R$",
"symbolNative": "R$",
"numeric": "986",
"decimals": 2
},
{
"code": "BSD",
"name": "Bahamian Dollar",
"native": "Bahamian Dollar",
"symbol": "$",
"symbolNative": "$",
"numeric": "044",
"decimals": 2
},
{
"code": "BTN",
"name": "Bhutanese Ngultrum",
"native": "དངུལ་ཀྲམ",
"symbol": "BTN",
"symbolNative": "Nu.",
"numeric": "064",
"decimals": 2
},
{
"code": "BWP",
"name": "Botswanan Pula",
"native": "Botswanan Pula",
"symbol": "P",
"symbolNative": "P",
"numeric": "072",
"decimals": 2
},
{
"code": "BYN",
"name": "Belarusian Ruble",
"native": "беларускі рубель",
"symbol": "BYN",
"symbolNative": "Br",
"numeric": "933",
"decimals": 2
},
{
"code": "BZD",
"name": "Belize Dollar",
"native": "Belize Dollar",
"symbol": "$",
"symbolNative": "$",
"numeric": "084",
"decimals": 2
},
{
"code": "CAD",
"name": "Canadian Dollar",
"native": "Canadian Dollar",
"symbol": "$",
"symbolNative": "$",
"numeric": "124",
"decimals": 2
},
{
"code": "CDF",
"name": "Congolese Franc",
"native": "franc congolais",
"symbol": "CDF",
"symbolNative": "FC",
"numeric": "976",
"decimals": 2
},
{
"code": "CHE",
"name": "WIR Euro",
"native": "WIR-Euro",
"symbol": "CHE",
"symbolNative": "CHE",
"numeric": "947",
"decimals": 2
},
{
"code": "CHF",
"name": "Swiss Franc",
"native": "Schweizer Franken",
"symbol": "CHF",
"symbolNative": "CHF",
"numeric": "756",
"decimals": 2
},
{
"code": "CHW",
"name": "WIR Franc",
"native": "WIR Franken",
"symbol": "CHW",
"symbolNative": "CHW",
"numeric": "948",
"decimals": 2
},
{
"code": "CLF",
"name": "Chilean Unit of Account (UF)",
"native": "unidad de fomento chilena",
"symbol": "CLF",
"symbolNative": "CLF",
"numeric": "990",
"decimals": 4
},
{
"code": "CLP",
"name": "Chilean Peso",
"native": "Peso chileno",
"symbol": "$",
"symbolNative": "$",
"numeric": "152",
"decimals": 0
},
{
"code": "CNY",
"name": "Chinese Yuan",
"native": "人民币",
"symbol": "¥",
"symbolNative": "¥",
"numeric": "156",
"decimals": 2
},
{
"code": "COP",
"name": "Colombian Peso",
"native": "peso colombiano",
"symbol": "$",
"symbolNative": "$",
"numeric": "170",
"decimals": 2
},
{
"code": "COU",
"name": "Colombian Real Value Unit",
"native": "Colombian Real Value Unit",
"symbol": "COU",
"symbolNative": "COU",
"numeric": "970",
"decimals": 2
},
{
"code": "CRC",
"name": "Costa Rican Colón",
"native": "colón costarricense",
"symbol": "₡",
"symbolNative": "₡",
"numeric": "188",
"decimals": 2
},
{
"code": "CUP",
"name": "Cuban Peso",
"native": "peso cubano",
"symbol": "$",
"symbolNative": "$",
"numeric": "192",
"decimals": 2
},
{
"code": "CVE",
"name": "Cape Verdean Escudo",
"native": "escudo cabo-verdiano",
"symbol": "CVE",
"symbolNative": "CVE",
"numeric": "132",
"decimals": 2
},
{
"code": "CZK",
"name": "Czech Koruna",
"native": "česká koruna",
"symbol": "Kč",
"symbolNative": "Kč",
"numeric": "203",
"decimals": 2
},
{
"code": "DJF",
"name": "Djiboutian Franc",
"native": "franc djiboutien",
"symbol": "DJF",
"symbolNative": "Fdj",
"numeric": "262",
"decimals": 0
},
{
"code": "DKK",
"name": "Danish Krone",
"native": "dansk krone",
"symbol": "kr",
"symbolNative": "kr.",
"numeric": "208",
"decimals": 2
},
{
"code": "DOP",
"name": "Dominican Peso",
"native": "peso dominicano",
"symbol": "$",
"symbolNative": "$",
"numeric": "214",
"decimals": 2
},
{
"code": "DZD",
"name": "Algerian Dinar",
"native": "دينار جزائري",
"symbol": "DZD",
"symbolNative": "د.ج.",
"numeric": "012",
"decimals": 2
},
{
"code": "EGP",
"name": "Egyptian Pound",
"native": "جنيه مصري",
"symbol": "E£",
"symbolNative": "E£",
"numeric": "818",
"decimals": 2
},
{
"code": "ERN",
"name": "Eritrean Nakfa",
"native": "ኤርትራዊ ናቕፋ",
"symbol": "ERN",
"symbolNative": "Nfk",
"numeric": "232",
"decimals": 2
},
{
"code": "ETB",
"name": "Ethiopian Birr",
"native": "የኢትዮጵያ ብር",
"symbol": "ETB",
"symbolNative": "ብር",
"numeric": "230",
"decimals": 2
},
{
"code": "EUR",
"name": "Euro",
"native": "euro",
"symbol": "€",
"symbolNative": "€",
"numeric": "978",
"decimals": 2
},
{
"code": "FJD",
"name": "Fijian Dollar",
"native": "Fijian Dollar",
"symbol": "$",
"symbolNative": "$",
"numeric": "242",
"decimals": 2
},
{
"code": "FKP",
"name": "Falkland Islands Pound",
"native": "Falkland Islands Pound",
"symbol": "£",
"symbolNative": "£",
"numeric": "238",
"decimals": 2
},
{
"code": "GBP",
"name": "British Pound",
"native": "British Pound",
"symbol": "£",
"symbolNative": "£",
"numeric": "826",
"decimals": 2
},
{
"code": "GEL",
"name": "Georgian Lari",
"native": "ქართული ლარი",
"symbol": "₾",
"symbolNative": "₾",
"numeric": "981",
"decimals": 2
},
{
"code": "GHS",
"name": "Ghanaian Cedi",
"native": "Ghanaian Cedi",
"symbol": "GH₵",
"symbolNative": "GH₵",
"numeric": "936",
"decimals": 2
},
{
"code": "GIP",
"name": "Gibraltar Pound",
"native": "Gibraltar Pound",
"symbol": "£",
"symbolNative": "£",
"numeric": "292",
"decimals": 2
},
{
"code": "GMD",
"name": "Gambian Dalasi",
"native": "Gambian Dalasi",
"symbol": "GMD",
"symbolNative": "D",
"numeric": "270",
"decimals": 2
},
{
"code": "GNF",
"name": "Guinean Franc",
"native": "franc guinéen",
"symbol": "FG",
"symbolNative": "FG",
"numeric": "324",
"decimals": 0
},
{
"code": "GTQ",
"name": "Guatemalan Quetzal",
"native": "quetzal",
"symbol": "Q",
"symbolNative": "Q",
"numeric": "320",
"decimals": 2
},
{
"code": "GYD",
"name": "Guyanese Dollar",
"native": "Guyanese Dollar",
"symbol": "$",
"symbolNative": "$",
"numeric": "328",
"decimals": 2
},
{
"code": "HKD",
"name": "Hong Kong Dollar",
"native": "港元",
"symbol": "$",
"symbolNative": "$",
"numeric": "344",
"decimals": 2
},
{
"code": "HNL",
"name": "Honduran Lempira",
"native": "lempira hondureño",
"symbol": "L",
"symbolNative": "L",
"numeric": "340",
"decimals": 2
},
{
"code": "HTG",
"name": "Haitian Gourde",
"native": "gourde haïtienne",
"symbol": "HTG",
"symbolNative": "G",
"numeric": "332",
"decimals": 2
},
{
"code": "HUF",
"name": "Hungarian Forint",
"native": "magyar forint",
"symbol": "Ft",
"symbolNative": "Ft",
"numeric": "348",
"decimals": 2
},
{
"code": "IDR",
"name": "Indonesian Rupiah",
"native": "Rupiah Indonesia",
"symbol": "Rp",
"symbolNative": "Rp",
"numeric": "360",
"decimals": 2
},
{
"code": "ILS",
"name": "Israeli New Shekel",
"native": "שקל חדש",
"symbol": "₪",
"symbolNative": "₪",
"numeric": "376",
"decimals": 2
},
{
"code": "INR",
"name": "Indian Rupee",
"native": "भारतीय रुपया",
"symbol": "₹",
"symbolNative": "₹",
"numeric": "356",
"decimals": 2
},
{
"code": "IQD",
"name": "Iraqi Dinar",
"native": "دينار عراقي",
"symbol": "IQD",
"symbolNative": "د.ع.",
"numeric": "368",
"decimals": 3
},
{
"code": "IRR",
"name": "Iranian Rial",
"native": "ریال ایران",
"symbol": "IRR",
"symbolNative": "ریال",
"numeric": "364",
"decimals": 2
},
{
"code": "ISK",
"name": "Icelandic Króna",
"native": "íslensk króna",
"symbol": "kr",
"symbolNative": "kr.",
"numeric": "352",
"decimals": 0
},
{
"code": "JMD",
"name": "Jamaican Dollar",
"native": "Jamaican Dollar",
"symbol": "$",
"symbolNative": "$",
"numeric": "388",
"decimals": 2
},
{
"code": "JOD",
"name": "Jordanian Dinar",
"native": "دينار أردني",
"symbol": "JOD",
"symbolNative": "د.أ.",
"numeric": "400",
"decimals": 3
},
{
"code": "JPY",
"name": "Japanese Yen",
"native": "日本円",
"symbol": "¥",
"symbolNative": "¥",
"numeric": "392",
"decimals": 0
},
{
"code": "KES",
"name": "Kenyan Shilling",
"native": "Kenyan Shilling",
"symbol": "KES",
"symbolNative": "Ksh",
"numeric": "404",
"decimals": 2
},
{
"code": "KGS",
"name": "Kyrgyz Som",
"native": "Кыргызстан сому",
"symbol": "⃀",
"symbolNative": "⃀",
"numeric": "417",
"decimals": 2
},
{
"code": "KHR",
"name": "Cambodian Riel",
"native": "រៀលកម្ពុជា",
"symbol": "៛",
"symbolNative": "៛",
"numeric": "116",
"decimals": 2
},
{
"code": "KMF",
"name": "Comorian Franc",
"native": "فرنك جزر القمر",
"symbol": "CF",
"symbolNative": "CF",
"numeric": "174",
"decimals": 0
},
{
"code": "KPW",
"name": "North Korean Won",
"native": "조선 민주주의 인민 공화국 원",
"symbol": "₩",
"symbolNative": "₩",
"numeric": "408",
"decimals": 2
},
{
"code": "KRW",
"name": "South Korean Won",
"native": "대한민국 원",
"symbol": "₩",
"symbolNative": "₩",
"numeric": "410",
"decimals": 0
},
{
"code": "KWD",
"name": "Kuwaiti Dinar",
"native": "دينار كويتي",
"symbol": "KWD",
"symbolNative": "د.ك.",
"numeric": "414",
"decimals": 3
},
{
"code": "KYD",
"name": "Cayman Islands Dollar",
"native": "Cayman Islands Dollar",
"symbol": "$",
"symbolNative": "$",
"numeric": "136",
"decimals": 2
},
{
"code": "KZT",
"name": "Kazakhstani Tenge",
"native": "Қазақстан теңгесі",
"symbol": "₸",
"symbolNative": "₸",
"numeric": "398",
"decimals": 2
},
{
"code": "LAK",
"name": "Laotian Kip",
"native": "ລາວ ກີບ",
"symbol": "₭",
"symbolNative": "₭",
"numeric": "418",
"decimals": 2
},
{
"code": "LBP",
"name": "Lebanese Pound",
"native": "جنيه لبناني",
"symbol": "L£",
"symbolNative": "L£",
"numeric": "422",
"decimals": 2
},
{
"code": "LKR",
"name": "Sri Lankan Rupee",
"native": "ශ්රී ලංකා රුපියල",
"symbol": "Rs",
"symbolNative": "රු.",
"numeric": "144",
"decimals": 2
},
{
"code": "LRD",
"name": "Liberian Dollar",
"native": "Liberian Dollar",
"symbol": "$",
"symbolNative": "$",
"numeric": "430",
"decimals": 2
},
{
"code": "LSL",
"name": "Lesotho Loti",
"native": "Lesotho Loti",
"symbol": "LSL",
"symbolNative": "LSL",
"numeric": "426",
"decimals": 2
},
{
"code": "LYD",
"name": "Libyan Dinar",
"native": "دينار ليبي",
"symbol": "LYD",
"symbolNative": "د.ل.",
"numeric": "434",
"decimals": 3
},
{
"code": "MAD",
"name": "Moroccan Dirham",
"native": "dírham marroquí",
"symbol": "MAD",
"symbolNative": "MAD",
"numeric": "504",
"decimals": 2
},
{
"code": "MDL",
"name": "Moldovan Leu",
"native": "leu moldovenesc",
"symbol": "MDL",
"symbolNative": "L",
"numeric": "498",
"decimals": 2
},
{
"code": "MGA",
"name": "Malagasy Ariary",
"native": "ariary malgache",
"symbol": "Ar",
"symbolNative": "Ar",
"numeric": "969",
"decimals": 2
},
{
"code": "MKD",
"name": "Macedonian Denar",
"native": "Македонски денар",
"symbol": "MKD",
"symbolNative": "ден.",
"numeric": "807",
"decimals": 2
},
{
"code": "MMK",
"name": "Myanmar Kyat",
"native": "မြန်မာ ကျပ်",
"symbol": "K",
"symbolNative": "K",
"numeric": "104",
"decimals": 2
},
{
"code": "MNT",
"name": "Mongolian Tugrik",
"native": "Монгол төгрөг",
"symbol": "₮",
"symbolNative": "₮",
"numeric": "496",
"decimals": 2
},
{
"code": "MOP",
"name": "Macanese Pataca",
"native": "澳門元",
"symbol": "MOP",
"symbolNative": "MOP$",
"numeric": "446",
"decimals": 2
},
{
"code": "MRU",
"name": "Mauritanian Ouguiya",
"native": "أوقية موريتانية",
"symbol": "MRU",
"symbolNative": "أ.م.",
"numeric": "929",
"decimals": 2
},
{
"code": "MUR",
"name": "Mauritian Rupee",
"native": "Mauritian Rupee",
"symbol": "Rs",
"symbolNative": "Rs",
"numeric": "480",
"decimals": 2
},
{
"code": "MVR",
"name": "Maldivian Rufiyaa",
"native": "Maldivian Rufiyaa",
"symbol": "MVR",
"symbolNative": "ރ.",
"numeric": "462",
"decimals": 2
},
{
"code": "MWK",
"name": "Malawian Kwacha",
"native": "Malawian Kwacha",
"symbol": "MWK",
"symbolNative": "MK",
"numeric": "454",
"decimals": 2
},
{
"code": "MXN",
"name": "Mexican Peso",
"native": "peso mexicano",
"symbol": "$",
"symbolNative": "$",
"numeric": "484",
"decimals": 2
},
{
"code": "MXV",
"name": "Mexican Investment Unit",
"native": "Mexican Investment Unit",
"symbol": "MXV",
"symbolNative": "MXV",
"numeric": "979",
"decimals": 2
},
{
"code": "MYR",
"name": "Malaysian Ringgit",
"native": "Ringgit Malaysia",
"symbol": "RM",
"symbolNative": "RM",
"numeric": "458",
"decimals": 2
},
{
"code": "MZN",
"name": "Mozambican Metical",
"native": "metical moçambicano",
"symbol": "MZN",
"symbolNative": "MTn",
"numeric": "943",
"decimals": 2
},
{
"code": "NAD",
"name": "Namibian Dollar",
"native": "Namibian Dollar",
"symbol": "$",
"symbolNative": "$",
"numeric": "516",
"decimals": 2
},
{
"code": "NGN",
"name": "Nigerian Naira",
"native": "Nigerian Naira",
"symbol": "₦",
"symbolNative": "₦",
"numeric": "566",
"decimals": 2
},
{
"code": "NIO",
"name": "Nicaraguan Córdoba",
"native": "córdoba nicaragüense",
"symbol": "C$",
"symbolNative": "C$",
"numeric": "558",
"decimals": 2
},
{
"code": "NOK",
"name": "Norwegian Krone",
"native": "norske kroner",
"symbol": "kr",
"symbolNative": "kr",
"numeric": "578",
"decimals": 2
},
{
"code": "NPR",
"name": "Nepalese Rupee",
"native": "नेपाली रूपैयाँ",
"symbol": "Rs",
"symbolNative": "रू",
"numeric": "524",
"decimals": 2
},
{
"code": "NZD",
"name": "New Zealand Dollar",
"native": "New Zealand Dollar",
"symbol": "$",
"symbolNative": "$",
"numeric": "554",
"decimals": 2
},
{
"code": "OMR",
"name": "Omani Rial",
"native": "ريال عماني",
"symbol": "OMR",
"symbolNative": "ر.ع.",
"numeric": "512",
"decimals": 3
},
{
"code": "PAB",
"name": "Panamanian Balboa",
"native": "balboa panameño",
"symbol": "PAB",
"symbolNative": "B/.",
"numeric": "590",
"decimals": 2
},
{
"code": "PEN",
"name": "Peruvian Sol",
"native": "sol peruano",
"symbol": "PEN",
"symbolNative": "S/",
"numeric": "604",
"decimals": 2
},
{
"code": "PGK",
"name": "Papua New Guinean Kina",
"native": "Papua New Guinean Kina",
"symbol": "PGK",
"symbolNative": "K",
"numeric": "598",
"decimals": 2
},
{
"code": "PHP",
"name": "Philippine Peso",
"native": "Philippine Peso",
"symbol": "₱",
"symbolNative": "₱",
"numeric": "608",
"decimals": 2
},
{
"code": "PKR",
"name": "Pakistani Rupee",
"native": "Pakistani Rupee",
"symbol": "Rs",
"symbolNative": "Rs",
"numeric": "586",
"decimals": 2
},
{
"code": "PLN",
"name": "Polish Zloty",
"native": "złoty polski",
"symbol": "zł",
"symbolNative": "zł",
"numeric": "985",
"decimals": 2
},
{
"code": "PYG",
"name": "Paraguayan Guarani",
"native": "guaraní paraguayo",
"symbol": "₲",
"symbolNative": "₲",
"numeric": "600",
"decimals": 0
},
{
"code": "QAR",
"name": "Qatari Riyal",
"native": "ريال قطري",
"symbol": "QAR",
"symbolNative": "ر.ق.",
"numeric": "634",
"decimals": 2
},
{
"code": "RON",
"name": "Romanian Leu",
"native": "leu românesc",
"symbol": "lei",
"symbolNative": "lei",
"numeric": "946",
"decimals": 2
},
{
"code": "RSD",
"name": "Serbian Dinar",
"native": "српски динар",
"symbol": "RSD",
"symbolNative": "RSD",
"numeric": "941",
"decimals": 2
},
{
"code": "RUB",
"name": "Russian Ruble",
"native": "российский рубль",
"symbol": "₽",
"symbolNative": "₽",
"numeric": "643",
"decimals": 2
},
{
"code": "RWF",
"name": "Rwandan Franc",
"native": "Rwandan Franc",
"symbol": "RF",
"symbolNative": "RF",
"numeric": "646",
"decimals": 0
},
{
"code": "SAR",
"name": "Saudi Riyal",
"native": "ريال سعودي",
"symbol": "SAR",
"symbolNative": "ر.س.",
"numeric": "682",
"decimals": 2
},
{
"code": "SBD",
"name": "Solomon Islands Dollar",
"native": "Solomon Islands Dollar",
"symbol": "$",
"symbolNative": "$",
"numeric": "090",
"decimals": 2
},
{
"code": "SCR",
"name": "Seychellois Rupee",
"native": "roupie des Seychelles",
"symbol": "SCR",
"symbolNative": "SR",
"numeric": "690",
"decimals": 2
},
{
"code": "SDG",
"name": "Sudanese Pound",
"native": "جنيه سوداني",
"symbol": "SDG",
"symbolNative": "ج.س.",
"numeric": "938",
"decimals": 2
},
{
"code": "SEK",
"name": "Swedish Krona",
"native": "svensk krona",
"symbol": "kr",
"symbolNative": "kr",
"numeric": "752",
"decimals": 2
},
{
"code": "SGD",
"name": "Singapore Dollar",
"native": "Singapore Dollar",
"symbol": "$",
"symbolNative": "$",
"numeric": "702",
"decimals": 2
},
{
"code": "SHP",
"name": "St. Helena Pound",
"native": "St. Helena Pound",
"symbol": "£",
"symbolNative": "£",
"numeric": "654",
"decimals": 2
},
{
"code": "SLE",
"name": "Sierra Leonean Leone",
"native": "Sierra Leonean Leone",
"symbol": "SLE",
"symbolNative": "Le",
"numeric": "925",
"decimals": 2
},
{
"code": "SLL",
"name": "Sierra Leonean Leone",
"native": "Sierra Leonean Leone",
"symbol": "SLL",
"symbolNative": "SLL",
"numeric": "694",
"decimals": 2,
"withdrawn": true
},
{
"code": "SOS",
"name": "Somali Shilling",
"native": "Shilingka Soomaaliya",
"symbol": "SOS",
"symbolNative": "S",
"numeric": "706",
"decimals": 2
},
{
"code": "SRD",
"name": "Surinamese Dollar",
"native": "Surinaamse dollar",
"symbol": "$",
"symbolNative": "$",
"numeric": "968",
"decimals": 2
},
{
"code": "SSP",
"name": "South Sudanese Pound",
"native": "South Sudanese Pound",
"symbol": "£",
"symbolNative": "£",
"numeric": "728",
"decimals": 2
},
{
"code": "STN",
"name": "São Tomé & Príncipe Dobra",
"native": "dobra de São Tomé e Príncipe",
"symbol": "Db",
"symbolNative": "Db",
"numeric": "930",
"decimals": 2
},
{
"code": "SVC",
"name": "Salvadoran Colón",
"native": "colón salvadoreño",
"symbol": "SVC",
"symbolNative": "SVC",
"numeric": "222",
"decimals": 2
},
{
"code": "SYP",
"name": "Syrian Pound",
"native": "ليرة سورية",
"symbol": "£",
"symbolNative": "£",
"numeric": "760",
"decimals": 2
},
{
"code": "SZL",
"name": "Swazi Lilangeni",
"native": "Swazi Lilangeni",
"symbol": "SZL",
"symbolNative": "E",
"numeric": "748",
"decimals": 2
},
{
"code": "THB",
"name": "Thai Baht",
"native": "บาท",
"symbol": "฿",
"symbolNative": "฿",
"numeric": "764",
"decimals": 2
},
{
"code": "TJS",
"name": "Tajikistani Somoni",
"native": "Сомонии Тоҷикистон",
"symbol": "TJS",
"symbolNative": "сом.",
"numeric": "972",
"decimals": 2
},
{
"code": "TMT",
"name": "Turkmenistani Manat",
"native": "Türkmen manady",
"symbol": "TMT",
"symbolNative": "TMT",
"numeric": "934",
"decimals": 2
},
{
"code": "TND",
"name": "Tunisian Dinar",
"native": "دينار تونسي",
"symbol": "TND",
"symbolNative": "د.ت.",
"numeric": "788",
"decimals": 3
},
{
"code": "TOP",
"name": "Tongan Paʻanga",
"native": "Tongan Paʻanga",
"symbol": "T$",
"symbolNative": "T$",
"numeric": "776",
"decimals": 2
},
{
"code": "TRY",
"name": "Turkish Lira",
"native": "Türk lirası",
"symbol": "₺",
"symbolNative": "₺",
"numeric": "949",
"decimals": 2
},
{
"code": "TTD",
"name": "Trinidad & Tobago Dollar",
"native": "Trinidad & Tobago Dollar",
"symbol": "$",
"symbolNative": "$",
"numeric": "780",
"decimals": 2
},
{
"code": "TWD",
"name": "New Taiwan Dollar",
"native": "新台幣",
"symbol": "$",
"symbolNative": "$",
"numeric": "901",
"decimals": 2
},
{
"code": "TZS",
"name": "Tanzanian Shilling",
"native": "Shilingi ya Tanzania",
"symbol": "TZS",
"symbolNative": "TSh",
"numeric": "834",
"decimals": 2
},
{
"code": "UAH",
"name": "Ukrainian Hryvnia",
"native": "українська гривня",
"symbol": "₴",
"symbolNative": "₴",
"numeric": "980",
"decimals": 2
},
{
"code": "UGX",
"name": "Ugandan Shilling",
"native": "Ugandan Shilling",
"symbol": "UGX",
"symbolNative": "USh",
"numeric": "800",
"decimals": 0
},
{
"code": "USD",
"name": "US Dollar",
"native": "US Dollar",
"symbol": "$",
"symbolNative": "$",
"numeric": "840",
"decimals": 2
},
{
"code": "USN",
"name": "US Dollar (Next day)",
"native": "US Dollar (Next day)",
"symbol": "USN",
"symbolNative": "USN",
"numeric": "997",
"decimals": 2
},
{
"code": "USS",
"name": "US Dollar (Same day)",
"native": "US Dollar (Same day)",
"symbol": "USS",
"symbolNative": "USS",
"numeric": "998",
"decimals": 2,
"withdrawn": true
},
{
"code": "UYI",
"name": "Uruguayan Peso (Indexed Units)",
"native": "peso uruguayo en unidades indexadas",
"symbol": "UYI",
"symbolNative": "UYI",
"numeric": "940",
"decimals": 0
},
{
"code": "UYU",
"name": "Uruguayan Peso",
"native": "peso uruguayo",
"symbol": "$",
"symbolNative": "$",
"numeric": "858",
"decimals": 2
},
{
"code": "UYW",
"name": "Uruguayan Nominal Wage Index Unit",
"native": "Uruguayan Nominal Wage Index Unit",
"symbol": "UYW",
"symbolNative": "UYW",
"numeric": "927",
"decimals": 4
},
{
"code": "UZS",
"name": "Uzbekistani Som",
"native": "O‘zbekiston so‘mi",
"symbol": "UZS",
"symbolNative": "soʻm",
"numeric": "860",
"decimals": 2
},
{
"code": "VED",
"name": "Bolívar Soberano",
"native": "Bolívar Soberano",
"symbol": "VED",
"symbolNative": "VED",
"numeric": "926",
"decimals": 2
},
{
"code": "VES",
"name": "Venezuelan Bolívar",
"native": "bolívar soberano",
"symbol": "VES",
"symbolNative": "Bs.S",
"numeric": "928",
"decimals": 2
},
{
"code": "VND",
"name": "Vietnamese Dong",
"native": "Đồng Việt Nam",
"symbol": "₫",
"symbolNative": "₫",
"numeric": "704",
"decimals": 0
},
{
"code": "VUV",
"name": "Vanuatu Vatu",
"native": "Vanuatu Vatu",
"symbol": "VUV",
"symbolNative": "VUV",
"numeric": "548",
"decimals": 0
},
{
"code": "WST",
"name": "Samoan Tala",
"native": "Samoan Tala",
"symbol": "WST",
"symbolNative": "WST",
"numeric": "882",
"decimals": 2
},
{
"code": "XAD",
"name": "Arab Accounting Dinar",
"native": "Arab Accounting Dinar",
"symbol": "XAD",
"symbolNative": "XAD",
"numeric": "396",
"decimals": 2
},
{
"code": "XAF",
"name": "Central African CFA Franc",
"native": "franc CFA (BEAC)",
"symbol": "FCFA",
"symbolNative": "FCFA",
"numeric": "950",
"decimals": 0
},
{
"code": "XAG",
"name": "Silver",
"native": "Silver",
"symbol": "XAG",
"symbolNative": "XAG",
"numeric": "961",
"decimals": 0
},
{
"code": "XAU",
"name": "Gold",
"native": "Gold",
"symbol": "XAU",
"symbolNative": "XAU",
"numeric": "959",
"decimals": 0
},
{
"code": "XBA",
"name": "European Composite Unit",
"native": "European Composite Unit",
"symbol": "XBA",
"symbolNative": "XBA",
"numeric": "955",
"decimals": 0
},
{
"code": "XBB",
"name": "European Monetary Unit",
"native": "European Monetary Unit",
"symbol": "XBB",
"symbolNative": "XBB",
"numeric": "956",
"decimals": 0
},
{
"code": "XBC",
"name": "European Unit of Account (XBC)",
"native": "European Unit of Account (XBC)",
"symbol": "XBC",
"symbolNative": "XBC",
"numeric": "957",
"decimals": 0
},
{
"code": "XBD",
"name": "European Unit of Account (XBD)",
"native": "European Unit of Account (XBD)",
"symbol": "XBD",
"symbolNative": "XBD",
"numeric": "958",
"decimals": 0
},
{
"code": "XCD",
"name": "East Caribbean Dollar",
"native": "East Caribbean Dollar",
"symbol": "$",
"symbolNative": "$",
"numeric": "951",
"decimals": 2
},
{
"code": "XCG",
"name": "Caribbean guilder",
"native": "Caribische gulden",
"symbol": "Cg",
"symbolNative": "Cg",
"numeric": "532",
"decimals": 2
},
{
"code": "XDR",
"name": "Special Drawing Rights",
"native": "Special Drawing Rights",
"symbol": "XDR",
"symbolNative": "XDR",
"numeric": "960",
"decimals": 0
},
{
"code": "XOF",
"name": "West African CFA Franc",
"native": "franc CFA (BCEAO)",
"symbol": "F CFA",
"symbolNative": "F CFA",
"numeric": "952",
"decimals": 0
},
{
"code": "XPD",
"name": "Palladium",
"native": "Palladium",
"symbol": "XPD",
"symbolNative": "XPD",
"numeric": "964",
"decimals": 0
},
{
"code": "XPF",
"name": "CFP Franc",
"native": "franc CFP",
"symbol": "CFPF",
"symbolNative": "FCFP",
"numeric": "953",
"decimals": 0
},
{
"code": "XPT",
"name": "Platinum",
"native": "Platinum",
"symbol": "XPT",
"symbolNative": "XPT",
"numeric": "962",
"decimals": 0
},
{
"code": "XSU",
"name": "Sucre",
"native": "Sucre",
"symbol": "XSU",
"symbolNative": "XSU",
"numeric": "994",
"decimals": 0
},
{
"code": "XTS",
"name": "Testing Currency Code",
"native": "Testing Currency Code",
"symbol": "XTS",
"symbolNative": "XTS",
"numeric": "963",
"decimals": 0
},
{
"code": "XUA",
"name": "ADB Unit of Account",
"native": "ADB Unit of Account",
"symbol": "XUA",
"symbolNative": "XUA",
"numeric": "965",
"decimals": 0
},
{
"code": "XXX",
"name": "Unknown Currency",
"native": "Unknown Currency",
"symbol": "¤",
"symbolNative": "¤",
"numeric": "999",
"decimals": 0
},
{
"code": "YER",
"name": "Yemeni Rial",
"native": "ريال يمني",
"symbol": "YER",
"symbolNative": "ر.ي.",
"numeric": "886",
"decimals": 2
},
{
"code": "ZAR",
"name": "South African Rand",
"native": "Suid-Afrikaanse rand",
"symbol": "R",
"symbolNative": "R",
"numeric": "710",
"decimals": 2
},
{
"code": "ZMW",
"name": "Zambian Kwacha",
"native": "Zambian Kwacha",
"symbol": "ZK",
"symbolNative": "ZK",
"numeric": "967",
"decimals": 2
},
{
"code": "ZWG",
"name": "Zimbabwean Gold",
"native": "Zimbabwean Gold",
"symbol": "ZWG",
"symbolNative": "ZWG",
"numeric": "924",
"decimals": 2
}
] as const
export type Currency = (typeof currencyData)[number]
export type CurrencyCode = Currency["code"]