Skip to content

feat: multiline option turns Input into a text area - #287

Open
CyberDex wants to merge 8 commits into
mainfrom
feat/input-multiline
Open

CyberDex wants to merge 8 commits into
mainfrom
feat/input-multiline

Conversation

@CyberDex

@CyberDex CyberDex commented Oct 2, 2026 •

Copy link
Copy Markdown
Member

Closes #229

Adds multiline: true to Input, which turns it into a text area.

  • The hidden field is a <textarea>, so typing, IME, paste and selection stay native.
  • Enter inserts a line break; Escape or clicking away ends the session.
  • Lines wrap to the width (after a space, or inside a word that does not fit). The text is clipped and scrolls vertically to keep the caret line visible: caret movement, mouse wheel, and drag-selection past the top or bottom.
  • Pointer and touch clicks, drags and double/triple-click work across lines.
  • Up/Down/Home/End (with Shift) are handled by the component, since the textarea does not know how it wrapped the lines. Up/Down keep the column.
  • Selection draws one rectangle per line; secure masks everything except line breaks.
  • align is ignored in multiline mode.

Single-line behaviour is unchanged.

Testing

  • New tests/components/InputMultiline.test.ts; full jest, tsc and eslint pass.
  • Not checked in a real browser: Storybook would not start locally (wsToken is required error). Please try the new multiline control on the Graphics Input story.

🤖 Generated with Claude Code

Comment thread src/input/hiddenField.ts Outdated
Comment thread src/input/InputSelection.ts Outdated
@CyberDex
CyberDex requested a review from CatchABus October 2, 2026 13:46

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Multiline Text

2 participants