Home / Function/ InputOTPInvalid() — ui Function Reference

InputOTPInvalid() — ui Function Reference

Architecture documentation for the InputOTPInvalid() function in input-otp-example.tsx from the ui codebase.

Entity Profile

Dependency Diagram

graph TD
  adc9ac41_34a6_21e0_be66_61e04dd7d98e["InputOTPInvalid()"]
  4aa10f6b_4776_aa23_5fe8_83405d831575["input-otp-example.tsx"]
  adc9ac41_34a6_21e0_be66_61e04dd7d98e -->|defined in| 4aa10f6b_4776_aa23_5fe8_83405d831575
  style adc9ac41_34a6_21e0_be66_61e04dd7d98e fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

apps/v4/registry/bases/radix/examples/input-otp-example.tsx lines 194–224

function InputOTPInvalid() {
  const [value, setValue] = React.useState("000000")

  return (
    <Example title="Invalid State">
      <Field>
        <FieldLabel htmlFor="invalid">Invalid State</FieldLabel>
        <FieldDescription>
          Example showing the invalid error state.
        </FieldDescription>
        <InputOTP id="invalid" maxLength={6} value={value} onChange={setValue}>
          <InputOTPGroup>
            <InputOTPSlot index={0} aria-invalid />
            <InputOTPSlot index={1} aria-invalid />
          </InputOTPGroup>
          <InputOTPSeparator />
          <InputOTPGroup>
            <InputOTPSlot index={2} aria-invalid />
            <InputOTPSlot index={3} aria-invalid />
          </InputOTPGroup>
          <InputOTPSeparator />
          <InputOTPGroup>
            <InputOTPSlot index={4} aria-invalid />
            <InputOTPSlot index={5} aria-invalid />
          </InputOTPGroup>
        </InputOTP>
        <FieldError errors={[{ message: "Invalid code. Please try again." }]} />
      </Field>
    </Example>
  )
}

Subdomains

Frequently Asked Questions

What does InputOTPInvalid() do?
InputOTPInvalid() is a function in the ui codebase, defined in apps/v4/registry/bases/radix/examples/input-otp-example.tsx.
Where is InputOTPInvalid() defined?
InputOTPInvalid() is defined in apps/v4/registry/bases/radix/examples/input-otp-example.tsx at line 194.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free