Comment

Comment by cantlin

It can be done right.

  * Use label tags in the initial render, JavaScript them into placeholders.
  * Do not remove the placeholder until the user has both focused and started typing.
  * Try and animate the placeholder to a safe location rather than removing it.
  * Restore the placeholder if the user pauses after removing their input.
Personally, I favour example input in my inputs (as the author suggests) rather than embedded placeholders. Still, I can understand the assault on clutter from many designers, and I don't think the technique is so much bad as open to crappy implementations.
parent cantlin 13 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton