Bangladesh

Address picker

8 divisions, 64 districts, in English or Bangla; stores ids so the language can change.

2 examples Code and Figma for each
{"division":"dhaka","district":"dhaka","area":"House 12, Road 7, Gulshan 1","postcode":"1212"}

Examples#

Each one on its own: copy its code into your app, or copy it to Figma and paste it on the canvas as layers.

In English

Division, district, the street and the postcode.

In Bangla

The same ids, so switching language keeps the address.

Import#

Everything comes from the package root. The example above uses:

your-component.tsx
import { BdAddressPicker, type BdAddress, Segmented } from "@waveinno/ui";

Props#

Read from the source of this version, so they match the code exactly.

<BdAddressPicker>

src/components/ui/bd-address.tsx
PropTypeDefaultDescription
valueBdAddress—
defaultValueBdAddress{}
onValueChange(address: BdAddress) => void—
lang"en" | "bn""en"
fields("area" | "postcode")[]["area", "postcode"]Which text fields follow the two lists. Default both.
disabledboolean—
requiredboolean—
labelsPartial<Record<"division" | "district" | "area" | "postcode" | "chooseDivision" | "chooseDistrict" | "divisionFirst", string>>—
classNamestring—

<Segmented>

src/components/ui/segmented.tsx
PropTypeDefaultDescription
valuerequiredT—
onChangerequired(v: T) => void—
optionsrequiredSegmentedOption<T>[]—
classNamestring—
ariaLabelstring—
variantkeyof typeof TRACK"pill"
sizekeyof typeof SIZES"sm"
fullWidthbooleanfalseStretch to the container, options sharing the width equally.

Install#

If the project does not have the package yet, add it, then follow the setup for Next.js or Vite once.

$ npm install @waveinno/ui