Skip to content

Keeping the background clickable with Dialog open #3613

Answered by scottwillman
scottwillman asked this question in Help
Discussion options

You must be logged in to vote

Solved. It makes sense in hindsight that the Dialog's specific reason for existing is accessibility and background/scroll locking. What I really needed was to just transition my own div because I didn't need the functionality of the Popover or Dialog. All works great now!

<div className="pointer-events-none fixed inset-y-0 right-0 flex max-w-full p-4">
    <Transition show={isOpen}>
        <div className="pointer-events-auto flex h-full flex-col overflow-x-hidden overflow-y-scroll bg-white rounded-2xl border border-zinc-200 shadow-2xl w-[525px] transition-all data-[closed]:translate-x-4 data-[closed]:opacity-0 data-[enter]:duration-200 data-[enter]:ease-out data-[leave]:duration-200 data…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by scottwillman
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
1 participant