@ngxtm/devkit 3.7.0 → 3.8.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/merged-commands/3d-web-experience.md +254 -0
- package/merged-commands/ab-test-setup.md +232 -0
- package/merged-commands/accessibility-compliance-accessibility-audit.md +42 -0
- package/merged-commands/active-directory-attacks.md +383 -0
- package/merged-commands/address-github-comments.md +55 -0
- package/merged-commands/aesthetic.md +134 -0
- package/merged-commands/agent-evaluation.md +64 -0
- package/merged-commands/agent-framework-azure-hosted-agents.md +332 -0
- package/merged-commands/agent-manager-skill.md +40 -0
- package/merged-commands/agent-memory-mcp.md +82 -0
- package/merged-commands/agent-memory-systems.md +67 -0
- package/merged-commands/agent-orchestration-improve-agent.md +349 -0
- package/merged-commands/agent-orchestration-multi-agent-optimize.md +239 -0
- package/merged-commands/agent-tool-builder.md +53 -0
- package/merged-commands/agile-product-owner.md +31 -0
- package/merged-commands/ai-agents-architect.md +90 -0
- package/merged-commands/ai-artist.md +75 -0
- package/merged-commands/ai-engineer.md +171 -0
- package/merged-commands/ai-multimodal.md +109 -0
- package/merged-commands/ai-product.md +54 -0
- package/merged-commands/ai-wrapper-product.md +273 -0
- package/merged-commands/airflow-dag-patterns.md +41 -0
- package/merged-commands/algolia-search.md +66 -0
- package/merged-commands/algorithmic-art.md +405 -0
- package/merged-commands/analytics-tracking.md +404 -0
- package/merged-commands/angular-architect.md +97 -0
- package/merged-commands/angular-migration.md +428 -0
- package/merged-commands/anti-reversing-techniques.md +42 -0
- package/merged-commands/api-design-principles.md +37 -0
- package/merged-commands/api-designer.md +101 -0
- package/merged-commands/api-documentation-generator.md +484 -0
- package/merged-commands/api-documenter.md +184 -0
- package/merged-commands/api-fuzzing-bug-bounty.md +433 -0
- package/merged-commands/api-patterns.md +81 -0
- package/merged-commands/api-security-best-practices.md +907 -0
- package/merged-commands/api-testing-observability-api-mock.md +46 -0
- package/merged-commands/app-builder.md +75 -0
- package/merged-commands/app-store-optimization.md +403 -0
- package/merged-commands/application-performance-performance-optimization.md +154 -0
- package/merged-commands/architect-review.md +174 -0
- package/merged-commands/architecture-decision-records.md +441 -0
- package/merged-commands/architecture-designer.md +89 -0
- package/merged-commands/architecture-patterns.md +37 -0
- package/merged-commands/architecture.md +55 -0
- package/merged-commands/arm-cortex-expert.md +306 -0
- package/merged-commands/artifacts-builder.md +74 -0
- package/merged-commands/ask-questions-if-underspecified.md +81 -0
- package/merged-commands/async-python-patterns.md +39 -0
- package/merged-commands/atlassian-mcp.md +100 -0
- package/merged-commands/attack-tree-construction.md +38 -0
- package/merged-commands/auth-implementation-patterns.md +39 -0
- package/merged-commands/automate-whatsapp.md +257 -0
- package/merged-commands/autonomous-agent-patterns.md +761 -0
- package/merged-commands/autonomous-agents.md +68 -0
- package/merged-commands/avalonia-layout-zafiro.md +59 -0
- package/merged-commands/avalonia-viewmodels-zafiro.md +29 -0
- package/merged-commands/avalonia-zafiro-development.md +29 -0
- package/merged-commands/aws-agentic-ai.md +117 -0
- package/merged-commands/aws-cdk-development.md +278 -0
- package/merged-commands/aws-cost-operations.md +317 -0
- package/merged-commands/aws-penetration-testing.md +405 -0
- package/merged-commands/aws-serverless-eda.md +757 -0
- package/merged-commands/aws-serverless.md +323 -0
- package/merged-commands/aws-skills.md +22 -0
- package/merged-commands/azd-deployment.md +296 -0
- package/merged-commands/azure-ai-agents-python.md +277 -0
- package/merged-commands/azure-ai-search-python.md +198 -0
- package/merged-commands/azure-ai-voicelive-skill.md +294 -0
- package/merged-commands/azure-functions.md +42 -0
- package/merged-commands/backend-architect.md +333 -0
- package/merged-commands/backend-dev-guidelines.md +342 -0
- package/merged-commands/backend-development-feature-development.md +180 -0
- package/merged-commands/backend-development.md +155 -0
- package/merged-commands/backend-security-coder.md +156 -0
- package/merged-commands/backtesting-frameworks.md +39 -0
- package/merged-commands/bash-defensive-patterns.md +43 -0
- package/merged-commands/bash-linux.md +199 -0
- package/merged-commands/bash-pro.md +310 -0
- package/merged-commands/bats-testing-patterns.md +34 -0
- package/merged-commands/bazel-build-optimization.md +397 -0
- package/merged-commands/beautiful-prose.md +22 -0
- package/merged-commands/behavioral-modes.md +242 -0
- package/merged-commands/best-practices.md +500 -0
- package/merged-commands/better-auth.md +204 -0
- package/merged-commands/billing-automation.md +42 -0
- package/merged-commands/binary-analysis-patterns.md +450 -0
- package/merged-commands/blockchain-developer.md +208 -0
- package/merged-commands/blockrun.md +292 -0
- package/merged-commands/brainstorming.md +230 -0
- package/merged-commands/brand-guidelines-anthropic.md +73 -0
- package/merged-commands/brand-guidelines-community.md +73 -0
- package/merged-commands/brand-guidelines.md +73 -0
- package/merged-commands/broken-authentication.md +476 -0
- package/merged-commands/browser-automation.md +70 -0
- package/merged-commands/browser-extension-builder.md +261 -0
- package/merged-commands/building-ai-agent-on-cloudflare.md +391 -0
- package/merged-commands/building-mcp-server-on-cloudflare.md +265 -0
- package/merged-commands/bullmq-specialist.md +57 -0
- package/merged-commands/bun-development.md +691 -0
- package/merged-commands/burp-suite-testing.md +380 -0
- package/merged-commands/business-analyst.md +182 -0
- package/merged-commands/busybox-on-windows.md +30 -0
- package/merged-commands/c-pro.md +56 -0
- package/merged-commands/c4-architecture-c4-architecture.md +389 -0
- package/merged-commands/c4-code.md +244 -0
- package/merged-commands/c4-component.md +153 -0
- package/merged-commands/c4-container.md +171 -0
- package/merged-commands/c4-context.md +150 -0
- package/merged-commands/canvas-design.md +130 -0
- package/merged-commands/cc-skill-backend-patterns.md +584 -0
- package/merged-commands/cc-skill-clickhouse-io.md +431 -0
- package/merged-commands/cc-skill-coding-standards.md +522 -0
- package/merged-commands/cc-skill-continuous-learning.md +10 -0
- package/merged-commands/cc-skill-frontend-patterns.md +633 -0
- package/merged-commands/cc-skill-project-guidelines-example.md +352 -0
- package/merged-commands/cc-skill-security-review.md +496 -0
- package/merged-commands/cc-skill-strategic-compact.md +10 -0
- package/merged-commands/changelog-automation.md +38 -0
- package/merged-commands/changelog-generator.md +104 -0
- package/merged-commands/chaos-engineer.md +98 -0
- package/merged-commands/chrome-devtools.md +407 -0
- package/merged-commands/cicd-automation-workflow-automate.md +51 -0
- package/merged-commands/clarity-gate.md +22 -0
- package/merged-commands/claude-ally-health.md +22 -0
- package/merged-commands/claude-code-guide.md +68 -0
- package/merged-commands/claude-d3js-skill.md +820 -0
- package/merged-commands/claude-scientific-skills.md +22 -0
- package/merged-commands/claude-speed-reader.md +22 -0
- package/merged-commands/claude-win11-speckit-update-skill.md +22 -0
- package/merged-commands/clean-code.md +201 -0
- package/merged-commands/clerk-auth.md +56 -0
- package/merged-commands/cli-developer.md +97 -0
- package/merged-commands/cloud-architect.md +135 -0
- package/merged-commands/cloud-penetration-testing.md +501 -0
- package/merged-commands/cloudflare-expert.md +227 -0
- package/merged-commands/code-documentation-code-explain.md +46 -0
- package/merged-commands/code-documentation-doc-generate.md +48 -0
- package/merged-commands/code-documentation.md +263 -0
- package/merged-commands/code-documenter.md +95 -0
- package/merged-commands/code-refactoring-context-restore.md +179 -0
- package/merged-commands/code-refactoring-refactor-clean.md +51 -0
- package/merged-commands/code-refactoring-tech-debt.md +386 -0
- package/merged-commands/code-refactoring.md +209 -0
- package/merged-commands/code-review-ai-ai-review.md +450 -0
- package/merged-commands/code-review-checklist.md +444 -0
- package/merged-commands/code-review-excellence.md +40 -0
- package/merged-commands/code-review.md +121 -0
- package/merged-commands/code-reviewer.md +178 -0
- package/merged-commands/codebase-cleanup-deps-audit.md +51 -0
- package/merged-commands/codebase-cleanup-refactor-clean.md +51 -0
- package/merged-commands/codebase-cleanup-tech-debt.md +386 -0
- package/merged-commands/codex-review.md +37 -0
- package/merged-commands/commit.md +171 -0
- package/merged-commands/competitive-ads-extractor.md +293 -0
- package/merged-commands/competitive-landscape.md +34 -0
- package/merged-commands/competitor-alternatives.md +750 -0
- package/merged-commands/comprehensive-review-full-review.md +146 -0
- package/merged-commands/comprehensive-review-pr-enhance.md +46 -0
- package/merged-commands/computer-use-agents.md +315 -0
- package/merged-commands/concise-planning.md +62 -0
- package/merged-commands/conductor-implement.md +388 -0
- package/merged-commands/conductor-manage.md +39 -0
- package/merged-commands/conductor-new-track.md +433 -0
- package/merged-commands/conductor-revert.md +372 -0
- package/merged-commands/conductor-setup.md +426 -0
- package/merged-commands/conductor-status.md +338 -0
- package/merged-commands/conductor-validator.md +62 -0
- package/merged-commands/content-creator.md +248 -0
- package/merged-commands/content-marketer.md +170 -0
- package/merged-commands/content-research-writer.md +538 -0
- package/merged-commands/context-compression.md +266 -0
- package/merged-commands/context-degradation.md +238 -0
- package/merged-commands/context-driven-development.md +400 -0
- package/merged-commands/context-engineering.md +107 -0
- package/merged-commands/context-fundamentals.md +192 -0
- package/merged-commands/context-management-context-restore.md +179 -0
- package/merged-commands/context-management-context-save.md +177 -0
- package/merged-commands/context-manager.md +185 -0
- package/merged-commands/context-optimization.md +186 -0
- package/merged-commands/context-window-management.md +53 -0
- package/merged-commands/context7-auto-research.md +36 -0
- package/merged-commands/conversation-memory.md +61 -0
- package/merged-commands/copy-editing.md +439 -0
- package/merged-commands/copywriting.md +225 -0
- package/merged-commands/core-components.md +264 -0
- package/merged-commands/cosmos-db-python-skill.md +198 -0
- package/merged-commands/cost-optimization.md +286 -0
- package/merged-commands/cpp-pro.md +59 -0
- package/merged-commands/cqrs-implementation.md +35 -0
- package/merged-commands/create-pr.md +192 -0
- package/merged-commands/crewai.md +243 -0
- package/merged-commands/csharp-developer.md +94 -0
- package/merged-commands/csharp-pro.md +59 -0
- package/merged-commands/culture-index.md +43 -0
- package/merged-commands/customer-support.md +170 -0
- package/merged-commands/daily-news-report.md +356 -0
- package/merged-commands/data-engineer.md +224 -0
- package/merged-commands/data-engineering-data-driven-feature.md +182 -0
- package/merged-commands/data-engineering-data-pipeline.md +201 -0
- package/merged-commands/data-quality-frameworks.md +40 -0
- package/merged-commands/data-scientist.md +199 -0
- package/merged-commands/data-storytelling.md +465 -0
- package/merged-commands/database-admin.md +165 -0
- package/merged-commands/database-architect.md +268 -0
- package/merged-commands/database-cloud-optimization-cost-optimize.md +44 -0
- package/merged-commands/database-design.md +52 -0
- package/merged-commands/database-migration.md +436 -0
- package/merged-commands/database-migrations-migration-observability.md +420 -0
- package/merged-commands/database-migrations-sql-migrations.md +53 -0
- package/merged-commands/database-optimizer.md +167 -0
- package/merged-commands/databases.md +232 -0
- package/merged-commands/dbt-transformation-patterns.md +34 -0
- package/merged-commands/debugger.md +49 -0
- package/merged-commands/debugging-strategies.md +34 -0
- package/merged-commands/debugging-toolkit-smart-debug.md +197 -0
- package/merged-commands/debugging-wizard.md +93 -0
- package/merged-commands/debugging.md +84 -0
- package/merged-commands/deep-research.md +114 -0
- package/merged-commands/defi-protocol-templates.md +466 -0
- package/merged-commands/dependency-management-deps-audit.md +44 -0
- package/merged-commands/dependency-upgrade.md +421 -0
- package/merged-commands/deployment-engineer.md +170 -0
- package/merged-commands/deployment-pipeline-design.md +371 -0
- package/merged-commands/deployment-procedures.md +241 -0
- package/merged-commands/deployment-validation-config-validate.md +496 -0
- package/merged-commands/design-md.md +178 -0
- package/merged-commands/design-orchestration.md +167 -0
- package/merged-commands/developer-growth-analysis.md +322 -0
- package/merged-commands/devops-engineer.md +92 -0
- package/merged-commands/devops-troubleshooter.md +161 -0
- package/merged-commands/devops.md +285 -0
- package/merged-commands/discord-bot-architect.md +277 -0
- package/merged-commands/dispatching-parallel-agents.md +180 -0
- package/merged-commands/distributed-debugging-debug-trace.md +44 -0
- package/merged-commands/distributed-tracing.md +450 -0
- package/merged-commands/django-expert.md +89 -0
- package/merged-commands/django-pro.md +180 -0
- package/merged-commands/doc-coauthoring.md +375 -0
- package/merged-commands/docker-expert.md +409 -0
- package/merged-commands/docs-architect.md +98 -0
- package/merged-commands/docs-seeker.md +102 -0
- package/merged-commands/documentation-generation-doc-generate.md +48 -0
- package/merged-commands/documentation-templates.md +194 -0
- package/merged-commands/docx-official.md +197 -0
- package/merged-commands/docx.md +197 -0
- package/merged-commands/domain-name-brainstormer.md +212 -0
- package/merged-commands/dotnet-architect.md +197 -0
- package/merged-commands/dotnet-backend-patterns.md +37 -0
- package/merged-commands/dotnet-core-expert.md +96 -0
- package/merged-commands/dx-optimizer.md +83 -0
- package/merged-commands/e2e-testing-patterns.md +41 -0
- package/merged-commands/elixir-pro.md +59 -0
- package/merged-commands/email-sequence.md +925 -0
- package/merged-commands/email-systems.md +54 -0
- package/merged-commands/embedded-systems.md +98 -0
- package/merged-commands/embedding-strategies.md +491 -0
- package/merged-commands/employment-contract-templates.md +39 -0
- package/merged-commands/environment-setup-guide.md +479 -0
- package/merged-commands/error-debugging-error-analysis.md +47 -0
- package/merged-commands/error-debugging-error-trace.md +43 -0
- package/merged-commands/error-debugging-multi-agent-review.md +216 -0
- package/merged-commands/error-detective.md +53 -0
- package/merged-commands/error-diagnostics-error-analysis.md +47 -0
- package/merged-commands/error-diagnostics-error-trace.md +48 -0
- package/merged-commands/error-diagnostics-smart-debug.md +197 -0
- package/merged-commands/error-handling-patterns.md +35 -0
- package/merged-commands/ethical-hacking-methodology.md +466 -0
- package/merged-commands/evaluation.md +238 -0
- package/merged-commands/event-sourcing-architect.md +58 -0
- package/merged-commands/event-store-design.md +449 -0
- package/merged-commands/exa-search.md +36 -0
- package/merged-commands/executing-plans.md +76 -0
- package/merged-commands/expo-app-design.md +22 -0
- package/merged-commands/expo-deployment.md +72 -0
- package/merged-commands/fal-audio.md +22 -0
- package/merged-commands/fal-generate.md +22 -0
- package/merged-commands/fal-image-edit.md +22 -0
- package/merged-commands/fal-platform.md +22 -0
- package/merged-commands/fal-upscale.md +22 -0
- package/merged-commands/fal-workflow.md +22 -0
- package/merged-commands/fastapi-expert.md +93 -0
- package/merged-commands/fastapi-pro.md +192 -0
- package/merged-commands/fastapi-router.md +52 -0
- package/merged-commands/fastapi-templates.md +32 -0
- package/merged-commands/feature-forge.md +90 -0
- package/merged-commands/ffuf-claude-skill.md +22 -0
- package/merged-commands/file-organizer.md +250 -0
- package/merged-commands/file-path-traversal.md +486 -0
- package/merged-commands/file-uploads.md +22 -0
- package/merged-commands/find-bugs.md +86 -0
- package/merged-commands/fine-tuning-expert.md +98 -0
- package/merged-commands/finishing-a-development-branch.md +200 -0
- package/merged-commands/firebase.md +56 -0
- package/merged-commands/firecrawl-scraper.md +37 -0
- package/merged-commands/firmware-analyst.md +320 -0
- package/merged-commands/fix-review.md +53 -0
- package/merged-commands/fixing.md +72 -0
- package/merged-commands/flutter-expert.md +200 -0
- package/merged-commands/form-cro.md +441 -0
- package/merged-commands/foundry-iq-agent.md +15 -0
- package/merged-commands/foundry-iq-python.md +275 -0
- package/merged-commands/foundry-nextgen-frontend.md +555 -0
- package/merged-commands/foundry-sdk-python.md +290 -0
- package/merged-commands/fp-ts-errors.md +856 -0
- package/merged-commands/fp-ts-pragmatic.md +598 -0
- package/merged-commands/fp-ts-react.md +796 -0
- package/merged-commands/framework-migration-code-migrate.md +48 -0
- package/merged-commands/framework-migration-deps-upgrade.md +48 -0
- package/merged-commands/framework-migration-legacy-modernize.md +132 -0
- package/merged-commands/free-tool-strategy.md +576 -0
- package/merged-commands/frontend-design.md +272 -0
- package/merged-commands/frontend-dev-guidelines.md +359 -0
- package/merged-commands/frontend-developer.md +171 -0
- package/merged-commands/frontend-development.md +399 -0
- package/merged-commands/frontend-mobile-development-component-scaffold.md +403 -0
- package/merged-commands/frontend-mobile-security-xss-scan.md +322 -0
- package/merged-commands/frontend-security-coder.md +170 -0
- package/merged-commands/frontend-slides.md +770 -0
- package/merged-commands/full-stack-orchestration-full-stack-feature.md +135 -0
- package/merged-commands/fullstack-guardian.md +99 -0
- package/merged-commands/game-developer.md +94 -0
- package/merged-commands/game-development.md +167 -0
- package/merged-commands/gcp-cloud-run.md +288 -0
- package/merged-commands/gdpr-data-handling.md +33 -0
- package/merged-commands/geo-fundamentals.md +156 -0
- package/merged-commands/git-advanced-workflows.md +412 -0
- package/merged-commands/git-pr-workflows-git-workflow.md +140 -0
- package/merged-commands/git-pr-workflows-onboard.md +416 -0
- package/merged-commands/git-pr-workflows-pr-enhance.md +48 -0
- package/merged-commands/git-pushing.md +33 -0
- package/merged-commands/github-actions-templates.md +345 -0
- package/merged-commands/github-workflow-automation.md +846 -0
- package/merged-commands/gitlab-ci-patterns.md +283 -0
- package/merged-commands/gitops-workflow.md +303 -0
- package/merged-commands/go-concurrency-patterns.md +33 -0
- package/merged-commands/godot-gdscript-patterns.md +33 -0
- package/merged-commands/golang-pro.md +179 -0
- package/merged-commands/google-adk-python.md +243 -0
- package/merged-commands/grafana-dashboards.md +381 -0
- package/merged-commands/graphql-architect.md +182 -0
- package/merged-commands/graphql.md +68 -0
- package/merged-commands/haskell-pro.md +56 -0
- package/merged-commands/helm-chart-scaffolding.md +34 -0
- package/merged-commands/hr-pro.md +126 -0
- package/merged-commands/html-injection-testing.md +498 -0
- package/merged-commands/hubspot-integration.md +42 -0
- package/merged-commands/hugging-face-cli.md +198 -0
- package/merged-commands/hugging-face-jobs.md +1038 -0
- package/merged-commands/hybrid-cloud-architect.md +168 -0
- package/merged-commands/hybrid-cloud-networking.md +238 -0
- package/merged-commands/hybrid-search-implementation.md +32 -0
- package/merged-commands/i18n-localization.md +154 -0
- package/merged-commands/idor-testing.md +442 -0
- package/merged-commands/image-enhancer.md +99 -0
- package/merged-commands/imagen.md +77 -0
- package/merged-commands/incident-responder.md +213 -0
- package/merged-commands/incident-response-incident-response.md +168 -0
- package/merged-commands/incident-response-smart-fix.md +29 -0
- package/merged-commands/incident-runbook-templates.md +395 -0
- package/merged-commands/infinite-gratitude.md +26 -0
- package/merged-commands/inngest.md +55 -0
- package/merged-commands/interactive-portfolio.md +223 -0
- package/merged-commands/internal-comms-anthropic.md +32 -0
- package/merged-commands/internal-comms-community.md +32 -0
- package/merged-commands/internal-comms.md +32 -0
- package/merged-commands/invoice-organizer.md +446 -0
- package/merged-commands/ios-developer.md +219 -0
- package/merged-commands/issue-creator.md +137 -0
- package/merged-commands/istio-traffic-management.md +337 -0
- package/merged-commands/iterate-pr.md +150 -0
- package/merged-commands/java-architect.md +95 -0
- package/merged-commands/java-pro.md +177 -0
- package/merged-commands/javascript-mastery.md +645 -0
- package/merged-commands/javascript-pro.md +57 -0
- package/merged-commands/javascript-testing-patterns.md +35 -0
- package/merged-commands/javascript-typescript-typescript-scaffold.md +361 -0
- package/merged-commands/javascript-typescript.md +142 -0
- package/merged-commands/jira-issues.md +181 -0
- package/merged-commands/job-application.md +90 -0
- package/merged-commands/julia-pro.md +209 -0
- package/merged-commands/k8s-manifest-generator.md +35 -0
- package/merged-commands/k8s-security-policies.md +346 -0
- package/merged-commands/kaizen.md +730 -0
- package/merged-commands/kotlin-specialist.md +94 -0
- package/merged-commands/kpi-dashboard-design.md +440 -0
- package/merged-commands/kubernetes-architect.md +170 -0
- package/merged-commands/kubernetes-specialist.md +117 -0
- package/merged-commands/langchain-architecture.md +350 -0
- package/merged-commands/langfuse.md +238 -0
- package/merged-commands/langgraph.md +287 -0
- package/merged-commands/laravel-specialist.md +101 -0
- package/merged-commands/last30days.md +421 -0
- package/merged-commands/launch-strategy.md +344 -0
- package/merged-commands/lead-research-assistant.md +199 -0
- package/merged-commands/learn.md +476 -0
- package/merged-commands/legacy-modernizer.md +53 -0
- package/merged-commands/legal-advisor.md +70 -0
- package/merged-commands/linear-claude-skill.md +543 -0
- package/merged-commands/linkerd-patterns.md +321 -0
- package/merged-commands/lint-and-validate.md +45 -0
- package/merged-commands/linux-privilege-escalation.md +504 -0
- package/merged-commands/linux-shell-scripting.md +504 -0
- package/merged-commands/llm-app-patterns.md +760 -0
- package/merged-commands/llm-application-dev-ai-assistant.md +35 -0
- package/merged-commands/llm-application-dev-langchain-agent.md +246 -0
- package/merged-commands/llm-application-dev-prompt-optimize.md +37 -0
- package/merged-commands/llm-application-dev.md +216 -0
- package/merged-commands/llm-evaluation.md +483 -0
- package/merged-commands/loki-mode.md +721 -0
- package/merged-commands/machine-learning-ops-ml-pipeline.md +314 -0
- package/merged-commands/makepad-skills.md +22 -0
- package/merged-commands/malware-analyst.md +247 -0
- package/merged-commands/markdown-novel-viewer.md +281 -0
- package/merged-commands/market-sizing-analysis.md +425 -0
- package/merged-commands/marketing-ideas.md +221 -0
- package/merged-commands/marketing-psychology.md +255 -0
- package/merged-commands/mcp-builder.md +236 -0
- package/merged-commands/mcp-developer.md +94 -0
- package/merged-commands/mcp-management.md +209 -0
- package/merged-commands/media-processing.md +358 -0
- package/merged-commands/meeting-insights-analyzer.md +327 -0
- package/merged-commands/memory-forensics.md +491 -0
- package/merged-commands/memory-safety-patterns.md +33 -0
- package/merged-commands/memory-systems.md +228 -0
- package/merged-commands/mermaid-expert.md +59 -0
- package/merged-commands/mermaidjs-v11.md +115 -0
- package/merged-commands/metasploit-framework.md +478 -0
- package/merged-commands/micro-saas-launcher.md +212 -0
- package/merged-commands/microservices-architect.md +102 -0
- package/merged-commands/microservices-patterns.md +35 -0
- package/merged-commands/minecraft-bukkit-pro.md +126 -0
- package/merged-commands/ml-engineer.md +168 -0
- package/merged-commands/ml-pipeline-workflow.md +257 -0
- package/merged-commands/ml-pipeline.md +111 -0
- package/merged-commands/mlops-engineer.md +219 -0
- package/merged-commands/mobile-design.md +284 -0
- package/merged-commands/mobile-developer.md +205 -0
- package/merged-commands/mobile-development.md +212 -0
- package/merged-commands/mobile-security-coder.md +184 -0
- package/merged-commands/modern-javascript-patterns.md +35 -0
- package/merged-commands/monitoring-expert.md +92 -0
- package/merged-commands/monorepo-architect.md +61 -0
- package/merged-commands/monorepo-management.md +35 -0
- package/merged-commands/moodle-external-api-development.md +597 -0
- package/merged-commands/mtls-configuration.md +359 -0
- package/merged-commands/multi-agent-brainstorming.md +256 -0
- package/merged-commands/multi-agent-patterns.md +262 -0
- package/merged-commands/multi-cloud-architecture.md +189 -0
- package/merged-commands/multi-platform-apps-multi-platform.md +203 -0
- package/merged-commands/n8n-code-python.md +750 -0
- package/merged-commands/n8n-mcp-tools-expert.md +654 -0
- package/merged-commands/n8n-node-configuration.md +796 -0
- package/merged-commands/nanobanana-ppt-skills.md +22 -0
- package/merged-commands/neon-postgres.md +56 -0
- package/merged-commands/nestjs-expert.md +552 -0
- package/merged-commands/network-101.md +342 -0
- package/merged-commands/network-engineer.md +169 -0
- package/merged-commands/nextjs-app-router-patterns.md +33 -0
- package/merged-commands/nextjs-best-practices.md +203 -0
- package/merged-commands/nextjs-developer.md +97 -0
- package/merged-commands/nextjs-supabase-auth.md +56 -0
- package/merged-commands/nft-standards.md +395 -0
- package/merged-commands/nodejs-backend-patterns.md +35 -0
- package/merged-commands/nodejs-best-practices.md +333 -0
- package/merged-commands/nosql-expert.md +111 -0
- package/merged-commands/notebooklm-skill.md +269 -0
- package/merged-commands/notebooklm.md +269 -0
- package/merged-commands/notion-template-business.md +216 -0
- package/merged-commands/nx-workspace-patterns.md +464 -0
- package/merged-commands/observability-engineer.md +237 -0
- package/merged-commands/observability-monitoring-monitor-setup.md +48 -0
- package/merged-commands/observability-monitoring-slo-implement.md +43 -0
- package/merged-commands/observe-whatsapp.md +109 -0
- package/merged-commands/obsidian-clipper-template-creator.md +64 -0
- package/merged-commands/on-call-handoff-patterns.md +453 -0
- package/merged-commands/onboarding-cro.md +433 -0
- package/merged-commands/openapi-spec-generation.md +33 -0
- package/merged-commands/page-cro.md +343 -0
- package/merged-commands/paid-ads.md +551 -0
- package/merged-commands/pandas-pro.md +96 -0
- package/merged-commands/parallel-agents.md +175 -0
- package/merged-commands/payment-integration.md +77 -0
- package/merged-commands/paypal-integration.md +479 -0
- package/merged-commands/paywall-upgrade-cro.md +570 -0
- package/merged-commands/pci-compliance.md +478 -0
- package/merged-commands/pdf-official.md +294 -0
- package/merged-commands/pdf.md +294 -0
- package/merged-commands/pentest-checklist.md +334 -0
- package/merged-commands/pentest-commands.md +438 -0
- package/merged-commands/performance-engineer.md +180 -0
- package/merged-commands/performance-profiling.md +143 -0
- package/merged-commands/performance-testing-review-ai-review.md +450 -0
- package/merged-commands/performance-testing-review-multi-agent-review.md +216 -0
- package/merged-commands/personal-tool-builder.md +289 -0
- package/merged-commands/php-pro.md +63 -0
- package/merged-commands/plaid-fintech.md +50 -0
- package/merged-commands/plan-writing.md +152 -0
- package/merged-commands/planning-with-files.md +211 -0
- package/merged-commands/planning.md +95 -0
- package/merged-commands/plans-kanban.md +166 -0
- package/merged-commands/playwright-expert.md +87 -0
- package/merged-commands/playwright-skill.md +453 -0
- package/merged-commands/podcast-generation.md +121 -0
- package/merged-commands/popup-cro.md +346 -0
- package/merged-commands/posix-shell-pro.md +304 -0
- package/merged-commands/postgres-best-practices.md +57 -0
- package/merged-commands/postgres-pro.md +98 -0
- package/merged-commands/postgresql.md +230 -0
- package/merged-commands/postmortem-writing.md +386 -0
- package/merged-commands/powershell-windows.md +167 -0
- package/merged-commands/pptx-official.md +484 -0
- package/merged-commands/pptx.md +484 -0
- package/merged-commands/pricing-strategy.md +356 -0
- package/merged-commands/prisma-expert.md +355 -0
- package/merged-commands/privilege-escalation-methods.md +333 -0
- package/merged-commands/problem-solving.md +96 -0
- package/merged-commands/product-manager-toolkit.md +351 -0
- package/merged-commands/product-strategist.md +26 -0
- package/merged-commands/production-code-audit.md +540 -0
- package/merged-commands/programmatic-seo.md +351 -0
- package/merged-commands/projection-patterns.md +33 -0
- package/merged-commands/prometheus-configuration.md +404 -0
- package/merged-commands/prompt-caching.md +61 -0
- package/merged-commands/prompt-engineer.md +272 -0
- package/merged-commands/prompt-engineering-patterns.md +213 -0
- package/merged-commands/prompt-engineering.md +171 -0
- package/merged-commands/prompt-library.md +322 -0
- package/merged-commands/protocol-reverse-engineering.md +29 -0
- package/merged-commands/pydantic-models.md +58 -0
- package/merged-commands/pypict-skill.md +22 -0
- package/merged-commands/python-development-python-scaffold.md +331 -0
- package/merged-commands/python-development.md +139 -0
- package/merged-commands/python-packaging.md +36 -0
- package/merged-commands/python-patterns.md +441 -0
- package/merged-commands/python-performance-optimization.md +36 -0
- package/merged-commands/python-pro.md +158 -0
- package/merged-commands/python-testing-patterns.md +37 -0
- package/merged-commands/qa-regression.md +337 -0
- package/merged-commands/quant-analyst.md +53 -0
- package/merged-commands/radix-ui-design-system.md +847 -0
- package/merged-commands/raffle-winner-picker.md +159 -0
- package/merged-commands/rag-architect.md +100 -0
- package/merged-commands/rag-engineer.md +90 -0
- package/merged-commands/rag-implementation.md +421 -0
- package/merged-commands/rails-expert.md +97 -0
- package/merged-commands/react-best-practices.md +121 -0
- package/merged-commands/react-expert.md +98 -0
- package/merged-commands/react-flow-node.md +66 -0
- package/merged-commands/react-modernization.md +34 -0
- package/merged-commands/react-native-architecture.md +33 -0
- package/merged-commands/react-native-expert.md +88 -0
- package/merged-commands/react-patterns.md +198 -0
- package/merged-commands/react-state-management.md +441 -0
- package/merged-commands/react-ui-patterns.md +289 -0
- package/merged-commands/readme.md +775 -0
- package/merged-commands/receiving-code-review.md +213 -0
- package/merged-commands/red-team-tactics.md +199 -0
- package/merged-commands/red-team-tools.md +310 -0
- package/merged-commands/reference-builder.md +188 -0
- package/merged-commands/referral-program.md +602 -0
- package/merged-commands/remotion-best-practices.md +45 -0
- package/merged-commands/repomix.md +275 -0
- package/merged-commands/requesting-code-review.md +105 -0
- package/merged-commands/research-engineer.md +135 -0
- package/merged-commands/research.md +191 -0
- package/merged-commands/reverse-engineer.md +173 -0
- package/merged-commands/risk-manager.md +61 -0
- package/merged-commands/risk-metrics-calculation.md +33 -0
- package/merged-commands/ruby-pro.md +56 -0
- package/merged-commands/rust-async-patterns.md +33 -0
- package/merged-commands/rust-engineer.md +96 -0
- package/merged-commands/rust-pro.md +178 -0
- package/merged-commands/saga-orchestration.md +496 -0
- package/merged-commands/sales-automator.md +55 -0
- package/merged-commands/salesforce-developer.md +105 -0
- package/merged-commands/salesforce-development.md +51 -0
- package/merged-commands/sast-configuration.md +212 -0
- package/merged-commands/scala-pro.md +82 -0
- package/merged-commands/scanning-tools.md +589 -0
- package/merged-commands/schema-markup.md +360 -0
- package/merged-commands/screen-reader-testing.md +33 -0
- package/merged-commands/screenshots.md +401 -0
- package/merged-commands/scroll-experience.md +263 -0
- package/merged-commands/search-specialist.md +80 -0
- package/merged-commands/secrets-management.md +364 -0
- package/merged-commands/secure-code-guardian.md +93 -0
- package/merged-commands/security-auditor.md +169 -0
- package/merged-commands/security-bluebook-builder.md +22 -0
- package/merged-commands/security-compliance-compliance-check.md +55 -0
- package/merged-commands/security-requirement-extraction.md +33 -0
- package/merged-commands/security-reviewer.md +94 -0
- package/merged-commands/security-scanning-security-dependencies.md +43 -0
- package/merged-commands/security-scanning-security-hardening.md +147 -0
- package/merged-commands/security-scanning-security-sast.md +495 -0
- package/merged-commands/segment-cdp.md +50 -0
- package/merged-commands/senior-architect.md +209 -0
- package/merged-commands/senior-backend.md +209 -0
- package/merged-commands/senior-computer-vision.md +226 -0
- package/merged-commands/senior-data-engineer.md +226 -0
- package/merged-commands/senior-data-scientist.md +226 -0
- package/merged-commands/senior-devops.md +209 -0
- package/merged-commands/senior-frontend.md +209 -0
- package/merged-commands/senior-fullstack.md +209 -0
- package/merged-commands/senior-ml-engineer.md +226 -0
- package/merged-commands/senior-prompt-engineer.md +226 -0
- package/merged-commands/senior-qa.md +209 -0
- package/merged-commands/senior-secops.md +209 -0
- package/merged-commands/senior-security.md +209 -0
- package/merged-commands/seo-audit.md +487 -0
- package/merged-commands/seo-authority-builder.md +136 -0
- package/merged-commands/seo-cannibalization-detector.md +123 -0
- package/merged-commands/seo-content-auditor.md +83 -0
- package/merged-commands/seo-content-planner.md +108 -0
- package/merged-commands/seo-content-refresher.md +118 -0
- package/merged-commands/seo-content-writer.md +96 -0
- package/merged-commands/seo-fundamentals.md +173 -0
- package/merged-commands/seo-keyword-strategist.md +95 -0
- package/merged-commands/seo-meta-optimizer.md +92 -0
- package/merged-commands/seo-snippet-hunter.md +114 -0
- package/merged-commands/seo-structure-architect.md +108 -0
- package/merged-commands/sequential-thinking.md +94 -0
- package/merged-commands/server-management.md +161 -0
- package/merged-commands/service-mesh-expert.md +58 -0
- package/merged-commands/service-mesh-observability.md +395 -0
- package/merged-commands/sharp-edges.md +70 -0
- package/merged-commands/shellcheck-configuration.md +466 -0
- package/merged-commands/shodan-reconnaissance.md +503 -0
- package/merged-commands/shopify-apps.md +42 -0
- package/merged-commands/shopify-development.md +366 -0
- package/merged-commands/shopify-expert.md +102 -0
- package/merged-commands/signup-flow-cro.md +355 -0
- package/merged-commands/similarity-search-patterns.md +33 -0
- package/merged-commands/skill-creator.md +356 -0
- package/merged-commands/skill-developer.md +426 -0
- package/merged-commands/skill-rails-upgrade.md +408 -0
- package/merged-commands/skill-seekers.md +22 -0
- package/merged-commands/skill-share.md +80 -0
- package/merged-commands/slack-bot-builder.md +264 -0
- package/merged-commands/slack-gif-creator.md +254 -0
- package/merged-commands/slo-implementation.md +341 -0
- package/merged-commands/smtp-penetration-testing.md +500 -0
- package/merged-commands/social-content.md +807 -0
- package/merged-commands/software-architecture.md +75 -0
- package/merged-commands/solidity-security.md +34 -0
- package/merged-commands/spark-engineer.md +100 -0
- package/merged-commands/spark-optimization.md +427 -0
- package/merged-commands/spec-miner.md +88 -0
- package/merged-commands/spring-boot-engineer.md +104 -0
- package/merged-commands/sql-injection-testing.md +448 -0
- package/merged-commands/sql-optimization-patterns.md +35 -0
- package/merged-commands/sql-pro.md +173 -0
- package/merged-commands/sqlmap-database-pentesting.md +400 -0
- package/merged-commands/sre-engineer.md +98 -0
- package/merged-commands/ssh-penetration-testing.md +488 -0
- package/merged-commands/startup-analyst.md +328 -0
- package/merged-commands/startup-business-analyst-business-case.md +487 -0
- package/merged-commands/startup-business-analyst-financial-projections.md +353 -0
- package/merged-commands/startup-business-analyst-market-opportunity.md +240 -0
- package/merged-commands/startup-financial-modeling.md +467 -0
- package/merged-commands/startup-metrics-framework.md +34 -0
- package/merged-commands/stitch-ui-design.md +378 -0
- package/merged-commands/stride-analysis-patterns.md +33 -0
- package/merged-commands/stripe-integration.md +454 -0
- package/merged-commands/subagent-driven-development.md +240 -0
- package/merged-commands/superpowers-lab.md +22 -0
- package/merged-commands/swift-expert.md +94 -0
- package/merged-commands/swiftui-expert-skill.md +275 -0
- package/merged-commands/systematic-debugging.md +296 -0
- package/merged-commands/systems-programming-rust-project.md +440 -0
- package/merged-commands/tailwind-design-system.md +33 -0
- package/merged-commands/tailwind-patterns.md +269 -0
- package/merged-commands/tavily-web.md +36 -0
- package/merged-commands/tdd-orchestrator.md +205 -0
- package/merged-commands/tdd-workflow.md +149 -0
- package/merged-commands/tdd-workflows-tdd-cycle.md +221 -0
- package/merged-commands/tdd-workflows-tdd-green.md +73 -0
- package/merged-commands/tdd-workflows-tdd-red.md +164 -0
- package/merged-commands/tdd-workflows-tdd-refactor.md +187 -0
- package/merged-commands/team-collaboration-issue.md +37 -0
- package/merged-commands/team-collaboration-standup-notes.md +44 -0
- package/merged-commands/team-composition-analysis.md +413 -0
- package/merged-commands/telegram-bot-builder.md +254 -0
- package/merged-commands/telegram-mini-app.md +279 -0
- package/merged-commands/template-skill.md +6 -0
- package/merged-commands/temporal-python-pro.md +370 -0
- package/merged-commands/temporal-python-testing.md +170 -0
- package/merged-commands/terraform-engineer.md +97 -0
- package/merged-commands/terraform-module-library.md +261 -0
- package/merged-commands/terraform-skill.md +517 -0
- package/merged-commands/terraform-specialist.md +166 -0
- package/merged-commands/test-automator.md +224 -0
- package/merged-commands/test-driven-development.md +371 -0
- package/merged-commands/test-fixing.md +119 -0
- package/merged-commands/test-master.md +104 -0
- package/merged-commands/testing-patterns.md +259 -0
- package/merged-commands/theme-factory.md +59 -0
- package/merged-commands/threat-mitigation-mapping.md +33 -0
- package/merged-commands/threat-modeling-expert.md +60 -0
- package/merged-commands/threejs-skills.md +22 -0
- package/merged-commands/threejs.md +89 -0
- package/merged-commands/tool-design.md +318 -0
- package/merged-commands/top-web-vulnerabilities.md +543 -0
- package/merged-commands/track-management.md +38 -0
- package/merged-commands/trigger-dev.md +67 -0
- package/merged-commands/turborepo-caching.md +419 -0
- package/merged-commands/tutorial-engineer.md +139 -0
- package/merged-commands/twilio-communications.md +295 -0
- package/merged-commands/typescript-advanced-types.md +35 -0
- package/merged-commands/typescript-expert.md +429 -0
- package/merged-commands/typescript-pro.md +55 -0
- package/merged-commands/ui-design-system.md +32 -0
- package/merged-commands/ui-skills.md +22 -0
- package/merged-commands/ui-styling.md +321 -0
- package/merged-commands/ui-ux-designer.md +209 -0
- package/merged-commands/ui-ux-pro-max.md +351 -0
- package/merged-commands/ui-visual-validator.md +214 -0
- package/merged-commands/unit-testing-test-generate.md +319 -0
- package/merged-commands/unity-developer.md +230 -0
- package/merged-commands/unity-ecs-patterns.md +33 -0
- package/merged-commands/unreal-engine-cpp-pro.md +114 -0
- package/merged-commands/upgrading-expo.md +118 -0
- package/merged-commands/upstash-qstash.md +68 -0
- package/merged-commands/using-git-worktrees.md +217 -0
- package/merged-commands/using-neon.md +84 -0
- package/merged-commands/using-superpowers.md +87 -0
- package/merged-commands/uv-package-manager.md +37 -0
- package/merged-commands/ux-researcher-designer.md +30 -0
- package/merged-commands/varlock-claude-skill.md +22 -0
- package/merged-commands/vector-database-engineer.md +60 -0
- package/merged-commands/vector-index-tuning.md +42 -0
- package/merged-commands/vercel-deploy-claimable.md +120 -0
- package/merged-commands/vercel-deploy.md +22 -0
- package/merged-commands/vercel-deployment.md +79 -0
- package/merged-commands/verification-before-completion.md +139 -0
- package/merged-commands/vexor.md +22 -0
- package/merged-commands/video-downloader.md +106 -0
- package/merged-commands/viral-generator-builder.md +199 -0
- package/merged-commands/voice-agents.md +68 -0
- package/merged-commands/voice-ai-development.md +302 -0
- package/merged-commands/voice-ai-engine-development.md +721 -0
- package/merged-commands/vue-expert-js.md +91 -0
- package/merged-commands/vue-expert.md +374 -0
- package/merged-commands/vulnerability-scanner.md +276 -0
- package/merged-commands/wcag-audit-patterns.md +41 -0
- package/merged-commands/web-artifacts-builder.md +74 -0
- package/merged-commands/web-design-guidelines.md +36 -0
- package/merged-commands/web-frameworks.md +324 -0
- package/merged-commands/web-performance-optimization.md +646 -0
- package/merged-commands/web3-testing.md +427 -0
- package/merged-commands/webapp-testing.md +96 -0
- package/merged-commands/websocket-engineer.md +96 -0
- package/merged-commands/windows-privilege-escalation.md +496 -0
- package/merged-commands/wireshark-analysis.md +497 -0
- package/merged-commands/wordpress-penetration-testing.md +485 -0
- package/merged-commands/wordpress-pro.md +105 -0
- package/merged-commands/workflow-automation.md +68 -0
- package/merged-commands/workflow-orchestration-patterns.md +333 -0
- package/merged-commands/workflow-patterns.md +38 -0
- package/merged-commands/writing-plans.md +116 -0
- package/merged-commands/writing-skills.md +125 -0
- package/merged-commands/x-article-publisher-skill.md +22 -0
- package/merged-commands/xlsx-official.md +289 -0
- package/merged-commands/xlsx.md +289 -0
- package/merged-commands/xss-html-injection.md +499 -0
- package/merged-commands/youtube-transcript.md +415 -0
- package/merged-commands/zapier-make-patterns.md +67 -0
- package/merged-commands/zustand-store.md +68 -0
- package/package.json +1 -1
- package/scripts/merge-commands.js +21 -0
|
@@ -0,0 +1,847 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: radix-ui-design-system
|
|
3
|
+
description: Build accessible design systems with Radix UI primitives. Headless component customization, theming strategies, and compound component patterns for production-grade UI libraries.
|
|
4
|
+
risk: safe
|
|
5
|
+
source: self
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Radix UI Design System
|
|
9
|
+
|
|
10
|
+
Build production-ready, accessible design systems using Radix UI primitives with full customization control and zero style opinions.
|
|
11
|
+
|
|
12
|
+
## Overview
|
|
13
|
+
|
|
14
|
+
Radix UI provides unstyled, accessible components (primitives) that you can customize to match any design system. This skill guides you through building scalable component libraries with Radix UI, focusing on accessibility-first design, theming architecture, and composable patterns.
|
|
15
|
+
|
|
16
|
+
**Key Strengths:**
|
|
17
|
+
- **Headless by design**: Full styling control without fighting defaults
|
|
18
|
+
- **Accessibility built-in**: WAI-ARIA compliant, keyboard navigation, screen reader support
|
|
19
|
+
- **Composable primitives**: Build complex components from simple building blocks
|
|
20
|
+
- **Framework agnostic**: Works with React, but styles work anywhere
|
|
21
|
+
|
|
22
|
+
## When to Use This Skill
|
|
23
|
+
|
|
24
|
+
- Creating a custom design system from scratch
|
|
25
|
+
- Building accessible UI component libraries
|
|
26
|
+
- Implementing complex interactive components (Dialog, Dropdown, Tabs, etc.)
|
|
27
|
+
- Migrating from styled component libraries to unstyled primitives
|
|
28
|
+
- Setting up theming systems with CSS variables or Tailwind
|
|
29
|
+
- Need full control over component behavior and styling
|
|
30
|
+
- Building applications requiring WCAG 2.1 AA/AAA compliance
|
|
31
|
+
|
|
32
|
+
## Do not use this skill when
|
|
33
|
+
|
|
34
|
+
- You need pre-styled components out of the box (use shadcn/ui, Mantine, etc.)
|
|
35
|
+
- Building simple static pages without interactivity
|
|
36
|
+
- The project doesn't use React 16.8+ (Radix requires hooks)
|
|
37
|
+
- You need components for frameworks other than React
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
## Core Principles
|
|
42
|
+
|
|
43
|
+
### 1. Accessibility First
|
|
44
|
+
|
|
45
|
+
Every Radix primitive is built with accessibility as the foundation:
|
|
46
|
+
|
|
47
|
+
- **Keyboard Navigation**: Full keyboard support (Tab, Arrow keys, Enter, Escape)
|
|
48
|
+
- **Screen Readers**: Proper ARIA attributes and live regions
|
|
49
|
+
- **Focus Management**: Automatic focus trapping and restoration
|
|
50
|
+
- **Disabled States**: Proper handling of disabled and aria-disabled
|
|
51
|
+
|
|
52
|
+
**Rule**: Never override accessibility features. Enhance, don't replace.
|
|
53
|
+
|
|
54
|
+
### 2. Headless Architecture
|
|
55
|
+
|
|
56
|
+
Radix provides **behavior**, you provide **appearance**:
|
|
57
|
+
|
|
58
|
+
```tsx
|
|
59
|
+
// ❌ Don't fight pre-styled components
|
|
60
|
+
<Button className="override-everything" />
|
|
61
|
+
|
|
62
|
+
// ✅ Radix gives you behavior, you add styling
|
|
63
|
+
<Dialog.Root>
|
|
64
|
+
<Dialog.Trigger className="your-button-styles" />
|
|
65
|
+
<Dialog.Content className="your-modal-styles" />
|
|
66
|
+
</Dialog.Root>
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
### 3. Composition Over Configuration
|
|
70
|
+
|
|
71
|
+
Build complex components from simple primitives:
|
|
72
|
+
|
|
73
|
+
```tsx
|
|
74
|
+
// Primitive components compose naturally
|
|
75
|
+
<Tabs.Root>
|
|
76
|
+
<Tabs.List>
|
|
77
|
+
<Tabs.Trigger value="tab1">Tab 1</Tabs.Trigger>
|
|
78
|
+
<Tabs.Trigger value="tab2">Tab 2</Tabs.Trigger>
|
|
79
|
+
</Tabs.List>
|
|
80
|
+
<Tabs.Content value="tab1">Content 1</Tabs.Content>
|
|
81
|
+
<Tabs.Content value="tab2">Content 2</Tabs.Content>
|
|
82
|
+
</Tabs.Root>
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
---
|
|
86
|
+
|
|
87
|
+
## Getting Started
|
|
88
|
+
|
|
89
|
+
### Installation
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
# Install individual primitives (recommended)
|
|
93
|
+
npm install @radix-ui/react-dialog @radix-ui/react-dropdown-menu
|
|
94
|
+
|
|
95
|
+
# Or install multiple at once
|
|
96
|
+
npm install @radix-ui/react-{dialog,dropdown-menu,tabs,tooltip}
|
|
97
|
+
|
|
98
|
+
# For styling (optional but common)
|
|
99
|
+
npm install clsx tailwind-merge class-variance-authority
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
### Basic Component Pattern
|
|
103
|
+
|
|
104
|
+
Every Radix component follows this pattern:
|
|
105
|
+
|
|
106
|
+
```tsx
|
|
107
|
+
import * as Dialog from '@radix-ui/react-dialog';
|
|
108
|
+
|
|
109
|
+
export function MyDialog() {
|
|
110
|
+
return (
|
|
111
|
+
<Dialog.Root>
|
|
112
|
+
{/* Trigger the dialog */}
|
|
113
|
+
<Dialog.Trigger asChild>
|
|
114
|
+
<button className="trigger-styles">Open</button>
|
|
115
|
+
</Dialog.Trigger>
|
|
116
|
+
|
|
117
|
+
{/* Portal renders outside DOM hierarchy */}
|
|
118
|
+
<Dialog.Portal>
|
|
119
|
+
{/* Overlay (backdrop) */}
|
|
120
|
+
<Dialog.Overlay className="overlay-styles" />
|
|
121
|
+
|
|
122
|
+
{/* Content (modal) */}
|
|
123
|
+
<Dialog.Content className="content-styles">
|
|
124
|
+
<Dialog.Title>Title</Dialog.Title>
|
|
125
|
+
<Dialog.Description>Description</Dialog.Description>
|
|
126
|
+
|
|
127
|
+
{/* Your content here */}
|
|
128
|
+
|
|
129
|
+
<Dialog.Close asChild>
|
|
130
|
+
<button>Close</button>
|
|
131
|
+
</Dialog.Close>
|
|
132
|
+
</Dialog.Content>
|
|
133
|
+
</Dialog.Portal>
|
|
134
|
+
</Dialog.Root>
|
|
135
|
+
);
|
|
136
|
+
}
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
---
|
|
140
|
+
|
|
141
|
+
## Theming Strategies
|
|
142
|
+
|
|
143
|
+
### Strategy 1: CSS Variables (Framework-Agnostic)
|
|
144
|
+
|
|
145
|
+
**Best for**: Maximum portability, SSR-friendly
|
|
146
|
+
|
|
147
|
+
```css
|
|
148
|
+
/* globals.css */
|
|
149
|
+
:root {
|
|
150
|
+
--color-primary: 220 90% 56%;
|
|
151
|
+
--color-surface: 0 0% 100%;
|
|
152
|
+
--radius-base: 0.5rem;
|
|
153
|
+
--shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
[data-theme="dark"] {
|
|
157
|
+
--color-primary: 220 90% 66%;
|
|
158
|
+
--color-surface: 222 47% 11%;
|
|
159
|
+
}
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
```tsx
|
|
163
|
+
// Component.tsx
|
|
164
|
+
<Dialog.Content
|
|
165
|
+
className="
|
|
166
|
+
bg-[hsl(var(--color-surface))]
|
|
167
|
+
rounded-[var(--radius-base)]
|
|
168
|
+
shadow-[var(--shadow-lg)]
|
|
169
|
+
"
|
|
170
|
+
/>
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
### Strategy 2: Tailwind + CVA (Class Variance Authority)
|
|
174
|
+
|
|
175
|
+
**Best for**: Tailwind projects, variant-heavy components
|
|
176
|
+
|
|
177
|
+
```tsx
|
|
178
|
+
// button.tsx
|
|
179
|
+
import { cva, type VariantProps } from 'class-variance-authority';
|
|
180
|
+
import { cn } from '@/lib/utils';
|
|
181
|
+
|
|
182
|
+
const buttonVariants = cva(
|
|
183
|
+
// Base styles
|
|
184
|
+
"inline-flex items-center justify-center rounded-md font-medium transition-colors focus-visible:outline-none disabled:pointer-events-none disabled:opacity-50",
|
|
185
|
+
{
|
|
186
|
+
variants: {
|
|
187
|
+
variant: {
|
|
188
|
+
default: "bg-primary text-primary-foreground hover:bg-primary/90",
|
|
189
|
+
destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
|
|
190
|
+
outline: "border border-input bg-background hover:bg-accent",
|
|
191
|
+
ghost: "hover:bg-accent hover:text-accent-foreground",
|
|
192
|
+
},
|
|
193
|
+
size: {
|
|
194
|
+
default: "h-10 px-4 py-2",
|
|
195
|
+
sm: "h-9 rounded-md px-3",
|
|
196
|
+
lg: "h-11 rounded-md px-8",
|
|
197
|
+
icon: "h-10 w-10",
|
|
198
|
+
},
|
|
199
|
+
},
|
|
200
|
+
defaultVariants: {
|
|
201
|
+
variant: "default",
|
|
202
|
+
size: "default",
|
|
203
|
+
},
|
|
204
|
+
}
|
|
205
|
+
);
|
|
206
|
+
|
|
207
|
+
interface ButtonProps extends VariantProps<typeof buttonVariants> {
|
|
208
|
+
children: React.ReactNode;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
export function Button({ variant, size, children }: ButtonProps) {
|
|
212
|
+
return (
|
|
213
|
+
<button className={cn(buttonVariants({ variant, size }))}>
|
|
214
|
+
{children}
|
|
215
|
+
</button>
|
|
216
|
+
);
|
|
217
|
+
}
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
### Strategy 3: Stitches (CSS-in-JS)
|
|
221
|
+
|
|
222
|
+
**Best for**: Runtime theming, scoped styles
|
|
223
|
+
|
|
224
|
+
```tsx
|
|
225
|
+
import { styled } from '@stitches/react';
|
|
226
|
+
import * as Dialog from '@radix-ui/react-dialog';
|
|
227
|
+
|
|
228
|
+
const StyledContent = styled(Dialog.Content, {
|
|
229
|
+
backgroundColor: '$surface',
|
|
230
|
+
borderRadius: '$md',
|
|
231
|
+
padding: '$6',
|
|
232
|
+
|
|
233
|
+
variants: {
|
|
234
|
+
size: {
|
|
235
|
+
small: { width: '300px' },
|
|
236
|
+
medium: { width: '500px' },
|
|
237
|
+
large: { width: '700px' },
|
|
238
|
+
},
|
|
239
|
+
},
|
|
240
|
+
|
|
241
|
+
defaultVariants: {
|
|
242
|
+
size: 'medium',
|
|
243
|
+
},
|
|
244
|
+
});
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
---
|
|
248
|
+
|
|
249
|
+
## Component Patterns
|
|
250
|
+
|
|
251
|
+
### Pattern 1: Compound Components with Context
|
|
252
|
+
|
|
253
|
+
**Use case**: Share state between primitive parts
|
|
254
|
+
|
|
255
|
+
```tsx
|
|
256
|
+
// Select.tsx
|
|
257
|
+
import * as Select from '@radix-ui/react-select';
|
|
258
|
+
import { CheckIcon, ChevronDownIcon } from '@radix-ui/react-icons';
|
|
259
|
+
|
|
260
|
+
export function CustomSelect({ items, placeholder, onValueChange }) {
|
|
261
|
+
return (
|
|
262
|
+
<Select.Root onValueChange={onValueChange}>
|
|
263
|
+
<Select.Trigger className="select-trigger">
|
|
264
|
+
<Select.Value placeholder={placeholder} />
|
|
265
|
+
<Select.Icon>
|
|
266
|
+
<ChevronDownIcon />
|
|
267
|
+
</Select.Icon>
|
|
268
|
+
</Select.Trigger>
|
|
269
|
+
|
|
270
|
+
<Select.Portal>
|
|
271
|
+
<Select.Content className="select-content">
|
|
272
|
+
<Select.Viewport>
|
|
273
|
+
{items.map((item) => (
|
|
274
|
+
<Select.Item
|
|
275
|
+
key={item.value}
|
|
276
|
+
value={item.value}
|
|
277
|
+
className="select-item"
|
|
278
|
+
>
|
|
279
|
+
<Select.ItemText>{item.label}</Select.ItemText>
|
|
280
|
+
<Select.ItemIndicator>
|
|
281
|
+
<CheckIcon />
|
|
282
|
+
</Select.ItemIndicator>
|
|
283
|
+
</Select.Item>
|
|
284
|
+
))}
|
|
285
|
+
</Select.Viewport>
|
|
286
|
+
</Select.Content>
|
|
287
|
+
</Select.Portal>
|
|
288
|
+
</Select.Root>
|
|
289
|
+
);
|
|
290
|
+
}
|
|
291
|
+
```
|
|
292
|
+
|
|
293
|
+
### Pattern 2: Polymorphic Components with `asChild`
|
|
294
|
+
|
|
295
|
+
**Use case**: Render as different elements without losing behavior
|
|
296
|
+
|
|
297
|
+
```tsx
|
|
298
|
+
// ✅ Render as Next.js Link but keep Radix behavior
|
|
299
|
+
<Dialog.Trigger asChild>
|
|
300
|
+
<Link href="/settings">Open Settings</Link>
|
|
301
|
+
</Dialog.Trigger>
|
|
302
|
+
|
|
303
|
+
// ✅ Render as custom component
|
|
304
|
+
<DropdownMenu.Item asChild>
|
|
305
|
+
<YourCustomButton icon={<Icon />}>Action</YourCustomButton>
|
|
306
|
+
</DropdownMenu.Item>
|
|
307
|
+
```
|
|
308
|
+
|
|
309
|
+
**Why `asChild` matters**: Prevents nested button/link issues in accessibility tree.
|
|
310
|
+
|
|
311
|
+
### Pattern 3: Controlled vs Uncontrolled
|
|
312
|
+
|
|
313
|
+
```tsx
|
|
314
|
+
// Uncontrolled (Radix manages state)
|
|
315
|
+
<Tabs.Root defaultValue="tab1">
|
|
316
|
+
<Tabs.Trigger value="tab1">Tab 1</Tabs.Trigger>
|
|
317
|
+
</Tabs.Root>
|
|
318
|
+
|
|
319
|
+
// Controlled (You manage state)
|
|
320
|
+
const [activeTab, setActiveTab] = useState('tab1');
|
|
321
|
+
|
|
322
|
+
<Tabs.Root value={activeTab} onValueChange={setActiveTab}>
|
|
323
|
+
<Tabs.Trigger value="tab1">Tab 1</Tabs.Trigger>
|
|
324
|
+
</Tabs.Root>
|
|
325
|
+
```
|
|
326
|
+
|
|
327
|
+
**Rule**: Use controlled when you need to sync with external state (URL, Redux, etc.).
|
|
328
|
+
|
|
329
|
+
### Pattern 4: Animation with Framer Motion
|
|
330
|
+
|
|
331
|
+
```tsx
|
|
332
|
+
import * as Dialog from '@radix-ui/react-dialog';
|
|
333
|
+
import { motion, AnimatePresence } from 'framer-motion';
|
|
334
|
+
|
|
335
|
+
export function AnimatedDialog({ open, onOpenChange }) {
|
|
336
|
+
return (
|
|
337
|
+
<Dialog.Root open={open} onOpenChange={onOpenChange}>
|
|
338
|
+
<Dialog.Portal forceMount>
|
|
339
|
+
<AnimatePresence>
|
|
340
|
+
{open && (
|
|
341
|
+
<>
|
|
342
|
+
<Dialog.Overlay asChild>
|
|
343
|
+
<motion.div
|
|
344
|
+
initial={{ opacity: 0 }}
|
|
345
|
+
animate={{ opacity: 1 }}
|
|
346
|
+
exit={{ opacity: 0 }}
|
|
347
|
+
className="dialog-overlay"
|
|
348
|
+
/>
|
|
349
|
+
</Dialog.Overlay>
|
|
350
|
+
|
|
351
|
+
<Dialog.Content asChild>
|
|
352
|
+
<motion.div
|
|
353
|
+
initial={{ opacity: 0, scale: 0.95 }}
|
|
354
|
+
animate={{ opacity: 1, scale: 1 }}
|
|
355
|
+
exit={{ opacity: 0, scale: 0.95 }}
|
|
356
|
+
className="dialog-content"
|
|
357
|
+
>
|
|
358
|
+
{/* Content */}
|
|
359
|
+
</motion.div>
|
|
360
|
+
</Dialog.Content>
|
|
361
|
+
</>
|
|
362
|
+
)}
|
|
363
|
+
</AnimatePresence>
|
|
364
|
+
</Dialog.Portal>
|
|
365
|
+
</Dialog.Root>
|
|
366
|
+
);
|
|
367
|
+
}
|
|
368
|
+
```
|
|
369
|
+
|
|
370
|
+
---
|
|
371
|
+
|
|
372
|
+
## Common Primitives Reference
|
|
373
|
+
|
|
374
|
+
### Dialog (Modal)
|
|
375
|
+
|
|
376
|
+
```tsx
|
|
377
|
+
<Dialog.Root> {/* State container */}
|
|
378
|
+
<Dialog.Trigger /> {/* Opens dialog */}
|
|
379
|
+
<Dialog.Portal> {/* Renders in portal */}
|
|
380
|
+
<Dialog.Overlay /> {/* Backdrop */}
|
|
381
|
+
<Dialog.Content> {/* Modal content */}
|
|
382
|
+
<Dialog.Title /> {/* Required for a11y */}
|
|
383
|
+
<Dialog.Description /> {/* Required for a11y */}
|
|
384
|
+
<Dialog.Close /> {/* Closes dialog */}
|
|
385
|
+
</Dialog.Content>
|
|
386
|
+
</Dialog.Portal>
|
|
387
|
+
</Dialog.Root>
|
|
388
|
+
```
|
|
389
|
+
|
|
390
|
+
### Dropdown Menu
|
|
391
|
+
|
|
392
|
+
```tsx
|
|
393
|
+
<DropdownMenu.Root>
|
|
394
|
+
<DropdownMenu.Trigger />
|
|
395
|
+
<DropdownMenu.Portal>
|
|
396
|
+
<DropdownMenu.Content>
|
|
397
|
+
<DropdownMenu.Item />
|
|
398
|
+
<DropdownMenu.Separator />
|
|
399
|
+
<DropdownMenu.CheckboxItem />
|
|
400
|
+
<DropdownMenu.RadioGroup>
|
|
401
|
+
<DropdownMenu.RadioItem />
|
|
402
|
+
</DropdownMenu.RadioGroup>
|
|
403
|
+
<DropdownMenu.Sub> {/* Nested menus */}
|
|
404
|
+
<DropdownMenu.SubTrigger />
|
|
405
|
+
<DropdownMenu.SubContent />
|
|
406
|
+
</DropdownMenu.Sub>
|
|
407
|
+
</DropdownMenu.Content>
|
|
408
|
+
</DropdownMenu.Portal>
|
|
409
|
+
</DropdownMenu.Root>
|
|
410
|
+
```
|
|
411
|
+
|
|
412
|
+
### Tabs
|
|
413
|
+
|
|
414
|
+
```tsx
|
|
415
|
+
<Tabs.Root defaultValue="tab1">
|
|
416
|
+
<Tabs.List>
|
|
417
|
+
<Tabs.Trigger value="tab1" />
|
|
418
|
+
<Tabs.Trigger value="tab2" />
|
|
419
|
+
</Tabs.List>
|
|
420
|
+
<Tabs.Content value="tab1" />
|
|
421
|
+
<Tabs.Content value="tab2" />
|
|
422
|
+
</Tabs.Root>
|
|
423
|
+
```
|
|
424
|
+
|
|
425
|
+
### Tooltip
|
|
426
|
+
|
|
427
|
+
```tsx
|
|
428
|
+
<Tooltip.Provider delayDuration={200}>
|
|
429
|
+
<Tooltip.Root>
|
|
430
|
+
<Tooltip.Trigger />
|
|
431
|
+
<Tooltip.Portal>
|
|
432
|
+
<Tooltip.Content side="top" align="center">
|
|
433
|
+
Tooltip text
|
|
434
|
+
<Tooltip.Arrow />
|
|
435
|
+
</Tooltip.Content>
|
|
436
|
+
</Tooltip.Portal>
|
|
437
|
+
</Tooltip.Root>
|
|
438
|
+
</Tooltip.Provider>
|
|
439
|
+
```
|
|
440
|
+
|
|
441
|
+
### Popover
|
|
442
|
+
|
|
443
|
+
```tsx
|
|
444
|
+
<Popover.Root>
|
|
445
|
+
<Popover.Trigger />
|
|
446
|
+
<Popover.Portal>
|
|
447
|
+
<Popover.Content side="bottom" align="start">
|
|
448
|
+
Content
|
|
449
|
+
<Popover.Arrow />
|
|
450
|
+
<Popover.Close />
|
|
451
|
+
</Popover.Content>
|
|
452
|
+
</Popover.Portal>
|
|
453
|
+
</Popover.Root>
|
|
454
|
+
```
|
|
455
|
+
|
|
456
|
+
---
|
|
457
|
+
|
|
458
|
+
## Accessibility Checklist
|
|
459
|
+
|
|
460
|
+
### Every Component Must Have:
|
|
461
|
+
|
|
462
|
+
- [ ] **Focus Management**: Visible focus indicators on all interactive elements
|
|
463
|
+
- [ ] **Keyboard Navigation**: Full keyboard support (Tab, Arrows, Enter, Esc)
|
|
464
|
+
- [ ] **ARIA Labels**: Meaningful labels for screen readers
|
|
465
|
+
- [ ] **Color Contrast**: WCAG AA minimum (4.5:1 for text, 3:1 for UI)
|
|
466
|
+
- [ ] **Error States**: Clear error messages with `aria-invalid` and `aria-describedby`
|
|
467
|
+
- [ ] **Loading States**: Proper `aria-busy` during async operations
|
|
468
|
+
|
|
469
|
+
### Dialog-Specific:
|
|
470
|
+
- [ ] `Dialog.Title` is present (required for screen readers)
|
|
471
|
+
- [ ] `Dialog.Description` provides context
|
|
472
|
+
- [ ] Focus trapped inside modal when open
|
|
473
|
+
- [ ] Escape key closes dialog
|
|
474
|
+
- [ ] Focus returns to trigger on close
|
|
475
|
+
|
|
476
|
+
### Dropdown-Specific:
|
|
477
|
+
- [ ] Arrow keys navigate items
|
|
478
|
+
- [ ] Type-ahead search works
|
|
479
|
+
- [ ] First/last item wrapping behavior
|
|
480
|
+
- [ ] Selected state indicated visually and with ARIA
|
|
481
|
+
|
|
482
|
+
---
|
|
483
|
+
|
|
484
|
+
## Best Practices
|
|
485
|
+
|
|
486
|
+
### ✅ Do This
|
|
487
|
+
|
|
488
|
+
1. **Always use `asChild` to avoid wrapper divs**
|
|
489
|
+
```tsx
|
|
490
|
+
<Dialog.Trigger asChild>
|
|
491
|
+
<button>Open</button>
|
|
492
|
+
</Dialog.Trigger>
|
|
493
|
+
```
|
|
494
|
+
|
|
495
|
+
2. **Provide semantic HTML**
|
|
496
|
+
```tsx
|
|
497
|
+
<Dialog.Content asChild>
|
|
498
|
+
<article role="dialog" aria-labelledby="title">
|
|
499
|
+
{/* content */}
|
|
500
|
+
</article>
|
|
501
|
+
</Dialog.Content>
|
|
502
|
+
```
|
|
503
|
+
|
|
504
|
+
3. **Use CSS variables for theming**
|
|
505
|
+
```css
|
|
506
|
+
.dialog-content {
|
|
507
|
+
background: hsl(var(--surface));
|
|
508
|
+
color: hsl(var(--on-surface));
|
|
509
|
+
}
|
|
510
|
+
```
|
|
511
|
+
|
|
512
|
+
4. **Compose primitives for complex components**
|
|
513
|
+
```tsx
|
|
514
|
+
function CommandPalette() {
|
|
515
|
+
return (
|
|
516
|
+
<Dialog.Root>
|
|
517
|
+
<Dialog.Content>
|
|
518
|
+
<Combobox /> {/* Radix Combobox inside Dialog */}
|
|
519
|
+
</Dialog.Content>
|
|
520
|
+
</Dialog.Root>
|
|
521
|
+
);
|
|
522
|
+
}
|
|
523
|
+
```
|
|
524
|
+
|
|
525
|
+
### ❌ Don't Do This
|
|
526
|
+
|
|
527
|
+
1. **Don't skip accessibility parts**
|
|
528
|
+
```tsx
|
|
529
|
+
// ❌ Missing Title and Description
|
|
530
|
+
<Dialog.Content>
|
|
531
|
+
<div>Content</div>
|
|
532
|
+
</Dialog.Content>
|
|
533
|
+
```
|
|
534
|
+
|
|
535
|
+
2. **Don't fight the primitives**
|
|
536
|
+
```tsx
|
|
537
|
+
// ❌ Overriding internal behavior
|
|
538
|
+
<Dialog.Content onClick={(e) => e.stopPropagation()}>
|
|
539
|
+
```
|
|
540
|
+
|
|
541
|
+
3. **Don't mix controlled and uncontrolled**
|
|
542
|
+
```tsx
|
|
543
|
+
// ❌ Inconsistent state management
|
|
544
|
+
<Tabs.Root defaultValue="tab1" value={activeTab}>
|
|
545
|
+
```
|
|
546
|
+
|
|
547
|
+
4. **Don't ignore keyboard navigation**
|
|
548
|
+
```tsx
|
|
549
|
+
// ❌ Disabling keyboard behavior
|
|
550
|
+
<DropdownMenu.Item onKeyDown={(e) => e.preventDefault()}>
|
|
551
|
+
```
|
|
552
|
+
|
|
553
|
+
---
|
|
554
|
+
|
|
555
|
+
## Real-World Examples
|
|
556
|
+
|
|
557
|
+
### Example 1: Command Palette (Combo Dialog)
|
|
558
|
+
|
|
559
|
+
```tsx
|
|
560
|
+
import * as Dialog from '@radix-ui/react-dialog';
|
|
561
|
+
import { Command } from 'cmdk';
|
|
562
|
+
|
|
563
|
+
export function CommandPalette() {
|
|
564
|
+
const [open, setOpen] = useState(false);
|
|
565
|
+
|
|
566
|
+
useEffect(() => {
|
|
567
|
+
const down = (e: KeyboardEvent) => {
|
|
568
|
+
if (e.key === 'k' && (e.metaKey || e.ctrlKey)) {
|
|
569
|
+
e.preventDefault();
|
|
570
|
+
setOpen((open) => !open);
|
|
571
|
+
}
|
|
572
|
+
};
|
|
573
|
+
document.addEventListener('keydown', down);
|
|
574
|
+
return () => document.removeEventListener('keydown', down);
|
|
575
|
+
}, []);
|
|
576
|
+
|
|
577
|
+
return (
|
|
578
|
+
<Dialog.Root open={open} onOpenChange={setOpen}>
|
|
579
|
+
<Dialog.Portal>
|
|
580
|
+
<Dialog.Overlay className="fixed inset-0 bg-black/50" />
|
|
581
|
+
<Dialog.Content className="fixed left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2">
|
|
582
|
+
<Command>
|
|
583
|
+
<Command.Input placeholder="Type a command..." />
|
|
584
|
+
<Command.List>
|
|
585
|
+
<Command.Empty>No results found.</Command.Empty>
|
|
586
|
+
<Command.Group heading="Suggestions">
|
|
587
|
+
<Command.Item>Calendar</Command.Item>
|
|
588
|
+
<Command.Item>Search Emoji</Command.Item>
|
|
589
|
+
</Command.Group>
|
|
590
|
+
</Command.List>
|
|
591
|
+
</Command>
|
|
592
|
+
</Dialog.Content>
|
|
593
|
+
</Dialog.Portal>
|
|
594
|
+
</Dialog.Root>
|
|
595
|
+
);
|
|
596
|
+
}
|
|
597
|
+
```
|
|
598
|
+
|
|
599
|
+
### Example 2: Dropdown Menu with Icons
|
|
600
|
+
|
|
601
|
+
```tsx
|
|
602
|
+
import * as DropdownMenu from '@radix-ui/react-dropdown-menu';
|
|
603
|
+
import { DotsHorizontalIcon } from '@radix-ui/react-icons';
|
|
604
|
+
|
|
605
|
+
export function ActionsMenu() {
|
|
606
|
+
return (
|
|
607
|
+
<DropdownMenu.Root>
|
|
608
|
+
<DropdownMenu.Trigger asChild>
|
|
609
|
+
<button className="icon-button" aria-label="Actions">
|
|
610
|
+
<DotsHorizontalIcon />
|
|
611
|
+
</button>
|
|
612
|
+
</DropdownMenu.Trigger>
|
|
613
|
+
|
|
614
|
+
<DropdownMenu.Portal>
|
|
615
|
+
<DropdownMenu.Content className="dropdown-content" align="end">
|
|
616
|
+
<DropdownMenu.Item className="dropdown-item">
|
|
617
|
+
Edit
|
|
618
|
+
</DropdownMenu.Item>
|
|
619
|
+
<DropdownMenu.Item className="dropdown-item">
|
|
620
|
+
Duplicate
|
|
621
|
+
</DropdownMenu.Item>
|
|
622
|
+
<DropdownMenu.Separator className="dropdown-separator" />
|
|
623
|
+
<DropdownMenu.Item className="dropdown-item text-red-500">
|
|
624
|
+
Delete
|
|
625
|
+
</DropdownMenu.Item>
|
|
626
|
+
</DropdownMenu.Content>
|
|
627
|
+
</DropdownMenu.Portal>
|
|
628
|
+
</DropdownMenu.Root>
|
|
629
|
+
);
|
|
630
|
+
}
|
|
631
|
+
```
|
|
632
|
+
|
|
633
|
+
### Example 3: Form with Radix Select + React Hook Form
|
|
634
|
+
|
|
635
|
+
```tsx
|
|
636
|
+
import * as Select from '@radix-ui/react-select';
|
|
637
|
+
import { useForm, Controller } from 'react-hook-form';
|
|
638
|
+
|
|
639
|
+
interface FormData {
|
|
640
|
+
country: string;
|
|
641
|
+
}
|
|
642
|
+
|
|
643
|
+
export function CountryForm() {
|
|
644
|
+
const { control, handleSubmit } = useForm<FormData>();
|
|
645
|
+
|
|
646
|
+
return (
|
|
647
|
+
<form onSubmit={handleSubmit((data) => console.log(data))}>
|
|
648
|
+
<Controller
|
|
649
|
+
name="country"
|
|
650
|
+
control={control}
|
|
651
|
+
render={({ field }) => (
|
|
652
|
+
<Select.Root onValueChange={field.onChange} value={field.value}>
|
|
653
|
+
<Select.Trigger className="select-trigger">
|
|
654
|
+
<Select.Value placeholder="Select a country" />
|
|
655
|
+
<Select.Icon />
|
|
656
|
+
</Select.Trigger>
|
|
657
|
+
|
|
658
|
+
<Select.Portal>
|
|
659
|
+
<Select.Content className="select-content">
|
|
660
|
+
<Select.Viewport>
|
|
661
|
+
<Select.Item value="us">United States</Select.Item>
|
|
662
|
+
<Select.Item value="ca">Canada</Select.Item>
|
|
663
|
+
<Select.Item value="uk">United Kingdom</Select.Item>
|
|
664
|
+
</Select.Viewport>
|
|
665
|
+
</Select.Content>
|
|
666
|
+
</Select.Portal>
|
|
667
|
+
</Select.Root>
|
|
668
|
+
)}
|
|
669
|
+
/>
|
|
670
|
+
<button type="submit">Submit</button>
|
|
671
|
+
</form>
|
|
672
|
+
);
|
|
673
|
+
}
|
|
674
|
+
```
|
|
675
|
+
|
|
676
|
+
---
|
|
677
|
+
|
|
678
|
+
## Troubleshooting
|
|
679
|
+
|
|
680
|
+
### Problem: Dialog doesn't close on Escape key
|
|
681
|
+
|
|
682
|
+
**Cause**: `onEscapeKeyDown` event prevented or `open` state not synced
|
|
683
|
+
|
|
684
|
+
**Solution**:
|
|
685
|
+
```tsx
|
|
686
|
+
<Dialog.Root open={open} onOpenChange={setOpen}>
|
|
687
|
+
{/* Don't prevent default on escape */}
|
|
688
|
+
</Dialog.Root>
|
|
689
|
+
```
|
|
690
|
+
|
|
691
|
+
### Problem: Dropdown menu positioning is off
|
|
692
|
+
|
|
693
|
+
**Cause**: Parent container has `overflow: hidden` or transform
|
|
694
|
+
|
|
695
|
+
**Solution**:
|
|
696
|
+
```tsx
|
|
697
|
+
// Use Portal to render outside overflow container
|
|
698
|
+
<DropdownMenu.Portal>
|
|
699
|
+
<DropdownMenu.Content />
|
|
700
|
+
</DropdownMenu.Portal>
|
|
701
|
+
```
|
|
702
|
+
|
|
703
|
+
### Problem: Animations don't work
|
|
704
|
+
|
|
705
|
+
**Cause**: Portal content unmounts immediately
|
|
706
|
+
|
|
707
|
+
**Solution**:
|
|
708
|
+
```tsx
|
|
709
|
+
// Use forceMount + AnimatePresence
|
|
710
|
+
<Dialog.Portal forceMount>
|
|
711
|
+
<AnimatePresence>
|
|
712
|
+
{open && <Dialog.Content />}
|
|
713
|
+
</AnimatePresence>
|
|
714
|
+
</Dialog.Portal>
|
|
715
|
+
```
|
|
716
|
+
|
|
717
|
+
### Problem: TypeScript errors with `asChild`
|
|
718
|
+
|
|
719
|
+
**Cause**: Type inference issues with polymorphic components
|
|
720
|
+
|
|
721
|
+
**Solution**:
|
|
722
|
+
```tsx
|
|
723
|
+
// Explicitly type your component
|
|
724
|
+
<Dialog.Trigger asChild>
|
|
725
|
+
<button type="button">Open</button>
|
|
726
|
+
</Dialog.Trigger>
|
|
727
|
+
```
|
|
728
|
+
|
|
729
|
+
---
|
|
730
|
+
|
|
731
|
+
## Performance Optimization
|
|
732
|
+
|
|
733
|
+
### 1. Code Splitting
|
|
734
|
+
|
|
735
|
+
```tsx
|
|
736
|
+
// Lazy load heavy primitives
|
|
737
|
+
const Dialog = lazy(() => import('@radix-ui/react-dialog'));
|
|
738
|
+
const DropdownMenu = lazy(() => import('@radix-ui/react-dropdown-menu'));
|
|
739
|
+
```
|
|
740
|
+
|
|
741
|
+
### 2. Portal Container Reuse
|
|
742
|
+
|
|
743
|
+
```tsx
|
|
744
|
+
// Create portal container once
|
|
745
|
+
<Tooltip.Provider>
|
|
746
|
+
{/* All tooltips share portal container */}
|
|
747
|
+
<Tooltip.Root>...</Tooltip.Root>
|
|
748
|
+
<Tooltip.Root>...</Tooltip.Root>
|
|
749
|
+
</Tooltip.Provider>
|
|
750
|
+
```
|
|
751
|
+
|
|
752
|
+
### 3. Memoization
|
|
753
|
+
|
|
754
|
+
```tsx
|
|
755
|
+
// Memoize expensive render functions
|
|
756
|
+
const SelectItems = memo(({ items }) => (
|
|
757
|
+
items.map((item) => <Select.Item key={item.value} value={item.value} />)
|
|
758
|
+
));
|
|
759
|
+
```
|
|
760
|
+
|
|
761
|
+
---
|
|
762
|
+
|
|
763
|
+
## Integration with Popular Tools
|
|
764
|
+
|
|
765
|
+
### shadcn/ui (Built on Radix)
|
|
766
|
+
|
|
767
|
+
shadcn/ui is a collection of copy-paste components built with Radix + Tailwind.
|
|
768
|
+
|
|
769
|
+
```bash
|
|
770
|
+
npx shadcn-ui@latest init
|
|
771
|
+
npx shadcn-ui@latest add dialog
|
|
772
|
+
```
|
|
773
|
+
|
|
774
|
+
**When to use shadcn vs raw Radix**:
|
|
775
|
+
- Use shadcn: Quick prototyping, standard designs
|
|
776
|
+
- Use raw Radix: Full customization, unique designs
|
|
777
|
+
|
|
778
|
+
### Radix Themes (Official Styled System)
|
|
779
|
+
|
|
780
|
+
```tsx
|
|
781
|
+
import { Theme, Button, Dialog } from '@radix-ui/themes';
|
|
782
|
+
|
|
783
|
+
function App() {
|
|
784
|
+
return (
|
|
785
|
+
<Theme accentColor="crimson" grayColor="sand">
|
|
786
|
+
<Button>Click me</Button>
|
|
787
|
+
</Theme>
|
|
788
|
+
);
|
|
789
|
+
}
|
|
790
|
+
```
|
|
791
|
+
|
|
792
|
+
---
|
|
793
|
+
|
|
794
|
+
## Related Skills
|
|
795
|
+
|
|
796
|
+
- `@tailwind-design-system` - Tailwind + Radix integration patterns
|
|
797
|
+
- `@react-patterns` - React composition patterns
|
|
798
|
+
- `@frontend-design` - Overall frontend architecture
|
|
799
|
+
- `@accessibility-compliance` - WCAG compliance testing
|
|
800
|
+
|
|
801
|
+
---
|
|
802
|
+
|
|
803
|
+
## Resources
|
|
804
|
+
|
|
805
|
+
### Official Documentation
|
|
806
|
+
- [Radix UI Docs](https://www.radix-ui.com/primitives)
|
|
807
|
+
- [Radix Colors](https://www.radix-ui.com/colors) - Accessible color system
|
|
808
|
+
- [Radix Icons](https://www.radix-ui.com/icons) - Icon library
|
|
809
|
+
|
|
810
|
+
### Community Resources
|
|
811
|
+
- [shadcn/ui](https://ui.shadcn.com) - Component collection
|
|
812
|
+
- [Radix UI Discord](https://discord.com/invite/7Xb99uG) - Community support
|
|
813
|
+
- [CVA Documentation](https://cva.style/docs) - Variant management
|
|
814
|
+
|
|
815
|
+
### Examples
|
|
816
|
+
- [Radix Playground](https://www.radix-ui.com/primitives/docs/overview/introduction#try-it-out)
|
|
817
|
+
- [shadcn/ui Source](https://github.com/shadcn-ui/ui) - Production examples
|
|
818
|
+
|
|
819
|
+
---
|
|
820
|
+
|
|
821
|
+
## Quick Reference
|
|
822
|
+
|
|
823
|
+
### Installation
|
|
824
|
+
```bash
|
|
825
|
+
npm install @radix-ui/react-{primitive-name}
|
|
826
|
+
```
|
|
827
|
+
|
|
828
|
+
### Basic Pattern
|
|
829
|
+
```tsx
|
|
830
|
+
<Primitive.Root>
|
|
831
|
+
<Primitive.Trigger />
|
|
832
|
+
<Primitive.Portal>
|
|
833
|
+
<Primitive.Content />
|
|
834
|
+
</Primitive.Portal>
|
|
835
|
+
</Primitive.Root>
|
|
836
|
+
```
|
|
837
|
+
|
|
838
|
+
### Key Props
|
|
839
|
+
- `asChild` - Render as child element
|
|
840
|
+
- `defaultValue` - Uncontrolled default
|
|
841
|
+
- `value` / `onValueChange` - Controlled state
|
|
842
|
+
- `open` / `onOpenChange` - Open state
|
|
843
|
+
- `side` / `align` - Positioning
|
|
844
|
+
|
|
845
|
+
---
|
|
846
|
+
|
|
847
|
+
**Remember**: Radix gives you **behavior**, you give it **beauty**. Accessibility is built-in, customization is unlimited.
|