Modal or non-modal (hasScrim)
- from @astryx
- by Astryx
The default modal drawer dims the page, traps focus, and closes on a scrim click. With hasScrim={false}, the drawer has no scrim or focus trap and leaves the page interactive.
Install
New to shadcn? Set up your project
If your project already has a shadcn components.json, skip initialization. Otherwise, run this once from your project root.
pnpm dlx shadcn@latest initpnpm dlx shadcn@latest add @astryx/example-drawer-modal-or-non-modal-has-scrimRegistry dependencies0
The CLI adds no other registry items with this one.
