oks-ui

Forms

FormFieldSet type="otp" -- segmented or single-input one-time code entry.

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

ui

"segmented" | "single"

Default: "segmented"

Segmented (N boxes) or a single text input with maxLength.

size

"xs" | "xs-sm" | "sm" | "md" | "lg" | "xl"

Default: "md"

Control size.

variant

"bordered" | "soft" | "filled" | "underlined"

Default: "bordered"

Visual variant. "filled" (text types) is borderless with a neutral fill at rest, border + ring on focus; other field types fall back to "bordered". "default"/"underline" are legacy aliases.

color

"default" | "primary" | "secondary" | "info" | "success" | "warning" | "danger" | string

Default: "default"

Semantic tone.

colorDepth

number

Default: 500

Shade depth for color.

radius

"none" | "xs" | "xs-sm" | "sm" | "md" | "lg" | "full"

Default: "md"

Corner radius. `rounded` is a legacy alias.