@folpe/loom 0.1.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,174 @@
1
+ ---
2
+ name: ui-ux-guidelines
3
+ description: "Comprehensive UI/UX design intelligence: accessibility, interaction patterns, typography, color palettes, animation rules, and pre-delivery checklist. Use when building any user-facing interface. Inspired by nextlevelbuilder/ui-ux-pro-max-skill."
4
+ allowed-tools: "Read, Write, Edit, Glob, Grep"
5
+ ---
6
+
7
+ # UI/UX Design Guidelines
8
+
9
+ Comprehensive design guide covering accessibility, interaction, layout, typography, color, and animation — prioritized by impact.
10
+
11
+ ## Priority 1 — Accessibility (CRITICAL)
12
+
13
+ - **Color contrast**: minimum 4.5:1 ratio for normal text, 3:1 for large text.
14
+ - **Color is not enough**: never convey information by color alone — add icons or text.
15
+ - **Alt text**: descriptive alt for all meaningful images. Use `alt=""` only for decorative images.
16
+ - **ARIA labels**: every icon-only button must have `aria-label`.
17
+ - **Heading hierarchy**: sequential h1 → h2 → h3, one `<h1>` per page.
18
+ - **Keyboard navigation**: tab order matches visual order, no keyboard traps.
19
+ - **Focus states**: visible focus rings on all interactive elements — never `outline-none` without replacement.
20
+ - **Form labels**: every input must have a visible `<label>` — placeholder alone is never enough.
21
+ - **Error announcements**: use `aria-live="polite"` or `role="alert"` for dynamic errors.
22
+ - **Skip links**: provide "Skip to main content" on navigation-heavy pages.
23
+ - **Motion sensitivity**: always respect `prefers-reduced-motion` — disable parallax and scroll-jacking.
24
+
25
+ ## Priority 2 — Touch & Interaction (CRITICAL)
26
+
27
+ - **Touch targets**: minimum 44x44px on mobile — `min-h-[44px] min-w-[44px]`.
28
+ - **Touch spacing**: minimum 8px gap between adjacent touch targets.
29
+ - **Hover vs tap**: never rely on hover for primary interactions — use click/tap.
30
+ - **Cursor pointer**: add `cursor-pointer` to all clickable elements.
31
+ - **Focus states**: `focus:ring-2 focus:ring-primary` on interactive elements.
32
+ - **Hover states**: `hover:bg-accent cursor-pointer` for visual feedback.
33
+ - **Active states**: `active:scale-95` for press feedback.
34
+ - **Disabled states**: `opacity-50 cursor-not-allowed pointer-events-none`.
35
+ - **Loading buttons**: disable button and show spinner during async actions — prevent double submission.
36
+ - **Error feedback**: show clear error message near the problem — never silent failures.
37
+ - **Success feedback**: always confirm completed actions with toast or visual change.
38
+ - **Confirmation dialogs**: require confirmation before any destructive/irreversible action.
39
+
40
+ ## Priority 3 — Layout & Responsive (HIGH)
41
+
42
+ - **Mobile first**: base styles for mobile, `md:` and `lg:` for larger screens.
43
+ - **Viewport**: always set `<meta name="viewport" content="width=device-width, initial-scale=1">`.
44
+ - **No horizontal scroll**: ensure all content fits viewport — `max-w-full overflow-x-hidden`.
45
+ - **Viewport units**: use `min-h-dvh` not `h-screen` — mobile browser chrome breaks `100vh`.
46
+ - **Container width**: limit text to 65-75 characters per line — `max-w-prose`.
47
+ - **Content jumping**: reserve space for async content — use `aspect-ratio` or fixed dimensions.
48
+ - **Z-index scale**: use a fixed scale (10, 20, 30, 50) — never `z-[9999]`.
49
+ - **Fixed elements**: account for safe areas, never stack multiple fixed elements carelessly.
50
+ - **Breakpoint testing**: always test at 375px, 768px, 1024px, 1440px.
51
+ - **Image scaling**: `max-w-full h-auto` on all images.
52
+ - **Table handling**: wrap tables in `overflow-x-auto` for mobile.
53
+
54
+ ## Priority 4 — Typography (MEDIUM)
55
+
56
+ - **Body font size**: minimum 16px (`text-base`) on mobile — never `text-xs` for body.
57
+ - **Line height**: 1.5–1.75 for body text — `leading-relaxed`.
58
+ - **Line length**: 65-75 characters max — `max-w-prose` or `max-w-3xl`.
59
+ - **Heading hierarchy**: clear size/weight difference from body text.
60
+ - **Font loading**: use `font-display: swap` with similar fallback to prevent layout shift.
61
+ - **Numeric data**: use `tabular-nums` for aligned numbers in tables and dashboards.
62
+ - **Text wrapping**: use `text-balance` for headings, `text-pretty` for paragraphs.
63
+ - **Truncation**: `truncate` or `line-clamp-2` with expand option for long content.
64
+
65
+ ### Recommended Font Pairings
66
+
67
+ | Style | Heading | Body | Best For |
68
+ |-------|---------|------|----------|
69
+ | Modern Professional | Poppins | Open Sans | SaaS, corporate, startups |
70
+ | Tech Startup | Space Grotesk | DM Sans | Tech, developer tools, AI |
71
+ | Minimal Swiss | Inter | Inter | Dashboards, admin panels, docs |
72
+ | Friendly SaaS | Plus Jakarta Sans | Plus Jakarta Sans | Web apps, productivity tools |
73
+ | Classic Elegant | Playfair Display | Inter | Luxury, fashion, editorial |
74
+ | Bold Statement | Bebas Neue | Source Sans 3 | Marketing, portfolios, agencies |
75
+ | Developer Mono | JetBrains Mono | IBM Plex Sans | Dev tools, documentation, CLI |
76
+ | Playful Creative | Fredoka | Nunito | Children's apps, gaming, education |
77
+ | Corporate Trust | Lexend | Source Sans 3 | Enterprise, government, healthcare |
78
+
79
+ ## Priority 5 — Color Palettes by Product Type (MEDIUM)
80
+
81
+ | Product | Primary | CTA | Background | Text |
82
+ |---------|---------|-----|------------|------|
83
+ | SaaS (General) | `#2563EB` blue | `#F97316` orange | `#F8FAFC` | `#1E293B` |
84
+ | Micro SaaS | `#6366F1` indigo | `#10B981` emerald | `#F5F3FF` | `#1E1B4B` |
85
+ | E-commerce | `#059669` green | `#F97316` orange | `#ECFDF5` | `#064E3B` |
86
+ | E-commerce Luxury | `#1C1917` black | `#CA8A04` gold | `#FAFAF9` | `#0C0A09` |
87
+ | Landing Page | `#0EA5E9` sky | `#F97316` orange | `#F0F9FF` | `#0C4A6E` |
88
+ | Financial Dashboard | `#0F172A` navy | `#22C55E` green | `#020617` | `#F8FAFC` |
89
+ | Healthcare | `#0891B2` cyan | `#059669` green | `#ECFEFF` | `#164E63` |
90
+ | Education | `#4F46E5` indigo | `#F97316` orange | `#EEF2FF` | `#1E1B4B` |
91
+ | Creative Agency | `#EC4899` pink | `#06B6D4` cyan | `#FDF2F8` | `#831843` |
92
+ | Portfolio | `#18181B` zinc | `#2563EB` blue | `#FAFAFA` | `#09090B` |
93
+ | AI / Chatbot | `#7C3AED` purple | `#06B6D4` cyan | `#FAF5FF` | `#1E1B4B` |
94
+ | Productivity | `#0D9488` teal | `#F97316` orange | `#F0FDFA` | `#134E4A` |
95
+
96
+ > Use these as starting points. Always map to your design system's semantic tokens (`bg-primary`, `text-foreground`, etc.) rather than hardcoding hex values.
97
+
98
+ ## Priority 6 — Animation (MEDIUM)
99
+
100
+ - **Only when needed**: never add animation unless explicitly requested.
101
+ - **Timing**: 150-300ms for micro-interactions — never exceed 500ms for UI.
102
+ - **Performance**: animate only `transform` and `opacity` — never `width`, `height`, `top`, `left`, `margin`, `padding`.
103
+ - **Easing**: `ease-out` for entering, `ease-in` for exiting — never `linear` for UI.
104
+ - **Continuous animation**: only for loading indicators — never for decorative elements.
105
+ - **Reduced motion**: always check `prefers-reduced-motion` and disable non-essential animation.
106
+ - **Maximum scope**: animate 1-2 key elements per view — never everything.
107
+ - **No layout shift**: hover states must not cause layout shift — use `transform` not size changes.
108
+
109
+ ## Priority 7 — Forms (MEDIUM)
110
+
111
+ - **Labels**: always visible above or beside input — never placeholder-only.
112
+ - **Error placement**: show error directly below the related input, not at form top.
113
+ - **Inline validation**: validate on blur for most fields, not only on submit.
114
+ - **Input types**: use `email`, `tel`, `number`, `url` — not `text` for everything.
115
+ - **Autofill**: use `autocomplete` attribute properly — never `autocomplete="off"` everywhere.
116
+ - **Required fields**: mark clearly with asterisk `*` or "(required)" text.
117
+ - **Password visibility**: always provide a show/hide toggle.
118
+ - **Mobile keyboards**: use `inputmode="numeric"` for number-only inputs.
119
+ - **Submit feedback**: show loading state → success/error — never no feedback.
120
+
121
+ ## Priority 8 — Feedback & Empty States (LOW-MEDIUM)
122
+
123
+ - **Loading indicators**: show spinner/skeleton for operations > 300ms — never frozen UI.
124
+ - **Empty states**: show helpful message + one clear action — never blank screen.
125
+ - **Error recovery**: provide clear next steps — "Try again" button + help link.
126
+ - **Progress indicators**: show "Step 2 of 4" for multi-step processes.
127
+ - **Toast notifications**: auto-dismiss after 3-5 seconds — never persistent.
128
+ - **Truncation**: handle long content gracefully with `line-clamp` + expand.
129
+ - **No results**: show suggestions when search yields nothing — never just "0 results".
130
+
131
+ ## Pre-Delivery Checklist
132
+
133
+ ### Visual Quality
134
+ - [ ] No emoji icons — use Lucide, Heroicons, or SF Symbols (SVG)
135
+ - [ ] Consistent icon set throughout the interface
136
+ - [ ] Hover states without layout shift
137
+ - [ ] Semantic color tokens used (not hardcoded hex)
138
+ - [ ] No purple/multicolor gradients unless explicitly requested
139
+ - [ ] No glow effects as primary affordances
140
+ - [ ] Empty states have one clear next action
141
+
142
+ ### Interaction
143
+ - [ ] All clickable elements have `cursor-pointer`
144
+ - [ ] Clear visual hover feedback on interactive elements
145
+ - [ ] Smooth transitions (150-300ms)
146
+ - [ ] Visible keyboard focus states
147
+ - [ ] Destructive actions require `AlertDialog` confirmation
148
+ - [ ] Loading buttons disabled during async actions
149
+
150
+ ### Light/Dark Mode
151
+ - [ ] Light text contrast: 4.5:1 minimum
152
+ - [ ] Borders visible in both modes
153
+ - [ ] Test both themes before delivery
154
+
155
+ ### Layout
156
+ - [ ] No content hidden behind fixed navbars
157
+ - [ ] Responsive: 375px, 768px, 1024px, 1440px
158
+ - [ ] No horizontal scroll on mobile
159
+ - [ ] `min-h-dvh` used instead of `h-screen`
160
+ - [ ] `safe-area-inset` respected for fixed elements
161
+
162
+ ### Accessibility
163
+ - [ ] All images have alt text
164
+ - [ ] All form inputs have labels
165
+ - [ ] Color is not the sole indicator of state
166
+ - [ ] `prefers-reduced-motion` respected
167
+ - [ ] Icon-only buttons have `aria-label`
168
+ - [ ] Skip link present on nav-heavy pages
169
+
170
+ ### Performance
171
+ - [ ] Images optimized (WebP/AVIF, `srcset`, lazy loading)
172
+ - [ ] No `will-change` outside active animations
173
+ - [ ] No large `blur()` or `backdrop-filter` surfaces animated
174
+ - [ ] No `useEffect` for what can be render logic
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@folpe/loom",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "description": "CLI to scaffold Claude Code projects with curated agents, skills, and presets",
5
5
  "type": "module",
6
6
  "license": "MIT",