Askr documentation
Generated API snapshot

@askrjs/ui/textarea

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

Exports

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

Textareatype

Textarea: { (props: TextareaElementProps): JSX.Element; (props: TextareaAsChildProps): JSX.Element; }

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

TEXTAREA_A11Y_CONTRACTtype

TEXTAREA_A11Y_CONTRACT: { readonly HOST_ELEMENT: "textarea"; 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 textarea semantics wrapped by askr-ui Textarea.

TextareaA11yContracttype

TextareaA11yContract: typeof TEXTAREA_A11Y_CONTRACT

Type of the Textarea A11y Contract object.

TextareaAsChildPropstype

TextareaAsChildProps: TextareaOwnProps & {
  asChild: true;
  children: JSXElement;
  ref?: Ref<Element>;
}

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

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

TextareaElementPropstype

TextareaElementProps: Omit<JSX.IntrinsicElements['textarea'], 'children' | 'ref'> & TextareaOwnProps & {
  asChild?: false;
  ref?: Ref<HTMLTextAreaElement>;
}

Props for Textarea Element.

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

TextareaOwnPropstype

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

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

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

TextareaPropstype

TextareaProps: TextareaElementProps | TextareaAsChildProps

Props for Textarea.

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