Skip to content

Tools

Design Intelligence

99 rules

UX rules

Do/don’t guidelines for accessibility, touch, forms, motion, navigation, and more. Complements Foundry’s built-in accessibility and principles pages.

Also see Foundry a11y

Core product rules live in Accessibility and Principles. This catalog adds breadth from the ui-ux-pro-max knowledge base.

Showing 99 of 99 items

Navigation
High
Web

Smooth Scroll

Anchor links should scroll smoothly to target section

Do

Use scroll-behavior: smooth on html element

html { scroll-behavior: smooth; }

Don't

Jump directly without transition

<a href='#section'> without CSS
Navigation
Medium
Web

Sticky Navigation

Fixed nav should not obscure content

Do

Add padding-top to body equal to nav height

pt-20 (if nav is h-20)

Don't

Let nav overlap first section content

No padding compensation
Navigation
Medium
All

Active State

Current page/section should be visually indicated

Do

Highlight active nav item with color/underline

text-primary border-b-2

Don't

No visual feedback on current location

All links same style
Navigation
High
Mobile

Back Button

Users expect back to work predictably

Do

Preserve navigation history properly

history.pushState()

Don't

Break browser/app back button behavior

location.replace()
Navigation
Medium
All

Deep Linking

URLs should reflect current state for sharing

Do

Update URL on state/view changes

Use query params or hash

Don't

Static URLs for dynamic content

Single URL for all states
Navigation
Low
Web

Breadcrumbs

Show user location in site hierarchy

Do

Use for sites with 3+ levels of depth

Home > Category > Product

Don't

Use for flat single-level sites

Only on deep nested pages
Animation
High
All

Excessive Motion

Too many animations cause distraction and motion sickness

Do

Animate 1-2 key elements per view maximum

Single hero animation

Don't

Animate everything that moves

animate-bounce on 5+ elements
Animation
Medium
All

Duration Timing

Animations should feel responsive not sluggish

Do

Use 150-300ms for micro-interactions

transition-all duration-200

Don't

Use animations longer than 500ms for UI

duration-1000
Animation
High
All

Reduced Motion

Respect user's motion preferences

Do

Check prefers-reduced-motion media query

@media (prefers-reduced-motion: reduce)

Don't

Ignore accessibility motion settings

No motion query check
Animation
High
All

Loading States

Show feedback during async operations

Do

Use skeleton screens or spinners

animate-pulse skeleton

Don't

Leave UI frozen with no feedback

Blank screen while loading
Animation
High
All

Hover vs Tap

Hover effects don't work on touch devices

Do

Use click/tap for primary interactions

onClick handler

Don't

Rely only on hover for important actions

onMouseEnter only
Animation
Medium
All

Continuous Animation

Infinite animations are distracting

Do

Use for loading indicators only

animate-spin on loader

Don't

Use for decorative elements

animate-bounce on icons
Animation
Medium
Web

Transform Performance

Some CSS properties trigger expensive repaints

Do

Use transform and opacity for animations

transform: translateY()

Don't

Animate width/height/top/left properties

top: 10px animation
Animation
Low
All

Easing Functions

Linear motion feels robotic

Do

Use ease-out for entering ease-in for exiting

ease-out

Don't

Use linear for UI transitions

linear
Layout
High
Web

Z-Index Management

Stacking context conflicts cause hidden elements

Do

Define z-index scale system (10 20 30 50)

z-10 z-20 z-50

Don't

Use arbitrary large z-index values

z-[9999]
Layout
Medium
Web

Overflow Hidden

Hidden overflow can clip important content

Do

Test all content fits within containers

overflow-auto with scroll

Don't

Blindly apply overflow-hidden

overflow-hidden truncating content
Layout
Medium
Web

Fixed Positioning

Fixed elements can overlap or be inaccessible

Do

Account for safe areas and other fixed elements

Fixed nav + fixed bottom with gap

Don't

Stack multiple fixed elements carelessly

Multiple overlapping fixed elements
Layout
Medium
Web

Stacking Context

New stacking contexts reset z-index

Do

Understand what creates new stacking context

Parent with z-index isolates children

Don't

Expect z-index to work across contexts

z-index: 9999 not working
Layout
High
Web

Content Jumping

Layout shift when content loads is jarring

Do

Reserve space for async content

aspect-ratio or fixed height

Don't

Let images/content push layout around

No dimensions on images
Layout
Medium
Web

Viewport Units

100vh can be problematic on mobile browsers

Do

Use dvh or account for mobile browser chrome

min-h-dvh or min-h-screen

Don't

Use 100vh for full-screen mobile layouts

h-screen on mobile
Layout
Medium
Web

Container Width

Content too wide is hard to read

Do

Limit max-width for text content (65-75ch)

max-w-prose or max-w-3xl

Don't

Let text span full viewport width

Full width paragraphs
Touch
High
Mobile

Touch Target Size

Small buttons are hard to tap accurately

Do

Minimum 44x44px touch targets

min-h-[44px] min-w-[44px]

Don't

Tiny clickable areas

w-6 h-6 buttons
Touch
Medium
Mobile

Touch Spacing

Adjacent touch targets need adequate spacing

Do

Minimum 8px gap between touch targets

gap-2 between buttons

Don't

Tightly packed clickable elements

gap-0 or gap-1
Touch
Medium
Mobile

Gesture Conflicts

Custom gestures can conflict with system

Do

Avoid horizontal swipe on main content

Vertical scroll primary

Don't

Override system gestures

Horizontal swipe carousel only
Touch
Medium
Mobile

Tap Delay

300ms tap delay feels laggy

Do

Use touch-action CSS or fastclick

touch-action: manipulation

Don't

Default mobile tap handling

No touch optimization
Touch
Low
Mobile

Pull to Refresh

Accidental refresh is frustrating

Do

Disable where not needed

overscroll-behavior: contain

Don't

Enable by default everywhere

Default overscroll
Touch
Low
Mobile

Haptic Feedback

Tactile feedback improves interaction feel

Do

Use for confirmations and important actions

navigator.vibrate(10)

Don't

Overuse vibration feedback

Vibrate on every tap
Interaction
High
All

Focus States

Keyboard users need visible focus indicators

Do

Use visible focus rings on interactive elements

focus:ring-2 focus:ring-blue-500

Don't

Remove focus outline without replacement

outline-none without alternative
Interaction
Medium
Web

Hover States

Visual feedback on interactive elements

Do

Change cursor and add subtle visual change

hover:bg-gray-100 cursor-pointer

Don't

No hover feedback on clickable elements

No hover style
Interaction
Medium
All

Active States

Show immediate feedback on press/click

Do

Add pressed/active state visual change

active:scale-95

Don't

No feedback during interaction

No active state
Interaction
Medium
All

Disabled States

Clearly indicate non-interactive elements

Do

Reduce opacity and change cursor

opacity-50 cursor-not-allowed

Don't

Confuse disabled with normal state

Same style as enabled
Interaction
High
All

Loading Buttons

Prevent double submission during async actions

Do

Disable button and show loading state

disabled={loading} spinner

Don't

Allow multiple clicks during processing

Button clickable while loading
Interaction
High
All

Error Feedback

Users need to know when something fails

Do

Show clear error messages near problem

Red border + error message

Don't

Silent failures with no feedback

No indication of error
Interaction
Medium
All

Success Feedback

Confirm successful actions to users

Do

Show success message or visual change

Toast notification or checkmark

Don't

No confirmation of completed action

Action completes silently
Interaction
High
All

Confirmation Dialogs

Prevent accidental destructive actions

Do

Confirm before delete/irreversible actions

Are you sure modal

Don't

Delete without confirmation

Direct delete on click
Accessibility
High
All

Color Contrast

Text must be readable against background

Do

Minimum 4.5:1 ratio for normal text

#333 on white (7:1)

Don't

Low contrast text

#999 on white (2.8:1)
Accessibility
High
All

Color Only

Don't convey information by color alone

Do

Use icons/text in addition to color

Red text + error icon

Don't

Red/green only for error/success

Red border only for error
Accessibility
High
All

Alt Text

Images need text alternatives

Do

Descriptive alt text for meaningful images

alt='Dog playing in park'

Don't

Empty or missing alt attributes

alt='' for content images
Accessibility
Medium
Web

Heading Hierarchy

Screen readers use headings for navigation

Do

Use sequential heading levels h1-h6

h1 then h2 then h3

Don't

Skip heading levels or misuse for styling

h1 then h4
Accessibility
High
All

ARIA Labels

Interactive elements need accessible names

Do

Add aria-label for icon-only buttons

aria-label='Close menu'

Don't

Icon buttons without labels

<button><Icon/></button>
Accessibility
High
Web

Keyboard Navigation

All functionality accessible via keyboard

Do

Tab order matches visual order

tabIndex for custom order

Don't

Keyboard traps or illogical tab order

Unreachable elements
Accessibility
Medium
All

Screen Reader

Content should make sense when read aloud

Do

Use semantic HTML and ARIA properly

<nav> <main> <article>

Don't

Div soup with no semantics

<div> for everything
Accessibility
High
All

Form Labels

Inputs must have associated labels

Do

Use label with for attribute or wrap input

<label for='email'>

Don't

Placeholder-only inputs

placeholder='Email' only
Accessibility
High
All

Error Messages

Error messages must be announced

Do

Use aria-live or role=alert for errors

role='alert'

Don't

Visual-only error indication

Red border only
Accessibility
Medium
Web

Skip Links

Allow keyboard users to skip navigation

Do

Provide skip to main content link

Skip to main content link

Don't

No skip link on nav-heavy pages

100 tabs to reach content
Performance
High
All

Image Optimization

Large images slow page load

Do

Use appropriate size and format (WebP)

srcset with multiple sizes

Don't

Unoptimized full-size images

4000px image for 400px display
Performance
Medium
All

Lazy Loading

Load content as needed

Do

Lazy load below-fold images and content

loading='lazy'

Don't

Load everything upfront

All images eager load
Performance
Medium
Web

Code Splitting

Large bundles slow initial load

Do

Split code by route/feature

dynamic import()

Don't

Single large bundle

All code in main bundle
Performance
Medium
Web

Caching

Repeat visits should be fast

Do

Set appropriate cache headers

Cache-Control headers

Don't

No caching strategy

Every request hits server
Performance
Medium
Web

Font Loading

Web fonts can block rendering

Do

Use font-display swap or optional

font-display: swap

Don't

Invisible text during font load

FOIT (Flash of Invisible Text)
Performance
Medium
Web

Third Party Scripts

External scripts can block rendering

Do

Load non-critical scripts async/defer

async or defer attribute

Don't

Synchronous third-party scripts

<script src='...'> in head
Performance
Medium
Web

Bundle Size

Large JavaScript slows interaction

Do

Monitor and minimize bundle size

Bundle analyzer

Don't

Ignore bundle size growth

No size monitoring
Performance
Medium
Web

Render Blocking

CSS/JS can block first paint

Do

Inline critical CSS defer non-critical

Critical CSS inline

Don't

Large blocking CSS files

All CSS in head
Forms
High
All

Input Labels

Every input needs a visible label

Do

Always show label above or beside input

<label>Email</label><input>

Don't

Placeholder as only label

placeholder='Email' only
Forms
Medium
All

Error Placement

Errors should appear near the problem

Do

Show error below related input

Error under each field

Don't

Single error message at top of form

All errors at form top
Forms
Medium
All

Inline Validation

Validate as user types or on blur

Do

Validate on blur for most fields

onBlur validation

Don't

Validate only on submit

Submit-only validation
Forms
Medium
All

Input Types

Use appropriate input types

Do

Use email tel number url etc

type='email'

Don't

Text input for everything

type='text' for email
Forms
Medium
Web

Autofill Support

Help browsers autofill correctly

Do

Use autocomplete attribute properly

autocomplete='email'

Don't

Block or ignore autofill

autocomplete='off' everywhere
Forms
Medium
All

Required Indicators

Mark required fields clearly

Do

Use asterisk or (required) text

* required indicator

Don't

No indication of required fields

Guess which are required
Forms
Medium
All

Password Visibility

Let users see password while typing

Do

Toggle to show/hide password

Show/hide password button

Don't

No visibility toggle

Password always hidden
Forms
High
All

Submit Feedback

Confirm form submission status

Do

Show loading then success/error state

Loading -> Success message

Don't

No feedback after submit

Button click with no response
Forms
Medium
All

Input Affordance

Inputs should look interactive

Do

Use distinct input styling

Border/background on inputs

Don't

Inputs that look like plain text

Borderless inputs
Forms
Medium
Mobile

Mobile Keyboards

Show appropriate keyboard for input type

Do

Use inputmode attribute

inputmode='numeric'

Don't

Default keyboard for all inputs

Text keyboard for numbers
Responsive
Medium
Web

Mobile First

Design for mobile then enhance for larger

Do

Start with mobile styles then add breakpoints

Default mobile + md: lg: xl:

Don't

Desktop-first causing mobile issues

Desktop default + max-width queries
Responsive
Medium
Web

Breakpoint Testing

Test at all common screen sizes

Do

Test at 320 375 414 768 1024 1440

Multiple device testing

Don't

Only test on your device

Single device development
Responsive
High
Web

Touch Friendly

Mobile layouts need touch-sized targets

Do

Increase touch targets on mobile

Larger buttons on mobile

Don't

Same tiny buttons on mobile

Desktop-sized targets on mobile
Responsive
High
All

Readable Font Size

Text must be readable on all devices

Do

Minimum 16px body text on mobile

text-base or larger

Don't

Tiny text on mobile

text-xs for body text
Responsive
High
Web

Viewport Meta

Set viewport for mobile devices

Do

Use width=device-width initial-scale=1

<meta name='viewport'...>

Don't

Missing or incorrect viewport

No viewport meta tag
Responsive
High
Web

Horizontal Scroll

Avoid horizontal scrolling

Do

Ensure content fits viewport width

max-w-full overflow-x-hidden

Don't

Content wider than viewport

Horizontal scrollbar on mobile
Responsive
Medium
Web

Image Scaling

Images should scale with container

Do

Use max-width: 100% on images

max-w-full h-auto

Don't

Fixed width images overflow

width='800' fixed
Responsive
Medium
Web

Table Handling

Tables can overflow on mobile

Do

Use horizontal scroll or card layout

overflow-x-auto wrapper

Don't

Wide tables breaking layout

Table overflows viewport
Typography
Medium
All

Line Height

Adequate line height improves readability

Do

Use 1.5-1.75 for body text

leading-relaxed (1.625)

Don't

Cramped or excessive line height

leading-none (1)
Typography
Medium
Web

Line Length

Long lines are hard to read

Do

Limit to 65-75 characters per line

max-w-prose

Don't

Full-width text on large screens

Full viewport width text
Typography
Medium
All

Font Size Scale

Consistent type hierarchy aids scanning

Do

Use consistent modular scale

Type scale (12 14 16 18 24 32)

Don't

Random font sizes

Arbitrary sizes
Typography
Medium
Web

Font Loading

Fonts should load without layout shift

Do

Reserve space with fallback font

font-display: swap + similar fallback

Don't

Layout shift when fonts load

No fallback font
Typography
High
All

Contrast Readability

Body text needs good contrast

Do

Use darker text on light backgrounds

text-gray-900 on white

Don't

Gray text on gray background

text-gray-400 on gray-100
Typography
Medium
All

Heading Clarity

Headings should stand out from body

Do

Clear size/weight difference

Bold + larger size

Don't

Headings similar to body text

Same size as body
Feedback
High
All

Loading Indicators

Show system status during waits

Do

Show spinner/skeleton for operations > 300ms

Skeleton or spinner

Don't

No feedback during loading

Frozen UI
Feedback
Medium
All

Empty States

Guide users when no content exists

Do

Show helpful message and action

No items yet. Create one!

Don't

Blank empty screens

Empty white space
Feedback
Medium
All

Error Recovery

Help users recover from errors

Do

Provide clear next steps

Try again button + help link

Don't

Error without recovery path

Error message only
Feedback
Medium
All

Progress Indicators

Show progress for multi-step processes

Do

Step indicators or progress bar

Step 2 of 4 indicator

Don't

No indication of progress

No step information
Feedback
Medium
All

Toast Notifications

Transient messages for non-critical info

Do

Auto-dismiss after 3-5 seconds

Auto-dismiss toast

Don't

Toasts that never disappear

Persistent toast
Feedback
Medium
All

Confirmation Messages

Confirm successful actions

Do

Brief success message

Saved successfully toast

Don't

Silent success

No confirmation
Content
Medium
All

Truncation

Handle long content gracefully

Do

Truncate with ellipsis and expand option

line-clamp-2 with expand

Don't

Overflow or broken layout

Overflow or cut off
Content
Low
All

Date Formatting

Use locale-appropriate date formats

Do

Use relative or locale-aware dates

2 hours ago or locale format

Don't

Ambiguous date formats

01/02/03
Content
Low
All

Number Formatting

Format large numbers for readability

Do

Use thousand separators or abbreviations

1.2K or 1,234

Don't

Long unformatted numbers

1234567
Content
Low
All

Placeholder Content

Show realistic placeholders during dev

Do

Use realistic sample data

Real sample content

Don't

Lorem ipsum everywhere

Lorem ipsum
Onboarding
Medium
All

User Freedom

Users should be able to skip tutorials

Do

Provide Skip and Back buttons

Skip Tutorial button

Don't

Force linear unskippable tour

Locked overlay until finished
Search
Medium
Web

Autocomplete

Help users find results faster

Do

Show predictions as user types

Debounced fetch + dropdown

Don't

Require full type and enter

No suggestions
Search
Medium
Web

No Results

Dead ends frustrate users

Do

Show 'No results' with suggestions

Try searching for X instead

Don't

Blank screen or '0 results'

No results found.
Data Entry
Low
Web

Bulk Actions

Editing one by one is tedious

Do

Allow multi-select and bulk edit

Checkbox column + Action bar

Don't

Single row actions only

Repeated actions per row
AI Interaction
High
All

Disclaimer

Users need to know they talk to AI

Do

Clearly label AI generated content

AI Assistant label

Don't

Present AI as human

Fake human name without label
AI Interaction
Medium
All

Streaming

Waiting for full text is slow

Do

Stream text response token by token

Typewriter effect

Don't

Show loading spinner for 10s+

Spinner until 100% complete
Spatial UI
High
VisionOS

Gaze Hover

Elements should respond to eye tracking before pinch

Do

Scale/highlight element on look

hoverEffect()

Don't

Static element until pinch

onTap only
Spatial UI
Medium
VisionOS

Depth Layering

UI needs Z-depth to separate content from environment

Do

Use glass material and z-offset

.glassBackgroundEffect()

Don't

Flat opaque panels blocking view

bg-white
Sustainability
Medium
Web

Auto-Play Video

Video consumes massive data and energy

Do

Click-to-play or pause when off-screen

playsInline muted preload='none'

Don't

Auto-play high-res video loops

autoplay loop
Sustainability
Medium
Web

Asset Weight

Heavy 3D/Image assets increase carbon footprint

Do

Compress and lazy load 3D models

Draco compression

Don't

Load 50MB textures

Raw .obj files
AI Interaction
Low
All

Feedback Loop

AI needs user feedback to improve

Do

Thumps up/down or 'Regenerate'

Feedback component

Don't

Static output only

Read-only text
Accessibility
High
All

Motion Sensitivity

Parallax/Scroll-jacking causes nausea

Do

Respect prefers-reduced-motion

@media (prefers-reduced-motion)

Don't

Force scroll effects

ScrollTrigger.create()