- Name
service- Kind
- parameter
- Type
InputOTPService- Requirement
- required
DocsAPI referenceHeadlessinput-otp
input-otp headless API
The core connector and vanilla mount are always visible. Use the framework choice to inspect native composition, props, outputs, context and hooks for the selected adapter.
45 of 45
@grassroot/ui-headless-core/input-otp
Core connector and vanilla API
connectInputOTP
functionconnectInputOTPts
declare function connectInputOTP(service: InputOTPService, scope: PartScope, options?: InputOTPConnectOptions): InputOTPApi;Name
Kind
Type
Requirement
serviceparameter
InputOTPServicerequired
scopeparameter
PartScoperequired
optionsparameter
InputOTPConnectOptionsoptional
returnreturn value
InputOTPApin/a
- Name
scope- Kind
- parameter
- Type
PartScope- Requirement
- required
- Name
options- Kind
- parameter
- Type
InputOTPConnectOptions- Requirement
- optional
- Name
return- Kind
- return value
- Type
InputOTPApi- Requirement
- n/a
inputOTPAnatomy
valueinputOTPAnatomyts
export declare const inputOTPAnatomy: { readonly scope: "input-otp"; readonly parts: readonly ["root", "input"];};Name
Kind
Type
Requirement
partsproperty
readonly ["root", "input"]required
scopeproperty
"input-otp"required
- Name
parts- Kind
- property
- Type
readonly ["root", "input"]- Requirement
- required
- Name
scope- Kind
- property
- Type
"input-otp"- Requirement
- required
InputOTPApi
interfaceInputOTPApits
interface InputOTPApi { rootProps(): PartProps; inputProps(index: number): PartProps; syncNativeState(): void; readonly value: string; readonly length: number; readonly focusIndex: number;}Name
Kind
Type
Requirement
focusIndexproperty
numberrequired
inputPropsmethod
(index: number) => PartPropsrequired
lengthproperty
numberrequired
rootPropsmethod
() => PartPropsrequired
syncNativeStatemethod
() => voidrequired
valueproperty
stringrequired
- Name
focusIndex- Kind
- property
- Type
number- Requirement
- required
- Name
inputProps- Kind
- method
- Type
(index: number) => PartProps- Requirement
- required
- Name
length- Kind
- property
- Type
number- Requirement
- required
- Name
rootProps- Kind
- method
- Type
() => PartProps- Requirement
- required
- Name
syncNativeState- Kind
- method
- Type
() => void- Requirement
- required
- Name
value- Kind
- property
- Type
string- Requirement
- required
InputOTPChangeDetail
interfaceInputOTPChangeDetailts
interface InputOTPChangeDetail { readonly value: string; readonly reason: InputOTPReason;}Name
Kind
Type
Requirement
reasonproperty
InputOTPReasonrequired
valueproperty
stringrequired
- Name
reason- Kind
- property
- Type
InputOTPReason- Requirement
- required
- Name
value- Kind
- property
- Type
string- Requirement
- required
InputOTPConnectOptions
interfaceInputOTPConnectOptionsts
interface InputOTPConnectOptions { readonly ariaLabel?: string; readonly messages?: Partial<InputOTPMessages>; readonly onValueChange?: (detail: InputOTPChangeDetail) => void; readonly onComplete?: (value: string) => void;}Name
Kind
Type
Requirement
ariaLabelproperty
stringoptional
messagesproperty
Partial<InputOTPMessages>optional
onCompleteproperty
(value: string) => voidoptional
onValueChangeproperty
(detail: InputOTPChangeDetail) => voidoptional
- Name
ariaLabel- Kind
- property
- Type
string- Requirement
- optional
- Name
messages- Kind
- property
- Type
Partial<InputOTPMessages>- Requirement
- optional
- Name
onComplete- Kind
- property
- Type
(value: string) => void- Requirement
- optional
- Name
onValueChange- Kind
- property
- Type
(detail: InputOTPChangeDetail) => void- Requirement
- optional
inputOTPMessages
valueinputOTPMessagests
export declare const inputOTPMessages: InputOTPMessages;InputOTPMessages
typeInputOTPMessagests
type InputOTPMessages = Pick<MessageTable, "rootLabel" | "digitLabel">;InputOTPMount
interfaceInputOTPMountts
interface InputOTPMount { readonly service: InputOTPService; readonly connector: InputOTPApi; readonly root: HTMLElement; destroy(): void;}Name
Kind
Type
Requirement
connectorproperty
InputOTPApirequired
destroymethod
() => voidrequired
rootproperty
HTMLElementrequired
serviceproperty
InputOTPServicerequired
- Name
connector- Kind
- property
- Type
InputOTPApi- Requirement
- required
- Name
destroy- Kind
- method
- Type
() => void- Requirement
- required
- Name
root- Kind
- property
- Type
HTMLElement- Requirement
- required
- Name
service- Kind
- property
- Type
InputOTPService- Requirement
- required
InputOTPPart
typeInputOTPPartts
type InputOTPPart = (typeof inputOTPAnatomy.parts)[number];InputOTPService
typeInputOTPServicets
type InputOTPService = Service<InputOTPInput, "ready", InputOTPContext, InputOTPEvent, InputOTPCommand>;mountInputOTP
functionmountInputOTPts
declare function mountInputOTP(container: HTMLElement, options?: MountInputOTPOptions): InputOTPMount;Name
Kind
Type
Requirement
containerparameter
HTMLElementrequired
optionsparameter
MountInputOTPOptionsoptional
returnreturn value
InputOTPMountn/a
- Name
container- Kind
- parameter
- Type
HTMLElement- Requirement
- required
- Name
options- Kind
- parameter
- Type
MountInputOTPOptions- Requirement
- optional
- Name
return- Kind
- return value
- Type
InputOTPMount- Requirement
- n/a
MountInputOTPOptions
interfaceMountInputOTPOptionsts
interface MountInputOTPOptions extends InputOTPInput, Pick<InputOTPConnectOptions, "ariaLabel" | "messages"> { readonly onValueChange?: (detail: InputOTPChangeDetail) => void; readonly onComplete?: (value: string) => void;}Name
Kind
Type
Requirement
onCompleteproperty
(value: string) => voidoptional
onValueChangeproperty
(detail: InputOTPChangeDetail) => voidoptional
- Name
onComplete- Kind
- property
- Type
(value: string) => void- Requirement
- optional
- Name
onValueChange- Kind
- property
- Type
(detail: InputOTPChangeDetail) => void- Requirement
- optional
runInputOTPCommand
functionrunInputOTPCommandts
declare function runInputOTPCommand(command: InputOTPCommand, options?: InputOTPConnectOptions): void;Name
Kind
Type
Requirement
commandparameter
InputOTPCommandrequired
optionsparameter
InputOTPConnectOptionsoptional
returnreturn value
voidn/a
- Name
command- Kind
- parameter
- Type
InputOTPCommand- Requirement
- required
- Name
options- Kind
- parameter
- Type
InputOTPConnectOptions- Requirement
- optional
- Name
return- Kind
- return value
- Type
void- Requirement
- n/a
Framework adapters
Each panel keeps its adapter's public vocabulary. React compound exports, Vue composables, standalone Angular declarations, Svelte components, and Solid hooks stay native to their framework.
React example follows below.
Vue example follows below.
Angular example follows below.
Svelte example follows below.
Solid example follows below.
React imports
@grassroot/ui-headless-react/input-otpts
import { Root, RootProvider } from "@grassroot/ui-headless-react/input-otp";Vue imports
@grassroot/ui-headless-vue/input-otpts
<script setup lang="ts">import { Root, RootProvider } from "@grassroot/ui-headless-vue/input-otp";</script>Angular imports
@grassroot/ui-headless-angular/input-otpts
import { GrInputOTPRoot, GrInputOTPRootProvider } from "@grassroot/ui-headless-angular/input-otp";Svelte imports
@grassroot/ui-headless-svelte/input-otpts
<script lang="ts"> import { Root, RootProvider } from "@grassroot/ui-headless-svelte/input-otp";</script>Solid imports
@grassroot/ui-headless-solid/input-otpts
import { Root, RootProvider } from "@grassroot/ui-headless-solid/input-otp";@grassroot/ui-headless-react/input-otp
React adapter
Input
valueInputts
export declare const Input: import("react").ForwardRefExoticComponent<InputOTPInputProps & import("react").RefAttributes<HTMLInputElement>>;Name
Kind
Type
Requirement
propsparameter
Prequired
returnreturn value
ReactNoden/a
- Name
props- Kind
- parameter
- Type
P- Requirement
- required
- Name
return- Kind
- return value
- Type
ReactNode- Requirement
- n/a
InputOTPInputProps
interfaceInputOTPInputPropsts
interface InputOTPInputProps extends InputHTMLAttributes<HTMLInputElement> { readonly index: number; readonly children?: ReactNode;}Name
Kind
Type
Requirement
childrenproperty
ReactNodeoptional
indexproperty
numberrequired
- Name
children- Kind
- property
- Type
ReactNode- Requirement
- optional
- Name
index- Kind
- property
- Type
number- Requirement
- required
InputOTPRootProps
interfaceInputOTPRootPropsts
interface InputOTPRootProps extends Omit<HTMLAttributes<HTMLDivElement>, "defaultValue">, InputOTPInput { readonly ariaLabel?: string; readonly id?: string; readonly onValueChange?: (detail: InputOTPChangeDetail) => void; readonly onComplete?: (value: string) => void; readonly children?: ReactNode;}Name
Kind
Type
Requirement
ariaLabelproperty
stringoptional
childrenproperty
ReactNodeoptional
idproperty
stringoptional
onCompleteproperty
(value: string) => voidoptional
onValueChangeproperty
(detail: InputOTPChangeDetail) => voidoptional
- Name
ariaLabel- Kind
- property
- Type
string- Requirement
- optional
- Name
children- Kind
- property
- Type
ReactNode- Requirement
- optional
- Name
id- Kind
- property
- Type
string- Requirement
- optional
- Name
onComplete- Kind
- property
- Type
(value: string) => void- Requirement
- optional
- Name
onValueChange- Kind
- property
- Type
(detail: InputOTPChangeDetail) => void- Requirement
- optional
InputOTPRootProviderProps
interfaceInputOTPRootProviderPropsts
interface InputOTPRootProviderProps extends HTMLAttributes<HTMLDivElement> { readonly value: UseInputOTPResult; readonly children?: ReactNode;}Name
Kind
Type
Requirement
childrenproperty
ReactNodeoptional
valueproperty
UseInputOTPResultrequired
- Name
children- Kind
- property
- Type
ReactNode- Requirement
- optional
- Name
value- Kind
- property
- Type
UseInputOTPResult- Requirement
- required
Root
valueRootts
export declare const Root: import("react").ForwardRefExoticComponent<InputOTPRootProps & import("react").RefAttributes<HTMLDivElement>>;Name
Kind
Type
Requirement
propsparameter
Prequired
returnreturn value
ReactNoden/a
- Name
props- Kind
- parameter
- Type
P- Requirement
- required
- Name
return- Kind
- return value
- Type
ReactNode- Requirement
- n/a
RootProvider
valueRootProviderts
export declare const RootProvider: import("react").ForwardRefExoticComponent<InputOTPRootProviderProps & import("react").RefAttributes<HTMLDivElement>>;Name
Kind
Type
Requirement
propsparameter
Prequired
returnreturn value
ReactNoden/a
- Name
props- Kind
- parameter
- Type
P- Requirement
- required
- Name
return- Kind
- return value
- Type
ReactNode- Requirement
- n/a
useInputOTP
functionuseInputOTPts
declare function useInputOTP(input: InputOTPInput, options?: UseInputOTPOptions): UseInputOTPResult;Name
Kind
Type
Requirement
inputparameter
InputOTPInputrequired
optionsparameter
UseInputOTPOptionsoptional
returnreturn value
UseInputOTPResultn/a
- Name
input- Kind
- parameter
- Type
InputOTPInput- Requirement
- required
- Name
options- Kind
- parameter
- Type
UseInputOTPOptions- Requirement
- optional
- Name
return- Kind
- return value
- Type
UseInputOTPResult- Requirement
- n/a
UseInputOTPOptions
interfaceUseInputOTPOptionsts
interface UseInputOTPOptions { readonly id?: string; readonly ariaLabel?: string; readonly onValueChange?: (detail: InputOTPChangeDetail) => void; readonly onComplete?: (value: string) => void;}Name
Kind
Type
Requirement
ariaLabelproperty
stringoptional
idproperty
stringoptional
onCompleteproperty
(value: string) => voidoptional
onValueChangeproperty
(detail: InputOTPChangeDetail) => voidoptional
- Name
ariaLabel- Kind
- property
- Type
string- Requirement
- optional
- Name
id- Kind
- property
- Type
string- Requirement
- optional
- Name
onComplete- Kind
- property
- Type
(value: string) => void- Requirement
- optional
- Name
onValueChange- Kind
- property
- Type
(detail: InputOTPChangeDetail) => void- Requirement
- optional
UseInputOTPResult
interfaceUseInputOTPResultts
interface UseInputOTPResult { readonly service: InputOTPService; readonly connector: InputOTPApi; readonly scope: PartScope; readonly snapshot: InputOTPSnapshot;}Name
Kind
Type
Requirement
connectorproperty
InputOTPApirequired
scopeproperty
PartScoperequired
serviceproperty
InputOTPServicerequired
snapshotproperty
InputOTPSnapshotrequired
- Name
connector- Kind
- property
- Type
InputOTPApi- Requirement
- required
- Name
scope- Kind
- property
- Type
PartScope- Requirement
- required
- Name
service- Kind
- property
- Type
InputOTPService- Requirement
- required
- Name
snapshot- Kind
- property
- Type
InputOTPSnapshot- Requirement
- required
@grassroot/ui-headless-vue/input-otp
Vue adapter
Input
valueInputts
export declare const Input: import("vue").DefineComponent<import("vue").ExtractPropTypes<{ index: { type: NumberConstructor; required: true; };}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, { [key: string]: any;}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{ index: { type: NumberConstructor; required: true; };}>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;Root
valueRootts
export declare const Root: import("vue").DefineComponent<import("vue").ExtractPropTypes<{ length: NumberConstructor; value: PropType<string | undefined>; defaultValue: PropType<string | undefined>; disabled: BooleanConstructor; ariaLabel: StringConstructor; id: StringConstructor;}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, { [key: string]: any;}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, { valueChange: (_detail: InputOTPChangeDetail) => true; complete: (_value: string) => true;}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{ length: NumberConstructor; value: PropType<string | undefined>; defaultValue: PropType<string | undefined>; disabled: BooleanConstructor; ariaLabel: StringConstructor; id: StringConstructor;}>> & Readonly<{ onComplete?: ((_value: string) => any) | undefined; onValueChange?: ((_detail: InputOTPChangeDetail) => any) | undefined;}>, { disabled: boolean;}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;RootProvider
valueRootProviderts
export declare const RootProvider: import("vue").DefineComponent<import("vue").ExtractPropTypes<{ value: { type: PropType<UseInputOTPResult>; required: true; };}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, { [key: string]: any;}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{ value: { type: PropType<UseInputOTPResult>; required: true; };}>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;useInputOTP
functionuseInputOTPts
declare function useInputOTP(input: () => InputOTPInput, options?: () => InputOTPOptions): UseInputOTPResult;Name
Kind
Type
Requirement
inputparameter
() => InputOTPInputrequired
optionsparameter
() => InputOTPOptionsoptional
returnreturn value
UseInputOTPResultn/a
- Name
input- Kind
- parameter
- Type
() => InputOTPInput- Requirement
- required
- Name
options- Kind
- parameter
- Type
() => InputOTPOptions- Requirement
- optional
- Name
return- Kind
- return value
- Type
UseInputOTPResult- Requirement
- n/a
UseInputOTPResult
interfaceUseInputOTPResultts
interface UseInputOTPResult { readonly service: InputOTPService; readonly connector: InputOTPApi; readonly scope: PartScope; readonly snapshot: ShallowRef<InputOTPSnapshot>;}Name
Kind
Type
Requirement
connectorproperty
InputOTPApirequired
scopeproperty
PartScoperequired
serviceproperty
InputOTPServicerequired
snapshotproperty
ShallowRef<InputOTPSnapshot>required
- Name
connector- Kind
- property
- Type
InputOTPApi- Requirement
- required
- Name
scope- Kind
- property
- Type
PartScope- Requirement
- required
- Name
service- Kind
- property
- Type
InputOTPService- Requirement
- required
- Name
snapshot- Kind
- property
- Type
ShallowRef<InputOTPSnapshot>- Requirement
- required
@grassroot/ui-headless-angular/input-otp
Angular adapter
createInputOTPStore
functioncreateInputOTPStorets
export declare function createInputOTPStore(initial: InputOTPInput, options?: InputOTPOptions): InputOTPStore;Name
Kind
Type
Requirement
initialparameter
InputOTPInputrequired
optionsparameter
InputOTPOptionsoptional
returnreturn value
InputOTPStoren/a
- Name
initial- Kind
- parameter
- Type
InputOTPInput- Requirement
- required
- Name
options- Kind
- parameter
- Type
InputOTPOptions- Requirement
- optional
- Name
return- Kind
- return value
- Type
InputOTPStore- Requirement
- n/a
GrInputOTPInput
classGrInputOTPInputts
export declare class GrInputOTPInput implements OnDestroy { readonly index: import("@angular/core").InputSignal<number>; private readonly store; private readonly element; private readonly listeners; private readonly consumer; constructor(); ngOnDestroy(): void; static ɵfac: i0.ɵɵFactoryDeclaration<GrInputOTPInput, never>; static ɵdir: i0.ɵɵDirectiveDeclaration<GrInputOTPInput, "[grInputOtpInput]", never, { "index": { "alias": "index"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;}Name
Kind
Type
Requirement
consumerproperty
anyrequired
elementproperty
anyrequired
indexproperty
import("@angular/core").InputSignal<number>required
listenersproperty
anyrequired
ngOnDestroymethod
() => voidrequired
ɵdirproperty
i0.ɵɵDirectiveDeclaration<GrInputOTPInput, "[grInputOtpInput]", never, { "index": { "alias": "index"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>required
ɵfacproperty
i0.ɵɵFactoryDeclaration<GrInputOTPInput, never>required
storeproperty
anyrequired
- Name
consumer- Kind
- property
- Type
any- Requirement
- required
- Name
element- Kind
- property
- Type
any- Requirement
- required
- Name
index- Kind
- property
- Type
import("@angular/core").InputSignal<number>- Requirement
- required
- Name
listeners- Kind
- property
- Type
any- Requirement
- required
- Name
ngOnDestroy- Kind
- method
- Type
() => void- Requirement
- required
- Name
ɵdir- Kind
- property
- Type
i0.ɵɵDirectiveDeclaration<GrInputOTPInput, "[grInputOtpInput]", never, { "index": { "alias": "index"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>- Requirement
- required
- Name
ɵfac- Kind
- property
- Type
i0.ɵɵFactoryDeclaration<GrInputOTPInput, never>- Requirement
- required
- Name
store- Kind
- property
- Type
any- Requirement
- required
GrInputOTPRoot
classGrInputOTPRootts
export declare class GrInputOTPRoot implements OnDestroy { readonly length: import("@angular/core").InputSignal<number | undefined>; readonly value: import("@angular/core").InputSignal<string | undefined>; readonly defaultValue: import("@angular/core").InputSignal<string | undefined>; readonly disabled: import("@angular/core").InputSignal<boolean>; readonly ariaLabel: import("@angular/core").InputSignal<string | undefined>; readonly valueChange: import("@angular/core").OutputEmitterRef<InputOTPChangeDetail>; readonly complete: import("@angular/core").OutputEmitterRef<string>; readonly store: InputOTPStore; private readonly host; private readonly listeners; private last; constructor(); ngOnDestroy(): void; static ɵfac: i0.ɵɵFactoryDeclaration<GrInputOTPRoot, never>; static ɵcmp: i0.ɵɵComponentDeclaration<GrInputOTPRoot, "gr-input-otp-root", never, { "length": { "alias": "length"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "defaultValue": { "alias": "defaultValue"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; }, { "valueChange": "valueChange"; "complete": "complete"; }, never, ["*"], true, never>;}Name
Kind
Type
Requirement
ariaLabelproperty
import("@angular/core").InputSignal<string | undefined>required
completeproperty
import("@angular/core").OutputEmitterRef<string>required
defaultValueproperty
import("@angular/core").InputSignal<string | undefined>required
disabledproperty
import("@angular/core").InputSignal<boolean>required
hostproperty
anyrequired
lastproperty
anyrequired
lengthproperty
import("@angular/core").InputSignal<number | undefined>required
listenersproperty
anyrequired
ngOnDestroymethod
() => voidrequired
ɵcmpproperty
i0.ɵɵComponentDeclaration<GrInputOTPRoot, "gr-input-otp-root", never, { "length": { "alias": "length"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "defaultValue": { "alias": "defaultValue"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; }, { "valueChange": "valueChange"; "complete": "complete"; }, never, ["*"], true, never>required
ɵfacproperty
i0.ɵɵFactoryDeclaration<GrInputOTPRoot, never>required
storeproperty
InputOTPStorerequired
valueproperty
import("@angular/core").InputSignal<string | undefined>required
valueChangeproperty
import("@angular/core").OutputEmitterRef<InputOTPChangeDetail>required
- Name
ariaLabel- Kind
- property
- Type
import("@angular/core").InputSignal<string | undefined>- Requirement
- required
- Name
complete- Kind
- property
- Type
import("@angular/core").OutputEmitterRef<string>- Requirement
- required
- Name
defaultValue- Kind
- property
- Type
import("@angular/core").InputSignal<string | undefined>- Requirement
- required
- Name
disabled- Kind
- property
- Type
import("@angular/core").InputSignal<boolean>- Requirement
- required
- Name
host- Kind
- property
- Type
any- Requirement
- required
- Name
last- Kind
- property
- Type
any- Requirement
- required
- Name
length- Kind
- property
- Type
import("@angular/core").InputSignal<number | undefined>- Requirement
- required
- Name
listeners- Kind
- property
- Type
any- Requirement
- required
- Name
ngOnDestroy- Kind
- method
- Type
() => void- Requirement
- required
- Name
ɵcmp- Kind
- property
- Type
i0.ɵɵComponentDeclaration<GrInputOTPRoot, "gr-input-otp-root", never, { "length": { "alias": "length"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "defaultValue": { "alias": "defaultValue"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; }, { "valueChange": "valueChange"; "complete": "complete"; }, never, ["*"], true, never>- Requirement
- required
- Name
ɵfac- Kind
- property
- Type
i0.ɵɵFactoryDeclaration<GrInputOTPRoot, never>- Requirement
- required
- Name
store- Kind
- property
- Type
InputOTPStore- Requirement
- required
- Name
value- Kind
- property
- Type
import("@angular/core").InputSignal<string | undefined>- Requirement
- required
- Name
valueChange- Kind
- property
- Type
import("@angular/core").OutputEmitterRef<InputOTPChangeDetail>- Requirement
- required
GrInputOTPRootProvider
classGrInputOTPRootProviderts
export declare class GrInputOTPRootProvider implements OnDestroy { private readonly store; private readonly host; private readonly listeners; constructor(); ngOnDestroy(): void; static ɵfac: i0.ɵɵFactoryDeclaration<GrInputOTPRootProvider, never>; static ɵcmp: i0.ɵɵComponentDeclaration<GrInputOTPRootProvider, "gr-input-otp-root-provider", never, {}, {}, never, ["*"], true, never>;}Name
Kind
Type
Requirement
hostproperty
anyrequired
listenersproperty
anyrequired
ngOnDestroymethod
() => voidrequired
ɵcmpproperty
i0.ɵɵComponentDeclaration<GrInputOTPRootProvider, "gr-input-otp-root-provider", never, {}, {}, never, ["*"], true, never>required
ɵfacproperty
i0.ɵɵFactoryDeclaration<GrInputOTPRootProvider, never>required
storeproperty
anyrequired
- Name
host- Kind
- property
- Type
any- Requirement
- required
- Name
listeners- Kind
- property
- Type
any- Requirement
- required
- Name
ngOnDestroy- Kind
- method
- Type
() => void- Requirement
- required
- Name
ɵcmp- Kind
- property
- Type
i0.ɵɵComponentDeclaration<GrInputOTPRootProvider, "gr-input-otp-root-provider", never, {}, {}, never, ["*"], true, never>- Requirement
- required
- Name
ɵfac- Kind
- property
- Type
i0.ɵɵFactoryDeclaration<GrInputOTPRootProvider, never>- Requirement
- required
- Name
store- Kind
- property
- Type
any- Requirement
- required
InputOTPStore
interfaceInputOTPStorets
export interface InputOTPStore { readonly service: InputOTPService; readonly connector: InputOTPApi; readonly scope: PartScope; readonly version: WritableSignal<number>; start(): void; stop(): void; sync(input: Record<string, unknown>): void; syncOptions(options: Record<string, unknown>): void;}Name
Kind
Type
Requirement
connectorproperty
InputOTPApirequired
scopeproperty
PartScoperequired
serviceproperty
InputOTPServicerequired
startmethod
() => voidrequired
stopmethod
() => voidrequired
syncmethod
(input: Record<string, unknown>) => voidrequired
syncOptionsmethod
(options: Record<string, unknown>) => voidrequired
versionproperty
WritableSignal<number>required
- Name
connector- Kind
- property
- Type
InputOTPApi- Requirement
- required
- Name
scope- Kind
- property
- Type
PartScope- Requirement
- required
- Name
service- Kind
- property
- Type
InputOTPService- Requirement
- required
- Name
start- Kind
- method
- Type
() => void- Requirement
- required
- Name
stop- Kind
- method
- Type
() => void- Requirement
- required
- Name
sync- Kind
- method
- Type
(input: Record<string, unknown>) => void- Requirement
- required
- Name
syncOptions- Kind
- method
- Type
(options: Record<string, unknown>) => void- Requirement
- required
- Name
version- Kind
- property
- Type
WritableSignal<number>- Requirement
- required
@grassroot/ui-headless-svelte/input-otp
Svelte adapter
createInputOTP
functioncreateInputOTPts
export declare function createInputOTP(input: () => InputOTPInput, options?: UseInputOTPOptions): UseInputOTPResult;Name
Kind
Type
Requirement
inputparameter
() => InputOTPInputrequired
optionsparameter
UseInputOTPOptionsoptional
returnreturn value
UseInputOTPResultn/a
- Name
input- Kind
- parameter
- Type
() => InputOTPInput- Requirement
- required
- Name
options- Kind
- parameter
- Type
UseInputOTPOptions- Requirement
- optional
- Name
return- Kind
- return value
- Type
UseInputOTPResult- Requirement
- n/a
Input
valueInputts
export declare const Input: LegacyComponentType;Name
Kind
Type
Requirement
argsparameter
Parameters<Component<Record<string, any>>>optional
returnreturn value
ReturnType<Component<Record<string, any>, Record<string, any>>>n/a
- Name
args- Kind
- parameter
- Type
Parameters<Component<Record<string, any>>>- Requirement
- optional
- Name
return- Kind
- return value
- Type
ReturnType<Component<Record<string, any>, Record<string, any>>>- Requirement
- n/a
Root
valueRootts
export declare const Root: LegacyComponentType;Name
Kind
Type
Requirement
argsparameter
Parameters<Component<Record<string, any>>>optional
returnreturn value
ReturnType<Component<Record<string, any>, Record<string, any>>>n/a
- Name
args- Kind
- parameter
- Type
Parameters<Component<Record<string, any>>>- Requirement
- optional
- Name
return- Kind
- return value
- Type
ReturnType<Component<Record<string, any>, Record<string, any>>>- Requirement
- n/a
RootProvider
valueRootProviderts
export declare const RootProvider: LegacyComponentType;Name
Kind
Type
Requirement
argsparameter
Parameters<Component<Record<string, any>>>optional
returnreturn value
ReturnType<Component<Record<string, any>, Record<string, any>>>n/a
- Name
args- Kind
- parameter
- Type
Parameters<Component<Record<string, any>>>- Requirement
- optional
- Name
return- Kind
- return value
- Type
ReturnType<Component<Record<string, any>, Record<string, any>>>- Requirement
- n/a
UseInputOTPOptions
interfaceUseInputOTPOptionsts
export interface UseInputOTPOptions { readonly id?: string; readonly ariaLabel?: string; readonly onValueChange?: (detail: InputOTPChangeDetail) => void; readonly onComplete?: (value: string) => void;}Name
Kind
Type
Requirement
ariaLabelproperty
stringoptional
idproperty
stringoptional
onCompleteproperty
(value: string) => voidoptional
onValueChangeproperty
(detail: InputOTPChangeDetail) => voidoptional
- Name
ariaLabel- Kind
- property
- Type
string- Requirement
- optional
- Name
id- Kind
- property
- Type
string- Requirement
- optional
- Name
onComplete- Kind
- property
- Type
(value: string) => void- Requirement
- optional
- Name
onValueChange- Kind
- property
- Type
(detail: InputOTPChangeDetail) => void- Requirement
- optional
UseInputOTPResult
interfaceUseInputOTPResultts
export interface UseInputOTPResult { readonly service: InputOTPService; readonly connector: InputOTPApi; readonly scope: ReturnType<typeof import("@grassroot/ui-headless-core").createPartScope>; readonly version: () => number;}Name
Kind
Type
Requirement
connectorproperty
InputOTPApirequired
scopeproperty
ReturnType<typeof import("@grassroot/ui-headless-core").createPartScope>required
serviceproperty
InputOTPServicerequired
versionproperty
() => numberrequired
- Name
connector- Kind
- property
- Type
InputOTPApi- Requirement
- required
- Name
scope- Kind
- property
- Type
ReturnType<typeof import("@grassroot/ui-headless-core").createPartScope>- Requirement
- required
- Name
service- Kind
- property
- Type
InputOTPService- Requirement
- required
- Name
version- Kind
- property
- Type
() => number- Requirement
- required
@grassroot/ui-headless-solid/input-otp
Solid adapter
Input
functionInputts
export declare function Input(props: InputOTPInputProps): JSX.Element;Name
Kind
Type
Requirement
propsparameter
InputOTPInputPropsrequired
returnreturn value
JSX.Elementn/a
- Name
props- Kind
- parameter
- Type
InputOTPInputProps- Requirement
- required
- Name
return- Kind
- return value
- Type
JSX.Element- Requirement
- n/a
InputOTPInputProps
interfaceInputOTPInputPropsts
export interface InputOTPInputProps extends JSX.InputHTMLAttributes<HTMLInputElement> { readonly index: number;}Name
Kind
Type
Requirement
indexproperty
numberrequired
- Name
index- Kind
- property
- Type
number- Requirement
- required
InputOTPRootProps
interfaceInputOTPRootPropsts
export interface InputOTPRootProps extends Omit<JSX.HTMLAttributes<HTMLDivElement>, "value" | "defaultValue">, InputOTPInput { readonly ariaLabel?: string; readonly id?: string; readonly onValueChange?: (detail: InputOTPChangeDetail) => void; readonly onComplete?: (value: string) => void; readonly children?: JSX.Element;}Name
Kind
Type
Requirement
ariaLabelproperty
stringoptional
childrenproperty
JSX.Elementoptional
idproperty
stringoptional
onCompleteproperty
(value: string) => voidoptional
onValueChangeproperty
(detail: InputOTPChangeDetail) => voidoptional
- Name
ariaLabel- Kind
- property
- Type
string- Requirement
- optional
- Name
children- Kind
- property
- Type
JSX.Element- Requirement
- optional
- Name
id- Kind
- property
- Type
string- Requirement
- optional
- Name
onComplete- Kind
- property
- Type
(value: string) => void- Requirement
- optional
- Name
onValueChange- Kind
- property
- Type
(detail: InputOTPChangeDetail) => void- Requirement
- optional
Root
functionRootts
export declare function Root(props: InputOTPRootProps): JSX.Element;Name
Kind
Type
Requirement
propsparameter
InputOTPRootPropsrequired
returnreturn value
JSX.Elementn/a
- Name
props- Kind
- parameter
- Type
InputOTPRootProps- Requirement
- required
- Name
return- Kind
- return value
- Type
JSX.Element- Requirement
- n/a
RootProvider
functionRootProviderts
export declare function RootProvider(props: { readonly value: UseInputOTPResult; readonly children?: JSX.Element;} & JSX.HTMLAttributes<HTMLDivElement>): JSX.Element;Name
Kind
Type
Requirement
propsparameter
{
readonly value: UseInputOTPResult;
readonly children?: JSX.Element;
} & JSX.HTMLAttributes<HTMLDivElement>required
returnreturn value
JSX.Elementn/a
- Name
props- Kind
- parameter
- Type
{ readonly value: UseInputOTPResult; readonly children?: JSX.Element; } & JSX.HTMLAttributes<HTMLDivElement>- Requirement
- required
- Name
return- Kind
- return value
- Type
JSX.Element- Requirement
- n/a
useInputOTP
functionuseInputOTPts
export declare function useInputOTP(input: () => InputOTPInput, options?: UseInputOTPOptions): UseInputOTPResult;Name
Kind
Type
Requirement
inputparameter
() => InputOTPInputrequired
optionsparameter
UseInputOTPOptionsoptional
returnreturn value
UseInputOTPResultn/a
- Name
input- Kind
- parameter
- Type
() => InputOTPInput- Requirement
- required
- Name
options- Kind
- parameter
- Type
UseInputOTPOptions- Requirement
- optional
- Name
return- Kind
- return value
- Type
UseInputOTPResult- Requirement
- n/a
UseInputOTPResult
interfaceUseInputOTPResultts
export interface UseInputOTPResult { readonly service: InputOTPService; readonly connector: InputOTPApi; readonly scope: PartScope; readonly snapshot: Accessor<number>;}Name
Kind
Type
Requirement
connectorproperty
InputOTPApirequired
scopeproperty
PartScoperequired
serviceproperty
InputOTPServicerequired
snapshotproperty
Accessor<number>required
- Name
connector- Kind
- property
- Type
InputOTPApi- Requirement
- required
- Name
scope- Kind
- property
- Type
PartScope- Requirement
- required
- Name
service- Kind
- property
- Type
InputOTPService- Requirement
- required
- Name
snapshot- Kind
- property
- Type
Accessor<number>- Requirement
- required