Phone input preview
Collect an exact phone value with explicit country context, optional extension and consumer-owned paste parsing.
pro · Forms · composite
When to use
- Use it when a page needs collect an exact phone value with explicit country context, optional extension and consumer-owned paste parsing.
- Choose it when the host application can supply the required state and keep business logic outside the presentation component.
Alternatives
- Choose form-field instead when a labeled email field with validation and help text is the actual interface need, rather than phone input.
Configure components.json and the @tidal-pro namespace before installing Pro components.
Installation
npx shadcn@latest add @tidal-pro/phone-inputImport components/ui/tidal.css, components/ui/phone-input.css. Wrap installed components in tidal-scope.
Preview

Minimal example
import"./components/ui/tidal.css";
import"./components/ui/phone-input.css";
import{TidalPhoneInput}from"./components/ui/phone-input";
export default()=><div className="tidal-scope"><TidalPhoneInput countries={[{code:"value",label:"Demo",dialCode:"value"}]} label={"Demo"} value={{country:"value",number:"value"}}/></div>;API and props
TidalPhoneInput.countries (required)ReadonlyArray<TidalPhoneCountry>Required countries value accepted by this exported component.
TidalPhoneInput.label (required)ReactNodeRequired label value accepted by this exported component.
TidalPhoneInput.value (required)TidalPhoneValueRequired value value accepted by this exported component.
TidalPhoneInput.countryLabelReactNodeOptional country label value accepted by this exported component.
TidalPhoneInput.countryNamestring | undefinedOptional country name value accepted by this exported component.
TidalPhoneInput.countrySelectPropsNativeCountryProps | undefinedOptional country select props value accepted by this exported component.
TidalPhoneInput.countrySelectRefRef<HTMLSelectElement> | undefinedOptional country select ref value accepted by this exported component.
TidalPhoneInput.descriptionReactNodeOptional description value accepted by this exported component.
TidalPhoneInput.disabledboolean | undefinedOptional disabled value accepted by this exported component.
TidalPhoneInput.errorReactNodeOptional error value accepted by this exported component.
TidalPhoneInput.extensionInputPropsNativeInputProps | undefinedOptional extension input props value accepted by this exported component.
TidalPhoneInput.extensionInputRefRef<HTMLInputElement> | undefinedOptional extension input ref value accepted by this exported component.
TidalPhoneInput.extensionLabelReactNodeOptional extension label value accepted by this exported component.
TidalPhoneInput.extensionNamestring | undefinedOptional extension name value accepted by this exported component.
TidalPhoneInput.formstring | undefinedOptional form value accepted by this exported component.
TidalPhoneInput.labelsPartial<{ dialCode: string; configurationError: ReactNode; unavailableCountry: string; }> | undefinedOptional labels value accepted by this exported component.
TidalPhoneInput.numberInputPropsNativeInputProps | undefinedOptional number input props value accepted by this exported component.
TidalPhoneInput.numberLabelReactNodeOptional number label value accepted by this exported component.
TidalPhoneInput.numberNamestring | undefinedOptional number name value accepted by this exported component.
TidalPhoneInput.onValueChange((next: TidalPhoneValue, field: "country" | "number" | "extension", event: TidalPhoneChangeEvent) => void) | undefinedCallback invoked when the value change interaction is proposed.
TidalPhoneInput.parsePaste((request: TidalPhonePasteRequest) => TidalPhoneValue | null) | undefinedOptional consumer parser used only for paste. Returning null rejects the paste.
TidalPhoneInput.readOnlyboolean | undefinedOptional read only value accepted by this exported component.
TidalPhoneInput.requiredboolean | undefinedOptional required value accepted by this exported component.
TidalPhoneInput.rootClassNamestring | undefinedOptional root class name value accepted by this exported component.
TidalPhoneInput.rootPropsOmit<HTMLAttributes<HTMLDivElement>, "className" | "aria-disabled" | "children" | "dangerouslySetInnerHTML"> | undefinedOptional root props value accepted by this exported component.
TidalPhoneInput.rootRefRef<HTMLDivElement> | undefinedOptional root ref value accepted by this exported component.
TidalPhoneInput.showExtensionboolean | undefinedOptional show extension value accepted by this exported component.
Complete usage
Full example, stylesheet imports, API and accessibility documentation
Gotchas
- Keep field state, validation results, submission, and persistence in the host form workflow.