AI textarea with a toolbar that includes a send button and optional attachments and voice input buttons.
When buttonText is set, the submit button expands into a pill once the text reaches minCharacters (default: 6). Type at least 6 characters to see it expand.
Use minCharacters to customize the expansion threshold. Here it is set to 10.
Without buttonText the submit button stays a circle regardless of how much text is entered.
When set, the submit button expands into a labelled pill once minCharacters is reached.
Keep the virtual keyboard open when the submit button is tapped to prevent the button from stealing focus from the textarea. This lets validation errors/shake show in place instead of after the keyboard closes.
Line count at which the textarea becomes scrollable on desktop/tablet.
Line count at which the textarea becomes scrollable on mobile (>= 400px).
Line count at which the textarea becomes scrollable on small mobile (<400px).
Character threshold at which the submit button expands (requires buttonText).