motion-ui-skill 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +22 -0
- package/README.md +637 -0
- package/SKILL.md +529 -0
- package/agents/openai.yaml +8 -0
- package/bin/index.mjs +242 -0
- package/bin/installer.mjs +457 -0
- package/bin/updater.mjs +207 -0
- package/catalog.json +8120 -0
- package/components/agents/agent-activity/activity-row.tsx +242 -0
- package/components/agents/agent-activity/index.tsx +287 -0
- package/components/agents/agent-activity/types.ts +106 -0
- package/components/agents/agent-code.tsx +171 -0
- package/components/agents/agent-disclosure.tsx +55 -0
- package/components/agents/ai-sidebar.tsx +981 -0
- package/components/agents/approval-card/index.tsx +467 -0
- package/components/agents/approval-card/types.ts +56 -0
- package/components/agents/chat-app.tsx +97 -0
- package/components/agents/citations.tsx +288 -0
- package/components/agents/code-block.tsx +202 -0
- package/components/agents/file-diff.tsx +288 -0
- package/components/agents/image-generation.tsx +388 -0
- package/components/agents/loading-states/agent-progress.tsx +105 -0
- package/components/agents/loading-states/index.ts +13 -0
- package/components/agents/loading-states/reasoning-text.tsx +224 -0
- package/components/agents/loading-states/thinking-shimmer.tsx +27 -0
- package/components/agents/message-bubble.tsx +369 -0
- package/components/agents/message-context.tsx +9 -0
- package/components/agents/message-scroller.tsx +487 -0
- package/components/agents/message.tsx +272 -0
- package/components/agents/prompt-input.tsx +327 -0
- package/components/agents/streaming-response.tsx +263 -0
- package/components/agents/todo-list.tsx +387 -0
- package/components/agents/tool-approval.tsx +276 -0
- package/components/agents/tool-result.tsx +352 -0
- package/components/app/icons.tsx +19 -0
- package/components/audio/music-player-card.tsx +146 -0
- package/components/audio/music-playlist-card.tsx +172 -0
- package/components/audio/now-playing-bar.tsx +116 -0
- package/components/background-gradient/arc-bands-background.tsx +54 -0
- package/components/background-gradient/aurora-background.tsx +49 -0
- package/components/background-gradient/cherry-petal-background.tsx +50 -0
- package/components/background-gradient/coral-glow-background.tsx +47 -0
- package/components/background-gradient/dark-arc-bands-background.tsx +52 -0
- package/components/background-gradient/dark-aurora-background.tsx +52 -0
- package/components/background-gradient/dark-carbon-spotlight-background.tsx +47 -0
- package/components/background-gradient/dark-ember-background.tsx +47 -0
- package/components/background-gradient/dark-ink-field-background.tsx +46 -0
- package/components/background-gradient/dark-midnight-mesh-background.tsx +61 -0
- package/components/background-gradient/dark-rose-noir-background.tsx +52 -0
- package/components/background-gradient/dark-teal-depth-background.tsx +52 -0
- package/components/background-gradient/frost-mesh-background.tsx +56 -0
- package/components/background-gradient/halftone-pop-background.tsx +52 -0
- package/components/background-gradient/honey-ember-background.tsx +47 -0
- package/components/background-gradient/ink-wash-background.tsx +49 -0
- package/components/background-gradient/linen-weave-background.tsx +47 -0
- package/components/background-gradient/mint-lagoon-background.tsx +47 -0
- package/components/background-gradient/paper-fold-background.tsx +52 -0
- package/components/background-gradient/rain-prism-background.tsx +52 -0
- package/components/background-gradient/sand-drift-background.tsx +47 -0
- package/components/background-gradient/soft-spotlight-background.tsx +47 -0
- package/components/background-gradient/sunrise-horizon-background.tsx +51 -0
- package/components/background-gradient/sunset-bloom-background.tsx +47 -0
- package/components/background-gradient/terrazzo-fragment-background.tsx +53 -0
- package/components/background-gradient/tropical-tide-background.tsx +47 -0
- package/components/background-pattern/diagonal-box-pattern.tsx +29 -0
- package/components/background-pattern/dot-grid-pattern.tsx +29 -0
- package/components/background-pattern/fine-grain-pattern.tsx +39 -0
- package/components/background-pattern/graph-paper-pattern.tsx +29 -0
- package/components/background-pattern/line-grid-pattern.tsx +39 -0
- package/components/background-pattern/reverse-diagonal-box-pattern.tsx +30 -0
- package/components/buttons/add-to-cart-button.tsx +190 -0
- package/components/buttons/bookmark-save-button.tsx +105 -0
- package/components/buttons/cinder-latch-button.tsx +80 -0
- package/components/buttons/copy-button.tsx +155 -0
- package/components/buttons/depth-outline-button.tsx +72 -0
- package/components/buttons/dimple-switch.tsx +114 -0
- package/components/buttons/download-button.tsx +186 -0
- package/components/buttons/follow-button.tsx +98 -0
- package/components/buttons/hold-to-delete-button.tsx +205 -0
- package/components/buttons/inset-button.tsx +82 -0
- package/components/buttons/like-button.tsx +135 -0
- package/components/buttons/linen-tab-button.tsx +92 -0
- package/components/buttons/prism-depth-button.tsx +90 -0
- package/components/buttons/quantity-stepper-button.tsx +104 -0
- package/components/buttons/segmented-toggle-button.tsx +134 -0
- package/components/buttons/sheen-pill-button.tsx +127 -0
- package/components/buttons/slate-chip-switch.tsx +94 -0
- package/components/buttons/slide-to-confirm-button.tsx +163 -0
- package/components/buttons/soft-pill-button.tsx +86 -0
- package/components/buttons/soft-ui-button.tsx +59 -0
- package/components/buttons/three-d-button.tsx +99 -0
- package/components/buttons/three-d-icon-button.tsx +88 -0
- package/components/calendar/booking-slot-calendar.tsx +315 -0
- package/components/calendar/date-range-picker-card.tsx +216 -0
- package/components/calendar/event-countdown-card.tsx +105 -0
- package/components/calendar/month-picker-calendar.tsx +183 -0
- package/components/calendar/week-strip-calendar.tsx +182 -0
- package/components/contact/copy-email.tsx +94 -0
- package/components/docks/Icons.tsx +222 -0
- package/components/docks/app-dock.tsx +111 -0
- package/components/docks/editor-tool-dock.tsx +113 -0
- package/components/docks/mac-dock.tsx +144 -0
- package/components/docks/presence-dock.tsx +178 -0
- package/components/docks/spotlight-bar.tsx +188 -0
- package/components/dropdowns/file-menu-dropdown.tsx +192 -0
- package/components/dropdowns/filter-sort-dropdown.tsx +189 -0
- package/components/dropdowns/kebab-actions-dropdown.tsx +195 -0
- package/components/dropdowns/notification-dropdown.tsx +235 -0
- package/components/dropdowns/share-menu-dropdown.tsx +197 -0
- package/components/dropdowns/user-menu-dropdown.tsx +251 -0
- package/components/dropdowns/workspace-switcher-dropdown.tsx +248 -0
- package/components/event/event-ticket-card.tsx +116 -0
- package/components/files/ink-stamp-document-card.tsx +88 -0
- package/components/files/stacked-folder-card.tsx +176 -0
- package/components/folder/folder-tab-card.tsx +123 -0
- package/components/forms/contact-form.tsx +417 -0
- package/components/forms/forgot-password-form.tsx +264 -0
- package/components/forms/login-form.tsx +342 -0
- package/components/forms/newsletter-form.tsx +212 -0
- package/components/forms/signup-form.tsx +487 -0
- package/components/frames/circle-cut-frame.tsx +198 -0
- package/components/frames/hard-shadow-polaroid-frame.tsx +158 -0
- package/components/frames/sticky-note-polaroid-frame.tsx +230 -0
- package/components/frames/transform-box-frame.tsx +287 -0
- package/components/frames/transform-plus-frame.tsx +308 -0
- package/components/gallery/film-strip-card.tsx +103 -0
- package/components/gallery/gallery-grid-card.tsx +106 -0
- package/components/gallery/gallery-wall-card.tsx +71 -0
- package/components/gallery/glass-overlay-image-card.tsx +156 -0
- package/components/gallery/museum-placard-card.tsx +105 -0
- package/components/gallery/photo-album-card.tsx +114 -0
- package/components/gallery/photo-contact-sheet-card.tsx +71 -0
- package/components/gallery/polaroid-image-card.tsx +81 -0
- package/components/gallery/slow-living-polaroid-card.tsx +88 -0
- package/components/gallery/stamp-postcard-card.tsx +78 -0
- package/components/inputs/checkbox-field-input.tsx +148 -0
- package/components/inputs/combobox-field-input.tsx +466 -0
- package/components/inputs/date-field-input.tsx +472 -0
- package/components/inputs/file-upload-field-input.tsx +578 -0
- package/components/inputs/floating-label-field-input.tsx +206 -0
- package/components/inputs/input-group-field.tsx +132 -0
- package/components/inputs/password-field-input.tsx +125 -0
- package/components/inputs/phone-field-input.tsx +157 -0
- package/components/inputs/radio-group-field-input.tsx +220 -0
- package/components/inputs/search-input.tsx +163 -0
- package/components/inputs/select-field-input.tsx +416 -0
- package/components/inputs/switch-field-input.tsx +179 -0
- package/components/inputs/text-field-input.tsx +89 -0
- package/components/inputs/textarea-field-input.tsx +152 -0
- package/components/loaders/apple-hello-loader.tsx +86 -0
- package/components/loaders/spin-loader.tsx +51 -0
- package/components/loaders/text-loader.tsx +148 -0
- package/components/mockups/apple-ipod-mockup-card.tsx +155 -0
- package/components/mockups/apple-watch-mockup-card.tsx +278 -0
- package/components/mockups/browser-mockup-card.tsx +109 -0
- package/components/mockups/laptop-mockup-card.tsx +118 -0
- package/components/mockups/phone-mockup-card.tsx +210 -0
- package/components/mockups/tablet-mockup-card.tsx +212 -0
- package/components/motion/action-sheet.tsx +218 -0
- package/components/motion/action-swap-roll.tsx +32 -0
- package/components/motion/action-swap.tsx +340 -0
- package/components/motion/adaptive-stepper.tsx +442 -0
- package/components/motion/animated-badge.tsx +213 -0
- package/components/motion/animated-number.tsx +50 -0
- package/components/motion/animated-sidebar.tsx +1174 -0
- package/components/motion/animated-toast-stack.tsx +503 -0
- package/components/motion/aspect-ratio.tsx +55 -0
- package/components/motion/attachment-upload.tsx +1080 -0
- package/components/motion/audio-player.tsx +266 -0
- package/components/motion/autocomplete.tsx +183 -0
- package/components/motion/availability-scheduler/copy-menu.tsx +119 -0
- package/components/motion/availability-scheduler/day-row.tsx +231 -0
- package/components/motion/availability-scheduler/icon-button.tsx +46 -0
- package/components/motion/availability-scheduler/index.tsx +154 -0
- package/components/motion/availability-scheduler/time-select.tsx +49 -0
- package/components/motion/availability-scheduler/types.ts +189 -0
- package/components/motion/avatar-group.tsx +154 -0
- package/components/motion/bloom-menu.tsx +216 -0
- package/components/motion/bottom-sheet.tsx +249 -0
- package/components/motion/bounce-sidebar.tsx +266 -0
- package/components/motion/bouncy-accordion.tsx +325 -0
- package/components/motion/breadcrumb.tsx +122 -0
- package/components/motion/button/base.tsx +189 -0
- package/components/motion/button/index.tsx +13 -0
- package/components/motion/button/magnetic.tsx +25 -0
- package/components/motion/button/metallic.tsx +100 -0
- package/components/motion/button/stateful.tsx +237 -0
- package/components/motion/card-folder.tsx +345 -0
- package/components/motion/card-resize.tsx +229 -0
- package/components/motion/cascader.tsx +279 -0
- package/components/motion/center-morph-modal.tsx +366 -0
- package/components/motion/checkbox.tsx +123 -0
- package/components/motion/chip.tsx +121 -0
- package/components/motion/chromatic-text-reveal.tsx +203 -0
- package/components/motion/collapsible.tsx +108 -0
- package/components/motion/color-picker.tsx +206 -0
- package/components/motion/combobox/content.tsx +163 -0
- package/components/motion/combobox/context.tsx +359 -0
- package/components/motion/combobox/list.tsx +222 -0
- package/components/motion/combobox/trigger.tsx +191 -0
- package/components/motion/combobox/use-active-option.ts +130 -0
- package/components/motion/combobox.tsx +33 -0
- package/components/motion/command-palette.tsx +381 -0
- package/components/motion/confetti.tsx +128 -0
- package/components/motion/context-menu.tsx +790 -0
- package/components/motion/copy-button.tsx +103 -0
- package/components/motion/cylinder-carousel.tsx +459 -0
- package/components/motion/date-range-picker.tsx +218 -0
- package/components/motion/digit-swap.tsx +125 -0
- package/components/motion/dock.tsx +113 -0
- package/components/motion/drawer.tsx +108 -0
- package/components/motion/dynamic-island.tsx +221 -0
- package/components/motion/error-shake.tsx +66 -0
- package/components/motion/event-calendar.tsx +224 -0
- package/components/motion/expandable-action-bar.tsx +412 -0
- package/components/motion/expandable-control.tsx +254 -0
- package/components/motion/expandable-tabs.tsx +444 -0
- package/components/motion/expanding-arrow-button.tsx +171 -0
- package/components/motion/feedback-widget.tsx +473 -0
- package/components/motion/file-tree.tsx +429 -0
- package/components/motion/file-upload.tsx +606 -0
- package/components/motion/filter-builder.tsx +283 -0
- package/components/motion/frame.tsx +116 -0
- package/components/motion/gantt.tsx +156 -0
- package/components/motion/glow-button.tsx +101 -0
- package/components/motion/haptic-pressable.tsx +107 -0
- package/components/motion/hold-action-button.tsx +279 -0
- package/components/motion/hover-card.tsx +118 -0
- package/components/motion/icon-stack.tsx +138 -0
- package/components/motion/infinite-masonry.tsx +349 -0
- package/components/motion/input.tsx +242 -0
- package/components/motion/kanban.tsx +255 -0
- package/components/motion/kbd.tsx +127 -0
- package/components/motion/knockout-bracket.tsx +909 -0
- package/components/motion/knockout-wheel.tsx +1112 -0
- package/components/motion/liquid.tsx +351 -0
- package/components/motion/loader.tsx +616 -0
- package/components/motion/magnet-dock.tsx +117 -0
- package/components/motion/magnetic.tsx +50 -0
- package/components/motion/marquee.tsx +66 -0
- package/components/motion/metric-card.tsx +116 -0
- package/components/motion/morphing-modal.tsx +160 -0
- package/components/motion/morphing-search.tsx +643 -0
- package/components/motion/morphing-tabs.tsx +940 -0
- package/components/motion/multi-select/content.tsx +164 -0
- package/components/motion/multi-select/context.tsx +381 -0
- package/components/motion/multi-select/index.tsx +33 -0
- package/components/motion/multi-select/list.tsx +239 -0
- package/components/motion/multi-select/trigger.tsx +262 -0
- package/components/motion/not-found/glitch.tsx +107 -0
- package/components/motion/not-found/index.tsx +11 -0
- package/components/motion/not-found/magnetic.tsx +57 -0
- package/components/motion/not-found/shared.tsx +96 -0
- package/components/motion/not-found/spotlight.tsx +86 -0
- package/components/motion/not-found/stacked.tsx +77 -0
- package/components/motion/not-found/terminal.tsx +83 -0
- package/components/motion/notification-stack.tsx +380 -0
- package/components/motion/number-field.tsx +178 -0
- package/components/motion/number-ticker.tsx +185 -0
- package/components/motion/otp-input.tsx +392 -0
- package/components/motion/overflow-actions.tsx +375 -0
- package/components/motion/page-transition.tsx +92 -0
- package/components/motion/pagination.tsx +163 -0
- package/components/motion/parallax.tsx +64 -0
- package/components/motion/password-input.tsx +165 -0
- package/components/motion/phone-input.tsx +181 -0
- package/components/motion/popover-morph.tsx +317 -0
- package/components/motion/popover-position.ts +86 -0
- package/components/motion/popover.tsx +694 -0
- package/components/motion/prediction-market.tsx +682 -0
- package/components/motion/preview-rail.tsx +390 -0
- package/components/motion/progress-ring.tsx +115 -0
- package/components/motion/project-folder.tsx +418 -0
- package/components/motion/pull-to-refresh.tsx +522 -0
- package/components/motion/radio.tsx +148 -0
- package/components/motion/range-slider.tsx +93 -0
- package/components/motion/rating.tsx +171 -0
- package/components/motion/reorder-grid.tsx +123 -0
- package/components/motion/resizable-panel.tsx +160 -0
- package/components/motion/scroll-progress.tsx +127 -0
- package/components/motion/scroll-reveal.tsx +60 -0
- package/components/motion/scroll-to.tsx +48 -0
- package/components/motion/segmented-control.tsx +130 -0
- package/components/motion/segmented-progress.tsx +128 -0
- package/components/motion/select.tsx +440 -0
- package/components/motion/shader-background.tsx +134 -0
- package/components/motion/shared-layout-bg.tsx +151 -0
- package/components/motion/signup-form.tsx +467 -0
- package/components/motion/slide-action-button.tsx +203 -0
- package/components/motion/smooth-scroll.tsx +264 -0
- package/components/motion/sortable-list.tsx +98 -0
- package/components/motion/speed-dial.tsx +144 -0
- package/components/motion/split-text.tsx +115 -0
- package/components/motion/spotlight-card.tsx +89 -0
- package/components/motion/stepper.tsx +127 -0
- package/components/motion/success-check.tsx +142 -0
- package/components/motion/swap/constants.ts +2 -0
- package/components/motion/swap/controls.tsx +201 -0
- package/components/motion/swap/data.ts +186 -0
- package/components/motion/swap/field.tsx +115 -0
- package/components/motion/swap/quote-row.tsx +46 -0
- package/components/motion/swap/token-badges.tsx +83 -0
- package/components/motion/swap/token-picker.tsx +219 -0
- package/components/motion/swap/types.ts +20 -0
- package/components/motion/swap/utils.ts +28 -0
- package/components/motion/swap.tsx +182 -0
- package/components/motion/swipeable-list.tsx +507 -0
- package/components/motion/switch.tsx +96 -0
- package/components/motion/table/editable-cell.tsx +22 -0
- package/components/motion/table/index.tsx +431 -0
- package/components/motion/table/row-handle.tsx +81 -0
- package/components/motion/table/skeleton-rows.tsx +39 -0
- package/components/motion/table/table-header.tsx +344 -0
- package/components/motion/table/table-menu.tsx +129 -0
- package/components/motion/table/types.ts +86 -0
- package/components/motion/table/use-column-reorder.ts +105 -0
- package/components/motion/table/use-column-resize.ts +81 -0
- package/components/motion/table/use-column-sort.ts +64 -0
- package/components/motion/table/use-row-selection.ts +59 -0
- package/components/motion/table/utils.ts +33 -0
- package/components/motion/tabs.tsx +207 -0
- package/components/motion/text-cascade.tsx +22 -0
- package/components/motion/text-reveal.tsx +143 -0
- package/components/motion/text-scramble.tsx +84 -0
- package/components/motion/text-shimmer.tsx +34 -0
- package/components/motion/text-swap.tsx +56 -0
- package/components/motion/theme-toggle.tsx +210 -0
- package/components/motion/tilt-card.tsx +68 -0
- package/components/motion/timeline.tsx +236 -0
- package/components/motion/toggle-group.tsx +128 -0
- package/components/motion/tooltip.tsx +297 -0
- package/components/motion/tree-view.tsx +200 -0
- package/components/motion/wallet-card/account-avatar.tsx +21 -0
- package/components/motion/wallet-card/account-switcher.tsx +199 -0
- package/components/motion/wallet-card/actions.tsx +59 -0
- package/components/motion/wallet-card/balance-delta.tsx +69 -0
- package/components/motion/wallet-card/constants.ts +18 -0
- package/components/motion/wallet-card/copy-button.tsx +58 -0
- package/components/motion/wallet-card/index.tsx +151 -0
- package/components/motion/wallet-card/search-bar.tsx +198 -0
- package/components/motion/wallet-card/types.ts +34 -0
- package/components/motion/wallet-card/utils.ts +9 -0
- package/components/motion/wheel-picker.tsx +610 -0
- package/components/notifications/apple-notification-banner.tsx +155 -0
- package/components/notifications/calendar-reminder-notification-banner.tsx +138 -0
- package/components/notifications/chat-bubble-notification-banner.tsx +136 -0
- package/components/notifications/delivery-notification-banner.tsx +126 -0
- package/components/notifications/deploy-notification-banner.tsx +140 -0
- package/components/notifications/email-notification-banner.tsx +148 -0
- package/components/notifications/incoming-call-notification-banner.tsx +144 -0
- package/components/notifications/payment-notification-banner.tsx +137 -0
- package/components/notifications/system-alert-banner.tsx +137 -0
- package/components/notifications/toast-notification-banner.tsx +130 -0
- package/components/others/progress-ring-card.tsx +217 -0
- package/components/others/stacked-cards-effect.tsx +62 -0
- package/components/others/terminal-log-card.tsx +107 -0
- package/components/others/thermal-receipt-card.tsx +132 -0
- package/components/others/weather-snapshot-card.tsx +124 -0
- package/components/otp/otp-boxed-input.tsx +482 -0
- package/components/otp/otp-underline-input.tsx +356 -0
- package/components/previews/agents/agent-activity.preview.tsx +136 -0
- package/components/previews/agents/ai-sidebar.preview.tsx +236 -0
- package/components/previews/agents/chat-app-usage.tsx +689 -0
- package/components/previews/agents/chat-app.preview.tsx +130 -0
- package/components/previews/agents/chat-preview.tsx +285 -0
- package/components/previews/agents/citations.preview.tsx +78 -0
- package/components/previews/agents/code-block.preview.tsx +67 -0
- package/components/previews/agents/file-diff.preview.tsx +64 -0
- package/components/previews/agents/image-generation.preview.tsx +117 -0
- package/components/previews/agents/message-bubble.preview.tsx +12 -0
- package/components/previews/agents/message-scroller.preview.tsx +70 -0
- package/components/previews/agents/message.preview.tsx +14 -0
- package/components/previews/agents/prompt-input.preview.tsx +145 -0
- package/components/previews/agents/streaming-response.preview.tsx +156 -0
- package/components/previews/agents/todo-list.preview.tsx +73 -0
- package/components/previews/agents/tool-approval.preview.tsx +80 -0
- package/components/previews/agents/use-tool-result-demo.ts +28 -0
- package/components/previews/blocks/availability-scheduler.preview.tsx +11 -0
- package/components/previews/blocks/bloom-menu.preview.tsx +11 -0
- package/components/previews/blocks/card-folder.preview.tsx +105 -0
- package/components/previews/blocks/command-palette.preview.tsx +40 -0
- package/components/previews/blocks/dynamic-island.preview.tsx +150 -0
- package/components/previews/blocks/expandable-action-bar.preview.tsx +136 -0
- package/components/previews/blocks/expandable-tabs.preview.tsx +136 -0
- package/components/previews/blocks/feedback-widget.preview.tsx +34 -0
- package/components/previews/blocks/file-upload.preview.tsx +175 -0
- package/components/previews/blocks/infinite-masonry.preview.tsx +145 -0
- package/components/previews/blocks/knockout-bracket.preview.tsx +43 -0
- package/components/previews/blocks/morphing-search.preview.tsx +59 -0
- package/components/previews/blocks/morphing-tabs.preview.tsx +91 -0
- package/components/previews/blocks/notification-stack.preview.tsx +39 -0
- package/components/previews/blocks/otp-input.preview.tsx +29 -0
- package/components/previews/blocks/overflow-actions.preview.tsx +51 -0
- package/components/previews/blocks/prediction-market.preview.tsx +41 -0
- package/components/previews/blocks/project-folder.preview.tsx +41 -0
- package/components/previews/blocks/signup-form.preview.tsx +36 -0
- package/components/previews/blocks/swap.preview.tsx +11 -0
- package/components/previews/blocks/swipeable-list.preview.tsx +149 -0
- package/components/previews/blocks/wallet-card.preview.tsx +36 -0
- package/components/previews/motion/action-swap.preview.tsx +82 -0
- package/components/previews/motion/adaptive-stepper.preview.tsx +20 -0
- package/components/previews/motion/animated-badge.preview.tsx +43 -0
- package/components/previews/motion/animated-sidebar.preview.tsx +269 -0
- package/components/previews/motion/animated-toast-stack.preview.tsx +151 -0
- package/components/previews/motion/bottom-sheet.preview.tsx +35 -0
- package/components/previews/motion/bounce-sidebar.preview.tsx +30 -0
- package/components/previews/motion/bouncy-accordion.preview.tsx +66 -0
- package/components/previews/motion/center-morph-modal.preview.tsx +75 -0
- package/components/previews/motion/checkbox.preview.tsx +26 -0
- package/components/previews/motion/combobox.preview.tsx +119 -0
- package/components/previews/motion/context-menu.preview.tsx +144 -0
- package/components/previews/motion/cylinder-carousel.preview.tsx +96 -0
- package/components/previews/motion/dock.preview.tsx +46 -0
- package/components/previews/motion/drawer.preview.tsx +46 -0
- package/components/previews/motion/expandable-control.preview.tsx +27 -0
- package/components/previews/motion/expanding-arrow-button.preview.tsx +11 -0
- package/components/previews/motion/file-tree.preview.tsx +67 -0
- package/components/previews/motion/input.preview.tsx +55 -0
- package/components/previews/motion/loader.preview.tsx +36 -0
- package/components/previews/motion/marquee.preview.tsx +22 -0
- package/components/previews/motion/morphing-modal.preview.tsx +184 -0
- package/components/previews/motion/multi-select.preview.tsx +73 -0
- package/components/previews/motion/number.preview.tsx +61 -0
- package/components/previews/motion/popover.preview.tsx +53 -0
- package/components/previews/motion/preview-rail.preview.tsx +108 -0
- package/components/previews/motion/pull-to-refresh.preview.tsx +117 -0
- package/components/previews/motion/radio.preview.tsx +17 -0
- package/components/previews/motion/range-slider.preview.tsx +19 -0
- package/components/previews/motion/select.preview.tsx +29 -0
- package/components/previews/motion/shader-background.preview.tsx +308 -0
- package/components/previews/motion/shared-layout-bg.preview.tsx +33 -0
- package/components/previews/motion/switch.preview.tsx +15 -0
- package/components/previews/motion/table.preview.tsx +140 -0
- package/components/previews/motion/tabs.preview.tsx +49 -0
- package/components/previews/motion/text-animation.preview.tsx +63 -0
- package/components/previews/motion/theme-toggle.preview.tsx +28 -0
- package/components/previews/motion/tilt-card.preview.tsx +15 -0
- package/components/previews/motion/tooltip.preview.tsx +34 -0
- package/components/previews/motion/wheel-picker.preview.tsx +91 -0
- package/components/pricing/retail-price-tag-card.tsx +104 -0
- package/components/pricing/toggle-pricing-cards.tsx +209 -0
- package/components/profile/contact-profile-card.tsx +100 -0
- package/components/profile/editorial-staff-profile-card.tsx +79 -0
- package/components/profile/team-member-profile-grid.tsx +159 -0
- package/components/profile/user-profile-card.tsx +125 -0
- package/components/resources/resource-links-panel.tsx +176 -0
- package/components/socials/discord-chat-card.tsx +157 -0
- package/components/socials/facebook-post-card.tsx +198 -0
- package/components/socials/github-contribution.tsx +716 -0
- package/components/socials/github-repo-card.tsx +111 -0
- package/components/socials/instagram-post-card.tsx +204 -0
- package/components/socials/linked-in-post-card.tsx +213 -0
- package/components/socials/linked-in-profile-card.tsx +173 -0
- package/components/socials/threads-post-card.tsx +162 -0
- package/components/socials/twitter-post-card.tsx +184 -0
- package/components/socials/twitter-profile-card.tsx +180 -0
- package/components/system/loaders/index.ts +1 -0
- package/components/system/loaders/page-loader-overlay.tsx +16 -0
- package/components/table/customers-table.tsx +146 -0
- package/components/table/orders-table.tsx +195 -0
- package/components/table/recent-transactions-table.tsx +125 -0
- package/components/table/tasks-table.tsx +163 -0
- package/components/table/team-members-table.tsx +155 -0
- package/components/table/users-select-table.tsx +184 -0
- package/components/text/cafe-menu-board-card.tsx +101 -0
- package/components/text/cinema-ticket-card.tsx +99 -0
- package/components/text/daily-motivation-card.tsx +80 -0
- package/components/text/denim-product-editorial-card.tsx +101 -0
- package/components/text/drop-cap-editorial-card.tsx +54 -0
- package/components/text/editorial-quote-card.tsx +98 -0
- package/components/text/journal-writing-card.tsx +131 -0
- package/components/text/keyboard-shortcuts-card.tsx +92 -0
- package/components/text/magazine-cover-card.tsx +109 -0
- package/components/text/notepad-card.tsx +95 -0
- package/components/travel/flight-boarding-card.tsx +177 -0
- package/components/travel/travel-postcard-card.tsx +96 -0
- package/components/underlines/annotated-text-showcase.tsx +37 -0
- package/components/underlines/annotated-text.tsx +471 -0
- package/components/users/credit-card-glass.tsx +113 -0
- package/components/users/team-member-card.tsx +50 -0
- package/components/users/testimonial-card.tsx +239 -0
- package/components/wallet/wallet-pass-card.tsx +220 -0
- package/components/widgets/analog-clock-widget.tsx +203 -0
- package/components/widgets/audio-recorder-widget.tsx +87 -0
- package/components/widgets/battery-face-widget.tsx +152 -0
- package/components/widgets/blob-profile.tsx +64 -0
- package/components/widgets/bluetooth-face-widget.tsx +125 -0
- package/components/widgets/compass-widget.tsx +296 -0
- package/components/widgets/daily-activity-calendar-widget.tsx +133 -0
- package/components/widgets/dnd-face-widget.tsx +129 -0
- package/components/widgets/electric-scooter-widget.tsx +88 -0
- package/components/widgets/flight-arrival-widget.tsx +76 -0
- package/components/widgets/focus-breath-widget.tsx +71 -0
- package/components/widgets/heart-rate-widget.tsx +93 -0
- package/components/widgets/hydration-widget.tsx +109 -0
- package/components/widgets/ios-calendar-widget.tsx +87 -0
- package/components/widgets/ios-digital-clock-widget.tsx +192 -0
- package/components/widgets/ios-earbuds-widget.tsx +120 -0
- package/components/widgets/ios-map-location-widget.tsx +133 -0
- package/components/widgets/minimal-agenda-widget.tsx +123 -0
- package/components/widgets/pomodoro-widget.tsx +155 -0
- package/components/widgets/recorder-face-widget.tsx +146 -0
- package/components/widgets/ride-pickup-widget.tsx +72 -0
- package/components/widgets/sleep-score-widget.tsx +107 -0
- package/components/widgets/step-count-widget.tsx +53 -0
- package/components/widgets/stopwatch-widget.tsx +176 -0
- package/components/widgets/torch-face-widget.tsx +128 -0
- package/components/widgets/voice-assistant-widget.tsx +103 -0
- package/components/widgets/wifi-toggle-widget.tsx +108 -0
- package/lib/cn.ts +1 -0
- package/lib/ease.ts +108 -0
- package/lib/favicon.ts +8 -0
- package/lib/hooks/use-dismiss.ts +120 -0
- package/lib/hooks/use-favicon.ts +39 -0
- package/lib/hooks/use-haptic.ts +44 -0
- package/lib/hooks/use-hover-capable.ts +23 -0
- package/lib/hooks/use-hover-gesture.ts +61 -0
- package/lib/hooks/use-in-view-animation.ts +35 -0
- package/lib/hooks/use-measure.ts +39 -0
- package/lib/hooks/use-on-open.ts +24 -0
- package/lib/hooks/use-row-cursor.ts +86 -0
- package/lib/hooks/use-slider.ts +176 -0
- package/lib/hooks/use-tap-gesture.ts +66 -0
- package/lib/hooks/use-touch-capable.ts +31 -0
- package/lib/presence-gate.tsx +52 -0
- package/lib/styles.ts +124 -0
- package/lib/text-shimmer.ts +21 -0
- package/lib/tick-sound.ts +151 -0
- package/lib/touch.ts +117 -0
- package/lib/utils.ts +6 -0
- package/package.json +49 -0
- package/references/agents/agent-activity.md +747 -0
- package/references/agents/ai-sidebar.md +293 -0
- package/references/agents/approval-card.md +233 -0
- package/references/agents/chat-app.md +184 -0
- package/references/agents/citations.md +159 -0
- package/references/agents/code-block.md +122 -0
- package/references/agents/file-diff.md +119 -0
- package/references/agents/image-generation.md +173 -0
- package/references/agents/loading-states.md +186 -0
- package/references/agents/message-bubble.md +274 -0
- package/references/agents/message-scroller.md +128 -0
- package/references/agents/message.md +162 -0
- package/references/agents/prompt-input.md +204 -0
- package/references/agents/streaming-response.md +216 -0
- package/references/agents/todo-list.md +123 -0
- package/references/agents/tool-approval.md +143 -0
- package/references/agents/tool-result.md +199 -0
- package/references/blocks/availability-scheduler.md +59 -0
- package/references/blocks/bloom-menu.md +56 -0
- package/references/blocks/card-folder.md +165 -0
- package/references/blocks/command-palette.md +89 -0
- package/references/blocks/dynamic-island.md +203 -0
- package/references/blocks/expandable-action-bar.md +191 -0
- package/references/blocks/expandable-tabs.md +184 -0
- package/references/blocks/feedback-widget.md +82 -0
- package/references/blocks/file-upload.md +406 -0
- package/references/blocks/infinite-masonry.md +211 -0
- package/references/blocks/knockout-bracket.md +161 -0
- package/references/blocks/morphing-search.md +113 -0
- package/references/blocks/morphing-tabs.md +143 -0
- package/references/blocks/not-found.md +228 -0
- package/references/blocks/notification-stack.md +92 -0
- package/references/blocks/otp-input.md +85 -0
- package/references/blocks/overflow-actions.md +105 -0
- package/references/blocks/prediction-market.md +97 -0
- package/references/blocks/project-folder.md +99 -0
- package/references/blocks/signup-form.md +92 -0
- package/references/blocks/swap.md +58 -0
- package/references/blocks/swipeable-list.md +202 -0
- package/references/blocks/wallet-card.md +97 -0
- package/references/codex-install.md +59 -0
- package/references/craft/3d-button.md +51 -0
- package/references/craft/3d-icon-button.md +51 -0
- package/references/craft/add-to-cart-button.md +52 -0
- package/references/craft/analog-clock-minimal.md +51 -0
- package/references/craft/analog-clock-numeric.md +51 -0
- package/references/craft/analog-clock-roman.md +51 -0
- package/references/craft/annotated-text.md +51 -0
- package/references/craft/app-dock.md +52 -0
- package/references/craft/apple-hello-loader.md +51 -0
- package/references/craft/apple-notification.md +53 -0
- package/references/craft/apple-watch.md +51 -0
- package/references/craft/arc-bands-background.md +51 -0
- package/references/craft/audio-recorder.md +52 -0
- package/references/craft/aurora-background.md +51 -0
- package/references/craft/battery-face.md +52 -0
- package/references/craft/blob-profile.md +53 -0
- package/references/craft/bluetooth-face.md +52 -0
- package/references/craft/booking-slot-calendar.md +52 -0
- package/references/craft/bookmark-save-button.md +52 -0
- package/references/craft/browser.md +51 -0
- package/references/craft/cafe-menu-board.md +52 -0
- package/references/craft/calendar-reminder-notification.md +52 -0
- package/references/craft/chat-bubble-notification.md +53 -0
- package/references/craft/checkbox-field-input.md +52 -0
- package/references/craft/cherry-petal-background.md +51 -0
- package/references/craft/cinder-latch-button.md +51 -0
- package/references/craft/cinema-ticket.md +52 -0
- package/references/craft/circle-cut-frame.md +51 -0
- package/references/craft/combobox-field-input.md +52 -0
- package/references/craft/compass.md +51 -0
- package/references/craft/contact-form.md +52 -0
- package/references/craft/contact-profile.md +52 -0
- package/references/craft/copy-email.md +53 -0
- package/references/craft/coral-glow-background.md +51 -0
- package/references/craft/craft-copy-button.md +52 -0
- package/references/craft/craft-signup-form.md +53 -0
- package/references/craft/credit-card-glass.md +51 -0
- package/references/craft/customers-table.md +52 -0
- package/references/craft/daily-activity-calendar.md +52 -0
- package/references/craft/daily-motivation.md +53 -0
- package/references/craft/dark-arc-bands-background.md +51 -0
- package/references/craft/dark-aurora-background.md +51 -0
- package/references/craft/dark-carbon-spotlight-background.md +51 -0
- package/references/craft/dark-ember-background.md +51 -0
- package/references/craft/dark-ink-field-background.md +51 -0
- package/references/craft/dark-midnight-mesh-background.md +51 -0
- package/references/craft/dark-rose-noir-background.md +51 -0
- package/references/craft/dark-teal-depth-background.md +51 -0
- package/references/craft/date-field-input.md +52 -0
- package/references/craft/date-range-picker-card.md +52 -0
- package/references/craft/delivery-notification.md +52 -0
- package/references/craft/denim-product-editorial.md +52 -0
- package/references/craft/deploy-notification.md +52 -0
- package/references/craft/depth-outline-button.md +51 -0
- package/references/craft/diagonal-box-pattern.md +51 -0
- package/references/craft/dimple-switch.md +51 -0
- package/references/craft/discord-chat.md +53 -0
- package/references/craft/dnd-face.md +52 -0
- package/references/craft/dot-grid-pattern.md +51 -0
- package/references/craft/download-button.md +52 -0
- package/references/craft/drop-cap-editorial.md +52 -0
- package/references/craft/editor-tool-dock.md +52 -0
- package/references/craft/editorial-quote.md +52 -0
- package/references/craft/editorial-staff-profile.md +51 -0
- package/references/craft/electric-scooter.md +53 -0
- package/references/craft/email-notification.md +53 -0
- package/references/craft/event-countdown-card.md +51 -0
- package/references/craft/event-ticket.md +53 -0
- package/references/craft/facebook-post.md +53 -0
- package/references/craft/file-menu.md +52 -0
- package/references/craft/file-upload-field-input.md +52 -0
- package/references/craft/film-strip.md +52 -0
- package/references/craft/filter-sort.md +52 -0
- package/references/craft/fine-grain-pattern.md +51 -0
- package/references/craft/flight-arrival.md +52 -0
- package/references/craft/flight-boarding.md +52 -0
- package/references/craft/floating-label-field-input.md +51 -0
- package/references/craft/focus-breath.md +51 -0
- package/references/craft/folder-tab-card.md +52 -0
- package/references/craft/follow-button.md +52 -0
- package/references/craft/forgot-password-form.md +53 -0
- package/references/craft/frost-mesh-background.md +51 -0
- package/references/craft/gallery-grid.md +53 -0
- package/references/craft/gallery-wall.md +52 -0
- package/references/craft/github-contribution.md +52 -0
- package/references/craft/github-repo.md +52 -0
- package/references/craft/glass-overlay-image.md +53 -0
- package/references/craft/graph-paper-pattern.md +51 -0
- package/references/craft/halftone-pop-background.md +51 -0
- package/references/craft/hard-shadow-polaroid-frame.md +51 -0
- package/references/craft/heart-rate.md +52 -0
- package/references/craft/hold-to-delete-button.md +52 -0
- package/references/craft/honey-ember-background.md +51 -0
- package/references/craft/hydration.md +51 -0
- package/references/craft/incoming-call-notification.md +53 -0
- package/references/craft/ink-stamp-document.md +52 -0
- package/references/craft/ink-wash-background.md +51 -0
- package/references/craft/input-group-field.md +51 -0
- package/references/craft/inset-button.md +51 -0
- package/references/craft/instagram-post.md +53 -0
- package/references/craft/ios-calendar-widget.md +51 -0
- package/references/craft/ios-digital-clock.md +51 -0
- package/references/craft/ios-earbuds.md +51 -0
- package/references/craft/ios-map-location.md +51 -0
- package/references/craft/ipad.md +51 -0
- package/references/craft/ipod.md +51 -0
- package/references/craft/journal-writing.md +52 -0
- package/references/craft/kebab-actions.md +52 -0
- package/references/craft/keyboard-shortcuts.md +52 -0
- package/references/craft/laptop.md +51 -0
- package/references/craft/like-button.md +52 -0
- package/references/craft/line-grid-pattern.md +51 -0
- package/references/craft/linen-tab-button.md +51 -0
- package/references/craft/linen-weave-background.md +51 -0
- package/references/craft/linked-in-post.md +53 -0
- package/references/craft/linked-in-profile.md +52 -0
- package/references/craft/login-form.md +53 -0
- package/references/craft/mac-dock.md +52 -0
- package/references/craft/magazine-cover.md +53 -0
- package/references/craft/minimal-agenda.md +52 -0
- package/references/craft/mint-lagoon-background.md +51 -0
- package/references/craft/month-picker-calendar.md +52 -0
- package/references/craft/museum-placard.md +51 -0
- package/references/craft/music-player.md +53 -0
- package/references/craft/music-playlist.md +53 -0
- package/references/craft/newsletter-form.md +52 -0
- package/references/craft/notepad.md +52 -0
- package/references/craft/notification.md +52 -0
- package/references/craft/now-playing-bar.md +53 -0
- package/references/craft/orders-table.md +52 -0
- package/references/craft/otp-boxed-input.md +52 -0
- package/references/craft/otp-underline-input.md +51 -0
- package/references/craft/page-loader-overlay.md +46 -0
- package/references/craft/paper-fold-background.md +51 -0
- package/references/craft/password-field-input.md +52 -0
- package/references/craft/payment-notification.md +52 -0
- package/references/craft/phone-field-input.md +51 -0
- package/references/craft/phone.md +51 -0
- package/references/craft/photo-album.md +52 -0
- package/references/craft/photo-contact-sheet.md +52 -0
- package/references/craft/polaroid-image.md +52 -0
- package/references/craft/pomodoro.md +52 -0
- package/references/craft/presence-dock.md +51 -0
- package/references/craft/prism-depth-button.md +51 -0
- package/references/craft/progress-ring-card.md +51 -0
- package/references/craft/quantity-stepper-button.md +52 -0
- package/references/craft/radio-group-field-input.md +51 -0
- package/references/craft/rain-prism-background.md +51 -0
- package/references/craft/recent-transactions-table.md +52 -0
- package/references/craft/recorder-face.md +52 -0
- package/references/craft/resource-links-panel.md +52 -0
- package/references/craft/retail-price-tag.md +51 -0
- package/references/craft/reverse-diagonal-box-pattern.md +51 -0
- package/references/craft/ride-pickup.md +53 -0
- package/references/craft/sand-drift-background.md +51 -0
- package/references/craft/search-input.md +52 -0
- package/references/craft/segmented-toggle-button.md +51 -0
- package/references/craft/select-field-input.md +52 -0
- package/references/craft/share-menu.md +52 -0
- package/references/craft/sheen-pill-button.md +51 -0
- package/references/craft/slate-chip-switch.md +51 -0
- package/references/craft/sleep-score.md +52 -0
- package/references/craft/slide-to-confirm-button.md +52 -0
- package/references/craft/slow-living-polaroid.md +52 -0
- package/references/craft/soft-pill-button.md +51 -0
- package/references/craft/soft-spotlight-background.md +51 -0
- package/references/craft/soft-ui-button.md +51 -0
- package/references/craft/spin-loader.md +52 -0
- package/references/craft/spotlight-bar.md +52 -0
- package/references/craft/stacked-cards-effect.md +52 -0
- package/references/craft/stacked-folder-card.md +52 -0
- package/references/craft/stamp-postcard.md +52 -0
- package/references/craft/step-count.md +51 -0
- package/references/craft/sticky-note-polaroid-frame.md +51 -0
- package/references/craft/stopwatch.md +52 -0
- package/references/craft/sunrise-horizon-background.md +51 -0
- package/references/craft/sunset-bloom-background.md +51 -0
- package/references/craft/switch-field-input.md +51 -0
- package/references/craft/system-alert.md +52 -0
- package/references/craft/tasks-table.md +53 -0
- package/references/craft/team-member-profile-grid.md +52 -0
- package/references/craft/team-member.md +53 -0
- package/references/craft/team-members-table.md +53 -0
- package/references/craft/terminal-log.md +52 -0
- package/references/craft/terrazzo-fragment-background.md +51 -0
- package/references/craft/testimonial.md +53 -0
- package/references/craft/text-field-input.md +51 -0
- package/references/craft/text-loader.md +51 -0
- package/references/craft/textarea-field-input.md +51 -0
- package/references/craft/thermal-receipt.md +52 -0
- package/references/craft/threads-post.md +53 -0
- package/references/craft/toast-notification.md +52 -0
- package/references/craft/toggle-pricing-cards.md +52 -0
- package/references/craft/torch-face.md +52 -0
- package/references/craft/transform-box-frame.md +51 -0
- package/references/craft/transform-plus-frame.md +51 -0
- package/references/craft/travel-postcard.md +53 -0
- package/references/craft/tropical-tide-background.md +51 -0
- package/references/craft/twitter-post.md +53 -0
- package/references/craft/twitter-profile.md +53 -0
- package/references/craft/user-menu.md +53 -0
- package/references/craft/user-profile.md +53 -0
- package/references/craft/users-select-table.md +53 -0
- package/references/craft/voice-assistant.md +52 -0
- package/references/craft/wallet-pass.md +52 -0
- package/references/craft/weather-snapshot.md +52 -0
- package/references/craft/week-strip-calendar.md +52 -0
- package/references/craft/wifi-toggle.md +52 -0
- package/references/craft/workspace-switcher.md +52 -0
- package/references/guides/baseline-ui-craft.md +61 -0
- package/references/guides/craft-surface-design-system.md +120 -0
- package/references/guides/design-system-checklist.md +98 -0
- package/references/guides/enterprise-dashboard-patterns.md +53 -0
- package/references/guides/interaction-transitions.md +71 -0
- package/references/guides/motion-engineering.md +137 -0
- package/references/guides/motion-patterns.md +106 -0
- package/references/guides/motion-performance.md +66 -0
- package/references/guides/style-presets.md +115 -0
- package/references/guides/universal-mobile-patterns.md +72 -0
- package/references/motion/action-sheet.md +98 -0
- package/references/motion/action-swap.md +339 -0
- package/references/motion/adaptive-stepper.md +95 -0
- package/references/motion/animated-badge.md +92 -0
- package/references/motion/animated-sidebar.md +446 -0
- package/references/motion/animated-toast-stack.md +214 -0
- package/references/motion/aspect-ratio.md +59 -0
- package/references/motion/audio-player.md +59 -0
- package/references/motion/autocomplete.md +69 -0
- package/references/motion/avatar-group.md +93 -0
- package/references/motion/bottom-sheet.md +85 -0
- package/references/motion/bounce-sidebar.md +80 -0
- package/references/motion/bouncy-accordion.md +115 -0
- package/references/motion/breadcrumb.md +62 -0
- package/references/motion/button.md +271 -0
- package/references/motion/card-resize.md +60 -0
- package/references/motion/cascader.md +99 -0
- package/references/motion/center-morph-modal.md +133 -0
- package/references/motion/checkbox.md +76 -0
- package/references/motion/chip.md +81 -0
- package/references/motion/collapsible.md +73 -0
- package/references/motion/color-picker.md +57 -0
- package/references/motion/combobox.md +247 -0
- package/references/motion/confetti.md +65 -0
- package/references/motion/context-menu.md +269 -0
- package/references/motion/copy-button.md +59 -0
- package/references/motion/cylinder-carousel.md +151 -0
- package/references/motion/date-range-picker.md +68 -0
- package/references/motion/dock.md +105 -0
- package/references/motion/drawer.md +94 -0
- package/references/motion/error-shake.md +85 -0
- package/references/motion/event-calendar.md +81 -0
- package/references/motion/expandable-control.md +89 -0
- package/references/motion/expanding-arrow-button.md +178 -0
- package/references/motion/file-tree.md +139 -0
- package/references/motion/filter-builder.md +106 -0
- package/references/motion/frame.md +61 -0
- package/references/motion/gantt.md +61 -0
- package/references/motion/glow-button.md +59 -0
- package/references/motion/haptic-pressable.md +64 -0
- package/references/motion/hover-card.md +86 -0
- package/references/motion/icon-stack.md +64 -0
- package/references/motion/input.md +108 -0
- package/references/motion/kanban.md +111 -0
- package/references/motion/kbd.md +66 -0
- package/references/motion/loader.md +82 -0
- package/references/motion/magnet-dock.md +64 -0
- package/references/motion/marquee.md +68 -0
- package/references/motion/metric-card.md +81 -0
- package/references/motion/morphing-modal.md +230 -0
- package/references/motion/multi-select.md +202 -0
- package/references/motion/number-field.md +70 -0
- package/references/motion/number.md +198 -0
- package/references/motion/page-transition.md +78 -0
- package/references/motion/pagination.md +64 -0
- package/references/motion/password-input.md +77 -0
- package/references/motion/phone-input.md +63 -0
- package/references/motion/popover.md +209 -0
- package/references/motion/preview-rail.md +165 -0
- package/references/motion/progress-ring.md +73 -0
- package/references/motion/pull-to-refresh.md +172 -0
- package/references/motion/radio.md +73 -0
- package/references/motion/range-slider.md +290 -0
- package/references/motion/rating.md +69 -0
- package/references/motion/reorder-grid.md +69 -0
- package/references/motion/resizable-panel.md +75 -0
- package/references/motion/scroll-animation.md +397 -0
- package/references/motion/segmented-control.md +68 -0
- package/references/motion/segmented-progress.md +70 -0
- package/references/motion/select.md +196 -0
- package/references/motion/shader-background.md +351 -0
- package/references/motion/shared-layout-bg.md +80 -0
- package/references/motion/sortable-list.md +62 -0
- package/references/motion/speed-dial.md +63 -0
- package/references/motion/split-text.md +62 -0
- package/references/motion/spotlight-card.md +67 -0
- package/references/motion/stepper.md +83 -0
- package/references/motion/success-check.md +67 -0
- package/references/motion/switch.md +62 -0
- package/references/motion/table.md +519 -0
- package/references/motion/tabs.md +116 -0
- package/references/motion/text-animation.md +285 -0
- package/references/motion/text-swap.md +64 -0
- package/references/motion/theme-toggle.md +82 -0
- package/references/motion/tilt-card.md +59 -0
- package/references/motion/timeline.md +85 -0
- package/references/motion/toggle-group.md +70 -0
- package/references/motion/tooltip.md +82 -0
- package/references/motion/tree-view.md +87 -0
- package/references/motion/wheel-picker.md +142 -0
- package/scripts/build_docs.py +557 -0
- package/scripts/install-component.py +232 -0
- package/scripts/test_release.py +119 -0
- package/scripts/updater.mjs +9 -0
- package/scripts/verify_skill.py +84 -0
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Craft & Surface Design System"
|
|
3
|
+
description: "Design specifications, typography, elevation, and component patterns for Motion UI Craft & Surface components."
|
|
4
|
+
category: "Design Systems"
|
|
5
|
+
publishedAt: "2026-07-09"
|
|
6
|
+
updatedAt: "2026-09-17"
|
|
7
|
+
documentation: "references/guides/craft-surface-design-system.md"
|
|
8
|
+
markdown: "references/guides/craft-surface-design-system.md"
|
|
9
|
+
license: "MIT"
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# Craft & Surface Design System
|
|
13
|
+
|
|
14
|
+
The Craft & Surface aesthetic is built around the concept of a clean, quiet workbench: tools and components laid out with tactile precision, ready for production. The brand and showcase surfaces remain neutral so that interactive controls and components remain the focal point.
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## 1. Color Palette
|
|
19
|
+
|
|
20
|
+
The palette pairs deep neutral ink with crisp white surfaces and restrained, purposeful accents:
|
|
21
|
+
|
|
22
|
+
| Token | Hex | Usage |
|
|
23
|
+
| :--- | :--- | :--- |
|
|
24
|
+
| `ink` | `#171717` | Primary text, high-contrast headings, solid button fills |
|
|
25
|
+
| `ink-soft` | `#262626` | Secondary headings, active icons, subtle text |
|
|
26
|
+
| `body` | `#404040` | Body copy, descriptions, article text |
|
|
27
|
+
| `muted` | `#737373` | Secondary labels, captions, metadata |
|
|
28
|
+
| `faint` | `#a3a3a3` | Placeholder text, disabled glyphs |
|
|
29
|
+
| `border` | `#e5e5e5` | Standard structural borders, dividers |
|
|
30
|
+
| `border-subtle` | `#f5f5f5` | Inner container borders, secondary cards |
|
|
31
|
+
| `paper` | `#ffffff` | Primary background, card surfaces, button labels |
|
|
32
|
+
| `paper-tint` | `#fafafa` | Subtle stage backgrounds, preview containers |
|
|
33
|
+
| `accent-rose` | `#f43f5e` | Active likes, bookmark highlights, badges |
|
|
34
|
+
| `accent-cyan` | `#a5f3fc` | Highlight glows, subtle cyan badges |
|
|
35
|
+
| `danger` | `#fda4af` | Error borders, destructive states |
|
|
36
|
+
|
|
37
|
+
---
|
|
38
|
+
|
|
39
|
+
## 2. Typography
|
|
40
|
+
|
|
41
|
+
Components utilize a pairing of expressive serif display typography and crisp geometric sans-serif for UI controls:
|
|
42
|
+
|
|
43
|
+
- **Display & Headline**: `Instrument Serif`, `ui-serif`, `Georgia`, `serif`
|
|
44
|
+
- Font size: `1.875rem` (Display), `1.5rem` (Headline)
|
|
45
|
+
- Weight: `400`
|
|
46
|
+
- Purpose: Editorial headers, hero titles, ticket labels, certificate cards
|
|
47
|
+
- **Title & UI Labels**: `Geist`, `ui-sans-serif`, `system-ui`, `sans-serif`
|
|
48
|
+
- Font size: `0.875rem` (Title, 600 weight), `0.75rem` (Label, 500 weight)
|
|
49
|
+
- Purpose: Button labels, form inputs, table headers, widget status
|
|
50
|
+
- **Body**: `Geist`, `ui-sans-serif`, `system-ui`, `sans-serif`
|
|
51
|
+
- Font size: `1rem` / `0.875rem`, weight `400`, letter spacing `-0.025em`
|
|
52
|
+
- **Monospace**: `Geist Mono`, `ui-monospace`, `monospace`
|
|
53
|
+
- Font size: `0.75rem` / `0.625rem`
|
|
54
|
+
- Purpose: Timestamps, transaction IDs, code snippets, coordinates
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
58
|
+
## 3. Geometry & Elevation
|
|
59
|
+
|
|
60
|
+
- **Radii Tokens**:
|
|
61
|
+
- `rounded-md` (`6px` - `8px`): Buttons, input fields, badges, tags
|
|
62
|
+
- `rounded-lg` (`12px` - `16px`): Cards, dropdown menus, notification banners
|
|
63
|
+
- `rounded-2xl` (`24px`): Editorial cards, mockups, large containers
|
|
64
|
+
- `rounded-full` (`9999px`): Pills, avatar rings, slider handles
|
|
65
|
+
- **Internal Spacing**:
|
|
66
|
+
- Standard container padding: `p-4` or `p-6`
|
|
67
|
+
- Compact widget spacing: `gap-2` or `gap-3`
|
|
68
|
+
- **Border-Based Focus**:
|
|
69
|
+
- Input focus states avoid neon rings. Instead, focus transitions to a darker border (`border-neutral-800`) with `ring-0` or `outline-none`.
|
|
70
|
+
|
|
71
|
+
---
|
|
72
|
+
|
|
73
|
+
## 4. Tactile & Physical Interactions
|
|
74
|
+
|
|
75
|
+
Craft components incorporate physical, skeuomorphic cues without visual clutter:
|
|
76
|
+
|
|
77
|
+
1. **Tactile 3D Buttons**:
|
|
78
|
+
- Built with multi-layered box-shadows mimicking physical keycaps:
|
|
79
|
+
`shadow-[0_4px_0_0_#171717] active:shadow-[0_0px_0_0_#171717] active:translate-y-1`
|
|
80
|
+
- Tactile feedback indicates exact button depression upon press.
|
|
81
|
+
2. **Neumorphic Soft UI**:
|
|
82
|
+
- Dual-shadow light/dark balance on soft neutral surfaces:
|
|
83
|
+
`shadow-[-4px_-4px_10px_rgba(255,255,255,0.8),4px_4px_10px_rgba(0,0,0,0.08)]`
|
|
84
|
+
- Transitions to inset shadows when toggled active.
|
|
85
|
+
3. **Physical Widgets & Mockups**:
|
|
86
|
+
- High-fidelity SVG frames for Apple iPhone, MacBook, iPad, Watch, and iPod.
|
|
87
|
+
- Dynamic indicators for battery, audio recording, stopwatch, compass, and hydration.
|
|
88
|
+
|
|
89
|
+
---
|
|
90
|
+
|
|
91
|
+
## 5. Integration with Multi-Style Presets
|
|
92
|
+
|
|
93
|
+
Craft components fit into the `origin` and `minimal` style presets of Motion UI, offering developers pre-built editorial layouts, device mockups, and physical tactile buttons that complement standard motion primitives.
|
|
94
|
+
|
|
95
|
+
---
|
|
96
|
+
|
|
97
|
+
## 6. Next.js Image Domain Configuration
|
|
98
|
+
|
|
99
|
+
Several craft showcase components utilize `next/image` to render high-fidelity mockups, avatars, and editorial media. When using these components in a Next.js application, configure `next.config.js` or `next.config.mjs` to permit the required remote image hostnames:
|
|
100
|
+
|
|
101
|
+
```js
|
|
102
|
+
/** @type {import('next').NextConfig} */
|
|
103
|
+
const nextConfig = {
|
|
104
|
+
images: {
|
|
105
|
+
remotePatterns: [
|
|
106
|
+
{ protocol: "https", hostname: "images.unsplash.com" },
|
|
107
|
+
{ protocol: "https", hostname: "cursor.com" },
|
|
108
|
+
{ protocol: "https", hostname: "flagcdn.com" },
|
|
109
|
+
{ protocol: "https", hostname: "ditherit.com" },
|
|
110
|
+
{ protocol: "https", hostname: "lucide.dev" },
|
|
111
|
+
{ protocol: "https", hostname: "www.producthunt.com" },
|
|
112
|
+
],
|
|
113
|
+
},
|
|
114
|
+
};
|
|
115
|
+
|
|
116
|
+
module.exports = nextConfig;
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
For pure React or Vite setups, replace `next/image` imports with standard HTML `<img>` elements or local asset paths.
|
|
120
|
+
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Design System Architecture & Production Checklist"
|
|
3
|
+
description: "Comprehensive engineering checklist and architectural standards for modern design systems, covering design tokens, WCAG 2.1 AA/AAA accessibility, component health, and governance."
|
|
4
|
+
documentation: "references/guides/design-system-checklist.md"
|
|
5
|
+
markdown: "references/guides/design-system-checklist.md"
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Design System Architecture & Production Checklist
|
|
9
|
+
|
|
10
|
+
> Synthesized from [design-system-checklist](https://github.com/ardakaracizmeli/design-system-checklist) and modern production design systems ([shadcn/ui](https://github.com/shadcn-ui/ui), Radix, Tailwind CSS).
|
|
11
|
+
|
|
12
|
+
A design system is not just a UI kit; it is the contract between design tokens, accessible components, developer experience, and governance. Use this checklist before releasing or auditing components in your design system.
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
## 1. Design Language & Brand Foundations
|
|
17
|
+
|
|
18
|
+
- [ ] **Design Principles Established**: Defined 3–5 core principles (e.g. *Predictable over clever*, *Frictionless by default*, *Accessible for all*).
|
|
19
|
+
- [ ] **Voice & Tone Guidelines**: Established standards for error messages, empty states, confirmation alerts, and technical explanations.
|
|
20
|
+
- [ ] **Brand Identity Mapping**: Logo assets, icon styles (stroke width, corner radiuses), and brand accent alignments documented.
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## 2. Design Tokens Architecture
|
|
25
|
+
|
|
26
|
+
Design tokens represent the single source of truth for visual attributes across web, mobile, and agent interfaces.
|
|
27
|
+
|
|
28
|
+
### Color Tokens
|
|
29
|
+
- [ ] **Semantic Layering**: Never use raw hex codes or static palette values directly in components.
|
|
30
|
+
- Primitive scale: `slate-50` through `slate-950`
|
|
31
|
+
- Semantic roles: `--background`, `--foreground`, `--card`, `--primary`, `--secondary`, `--muted`, `--accent`, `--destructive`, `--border`, `--ring`
|
|
32
|
+
- [ ] **WCAG 2.1 Contrast Standards**:
|
|
33
|
+
- Minimum 4.5:1 for normal body copy (AA standard).
|
|
34
|
+
- Minimum 3:1 for large text (18pt+ or 14pt bold) and active UI controls/borders.
|
|
35
|
+
- Aim for 7:1 (AAA standard) on critical informational displays.
|
|
36
|
+
- [ ] **Dark Mode Inversion**:
|
|
37
|
+
- Dark mode surfaces must use layered elevation (base is darker, elevated surfaces like cards and dialogs are lighter with subtle border rings).
|
|
38
|
+
- Test pure black (`#000000`) vs deep obsidian (`#09090b` / `#0f172a`) to ensure anti-banding on OLED displays.
|
|
39
|
+
|
|
40
|
+
### Typography Scale
|
|
41
|
+
- [ ] **Modular Ratio Scale**:
|
|
42
|
+
- `xs`: 12px / line-height 16px
|
|
43
|
+
- `sm`: 14px / line-height 20px
|
|
44
|
+
- `base`: 16px / line-height 24px
|
|
45
|
+
- `lg`: 18px / line-height 28px
|
|
46
|
+
- `xl`: 20px / line-height 28px
|
|
47
|
+
- `2xl`: 24px / line-height 32px
|
|
48
|
+
- `3xl`: 30px / line-height 36px
|
|
49
|
+
- [ ] **Tabular Figures (`tabular-nums`)**: Enabled on all metrics, counters, pricing, and streaming agent text to eliminate jitter.
|
|
50
|
+
- [ ] **Truncation & Ellipsis Rules**: Specified multiline clamping (`line-clamp-2`) and tooltip fallbacks for truncated titles.
|
|
51
|
+
|
|
52
|
+
### Spacing & Grid System
|
|
53
|
+
- [ ] **4px / 8px Spatial Rhythm**: All padding, margin, and gaps conform to multiples of 4:
|
|
54
|
+
- `1`: 4px | `2`: 8px | `3`: 12px | `4`: 16px | `6`: 24px | `8`: 32px | `12`: 48px
|
|
55
|
+
- [ ] **Layout Containers**: Standardized container constraints (`sm: 640px`, `md: 768px`, `lg: 1024px`, `xl: 1280px`).
|
|
56
|
+
|
|
57
|
+
### Elevation & Border Radius
|
|
58
|
+
- [ ] **Elevation Tiers**: Defined shadow tokens for ambient, dropdown, card, modal, and popover depths.
|
|
59
|
+
- [ ] **Consistent Radius Scale**: `rounded-sm` (4px), `rounded-md` (6px), `rounded-lg` (8px), `rounded-full` (9999px). Nested radiuses follow the inner formula: `R_inner = R_outer - padding`.
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
## 3. Component Health & API Contract
|
|
64
|
+
|
|
65
|
+
Every component must satisfy these 7 core requirements:
|
|
66
|
+
|
|
67
|
+
1. **Controlled & Uncontrolled Support**:
|
|
68
|
+
- Provide `value` + `onChange` for controlled state.
|
|
69
|
+
- Provide `defaultValue` for uncontrolled state.
|
|
70
|
+
2. **Class Merging**:
|
|
71
|
+
- Always accept `className` and wrap with `cn(...)` (`clsx` + `tailwind-merge`) so consumer utilities override defaults without specificity hacks.
|
|
72
|
+
3. **Ref Forwarding**:
|
|
73
|
+
- Forward DOM refs with `React.forwardRef` or modern React 19 ref attributes to allow focus management, positioning libraries, and measuring.
|
|
74
|
+
4. **Accessible Keyboard Navigation**:
|
|
75
|
+
- Interactive elements must be reachable via `Tab` / `Shift+Tab`.
|
|
76
|
+
- Menus, comboboxes, and lists must support `ArrowUp`, `ArrowDown`, `Home`, `End`, and `Enter`/`Space`.
|
|
77
|
+
- Overlays must close on `Escape`.
|
|
78
|
+
5. **Visible Focus Rings**:
|
|
79
|
+
- Distinct focus indicator using `focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2`.
|
|
80
|
+
- Never suppress focus rings with `outline-none` unless replaced with a compliant visible ring.
|
|
81
|
+
6. **ARIA Roles & States**:
|
|
82
|
+
- Proper `role` attribute (`dialog`, `listbox`, `tablist`, `menu`, `tooltip`).
|
|
83
|
+
- Live states: `aria-expanded`, `aria-selected`, `aria-checked`, `aria-disabled`, `aria-invalid`.
|
|
84
|
+
- Labeling: `aria-labelledby`, `aria-describedby`, or `aria-label` for icon-only buttons.
|
|
85
|
+
7. **Reduced Motion Adaptation**:
|
|
86
|
+
- Query `useReducedMotion()`. Swap spatial translations and spring overshoots for instant opacity transitions.
|
|
87
|
+
|
|
88
|
+
---
|
|
89
|
+
|
|
90
|
+
## 4. Documentation & Governance
|
|
91
|
+
|
|
92
|
+
- [ ] **Anatomy Breakdown**: Labeled diagram of component parts (Trigger, Content, Header, Footer, Item, Indicator).
|
|
93
|
+
- [ ] **Do's and Don'ts**: Concrete visual examples of correct vs improper usage.
|
|
94
|
+
- [ ] **SemVer Release Contract**:
|
|
95
|
+
- `Patch`: Bug fixes, CSS refactor without breaking consumer layouts.
|
|
96
|
+
- `Minor`: New components, backward-compatible props.
|
|
97
|
+
- `Major`: Removed props, changed event signatures, or modified required peer dependencies.
|
|
98
|
+
- [ ] **Deprecation Lifecycle**: Deprecated props emit development warnings for at least one minor version before deletion.
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Enterprise Dashboard Architecture & Complex UI Patterns"
|
|
3
|
+
description: "Architectural guidelines for high-density enterprise dashboard interfaces, data grids, kanban boards, faceted filter builders, timelines, and cascading selectors."
|
|
4
|
+
documentation: "references/guides/enterprise-dashboard-patterns.md"
|
|
5
|
+
markdown: "references/guides/enterprise-dashboard-patterns.md"
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Enterprise Dashboard Architecture & Complex UI Patterns
|
|
9
|
+
|
|
10
|
+
> Architectural patterns for complex, data-intensive web applications, directly synthesized from [keenthemes/reui](https://github.com/keenthemes/reui) and [shadcn/ui](https://github.com/shadcn-ui/ui).
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## 1. Information Density vs Visual Clarity
|
|
15
|
+
|
|
16
|
+
Enterprise dashboards deal with high volumes of structured data. Successful layouts balance three constraints:
|
|
17
|
+
1. **Scannability**: Critical numbers and statuses readable at a glance without horizontal scanning fatigue.
|
|
18
|
+
2. **Progressive Disclosure**: Detailed metadata hidden behind hover cards, popovers, or expandable disclosures until requested.
|
|
19
|
+
3. **Responsive Adaptation**: Grids collapse from 4 columns on widescreen $\to$ 2 columns on tablet $\to$ 1 column cards on mobile.
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## 2. The 5 Core Enterprise Primitives
|
|
24
|
+
|
|
25
|
+
### 1. Stepped Filter Query Builders
|
|
26
|
+
Faceted filtering enables non-technical users to build complex boolean queries (e.g. `Status == "Active"` AND `Department in ["Eng", "Product"]`):
|
|
27
|
+
- **Attribute Selector**: Dropdown to pick target field.
|
|
28
|
+
- **Operator Selector**: `equals`, `contains`, `greater than`, `is empty`.
|
|
29
|
+
- **Value Input**: Combobox, date range picker, or tag selector.
|
|
30
|
+
- **Visual Pills**: Each applied filter renders as a dismissible chip.
|
|
31
|
+
|
|
32
|
+
### 2. Timelines & Audit Trails
|
|
33
|
+
Chronological event streams that track order workflows, build pipelines, or agent actions:
|
|
34
|
+
- **Node Statuses**: `completed` (green check), `current` (pulsing primary node), `upcoming` (muted outline), `failed` (destructive cross).
|
|
35
|
+
- **Connecting Track**: Dynamic vertical line with gradient fill indicating progress.
|
|
36
|
+
- **Timestamp Alignment**: Monospace relative timestamps (`2m ago`, `14:32:05`).
|
|
37
|
+
|
|
38
|
+
### 3. Kanban Task Boards
|
|
39
|
+
Multi-column workflow managers (e.g. Backlog $\to$ In Progress $\to$ Review $\to$ Done):
|
|
40
|
+
- **WIP Limits**: Column headers display task counts against max capacity (e.g. `3 / 5`).
|
|
41
|
+
- **Drag Reordering**: Cards lift with a slight rotation ($2^\circ$) and drop shadow when grabbed, while target drop zones highlight.
|
|
42
|
+
- **Keyboard Shortcuts**: `Enter` to open card, `Space` to pick up, arrow keys to move between columns.
|
|
43
|
+
|
|
44
|
+
### 4. Cascader / Multi-Level Drilldown
|
|
45
|
+
For deep hierarchical taxonomies (e.g. Category $\to$ Subcategory $\to$ Item, or Region $\to$ Country $\to$ City):
|
|
46
|
+
- Replaces overwhelming deeply nested menus with a single compact footprint.
|
|
47
|
+
- Clicking a branch node slides the next tier of options into view with breadcrumbs.
|
|
48
|
+
- Search input instantly filters across all nested levels.
|
|
49
|
+
|
|
50
|
+
### 5. High-Density Virtualized Data Grids
|
|
51
|
+
- **Windowing**: Render only the visible rows in the viewport using `@tanstack/react-virtual` to support $10{,}000+$ rows at 60 FPS.
|
|
52
|
+
- **Sticky Column Freezing**: Left-pinning primary keys (e.g. User Name / ID) and right-pinning action rows during horizontal scrolling.
|
|
53
|
+
- **Batch Selection**: Header master checkbox with indeterminate state for partial selection.
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "The 12 Canonical Interaction Transitions"
|
|
3
|
+
description: "Reference catalog and implementation blueprints for the 12 essential UI transitions from Transitions.dev, including cubic-bezier tokens, spring physics, and zero-layout-shift formulas."
|
|
4
|
+
documentation: "references/guides/interaction-transitions.md"
|
|
5
|
+
markdown: "references/guides/interaction-transitions.md"
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# The 12 Canonical Interaction Transitions
|
|
9
|
+
|
|
10
|
+
> Synthesized from [transitions.dev](https://github.com/Jakubantalik/transitions.dev) by Jakub Antalík.
|
|
11
|
+
|
|
12
|
+
Micro-interactions make the difference between an application that feels static and one that feels responsive, continuous, and physical. Here are the 12 canonical transitions, their physics parameters, and exact implementation patterns.
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
## 1. Interaction Transition Catalog
|
|
17
|
+
|
|
18
|
+
| # | Pattern Name | Interaction Description | Physics / Curve | Duration / Spring |
|
|
19
|
+
|---|:---|:---|:---|:---|
|
|
20
|
+
| **1** | **Card Resize** | Container expands or contracts its footprint smoothly without layout distortion. | `cubic-bezier(0.16, 1, 0.3, 1)` | 280–350ms or `SPRING_PANEL` |
|
|
21
|
+
| **2** | **Number Pop-In** | Value changes with rolling digit slot animation and subtle directional blur. | `cubic-bezier(0.34, 1.56, 0.64, 1)` | 200–280ms / stagger 20ms |
|
|
22
|
+
| **3** | **Notification Badge** | Badge pops onto an icon with a spring overshoot and scales in from center. | `SPRING_BOUNCE` | Stiffness: 300, Damping: 18 |
|
|
23
|
+
| **4** | **Text States Swap** | Label trades places (e.g. "Save" $\to$ "Saved") with directional fade & blur. | `SPRING_SWAP` | Stiffness: 460, Damping: 30 |
|
|
24
|
+
| **5** | **Menu Dropdown** | Menu unfolds from the trigger origin using clip-path or scaleY with blur. | `cubic-bezier(0.16, 1, 0.3, 1)` | 180–220ms |
|
|
25
|
+
| **6** | **Modal Open/Close** | Backdrop fades while panel scales from 0.95 to 1.0 with subtle spring brake. | `SPRING_PANEL` | Stiffness: 420, Damping: 40 |
|
|
26
|
+
| **7** | **Panel Reveal** | Side or bottom drawer slides along axis with inertia and edge damping. | `cubic-bezier(0.32, 0.72, 0, 1)` | 300–400ms |
|
|
27
|
+
| **8** | **Page Side-by-Side** | Multi-step navigation slides current view left while incoming view slides in. | `cubic-bezier(0.2, 0, 0, 1)` | 320ms / `mode="wait"` |
|
|
28
|
+
| **9** | **Icon Swap** | Action icon changes (e.g. Hamburger $\to$ X, Play $\to$ Pause) with rotation and scale. | `SPRING_SWAP` | Stiffness: 460, Damping: 30 |
|
|
29
|
+
| **10** | **Success Check** | Circle halo pulses outward while checkmark draws itself along SVG path. | Multi-stage timeline | 350ms total sequence |
|
|
30
|
+
| **11** | **Avatar Group Hover** | Hovered avatar springs up and scales up while neighbor avatars fan apart. | `SPRING_BOUNCE` + Falloff | Stiffness: 300, Damping: 20 |
|
|
31
|
+
| **12** | **Error Shake** | Input shakes horizontally 3–4 times on validation failure then returns to neutral. | Keyframe oscillate | 350ms (`[-4px, 4px, -3px, 3px, 0]`) |
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## 2. Key Interaction Recipes
|
|
36
|
+
|
|
37
|
+
### Pattern 10: Success Check Animation
|
|
38
|
+
The success check is a compound celebration micro-interaction:
|
|
39
|
+
1. Halo circle scales out with fading opacity.
|
|
40
|
+
2. Background pill or circle pops in with `SPRING_BOUNCE`.
|
|
41
|
+
3. SVG checkmark uses `pathLength: 0` to `pathLength: 1` stroke animation.
|
|
42
|
+
|
|
43
|
+
```tsx
|
|
44
|
+
<motion.svg viewBox="0 0 24 24" className="size-6 text-emerald-500" fill="none">
|
|
45
|
+
<motion.circle
|
|
46
|
+
cx="12"
|
|
47
|
+
cy="12"
|
|
48
|
+
r="10"
|
|
49
|
+
stroke="currentColor"
|
|
50
|
+
strokeWidth="2"
|
|
51
|
+
initial={{ pathLength: 0, opacity: 0 }}
|
|
52
|
+
animate={{ pathLength: 1, opacity: 1 }}
|
|
53
|
+
transition={{ duration: 0.3, ease: EASE_OUT }}
|
|
54
|
+
/>
|
|
55
|
+
<motion.path
|
|
56
|
+
d="M8 12.5l2.5 2.5L16 9"
|
|
57
|
+
stroke="currentColor"
|
|
58
|
+
strokeWidth="2"
|
|
59
|
+
strokeLinecap="round"
|
|
60
|
+
strokeLinejoin="round"
|
|
61
|
+
initial={{ pathLength: 0 }}
|
|
62
|
+
animate={{ pathLength: 1 }}
|
|
63
|
+
transition={{ duration: 0.25, delay: 0.2, ease: EASE_OUT }}
|
|
64
|
+
/>
|
|
65
|
+
</motion.svg>
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
### Pattern 11: Avatar Group Distance Falloff
|
|
69
|
+
When hovering over avatar $i$, calculate each neighbor's offset based on its distance $|j - i|$:
|
|
70
|
+
$$\Delta x = \operatorname{sign}(j - i) \times \frac{24\text{px}}{1 + |j - i|}$$
|
|
71
|
+
This produces an organic magnetic dispersal effect where immediate neighbors move substantially and distant avatars remain undisturbed.
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Motion Engineering Guide"
|
|
3
|
+
description: "In-depth guide to modern Motion (motion/react v12/v13+), physics-based springs, layout animations, exit orchestration, gesture velocity handoffs, and hardware acceleration."
|
|
4
|
+
documentation: "references/guides/motion-engineering.md"
|
|
5
|
+
markdown: "references/guides/motion-engineering.md"
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Motion Engineering Guide
|
|
9
|
+
|
|
10
|
+
> Deep technical guide to building robust, high-performance animations with **Motion** (`motion/react` / `framer-motion`), based on core principles from [motiondivision/motion](https://github.com/motiondivision/motion).
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## 1. Physics-Based Springs vs Duration Easings
|
|
15
|
+
|
|
16
|
+
In UI engineering, duration-based transitions (`transition: all 300ms ease`) often feel robotic and interrupt-unsafe. When an interaction is canceled mid-flight, a CSS transition reverses awkwardly. **Spring physics** calculate movement continuously based on mass, tension, and damping, allowing natural velocity preservation when gestures are interrupted.
|
|
17
|
+
|
|
18
|
+
### Spring Equation Model
|
|
19
|
+
$$\ddot{x} + 2\zeta\omega_0 \dot{x} + \omega_0^2 x = 0$$
|
|
20
|
+
|
|
21
|
+
Where:
|
|
22
|
+
- **Stiffness** ($k$): Resistance to stretching. Higher values increase speed and responsiveness.
|
|
23
|
+
- **Damping** ($c$): Friction that resists motion. Low damping yields bouncy overshoots; high damping prevents oscillation (critically damped).
|
|
24
|
+
- **Mass** ($m$): Heaviness of the element. Higher mass gives slow, deliberate inertia.
|
|
25
|
+
|
|
26
|
+
### Canonical Spring Configurations (`lib/ease.ts`)
|
|
27
|
+
|
|
28
|
+
```tsx
|
|
29
|
+
// 1. Tappable / Press feedback (stiff, responsive, instant feedback)
|
|
30
|
+
export const SPRING_PRESS = { type: "spring", stiffness: 500, damping: 30, mass: 0.6 };
|
|
31
|
+
|
|
32
|
+
// 2. Playful Micro-Pops & Celebrations (springy bounce)
|
|
33
|
+
export const SPRING_BOUNCE = { type: "spring", stiffness: 300, damping: 18, mass: 0.8 };
|
|
34
|
+
|
|
35
|
+
// 3. Modals, Sheets, and Panels (controlled, weighted arrival)
|
|
36
|
+
export const SPRING_PANEL = { type: "spring", stiffness: 420, damping: 40, mass: 0.5 };
|
|
37
|
+
|
|
38
|
+
// 4. Shared Layout Glide (morphing pills, indicator glides)
|
|
39
|
+
export const SPRING_LAYOUT = { type: "spring", stiffness: 360, damping: 32, mass: 0.6 };
|
|
40
|
+
|
|
41
|
+
// 5. Critically Damped Slider / Handle (zero overshoot, buttery tracking)
|
|
42
|
+
export const SPRING_GLIDE = { stiffness: 700, damping: 50, mass: 0.5 };
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
## 2. Layout Animations & Shared Elements (`layoutId`)
|
|
48
|
+
|
|
49
|
+
Motion's layout engine uses an inverted FLIP (First, Last, Invert, Play) technique computed entirely with GPU-accelerated transforms.
|
|
50
|
+
|
|
51
|
+
### Rules for Flawless Layout Animations
|
|
52
|
+
1. **Never animate `width` and `height` directly**: Use `<motion.div layout>` or `<motion.div layoutId="unique-key">`. Motion calculates the bounding box change and applies an inverse `scale(x, y)` transform.
|
|
53
|
+
2. **Correcting Child Distortion**: When a parent morphs its dimensions via `layout`, children can appear stretched. Add `layout` to direct children or use `layout="position"` on the parent to restrict morphing to coordinate positioning.
|
|
54
|
+
3. **Pill & Indicator Gliding**:
|
|
55
|
+
```tsx
|
|
56
|
+
{tabs.map((tab) => (
|
|
57
|
+
<button key={tab.id} onClick={() => setSelected(tab.id)} className="relative px-3 py-1.5">
|
|
58
|
+
{selected === tab.id && (
|
|
59
|
+
<motion.div
|
|
60
|
+
layoutId="active-tab-indicator"
|
|
61
|
+
className="absolute inset-0 rounded-full bg-primary/10 dark:bg-primary/20"
|
|
62
|
+
transition={SPRING_LAYOUT}
|
|
63
|
+
/>
|
|
64
|
+
)}
|
|
65
|
+
<span className="relative z-10 text-sm">{tab.label}</span>
|
|
66
|
+
</button>
|
|
67
|
+
))}
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
---
|
|
71
|
+
|
|
72
|
+
## 3. Exit Animations & `AnimatePresence`
|
|
73
|
+
|
|
74
|
+
`AnimatePresence` enables React elements to animate as they are removed from the DOM.
|
|
75
|
+
|
|
76
|
+
### Orchestration Modes
|
|
77
|
+
- **`mode="sync"` (default)**: Entering and exiting elements animate simultaneously. Best for independent items or list row insertions.
|
|
78
|
+
- **`mode="wait"`**: The exiting element finishes its exit animation completely before the new element mounts. Best for page transitions, stepped wizards, and tab panels.
|
|
79
|
+
- **`mode="popLayout"`**: Exiting elements are immediately taken out of the document layout flow (`position: absolute`) so sibling items glide immediately into their target positions without waiting for the exit to finish.
|
|
80
|
+
|
|
81
|
+
```tsx
|
|
82
|
+
<AnimatePresence mode="popLayout">
|
|
83
|
+
{items.map((item) => (
|
|
84
|
+
<motion.li
|
|
85
|
+
key={item.id}
|
|
86
|
+
layout
|
|
87
|
+
initial={{ opacity: 0, scale: 0.9, y: 10 }}
|
|
88
|
+
animate={{ opacity: 1, scale: 1, y: 0 }}
|
|
89
|
+
exit={{ opacity: 0, scale: 0.85, transition: { duration: 0.15 } }}
|
|
90
|
+
transition={SPRING_LAYOUT}
|
|
91
|
+
>
|
|
92
|
+
{item.title}
|
|
93
|
+
</motion.li>
|
|
94
|
+
))}
|
|
95
|
+
</AnimatePresence>
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
---
|
|
99
|
+
|
|
100
|
+
## 4. Imperative Sequencing with `useAnimate`
|
|
101
|
+
|
|
102
|
+
When animations require complex multi-step choreographies (e.g. badge expands $\to$ text scrambles $\to$ checkmark draws $\to$ settles), declarative props can become unwieldy. Use `useAnimate` for precise async/await timelines:
|
|
103
|
+
|
|
104
|
+
```tsx
|
|
105
|
+
const [scope, animate] = useAnimate();
|
|
106
|
+
|
|
107
|
+
const handleSuccess = async () => {
|
|
108
|
+
// Step 1: scale down trigger
|
|
109
|
+
await animate(scope.current, { scale: 0.95 }, { duration: 0.1 });
|
|
110
|
+
// Step 2: pop open success container with spring
|
|
111
|
+
await animate(scope.current, { scale: 1, width: 220 }, SPRING_BOUNCE);
|
|
112
|
+
// Step 3: draw SVG checkmark
|
|
113
|
+
await animate("path.check", { pathLength: 1, opacity: 1 }, { duration: 0.25, ease: EASE_OUT });
|
|
114
|
+
};
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
---
|
|
118
|
+
|
|
119
|
+
## 5. Drag Gestures & Momentum Handoff
|
|
120
|
+
|
|
121
|
+
Motion provides robust pointer gestures with built-in inertia and constraint bounding:
|
|
122
|
+
|
|
123
|
+
```tsx
|
|
124
|
+
<motion.div
|
|
125
|
+
drag="y"
|
|
126
|
+
dragConstraints={{ top: 0, bottom: 0 }}
|
|
127
|
+
dragElastic={{ top: 0.1, bottom: 0.6 }} // Rubber-banding resistance
|
|
128
|
+
onDragEnd={(_e, info) => {
|
|
129
|
+
// If flicked with downward velocity > 300 or dragged past 100px threshold
|
|
130
|
+
if (info.velocity.y > 300 || info.offset.y > 100) {
|
|
131
|
+
onDismiss();
|
|
132
|
+
}
|
|
133
|
+
}}
|
|
134
|
+
>
|
|
135
|
+
<SheetContent />
|
|
136
|
+
</motion.div>
|
|
137
|
+
```
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Motion Guides"
|
|
3
|
+
description: "Practical guidance for purposeful animation, timing, easing, springs, and accessible motion in React interfaces."
|
|
4
|
+
documentation: "references/guides/motion-patterns.md"
|
|
5
|
+
markdown: "references/guides/motion-patterns.md"
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Motion Guides
|
|
9
|
+
|
|
10
|
+
> Practical guidance for purposeful animation, timing, easing, springs, and accessible motion in React interfaces.
|
|
11
|
+
|
|
12
|
+
## Decision framework
|
|
13
|
+
|
|
14
|
+
Ask four questions before choosing a duration or spring:
|
|
15
|
+
|
|
16
|
+
1. **Check frequency.** Repeated actions should feel nearly instant. Save expressive motion for rare moments.
|
|
17
|
+
2. **Name the purpose.** Motion should explain space, confirm input, show state, or soften a change.
|
|
18
|
+
3. **Choose the physics.** Use ease-out for entrances, ease-in-out for movement, linear motion for progress, and springs for gestures.
|
|
19
|
+
4. **Design the fallback.** Reduced motion should keep useful opacity and color feedback while removing travel, scale, parallax, and overshoot.
|
|
20
|
+
|
|
21
|
+
## Motion tokens
|
|
22
|
+
|
|
23
|
+
- `EASE_OUT`: entrances and exits that respond immediately, then settle quietly.
|
|
24
|
+
- `EASE_IN_OUT`: objects already on screen moving between positions.
|
|
25
|
+
- `SPRING_PRESS`: fast, weighted feedback for pressable surfaces.
|
|
26
|
+
- `SPRING_LAYOUT`: shared surfaces and indicators that preserve spatial continuity.
|
|
27
|
+
- `SPRING_BOUNCE`: lively playful bounce for badges, celebration checks, stars, and micro-pops.
|
|
28
|
+
- `SPRING_GENTLE`: gentle, natural spring for spacious card expansions and drawer reveals.
|
|
29
|
+
- `SPRING_SNAPPY`: snappy, high-velocity spring for fast toggles, segmented pills, and tabs.
|
|
30
|
+
- `SPRING_FLOAT`: soft floating physics for tooltips, hover cards, and ambient elevation.
|
|
31
|
+
- `SPRING_GLIDE`: critically damped slider handles with zero overshoot.
|
|
32
|
+
|
|
33
|
+
## Timing
|
|
34
|
+
|
|
35
|
+
| Interaction | Range | Desired feel |
|
|
36
|
+
| --- | --- | --- |
|
|
37
|
+
| Press feedback | 100–160ms | Immediate and physical |
|
|
38
|
+
| Tooltip or popover | 125–200ms | Quick and origin-aware |
|
|
39
|
+
| Dropdown or select | 150–250ms | Responsive, with no waiting |
|
|
40
|
+
| Modal or drawer | 200–500ms | Enough time to explain space |
|
|
41
|
+
| Marketing demo | Flexible | Clarity matters more than speed |
|
|
42
|
+
|
|
43
|
+
Under 300ms is the default for interface motion. Longer motion belongs to explanatory demos, deliberate gestures, and large spatial changes.
|
|
44
|
+
|
|
45
|
+
## Comprehensive Guides Suite
|
|
46
|
+
|
|
47
|
+
For specialized engineering topics, consult the dedicated companion guides:
|
|
48
|
+
- [Design System Architecture & Checklist](./design-system-checklist.md): Tokens, WCAG contrast, typography, and component health.
|
|
49
|
+
- [Motion Engineering Guide](./motion-engineering.md): Deep dive into `motion/react`, physics springs, `layoutId`, and gestures.
|
|
50
|
+
- [Motion Performance & 60/120 FPS](./motion-performance.md): Compositor properties, avoiding layout thrashing, and layer budgets.
|
|
51
|
+
- [Baseline UI Craft & Anti-Slop](./baseline-ui-craft.md): Design engineering principles, optical alignment, and micro-interactions.
|
|
52
|
+
- [The 12 Canonical Interaction Transitions](./interaction-transitions.md): Transitions.dev interaction patterns and token specs.
|
|
53
|
+
- [Universal Mobile-First Interaction Patterns](./universal-mobile-patterns.md): Touch ergonomics, haptic feedback semantics, and swipe gestures.
|
|
54
|
+
- [Enterprise Dashboard Architecture](./enterprise-dashboard-patterns.md): High-density data grids, kanban boards, faceted query builders, and timelines.
|
|
55
|
+
|
|
56
|
+
## Recipes
|
|
57
|
+
|
|
58
|
+
### Press feedback
|
|
59
|
+
|
|
60
|
+
Confirm input before the action finishes. Keep the scale change small and the response immediate.
|
|
61
|
+
|
|
62
|
+
```tsx
|
|
63
|
+
const reduce = useReducedMotion();
|
|
64
|
+
|
|
65
|
+
<motion.button
|
|
66
|
+
whileTap={reduce ? undefined : { scale: 0.97 }}
|
|
67
|
+
transition={SPRING_PRESS}
|
|
68
|
+
>
|
|
69
|
+
Continue
|
|
70
|
+
</motion.button>
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
### Semantic icon motion
|
|
74
|
+
|
|
75
|
+
Let an icon imitate its real action. Gate decorative hover motion behind pointer capability and reduced-motion preferences.
|
|
76
|
+
|
|
77
|
+
### Content reveal
|
|
78
|
+
|
|
79
|
+
Reveal one meaningful surface with a short lift and restrained blur. Finish before the surface becomes the focus.
|
|
80
|
+
|
|
81
|
+
### Layout continuity
|
|
82
|
+
|
|
83
|
+
Keep the same surface visible while its footprint changes. Move the shape first, then introduce its label.
|
|
84
|
+
|
|
85
|
+
### Content swap
|
|
86
|
+
|
|
87
|
+
For small view changes, let old content leave faster than new content arrives. Keep travel to a few pixels.
|
|
88
|
+
|
|
89
|
+
## Accessibility
|
|
90
|
+
|
|
91
|
+
Reduced motion is a designed state. Preserve opacity, color, and instant state changes. Remove parallax, large transforms, repeated scale, and spring overshoot.
|
|
92
|
+
|
|
93
|
+
```tsx
|
|
94
|
+
const reduce = useReducedMotion();
|
|
95
|
+
|
|
96
|
+
const hidden = {
|
|
97
|
+
opacity: 0,
|
|
98
|
+
transform: reduce ? "none" : "translateY(8px)",
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
const visible = {
|
|
102
|
+
opacity: 1,
|
|
103
|
+
transform: "translateY(0px)",
|
|
104
|
+
};
|
|
105
|
+
```
|
|
106
|
+
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Motion Performance & 60/120 FPS Engineering"
|
|
3
|
+
description: "Auditing and optimizing animation performance: compositor-only properties, eliminating layout thrashing, scroll-linked motion decoupling, layer budgets, and GPU compositing rules."
|
|
4
|
+
documentation: "references/guides/motion-performance.md"
|
|
5
|
+
markdown: "references/guides/motion-performance.md"
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Motion Performance & 60/120 FPS Engineering
|
|
9
|
+
|
|
10
|
+
> Production performance guidelines for fluid, stutter-free animations, directly synthesized from [ibelick/ui-skills](https://github.com/ibelick/ui-skills) (`/fixing-motion-performance`).
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## 1. The Rendering Pipeline
|
|
15
|
+
|
|
16
|
+
Modern browsers render every frame through three distinct phases:
|
|
17
|
+
|
|
18
|
+
| Phase | Affected Properties | Cost & FPS Risk |
|
|
19
|
+
| :--- | :--- | :--- |
|
|
20
|
+
| **Composite** | `transform` (`translate`, `scale`, `rotate`), `opacity`, `filter` (partial) | **Low (Best)**: Runs off-thread directly on the GPU. Never causes reflow. |
|
|
21
|
+
| **Paint** | `background-color`, `color`, `box-shadow`, `border-radius`, `outline` | **Medium**: Repaints pixels into bitmap layers. Costly on large surfaces. |
|
|
22
|
+
| **Layout** | `width`, `height`, `top`, `left`, `margin`, `padding`, `display`, `flex` | **Critical (Worst)**: Triggers geometry recalculation across the entire document tree. |
|
|
23
|
+
|
|
24
|
+
### Rule #1: Only Animate Composite Properties
|
|
25
|
+
Stick strictly to `transform` and `opacity` for animation. If a component appears to change size, use Motion's `layout` prop (which simulates dimension shifts via transform scaling) or CSS scale transforms.
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
## 2. The "Never Patterns" (Critical Performance Violations)
|
|
30
|
+
|
|
31
|
+
1. **Never Interleave Layout Reads & Writes in the Same Frame**:
|
|
32
|
+
- Reading `offsetWidth`, `scrollTop`, `getBoundingClientRect()` immediately after modifying CSS forces the browser to synchronously recalculate layout (**forced reflow** or **layout thrashing**).
|
|
33
|
+
- Solution: Read all metrics in one phase, then apply style mutations in `requestAnimationFrame`.
|
|
34
|
+
2. **Never Drive Animations from Raw Scroll Events**:
|
|
35
|
+
- Never attach heavy state updates or DOM manipulation directly to `window.addEventListener("scroll", ...)`.
|
|
36
|
+
- Solution: Use `useScroll` with Motion values or native CSS `animation-timeline: scroll()`.
|
|
37
|
+
3. **No Infinite `requestAnimationFrame` Loops Without a Stop Condition**:
|
|
38
|
+
- Every continuous rAF loop burns CPU cycles and drains battery life on mobile devices. Ensure an active velocity threshold or time limit breaks the loop when the value settles.
|
|
39
|
+
4. **Never Animate `blur()` Dynamically Across Large Screens**:
|
|
40
|
+
- Real-time Gaussian blur calculation over large surfaces (`backdrop-filter: blur(20px)`) is computationally intensive on integrated GPUs and mobile chipsets. Keep blur radii static and animate opacity instead.
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
## 3. Layer Promotion & `will-change`
|
|
45
|
+
|
|
46
|
+
`will-change: transform` informs the browser's compositing engine to allocate a dedicated GPU backing store (layer) for the element.
|
|
47
|
+
|
|
48
|
+
### Rules for Layer Budgeting:
|
|
49
|
+
- **Do not apply `will-change` globally or perpetually**: Each promoted layer consumes VRAM. 100 promoted layers can exhaust GPU memory and cause mobile browser crashes.
|
|
50
|
+
- **Apply conditionally**: Only apply `will-change: transform` while an interaction is actively occurring (e.g. during hover, drag, or active slide), and remove it once the element is at rest.
|
|
51
|
+
- **Hardware Acceleration Hack**: If an element stutters during entrance, apply `transform: translateZ(0)` or `backface-visibility: hidden` to force hardware compositing without memory bloat.
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
|
|
55
|
+
## 4. Diagnostics & Profiling Workflow
|
|
56
|
+
|
|
57
|
+
When an animation drops frames:
|
|
58
|
+
1. **Chrome DevTools Performance Panel**:
|
|
59
|
+
- Record a 5-second trace of the interaction.
|
|
60
|
+
- Look for long red bars under the **Main thread** flame graph.
|
|
61
|
+
- Look for **Layout** or **Recalculate Style** events occurring every frame (16.6ms at 60Hz or 8.3ms at 120Hz).
|
|
62
|
+
2. **Rendering Tab**:
|
|
63
|
+
- Enable **Paint Flashing**: Green flashes reveal which elements are being repainted each frame. Good animations only flash when entering/exiting, never during movement.
|
|
64
|
+
- Enable **Layer Borders**: Inspect which elements have their own composite layers (orange borders) and tile borders (cyan).
|
|
65
|
+
3. **Core Web Vitals Check**:
|
|
66
|
+
- Ensure animations do not cause Cumulative Layout Shift (CLS). Elements entering the page must be absolutely positioned or have pre-reserved container bounds.
|