Askr documentation
Generated API snapshot

@askrjs/ui/input

Exports from the declarations published in @askrjs/ui. Signatures reflect the published artifact.

Exports

This entrypoint publishes 10 exports. Use the anchored symbol rows for direct links. Type-only exports are labeled separately from runtime values.

DebouncedInputtype

DebouncedInput: (props: DebouncedInputProps) => JSX.Element

DebouncedInput is a convenience wrapper around Input that emits a settled value for search and filter surfaces.

DebouncedInputPropstype

DebouncedInputProps: Omit<InputInputProps, 'onInput' | 'type'> & {
  type?: JSX.IntrinsicElements['input']['type'];
  debounceMs?: number;
  onInput?: (event: InputEvent) => void;
  onDebouncedInput?: (value: string) => void;
}

Props for Debounced Input.

asChild
asChild?: false | undefined;
children
children?: unknown;
debounceMs
debounceMs?: number | undefined;
onDebouncedInput
onDebouncedInput?: ((value: string) => void) | undefined;
onInput
onInput?: ((event: InputEvent) => void) | undefined;
ref
ref?: Ref<HTMLInputElement>;
type
type?: ReactiveProp<IntrinsicTextValue>;

Inputtype

Input: { (props: InputInputProps): JSX.Element; (props: InputAsChildProps): JSX.Element; }

Renders the `input` part of `input`. Supports polymorphic rendering via `asChild`.

INPUT_A11Y_CONTRACTtype

INPUT_A11Y_CONTRACT: { readonly HOST_ELEMENT: "input"; readonly DISABLED_ATTRIBUTES: { readonly native: "disabled"; readonly asChild: "disabled"; }; readonly DATA_ATTRIBUTES: { readonly disabled: "data-disabled"; }; readonly FOCUS_RULES: { readonly defaultTabIndex: 0; readonly disabledTabIndex: -1; }; readonly LABELING: { readonly supportsLabelElement: true; readonly supportsAriaLabel: true; readonly supportsAriaLabelledBy: true; }; }

Native input semantics wrapped by askr-ui Input.

InputA11yContracttype

InputA11yContract: typeof INPUT_A11Y_CONTRACT

Type of the Input A11y Contract object.

InputAsChildPropstype

InputAsChildProps: InputOwnProps & {
  asChild: true;
  children: JSXElement;
  ref?: Ref<Element>;
}

Props for the `asChild` (polymorphic) rendering of Input.

asChild
asChild: true;
children
children: JSXElement;
disabled
disabled?: boolean | undefined;
ref
ref?: Ref<Element>;
tabIndex
tabIndex?: number | undefined;

InputEventtype

InputEvent: Event & {
  currentTarget: HTMLInputElement;
  target: HTMLInputElement;
}

Input Event.

InputInputPropstype

InputInputProps: Omit<JSX.IntrinsicElements['input'], 'children' | 'ref'> & InputOwnProps & {
  asChild?: false;
  ref?: Ref<HTMLInputElement>;
}

Props for Input Input.

asChild
asChild?: false | undefined;
children
children?: unknown;
ref
ref?: Ref<HTMLInputElement>;

InputOwnPropstype

InputOwnProps: {
  children?: unknown;
  disabled?: boolean;
  tabIndex?: number;
}

Own props for Input, before merging with native element attributes.

children
children?: unknown;
disabled
disabled?: boolean | undefined;
tabIndex
tabIndex?: number | undefined;

InputPropstype

InputProps: InputInputProps | InputAsChildProps

Props for Input.

asChild
asChild?: boolean | undefined;
children
children?: unknown;
ref
ref?: ((value: Element | null) => void) | { current: Element | null; } | ((value: HTMLInputElement | null) => void) | { current: HTMLInputElement | null; } | null | undefined;