Skip to content
Vy logo
  • Identitet
  • Spor
  • Resources
Components

PhoneNumberInput

PhoneNumberInput allows the user to fill in their phone number, including the country code.

FigmaGitHub

Code examples

<PhoneNumberInput />

Guidelines

PhoneNumberInput takes in the same props as Input, in addition to some others.

Use it to secure the country code in addition to the users phone number. The input only takes in numbers as a value.

Code

<PhoneNumberInput />

import { PhoneNumberInput } from "@vygruppen/spor-react";

Props

Name
Type
Required?
Description
onValueChange(change: CountryCodeAndPhoneNumber) => voidOwn functional callback for the two values.

<Input />

import { Input } from "@vygruppen/spor-react";

Props

Name
Type
Required?
Description
disabledboolean
endElementReact.ReactNodeUse the 24px icons
errorTextReact.ReactNodeDisplay error text for the component
helperTextReact.ReactNodeDisplay helper text for the input
invalidboolean
labelstringA descriptive label
readonlyboolean
requiredboolean
startElementReact.ReactNodeUse the 24px icons
variant"core" | "floating"Defaults to core.