country-data-filter
Geographical Data · React & Angular Location Picker Components
An open-source npm package providing geographical data for 190 countries — provinces, districts, cities, and postal codes — alongside ready-made cascading location picker componentsfor React (Ant Design & MUI) and Angular (PrimeNG). Full TypeScript support. Zero dependencies.
Framework Support
React + Ant Design
Cascading province → district → city selector built on Ant Design Select components. Fully typed, controlled.
React + MUI
Same cascade picker built on Material UI Autocomplete/Select. Drop-in for MUI-based projects.
Angular + PrimeNG
Angular component using PrimeNG Dropdown with reactive form support and cascading selection.
Data Included
190 countries with ISO 3166 codes
Provinces / States per country
Districts per province
Cities per district
Postal / ZIP codes
International dialing / phone codes
Currency codes per country
Country flags (emoji)
Features
Zero dependencies — no external packages required
Full TypeScript types for all data structures and component props
Cascading dropdowns that filter automatically on parent selection
Works with React 17+ and Angular 14+
Tree-shakeable — import only the data you need
Regular data updates — 23 versions published across the package lifecycle
Ready-to-use components or raw JSON data — use either or both
Consistent API across React (Ant Design, MUI) and Angular (PrimeNG) flavours
About This Package
I built country-data-filter to solve a recurring problem in client projects: every app that needed a location picker required the same boilerplate — fetch country data, cascade provinces, filter districts, wire up the UI library. I extracted that into a reusable, well-typed package that works across React and Angular projects without modification.
The package is solely designed, developed, and maintained by Nisala Nadeera Kudaligamage. It has been through 23 release iterations adding country coverage, component variants, and TypeScript improvements. Published on npm under knnadeera.
Open-source npm package by Nisala Nadeera Kudaligamage