oks-ui

Forms

FormFieldSet type="phone" -- phone number with a country calling-code selector.

Preview

Type options

Content

Set to make the field show its invalid state.

Appearance

filled = borderless neutral fill at rest (text types); others fall back to bordered.

Layout & positioning

Behavior & states

Props

value / defaultValue

{ code: string; phone: string }

Default:

Controlled / uncontrolled value.

countryOptions

Array<{ code; name?; label?; flag?; shortCode?; key? }>

Default: built-in list

Override the available countries.

placeholder

string

Default:

Placeholder for the phone input (phonePlaceholder is a legacy alias).

countryCodeAriaLabel

string

Default: "Country code"

Accessible label for the country code select.

label

ReactNode

Default:

Field label.

description

ReactNode

Default:

Helper text below the control.

error

ReactNode | boolean

Default:

Error message, or true for an invalid state with no message.