Responsive Modal

Last edit: October 19th 2024

I created this component for my portfolio to combine the Dialog and Drawer components into a single component that renders a Dialog on desktop and a Drawer on mobile. The component is flexible and can be used in any project to display a modal or drawer.

Installation

npx shadcn@latest add "https://c-g.dev/modal.json"

Usage

You can use the component like this: