phone-input
diceui-radix/phone-inputFreeComponent
diceui/radix publishes no description for this item.
Install it
npx shadcn@latest add https://raw.githubusercontent.com/sadmann7/diceui/HEAD/docs/public/r/styles/radix-nova/phone-input.jsonSource
1"use client";23import { Check, ChevronDown } from "lucide-react";4import { Slot as SlotPrimitive } from "radix-ui";5import * as React from "react";6import { useComposedRefs } from "@/lib/compose-refs";7import { cn } from "@/lib/utils";8import { VisuallyHiddenInput } from "@/registry/bases/radix/components/visually-hidden-input";9import { useAsRef } from "@/registry/bases/radix/hooks/use-as-ref";10import { useIsomorphicLayoutEffect } from "@/registry/bases/radix/hooks/use-isomorphic-layout-effect";11import { useLazyRef } from "@/registry/bases/radix/hooks/use-lazy-ref";12import {13 Command,14 CommandEmpty,15 CommandGroup,16 CommandInput,17 CommandItem,18 CommandList,19} from "@/registry/bases/radix/ui/command";20import { Input } from "@/registry/bases/radix/ui/input";21import {22 Popover,23 PopoverContent,24 PopoverTrigger,25} from "@/registry/bases/radix/ui/popover";2627const ROOT_NAME = "PhoneInput";28const COUNTRY_SELECT_NAME = "PhoneInputCountrySelect";29const FIELD_NAME = "PhoneInputField";3031/**32 * @see https://github.com/mukeshsoni/country-telephone-data/blob/master/country_telephone_data.js33 * @format [iso2, dialCode]34 */35const COUNTRY_DATA: [string, string][] = [36 ["af", "93"],37 ["ax", "358"],38 ["al", "355"],39 ["dz", "213"],40 ["as", "1684"],41 ["ad", "376"],42 ["ao", "244"],43 ["ai", "1264"],44 ["ag", "1268"],45 ["ar", "54"],46 ["am", "374"],47 ["aw", "297"],48 ["au", "61"],49 ["at", "43"],50 ["az", "994"],51 ["bs", "1242"],52 ["bh", "973"],53 ["bd", "880"],54 ["bb", "1246"],55 ["by", "375"],56 ["be", "32"],57 ["bz", "501"],58 ["bj", "229"],59 ["bm", "1441"],60 ["bt", "975"],61 ["bo", "591"],62 ["ba", "387"],63 ["bw", "267"],64 ["br", "55"],65 ["io", "246"],66 ["vg", "1284"],67 ["bn", "673"],68 ["bg", "359"],69 ["bf", "226"],70 ["bi", "257"],71 ["kh", "855"],72 ["cm", "237"],73 ["ca", "1"],74 ["cv", "238"],75 ["bq", "599"],76 ["ky", "1345"],77 ["cf", "236"],78 ["td", "235"],79 ["cl", "56"],80 ["cn", "86"],81 ["co", "57"],82 ["km", "269"],83 ["cd", "243"],84 ["cg", "242"],85 ["ck", "682"],86 ["cr", "506"],87 ["ci", "225"],88 ["hr", "385"],89 ["cu", "53"],90 ["cw", "599"],91 ["cy", "357"],92 ["cz", "420"],93 ["dk", "45"],94 ["dj", "253"],95 ["dm", "1767"],96 ["do", "1"],97 ["ec", "593"],98 ["eg", "20"],99 ["sv", "503"],100 ["gq", "240"],101 ["er", "291"],102 ["ee", "372"],103 ["et", "251"],104 ["fk", "500"],105 ["fo", "298"],106 ["fj", "679"],107 ["fi", "358"],108 ["fr", "33"],109 ["gf", "594"],110 ["pf", "689"],111 ["ga", "241"],112 ["gm", "220"],113 ["ge", "995"],114// … truncated
What it pulls in
npm packages
Other registry items
Files it writes
More from diceui/radix
All 58 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| action-baraction-bar | diceui/radix | Components | Free | 1 dep · 2 files | |
| angle-sliderangle-slider | diceui/radix | Components | Free | 1 dep · 3 files | |
| avatar-groupavatar-group | diceui/radix | Components | Free | 1 dep | |
| badge-overflowbadge-overflow | diceui/radix | Components | Free | 1 dep · 2 files | |
| bannerbanner | diceui/radix | Components | Free | 1 dep | |
| checkbox-groupcheckbox-group | diceui/radix | Components | Free | 1 dep | |
| circular-progresscircular-progress | diceui/radix | Components | Free | 1 dep | |
| client-onlyclient-only | diceui/radix | Components | Free | no deps |
