A Tailwind CSS v4 Drawer That Does Not Fight the Browser
You wake up at 3:00 AM to a PagerDuty alert: users report the settings panel freezing their dashboards. DevTools shows 200ms frames during open. The culprit is a JavaScript animation loop measuring the drawer, writing its width, then triggering synchronous layout recalculations on every tick. By morning, you've also discovered keyboard users can't escape the overlay, and screen readers still navigate the page underneath.
These aren't separate bugs. They expose a missing architectural boundary: application code trying to own presentation, animation scheduling, and modal behavior simultaneously.
As an external adopter of tailwindlabs/tailwindcss , I treat Tailwind v4 as the presentation layer, not the interaction engine. Radix Dialog owns modal semantics and focus management. CSS owns motion.…