Skip to content
GaudiGaudi Design System home

Search documentation

Search every page, heading and paragraph.

PhoneInput

International phone entry with country selection and formatted numbers.

CoreAdvanced Inputs@gaudi/design-system/core/PhoneInputView in StorybookSource

Installation

pnpm add github:ahmadassaf/design-system

Import from @gaudi/design-system. Load @gaudi/design-system/global.css once and add transpilePackages: ['@gaudi/design-system'] in Next.js.

import { PhoneInput } from '@gaudi/design-system/core/PhoneInput';

Copy an example into your project with the shadcn CLI: npx shadcn@latest add https://design.gaudi.site/r/phone-input-field-states.json.

Usage

import { PhoneInput } from '@gaudi/design-system/core/PhoneInput';
<PhoneInput aria-label='Phone number' value={phone} onChange={setPhone} defaultCountry='GB' />

Examples

Field states

Storybook

API

7 props

Accessibility

Associate a visible label with the input and name the country selector. The application owns phone verification and validity feedback.