Bangladesh

Phone input

+880 mobile numbers typed any way, Bangla digits too; names the operator and gives back +8801XXXXXXXXX.

3 examples 1 animated · 1 Pro Code and Figma for each
+880Grameenphone

Type it any way: 017…, +880 17…, or in Bangla digits.

+880

Try 012: no operator uses it.

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.

With validation

Typed any way; the hint shows the number as it will be stored.

+880Grameenphone

Type it any way: 017…, +880 17…, or in Bangla digits.

Empty

Start typing: it names the operator, or says a prefix is not used.

+880

Try 012: no operator uses it.

Bangla digits

Bangla digits work too and come back as English ones.

+880Banglalink

Animated#

Motion that earns its place: free ones to copy now, and Pro ones whose code and Figma copy come with a Wavi Pro licence. They respect the visitor's reduced-motion setting.

Phone and one-time code Pro

Sign-in in two steps: the code boxes fill as you type and the resend timer counts down.

Sign in with your phone

+880Grameenphone

Import#

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

your-component.tsx
import { type BdPhone, FormField, PhoneInput } from "@waveinno/ui";

Props#

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

<PhoneInput>

src/components/ui/phone-input.tsx
PropTypeDefaultDescription
valuestring—Any form of the number; "+8801712345678" is what you get back.
defaultValuestring""
onValueChange(e164: string, phone: BdPhone) => void—
showOperatorbooleantrueShow the operator on the right as you type. Default true.
stateInputState"default"
labels{ invalidPrefix?: string }—

Also takes Omit<React.InputHTMLAttributes<HTMLInputElement>, "value" | "defaultValue" | "onChange" | "type">.

<FormField>

src/components/ui/form-field.tsx
PropTypeDefaultDescription
labelReact.ReactNode—
htmlForstring—The control's id, so clicking the label focuses it.
requiredboolean—
hintReact.ReactNode—
errorReact.ReactNode—
warningReact.ReactNode—
successReact.ReactNode—
count{ value: number; max: number }—Character counter, e.g. { value: note.length, max: 240 }.
classNamestring—
childrenrequiredReact.ReactNode—

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