A placeholder-shown variant represents a specific input state. It depends on placeholder behaviour and does not replace an accessible field label.
Worked example
<input
class="demo placeholder-shown:border-dashed placeholder-shown:border-2"
placeholder="Project title"
aria-label="Project title"
/>Implementation notes
A filled input can return to its placeholder state after reset. Test the complete interaction rather than only the untouched field.
Try it yourself
Focus, type and clear the field while watching its outline.
Open the Tailwind CSS example →Editorial date September 15, 2025 · Published December 6, 2026