Dialog
One component for both screens. Import Dialog once: it is a bottom sheet on phones that you can swipe down to close, and a centered modal from 768px up, with the same parts and the same code.
Default
Open it on a phone, or make the window narrower than 768px, to see the sheet.
Layout
layout="responsive" is the default. Use "sheet" to keep the bottom sheet on every screen, or "modal" for a centered modal everywhere.
Custom handle and close button
The handle and close button are parts. Restyle them, hide them, or put your own in their place.
Installation
npx glass-orbit add dialog
Usage
import { Button } from "@/components/glass-orbit/button"
import {
Dialog, DialogTrigger, DialogContent, DialogHeader,
DialogTitle, DialogDescription, DialogFooter, DialogClose,
} from "@/components/glass-orbit/dialog"API Reference
layout
"responsive" | "sheet" | "modal" — where the content sits (default responsive)
variant
"glass" | "solid" — surface style (default glass)
size
"sm" | "default" | "lg" — modal width; the sheet is always full width
showHandle
boolean — render the default drag handle (default true)
showCloseButton
boolean — render the default close button (default true)
swipeToClose
boolean — swipe the sheet down by its handle to close it (default true)
DialogHandle
part — the grab bar; pass className or children to change it
DialogCloseButton
part — round close button (44px mobile, 36px desktop); pass className, label or an icon as children