Skip to content

useInputContainer

@astryxdesign/core v0.7.1 · useInputContainer

Parameters ​

NameTypeDefaultDescription
optionsUseInputContainerOptions—Configuration object for the input container. Required.
options.containerRefRef<HTMLElement | null>—Ref to the outer container/wrapper element. Required.
options.inputRefRef<HTMLElement | null>—Ref to the inner input, textarea, or other focusable control. Required.
options.disabledboolean | MaybeRefOrGetter<boolean>falseWhether the input is disabled. Read again on every event.

Returns ​

NameTypeDescription
onClick(event: MouseEvent) => voidClick handler to attach to the container wrapper.
onMouseUp(event: MouseEvent) => voidMouse up handler to attach to the container wrapper.