-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpatterns.json
More file actions
126 lines (126 loc) · 4.68 KB
/
patterns.json
File metadata and controls
126 lines (126 loc) · 4.68 KB
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
{
"library": "Calmo UI",
"patterns": [
{
"id": "theme-scoped-app-shell",
"title": "Theme-scoped app shell",
"best_for": ["brand-aware product shells", "multi-brand admin tools", "demo environments"],
"structure": ["ThemeProvider", "TopBar", "SectionHeader", "Card", "Button"],
"rules": [
"Wrap the smallest meaningful subtree in ThemeProvider.",
"Use presets before inventing a new palette.",
"Keep semantic feedback colors distinct from the main accent."
]
},
{
"id": "settings-list-page",
"title": "Settings list page",
"best_for": ["account settings", "workspace preferences", "notification options"],
"structure": ["TopBar", "SectionHeader", "List", "ListRow", "Switch", "Button"],
"rules": [
"Use one grouped list per section.",
"Place destructive action at the bottom, separated from toggles.",
"Use Switch for binary settings only."
]
},
{
"id": "detail-summary-page",
"title": "Detail summary page",
"best_for": ["workspace detail", "project detail", "transaction detail"],
"structure": ["TopBar", "SectionHeader", "Card", "InfoRow", "ListRow", "Banner"],
"rules": [
"Lead with one summary block.",
"Use ListRow for actions, InfoRow for facts.",
"Do not stack more than two large cards before a list."
]
},
{
"id": "search-results-page",
"title": "Search results page",
"best_for": ["component search", "entity lookup", "content search"],
"structure": ["TopBar", "SearchBar", "Banner", "List", "ListRow", "Pagination"],
"rules": [
"Search belongs near the top.",
"Use Pagination only when result counts justify it.",
"Prefer empty state over a blank list."
]
},
{
"id": "metrics-dashboard",
"title": "Metrics dashboard",
"best_for": ["operations dashboards", "revenue summary", "analytics overview"],
"structure": ["TopBar", "Tabs", "SectionHeader", "Card", "TableRow", "Table", "Snackbar"],
"rules": [
"Use one tab bar only.",
"Keep metric cards compact.",
"Tables should follow a summary, not precede it."
]
},
{
"id": "form-with-validation",
"title": "Form with validation",
"best_for": ["create forms", "edit forms", "submission flows"],
"structure": ["TopBar", "SectionHeader", "Input", "TextArea", "Select", "DatePicker", "Button"],
"rules": [
"Use validationState and validationMessage consistently.",
"One field should show one state at a time.",
"Keep the primary CTA at the bottom."
]
},
{
"id": "bottom-sheet-picker",
"title": "Bottom sheet picker",
"best_for": ["mobile option picking", "date picking", "secondary tasks"],
"structure": ["BottomSheet", "SectionHeader", "Select or DatePicker", "Button"],
"rules": [
"Use BottomSheet instead of Dialog for mobile-first pickers.",
"Keep content focused on one decision.",
"Primary CTA should be full-width."
]
},
{
"id": "destructive-confirmation",
"title": "Destructive confirmation",
"best_for": ["delete", "reset", "archive", "disconnect"],
"structure": ["ConfirmDialog"],
"rules": [
"Use ConfirmDialog for destructive actions.",
"Do not place long explanatory content inside the dialog.",
"The destructive action should be explicit and final."
]
},
{
"id": "command-launcher",
"title": "Command launcher",
"best_for": ["power user shortcuts", "multi-action apps", "docs search"],
"structure": ["TopBar", "CommandPalette", "Snackbar"],
"rules": [
"Use CommandPalette for command search, not generic content search.",
"Commands should have short titles.",
"Shortcuts are optional but preferred."
]
},
{
"id": "notification-center",
"title": "Notification center",
"best_for": ["alerts", "system notices", "activity feeds"],
"structure": ["TopBar", "Tabs", "Banner", "List", "ListRow", "Badge"],
"rules": [
"Use Badge for counts or status only.",
"Use Banner for one high-priority notice.",
"Separate feed categories with Tabs if needed."
]
},
{
"id": "empty-to-first-action",
"title": "Empty to first action",
"best_for": ["first-run states", "no-content states", "no-results states"],
"structure": ["TopBar", "EmptyState", "Button"],
"rules": [
"Use one clear CTA.",
"Keep description short and instructive.",
"Avoid secondary clutter in the empty state."
]
}
]
}