Basic "Scrollable Region" Automatic Sizing With Optional Constraints & Animation

Automatically expand and contract the height of a <textarea> element to ensure no scrolling is required. Optionally constrained to configured upper and/or lower bounds, defined via min-height and max-height.

Con: Less simple.

Pro: Works well with soft-wrapped text.

Con: Unless carefully calculated, constraints may crop lines.

Pro: Trivial to animate.

Pro: View constraints stored in the view, not the model.

Unconstrained

Unconstrained With Transition

Minimum & Maximum

Minimum & Maximum With Transition