算法艺术创作
algorithmic-art
通过代码和可调参数创作生成艺术与交互式视觉效果。
web-rules【设计与创意】Strict design and UX rules for React 19 + Next.js 16 (App Router) + Tailwind CSS 4. Covers navigation, interaction design, accessibility, user feedback, UX patterns, and visual design. Use when designing, building, or reviewing any user-facing web feature on this stack. Trigger when the user asks to "build a settings page", "add a dialog", "design th…
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Comprehensive strict-rules reference for web apps built on React 19, the Next.js 16 App Router, and Tailwind CSS 4. Contains 34 rules across 6 categories. Each rule is stated as an Always/Never directive with a quantified impact, an incorrect example, and a correct example.
All guidance assumes:
'use client' at the top)app/ directory, layout.tsx, page.tsx, loading.tsx, error.tsx, not-found.tsx, parallel routes, intercepting routes'use server') — never useEffect for data fetching@theme directive, dark: variant, container queries, and the standard 4pt spacing scalecn() from clsx + tailwind-merge for conditional classesReference these rules when:
useFormState / useOptimistic| Priority | Category | Impact | Prefix |
|---|---|---|---|
| 1 | Navigation | CRITICAL | nav- |
| 2 | Interaction Design | CRITICAL | inter- |
| 3 | Accessibility | CRITICAL | acc- |
| 4 | User Feedback | HIGH | feed- |
| 5 | UX Patterns | HIGH | ux- |
| 6 | Visual Design | HIGH | vis- |
nav-primary - Use top nav (3-7 sections) or sidebar; never hamburger-only on desktopnav-app-router - Use App Router layouts, parallel routes, and <Link> for all internal navigationnav-page-actions - Place primary actions in the page header; never bury them in scrollinter-touch-targets - 44×44 px minimum touch target (WCAG 2.5.5)inter-pointer-patterns - Use standard hover/click/long-press patterns; never invent new onesinter-microinteractions - Always confirm interaction with visual feedback within 100msinter-keyboard-navigation - Every interactive element must be reachable and operable by keyboardinter-drag-drop - Provide a keyboard-accessible alternative whenever drag is offeredinter-revalidation - Use revalidatePath/revalidateTag after mutations; never rely on client refreshinter-row-actions - Use a single "row action" pattern per list (kebab menu OR hover actions OR swipe)inter-search - Debounce search input by 200-300ms and reflect query in the URLacc-labels - Every interactive element has an accessible nameacc-text-scaling - All text scales to 200% browser zoom without horizontal scrollacc-color-contrast - WCAG AA: 4.5:1 body text, 3:1 large/UIacc-reduce-motion - Respect prefers-reduced-motion: reduceacc-color-independent - Never rely on color alone to convey meaningacc-focus-management - Always render a visible focus ring; trap focus inside modalsacc-relative-units - Use rem for text and spacing; never fix text size in pxacc-responsive-layout - Every layout works at 320 px width without horizontal scrollfeed-loading-states - Always use loading.tsx or <Suspense> with a skeleton matching final layoutfeed-error-states - Every route segment has error.tsx with a Try-Again actionfeed-toasts - Use toasts only for confirmations of non-blocking actionsfeed-success-confirmation - Confirm every destructive or irreversible action with explicit visible feedbackfeed-empty-states - Empty states explain why and offer the next actionux-onboarding - Onboarding never exceeds 3 screens; always skippableux-permissions - Request browser permissions in-context, not on page loadux-modality - Choose dialog / popover / full-page by content weight; never stack modalsux-destructive-confirmation - Destructive actions require a typed confirmation OR an undo windowux-data-entry - Use Server Actions + progressive enhancement; never disable submit while typingux-undo - Prefer undo over confirmation for everyday actionsux-settings - Settings are autosaved on change; never gated behind a Save buttonvis-dark-mode - Use CSS custom properties + dark: variant; never hardcode text-black/bg-whitevis-icon-system - Use lucide-react with 1.5px stroke and size-4/size-5 standard sizesvis-spacing - Use the Tailwind 4 pt scale and container queries; never use ad-hoc px marginsRead individual reference files for detailed explanations and code examples:
| File | Description |
|---|---|
| references/_sections.md | Category definitions and ordering |
| assets/templates/_template.md | Template for new rules |