Componentpickers1.12 KB gzipZero dependencies
Currency Select
Currency select dropdown with symbols and codes.
Preview
Live Preview
Installation
Tokens guide →Add to your project via CLI (zero dependencies, code you own):
npx bigbullui add currency-selectOr install the full npm package:
npm install bigbulluiUsage
tsx3 lines
import { CurrencySelect } from "@/components/ui/currency-select"; <CurrencySelect />Source code
currency-select.tsx + 2 helpersZero third-party dependencies (3 local files shown in tabs below).
tsxcurrency-select.tsx88 lines
"use client"; import * as React from "react";import { registerEscapeLayer } from "./lib/focus-trap";import { cn } from "./lib/utils"; export interface CurrencyOption { code: string; symbol: string; label: string;} export const CURRENCIES: CurrencyOption[] = [ { code: "TRY", symbol: "₺", label: "Turkish Lira" }, { code: "USD", symbol: "$", label: "US Dollar" }, { code: "EUR", symbol: "€", label: "Euro" }, { code: "GBP", symbol: "£", label: "British Pound" },];Props
Interactive Prop Playground
Tweak parsed AST props below to generate ready-to-paste JSX.
tsx3 lines
import { CURRENCIES } from "@/components/ui/currency-select"; <CURRENCIES />| Prop | Type | Description |
|---|---|---|
| value | string | Controlled value. |
| defaultValue | string | Initial value when uncontrolled. |
| onValueChange | (code: string) => void | Callback invoked on value change. |