Appearance
Overlays
Ưu tiên Sheet trên Mobile-First / WebView; Dialog cho confirmation. Overlay phức tạp có Preview Mobile và Desktop.
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 — Panel trượt từ cạnh — ưu tiên mobile / WebView.
- Drawer — Bottom sheet (Vaul) với overlay mềm và bo góc 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.
Examples
Một vài component tiêu biểu. Xem trang component để đủ Props / Behavior.
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 className="gap-4">
<DialogHeader>
<DialogTitle>Dialog</DialogTitle>
<DialogDescription>Confirmation surface</DialogDescription>
</DialogHeader>
<Button className="w-full">Confirm</Button>
</DialogContent>
</Dialog>
);
}1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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" className="w-full">
Delete…
</Button>
</AlertDialogTrigger>
<AlertDialogContent>
<AlertDialogHeader>
<AlertDialogTitle>Confirm</AlertDialogTitle>
<AlertDialogDescription>Blocking confirm · touch targets ~44px</AlertDialogDescription>
</AlertDialogHeader>
<AlertDialogFooter>
<AlertDialogCancel>Cancel</AlertDialogCancel>
<AlertDialogAction>Continue</AlertDialogAction>
</AlertDialogFooter>
</AlertDialogContent>
</AlertDialog>
</>
);
}1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
Sheet
tsx
import { Button, Sheet, SheetContent, SheetDescription, SheetHeader, SheetTitle, SheetTrigger } from "@minap/ui";
export function Example() {
return (
<Sheet>
<SheetTrigger asChild>
<Button>Open sheet</Button>
</SheetTrigger>
<SheetContent side="bottom" className="gap-4">
<SheetHeader>
<SheetTitle>Sheet</SheetTitle>
<SheetDescription>Mobile-First overlay</SheetDescription>
</SheetHeader>
<Button className="w-full">Confirm</Button>
</SheetContent>
</Sheet>
);
}1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
Drawer
tsx
import { Button, Drawer, DrawerContent, DrawerTrigger } from "@minap/ui";
export function Example() {
return (
<>
<Drawer>
<DrawerTrigger asChild>
<Button variant="outline" className="w-full">
Open drawer
</Button>
</DrawerTrigger>
<DrawerContent className="p-4">
<p className="text-sm">Vaul drawer</p>
</DrawerContent>
</Drawer>
</>
);
}1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18