@payfit/unity-components
Version:
21 lines (20 loc) • 1.15 kB
TypeScript
import { TextAreaProps } from 'react-aria-components/TextArea';
/** Props for the prompt field rendered by {@link AIComposerTextArea}. */
export type AIComposerTextAreaProps = Omit<TextAreaProps, 'disabled'>;
/**
* Lets people write a multi-line AI request while the Composer keeps prompt
* readiness, sizing, and overflow feedback in sync.
*
* Pass an accessible name with `aria-label` or `aria-labelledby`; use standard
* React Aria `value`, `defaultValue`, and `onChange` props to manage the
* prompt. In `enterKeyBehavior="submit"`, Enter sends a non-empty prompt and
* Shift+Enter adds a new line.
* @param props - React Aria textarea props, including the accessible name and
* prompt value.
* @see {@link AIComposerTextAreaProps} for all available props.
* @remarks
* The field disables itself when the parent Composer uses `state="disabled"`.
* A decorative fade indicates additional text below the visible scroll area
* and remains hidden from assistive technology.
*/
export declare const AIComposerTextArea: import('react').ForwardRefExoticComponent<AIComposerTextAreaProps & import('react').RefAttributes<HTMLTextAreaElement>>;