CSS Showcase · Live Demo

Textareas that flex.

One composer that auto-grows with a grid replicated-value trick, gets a resize handle on desktop, and anchors to the bottom on mobile.

Featured demo

mobile · sheet-composer
47 / 140

mobile design patterns

textarea-sheet-composer.css
/* Bottom-anchored chat composer */
.composer {
  position: sticky;
  bottom: 0;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 0.5rem;
  padding: 0.5rem;
  border-top: 1px solid hsl(var(--border));
  background: hsl(var(--card));
}

.composer textarea {
  resize: none;
  max-height: 6rem;
}

CSS features used

  • • Grid replicated-value autosize
  • • resize: vertical
  • • Sticky positioning
  • • attr() content
  • • CSS custom properties
  • • Semantic tokens