emilkowalski/vaul — reverse-engineered prompt

Reverse engineered prompt

GitHub

Build me a reusable drawer component for React, written in TypeScript. I want something I can install or import into a React app so a page can open a panel like a dialog, then close it again from a button, backdrop click, or escape key. Keep the public API simple, with components for the drawer root, trigger, content, overlay, close button, and title or description when needed.

Make it feel polished, with smooth opening and closing animations, sensible defaults, and support for controlled and uncontrolled open state. Please include a small demo page that shows the drawer working on desktop and mobile sized screens, plus basic tests for the important interactions. Keep the code clean and reusable, and add enough README instructions so a normal React developer can understand how to use it. Look up current React docs online if you need to.

Want more depth? Deep Reverse