Skip to main content

Responsive Design

Responsive design ensures your popup looks great on every device. XBuilder provides comprehensive tools for creating device-specific experiences.

Device Preview

Preview Modes

DeviceWidthDescription
DesktopFullDefault view
Tablet768pxiPad-sized
Mobile375pxPhone-sized

Accessing Preview

Use header buttons to switch devices:

  • Click device icon
  • Toggle orientation (tablet/mobile)
  • See live changes

Breakpoints

XBuilder Breakpoints

BreakpointWidthDevices
Desktop1024px+Laptops, desktops
Tablet768-1023pxiPad, tablets
Mobile0-767pxPhones

How Values Cascade

Desktop value ← default
↓ (unless overridden)
Tablet value
↓ (unless overridden)
Mobile value

If no tablet/mobile value set, desktop value is used.

Setting Responsive Values

Device-Specific Settings

Many settings support per-device values:

  1. Find the setting you want to adjust
  2. Look for device toggle icons
  3. Select target device
  4. Set value for that device

Example: Font Size

Desktop: 18px
Tablet: 16px
Mobile: 15px

Example: Width

Desktop: 500px
Tablet: 90%
Mobile: 100%

Commonly Responsive Settings

Layout

SettingDesktopTabletMobile
Width500px90%100%
Padding40px32px24px
PositionCenterCenterBottom

Typography

SettingDesktopTabletMobile
H1 Size36px32px28px
Body Size16px16px15px
Line Height1.61.61.5

Spacing

SettingDesktopTabletMobile
Gap24px20px16px
Margin32px24px16px
Padding32px24px20px

Device Visibility

Show/Hide Elements

Control element visibility per device:

SettingEffect
Hide on DesktopVisible only on tablet/mobile
Hide on TabletHidden on tablet
Hide on MobileHidden on mobile

Use Cases

  • Desktop-only: Complex graphics
  • Mobile-only: Simplified navigation
  • Hide on mobile: Large images

Setting Visibility

  1. Select element
  2. Go to Advanced settings
  3. Toggle visibility per device

Mobile-First Approach

Strategy

  1. Design for mobile first
  2. Add tablet enhancements
  3. Add desktop enhancements

Benefits

  • Forces content prioritization
  • Ensures mobile usability
  • Easier to scale up than down

Responsive Patterns

Stacking Columns

Desktop: Side-by-side Mobile: Stacked

Desktop:
[Column 1] [Column 2]

Mobile:
[Column 1]
[Column 2]

Configure column widths:

Desktop: 50% | 50%
Mobile: 100% | 100%

Simplified Layout

Desktop: Full features Mobile: Essential only

Hide secondary elements on mobile.

Position Change

Desktop: Center Mobile: Bottom sheet

Desktop: Position center, width 500px
Mobile: Position bottom, width 100%, radius top only

Responsive Typography

Scaling Text

ElementDesktopMobile
Display48px32px
H136px28px
H228px24px
H324px20px
Body16px16px
Small14px14px

Line Height

Adjust for readability:

Desktop: 1.6
Mobile: 1.5 (tighter on small screens)

Touch Targets

Minimum Sizes

For touch accessibility:

ElementMinimum Size
Buttons44px height
Links44px touch area
Close button44x44px
Form inputs44px height

Spacing

Add space between touch targets:

Gap: 8-12px minimum between tappable elements

Mobile Popup Patterns

Bottom Sheet

Position: Bottom center
Width: 100%
Border Radius: 16px 16px 0 0
Animation: slideInUp

Fullscreen Mobile

Position: Center
Width: 100%
Height: 100%
Border Radius: 0

Compact Modal

Position: Center
Width: 90%
Max Width: 400px
Padding: 24px

Testing Responsive Design

In Editor

  1. Switch between device views
  2. Check all breakpoints
  3. Verify content fits
  4. Test interactions

Real Device Testing

  1. Use browser dev tools
  2. Test on actual devices
  3. Check different screen sizes
  4. Verify touch interactions

Common Checkpoints

  • Text is readable
  • Buttons are tappable
  • Images fit properly
  • Layout doesn't break
  • Close button accessible
  • Forms are usable
  • Animations perform well

Best Practices

Content

  1. Prioritize — Show essential content on mobile
  2. Simplify — Fewer elements on smaller screens
  3. Readable — Never below 14px font size
  4. Scannable — Short paragraphs

Layout

  1. Stack vertically — Use single column on mobile
  2. Full width — Maximize screen space
  3. Adequate padding — Don't crowd edges
  4. Touch-friendly — Large tap targets

Performance

  1. Optimize images — Smaller images for mobile
  2. Reduce animations — Simpler on mobile
  3. Test performance — On real devices

Common Mistakes

❌ Not testing on mobile ❌ Text too small ❌ Touch targets too small ❌ Horizontal scrolling ❌ Fixed widths on mobile ❌ Ignoring orientation changes

Troubleshooting

Content overflows:

  • Check fixed widths
  • Use max-width instead
  • Verify responsive values

Text too small:

  • Increase mobile font size
  • Never below 14px

Can't tap elements:

  • Increase touch target size
  • Add spacing between elements
  • Check z-index

Layout breaks:

  • Check column widths
  • Verify responsive settings
  • Test all breakpoints