dev-booster 1.0.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/README.md +203 -0
- package/bin/dev-booster.js +4 -0
- package/package.json +41 -0
- package/src/index.js +78 -0
- package/src/sync-template.js +55 -0
- package/template/.devbooster/MANIFEST.md +177 -0
- package/template/.devbooster/boosters/accessibility.md +63 -0
- package/template/.devbooster/boosters/advisor.md +68 -0
- package/template/.devbooster/boosters/atomic.md +58 -0
- package/template/.devbooster/boosters/backend.md +75 -0
- package/template/.devbooster/boosters/changelog.md +126 -0
- package/template/.devbooster/boosters/create.md +85 -0
- package/template/.devbooster/boosters/debug.md +55 -0
- package/template/.devbooster/boosters/deploy.md +11 -0
- package/template/.devbooster/boosters/design.md +56 -0
- package/template/.devbooster/boosters/discovery.md +75 -0
- package/template/.devbooster/boosters/documentation.md +106 -0
- package/template/.devbooster/boosters/frontend.md +82 -0
- package/template/.devbooster/boosters/i18n.md +63 -0
- package/template/.devbooster/boosters/implementation.md +82 -0
- package/template/.devbooster/boosters/investigation.md +96 -0
- package/template/.devbooster/boosters/mobile.md +56 -0
- package/template/.devbooster/boosters/performance.md +70 -0
- package/template/.devbooster/boosters/planning.md +92 -0
- package/template/.devbooster/boosters/refactor.md +17 -0
- package/template/.devbooster/boosters/review.md +88 -0
- package/template/.devbooster/boosters/security.md +60 -0
- package/template/.devbooster/boosters/seo.md +59 -0
- package/template/.devbooster/boosters/templates/implementation_heavy.md +130 -0
- package/template/.devbooster/boosters/templates/implementation_simple.md +109 -0
- package/template/.devbooster/boosters/templates/implementation_standard.md +134 -0
- package/template/.devbooster/boosters/testing.md +76 -0
- package/template/.devbooster/hub/personas/agent_backend-specialist.md +263 -0
- package/template/.devbooster/hub/personas/agent_code-archaeologist.md +106 -0
- package/template/.devbooster/hub/personas/agent_database-architect.md +226 -0
- package/template/.devbooster/hub/personas/agent_debugger.md +225 -0
- package/template/.devbooster/hub/personas/agent_devops-engineer.md +242 -0
- package/template/.devbooster/hub/personas/agent_documentation-writer.md +104 -0
- package/template/.devbooster/hub/personas/agent_explorer-agent.md +73 -0
- package/template/.devbooster/hub/personas/agent_frontend-specialist.md +593 -0
- package/template/.devbooster/hub/personas/agent_game-developer.md +162 -0
- package/template/.devbooster/hub/personas/agent_mobile-developer.md +377 -0
- package/template/.devbooster/hub/personas/agent_orchestrator.md +416 -0
- package/template/.devbooster/hub/personas/agent_penetration-tester.md +188 -0
- package/template/.devbooster/hub/personas/agent_performance-optimizer.md +187 -0
- package/template/.devbooster/hub/personas/agent_product-manager.md +112 -0
- package/template/.devbooster/hub/personas/agent_product-owner.md +95 -0
- package/template/.devbooster/hub/personas/agent_project-planner.md +406 -0
- package/template/.devbooster/hub/personas/agent_qa-automation-engineer.md +103 -0
- package/template/.devbooster/hub/personas/agent_security-auditor.md +170 -0
- package/template/.devbooster/hub/personas/agent_seo-specialist.md +111 -0
- package/template/.devbooster/hub/personas/agent_test-engineer.md +158 -0
- package/template/.devbooster/hub/personas/backend-specialist.md +263 -0
- package/template/.devbooster/hub/personas/brainstorm.md +113 -0
- package/template/.devbooster/hub/personas/code-archaeologist.md +106 -0
- package/template/.devbooster/hub/personas/create.md +59 -0
- package/template/.devbooster/hub/personas/database-architect.md +226 -0
- package/template/.devbooster/hub/personas/debug.md +103 -0
- package/template/.devbooster/hub/personas/debugger.md +225 -0
- package/template/.devbooster/hub/personas/deploy.md +176 -0
- package/template/.devbooster/hub/personas/devops-engineer.md +242 -0
- package/template/.devbooster/hub/personas/documentation-writer.md +104 -0
- package/template/.devbooster/hub/personas/enhance.md +63 -0
- package/template/.devbooster/hub/personas/explorer-agent.md +73 -0
- package/template/.devbooster/hub/personas/frontend-specialist.md +593 -0
- package/template/.devbooster/hub/personas/game-developer.md +162 -0
- package/template/.devbooster/hub/personas/mobile-developer.md +377 -0
- package/template/.devbooster/hub/personas/orchestrate.md +237 -0
- package/template/.devbooster/hub/personas/orchestrator.md +416 -0
- package/template/.devbooster/hub/personas/penetration-tester.md +188 -0
- package/template/.devbooster/hub/personas/performance-optimizer.md +187 -0
- package/template/.devbooster/hub/personas/plan.md +89 -0
- package/template/.devbooster/hub/personas/preview.md +81 -0
- package/template/.devbooster/hub/personas/product-manager.md +112 -0
- package/template/.devbooster/hub/personas/product-owner.md +95 -0
- package/template/.devbooster/hub/personas/project-planner.md +406 -0
- package/template/.devbooster/hub/personas/qa-automation-engineer.md +103 -0
- package/template/.devbooster/hub/personas/security-auditor.md +170 -0
- package/template/.devbooster/hub/personas/seo-specialist.md +111 -0
- package/template/.devbooster/hub/personas/skill_api-patterns.md +567 -0
- package/template/.devbooster/hub/personas/skill_app-builder.md +1855 -0
- package/template/.devbooster/hub/personas/skill_architecture.md +417 -0
- package/template/.devbooster/hub/personas/skill_bash-linux.md +199 -0
- package/template/.devbooster/hub/personas/skill_behavioral-modes.md +242 -0
- package/template/.devbooster/hub/personas/skill_brainstorming.md +519 -0
- package/template/.devbooster/hub/personas/skill_clean-code.md +201 -0
- package/template/.devbooster/hub/personas/skill_code-review-checklist.md +109 -0
- package/template/.devbooster/hub/personas/skill_database-design.md +340 -0
- package/template/.devbooster/hub/personas/skill_deployment-procedures.md +241 -0
- package/template/.devbooster/hub/personas/skill_doc.md +177 -0
- package/template/.devbooster/hub/personas/skill_documentation-templates.md +194 -0
- package/template/.devbooster/hub/personas/skill_frontend-design.md +3670 -0
- package/template/.devbooster/hub/personas/skill_game-development.md +167 -0
- package/template/.devbooster/hub/personas/skill_geo-fundamentals.md +156 -0
- package/template/.devbooster/hub/personas/skill_i18n-localization.md +154 -0
- package/template/.devbooster/hub/personas/skill_intelligent-routing.md +335 -0
- package/template/.devbooster/hub/personas/skill_lint-and-validate.md +45 -0
- package/template/.devbooster/hub/personas/skill_mcp-builder.md +176 -0
- package/template/.devbooster/hub/personas/skill_mobile-design.md +6150 -0
- package/template/.devbooster/hub/personas/skill_nextjs-react-expert.md +3487 -0
- package/template/.devbooster/hub/personas/skill_nodejs-best-practices.md +333 -0
- package/template/.devbooster/hub/personas/skill_parallel-agents.md +175 -0
- package/template/.devbooster/hub/personas/skill_performance-profiling.md +143 -0
- package/template/.devbooster/hub/personas/skill_plan-writing.md +152 -0
- package/template/.devbooster/hub/personas/skill_powershell-windows.md +167 -0
- package/template/.devbooster/hub/personas/skill_python-patterns.md +441 -0
- package/template/.devbooster/hub/personas/skill_red-team-tactics.md +199 -0
- package/template/.devbooster/hub/personas/skill_rust-pro.md +176 -0
- package/template/.devbooster/hub/personas/skill_seo-fundamentals.md +129 -0
- package/template/.devbooster/hub/personas/skill_server-management.md +161 -0
- package/template/.devbooster/hub/personas/skill_systematic-debugging.md +109 -0
- package/template/.devbooster/hub/personas/skill_tailwind-patterns.md +269 -0
- package/template/.devbooster/hub/personas/skill_tdd-workflow.md +149 -0
- package/template/.devbooster/hub/personas/skill_testing-patterns.md +178 -0
- package/template/.devbooster/hub/personas/skill_vulnerability-scanner.md +403 -0
- package/template/.devbooster/hub/personas/skill_web-design-guidelines.md +57 -0
- package/template/.devbooster/hub/personas/skill_webapp-testing.md +187 -0
- package/template/.devbooster/hub/personas/status.md +86 -0
- package/template/.devbooster/hub/personas/test-engineer.md +158 -0
- package/template/.devbooster/hub/personas/test.md +144 -0
- package/template/.devbooster/hub/personas/ui-ux-pro-max.md +296 -0
- package/template/.devbooster/hub/scripts/accessibility_checker.py +183 -0
- package/template/.devbooster/hub/scripts/api_validator.py +211 -0
- package/template/.devbooster/hub/scripts/auto_preview.py +148 -0
- package/template/.devbooster/hub/scripts/checklist.py +217 -0
- package/template/.devbooster/hub/scripts/convert_rules.py +222 -0
- package/template/.devbooster/hub/scripts/geo_checker.py +289 -0
- package/template/.devbooster/hub/scripts/i18n_checker.py +241 -0
- package/template/.devbooster/hub/scripts/lighthouse_audit.py +76 -0
- package/template/.devbooster/hub/scripts/lint_runner.py +184 -0
- package/template/.devbooster/hub/scripts/mobile_audit.py +670 -0
- package/template/.devbooster/hub/scripts/playwright_runner.py +173 -0
- package/template/.devbooster/hub/scripts/react_performance_checker.py +252 -0
- package/template/.devbooster/hub/scripts/schema_validator.py +172 -0
- package/template/.devbooster/hub/scripts/security_scan.py +458 -0
- package/template/.devbooster/hub/scripts/seo_checker.py +219 -0
- package/template/.devbooster/hub/scripts/session_manager.py +120 -0
- package/template/.devbooster/hub/scripts/test_runner.py +219 -0
- package/template/.devbooster/hub/scripts/type_coverage.py +173 -0
- package/template/.devbooster/hub/scripts/ux_audit.py +722 -0
- package/template/.devbooster/hub/scripts/verify_all.py +327 -0
- package/template/.devbooster/hub/skills/api-patterns/SKILL.md +81 -0
- package/template/.devbooster/hub/skills/api-patterns/api-style.md +42 -0
- package/template/.devbooster/hub/skills/api-patterns/auth.md +24 -0
- package/template/.devbooster/hub/skills/api-patterns/documentation.md +26 -0
- package/template/.devbooster/hub/skills/api-patterns/graphql.md +41 -0
- package/template/.devbooster/hub/skills/api-patterns/rate-limiting.md +31 -0
- package/template/.devbooster/hub/skills/api-patterns/response.md +37 -0
- package/template/.devbooster/hub/skills/api-patterns/rest.md +40 -0
- package/template/.devbooster/hub/skills/api-patterns/scripts/api_validator.py +211 -0
- package/template/.devbooster/hub/skills/api-patterns/security-testing.md +122 -0
- package/template/.devbooster/hub/skills/api-patterns/trpc.md +41 -0
- package/template/.devbooster/hub/skills/api-patterns/versioning.md +22 -0
- package/template/.devbooster/hub/skills/app-builder/SKILL.md +75 -0
- package/template/.devbooster/hub/skills/app-builder/agent-coordination.md +71 -0
- package/template/.devbooster/hub/skills/app-builder/feature-building.md +53 -0
- package/template/.devbooster/hub/skills/app-builder/project-detection.md +34 -0
- package/template/.devbooster/hub/skills/app-builder/scaffolding.md +118 -0
- package/template/.devbooster/hub/skills/app-builder/tech-stack.md +40 -0
- package/template/.devbooster/hub/skills/app-builder/templates/SKILL.md +39 -0
- package/template/.devbooster/hub/skills/app-builder/templates/astro-static/TEMPLATE.md +76 -0
- package/template/.devbooster/hub/skills/app-builder/templates/chrome-extension/TEMPLATE.md +92 -0
- package/template/.devbooster/hub/skills/app-builder/templates/cli-tool/TEMPLATE.md +88 -0
- package/template/.devbooster/hub/skills/app-builder/templates/electron-desktop/TEMPLATE.md +88 -0
- package/template/.devbooster/hub/skills/app-builder/templates/express-api/TEMPLATE.md +83 -0
- package/template/.devbooster/hub/skills/app-builder/templates/flutter-app/TEMPLATE.md +90 -0
- package/template/.devbooster/hub/skills/app-builder/templates/monorepo-turborepo/TEMPLATE.md +90 -0
- package/template/.devbooster/hub/skills/app-builder/templates/nextjs-fullstack/TEMPLATE.md +122 -0
- package/template/.devbooster/hub/skills/app-builder/templates/nextjs-saas/TEMPLATE.md +122 -0
- package/template/.devbooster/hub/skills/app-builder/templates/nextjs-static/TEMPLATE.md +169 -0
- package/template/.devbooster/hub/skills/app-builder/templates/nuxt-app/TEMPLATE.md +134 -0
- package/template/.devbooster/hub/skills/app-builder/templates/python-fastapi/TEMPLATE.md +83 -0
- package/template/.devbooster/hub/skills/app-builder/templates/react-native-app/TEMPLATE.md +119 -0
- package/template/.devbooster/hub/skills/architecture/SKILL.md +55 -0
- package/template/.devbooster/hub/skills/architecture/context-discovery.md +43 -0
- package/template/.devbooster/hub/skills/architecture/examples.md +94 -0
- package/template/.devbooster/hub/skills/architecture/pattern-selection.md +68 -0
- package/template/.devbooster/hub/skills/architecture/patterns-reference.md +50 -0
- package/template/.devbooster/hub/skills/architecture/trade-off-analysis.md +77 -0
- package/template/.devbooster/hub/skills/bash-linux/SKILL.md +199 -0
- package/template/.devbooster/hub/skills/behavioral-modes/SKILL.md +242 -0
- package/template/.devbooster/hub/skills/brainstorming/SKILL.md +163 -0
- package/template/.devbooster/hub/skills/brainstorming/dynamic-questioning.md +350 -0
- package/template/.devbooster/hub/skills/clean-code/SKILL.md +201 -0
- package/template/.devbooster/hub/skills/code-review-checklist/SKILL.md +109 -0
- package/template/.devbooster/hub/skills/database-design/SKILL.md +52 -0
- package/template/.devbooster/hub/skills/database-design/database-selection.md +43 -0
- package/template/.devbooster/hub/skills/database-design/indexing.md +39 -0
- package/template/.devbooster/hub/skills/database-design/migrations.md +48 -0
- package/template/.devbooster/hub/skills/database-design/optimization.md +36 -0
- package/template/.devbooster/hub/skills/database-design/orm-selection.md +30 -0
- package/template/.devbooster/hub/skills/database-design/schema-design.md +56 -0
- package/template/.devbooster/hub/skills/database-design/scripts/schema_validator.py +172 -0
- package/template/.devbooster/hub/skills/deployment-procedures/SKILL.md +241 -0
- package/template/.devbooster/hub/skills/doc.md +177 -0
- package/template/.devbooster/hub/skills/documentation-templates/SKILL.md +194 -0
- package/template/.devbooster/hub/skills/frontend-design/SKILL.md +418 -0
- package/template/.devbooster/hub/skills/frontend-design/animation-guide.md +331 -0
- package/template/.devbooster/hub/skills/frontend-design/anti-generic-guide.md +252 -0
- package/template/.devbooster/hub/skills/frontend-design/color-system.md +311 -0
- package/template/.devbooster/hub/skills/frontend-design/decision-trees.md +418 -0
- package/template/.devbooster/hub/skills/frontend-design/motion-graphics.md +306 -0
- package/template/.devbooster/hub/skills/frontend-design/scripts/accessibility_checker.py +183 -0
- package/template/.devbooster/hub/skills/frontend-design/scripts/ux_audit.py +722 -0
- package/template/.devbooster/hub/skills/frontend-design/typography-system.md +345 -0
- package/template/.devbooster/hub/skills/frontend-design/ux-psychology.md +1116 -0
- package/template/.devbooster/hub/skills/frontend-design/visual-effects.md +383 -0
- package/template/.devbooster/hub/skills/game-development/2d-games/SKILL.md +119 -0
- package/template/.devbooster/hub/skills/game-development/3d-games/SKILL.md +135 -0
- package/template/.devbooster/hub/skills/game-development/SKILL.md +167 -0
- package/template/.devbooster/hub/skills/game-development/game-art/SKILL.md +185 -0
- package/template/.devbooster/hub/skills/game-development/game-audio/SKILL.md +190 -0
- package/template/.devbooster/hub/skills/game-development/game-design/SKILL.md +129 -0
- package/template/.devbooster/hub/skills/game-development/mobile-games/SKILL.md +108 -0
- package/template/.devbooster/hub/skills/game-development/multiplayer/SKILL.md +132 -0
- package/template/.devbooster/hub/skills/game-development/pc-games/SKILL.md +144 -0
- package/template/.devbooster/hub/skills/game-development/vr-ar/SKILL.md +123 -0
- package/template/.devbooster/hub/skills/game-development/web-games/SKILL.md +150 -0
- package/template/.devbooster/hub/skills/geo-fundamentals/SKILL.md +156 -0
- package/template/.devbooster/hub/skills/geo-fundamentals/scripts/geo_checker.py +289 -0
- package/template/.devbooster/hub/skills/i18n-localization/SKILL.md +154 -0
- package/template/.devbooster/hub/skills/i18n-localization/scripts/i18n_checker.py +241 -0
- package/template/.devbooster/hub/skills/intelligent-routing/SKILL.md +335 -0
- package/template/.devbooster/hub/skills/lint-and-validate/SKILL.md +45 -0
- package/template/.devbooster/hub/skills/lint-and-validate/scripts/lint_runner.py +184 -0
- package/template/.devbooster/hub/skills/lint-and-validate/scripts/type_coverage.py +173 -0
- package/template/.devbooster/hub/skills/mcp-builder/SKILL.md +176 -0
- package/template/.devbooster/hub/skills/mobile-design/SKILL.md +394 -0
- package/template/.devbooster/hub/skills/mobile-design/decision-trees.md +516 -0
- package/template/.devbooster/hub/skills/mobile-design/mobile-backend.md +491 -0
- package/template/.devbooster/hub/skills/mobile-design/mobile-color-system.md +420 -0
- package/template/.devbooster/hub/skills/mobile-design/mobile-debugging.md +122 -0
- package/template/.devbooster/hub/skills/mobile-design/mobile-design-thinking.md +357 -0
- package/template/.devbooster/hub/skills/mobile-design/mobile-navigation.md +458 -0
- package/template/.devbooster/hub/skills/mobile-design/mobile-performance.md +767 -0
- package/template/.devbooster/hub/skills/mobile-design/mobile-testing.md +356 -0
- package/template/.devbooster/hub/skills/mobile-design/mobile-typography.md +433 -0
- package/template/.devbooster/hub/skills/mobile-design/platform-android.md +666 -0
- package/template/.devbooster/hub/skills/mobile-design/platform-ios.md +561 -0
- package/template/.devbooster/hub/skills/mobile-design/scripts/mobile_audit.py +670 -0
- package/template/.devbooster/hub/skills/mobile-design/touch-psychology.md +537 -0
- package/template/.devbooster/hub/skills/nextjs-react-expert/1-async-eliminating-waterfalls.md +312 -0
- package/template/.devbooster/hub/skills/nextjs-react-expert/2-bundle-bundle-size-optimization.md +240 -0
- package/template/.devbooster/hub/skills/nextjs-react-expert/3-server-server-side-performance.md +490 -0
- package/template/.devbooster/hub/skills/nextjs-react-expert/4-client-client-side-data-fetching.md +264 -0
- package/template/.devbooster/hub/skills/nextjs-react-expert/5-rerender-re-render-optimization.md +581 -0
- package/template/.devbooster/hub/skills/nextjs-react-expert/6-rendering-rendering-performance.md +432 -0
- package/template/.devbooster/hub/skills/nextjs-react-expert/7-js-javascript-performance.md +684 -0
- package/template/.devbooster/hub/skills/nextjs-react-expert/8-advanced-advanced-patterns.md +150 -0
- package/template/.devbooster/hub/skills/nextjs-react-expert/SKILL.md +286 -0
- package/template/.devbooster/hub/skills/nextjs-react-expert/scripts/convert_rules.py +222 -0
- package/template/.devbooster/hub/skills/nextjs-react-expert/scripts/react_performance_checker.py +252 -0
- package/template/.devbooster/hub/skills/nodejs-best-practices/SKILL.md +333 -0
- package/template/.devbooster/hub/skills/parallel-agents/SKILL.md +175 -0
- package/template/.devbooster/hub/skills/performance-profiling/SKILL.md +143 -0
- package/template/.devbooster/hub/skills/performance-profiling/scripts/lighthouse_audit.py +76 -0
- package/template/.devbooster/hub/skills/plan-writing/SKILL.md +152 -0
- package/template/.devbooster/hub/skills/powershell-windows/SKILL.md +167 -0
- package/template/.devbooster/hub/skills/python-patterns/SKILL.md +441 -0
- package/template/.devbooster/hub/skills/red-team-tactics/SKILL.md +199 -0
- package/template/.devbooster/hub/skills/rust-pro/SKILL.md +176 -0
- package/template/.devbooster/hub/skills/seo-fundamentals/SKILL.md +129 -0
- package/template/.devbooster/hub/skills/seo-fundamentals/scripts/seo_checker.py +219 -0
- package/template/.devbooster/hub/skills/server-management/SKILL.md +161 -0
- package/template/.devbooster/hub/skills/systematic-debugging/SKILL.md +109 -0
- package/template/.devbooster/hub/skills/tailwind-patterns/SKILL.md +269 -0
- package/template/.devbooster/hub/skills/tdd-workflow/SKILL.md +149 -0
- package/template/.devbooster/hub/skills/testing-patterns/SKILL.md +178 -0
- package/template/.devbooster/hub/skills/testing-patterns/scripts/test_runner.py +219 -0
- package/template/.devbooster/hub/skills/vulnerability-scanner/SKILL.md +276 -0
- package/template/.devbooster/hub/skills/vulnerability-scanner/checklists.md +121 -0
- package/template/.devbooster/hub/skills/vulnerability-scanner/scripts/security_scan.py +458 -0
- package/template/.devbooster/hub/skills/web-design-guidelines/SKILL.md +57 -0
- package/template/.devbooster/hub/skills/webapp-testing/SKILL.md +187 -0
- package/template/.devbooster/hub/skills/webapp-testing/scripts/playwright_runner.py +173 -0
- package/template/.devbooster/hub/workflows/brainstorm.md +113 -0
- package/template/.devbooster/hub/workflows/create.md +59 -0
- package/template/.devbooster/hub/workflows/debug.md +103 -0
- package/template/.devbooster/hub/workflows/deploy.md +176 -0
- package/template/.devbooster/hub/workflows/enhance.md +63 -0
- package/template/.devbooster/hub/workflows/orchestrate.md +237 -0
- package/template/.devbooster/hub/workflows/plan.md +89 -0
- package/template/.devbooster/hub/workflows/preview.md +81 -0
- package/template/.devbooster/hub/workflows/status.md +86 -0
- package/template/.devbooster/hub/workflows/test.md +144 -0
- package/template/.devbooster/hub/workflows/ui-ux-pro-max.md +296 -0
- package/template/.devbooster/rules/BACKEND.md +72 -0
- package/template/.devbooster/rules/COMERCIAL.md +69 -0
- package/template/.devbooster/rules/FRONTEND.md +76 -0
- package/template/.devbooster/rules/GUIDE.md +111 -0
- package/template/.devbooster/rules/PROJECT.md +83 -0
- package/template/.devbooster/rules/PROTOCOL.md +42 -0
- package/template/.devbooster/rules/USER_PREFERENCES.md +33 -0
- package/template/DEVBOOSTER_INIT.md +42 -0
|
@@ -0,0 +1,331 @@
|
|
|
1
|
+
# Animation Guidelines Reference
|
|
2
|
+
|
|
3
|
+
> Animation principles and timing psychology - learn to decide, not copy.
|
|
4
|
+
> **No fixed durations to memorize - understand what affects timing.**
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## 1. Duration Principles
|
|
9
|
+
|
|
10
|
+
### What Affects Timing
|
|
11
|
+
|
|
12
|
+
```
|
|
13
|
+
Factors that determine animation speed:
|
|
14
|
+
├── DISTANCE: Further travel = longer duration
|
|
15
|
+
├── SIZE: Larger elements = slower animations
|
|
16
|
+
├── COMPLEXITY: Complex = slower to process
|
|
17
|
+
├── IMPORTANCE: Critical actions = clear feedback
|
|
18
|
+
└── CONTEXT: Urgent = fast, luxurious = slow
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
### Duration Ranges by Purpose
|
|
22
|
+
|
|
23
|
+
| Purpose | Range | Why |
|
|
24
|
+
|---------|-------|-----|
|
|
25
|
+
| Instant feedback | 50-100ms | Below perception threshold |
|
|
26
|
+
| Micro-interactions | 100-200ms | Quick but noticeable |
|
|
27
|
+
| Standard transitions | 200-300ms | Comfortable pace |
|
|
28
|
+
| Complex animations | 300-500ms | Time to follow |
|
|
29
|
+
| Page transitions | 400-600ms | Smooth handoff |
|
|
30
|
+
| **Wow/Premium Effects** | 800ms+ | Dramatic, organic spring-based, layered |
|
|
31
|
+
|
|
32
|
+
### Choosing Duration
|
|
33
|
+
|
|
34
|
+
Ask yourself:
|
|
35
|
+
1. How far is the element moving?
|
|
36
|
+
2. How important is it to notice this change?
|
|
37
|
+
3. Is the user waiting, or is this background?
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
## 2. Easing Principles
|
|
42
|
+
|
|
43
|
+
### What Easing Does
|
|
44
|
+
|
|
45
|
+
```
|
|
46
|
+
Easing = how speed changes over time
|
|
47
|
+
├── Linear: constant speed (mechanical, robotic)
|
|
48
|
+
├── Ease-out: fast start, slow end (natural entry)
|
|
49
|
+
├── Ease-in: slow start, fast end (natural exit)
|
|
50
|
+
└── Ease-in-out: slow both ends (smooth, deliberate)
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
### When to Use Each
|
|
54
|
+
|
|
55
|
+
| Easing | Best For | Feels Like |
|
|
56
|
+
|--------|----------|------------|
|
|
57
|
+
| **Ease-out** | Elements entering | Arriving, settling |
|
|
58
|
+
| **Ease-in** | Elements leaving | Departing, exiting |
|
|
59
|
+
| **Ease-in-out** | Emphasis, loops | Deliberate, smooth |
|
|
60
|
+
| **Linear** | Continuous motion | Mechanical, constant |
|
|
61
|
+
| **Bounce/Elastic** | Playful UI | Fun, energetic |
|
|
62
|
+
|
|
63
|
+
### The Pattern
|
|
64
|
+
|
|
65
|
+
```css
|
|
66
|
+
/* Entering view = ease-out (decelerate) */
|
|
67
|
+
.enter {
|
|
68
|
+
animation-timing-function: ease-out;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/* Leaving view = ease-in (accelerate) */
|
|
72
|
+
.exit {
|
|
73
|
+
animation-timing-function: ease-in;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/* Continuous = ease-in-out */
|
|
77
|
+
.continuous {
|
|
78
|
+
animation-timing-function: ease-in-out;
|
|
79
|
+
}
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
---
|
|
83
|
+
|
|
84
|
+
## 3. Micro-Interaction Principles
|
|
85
|
+
|
|
86
|
+
### What Makes Good Micro-Interactions
|
|
87
|
+
|
|
88
|
+
```
|
|
89
|
+
Purpose of micro-interactions:
|
|
90
|
+
├── FEEDBACK: Confirm the action happened
|
|
91
|
+
├── GUIDANCE: Show what's possible
|
|
92
|
+
├── STATUS: Indicate current state
|
|
93
|
+
└── DELIGHT: Small moments of joy
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
### Button States
|
|
97
|
+
|
|
98
|
+
```
|
|
99
|
+
Hover → slight visual change (lift, color, scale)
|
|
100
|
+
Active → pressed feeling (scale down, shadow change)
|
|
101
|
+
Focus → clear indicator (outline, ring)
|
|
102
|
+
Loading → progress indicator (spinner, skeleton)
|
|
103
|
+
Success → confirmation (check, color)
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
### Principles
|
|
107
|
+
|
|
108
|
+
1. **Respond immediately** (under 100ms perception)
|
|
109
|
+
2. **Match the action** (press = `scale(0.95)`, hover = `translateY(-4px) + glow`)
|
|
110
|
+
3. **Be bold but smooth** (Usta işi hissettir)
|
|
111
|
+
4. **Be consistent** (same actions = same feedback)
|
|
112
|
+
|
|
113
|
+
---
|
|
114
|
+
|
|
115
|
+
## 4. Loading States Principles
|
|
116
|
+
|
|
117
|
+
### Types by Context
|
|
118
|
+
|
|
119
|
+
| Situation | Approach |
|
|
120
|
+
|-----------|----------|
|
|
121
|
+
| Quick load (<1s) | No indicator needed |
|
|
122
|
+
| Medium (1-3s) | Spinner or simple animation |
|
|
123
|
+
| Long (3s+) | Progress bar or skeleton |
|
|
124
|
+
| Unknown duration | Indeterminate indicator |
|
|
125
|
+
|
|
126
|
+
### Skeleton Screens
|
|
127
|
+
|
|
128
|
+
```
|
|
129
|
+
Purpose: Reduce perceived wait time
|
|
130
|
+
├── Show layout shape immediately
|
|
131
|
+
├── Animate subtly (shimmer, pulse)
|
|
132
|
+
├── Replace with content when ready
|
|
133
|
+
└── Feels faster than spinner
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
### Progress Indicators
|
|
137
|
+
|
|
138
|
+
```
|
|
139
|
+
When to show progress:
|
|
140
|
+
├── User-initiated action
|
|
141
|
+
├── File uploads/downloads
|
|
142
|
+
├── Multi-step processes
|
|
143
|
+
└── Long operations
|
|
144
|
+
|
|
145
|
+
When NOT needed:
|
|
146
|
+
├── Very quick operations
|
|
147
|
+
├── Background tasks
|
|
148
|
+
└── Initial page loads (skeleton better)
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
---
|
|
152
|
+
|
|
153
|
+
## 5. Page Transitions Principles
|
|
154
|
+
|
|
155
|
+
### Transition Strategy
|
|
156
|
+
|
|
157
|
+
```
|
|
158
|
+
Simple rule: exit fast, enter slower
|
|
159
|
+
├── Outgoing content fades quickly
|
|
160
|
+
├── Incoming content animates in
|
|
161
|
+
└── Avoids "everything moving at once"
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
### Common Patterns
|
|
165
|
+
|
|
166
|
+
| Pattern | When to Use |
|
|
167
|
+
|---------|-------------|
|
|
168
|
+
| **Fade** | Safe default, works everywhere |
|
|
169
|
+
| **Slide** | Sequential navigation (prev/next) |
|
|
170
|
+
| **Scale** | Opening/closing modals |
|
|
171
|
+
| **Shared element** | Maintaining visual continuity |
|
|
172
|
+
|
|
173
|
+
### Direction Matching
|
|
174
|
+
|
|
175
|
+
```
|
|
176
|
+
Navigation direction = animation direction
|
|
177
|
+
├── Forward → slide from right
|
|
178
|
+
├── Backward → slide from left
|
|
179
|
+
├── Deeper → scale up from center
|
|
180
|
+
├── Back up → scale down
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
---
|
|
184
|
+
|
|
185
|
+
## 6. Scroll Animation Principles
|
|
186
|
+
|
|
187
|
+
### Progressive Reveal
|
|
188
|
+
|
|
189
|
+
```
|
|
190
|
+
Content appears as user scrolls:
|
|
191
|
+
├── Reduces initial cognitive load
|
|
192
|
+
├── Rewards exploration
|
|
193
|
+
├── Must not feel sluggish
|
|
194
|
+
└── Option to disable (accessibility)
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
### Trigger Points
|
|
198
|
+
|
|
199
|
+
| When to Trigger | Effect |
|
|
200
|
+
|-----------------|--------|
|
|
201
|
+
| Just entering viewport | Standard reveal |
|
|
202
|
+
| Centered in viewport | For emphasis |
|
|
203
|
+
| Partially visible | Earlier reveal |
|
|
204
|
+
| Fully visible | Late trigger |
|
|
205
|
+
|
|
206
|
+
### Animation Properties
|
|
207
|
+
|
|
208
|
+
- Fade in (opacity)
|
|
209
|
+
- Slide up (transform)
|
|
210
|
+
- Scale (transform)
|
|
211
|
+
- Combination of above
|
|
212
|
+
|
|
213
|
+
### Performance
|
|
214
|
+
|
|
215
|
+
- Use Intersection Observer
|
|
216
|
+
- Animate only transform/opacity
|
|
217
|
+
- Reduce on mobile if needed
|
|
218
|
+
|
|
219
|
+
---
|
|
220
|
+
|
|
221
|
+
## 7. Hover Effects Principles
|
|
222
|
+
|
|
223
|
+
### Matching Effect to Action
|
|
224
|
+
|
|
225
|
+
| Element | Effect | Intent |
|
|
226
|
+
|---------|--------|--------|
|
|
227
|
+
| **Clickable card** | Lift + shadow | "This is interactive" |
|
|
228
|
+
| **Button** | Color/brightness change | "Press me" |
|
|
229
|
+
| **Image** | Zoom/scale | "View closer" |
|
|
230
|
+
| **Link** | Underline/color | "Navigate here" |
|
|
231
|
+
|
|
232
|
+
### Principles
|
|
233
|
+
|
|
234
|
+
1. **Signal interactivity** - hover shows it's clickable
|
|
235
|
+
2. **Don't overdo it** - subtle changes work
|
|
236
|
+
3. **Match importance** - bigger change = more important
|
|
237
|
+
4. **Touch alternatives** - hover doesn't work on mobile
|
|
238
|
+
|
|
239
|
+
---
|
|
240
|
+
|
|
241
|
+
## 8. Feedback Animation Principles
|
|
242
|
+
|
|
243
|
+
### Success States
|
|
244
|
+
|
|
245
|
+
```
|
|
246
|
+
Celebrate appropriately:
|
|
247
|
+
├── Minor action → subtle check/color
|
|
248
|
+
├── Major action → more pronounced animation
|
|
249
|
+
├── Completion → satisfying animation
|
|
250
|
+
└── Match brand personality
|
|
251
|
+
```
|
|
252
|
+
|
|
253
|
+
### Error States
|
|
254
|
+
|
|
255
|
+
```
|
|
256
|
+
Draw attention without panic:
|
|
257
|
+
├── Color change (semantic red)
|
|
258
|
+
├── Shake animation (brief!)
|
|
259
|
+
├── Focus on error field
|
|
260
|
+
└── Clear messaging
|
|
261
|
+
```
|
|
262
|
+
|
|
263
|
+
### Timing
|
|
264
|
+
|
|
265
|
+
- Success: slightly longer (enjoy the moment)
|
|
266
|
+
- Error: quick (don't delay action)
|
|
267
|
+
- Loading: continuous until complete
|
|
268
|
+
|
|
269
|
+
---
|
|
270
|
+
|
|
271
|
+
## 9. Performance Principles
|
|
272
|
+
|
|
273
|
+
### What's Cheap to Animate
|
|
274
|
+
|
|
275
|
+
```
|
|
276
|
+
GPU-accelerated (FAST):
|
|
277
|
+
├── transform: translate, scale, rotate
|
|
278
|
+
└── opacity: 0 to 1
|
|
279
|
+
|
|
280
|
+
CPU-intensive (SLOW):
|
|
281
|
+
├── width, height
|
|
282
|
+
├── top, left, right, bottom
|
|
283
|
+
├── margin, padding
|
|
284
|
+
├── border-radius changes
|
|
285
|
+
└── box-shadow changes
|
|
286
|
+
```
|
|
287
|
+
|
|
288
|
+
### Optimization Strategies
|
|
289
|
+
|
|
290
|
+
1. **Animate transform/opacity** whenever possible
|
|
291
|
+
2. **Avoid layout triggers** (size/position changes)
|
|
292
|
+
3. **Use will-change sparingly** (hints to browser)
|
|
293
|
+
4. **Test on low-end devices** (not just dev machine)
|
|
294
|
+
|
|
295
|
+
### Respecting User Preferences
|
|
296
|
+
|
|
297
|
+
```css
|
|
298
|
+
@media (prefers-reduced-motion: reduce) {
|
|
299
|
+
/* Honor this preference */
|
|
300
|
+
/* Essential animations only */
|
|
301
|
+
/* Reduce or remove decorative motion */
|
|
302
|
+
}
|
|
303
|
+
```
|
|
304
|
+
|
|
305
|
+
---
|
|
306
|
+
|
|
307
|
+
## 10. Animation Decision Checklist
|
|
308
|
+
|
|
309
|
+
Before adding animation:
|
|
310
|
+
|
|
311
|
+
- [ ] **Is there a purpose?** (feedback/guidance/delight)
|
|
312
|
+
- [ ] **Is timing appropriate?** (not too fast/slow)
|
|
313
|
+
- [ ] **Did you pick correct easing?** (enter/exit/emphasis)
|
|
314
|
+
- [ ] **Is it performant?** (transform/opacity only)
|
|
315
|
+
- [ ] **Tested reduced motion?** (accessibility)
|
|
316
|
+
- [ ] **Consistent with other animations?** (same timing feel)
|
|
317
|
+
- [ ] **Not your default settings?** (variety check)
|
|
318
|
+
- [ ] **Asked user about style if unclear?**
|
|
319
|
+
|
|
320
|
+
### Anti-Patterns
|
|
321
|
+
|
|
322
|
+
- ❌ Same timing values every project
|
|
323
|
+
- ❌ Animation for animation's sake
|
|
324
|
+
- ❌ Ignoring reduced-motion preference
|
|
325
|
+
- ❌ Animating expensive properties
|
|
326
|
+
- ❌ Too many things animating at once
|
|
327
|
+
- ❌ Delays that frustrate users
|
|
328
|
+
|
|
329
|
+
---
|
|
330
|
+
|
|
331
|
+
> **Remember**: Animation is communication. Every motion should have meaning and serve the user experience.
|
|
@@ -0,0 +1,252 @@
|
|
|
1
|
+
# UI Design Skill — Anti-Generic Guide
|
|
2
|
+
### Para Next.js + Tailwind CSS + shadcn/ui
|
|
3
|
+
|
|
4
|
+
> Leia este documento **antes** de escrever qualquer componente de UI.
|
|
5
|
+
> Ele não é uma lista de regras opcionais. É o contrato visual do projeto.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## 1. O problema que você está sendo contratado para evitar
|
|
10
|
+
|
|
11
|
+
Modelos de linguagem treinados em código público aprenderam com milhares de projetos que usam os mesmos templates: Tailwind UI, shadcn/ui boilerplates, v0.dev outputs. O resultado é uma "média estatística" do que existe — e essa média tem cara reconhecível:
|
|
12
|
+
|
|
13
|
+
- Grade de 3 colunas com cards idênticos
|
|
14
|
+
- Ícone + título + parágrafo cinza repetido N vezes
|
|
15
|
+
- `border rounded-lg p-6 shadow-sm` em absolutamente tudo
|
|
16
|
+
- Hierarquia tipográfica `text-2xl font-bold` → `text-sm text-muted-foreground` sem variação
|
|
17
|
+
- Paleta: branco, cinza-100, cinza-800, uma cor de accent genérica
|
|
18
|
+
- Fonte: Inter. Sempre Inter.
|
|
19
|
+
|
|
20
|
+
**Interfaces geradas assim são corretas. Funcionam. E são completamente invisíveis.**
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## 2. Antes de escrever uma linha de código
|
|
25
|
+
|
|
26
|
+
Responda mentalmente:
|
|
27
|
+
|
|
28
|
+
1. **Qual é a hierarquia de informação?** O que o usuário precisa ver *primeiro*? O que é secundário? O que pode sumir?
|
|
29
|
+
2. **Qual é o tom emocional?** Técnico/preciso? Quente/humano? Urgente? Contemplativo?
|
|
30
|
+
3. **O que quebra o padrão aqui?** Um tamanho tipográfico inesperado, uma cor fora do grid, um elemento que não está dentro de um card.
|
|
31
|
+
4. **Onde está a tensão visual?** Contraste de peso, escala, cor ou espaço que cria direção de leitura.
|
|
32
|
+
|
|
33
|
+
Se você não consegue responder essas perguntas, **não comece a codar**. Volte para o contexto do componente.
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
## 3. Padrões proibidos
|
|
38
|
+
|
|
39
|
+
### 3.1 Layout
|
|
40
|
+
|
|
41
|
+
❌ **Grade uniforme de cards com mesmo peso visual**
|
|
42
|
+
```tsx
|
|
43
|
+
// PROIBIDO — todos os cards iguais, hierarquia zero
|
|
44
|
+
<div className="grid grid-cols-3 gap-6">
|
|
45
|
+
<Card>...</Card>
|
|
46
|
+
<Card>...</Card>
|
|
47
|
+
<Card>...</Card>
|
|
48
|
+
</div>
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
✅ **Hierarquia explícita — um elemento domina**
|
|
52
|
+
```tsx
|
|
53
|
+
// Um item principal (grande), outros secundários (menores)
|
|
54
|
+
<div className="grid grid-cols-3 gap-6">
|
|
55
|
+
<div className="col-span-2 row-span-2">...</div> {/* ancora visual */}
|
|
56
|
+
<Card className="...">...</Card>
|
|
57
|
+
<Card className="...">...</Card>
|
|
58
|
+
</div>
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
❌ **Card dentro de Card dentro de Card**
|
|
64
|
+
```tsx
|
|
65
|
+
// PROIBIDO — caixas aninhadas sem propósito
|
|
66
|
+
<Card>
|
|
67
|
+
<CardContent>
|
|
68
|
+
<Card> {/* por quê? */}
|
|
69
|
+
<Card> {/* sério? */}
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
✅ **Use separação visual sem container**
|
|
73
|
+
```tsx
|
|
74
|
+
// Divida com espaço, tipografia ou borda — não com mais boxes
|
|
75
|
+
<div className="space-y-6">
|
|
76
|
+
<section>
|
|
77
|
+
<h3 className="text-xs font-medium uppercase tracking-widest text-muted-foreground mb-3">
|
|
78
|
+
Seção
|
|
79
|
+
</h3>
|
|
80
|
+
<div className="space-y-2">...</div>
|
|
81
|
+
</section>
|
|
82
|
+
</div>
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
---
|
|
86
|
+
|
|
87
|
+
❌ **Ícone flutuante genérico acima de cada heading**
|
|
88
|
+
```tsx
|
|
89
|
+
// PROIBIDO — esse padrão grita "template"
|
|
90
|
+
<div className="flex flex-col items-center text-center">
|
|
91
|
+
<div className="rounded-full bg-primary/10 p-3 mb-4">
|
|
92
|
+
<Icon className="h-6 w-6 text-primary" />
|
|
93
|
+
</div>
|
|
94
|
+
<h3 className="font-semibold">Título</h3>
|
|
95
|
+
<p className="text-sm text-muted-foreground">Descrição genérica</p>
|
|
96
|
+
</div>
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
✅ **Integre o ícone no fluxo tipográfico ou elimine-o**
|
|
100
|
+
```tsx
|
|
101
|
+
<div>
|
|
102
|
+
<h3 className="font-semibold flex items-center gap-2">
|
|
103
|
+
<Icon className="h-4 w-4 opacity-50" />
|
|
104
|
+
Título
|
|
105
|
+
</h3>
|
|
106
|
+
<p className="text-sm text-muted-foreground mt-1 pl-6">Descrição</p>
|
|
107
|
+
</div>
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
---
|
|
111
|
+
|
|
112
|
+
### 3.2 Tipografia
|
|
113
|
+
|
|
114
|
+
❌ **Escala homogênea — tudo `text-sm` ou tudo `text-base`**
|
|
115
|
+
|
|
116
|
+
✅ **Contraste de escala intencional**
|
|
117
|
+
```tsx
|
|
118
|
+
// Crie tensão: um elemento muito grande, outro muito pequeno
|
|
119
|
+
<div>
|
|
120
|
+
<span className="text-[11px] font-medium uppercase tracking-[0.15em] text-muted-foreground">
|
|
121
|
+
Receita mensal
|
|
122
|
+
</span>
|
|
123
|
+
<p className="text-4xl font-bold tracking-tight mt-1">R$ 48.320</p>
|
|
124
|
+
<p className="text-sm text-muted-foreground mt-1">↑ 12% vs mês anterior</p>
|
|
125
|
+
</div>
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
❌ **`font-semibold` como único grau de ênfase**
|
|
129
|
+
|
|
130
|
+
✅ **Use o sistema completo: peso + tamanho + cor + espaçamento + opacidade**
|
|
131
|
+
```tsx
|
|
132
|
+
// Hierarquia sem usar negrito em tudo
|
|
133
|
+
<p className="text-sm font-medium">Label</p> // primário
|
|
134
|
+
<p className="text-sm text-muted-foreground">Desc</p> // secundário
|
|
135
|
+
<p className="text-xs opacity-50">Metadata</p> // terciário
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
---
|
|
139
|
+
|
|
140
|
+
❌ **Inter como fonte padrão por inércia**
|
|
141
|
+
|
|
142
|
+
✅ **Escolha com intenção** — ou use o que está no `tailwind.config`, ou questione se deve adicionar uma fonte display para headings:
|
|
143
|
+
```tsx
|
|
144
|
+
// No tailwind.config.ts — fonts com personalidade
|
|
145
|
+
fontFamily: {
|
|
146
|
+
sans: ['Geist', 'system-ui', 'sans-serif'], // corpo
|
|
147
|
+
display: ['Cal Sans', 'serif'], // headings grandes
|
|
148
|
+
mono: ['Geist Mono', 'monospace'], // código/dados
|
|
149
|
+
}
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
---
|
|
153
|
+
|
|
154
|
+
### 3.3 Cor
|
|
155
|
+
|
|
156
|
+
❌ **Paleta de 50 tons de cinza + uma cor de brand genérica**
|
|
157
|
+
|
|
158
|
+
✅ **Cor com função editorial**
|
|
159
|
+
- Use cor para criar *hierarquia*, não apenas *identidade*
|
|
160
|
+
- Uma cor quente num contexto frio chama atenção — use isso
|
|
161
|
+
- `text-muted-foreground` é para informação *realmente* secundária, não para tudo que não é título
|
|
162
|
+
|
|
163
|
+
❌ **`#000000` ou `#ffffff` puros**
|
|
164
|
+
|
|
165
|
+
✅ **Neutros com matiz** — cinzas levemente azulados, quentes ou frios dependem do tom do produto:
|
|
166
|
+
```css
|
|
167
|
+
/* Em vez de gray puro, use slate (frio/técnico) ou zinc (neutro) ou stone (quente) */
|
|
168
|
+
--foreground: 224 71% 4%; /* quase preto com matiz azul */
|
|
169
|
+
--background: 210 20% 98%; /* quase branco com matiz frio */
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
---
|
|
173
|
+
|
|
174
|
+
### 3.4 Espaço e ritmo
|
|
175
|
+
|
|
176
|
+
❌ **`gap-6` e `p-6` em tudo, uniformemente**
|
|
177
|
+
|
|
178
|
+
✅ **Espaço como hierarquia** — mais espaço = mais importância
|
|
179
|
+
```tsx
|
|
180
|
+
// Seções principais: espaço generoso
|
|
181
|
+
// Elementos relacionados: espaço comprimido
|
|
182
|
+
<div className="space-y-16"> {/* entre seções */}
|
|
183
|
+
<section className="space-y-8"> {/* dentro da seção */}
|
|
184
|
+
<header className="space-y-2"> {/* dentro do header */}
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
---
|
|
188
|
+
|
|
189
|
+
## 4. Padrões que funcionam (use com consciência)
|
|
190
|
+
|
|
191
|
+
### 4.1 Âncora visual
|
|
192
|
+
Todo layout precisa de um elemento que domine — tamanho, cor ou posição. O olho precisa saber *onde começar*.
|
|
193
|
+
|
|
194
|
+
### 4.2 Assimetria intencional
|
|
195
|
+
`col-span-2` + `col-span-1` cria mais tensão visual do que `col-span-1` repetido. Use.
|
|
196
|
+
|
|
197
|
+
### 4.3 Linha de base e alinhamento de dados
|
|
198
|
+
Para dados numéricos, alinhe à direita. Para listas de texto, alinhe à esquerda. Nunca centralize tabelas.
|
|
199
|
+
|
|
200
|
+
### 4.4 Densidade variada
|
|
201
|
+
Uma seção densa (muita informação, espaço comprimido) ao lado de uma seção arejada cria ritmo. Evite densidade uniforme.
|
|
202
|
+
|
|
203
|
+
### 4.5 Bordas como separação, não como decoração
|
|
204
|
+
```tsx
|
|
205
|
+
// Borda como divisor tipográfico — sem shadow, sem rounded excessivo
|
|
206
|
+
<div className="border-t pt-4 mt-4">
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
---
|
|
210
|
+
|
|
211
|
+
## 5. Checklist antes de entregar um componente
|
|
212
|
+
|
|
213
|
+
Antes de finalizar, responda:
|
|
214
|
+
|
|
215
|
+
- [ ] Consigo identificar claramente o elemento de maior hierarquia visual?
|
|
216
|
+
- [ ] Tem algum `<Card>` que poderia ser substituído por espaço + tipografia?
|
|
217
|
+
- [ ] A escala tipográfica tem pelo menos 3 níveis distintos de peso/tamanho?
|
|
218
|
+
- [ ] Existe ao menos um elemento que quebra a simetria da grade?
|
|
219
|
+
- [ ] As cores têm função (hierarquia/atenção/estado) ou são só decoração?
|
|
220
|
+
- [ ] Se alguém ver este componente por 3 segundos, saberá o que fazer?
|
|
221
|
+
- [ ] Este componente poderia ter saído do v0.dev sem alteração? **(se sim, revise)**
|
|
222
|
+
|
|
223
|
+
---
|
|
224
|
+
|
|
225
|
+
## 6. Referência rápida — Tailwind classes problemáticas vs melhores alternativas
|
|
226
|
+
|
|
227
|
+
| Padrão genérico | Por que é ruim | Alternativa |
|
|
228
|
+
|---|---|---|
|
|
229
|
+
| `rounded-lg` em tudo | Uniformidade falsa de "modernidade" | Varie: `rounded-none`, `rounded-sm`, `rounded-2xl` com intenção |
|
|
230
|
+
| `shadow-sm` em todo card | Profundidade sem significado | Use sombra só para elementos elevados de verdade (modals, dropdowns) |
|
|
231
|
+
| `text-muted-foreground` em desc | Torna tudo secundário igualmente | Use opacidade gradual: `opacity-70`, `opacity-50` |
|
|
232
|
+
| `p-6` universal | Grade mecânica | Padding assimétrico: `px-6 py-4`, `pt-8 pb-4 px-6` |
|
|
233
|
+
| `gap-6` universal | Sem ritmo | Varie espaço por nível hierárquico |
|
|
234
|
+
| `font-semibold` para ênfase | Único grau de ênfase disponível | Combine `font-medium` + tamanho maior OU cor diferente |
|
|
235
|
+
|
|
236
|
+
---
|
|
237
|
+
|
|
238
|
+
## 7. Filosofia de base
|
|
239
|
+
|
|
240
|
+
> Uma interface *correta* é aquela que funciona.
|
|
241
|
+
> Uma interface com *assinatura* é aquela que o usuário reconhece sem ver o logo.
|
|
242
|
+
|
|
243
|
+
A diferença não está em usar ferramentas diferentes. Está em fazer escolhas intencionais em vez de escolhas estatisticamente seguras.
|
|
244
|
+
|
|
245
|
+
**O shadcn/ui é um ponto de partida, não um destino.**
|
|
246
|
+
Modifique os componentes. Quebre os defaults. Use as primitivas do Radix diretamente quando o wrapper do shadcn estiver te limitando.
|
|
247
|
+
|
|
248
|
+
A interface mais genérica possível é aquela onde o desenvolvedor nunca questionou o default.
|
|
249
|
+
|
|
250
|
+
---
|
|
251
|
+
|
|
252
|
+
*Versão 1.0 — Baseado em análise de padrões recorrentes de AI-generated UI com Next.js + Tailwind + shadcn/ui*
|