UNPKG

@base-ui/react

Version:

Base UI is a library of headless ('unstyled') React components and low-level hooks. You gain complete control over your app's CSS and accessibility features.

29 lines 978 B
import * as React from 'react'; import type { BaseUIComponentProps } from "../../internals/types.js"; import type { OTPFieldRootState } from "../root/OTPFieldRoot.js"; /** * An individual OTP character input. * Renders an `<input>` element. * * Documentation: [Base UI OTP Field](https://base-ui.com/react/components/otp-field) */ export declare const OTPFieldInput: React.ForwardRefExoticComponent<Omit<OTPFieldInputProps, "ref"> & React.RefAttributes<HTMLInputElement>>; export interface OTPFieldInputState extends Omit<OTPFieldRootState, 'filled' | 'value'> { /** * Whether this input contains a character. */ filled: boolean; /** * The input index. */ index: number; /** * The character rendered in this slot. */ value: string; } export interface OTPFieldInputProps extends BaseUIComponentProps<'input', OTPFieldInputState> {} export declare namespace OTPFieldInput { type State = OTPFieldInputState; type Props = OTPFieldInputProps; }