vibes-plug 1.0.0 → 2.5.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.
- package/.github/workflows/publish.yml +20 -0
- package/AGENTS.md +66 -0
- package/BLUEPRINT.md +152 -60
- package/CHANGELOG.md +50 -0
- package/README.md +346 -194
- package/package.json +25 -25
- package/plugin.json +1 -1
- package/skills/ai-cost-token-optimizer/SKILL.md +52 -0
- package/skills/ai-llm-integration-expert/SKILL.md +180 -162
- package/skills/api-design-expert/SKILL.md +314 -310
- package/skills/app-analyzer-optimizer/SKILL.md +193 -189
- package/skills/apple-ecosystem-expert/SKILL.md +142 -0
- package/skills/async-queue-temporal-expert/SKILL.md +54 -0
- package/skills/authentication-identity-expert/SKILL.md +251 -20
- package/skills/auto-doc-updater/SKILL.md +214 -204
- package/skills/autonomous-chaos-monkey/SKILL.md +63 -0
- package/skills/autonomous-red-teamer/SKILL.md +59 -0
- package/skills/autonomous-swarm-director/SKILL.md +69 -0
- package/skills/autonomous-tdd-debugger/SKILL.md +65 -0
- package/skills/bootstrap-to-modern/SKILL.md +90 -86
- package/skills/brainstorming/SKILL.md +373 -353
- package/skills/browser-automation-expert/SKILL.md +46 -0
- package/skills/ci-cd-devops-architect/SKILL.md +72 -45
- package/skills/cloud-hosting-expert/SKILL.md +244 -244
- package/skills/coderabbit/SKILL.md +192 -192
- package/skills/cron-scheduler-expert/SKILL.md +298 -0
- package/skills/data-telemetry-expert/SKILL.md +213 -213
- package/skills/database-orm-expert/SKILL.md +294 -294
- package/skills/dependency-upgrade-migrator/SKILL.md +295 -0
- package/skills/design-system-architect/SKILL.md +27 -10
- package/skills/doku-mcp-server/SKILL.md +251 -0
- package/skills/doku-payment-gateway/SKILL.md +227 -0
- package/skills/e2e-testing-expert/SKILL.md +315 -315
- package/skills/edge-serverless-db-expert/SKILL.md +43 -0
- package/skills/email-notification-expert/SKILL.md +362 -0
- package/skills/error-resilience-expert/SKILL.md +480 -0
- package/skills/event-driven-architect/SKILL.md +81 -81
- package/skills/feature-flag-analytics-expert/SKILL.md +46 -0
- package/skills/file-upload-media-expert/SKILL.md +431 -0
- package/skills/form-validation-expert/SKILL.md +401 -0
- package/skills/fullstack-expert/SKILL.md +202 -202
- package/skills/fullstack-expert/references/api_design_guide.md +466 -466
- package/skills/fullstack-expert/references/multi_language_backend.md +528 -528
- package/skills/fullstack-expert/scripts/api_contract_validator.py +253 -253
- package/skills/fullstack-expert/scripts/architecture_analyzer.py +326 -326
- package/skills/gemini-agent-booster/SKILL.md +135 -135
- package/skills/global-a11y-i18n-expert/SKILL.md +81 -81
- package/skills/glsl-shader-expert/SKILL.md +101 -0
- package/skills/go-programming-expert/SKILL.md +295 -295
- package/skills/graphql-apollo-expert/SKILL.md +108 -0
- package/skills/hig/SKILL.md +188 -188
- package/skills/hyper-context-synthesizer/SKILL.md +55 -0
- package/skills/js-backend-expert/SKILL.md +34 -9
- package/skills/legacy-code-translator/SKILL.md +65 -0
- package/skills/llm-cost-arbitrage-router/SKILL.md +59 -0
- package/skills/logging-error-tracking-expert/SKILL.md +338 -0
- package/skills/mcp-client-orchestrator/SKILL.md +70 -0
- package/skills/mcp-server-architect/SKILL.md +194 -194
- package/skills/micro-frontend-architect/SKILL.md +106 -0
- package/skills/mobile-expo-expert/SKILL.md +186 -186
- package/skills/mobile-push-notification-expert/SKILL.md +51 -0
- package/skills/monday-design-aesthetic/SKILL.md +67 -67
- package/skills/monorepo-architect/SKILL.md +227 -227
- package/skills/mpa-orchestrator/SKILL.md +101 -101
- package/skills/multi-agent-orchestration/SKILL.md +234 -234
- package/skills/multiple-entry-points/SKILL.md +55 -55
- package/skills/mvc-expert/SKILL.md +231 -231
- package/skills/payment-gateway-expert/SKILL.md +45 -45
- package/skills/performance-web-vitals/SKILL.md +332 -332
- package/skills/post-quantum-crypto-migrator/SKILL.md +57 -0
- package/skills/prd-architect/SKILL.md +201 -191
- package/skills/proactive-background-watcher/SKILL.md +62 -0
- package/skills/production-ready-hardener/PRODUCTION_READINESS_REPORT.md +67 -0
- package/skills/production-ready-hardener/SKILL.md +173 -186
- package/skills/production-ready-hardener/references/production_checklist.md +161 -161
- package/skills/production-ready-hardener/scripts/production_readiness_scanner.py +881 -875
- package/skills/project-context-mapper/SKILL.md +79 -0
- package/skills/python-programming-expert/SKILL.md +263 -132
- package/skills/rate-limit-abuse-prevention/SKILL.md +371 -0
- package/skills/realtime-collaboration-expert/SKILL.md +45 -45
- package/skills/rust-programming-expert/SKILL.md +235 -235
- package/skills/saas-billing/SKILL.md +377 -377
- package/skills/saas-multi-tenant/SKILL.md +251 -237
- package/skills/saas-mvp-launcher/SKILL.md +10 -0
- package/skills/saas-transformer/SKILL.md +187 -144
- package/skills/saas-transformer/references/billing_integration_guide.md +401 -401
- package/skills/saas-transformer/references/feature_gating_patterns.md +137 -137
- package/skills/saas-transformer/references/saas_transformation_checklist.md +121 -121
- package/skills/saas-transformer/scripts/saas_transformation_scanner.py +39 -29
- package/skills/scalability-clean-code/SKILL.md +229 -229
- package/skills/self-evolving-memory-graph/SKILL.md +75 -0
- package/skills/self-healing-cloud-orchestrator/SKILL.md +57 -0
- package/skills/senior-frontend/SKILL.md +161 -161
- package/skills/senior-fullstack/SKILL.md +167 -167
- package/skills/seo/SKILL.md +235 -225
- package/skills/seo-geo/SKILL.md +188 -188
- package/skills/session-context-loader/SKILL.md +77 -0
- package/skills/session-handoff-resume/SKILL.md +158 -158
- package/skills/skill_baru/SKILL.md +172 -147
- package/skills/spa-orchestrator/SKILL.md +288 -288
- package/skills/state-management-expert/SKILL.md +272 -272
- package/skills/supabase-security-expert/SKILL.md +243 -243
- package/skills/tailwind-expert/SKILL.md +188 -188
- package/skills/tanstack-query-expert/SKILL.md +199 -199
- package/skills/token-saver/SKILL.md +119 -111
- package/skills/typescript-expert/SKILL.md +324 -279
- package/skills/ui-components-expert/SKILL.md +263 -46
- package/skills/ui-ux-pro-max/SKILL.md +202 -201
- package/skills/ui-ux-pro-max/scripts/__pycache__/core.cpython-310.pyc +0 -0
- package/skills/ui-ux-pro-max/scripts/__pycache__/design_system.cpython-310.pyc +0 -0
- package/skills/ui_ux_expert/SKILL.md +17 -6
- package/skills/vector-db-rag-expert/SKILL.md +52 -0
- package/skills/vibe-code-gardener/SKILL.md +181 -173
- package/skills/visual-qa-vision-agent/SKILL.md +65 -0
- package/skills/vue-frontend-expert/SKILL.md +126 -0
- package/skills/web-3d-graphics-expert/SKILL.md +131 -0
- package/skills/web-game-engine-expert/SKILL.md +96 -0
- package/skills/web-scraper/SKILL.md +207 -205
- package/skills/website-design-cloner/SKILL.md +174 -0
- package/skills/webxr-ar-vr-expert/SKILL.md +117 -0
- package/skills/zero-to-prod-orchestrator/SKILL.md +206 -180
- package/skills/zero-trust-secret-vault/SKILL.md +40 -0
- package/vibes-swarm-demo.gif +0 -0
|
@@ -1,63 +1,280 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: ui-components-expert
|
|
3
|
-
description: Expert guide for
|
|
3
|
+
description: "Expert guide for building production-quality UI components following the 4 pillars: Input Controls, Navigation, Information, and Containers. Covers React 19, Radix UI, shadcn/ui, accessibility (WCAG 2.2), and modern interaction patterns / Panduan ahli membangun komponen UI berkualitas produksi dengan 4 pilar: Kontrol Input, Navigasi, Informasi, dan Kontainer."
|
|
4
|
+
author: "Roedy Rustam"
|
|
4
5
|
---
|
|
5
6
|
|
|
6
|
-
# 🎨 UI Components
|
|
7
|
+
# 🎨 UI Components Expert (2026 Edition)
|
|
7
8
|
|
|
8
|
-
|
|
9
|
+
[English](#english) | [Bahasa Indonesia](#bahasa-indonesia)
|
|
9
10
|
|
|
10
|
-
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
<a name="english"></a>
|
|
14
|
+
## English
|
|
15
|
+
|
|
16
|
+
### Description
|
|
17
|
+
Expert guide for evaluating, auditing, and building production-quality UI components in 2026. Covers the **4 pillars of UI components** with modern tooling: **shadcn/ui**, **Radix UI**, **Base UI**, **React 19 patterns**, **WCAG 2.2 accessibility**, and micro-interaction design. Use this skill when building, reviewing, or improving any interactive UI element.
|
|
18
|
+
|
|
19
|
+
### Trigger Conditions
|
|
20
|
+
- Building or reviewing UI components: buttons, forms, modals, navigation, tooltips, notifications.
|
|
21
|
+
- Implementing accessible components with ARIA patterns and keyboard navigation.
|
|
22
|
+
- Auditing existing components against WCAG 2.2 and interaction design standards.
|
|
23
|
+
- Setting up a component library with **shadcn/ui**, **Radix UI**, or **Base UI**.
|
|
24
|
+
- Adding micro-interactions, hover states, focus rings, and animation to components.
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
### Component Stack Recommendation (2026)
|
|
29
|
+
|
|
30
|
+
| Layer | Tool | Purpose |
|
|
31
|
+
|---|---|---|
|
|
32
|
+
| **Headless Primitives** | Radix UI / Base UI (MUI) | Accessibility, behavior, no styles |
|
|
33
|
+
| **Component Library** | shadcn/ui (copy-paste) | Pre-styled, customizable, owns the code |
|
|
34
|
+
| **Styling** | Tailwind CSS v4 | Utility-first, design tokens via `@theme` |
|
|
35
|
+
| **Animation** | Motion (Framer Motion v12) | Spring physics, layout animations |
|
|
36
|
+
| **Icons** | Lucide React | Consistent, tree-shakeable icon set |
|
|
37
|
+
| **Forms** | React Hook Form + Zod | Type-safe, performant form state |
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
### The 4 Pillars of UI Components
|
|
42
|
+
|
|
43
|
+
#### Pillar 1: Input Controls
|
|
44
|
+
Components that capture user intent and data.
|
|
45
|
+
*Examples: Buttons, Checkboxes, Radio Groups, Text Fields, Selects, Switches, Sliders, Date Pickers*
|
|
46
|
+
|
|
47
|
+
**Best Practices:**
|
|
48
|
+
- **Clear Visual States**: Every input must have distinct `default`, `hover`, `active`, `focus`, `disabled`, and `error` states.
|
|
49
|
+
- **Touch Target Sizes**: Minimum 44×44px (WCAG 2.5.8) for all interactive elements on mobile.
|
|
50
|
+
- **Immediate Feedback**: Provide visual/haptic feedback on interaction — ripple, color change, or animation.
|
|
51
|
+
- **Inline Validation**: Show error messages immediately after blur, not only on submit. Use `aria-invalid` and `aria-describedby` for screen readers.
|
|
52
|
+
- **React Hook Form + Zod Pattern**:
|
|
53
|
+
```tsx
|
|
54
|
+
import { useForm } from 'react-hook-form';
|
|
55
|
+
import { zodResolver } from '@hookform/resolvers/zod';
|
|
56
|
+
import { z } from 'zod';
|
|
57
|
+
|
|
58
|
+
const schema = z.object({
|
|
59
|
+
email: z.string().email('Invalid email address'),
|
|
60
|
+
name: z.string().min(2, 'Name must be at least 2 characters'),
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
export function UserForm() {
|
|
64
|
+
const { register, handleSubmit, formState: { errors, isSubmitting } } = useForm({
|
|
65
|
+
resolver: zodResolver(schema),
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
return (
|
|
69
|
+
<form onSubmit={handleSubmit(onSubmit)}>
|
|
70
|
+
<div>
|
|
71
|
+
<input
|
|
72
|
+
{...register('email')}
|
|
73
|
+
aria-invalid={!!errors.email}
|
|
74
|
+
aria-describedby={errors.email ? 'email-error' : undefined}
|
|
75
|
+
className="..."
|
|
76
|
+
/>
|
|
77
|
+
{errors.email && (
|
|
78
|
+
<p id="email-error" role="alert" className="text-destructive text-sm">
|
|
79
|
+
{errors.email.message}
|
|
80
|
+
</p>
|
|
81
|
+
)}
|
|
82
|
+
</div>
|
|
83
|
+
<button type="submit" disabled={isSubmitting}>
|
|
84
|
+
{isSubmitting ? 'Saving...' : 'Save'}
|
|
85
|
+
</button>
|
|
86
|
+
</form>
|
|
87
|
+
);
|
|
88
|
+
}
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
---
|
|
92
|
+
|
|
93
|
+
#### Pillar 2: Navigation
|
|
94
|
+
Components that help users move through the application structure.
|
|
95
|
+
*Examples: Navbars, Tabs, Breadcrumbs, Pagination, Sidebars, Dropdowns, Command Palettes*
|
|
96
|
+
|
|
97
|
+
**Best Practices:**
|
|
98
|
+
- **Active State Clarity**: Always indicate the current location with a high-contrast visual indicator (filled background, underline, bold text). Never use color alone.
|
|
99
|
+
- **Keyboard Navigation**: Tabs must support Arrow Keys; menus must support `Escape` to close; focus must be managed on open/close.
|
|
100
|
+
- **Responsive Patterns**: Use bottom navigation on mobile (<768px), collapsible sidebar on tablet, full sidebar on desktop.
|
|
101
|
+
- **Command Palette (2026 Standard)**: Add `⌘K` / `Ctrl+K` command palette for power users using `cmdk` library.
|
|
102
|
+
- **`<Link>` with View Transitions** (Next.js 15):
|
|
103
|
+
```tsx
|
|
104
|
+
import Link from 'next/link';
|
|
105
|
+
|
|
106
|
+
// Enables smooth page transitions
|
|
107
|
+
<Link href="/dashboard" viewTransition>
|
|
108
|
+
Dashboard
|
|
109
|
+
</Link>
|
|
110
|
+
```
|
|
111
|
+
- **ARIA Roles**: Use `role="navigation"` with `aria-label` on `<nav>`. Mark current page with `aria-current="page"`.
|
|
112
|
+
|
|
113
|
+
---
|
|
114
|
+
|
|
115
|
+
#### Pillar 3: Information & Feedback
|
|
116
|
+
Components that display status, guidance, or alerts to users.
|
|
117
|
+
*Examples: Toast Notifications, Tooltips, Badges, Alert Banners, Progress Bars, Skeletons, Empty States*
|
|
118
|
+
|
|
119
|
+
**Best Practices:**
|
|
120
|
+
- **Contextual Color System**: Use semantic colors consistently — green (success), red (error/destructive), yellow (warning), blue (info).
|
|
121
|
+
- **Toast Notifications**: Use **Sonner** (lightweight, accessible) — limit to 3 concurrent toasts, auto-dismiss success in 4s, keep errors until dismissed.
|
|
122
|
+
- **Skeleton Loading**: Prefer skeletons over spinners for content areas — they reduce perceived load time and prevent layout shift (CLS).
|
|
123
|
+
```tsx
|
|
124
|
+
// Sonner toast
|
|
125
|
+
import { toast } from 'sonner';
|
|
126
|
+
|
|
127
|
+
toast.success('Profile updated!');
|
|
128
|
+
toast.error('Something went wrong', { description: 'Please try again.' });
|
|
129
|
+
toast.promise(saveProfile(), {
|
|
130
|
+
loading: 'Saving...',
|
|
131
|
+
success: 'Saved!',
|
|
132
|
+
error: 'Failed to save',
|
|
133
|
+
});
|
|
134
|
+
```
|
|
135
|
+
- **Empty States**: Never show blank areas — provide illustration, explanation, and a clear CTA.
|
|
136
|
+
- **`aria-live` for Dynamic Content**: Use `aria-live="polite"` for non-urgent updates, `aria-live="assertive"` for critical errors.
|
|
137
|
+
|
|
138
|
+
---
|
|
139
|
+
|
|
140
|
+
#### Pillar 4: Containers & Layout
|
|
141
|
+
Components that group related content into structured visual units.
|
|
142
|
+
*Examples: Cards, Modals (Dialogs), Sheets (Drawers), Accordions, Tabs, Carousels, Popover*
|
|
143
|
+
|
|
144
|
+
**Best Practices:**
|
|
145
|
+
- **Modal/Dialog (Radix UI)**:
|
|
146
|
+
```tsx
|
|
147
|
+
import * as Dialog from '@radix-ui/react-dialog';
|
|
148
|
+
|
|
149
|
+
export function ConfirmDialog({ onConfirm }: { onConfirm: () => void }) {
|
|
150
|
+
return (
|
|
151
|
+
<Dialog.Root>
|
|
152
|
+
<Dialog.Trigger asChild>
|
|
153
|
+
<button>Delete Account</button>
|
|
154
|
+
</Dialog.Trigger>
|
|
155
|
+
<Dialog.Portal>
|
|
156
|
+
<Dialog.Overlay className="fixed inset-0 bg-black/50 backdrop-blur-sm animate-in fade-in" />
|
|
157
|
+
<Dialog.Content
|
|
158
|
+
className="fixed left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 bg-background rounded-xl shadow-2xl p-6 w-[400px] animate-in fade-in zoom-in-95"
|
|
159
|
+
aria-describedby="dialog-description"
|
|
160
|
+
>
|
|
161
|
+
<Dialog.Title className="text-lg font-semibold">Are you sure?</Dialog.Title>
|
|
162
|
+
<Dialog.Description id="dialog-description" className="text-muted-foreground mt-2">
|
|
163
|
+
This action cannot be undone.
|
|
164
|
+
</Dialog.Description>
|
|
165
|
+
<div className="flex gap-3 mt-6 justify-end">
|
|
166
|
+
<Dialog.Close asChild>
|
|
167
|
+
<button className="btn-secondary">Cancel</button>
|
|
168
|
+
</Dialog.Close>
|
|
169
|
+
<button onClick={onConfirm} className="btn-destructive">Delete</button>
|
|
170
|
+
</div>
|
|
171
|
+
</Dialog.Content>
|
|
172
|
+
</Dialog.Portal>
|
|
173
|
+
</Dialog.Root>
|
|
174
|
+
);
|
|
175
|
+
}
|
|
176
|
+
```
|
|
177
|
+
- **Focus Trap**: Radix UI handles focus trapping automatically inside dialogs.
|
|
178
|
+
- **Scroll Lock**: Lock body scroll when modal is open — Radix handles this.
|
|
179
|
+
- **Card Design**: Use subtle shadows + borders for elevation. Never use heavy drop shadows on cards in light mode.
|
|
180
|
+
- **Sheet/Drawer**: Use for mobile-first secondary actions. Prefer bottom sheet on mobile, side sheet on desktop.
|
|
181
|
+
|
|
182
|
+
---
|
|
183
|
+
|
|
184
|
+
### Micro-Interaction Checklist (Next-Gen)
|
|
185
|
+
These small details separate premium from basic UI:
|
|
186
|
+
- [ ] All interactive elements have `:focus-visible` ring (2px, brand color).
|
|
187
|
+
- [ ] Buttons have loading state with spinner + disabled state.
|
|
188
|
+
- [ ] Form fields animate error shake on invalid submit.
|
|
189
|
+
- [ ] **Physics-Based Animation**: Do not rely solely on linear `ease-in-out`. Use Framer Motion (v12) `spring` physics (`stiffness: 300, damping: 20`) for modals, popovers, and interactive elements to provide a natural, snappy feel.
|
|
190
|
+
- [ ] Hover transitions on simple buttons use `transition-all duration-200 ease-out`.
|
|
191
|
+
- [ ] Modals animate in with fade + scale: `animate-in fade-in zoom-in-95`.
|
|
192
|
+
- [ ] List items stagger-animate when rendered (use Motion `stagger`).
|
|
193
|
+
- [ ] Skeleton loaders match the exact layout of the content they replace.
|
|
194
|
+
- [ ] Dark mode tested for all states (especially error/warning colors).
|
|
195
|
+
|
|
196
|
+
### Accessibility (WCAG 2.2) Quick Reference
|
|
197
|
+
| Criterion | Requirement |
|
|
198
|
+
|---|---|
|
|
199
|
+
| **1.4.3** | Text contrast ≥4.5:1 (normal), ≥3:1 (large/bold) |
|
|
200
|
+
| **2.5.8** | Touch target ≥24×24px (min), 44×44px (recommended) |
|
|
201
|
+
| **2.4.7** | Focus indicator visible on all interactive elements |
|
|
202
|
+
| **2.4.11** | Focus not obscured by sticky headers |
|
|
203
|
+
| **3.2.2** | No unexpected context change on input |
|
|
204
|
+
|
|
205
|
+
---
|
|
206
|
+
|
|
207
|
+
<a name="bahasa-indonesia"></a>
|
|
208
|
+
## Bahasa Indonesia
|
|
209
|
+
|
|
210
|
+
### Deskripsi
|
|
211
|
+
Panduan ahli untuk mengevaluasi, mengaudit, dan membangun komponen UI berkualitas produksi di 2026. Mencakup **4 pilar komponen UI** dengan tooling modern: **shadcn/ui**, **Radix UI**, **Base UI**, **pola React 19**, **aksesibilitas WCAG 2.2**, dan desain micro-interaction. Gunakan skill ini saat membangun, me-review, atau meningkatkan elemen UI interaktif apapun.
|
|
212
|
+
|
|
213
|
+
### Kondisi Pemicu
|
|
214
|
+
- Membangun atau me-review komponen UI: tombol, form, modal, navigasi, tooltip, notifikasi.
|
|
215
|
+
- Mengimplementasikan komponen aksesibel dengan pola ARIA dan navigasi keyboard.
|
|
216
|
+
- Mengaudit komponen yang ada terhadap standar WCAG 2.2 dan desain interaksi.
|
|
217
|
+
- Menyiapkan library komponen dengan shadcn/ui, Radix UI, atau Base UI.
|
|
218
|
+
- Menambahkan micro-interaction, hover state, focus ring, dan animasi ke komponen.
|
|
219
|
+
|
|
220
|
+
### QA Visual Mandatori (KRITIS)
|
|
221
|
+
- **Siklus Verifikasi Visual**: Anda DILARANG KERAS menyelesaikan komponen UI tanpa mengambil screenshot menggunakan `browser_subagent` dan menganalisisnya via `visual-qa-vision-agent`.
|
|
222
|
+
- **Standar Pixel-Perfect**: Jangan menebak padding/margin. Ambil gambar, analisis dengan kemampuan Vision Anda, dan koreksi pergeseran tata letak hingga sempurna.
|
|
11
223
|
|
|
12
|
-
###
|
|
13
|
-
|
|
14
|
-
|
|
224
|
+
### Stack Komponen Rekomendasi (2026)
|
|
225
|
+
- **Headless Primitives**: Radix UI / Base UI — aksesibilitas dan behavior tanpa style.
|
|
226
|
+
- **Library Komponen**: shadcn/ui — pre-styled, customizable, kode dimiliki sendiri.
|
|
227
|
+
- **Styling**: Tailwind CSS v4 — utility-first dengan design token via `@theme`.
|
|
228
|
+
- **Animasi**: Motion (Framer Motion v12) — spring physics, layout animations.
|
|
229
|
+
- **Form**: React Hook Form + Zod — type-safe, performa tinggi.
|
|
15
230
|
|
|
16
|
-
|
|
17
|
-
- **State Visual yang Jelas:** Pastikan ada perbedaan visual yang jelas untuk state `Default`, `Hover`, `Active/Pressed`, `Focus` (untuk aksesibilitas keyboard), dan `Disabled`.
|
|
18
|
-
- **Ukuran Target Sentuh (Touch Target):** Minimal 44x44 pixel (berdasarkan standar HIG/Material) untuk kenyamanan pengguna mobile.
|
|
19
|
-
- **Feedback Langsung:** Berikan umpan balik instan saat input berinteraksi (misalnya riak/ripple effect, perubahan warna, animasi transisi).
|
|
20
|
-
- **Validasi & Error Handling:** Tampilkan pesan error yang spesifik dan inline pada form input, gunakan warna merah dan ikon peringatan, jangan hanya mengandalkan warna.
|
|
21
|
-
- **Aksesibilitas (a11y):** Gunakan tag label yang terhubung ke input (misal `htmlFor`), sertakan atribut `aria-invalid` jika ada error.
|
|
231
|
+
### 4 Pilar Komponen UI
|
|
22
232
|
|
|
23
|
-
|
|
24
|
-
Komponen yang
|
|
25
|
-
*Contoh: Menus, Tabs, Breadcrumbs, Pagination, Sidebars, Bottom Navigation.*
|
|
233
|
+
#### Pilar 1: Kontrol Input
|
|
234
|
+
Komponen yang menangkap input dan data pengguna (tombol, form, checkbox, select, switch).
|
|
26
235
|
|
|
27
|
-
|
|
28
|
-
-
|
|
29
|
-
-
|
|
30
|
-
-
|
|
31
|
-
-
|
|
236
|
+
**Best Practices:**
|
|
237
|
+
- Setiap input harus memiliki state visual yang jelas: `default`, `hover`, `active`, `focus`, `disabled`, `error`.
|
|
238
|
+
- Ukuran touch target minimal 44×44px untuk elemen interaktif di mobile.
|
|
239
|
+
- Validasi inline dengan pesan error yang muncul setelah blur, bukan hanya saat submit.
|
|
240
|
+
- Gunakan `aria-invalid` dan `aria-describedby` untuk screen reader.
|
|
241
|
+
- Gunakan **React Hook Form + Zod** untuk form yang type-safe dan berperforma tinggi.
|
|
32
242
|
|
|
33
|
-
|
|
34
|
-
Komponen yang
|
|
35
|
-
*Contoh: Notifications (Toasts), Tooltips, Badges, Alerts, Progress Bars, Spinners.*
|
|
243
|
+
#### Pilar 2: Navigasi
|
|
244
|
+
Komponen yang membantu pengguna bergerak dalam struktur aplikasi (navbar, tab, breadcrumb, sidebar, command palette).
|
|
36
245
|
|
|
37
|
-
|
|
38
|
-
-
|
|
39
|
-
-
|
|
40
|
-
-
|
|
41
|
-
-
|
|
246
|
+
**Best Practices:**
|
|
247
|
+
- Selalu tunjukkan lokasi saat ini dengan indikator visual yang jelas (background, garis bawah, teks tebal).
|
|
248
|
+
- Navigasi keyboard wajib: Arrow Keys untuk tab/menu, Escape untuk menutup, fokus terkelola saat buka/tutup.
|
|
249
|
+
- Gunakan bottom navigation di mobile, sidebar di desktop.
|
|
250
|
+
- Tambahkan command palette `⌘K` untuk power user menggunakan library `cmdk`.
|
|
251
|
+
- Tandai halaman aktif dengan `aria-current="page"`.
|
|
42
252
|
|
|
43
|
-
|
|
44
|
-
Komponen yang
|
|
45
|
-
*Contoh: Cards, Modals (Dialogs), Accordions, Drawers/Bottom Sheets, Carousels.*
|
|
253
|
+
#### Pilar 3: Informasi & Feedback
|
|
254
|
+
Komponen yang menampilkan status, panduan, atau peringatan (toast, tooltip, badge, skeleton, empty state).
|
|
46
255
|
|
|
47
|
-
|
|
48
|
-
-
|
|
49
|
-
- **
|
|
50
|
-
-
|
|
51
|
-
-
|
|
256
|
+
**Best Practices:**
|
|
257
|
+
- Warna semantik yang konsisten: hijau (sukses), merah (error), kuning (peringatan), biru (info).
|
|
258
|
+
- Gunakan **Sonner** untuk toast notifikasi — ringan dan aksesibel.
|
|
259
|
+
- Gunakan skeleton loader (bukan spinner) untuk area konten guna mengurangi perceived load time.
|
|
260
|
+
- Selalu sediakan empty state dengan ilustrasi, penjelasan, dan CTA yang jelas.
|
|
261
|
+
- Gunakan `aria-live="polite"` untuk pembaruan konten dinamis.
|
|
52
262
|
|
|
53
|
-
|
|
263
|
+
#### Pilar 4: Kontainer & Layout
|
|
264
|
+
Komponen yang mengelompokkan konten terkait (card, modal/dialog, sheet/drawer, accordion, popover).
|
|
54
265
|
|
|
55
|
-
|
|
266
|
+
**Best Practices:**
|
|
267
|
+
- Gunakan **Radix UI Dialog** untuk modal — menangani focus trap, scroll lock, dan aksesibilitas secara otomatis.
|
|
268
|
+
- Animasikan modal dengan fade + scale: `animate-in fade-in zoom-in-95`.
|
|
269
|
+
- Gunakan shadow tipis + border untuk elevasi card. Hindari drop shadow berat di mode terang.
|
|
270
|
+
- Gunakan bottom sheet di mobile, side sheet di desktop untuk aksi sekunder.
|
|
56
271
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
272
|
+
### Checklist Micro-Interaction (Next-Gen)
|
|
273
|
+
Detail kecil yang membedakan UI premium dari yang biasa:
|
|
274
|
+
- [ ] Semua elemen interaktif memiliki `:focus-visible` ring (2px, warna brand).
|
|
275
|
+
- [ ] Tombol memiliki loading state dengan spinner + disabled state.
|
|
276
|
+
- [ ] **Animasi Fisika (Spring)**: Hindari transisi linier kaku. Gunakan Framer Motion (v12) `spring` (`stiffness: 300, damping: 20`) pada interaksi klik, modal, dan dropdown agar terasa alami dan sangat responsif.
|
|
277
|
+
- [ ] Hover transition sederhana menggunakan `transition-all duration-200 ease-out`.
|
|
278
|
+
- [ ] Modal dan drawer muncul dengan animasi fade + scale yang mulus.
|
|
279
|
+
- [ ] Skeleton loader sesuai persis dengan layout konten yang digantikan.
|
|
280
|
+
- [ ] Dark mode diuji untuk semua state (terutama warna error/warning).
|