# UI: OtpField

> An input for the six-digit code of an authenticator app.

Source: https://pithyx.org/docs/reference/sdk/ui/otp-field/
Markdown: https://pithyx.org/docs/reference/sdk/ui/otp-field.md

An input for the six-digit code of an authenticator app. Import the token file once (`@pithyx/ui/tokens.css`) and wrap the app in `UiProvider`; see [@pithyx/ui](https://pithyx.org/docs/sdk/ui/).

Generated from the TSDoc comments of @pithyx/ui 1.0.0-rc.9 at build time; the text below the headings is the comment in the source.

## Functions

### OtpField()

```ts
function OtpField(props): Element;
```

An input for the six-digit code from an authenticator app: numeric keyboard, `one-time-code` autofill and at most
seven characters (a space in the middle is allowed).

#### Parameters

| Parameter | Type                                                                                                                           | Description                                                                                                            |
| --------- | ------------------------------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------- |
| `props`   | `Omit`\<[`TextFieldProps`](https://pithyx.org/docs/reference/sdk/ui/text-field/#textfieldprops), `"type"` \| `"inputMode"` \| `"autoComplete"`\> | The props of [TextField](https://pithyx.org/docs/reference/sdk/ui/text-field/#textfield) without `type`, `inputMode` and `autoComplete`. |

#### Returns

`Element`

The code field.
