Form fields·loomora/PhoneInput

PhoneInput

Combines country calling-code selection, country metadata, and a text field into a structured phone input.

Interactive live playground

Tweak props, change states, and see the live component respond in real time.

Live

How to call

Import directly from the Loomora package root. For projects without Tailwind CSS, ensure loomora/dist/index.css is imported once in your root layout.

import { PhoneInput } from 'loomora'

<PhoneInput label="Phone" properties={{
  defaultCountry: 'OM', value, setValue: ({ value }) => setValue(value),
}} />

API reference

Important public props and how they affect rendering.

6 props
PropTypeDefaultDescription
properties.valuestring—Controlled local phone number.
properties.setValue(phone: PhoneValue) => void—Receives structured country code and phone values.
properties.defaultCountryCountryType—Initial country calling code.
properties.countryCountryType—Controlled selected country.
worldwidebooleantrueAllows selecting from the worldwide country list.
showCountriesName / showCountriesFlagsbooleantrueControls country option decorations.