mizanur-bd-geo-selector
v1.0.2
Published
Get all 8 divisions, 64 districts, and upazilas/thanas of Bangladesh for dynamic dropdowns.
Maintainers
Readme
🇧🇩 mizanur-bd-geo-selector
✨ Features
- 🚀 Zero Dependencies — Lightweight and extremely fast.
- 📦 Offline First — All data is bundled locally. No API calls required.
- 🌐 Bilingual Support — Includes both English and Bangla (
বাংলা) names. - 🗺️ Complete Bangladesh Geography
- 8 Divisions
- 64 Districts
- All Upazilas and Thanas
- ⚡ Framework Agnostic — Works with React, Next.js, Vue, Angular, and Vanilla JavaScript.
- 🧩 Perfect for Cascading Dropdowns — Ideal for forms and address selectors.
- 🔒 Reliable Static Data — Consistent and predictable results.
📦 Installation
Install via npm:
npm install mizanur-bd-geo-selector
Or using Yarn:
yarn add mizanur-bd-geo-selector
Or using pnpm:
pnpm add mizanur-bd-geo-selector
🚀 Quick Start
import {
getAllDivisions,
getDistrictsByDivision,
getUpazilasByDistrict,
} from 'mizanur-bd-geo-selector';
// Get all divisions
const divisions = getAllDivisions();
// Get all districts in Dhaka Division
const districts = getDistrictsByDivision("1");
// Get all upazilas/thanas in Dhaka District
const upazilas = getUpazilasByDistrict("101");
📚 API Reference
getAllDivisions()
Returns an array containing all 8 divisions of Bangladesh.
import { getAllDivisions } from 'mizanur-bd-geo-selector';
const divisions = getAllDivisions();
console.log(divisions);
/*
[
{
id: "1",
name: "Dhaka",
bn_name: "ঢাকা"
},
{
id: "2",
name: "Chattogram",
bn_name: "চট্টগ্রাম"
}
]
*/
getDistrictsByDivision(divisionId)
Returns all districts under a specific division.
Parameters
Parameter Type Description
divisionId string The ID of the division
Example
import { getDistrictsByDivision } from 'mizanur-bd-geo-selector';
const districts = getDistrictsByDivision("1"); // Dhaka Division
console.log(districts);
/*
[
{
id: "101",
division_id: "1",
name: "Dhaka",
bn_name: "ঢাকা"
},
{
id: "102",
division_id: "1",
name: "Gazipur",
bn_name: "গাজীপুর"
}
]
*/
getUpazilasByDistrict(districtId)
Returns all upazilas and thanas under a specific district.
Parameters
Parameter Type Description
districtId string The ID of the district
Example
import { getUpazilasByDistrict } from 'mizanur-bd-geo-selector';
const upazilas = getUpazilasByDistrict("101"); // Dhaka District
console.log(upazilas);
/*
[
{
id: "1001",
district_id: "101",
name: "Mirpur",
bn_name: "মিরপুর"
},
{
id: "1002",
district_id: "101",
name: "Uttara",
bn_name: "উত্তরা"
}
]
*/
🧱 Data Structure
Division
{
id: string,
name: string,
bn_name: string
}
District
{
id: string,
division_id: string,
name: string,
bn_name: string
}
Upazila / Thana
{
id: string,
district_id: string,
name: string,
bn_name: string
}
💡 Use Cases
Registration Forms
Checkout Address Selectors
Delivery Applications
Government Portals
CRM Systems
School Management Software
Contact Forms
⚛️ Framework Compatibility
✅ React
✅ Next.js
✅ Vue.js
✅ Nuxt.js
✅ Angular
✅ Svelte
✅ Vanilla JavaScript
✅ Node.js
📈 Why Choose mizanur-bd-geo-selector?
No external API dependency
Instant data access
Works offline
Supports Bangla and English
Minimal package size
Easy to integrate
Production ready
🤝 Contributing
Contributions are welcome!
Fork the repository
Create your feature branch
Commit your changes
Push to your branch
Open a Pull Request
📄 License
Licensed under the MIT License.
👨💻 Author
Mizanur Rahman
Made with ❤️ in Bangladesh 🇧🇩