ERP/.shared/ui-ux-pro-max/data/ux-guidelines.csv
2026-01-03 19:18:40 +08:00

18 KiB

1NoCategoryIssuePlatformDescriptionDoDon'tCode Example GoodCode Example BadSeverity
21NavigationSmooth ScrollWebAnchor links should scroll smoothly to target sectionUse scroll-behavior: smooth on html elementJump directly without transitionhtml { scroll-behavior: smooth; }<a href='#section'> without CSSHigh
32NavigationSticky NavigationWebFixed nav should not obscure contentAdd padding-top to body equal to nav heightLet nav overlap first section contentpt-20 (if nav is h-20)No padding compensationMedium
43NavigationActive StateAllCurrent page/section should be visually indicatedHighlight active nav item with color/underlineNo visual feedback on current locationtext-primary border-b-2All links same styleMedium
54NavigationBack ButtonMobileUsers expect back to work predictablyPreserve navigation history properlyBreak browser/app back button behaviorhistory.pushState()location.replace()High
65NavigationDeep LinkingAllURLs should reflect current state for sharingUpdate URL on state/view changesStatic URLs for dynamic contentUse query params or hashSingle URL for all statesMedium
76NavigationBreadcrumbsWebShow user location in site hierarchyUse for sites with 3+ levels of depthUse for flat single-level sitesHome > Category > ProductOnly on deep nested pagesLow
87AnimationExcessive MotionAllToo many animations cause distraction and motion sicknessAnimate 1-2 key elements per view maximumAnimate everything that movesSingle hero animationanimate-bounce on 5+ elementsHigh
98AnimationDuration TimingAllAnimations should feel responsive not sluggishUse 150-300ms for micro-interactionsUse animations longer than 500ms for UItransition-all duration-200duration-1000Medium
109AnimationReduced MotionAllRespect user's motion preferencesCheck prefers-reduced-motion media queryIgnore accessibility motion settings@media (prefers-reduced-motion: reduce)No motion query checkHigh
1110AnimationLoading StatesAllShow feedback during async operationsUse skeleton screens or spinnersLeave UI frozen with no feedbackanimate-pulse skeletonBlank screen while loadingHigh
1211AnimationHover vs TapAllHover effects don't work on touch devicesUse click/tap for primary interactionsRely only on hover for important actionsonClick handleronMouseEnter onlyHigh
1312AnimationContinuous AnimationAllInfinite animations are distractingUse for loading indicators onlyUse for decorative elementsanimate-spin on loaderanimate-bounce on iconsMedium
1413AnimationTransform PerformanceWebSome CSS properties trigger expensive repaintsUse transform and opacity for animationsAnimate width/height/top/left propertiestransform: translateY()top: 10px animationMedium
1514AnimationEasing FunctionsAllLinear motion feels roboticUse ease-out for entering ease-in for exitingUse linear for UI transitionsease-outlinearLow
1615LayoutZ-Index ManagementWebStacking context conflicts cause hidden elementsDefine z-index scale system (10 20 30 50)Use arbitrary large z-index valuesz-10 z-20 z-50z-[9999]High
1716LayoutOverflow HiddenWebHidden overflow can clip important contentTest all content fits within containersBlindly apply overflow-hiddenoverflow-auto with scrolloverflow-hidden truncating contentMedium
1817LayoutFixed PositioningWebFixed elements can overlap or be inaccessibleAccount for safe areas and other fixed elementsStack multiple fixed elements carelesslyFixed nav + fixed bottom with gapMultiple overlapping fixed elementsMedium
1918LayoutStacking ContextWebNew stacking contexts reset z-indexUnderstand what creates new stacking contextExpect z-index to work across contextsParent with z-index isolates childrenz-index: 9999 not workingMedium
2019LayoutContent JumpingWebLayout shift when content loads is jarringReserve space for async contentLet images/content push layout aroundaspect-ratio or fixed heightNo dimensions on imagesHigh
2120LayoutViewport UnitsWeb100vh can be problematic on mobile browsersUse dvh or account for mobile browser chromeUse 100vh for full-screen mobile layoutsmin-h-dvh or min-h-screenh-screen on mobileMedium
2221LayoutContainer WidthWebContent too wide is hard to readLimit max-width for text content (65-75ch)Let text span full viewport widthmax-w-prose or max-w-3xlFull width paragraphsMedium
2322TouchTouch Target SizeMobileSmall buttons are hard to tap accuratelyMinimum 44x44px touch targetsTiny clickable areasmin-h-[44px] min-w-[44px]w-6 h-6 buttonsHigh
2423TouchTouch SpacingMobileAdjacent touch targets need adequate spacingMinimum 8px gap between touch targetsTightly packed clickable elementsgap-2 between buttonsgap-0 or gap-1Medium
2524TouchGesture ConflictsMobileCustom gestures can conflict with systemAvoid horizontal swipe on main contentOverride system gesturesVertical scroll primaryHorizontal swipe carousel onlyMedium
2625TouchTap DelayMobile300ms tap delay feels laggyUse touch-action CSS or fastclickDefault mobile tap handlingtouch-action: manipulationNo touch optimizationMedium
2726TouchPull to RefreshMobileAccidental refresh is frustratingDisable where not neededEnable by default everywhereoverscroll-behavior: containDefault overscrollLow
2827TouchHaptic FeedbackMobileTactile feedback improves interaction feelUse for confirmations and important actionsOveruse vibration feedbacknavigator.vibrate(10)Vibrate on every tapLow
2928InteractionFocus StatesAllKeyboard users need visible focus indicatorsUse visible focus rings on interactive elementsRemove focus outline without replacementfocus:ring-2 focus:ring-blue-500outline-none without alternativeHigh
3029InteractionHover StatesWebVisual feedback on interactive elementsChange cursor and add subtle visual changeNo hover feedback on clickable elementshover:bg-gray-100 cursor-pointerNo hover styleMedium
3130InteractionActive StatesAllShow immediate feedback on press/clickAdd pressed/active state visual changeNo feedback during interactionactive:scale-95No active stateMedium
3231InteractionDisabled StatesAllClearly indicate non-interactive elementsReduce opacity and change cursorConfuse disabled with normal stateopacity-50 cursor-not-allowedSame style as enabledMedium
3332InteractionLoading ButtonsAllPrevent double submission during async actionsDisable button and show loading stateAllow multiple clicks during processingdisabled={loading} spinnerButton clickable while loadingHigh
3433InteractionError FeedbackAllUsers need to know when something failsShow clear error messages near problemSilent failures with no feedbackRed border + error messageNo indication of errorHigh
3534InteractionSuccess FeedbackAllConfirm successful actions to usersShow success message or visual changeNo confirmation of completed actionToast notification or checkmarkAction completes silentlyMedium
3635InteractionConfirmation DialogsAllPrevent accidental destructive actionsConfirm before delete/irreversible actionsDelete without confirmationAre you sure modalDirect delete on clickHigh
3736AccessibilityColor ContrastAllText must be readable against backgroundMinimum 4.5:1 ratio for normal textLow contrast text#333 on white (7:1)#999 on white (2.8:1)High
3837AccessibilityColor OnlyAllDon't convey information by color aloneUse icons/text in addition to colorRed/green only for error/successRed text + error iconRed border only for errorHigh
3938AccessibilityAlt TextAllImages need text alternativesDescriptive alt text for meaningful imagesEmpty or missing alt attributesalt='Dog playing in park'alt='' for content imagesHigh
4039AccessibilityHeading HierarchyWebScreen readers use headings for navigationUse sequential heading levels h1-h6Skip heading levels or misuse for stylingh1 then h2 then h3h1 then h4Medium
4140AccessibilityARIA LabelsAllInteractive elements need accessible namesAdd aria-label for icon-only buttonsIcon buttons without labelsaria-label='Close menu'<button><Icon/></button>High
4241AccessibilityKeyboard NavigationWebAll functionality accessible via keyboardTab order matches visual orderKeyboard traps or illogical tab ordertabIndex for custom orderUnreachable elementsHigh
4342AccessibilityScreen ReaderAllContent should make sense when read aloudUse semantic HTML and ARIA properlyDiv soup with no semantics<nav> <main> <article><div> for everythingMedium
4443AccessibilityForm LabelsAllInputs must have associated labelsUse label with for attribute or wrap inputPlaceholder-only inputs<label for='email'>placeholder='Email' onlyHigh
4544AccessibilityError MessagesAllError messages must be announcedUse aria-live or role=alert for errorsVisual-only error indicationrole='alert'Red border onlyHigh
4645AccessibilitySkip LinksWebAllow keyboard users to skip navigationProvide skip to main content linkNo skip link on nav-heavy pagesSkip to main content link100 tabs to reach contentMedium
4746PerformanceImage OptimizationAllLarge images slow page loadUse appropriate size and format (WebP)Unoptimized full-size imagessrcset with multiple sizes4000px image for 400px displayHigh
4847PerformanceLazy LoadingAllLoad content as neededLazy load below-fold images and contentLoad everything upfrontloading='lazy'All images eager loadMedium
4948PerformanceCode SplittingWebLarge bundles slow initial loadSplit code by route/featureSingle large bundledynamic import()All code in main bundleMedium
5049PerformanceCachingWebRepeat visits should be fastSet appropriate cache headersNo caching strategyCache-Control headersEvery request hits serverMedium
5150PerformanceFont LoadingWebWeb fonts can block renderingUse font-display swap or optionalInvisible text during font loadfont-display: swapFOIT (Flash of Invisible Text)Medium
5251PerformanceThird Party ScriptsWebExternal scripts can block renderingLoad non-critical scripts async/deferSynchronous third-party scriptsasync or defer attribute<script src='...'> in headMedium
5352PerformanceBundle SizeWebLarge JavaScript slows interactionMonitor and minimize bundle sizeIgnore bundle size growthBundle analyzerNo size monitoringMedium
5453PerformanceRender BlockingWebCSS/JS can block first paintInline critical CSS defer non-criticalLarge blocking CSS filesCritical CSS inlineAll CSS in headMedium
5554FormsInput LabelsAllEvery input needs a visible labelAlways show label above or beside inputPlaceholder as only label<label>Email</label><input>placeholder='Email' onlyHigh
5655FormsError PlacementAllErrors should appear near the problemShow error below related inputSingle error message at top of formError under each fieldAll errors at form topMedium
5756FormsInline ValidationAllValidate as user types or on blurValidate on blur for most fieldsValidate only on submitonBlur validationSubmit-only validationMedium
5857FormsInput TypesAllUse appropriate input typesUse email tel number url etcText input for everythingtype='email'type='text' for emailMedium
5958FormsAutofill SupportWebHelp browsers autofill correctlyUse autocomplete attribute properlyBlock or ignore autofillautocomplete='email'autocomplete='off' everywhereMedium
6059FormsRequired IndicatorsAllMark required fields clearlyUse asterisk or (required) textNo indication of required fields* required indicatorGuess which are requiredMedium
6160FormsPassword VisibilityAllLet users see password while typingToggle to show/hide passwordNo visibility toggleShow/hide password buttonPassword always hiddenMedium
6261FormsSubmit FeedbackAllConfirm form submission statusShow loading then success/error stateNo feedback after submitLoading -> Success messageButton click with no responseHigh
6362FormsInput AffordanceAllInputs should look interactiveUse distinct input stylingInputs that look like plain textBorder/background on inputsBorderless inputsMedium
6463FormsMobile KeyboardsMobileShow appropriate keyboard for input typeUse inputmode attributeDefault keyboard for all inputsinputmode='numeric'Text keyboard for numbersMedium
6564ResponsiveMobile FirstWebDesign for mobile then enhance for largerStart with mobile styles then add breakpointsDesktop-first causing mobile issuesDefault mobile + md: lg: xl:Desktop default + max-width queriesMedium
6665ResponsiveBreakpoint TestingWebTest at all common screen sizesTest at 320 375 414 768 1024 1440Only test on your deviceMultiple device testingSingle device developmentMedium
6766ResponsiveTouch FriendlyWebMobile layouts need touch-sized targetsIncrease touch targets on mobileSame tiny buttons on mobileLarger buttons on mobileDesktop-sized targets on mobileHigh
6867ResponsiveReadable Font SizeAllText must be readable on all devicesMinimum 16px body text on mobileTiny text on mobiletext-base or largertext-xs for body textHigh
6968ResponsiveViewport MetaWebSet viewport for mobile devicesUse width=device-width initial-scale=1Missing or incorrect viewport<meta name='viewport'...>No viewport meta tagHigh
7069ResponsiveHorizontal ScrollWebAvoid horizontal scrollingEnsure content fits viewport widthContent wider than viewportmax-w-full overflow-x-hiddenHorizontal scrollbar on mobileHigh
7170ResponsiveImage ScalingWebImages should scale with containerUse max-width: 100% on imagesFixed width images overflowmax-w-full h-autowidth='800' fixedMedium
7271ResponsiveTable HandlingWebTables can overflow on mobileUse horizontal scroll or card layoutWide tables breaking layoutoverflow-x-auto wrapperTable overflows viewportMedium
7372TypographyLine HeightAllAdequate line height improves readabilityUse 1.5-1.75 for body textCramped or excessive line heightleading-relaxed (1.625)leading-none (1)Medium
7473TypographyLine LengthWebLong lines are hard to readLimit to 65-75 characters per lineFull-width text on large screensmax-w-proseFull viewport width textMedium
7574TypographyFont Size ScaleAllConsistent type hierarchy aids scanningUse consistent modular scaleRandom font sizesType scale (12 14 16 18 24 32)Arbitrary sizesMedium
7675TypographyFont LoadingWebFonts should load without layout shiftReserve space with fallback fontLayout shift when fonts loadfont-display: swap + similar fallbackNo fallback fontMedium
7776TypographyContrast ReadabilityAllBody text needs good contrastUse darker text on light backgroundsGray text on gray backgroundtext-gray-900 on whitetext-gray-400 on gray-100High
7877TypographyHeading ClarityAllHeadings should stand out from bodyClear size/weight differenceHeadings similar to body textBold + larger sizeSame size as bodyMedium
7978FeedbackLoading IndicatorsAllShow system status during waitsShow spinner/skeleton for operations > 300msNo feedback during loadingSkeleton or spinnerFrozen UIHigh
8079FeedbackEmpty StatesAllGuide users when no content existsShow helpful message and actionBlank empty screensNo items yet. Create one!Empty white spaceMedium
8180FeedbackError RecoveryAllHelp users recover from errorsProvide clear next stepsError without recovery pathTry again button + help linkError message onlyMedium
8281FeedbackProgress IndicatorsAllShow progress for multi-step processesStep indicators or progress barNo indication of progressStep 2 of 4 indicatorNo step informationMedium
8382FeedbackToast NotificationsAllTransient messages for non-critical infoAuto-dismiss after 3-5 secondsToasts that never disappearAuto-dismiss toastPersistent toastMedium
8483FeedbackConfirmation MessagesAllConfirm successful actionsBrief success messageSilent successSaved successfully toastNo confirmationMedium
8584ContentTruncationAllHandle long content gracefullyTruncate with ellipsis and expand optionOverflow or broken layoutline-clamp-2 with expandOverflow or cut offMedium
8685ContentDate FormattingAllUse locale-appropriate date formatsUse relative or locale-aware datesAmbiguous date formats2 hours ago or locale format01/02/03Low
8786ContentNumber FormattingAllFormat large numbers for readabilityUse thousand separators or abbreviationsLong unformatted numbers1.2K or 1,2341234567Low
8887ContentPlaceholder ContentAllShow realistic placeholders during devUse realistic sample dataLorem ipsum everywhereReal sample contentLorem ipsumLow
8988OnboardingUser FreedomAllUsers should be able to skip tutorialsProvide Skip and Back buttonsForce linear unskippable tourSkip Tutorial buttonLocked overlay until finishedMedium
9089SearchAutocompleteWebHelp users find results fasterShow predictions as user typesRequire full type and enterDebounced fetch + dropdownNo suggestionsMedium
9190SearchNo ResultsWebDead ends frustrate usersShow 'No results' with suggestionsBlank screen or '0 results'Try searching for X insteadNo results found.Medium
9291Data EntryBulk ActionsWebEditing one by one is tediousAllow multi-select and bulk editSingle row actions onlyCheckbox column + Action barRepeated actions per rowLow
9392AI InteractionDisclaimerAllUsers need to know they talk to AIClearly label AI generated contentPresent AI as humanAI Assistant labelFake human name without labelHigh
9493AI InteractionStreamingAllWaiting for full text is slowStream text response token by tokenShow loading spinner for 10s+Typewriter effectSpinner until 100% completeMedium
9594Spatial UIGaze HoverVisionOSElements should respond to eye tracking before pinchScale/highlight element on lookStatic element until pinchhoverEffect()onTap onlyHigh
9695Spatial UIDepth LayeringVisionOSUI needs Z-depth to separate content from environmentUse glass material and z-offsetFlat opaque panels blocking view.glassBackgroundEffect()bg-whiteMedium
9796SustainabilityAuto-Play VideoWebVideo consumes massive data and energyClick-to-play or pause when off-screenAuto-play high-res video loopsplaysInline muted preload='none'autoplay loopMedium
9897SustainabilityAsset WeightWebHeavy 3D/Image assets increase carbon footprintCompress and lazy load 3D modelsLoad 50MB texturesDraco compressionRaw .obj filesMedium
9998AI InteractionFeedback LoopAllAI needs user feedback to improveThumps up/down or 'Regenerate'Static output onlyFeedback componentRead-only textLow
10099AccessibilityMotion SensitivityAllParallax/Scroll-jacking causes nauseaRespect prefers-reduced-motionForce scroll effects@media (prefers-reduced-motion)ScrollTrigger.create()High