Appearance
Overlays
Ưu tiên Sheet trên Mobile-First / WebView; Dialog cho confirmation.
Components
- Dialog — Modal căn giữa. Trên màn hình nhỏ ưu tiên Sheet cho luồng chính.
- AlertDialog — Dialog xác nhận chặn tương tác.
- Sheet — Overlay Mobile-First / WebView ưu tiên (bg-overlay + radius sheet).
- Drawer — Bottom sheet Vaul với overlay mềm và radius sheet.
- Popover — Bổ trợ desktop — ưu tiên Sheet cho tác vụ mobile chính.
- DropdownMenu — Menu hành động.
- Tooltip — Tip hover/focus — không thay Sheet cho tác vụ ưu tiên touch.
- Command — Primitive command palette cmdk.
Sample strip
Mỗi card chuyển Preview / Code. Full props trên trang component.
Dialog
TSX
import {
Button,
Dialog,
DialogContent,
DialogDescription,
DialogHeader,
DialogTitle,
DialogTrigger,
} from "@minap/ui";
export function Example() {
return (
<>
<Dialog>
<DialogTrigger asChild>
<Button variant="secondary">Open dialog</Button>
</DialogTrigger>
<DialogContent>
<DialogHeader>
<DialogTitle>Dialog</DialogTitle>
<DialogDescription>Centered confirmation.</DialogDescription>
</DialogHeader>
<Button className="w-full">OK</Button>
</DialogContent>
</Dialog>
</>
);
}
AlertDialog
TSX
import {
AlertDialog,
AlertDialogAction,
AlertDialogCancel,
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
AlertDialogHeader,
AlertDialogTitle,
AlertDialogTrigger,
Button,
} from "@minap/ui";
export function Example() {
return (
<>
<AlertDialog>
<AlertDialogTrigger asChild>
<Button color="destructive">Delete…</Button>
</AlertDialogTrigger>
<AlertDialogContent>
<AlertDialogHeader>
<AlertDialogTitle>Confirm</AlertDialogTitle>
<AlertDialogDescription>
This action cannot be undone.
</AlertDialogDescription>
</AlertDialogHeader>
<AlertDialogFooter>
<AlertDialogCancel>Cancel</AlertDialogCancel>
<AlertDialogAction>Continue</AlertDialogAction>
</AlertDialogFooter>
</AlertDialogContent>
</AlertDialog>
</>
);
}
Sheet
TSX
import {
Button,
Sheet,
SheetContent,
SheetDescription,
SheetHeader,
SheetTitle,
SheetTrigger,
} from "@minap/ui";
export function Example() {
return (
<>
<Sheet>
<SheetTrigger asChild>
<Button>Open sheet (bottom)</Button>
</SheetTrigger>
<SheetContent side="bottom" className="gap-4">
<SheetHeader>
<SheetTitle>Sheet</SheetTitle>
<SheetDescription>
Mobile-First overlay · safe-area
</SheetDescription>
</SheetHeader>
<Button className="w-full">Confirm</Button>
</SheetContent>
</Sheet>
</>
);
}
Drawer
TSX
import { Button, Drawer, DrawerContent, DrawerTrigger } from "@minap/ui";
export function Example() {
return (
<>
<Drawer>
<DrawerTrigger asChild>
<Button variant="outline">Open drawer</Button>
</DrawerTrigger>
<DrawerContent className="p-4">
<p className="text-sm">Vaul drawer surface</p>
</DrawerContent>
</Drawer>
</>
);
}