@design-ai/cli 4.55.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/.claude-plugin/plugin.json +164 -0
- package/AGENTS.ko.md +126 -0
- package/AGENTS.md +182 -0
- package/CHANGELOG.md +6883 -0
- package/CLAUDE.md +39 -0
- package/LICENSE +21 -0
- package/README.ko.md +245 -0
- package/README.md +277 -0
- package/agents/README.md +14 -0
- package/agents/a11y-reviewer.md +121 -0
- package/agents/component-architect.md +57 -0
- package/agents/design-critic.md +46 -0
- package/agents/token-extractor.md +63 -0
- package/cli/bin/design-ai-mcp.mjs +6 -0
- package/cli/bin/design-ai.mjs +40 -0
- package/cli/commands/audit.mjs +111 -0
- package/cli/commands/check.mjs +226 -0
- package/cli/commands/doctor.mjs +141 -0
- package/cli/commands/examples.mjs +58 -0
- package/cli/commands/help.mjs +271 -0
- package/cli/commands/install.mjs +161 -0
- package/cli/commands/learn.mjs +1871 -0
- package/cli/commands/list.mjs +143 -0
- package/cli/commands/mcp.mjs +27 -0
- package/cli/commands/pack.mjs +211 -0
- package/cli/commands/prompt.mjs +199 -0
- package/cli/commands/route.mjs +247 -0
- package/cli/commands/search.mjs +60 -0
- package/cli/commands/show.mjs +52 -0
- package/cli/commands/site.mjs +558 -0
- package/cli/commands/status.mjs +161 -0
- package/cli/commands/uninstall.mjs +119 -0
- package/cli/commands/update.mjs +184 -0
- package/cli/commands/version.mjs +94 -0
- package/cli/commands/workspace.mjs +176 -0
- package/cli/lib/brief.mjs +52 -0
- package/cli/lib/check.mjs +642 -0
- package/cli/lib/dispatch.mjs +109 -0
- package/cli/lib/doctor.mjs +505 -0
- package/cli/lib/examples.mjs +258 -0
- package/cli/lib/exec.mjs +63 -0
- package/cli/lib/help-flags.mjs +5 -0
- package/cli/lib/learn.mjs +3694 -0
- package/cli/lib/log.mjs +47 -0
- package/cli/lib/mcp-server.mjs +426 -0
- package/cli/lib/output.mjs +101 -0
- package/cli/lib/pack.mjs +599 -0
- package/cli/lib/paths.mjs +63 -0
- package/cli/lib/prompt.mjs +603 -0
- package/cli/lib/route.mjs +740 -0
- package/cli/lib/search.mjs +158 -0
- package/cli/lib/show.mjs +161 -0
- package/cli/lib/signals.mjs +2337 -0
- package/cli/lib/site.mjs +6617 -0
- package/cli/lib/skill-proposals.mjs +2046 -0
- package/cli/lib/suggest.mjs +66 -0
- package/cli/lib/workspace.mjs +1056 -0
- package/commands/README.md +25 -0
- package/commands/component-spec.md +34 -0
- package/commands/conversational.md +44 -0
- package/commands/design-from-brief.md +141 -0
- package/commands/design-review.md +62 -0
- package/commands/document-from-brief.md +47 -0
- package/commands/extract-tokens.md +38 -0
- package/commands/game-ui.md +40 -0
- package/commands/illustration.md +37 -0
- package/commands/iterate.md +167 -0
- package/commands/motion-design.md +54 -0
- package/commands/palette-from-brand.md +50 -0
- package/commands/print.md +49 -0
- package/commands/slide-deck.md +46 -0
- package/commands/spatial.md +47 -0
- package/commands/stability-review.md +74 -0
- package/commands/video.md +42 -0
- package/commands/website-improvement.md +77 -0
- package/docs/AGENT-DEVELOPMENT.md +658 -0
- package/docs/AI-LEARNING.md +429 -0
- package/docs/AIDER-INTEGRATION.md +224 -0
- package/docs/ARCHITECTURE.ko.md +183 -0
- package/docs/ARCHITECTURE.md +105 -0
- package/docs/CODEX-INTEGRATION.md +311 -0
- package/docs/COMPANY-WEBSITE-DOGFOOD.ko.md +144 -0
- package/docs/COMPANY-WEBSITE-DOGFOOD.md +150 -0
- package/docs/COMPANY-WEBSITE-INTAKE-TEMPLATE.ko.md +153 -0
- package/docs/COMPANY-WEBSITE-INTAKE-TEMPLATE.md +154 -0
- package/docs/CONTRIBUTING.ko.md +203 -0
- package/docs/CONTRIBUTING.md +242 -0
- package/docs/CURSOR-INTEGRATION.md +220 -0
- package/docs/DISTRIBUTION.ko.md +248 -0
- package/docs/DISTRIBUTION.md +253 -0
- package/docs/DOGFOOD-FINDINGS.md +180 -0
- package/docs/DOGFOOD-V4-FINDINGS.md +139 -0
- package/docs/DOGFOOD-V4-MKDOCS-FINDINGS.md +233 -0
- package/docs/DOGFOOD-V4-NPM-FINDINGS.md +157 -0
- package/docs/DOGFOOD-V4-VSCODE-FINDINGS.md +135 -0
- package/docs/FIGMA-INTEGRATION.md +222 -0
- package/docs/MCP-INTEGRATION.md +243 -0
- package/docs/MIGRATION-v4.md +121 -0
- package/docs/PLUGIN-PACKAGING.md +240 -0
- package/docs/PRODUCT-READINESS.md +66 -0
- package/docs/QUICKSTART.ko.md +178 -0
- package/docs/QUICKSTART.md +179 -0
- package/docs/RELEASE-CHECKLIST.md +292 -0
- package/docs/ROADMAP.md +19495 -0
- package/docs/SESSION-LOG.md +940 -0
- package/docs/TOKEN-SYNC.md +237 -0
- package/docs/USING.ko.md +206 -0
- package/docs/USING.md +218 -0
- package/docs/WEBSITE-IMPROVEMENT.ko.md +75 -0
- package/docs/WEBSITE-IMPROVEMENT.md +89 -0
- package/docs/announcements/README.md +56 -0
- package/docs/announcements/dev-to-korea.md +206 -0
- package/docs/announcements/hashnode-post.ko.md +232 -0
- package/docs/announcements/okky-post.ko.md +158 -0
- package/docs/announcements/press-kit.md +101 -0
- package/docs/announcements/reddit-r-korea.md +196 -0
- package/docs/announcements/show-hn.md +114 -0
- package/docs/announcements/twitter-thread.md +255 -0
- package/docs/external-status.md +34 -0
- package/docs/integrations/aider-walkthrough.ko.md +275 -0
- package/docs/integrations/aider-walkthrough.md +274 -0
- package/docs/integrations/codex-walkthrough.ko.md +297 -0
- package/docs/integrations/codex-walkthrough.md +297 -0
- package/docs/integrations/cursor-walkthrough.ko.md +281 -0
- package/docs/integrations/cursor-walkthrough.md +284 -0
- package/docs/integrations/design-ai-mcp-server.md +169 -0
- package/docs/integrations/figma-mcp.md +149 -0
- package/docs/integrations/github-mcp.md +178 -0
- package/docs/integrations/linear-mcp.md +215 -0
- package/docs/integrations/notion-mcp.md +174 -0
- package/docs/integrations/sdk-walkthrough.ko.md +375 -0
- package/docs/integrations/sdk-walkthrough.md +375 -0
- package/docs/integrations/slack-mcp.md +208 -0
- package/docs/integrations/vscode-walkthrough.ko.md +202 -0
- package/docs/integrations/vscode-walkthrough.md +205 -0
- package/docs/requirements.txt +16 -0
- package/docs/site-overrides/extra.css +83 -0
- package/docs/site-overrides/favicon.svg +4 -0
- package/docs/site-overrides/logo.svg +10 -0
- package/docs/site-overrides/main.html +18 -0
- package/docs/website-console/app.js +2540 -0
- package/docs/website-console/index.html +24 -0
- package/docs/website-console/styles.css +975 -0
- package/examples/README.md +252 -0
- package/examples/cases/dogfood-v4-korean-hr-onboarding.md +356 -0
- package/examples/component-accordion-actions.md +153 -0
- package/examples/component-accordion-details.md +147 -0
- package/examples/component-accordion-summary.md +180 -0
- package/examples/component-accordion.md +229 -0
- package/examples/component-account-card.md +284 -0
- package/examples/component-address-input.md +260 -0
- package/examples/component-affix.md +190 -0
- package/examples/component-alert-dialog.md +210 -0
- package/examples/component-alert-title.md +77 -0
- package/examples/component-alert.md +192 -0
- package/examples/component-amount-input.md +278 -0
- package/examples/component-anchor.md +198 -0
- package/examples/component-app-bar.md +249 -0
- package/examples/component-aspect-ratio.md +156 -0
- package/examples/component-auto-complete.md +199 -0
- package/examples/component-avatar-group.md +170 -0
- package/examples/component-avatar.md +191 -0
- package/examples/component-back-top.md +123 -0
- package/examples/component-backdrop.md +148 -0
- package/examples/component-badge.md +181 -0
- package/examples/component-banner.md +237 -0
- package/examples/component-biometric-gate.md +281 -0
- package/examples/component-blockquote.md +153 -0
- package/examples/component-border-beam.md +207 -0
- package/examples/component-bottom-navigation.md +226 -0
- package/examples/component-box.md +112 -0
- package/examples/component-breadcrumb.md +222 -0
- package/examples/component-button-base.md +190 -0
- package/examples/component-button-group.md +117 -0
- package/examples/component-button.md +213 -0
- package/examples/component-calendar.md +280 -0
- package/examples/component-callout.md +131 -0
- package/examples/component-card-actions.md +101 -0
- package/examples/component-card-content.md +90 -0
- package/examples/component-card-header.md +122 -0
- package/examples/component-card-media.md +79 -0
- package/examples/component-card.md +233 -0
- package/examples/component-carousel.md +266 -0
- package/examples/component-cascader.md +135 -0
- package/examples/component-category-picker.md +271 -0
- package/examples/component-chart.md +237 -0
- package/examples/component-chat-interface.md +399 -0
- package/examples/component-checkbox.md +149 -0
- package/examples/component-click-away-listener.md +87 -0
- package/examples/component-code.md +213 -0
- package/examples/component-collapsible.md +219 -0
- package/examples/component-color-picker.md +110 -0
- package/examples/component-combobox.md +267 -0
- package/examples/component-command.md +299 -0
- package/examples/component-config-provider.md +190 -0
- package/examples/component-context-menu.md +179 -0
- package/examples/component-css-baseline.md +148 -0
- package/examples/component-date-picker.md +249 -0
- package/examples/component-descriptions.md +242 -0
- package/examples/component-dialog-actions.md +111 -0
- package/examples/component-dialog-content-text.md +76 -0
- package/examples/component-dialog-content.md +105 -0
- package/examples/component-dialog-title.md +104 -0
- package/examples/component-dialog.md +176 -0
- package/examples/component-divider.md +182 -0
- package/examples/component-doc-page.md +217 -0
- package/examples/component-drawer.md +257 -0
- package/examples/component-dropdown.md +220 -0
- package/examples/component-email-layout.md +253 -0
- package/examples/component-empty-state.md +269 -0
- package/examples/component-empty.md +172 -0
- package/examples/component-fade.md +87 -0
- package/examples/component-feature-grid.md +201 -0
- package/examples/component-field.md +266 -0
- package/examples/component-filled-input.md +114 -0
- package/examples/component-flex.md +117 -0
- package/examples/component-float-button.md +214 -0
- package/examples/component-form-control-label.md +134 -0
- package/examples/component-form-control.md +113 -0
- package/examples/component-form-controls.md +251 -0
- package/examples/component-form-group.md +86 -0
- package/examples/component-form-helper-text.md +95 -0
- package/examples/component-form-label.md +98 -0
- package/examples/component-form.md +291 -0
- package/examples/component-game-hud.md +362 -0
- package/examples/component-game-menu.md +327 -0
- package/examples/component-grid.md +140 -0
- package/examples/component-grow.md +79 -0
- package/examples/component-hero-block.md +252 -0
- package/examples/component-hover-card.md +211 -0
- package/examples/component-icon-button.md +142 -0
- package/examples/component-icon.md +102 -0
- package/examples/component-illustration.md +280 -0
- package/examples/component-image-list.md +107 -0
- package/examples/component-image.md +282 -0
- package/examples/component-input-adornment.md +101 -0
- package/examples/component-input-base.md +134 -0
- package/examples/component-input-number.md +141 -0
- package/examples/component-input-otp.md +271 -0
- package/examples/component-input.md +213 -0
- package/examples/component-item.md +243 -0
- package/examples/component-kbd.md +197 -0
- package/examples/component-krw-amount.md +219 -0
- package/examples/component-label.md +118 -0
- package/examples/component-layout.md +217 -0
- package/examples/component-link.md +223 -0
- package/examples/component-list-item-avatar.md +72 -0
- package/examples/component-list-item-button.md +139 -0
- package/examples/component-list-item-icon.md +82 -0
- package/examples/component-list-item-text.md +98 -0
- package/examples/component-list-item.md +116 -0
- package/examples/component-list-subheader.md +70 -0
- package/examples/component-list.md +198 -0
- package/examples/component-loading-button.md +125 -0
- package/examples/component-loading-sequence.md +254 -0
- package/examples/component-lottie-player.md +279 -0
- package/examples/component-masonry.md +191 -0
- package/examples/component-mentions.md +189 -0
- package/examples/component-menu-item.md +102 -0
- package/examples/component-menu-list.md +98 -0
- package/examples/component-menu.md +139 -0
- package/examples/component-menubar.md +259 -0
- package/examples/component-message.md +162 -0
- package/examples/component-mobile-stepper.md +155 -0
- package/examples/component-modal.md +220 -0
- package/examples/component-navigation-menu.md +295 -0
- package/examples/component-notification.md +166 -0
- package/examples/component-otp-countdown.md +245 -0
- package/examples/component-outlined-input.md +145 -0
- package/examples/component-page-transition.md +281 -0
- package/examples/component-pagination.md +226 -0
- package/examples/component-paper.md +199 -0
- package/examples/component-pass-auth.md +265 -0
- package/examples/component-payment-brand-button.md +253 -0
- package/examples/component-payment-method-selector.md +272 -0
- package/examples/component-payment-receipt.md +277 -0
- package/examples/component-popconfirm.md +144 -0
- package/examples/component-popover.md +239 -0
- package/examples/component-popper.md +129 -0
- package/examples/component-pricing-cards.md +247 -0
- package/examples/component-progress.md +195 -0
- package/examples/component-qr-code.md +201 -0
- package/examples/component-radio.md +167 -0
- package/examples/component-rate.md +202 -0
- package/examples/component-resizable.md +163 -0
- package/examples/component-result.md +270 -0
- package/examples/component-scroll-area.md +199 -0
- package/examples/component-scroll-reveal.md +320 -0
- package/examples/component-segmented.md +178 -0
- package/examples/component-select.md +258 -0
- package/examples/component-separator.md +177 -0
- package/examples/component-sheet.md +277 -0
- package/examples/component-sidebar.md +257 -0
- package/examples/component-skeleton.md +178 -0
- package/examples/component-slide.md +89 -0
- package/examples/component-slider.md +208 -0
- package/examples/component-snackbar-content.md +92 -0
- package/examples/component-snackbar.md +121 -0
- package/examples/component-sonner.md +165 -0
- package/examples/component-space.md +125 -0
- package/examples/component-spatial-locomotion.md +373 -0
- package/examples/component-spatial-panel.md +330 -0
- package/examples/component-speed-dial-action.md +78 -0
- package/examples/component-speed-dial.md +177 -0
- package/examples/component-spin.md +173 -0
- package/examples/component-spinner.md +204 -0
- package/examples/component-splitter.md +210 -0
- package/examples/component-stack.md +130 -0
- package/examples/component-statistic.md +282 -0
- package/examples/component-step-button.md +157 -0
- package/examples/component-step-connector.md +157 -0
- package/examples/component-step-content.md +121 -0
- package/examples/component-step-icon.md +115 -0
- package/examples/component-step-label.md +101 -0
- package/examples/component-step.md +84 -0
- package/examples/component-steps.md +264 -0
- package/examples/component-stock-chart.md +251 -0
- package/examples/component-swipeable-drawer.md +149 -0
- package/examples/component-switch.md +99 -0
- package/examples/component-tab-scroll-button.md +180 -0
- package/examples/component-tab.md +120 -0
- package/examples/component-table-body.md +82 -0
- package/examples/component-table-cell.md +118 -0
- package/examples/component-table-container.md +75 -0
- package/examples/component-table-footer.md +72 -0
- package/examples/component-table-head.md +78 -0
- package/examples/component-table-pagination.md +137 -0
- package/examples/component-table-row.md +113 -0
- package/examples/component-table-sort-label.md +109 -0
- package/examples/component-table.md +202 -0
- package/examples/component-tabs.md +184 -0
- package/examples/component-tag-badge.md +309 -0
- package/examples/component-tag.md +102 -0
- package/examples/component-testimonial-carousel.md +218 -0
- package/examples/component-textarea-autosize.md +114 -0
- package/examples/component-textarea.md +173 -0
- package/examples/component-time-picker.md +205 -0
- package/examples/component-timeline.md +170 -0
- package/examples/component-toast.md +224 -0
- package/examples/component-toggle-button.md +129 -0
- package/examples/component-toggle.md +220 -0
- package/examples/component-toolbar.md +104 -0
- package/examples/component-tooltip.md +178 -0
- package/examples/component-tour.md +176 -0
- package/examples/component-transaction-list-item.md +243 -0
- package/examples/component-transfer.md +156 -0
- package/examples/component-tree-select.md +202 -0
- package/examples/component-tree.md +297 -0
- package/examples/component-typography.md +215 -0
- package/examples/component-upload.md +295 -0
- package/examples/component-video-hero.md +409 -0
- package/examples/component-video-player.md +340 -0
- package/examples/component-voice-input.md +408 -0
- package/examples/component-watermark.md +217 -0
- package/examples/component-zoom.md +92 -0
- package/examples/doc-explanation-example.md +196 -0
- package/examples/doc-how-to-example.md +205 -0
- package/examples/doc-tutorial-example.md +162 -0
- package/examples/dogfood-korean-fintech-system.md +433 -0
- package/examples/email-transactional-example.md +259 -0
- package/examples/palette-saas-violet.md +235 -0
- package/examples/print-business-card-spec.md +205 -0
- package/examples/print-packaging-spec.md +285 -0
- package/examples/report-example.md +228 -0
- package/examples/slide-deck-example.md +237 -0
- package/examples/website-improvement-report.md +128 -0
- package/examples/website-improvement-workspace.json +126 -0
- package/install.sh +189 -0
- package/knowledge/COVERAGE.md +740 -0
- package/knowledge/PRINCIPLES.md +108 -0
- package/knowledge/a11y/contrast.md +70 -0
- package/knowledge/a11y/keyboard-and-focus.md +108 -0
- package/knowledge/colors/color-theory.md +90 -0
- package/knowledge/colors/mui-palette-structure.md +105 -0
- package/knowledge/colors/palettes-by-product-type.md +876 -0
- package/knowledge/components/INDEX.md +231 -0
- package/knowledge/components/index.json +1470 -0
- package/knowledge/components/shadcn-registry.md +159 -0
- package/knowledge/conversational/ai-chat-interfaces.md +323 -0
- package/knowledge/conversational/chatbot-design.md +312 -0
- package/knowledge/conversational/conversational-ui-fundamentals.md +299 -0
- package/knowledge/conversational/korean-voice-conventions.md +281 -0
- package/knowledge/conversational/voice-ui-patterns.md +297 -0
- package/knowledge/design-tokens/ant-design.md +124 -0
- package/knowledge/design-tokens/material-3.md +235 -0
- package/knowledge/design-tokens/polaris-and-carbon.md +231 -0
- package/knowledge/design-tokens/tailwind-v4.md +284 -0
- package/knowledge/game-ui/game-accessibility.md +317 -0
- package/knowledge/game-ui/game-ui-fundamentals.md +281 -0
- package/knowledge/game-ui/hud-design.md +324 -0
- package/knowledge/game-ui/korean-gaming-conventions.md +312 -0
- package/knowledge/game-ui/menu-systems.md +388 -0
- package/knowledge/i18n/korean-app-store-visual.md +223 -0
- package/knowledge/i18n/korean-document-style.md +301 -0
- package/knowledge/i18n/korean-payments.md +211 -0
- package/knowledge/i18n/korean-product-conventions.md +96 -0
- package/knowledge/i18n/korean-publishing.md +139 -0
- package/knowledge/i18n/korean-typography.md +123 -0
- package/knowledge/icons/curated-sets.md +225 -0
- package/knowledge/illustration/hero-illustrations.md +234 -0
- package/knowledge/illustration/illustration-systems.md +221 -0
- package/knowledge/illustration/mascot-design.md +208 -0
- package/knowledge/illustration/spot-illustrations.md +246 -0
- package/knowledge/illustration/svg-optimization.md +308 -0
- package/knowledge/layout/spacing-and-grid.md +119 -0
- package/knowledge/motion/app-loading-sequences.md +277 -0
- package/knowledge/motion/choreography-depth.md +297 -0
- package/knowledge/motion/marketing-motion.md +223 -0
- package/knowledge/motion/micro-interactions.md +266 -0
- package/knowledge/motion/motion-tools.md +281 -0
- package/knowledge/motion/principles.md +126 -0
- package/knowledge/patterns/auth-flow-design.md +316 -0
- package/knowledge/patterns/b2b-onboarding-flows.md +182 -0
- package/knowledge/patterns/brand-identity.md +238 -0
- package/knowledge/patterns/brand-references.md +97 -0
- package/knowledge/patterns/chart-color-encoding.md +269 -0
- package/knowledge/patterns/chart-types.md +344 -0
- package/knowledge/patterns/dashboard-composition.md +299 -0
- package/knowledge/patterns/design-system-qa.md +356 -0
- package/knowledge/patterns/document-typography.md +248 -0
- package/knowledge/patterns/email-design.md +338 -0
- package/knowledge/patterns/empty-states.md +263 -0
- package/knowledge/patterns/error-states.md +318 -0
- package/knowledge/patterns/form-design.md +237 -0
- package/knowledge/patterns/information-architecture.md +341 -0
- package/knowledge/patterns/landing-hero-design.md +283 -0
- package/knowledge/patterns/landing-page-patterns.md +681 -0
- package/knowledge/patterns/list-and-feed.md +371 -0
- package/knowledge/patterns/mobile-navigation.md +278 -0
- package/knowledge/patterns/money-and-amount.md +301 -0
- package/knowledge/patterns/onboarding.md +300 -0
- package/knowledge/patterns/pricing-page-design.md +261 -0
- package/knowledge/patterns/realtime-data.md +280 -0
- package/knowledge/patterns/report-design.md +330 -0
- package/knowledge/patterns/search-ux.md +373 -0
- package/knowledge/patterns/settings-page.md +325 -0
- package/knowledge/patterns/slide-deck-design.md +316 -0
- package/knowledge/patterns/styles-catalog.md +2599 -0
- package/knowledge/patterns/technical-writing.md +306 -0
- package/knowledge/patterns/ui-reasoning.md +1853 -0
- package/knowledge/patterns/ux-guidelines.md +1454 -0
- package/knowledge/platforms/react-native.md +395 -0
- package/knowledge/print/brochures-and-flyers.md +276 -0
- package/knowledge/print/korean-print-conventions.md +284 -0
- package/knowledge/print/packaging.md +321 -0
- package/knowledge/print/print-fundamentals.md +238 -0
- package/knowledge/print/signage-and-posters.md +235 -0
- package/knowledge/print/stationery.md +262 -0
- package/knowledge/spatial/ar-patterns.md +253 -0
- package/knowledge/spatial/comfort-and-accessibility.md +245 -0
- package/knowledge/spatial/spatial-design-fundamentals.md +346 -0
- package/knowledge/spatial/spatial-ui-elements.md +343 -0
- package/knowledge/spatial/vr-patterns.md +302 -0
- package/knowledge/typography/font-pairings.md +332 -0
- package/knowledge/typography/mui-type-scale.md +57 -0
- package/knowledge/typography/type-scale-fundamentals.md +105 -0
- package/knowledge/video/in-product-video.md +277 -0
- package/knowledge/video/korean-video-conventions.md +247 -0
- package/knowledge/video/marketing-video.md +258 -0
- package/knowledge/video/social-and-short-form.md +257 -0
- package/knowledge/video/video-fundamentals.md +296 -0
- package/package.json +106 -0
- package/skills/README.md +39 -0
- package/skills/color-palette/PLAYBOOK.md +175 -0
- package/skills/color-palette/SKILL.md +6 -0
- package/skills/color-palette/TEMPLATE.md +103 -0
- package/skills/component-spec-writer/PLAYBOOK.md +169 -0
- package/skills/component-spec-writer/SKILL.md +6 -0
- package/skills/component-spec-writer/TEMPLATE.md +115 -0
- package/skills/conversational-ui-designer/PLAYBOOK.md +231 -0
- package/skills/conversational-ui-designer/SKILL.md +6 -0
- package/skills/design-broadcast/PLAYBOOK.md +146 -0
- package/skills/design-broadcast/SKILL.md +6 -0
- package/skills/design-critique/PLAYBOOK.md +137 -0
- package/skills/design-critique/SKILL.md +6 -0
- package/skills/design-pr-review/PLAYBOOK.md +171 -0
- package/skills/design-pr-review/SKILL.md +6 -0
- package/skills/design-system-builder/PLAYBOOK.md +218 -0
- package/skills/design-system-builder/SKILL.md +6 -0
- package/skills/design-system-qa/PLAYBOOK.md +163 -0
- package/skills/design-system-qa/SKILL.md +6 -0
- package/skills/document-author/PLAYBOOK.md +167 -0
- package/skills/document-author/SKILL.md +6 -0
- package/skills/figma-token-sync/PLAYBOOK.md +149 -0
- package/skills/figma-token-sync/SKILL.md +6 -0
- package/skills/game-ui-designer/PLAYBOOK.md +209 -0
- package/skills/game-ui-designer/SKILL.md +6 -0
- package/skills/handoff-spec/PLAYBOOK.md +170 -0
- package/skills/handoff-spec/SKILL.md +6 -0
- package/skills/illustration-designer/PLAYBOOK.md +166 -0
- package/skills/illustration-designer/SKILL.md +6 -0
- package/skills/motion-designer/PLAYBOOK.md +223 -0
- package/skills/motion-designer/SKILL.md +6 -0
- package/skills/print-designer/PLAYBOOK.md +209 -0
- package/skills/print-designer/SKILL.md +6 -0
- package/skills/slide-deck-author/PLAYBOOK.md +198 -0
- package/skills/slide-deck-author/SKILL.md +6 -0
- package/skills/spatial-designer/PLAYBOOK.md +238 -0
- package/skills/spatial-designer/SKILL.md +6 -0
- package/skills/ux-audit/PLAYBOOK.md +142 -0
- package/skills/ux-audit/SKILL.md +6 -0
- package/skills/video-designer/PLAYBOOK.md +240 -0
- package/skills/video-designer/SKILL.md +6 -0
- package/skills/website-improvement/PLAYBOOK.md +118 -0
- package/skills/website-improvement/SKILL.md +6 -0
- package/skills/website-improvement/TEMPLATE.md +103 -0
- package/tools/audit/changelog-generate.py +176 -0
- package/tools/audit/check-coverage.py +483 -0
- package/tools/audit/doctor_assertions.py +256 -0
- package/tools/audit/example-qa.py +108 -0
- package/tools/audit/frontmatter-check.py +199 -0
- package/tools/audit/integration-check.py +95 -0
- package/tools/audit/korean-copy-check.py +161 -0
- package/tools/audit/link-check.py +146 -0
- package/tools/audit/local-ci.py +558 -0
- package/tools/audit/package-contents.py +723 -0
- package/tools/audit/package-smoke.py +22443 -0
- package/tools/audit/raw-hex-check.py +252 -0
- package/tools/audit/registry-smoke.py +8188 -0
- package/tools/audit/release-metadata.py +9832 -0
- package/tools/audit/run-all.py +351 -0
- package/tools/audit/smoke_assertions.py +12742 -0
- package/tools/audit/stability-review.py +332 -0
- package/tools/audit/stale-check.py +156 -0
- package/tools/migrations/add-version-frontmatter.py +132 -0
- package/tools/migrations/bump-last-updated.py +131 -0
- package/tools/migrations/promote-stability.py +172 -0
- package/tools/preview/README.md +58 -0
- package/tools/preview/render-tokens.py +454 -0
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
# `MenuItem` — spec
|
|
2
|
+
|
|
3
|
+
> Synthesized from MUI `MenuItem`. A single row inside a `Menu` (popover) or `Select` dropdown. Behaves like an interactive `ListItemButton` but with menu-specific keyboard semantics (auto-focus on hover, Enter to select, type-ahead).
|
|
4
|
+
|
|
5
|
+
## When to use
|
|
6
|
+
|
|
7
|
+
- One option inside `<Menu>`, `<Select>`, or `<Autocomplete>`.
|
|
8
|
+
- Context menus, dropdown menus, command palettes (with custom item rendering).
|
|
9
|
+
- For non-menu interactive rows in plain lists, use `ListItemButton` instead — `MenuItem` carries menu-specific `role` and keyboard expectations.
|
|
10
|
+
|
|
11
|
+
## Anatomy
|
|
12
|
+
|
|
13
|
+
```
|
|
14
|
+
┌──────────────────────────────────────────┐
|
|
15
|
+
│ [icon] Label [shortcut/✓] │
|
|
16
|
+
└──────────────────────────────────────────┘
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## API
|
|
20
|
+
|
|
21
|
+
```tsx
|
|
22
|
+
<Menu open={open} anchorEl={anchorEl}>
|
|
23
|
+
<MenuItem onClick={...}>편집</MenuItem>
|
|
24
|
+
<MenuItem onClick={...} selected>복사</MenuItem>
|
|
25
|
+
<MenuItem disabled>삭제</MenuItem>
|
|
26
|
+
</Menu>
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
| Prop | Type | Default | Description |
|
|
30
|
+
| --- | --- | --- | --- |
|
|
31
|
+
| `children` | `ReactNode` | — | Label + optional icon/shortcut |
|
|
32
|
+
| `selected` | `boolean` | `false` | Highlighted (current value) |
|
|
33
|
+
| `disabled` | `boolean` | `false` | Non-selectable; greyed |
|
|
34
|
+
| `dense` | `boolean` | `false` | Reduce vertical padding |
|
|
35
|
+
| `divider` | `boolean` | `false` | Bottom divider |
|
|
36
|
+
| `onClick` | `(e) => void` | — | Selection handler |
|
|
37
|
+
| `value` | `any` | — | When inside `Select`; matched against `Select.value` |
|
|
38
|
+
|
|
39
|
+
## States
|
|
40
|
+
|
|
41
|
+
| State | Visual |
|
|
42
|
+
| --- | --- |
|
|
43
|
+
| Default | transparent bg, fg-default |
|
|
44
|
+
| Hover / focus | bg-subtle (mouse hover and keyboard focus share the same visual) |
|
|
45
|
+
| Selected | check icon (or filled bg) + bg-selected |
|
|
46
|
+
| Active | bg-pressed |
|
|
47
|
+
| Disabled | reduced opacity, no hover effect |
|
|
48
|
+
|
|
49
|
+
## Tokens consumed
|
|
50
|
+
|
|
51
|
+
```
|
|
52
|
+
--color-bg-default
|
|
53
|
+
--color-bg-subtle /* hover/focus */
|
|
54
|
+
--color-bg-selected
|
|
55
|
+
--color-fg-default
|
|
56
|
+
--color-fg-on-selected
|
|
57
|
+
--menu-item-min-height-32 /* dense */
|
|
58
|
+
--menu-item-min-height-36 /* default */
|
|
59
|
+
--space-sm
|
|
60
|
+
--space-md
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
## Accessibility
|
|
64
|
+
|
|
65
|
+
- Semantic element: `<li role="menuitem">` (or `option` inside `Select`).
|
|
66
|
+
- Keyboard: ↑/↓ navigates between items; Enter / Space activates; type-ahead jumps to matching item.
|
|
67
|
+
- The currently-focused item must visually match the keyboard cursor — don't separate "hover" and "focus" visuals.
|
|
68
|
+
- `aria-disabled="true"` for disabled items (don't use `disabled` attribute alone).
|
|
69
|
+
- Cite [`knowledge/a11y/keyboard-and-focus.md`](../knowledge/a11y/keyboard-and-focus.md).
|
|
70
|
+
|
|
71
|
+
## Edge cases
|
|
72
|
+
|
|
73
|
+
- **Long item text** — single-line truncation with ellipsis. If you need multiline, use a custom command-palette pattern.
|
|
74
|
+
- **Submenu / nested menu** — MUI doesn't ship native submenus; use a separate Menu with `anchorEl` set to the parent item.
|
|
75
|
+
- **Korean text density** — pad horizontal slightly more for Korean labels (`space-md` instead of `space-sm`) to avoid cramped feel.
|
|
76
|
+
|
|
77
|
+
## Code example
|
|
78
|
+
|
|
79
|
+
```tsx
|
|
80
|
+
<Select value={role} onChange={(e) => setRole(e.target.value)}>
|
|
81
|
+
<MenuItem value="admin">관리자</MenuItem>
|
|
82
|
+
<MenuItem value="member">일반 사용자</MenuItem>
|
|
83
|
+
<MenuItem value="guest" disabled>초대 대기</MenuItem>
|
|
84
|
+
</Select>
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
## Don't
|
|
88
|
+
|
|
89
|
+
- Don't render `MenuItem` outside a `Menu` / `Select` parent — keyboard navigation breaks.
|
|
90
|
+
- Don't use `selected` for hover state — `selected` means "current value", a persistent state.
|
|
91
|
+
- Don't put more than one primary action per item; use a separate trailing action button if you need both select + delete.
|
|
92
|
+
|
|
93
|
+
## References
|
|
94
|
+
|
|
95
|
+
- MUI: [`MenuItem.d.ts`](../refs/mui/packages/mui-material/src/MenuItem/MenuItem.d.ts)
|
|
96
|
+
|
|
97
|
+
## Cross-reference
|
|
98
|
+
|
|
99
|
+
- [`knowledge/components/INDEX.md`](../knowledge/components/INDEX.md)
|
|
100
|
+
- [`component-menu-list.md`](component-menu-list.md)
|
|
101
|
+
- [`component-select.md`](component-select.md)
|
|
102
|
+
- [`knowledge/a11y/keyboard-and-focus.md`](../knowledge/a11y/keyboard-and-focus.md)
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
# `MenuList` — spec
|
|
2
|
+
|
|
3
|
+
> Synthesized from MUI `MenuList`. The container that holds `MenuItem` children — handles keyboard navigation (arrow keys, type-ahead, focus trap). When you need a menu without the floating Menu's anchor/popover machinery, use MenuList directly inside your own Paper / Popover.
|
|
4
|
+
|
|
5
|
+
## When to use
|
|
6
|
+
|
|
7
|
+
- Custom popover / drawer that should behave like a menu inside.
|
|
8
|
+
- Static "all options" page that uses menu-style keyboard nav.
|
|
9
|
+
- Inside `Menu` (MUI wraps it for you — direct MenuList use is for the unwrapped case).
|
|
10
|
+
|
|
11
|
+
## API
|
|
12
|
+
|
|
13
|
+
```tsx
|
|
14
|
+
<Paper>
|
|
15
|
+
<MenuList autoFocusItem>
|
|
16
|
+
<MenuItem onClick={handleProfile}>프로필</MenuItem>
|
|
17
|
+
<MenuItem onClick={handleSettings}>설정</MenuItem>
|
|
18
|
+
<Divider />
|
|
19
|
+
<MenuItem onClick={handleLogout}>로그아웃</MenuItem>
|
|
20
|
+
</MenuList>
|
|
21
|
+
</Paper>
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
| Prop | Type | Default | Description |
|
|
25
|
+
| --- | --- | --- | --- |
|
|
26
|
+
| `children` | `ReactNode` | — | `MenuItem` children (Dividers OK) |
|
|
27
|
+
| `autoFocus` | `boolean` | `false` | Focus the menu on mount |
|
|
28
|
+
| `autoFocusItem` | `boolean` | `false` | Focus the first item on mount |
|
|
29
|
+
| `disabledItemsFocusable` | `boolean` | `false` | Allow focus on disabled items |
|
|
30
|
+
| `disableListWrap` | `boolean` | `false` | Don't wrap from last to first item |
|
|
31
|
+
| `variant` | `'menu' \| 'selectedMenu'` | `'selectedMenu'` | Menu without selection vs with-selection (focus jumps to selected) |
|
|
32
|
+
|
|
33
|
+
## States
|
|
34
|
+
|
|
35
|
+
Layout/keyboard primitive — no own visual states. Children own theirs.
|
|
36
|
+
|
|
37
|
+
## Tokens consumed
|
|
38
|
+
|
|
39
|
+
```
|
|
40
|
+
--menu-bg
|
|
41
|
+
--menu-padding
|
|
42
|
+
--menu-min-width
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## Accessibility
|
|
46
|
+
|
|
47
|
+
- Renders as `<ul role="menu">` (or `role="listbox"` in some Select variants).
|
|
48
|
+
- Arrow Up/Down navigates; Home/End jump to first/last; Esc closes (when inside Menu); Enter activates.
|
|
49
|
+
- Type-ahead: typing letters jumps to first MenuItem starting with those letters. Korean Hangul: works via the input characters (not a Korean-specific feature).
|
|
50
|
+
- For variant `selectedMenu`: focus moves to the currently-selected item on open (correct UX for picker menus).
|
|
51
|
+
|
|
52
|
+
## Edge cases
|
|
53
|
+
|
|
54
|
+
- **No focusable items** — all disabled = focus traps in nowhere. Set `disabledItemsFocusable={true}` so keyboard users can at least navigate.
|
|
55
|
+
- **Long menus** — scrollable; keyboard nav scrolls into view automatically.
|
|
56
|
+
- **Mixed actions and selections** — distinguish via icon (check for selected, not for action). Keyboard semantics treat both the same.
|
|
57
|
+
|
|
58
|
+
## Code example
|
|
59
|
+
|
|
60
|
+
```tsx
|
|
61
|
+
<Popover
|
|
62
|
+
open={open}
|
|
63
|
+
anchorEl={anchorEl}
|
|
64
|
+
onClose={handleClose}
|
|
65
|
+
anchorOrigin={{ vertical: 'bottom', horizontal: 'right' }}
|
|
66
|
+
>
|
|
67
|
+
<MenuList autoFocusItem>
|
|
68
|
+
<MenuItem onClick={() => { navigate('/profile'); handleClose(); }}>
|
|
69
|
+
<ListItemIcon><PersonIcon /></ListItemIcon>
|
|
70
|
+
<ListItemText>프로필</ListItemText>
|
|
71
|
+
</MenuItem>
|
|
72
|
+
<MenuItem onClick={() => { navigate('/settings'); handleClose(); }}>
|
|
73
|
+
<ListItemIcon><SettingsIcon /></ListItemIcon>
|
|
74
|
+
<ListItemText>설정</ListItemText>
|
|
75
|
+
</MenuItem>
|
|
76
|
+
<Divider />
|
|
77
|
+
<MenuItem onClick={handleLogout}>
|
|
78
|
+
<ListItemIcon><LogoutIcon /></ListItemIcon>
|
|
79
|
+
<ListItemText>로그아웃</ListItemText>
|
|
80
|
+
</MenuItem>
|
|
81
|
+
</MenuList>
|
|
82
|
+
</Popover>
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
## Don't
|
|
86
|
+
|
|
87
|
+
- Don't use as a plain List — kbd nav semantics differ.
|
|
88
|
+
- Don't put non-MenuItem children (random buttons) — keyboard nav breaks.
|
|
89
|
+
|
|
90
|
+
## References
|
|
91
|
+
|
|
92
|
+
- MUI: [`MenuList`](../refs/mui/packages/mui-material/src/MenuList/)
|
|
93
|
+
|
|
94
|
+
## Cross-reference
|
|
95
|
+
|
|
96
|
+
- [`component-menu-item.md`](component-menu-item.md)
|
|
97
|
+
- [`component-menu.md`](component-menu.md) — the wrapping floating menu
|
|
98
|
+
- [`component-popover.md`](component-popover.md)
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
# `Menu` — spec
|
|
2
|
+
|
|
3
|
+
> Synthesized from Ant Design `Menu`. The structured navigation menu primitive — distinct from `DropdownMenu` (action overlay), `NavigationMenu` (top horizontal), and `Sidebar` (app shell).
|
|
4
|
+
|
|
5
|
+
## When to use
|
|
6
|
+
|
|
7
|
+
- Sidebar navigation menu with hierarchical items + active state.
|
|
8
|
+
- App-level navigation rendered as a vertical or horizontal menu.
|
|
9
|
+
- As an alternative to `Sidebar` for simpler app shells.
|
|
10
|
+
|
|
11
|
+
When NOT to use:
|
|
12
|
+
- Triggered popup of actions → `DropdownMenu`.
|
|
13
|
+
- Marketing top nav with mega-menus → `NavigationMenu`.
|
|
14
|
+
- Persistent collapsible sidebar → `Sidebar`.
|
|
15
|
+
|
|
16
|
+
## Anatomy
|
|
17
|
+
|
|
18
|
+
```
|
|
19
|
+
┌─────────────────────────┐
|
|
20
|
+
│ ▶ Dashboard │
|
|
21
|
+
│ ▼ Workspace │
|
|
22
|
+
│ ▶ Projects │
|
|
23
|
+
│ ▶ Members │
|
|
24
|
+
│ ▶ Settings │
|
|
25
|
+
│ ▶ Inbox │
|
|
26
|
+
│ ▶ Help │
|
|
27
|
+
└─────────────────────────┘
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## API
|
|
31
|
+
|
|
32
|
+
```tsx
|
|
33
|
+
<Menu mode="vertical" selected={["projects"]} onSelect={onSelect}>
|
|
34
|
+
<Menu.Item key="dashboard" icon={<HomeIcon />}>
|
|
35
|
+
Dashboard
|
|
36
|
+
</Menu.Item>
|
|
37
|
+
<Menu.SubMenu key="workspace" icon={<FolderIcon />} title="Workspace">
|
|
38
|
+
<Menu.Item key="projects">Projects</Menu.Item>
|
|
39
|
+
<Menu.Item key="members">Members</Menu.Item>
|
|
40
|
+
<Menu.Item key="settings">Settings</Menu.Item>
|
|
41
|
+
</Menu.SubMenu>
|
|
42
|
+
<Menu.Item key="inbox" icon={<InboxIcon />}>
|
|
43
|
+
Inbox
|
|
44
|
+
</Menu.Item>
|
|
45
|
+
</Menu>
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
| Prop | Type | Default | Description |
|
|
49
|
+
| --- | --- | --- | --- |
|
|
50
|
+
| `mode` | `"vertical" \| "horizontal" \| "inline"` | `"vertical"` | Layout |
|
|
51
|
+
| `selected` | `string[]` | controlled | Active item keys |
|
|
52
|
+
| `onSelect` | `(key: string) => void` | — | Selection callback |
|
|
53
|
+
| `expanded` | `string[]` | controlled | Open SubMenu keys |
|
|
54
|
+
| `onExpandChange` | `(keys: string[]) => void` | — | SubMenu toggle |
|
|
55
|
+
| `theme` | `"light" \| "dark"` | `"light"` | Color scheme |
|
|
56
|
+
|
|
57
|
+
## Composition
|
|
58
|
+
|
|
59
|
+
| Part | Purpose |
|
|
60
|
+
| --- | --- |
|
|
61
|
+
| `Menu` | Outer wrapper |
|
|
62
|
+
| `Item` | Single menu item |
|
|
63
|
+
| `SubMenu` | Group with nested items (collapsible) |
|
|
64
|
+
| `ItemGroup` | Visual grouping with heading |
|
|
65
|
+
| `Divider` | Visual separator |
|
|
66
|
+
|
|
67
|
+
## Modes
|
|
68
|
+
|
|
69
|
+
### `vertical` (default)
|
|
70
|
+
|
|
71
|
+
Sidebar-style. Items stacked top-to-bottom.
|
|
72
|
+
|
|
73
|
+
### `horizontal`
|
|
74
|
+
|
|
75
|
+
Top-nav style. Items in a row.
|
|
76
|
+
|
|
77
|
+
### `inline` (with collapsibles)
|
|
78
|
+
|
|
79
|
+
Like `vertical` but SubMenus expand inline (push items below). Vs vertical's pop-out submenu.
|
|
80
|
+
|
|
81
|
+
## States
|
|
82
|
+
|
|
83
|
+
| State | Visual |
|
|
84
|
+
| --- | --- |
|
|
85
|
+
| Default | Standard text + icon |
|
|
86
|
+
| Hover | Bg shift |
|
|
87
|
+
| Selected (active) | Brand-color highlight + indicator |
|
|
88
|
+
| Disabled | Reduced opacity |
|
|
89
|
+
| Submenu collapsed | Chevron right; no children visible |
|
|
90
|
+
| Submenu expanded | Chevron down; children visible |
|
|
91
|
+
|
|
92
|
+
## Tokens consumed
|
|
93
|
+
|
|
94
|
+
```
|
|
95
|
+
--menu-bg (light or dark)
|
|
96
|
+
--menu-fg
|
|
97
|
+
--menu-fg-muted (group headings)
|
|
98
|
+
--menu-bg-hover
|
|
99
|
+
--menu-bg-active (selected)
|
|
100
|
+
--menu-fg-active
|
|
101
|
+
--menu-active-indicator (left-border or bg)
|
|
102
|
+
--menu-divider
|
|
103
|
+
--space-sm, --space-md
|
|
104
|
+
--motion-fast
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
## Accessibility
|
|
108
|
+
|
|
109
|
+
- `<nav aria-label="Main">` outer.
|
|
110
|
+
- `<ul role="menu">` items list.
|
|
111
|
+
- `<li role="menuitem">` each item.
|
|
112
|
+
- Submenu trigger: `aria-expanded` + `aria-haspopup`.
|
|
113
|
+
- Active item: `aria-current="page"` (for nav links).
|
|
114
|
+
- Keyboard: Tab navigates; arrow keys within (configurable); Enter/Space activates.
|
|
115
|
+
|
|
116
|
+
## Korean apps
|
|
117
|
+
|
|
118
|
+
- 메뉴 항목: 홈 / 워크스페이스 / 받은편지함 / 도움말 / 설정 (typical ordering)
|
|
119
|
+
- Active state visualization: left-border 색상 막대 + 배경 강조 (KR enterprise convention)
|
|
120
|
+
- 합쇼체 / 해요체 not relevant (menu items are nouns)
|
|
121
|
+
|
|
122
|
+
## Don't
|
|
123
|
+
|
|
124
|
+
- Don't use Menu for action overlays. Use DropdownMenu.
|
|
125
|
+
- Don't use Menu for marketing nav. Use NavigationMenu.
|
|
126
|
+
- Don't omit `aria-current` on the active item.
|
|
127
|
+
- Don't pile up 4+ levels of nested SubMenu. Flatten or refactor.
|
|
128
|
+
|
|
129
|
+
## References
|
|
130
|
+
|
|
131
|
+
- Ant: [`Menu`](../refs/ant-design/components/menu)
|
|
132
|
+
- WAI-ARIA: Menu pattern (different from menubar)
|
|
133
|
+
|
|
134
|
+
## Cross-reference
|
|
135
|
+
|
|
136
|
+
- [`examples/component-dropdown.md`](component-dropdown.md) — overlay action menu
|
|
137
|
+
- [`examples/component-navigation-menu.md`](component-navigation-menu.md) — marketing nav
|
|
138
|
+
- [`examples/component-sidebar.md`](component-sidebar.md) — app shell sidebar
|
|
139
|
+
- [`examples/component-menubar.md`](component-menubar.md) — desktop File/Edit/View
|
|
@@ -0,0 +1,259 @@
|
|
|
1
|
+
# `Menubar` — spec
|
|
2
|
+
|
|
3
|
+
> Synthesized from shadcn-ui `menubar` (Radix). Persistent menu bar with multiple top-level menus — the canonical desktop "File / Edit / View / Help" pattern. Common in editor / power-user / desktop-style web apps.
|
|
4
|
+
|
|
5
|
+
## When to use
|
|
6
|
+
|
|
7
|
+
- **Desktop-style web apps** (Linear, Notion, Figma) emulating native app menus.
|
|
8
|
+
- **Editor surfaces** with many actions organized into File / Edit / View / Insert / Format / Help.
|
|
9
|
+
- **Web-as-OS** apps (cloud IDEs, design tools).
|
|
10
|
+
|
|
11
|
+
When NOT to use:
|
|
12
|
+
- Simple consumer apps — feels heavy.
|
|
13
|
+
- Mobile primary — desktop convention.
|
|
14
|
+
- Marketing sites — use `NavigationMenu`.
|
|
15
|
+
|
|
16
|
+
## Anatomy
|
|
17
|
+
|
|
18
|
+
```
|
|
19
|
+
┌─────────────────────────────────────────────────┐
|
|
20
|
+
│ File Edit View Insert Format Help │ ← Menubar
|
|
21
|
+
└──┬──────────────────────────────────────────────┘
|
|
22
|
+
│
|
|
23
|
+
↓ click File
|
|
24
|
+
┌──────────────────┐
|
|
25
|
+
│ New ⌘N │
|
|
26
|
+
│ Open... ⌘O │
|
|
27
|
+
│ Save ⌘S │
|
|
28
|
+
│ Save As... ⇧⌘S │
|
|
29
|
+
│ ───── │
|
|
30
|
+
│ Close ⌘W │
|
|
31
|
+
└──────────────────┘
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## API
|
|
35
|
+
|
|
36
|
+
```tsx
|
|
37
|
+
<Menubar>
|
|
38
|
+
<Menubar.Menu>
|
|
39
|
+
<Menubar.Trigger>File</Menubar.Trigger>
|
|
40
|
+
<Menubar.Content>
|
|
41
|
+
<Menubar.Item onSelect={handleNew}>
|
|
42
|
+
New <Menubar.Shortcut>⌘N</Menubar.Shortcut>
|
|
43
|
+
</Menubar.Item>
|
|
44
|
+
<Menubar.Item onSelect={handleOpen}>
|
|
45
|
+
Open... <Menubar.Shortcut>⌘O</Menubar.Shortcut>
|
|
46
|
+
</Menubar.Item>
|
|
47
|
+
<Menubar.Separator />
|
|
48
|
+
<Menubar.Sub>
|
|
49
|
+
<Menubar.SubTrigger>Recent</Menubar.SubTrigger>
|
|
50
|
+
<Menubar.SubContent>
|
|
51
|
+
{recentFiles.map(f => (
|
|
52
|
+
<Menubar.Item key={f.id} onSelect={() => open(f)}>{f.name}</Menubar.Item>
|
|
53
|
+
))}
|
|
54
|
+
</Menubar.SubContent>
|
|
55
|
+
</Menubar.Sub>
|
|
56
|
+
<Menubar.Separator />
|
|
57
|
+
<Menubar.Item onSelect={handleSave}>
|
|
58
|
+
Save <Menubar.Shortcut>⌘S</Menubar.Shortcut>
|
|
59
|
+
</Menubar.Item>
|
|
60
|
+
</Menubar.Content>
|
|
61
|
+
</Menubar.Menu>
|
|
62
|
+
|
|
63
|
+
<Menubar.Menu>
|
|
64
|
+
<Menubar.Trigger>Edit</Menubar.Trigger>
|
|
65
|
+
<Menubar.Content>
|
|
66
|
+
<Menubar.Item>Undo <Menubar.Shortcut>⌘Z</Menubar.Shortcut></Menubar.Item>
|
|
67
|
+
<Menubar.Item>Redo <Menubar.Shortcut>⇧⌘Z</Menubar.Shortcut></Menubar.Item>
|
|
68
|
+
<Menubar.Separator />
|
|
69
|
+
<Menubar.Item>Cut <Menubar.Shortcut>⌘X</Menubar.Shortcut></Menubar.Item>
|
|
70
|
+
<Menubar.Item>Copy <Menubar.Shortcut>⌘C</Menubar.Shortcut></Menubar.Item>
|
|
71
|
+
<Menubar.Item>Paste <Menubar.Shortcut>⌘V</Menubar.Shortcut></Menubar.Item>
|
|
72
|
+
</Menubar.Content>
|
|
73
|
+
</Menubar.Menu>
|
|
74
|
+
|
|
75
|
+
<Menubar.Menu>
|
|
76
|
+
<Menubar.Trigger>View</Menubar.Trigger>
|
|
77
|
+
<Menubar.Content>
|
|
78
|
+
<Menubar.CheckboxItem checked={showGrid} onCheckedChange={setShowGrid}>
|
|
79
|
+
Show Grid
|
|
80
|
+
</Menubar.CheckboxItem>
|
|
81
|
+
<Menubar.CheckboxItem checked={showRulers} onCheckedChange={setShowRulers}>
|
|
82
|
+
Show Rulers
|
|
83
|
+
</Menubar.CheckboxItem>
|
|
84
|
+
<Menubar.Separator />
|
|
85
|
+
<Menubar.RadioGroup value={zoom} onValueChange={setZoom}>
|
|
86
|
+
<Menubar.RadioItem value="50">50%</Menubar.RadioItem>
|
|
87
|
+
<Menubar.RadioItem value="100">100%</Menubar.RadioItem>
|
|
88
|
+
<Menubar.RadioItem value="200">200%</Menubar.RadioItem>
|
|
89
|
+
</Menubar.RadioGroup>
|
|
90
|
+
</Menubar.Content>
|
|
91
|
+
</Menubar.Menu>
|
|
92
|
+
</Menubar>
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
## Composition
|
|
96
|
+
|
|
97
|
+
| Part | Purpose |
|
|
98
|
+
| --- | --- |
|
|
99
|
+
| `Menubar` | Wrapper |
|
|
100
|
+
| `Menu` | Single top-level menu |
|
|
101
|
+
| `Trigger` | The button label (File, Edit, etc.) |
|
|
102
|
+
| `Content` | The dropdown panel |
|
|
103
|
+
| `Item`, `CheckboxItem`, `RadioGroup`, `RadioItem` | Same as DropdownMenu |
|
|
104
|
+
| `Sub`, `SubTrigger`, `SubContent` | Nested submenu |
|
|
105
|
+
| `Label`, `Separator`, `Shortcut` | Same |
|
|
106
|
+
|
|
107
|
+
Menubar is essentially a **horizontal row of DropdownMenu triggers** with extra keyboard handling (arrow keys move between menus while open).
|
|
108
|
+
|
|
109
|
+
## Behavior
|
|
110
|
+
|
|
111
|
+
### Hover-roving (the killer feature)
|
|
112
|
+
|
|
113
|
+
Once one menu is open, hovering an adjacent Trigger opens that menu (closing the previous). This makes File → Edit → View browsing feel native.
|
|
114
|
+
|
|
115
|
+
### Click-then-hover
|
|
116
|
+
|
|
117
|
+
Clicking a Trigger when no menu is open: opens it. Subsequent hovers on triggers swap menus.
|
|
118
|
+
|
|
119
|
+
Clicking outside: closes all.
|
|
120
|
+
|
|
121
|
+
## Keyboard contract
|
|
122
|
+
|
|
123
|
+
| Key | Action |
|
|
124
|
+
| --- | --- |
|
|
125
|
+
| Tab into Menubar | Focus first Trigger |
|
|
126
|
+
| Tab away | Focus exits Menubar |
|
|
127
|
+
| `←` / `→` (when menu closed) | Move focus between Triggers |
|
|
128
|
+
| `Enter` / `Space` / `↓` | Open focused menu |
|
|
129
|
+
| `←` / `→` (when menu open) | Close current, open adjacent menu |
|
|
130
|
+
| `↓` / `↑` (within menu) | Navigate items |
|
|
131
|
+
| `Esc` | Close menu, focus stays on Trigger |
|
|
132
|
+
| Letter key (when menu open) | Jump to item starting with letter |
|
|
133
|
+
| Letter key (when no menu open + Trigger has accelerator like `_F_ile`) | Open that menu |
|
|
134
|
+
|
|
135
|
+
## States
|
|
136
|
+
|
|
137
|
+
| State | Visual |
|
|
138
|
+
| --- | --- |
|
|
139
|
+
| Resting | All triggers visible, none active |
|
|
140
|
+
| Trigger focus (keyboard) | Visible focus ring |
|
|
141
|
+
| Trigger hover | Subtle bg shift |
|
|
142
|
+
| Menu open | Active Trigger highlighted, panel below visible |
|
|
143
|
+
| Item hover | Bg highlight |
|
|
144
|
+
| Item disabled | Reduced opacity |
|
|
145
|
+
| Item destructive | Red text |
|
|
146
|
+
|
|
147
|
+
## Tokens consumed
|
|
148
|
+
|
|
149
|
+
```
|
|
150
|
+
--menubar-bg (slightly different from main bg, e.g. tinted)
|
|
151
|
+
--menubar-fg
|
|
152
|
+
--menubar-fg-muted (separators, shortcuts)
|
|
153
|
+
--menubar-trigger-hover-bg
|
|
154
|
+
--menubar-trigger-active-bg (when its menu is open)
|
|
155
|
+
--menubar-content-bg (dropdown panel)
|
|
156
|
+
--menubar-item-hover-bg
|
|
157
|
+
--menubar-error-fg (destructive items)
|
|
158
|
+
--menubar-border
|
|
159
|
+
--radius-md
|
|
160
|
+
--shadow-overlay
|
|
161
|
+
--space-xs, --space-sm
|
|
162
|
+
--font-size-sm
|
|
163
|
+
--motion-fast (open/close)
|
|
164
|
+
--ease-out
|
|
165
|
+
--z-overlay
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
## Accessibility
|
|
169
|
+
|
|
170
|
+
- Menubar wrapper: `role="menubar"`.
|
|
171
|
+
- Trigger: `role="menuitem"` with `aria-haspopup="true" aria-expanded`.
|
|
172
|
+
- Content: `role="menu"`.
|
|
173
|
+
- Item: `role="menuitem"` (or `menuitemcheckbox` / `menuitemradio`).
|
|
174
|
+
- Roving tabindex on triggers (only one tabbable at a time).
|
|
175
|
+
- Clear visual focus ring.
|
|
176
|
+
- Keyboard fully usable without mouse.
|
|
177
|
+
|
|
178
|
+
## Mobile
|
|
179
|
+
|
|
180
|
+
Menubar doesn't translate to mobile. On small screens:
|
|
181
|
+
- Replace with a hamburger trigger that opens a Sheet.
|
|
182
|
+
- Or move all actions into a CommandPalette accessible via hotkey.
|
|
183
|
+
|
|
184
|
+
## Korean apps
|
|
185
|
+
|
|
186
|
+
- 메뉴바 (menubar) typical in Korean desktop-style web apps.
|
|
187
|
+
- Trigger labels: 파일 / 편집 / 보기 / 도구 / 도움말 (canonical pattern from native KR software).
|
|
188
|
+
- 합쇼체 typical for menu items in formal apps; 해요체 for casual.
|
|
189
|
+
- Hangul on accelerator keys: omit underline-letter pattern (Korean characters can't be single-letter accelerators); use Cmd/Ctrl + Latin letter shortcuts.
|
|
190
|
+
|
|
191
|
+
## Code example
|
|
192
|
+
|
|
193
|
+
```tsx
|
|
194
|
+
function EditorHeader() {
|
|
195
|
+
return (
|
|
196
|
+
<header className="editor-header">
|
|
197
|
+
<Logo />
|
|
198
|
+
<Menubar>
|
|
199
|
+
<Menubar.Menu>
|
|
200
|
+
<Menubar.Trigger>파일</Menubar.Trigger>
|
|
201
|
+
<Menubar.Content>
|
|
202
|
+
<Menubar.Item onSelect={newDoc}>
|
|
203
|
+
새 문서 <Menubar.Shortcut>⌘N</Menubar.Shortcut>
|
|
204
|
+
</Menubar.Item>
|
|
205
|
+
<Menubar.Item onSelect={openDoc}>
|
|
206
|
+
열기... <Menubar.Shortcut>⌘O</Menubar.Shortcut>
|
|
207
|
+
</Menubar.Item>
|
|
208
|
+
<Menubar.Separator />
|
|
209
|
+
<Menubar.Item onSelect={save}>
|
|
210
|
+
저장 <Menubar.Shortcut>⌘S</Menubar.Shortcut>
|
|
211
|
+
</Menubar.Item>
|
|
212
|
+
</Menubar.Content>
|
|
213
|
+
</Menubar.Menu>
|
|
214
|
+
|
|
215
|
+
<Menubar.Menu>
|
|
216
|
+
<Menubar.Trigger>편집</Menubar.Trigger>
|
|
217
|
+
{/* ... */}
|
|
218
|
+
</Menubar.Menu>
|
|
219
|
+
|
|
220
|
+
<Menubar.Menu>
|
|
221
|
+
<Menubar.Trigger>도움말</Menubar.Trigger>
|
|
222
|
+
{/* ... */}
|
|
223
|
+
</Menubar.Menu>
|
|
224
|
+
</Menubar>
|
|
225
|
+
</header>
|
|
226
|
+
);
|
|
227
|
+
}
|
|
228
|
+
```
|
|
229
|
+
|
|
230
|
+
## Edge cases
|
|
231
|
+
|
|
232
|
+
- **Many menus (8+)**: feels cluttered. Group or move to CommandPalette.
|
|
233
|
+
- **Long menus (20+ items)**: split into submenus (e.g., File > Recent).
|
|
234
|
+
- **Disabled menu** (no items applicable in current context): Trigger grayed; clicking does nothing.
|
|
235
|
+
- **Menubar in collapsed sidebar layout**: hide Menubar entirely on narrow screens.
|
|
236
|
+
- **Multi-window app**: each window has its own Menubar instance with its own state.
|
|
237
|
+
- **Reduced motion**: skip open/close transitions.
|
|
238
|
+
|
|
239
|
+
## Don't
|
|
240
|
+
|
|
241
|
+
- Don't use Menubar in mobile-primary apps. Wrong convention.
|
|
242
|
+
- Don't omit shortcuts on common actions — power users expect them.
|
|
243
|
+
- Don't have inconsistent shortcuts (different across menus for same action).
|
|
244
|
+
- Don't put primary CTAs in Menubar — they should be visible buttons.
|
|
245
|
+
- Don't have only one menu — that's a DropdownMenu.
|
|
246
|
+
- Don't disable Esc to close.
|
|
247
|
+
|
|
248
|
+
## References
|
|
249
|
+
|
|
250
|
+
- shadcn-ui: [`menubar`](../refs/shadcn-ui/apps/v4/registry/new-york-v4/ui/menubar.tsx) (Radix)
|
|
251
|
+
- Patterns: macOS native menubar, VS Code, Figma desktop apps
|
|
252
|
+
- WAI-ARIA: [Menubar pattern](https://www.w3.org/WAI/ARIA/apg/patterns/menubar/)
|
|
253
|
+
|
|
254
|
+
## Cross-reference
|
|
255
|
+
|
|
256
|
+
- [`examples/component-dropdown.md`](component-dropdown.md) — single-menu variant
|
|
257
|
+
- [`examples/component-command.md`](component-command.md) — keyboard-first alternative
|
|
258
|
+
- [`examples/component-navigation-menu.md`](component-navigation-menu.md) — for marketing nav
|
|
259
|
+
- [`knowledge/a11y/keyboard-and-focus.md`](../knowledge/a11y/keyboard-and-focus.md)
|