SuperdindaDocs
Inputs

PhoneInput

One field for the whole international number, dial code included (Figma "Phone Input" 185:1196).

Focus fills "+55 "; replacing it with "+1" switches country, and the flag follows (Brazil, or a globe when unknown). A pasted number never doubles the dial code. inputmode="tel", autocomplete="tel".

<PhoneInput aria-label="Celular" value={phone} onValueChange={setPhone} />

Playground

Um preset por valor do primeiro eixo do Figma. Mude as props; dsState força hover, foco ou pressionado, como na matriz.

Phone Input

string

Variantes, tamanhos e estados

Cada célula é o componente real, marcada com a variante do Figma que reproduz (passe o mouse pra ver o node).

Country · Brazil

PlaceholderFilledErrorHoverFocusDisabled

Country · Unknown

PlaceholderFilledErrorHoverFocusDisabled

Props

As props que o arquivo do DS declara. O componente também repassa as do primitivo (base-ui), quando ele tem um.

PropTipoPadrãoDescrição
string—International text as typed, e.g. "+55 11 98765-4321". Use `phoneToE164()` before sending it to the API.
string""
((value: string) => void)—
FieldBoxSize"48"
boolean—
string—
boolean—
((event: BaseUIEvent<React.FocusEvent<HTMLInputElement, Element>>) => void)—
((event: BaseUIEvent<React.FocusEvent<HTMLInputElement, Element>>) => void)—
((event: BaseUIEvent<ClipboardEvent<HTMLInputElement>>) => void)—

On this page