Skip to main content

Styling Overview

XBuilder provides comprehensive styling controls to customize every aspect of your popup's appearance. From layout to animations, you have complete control over the design.

Styling Areas

AreaWhat It Controls
LayoutPosition, size, spacing
TypographyFonts, text styling
Colors & BackgroundsColors, gradients, images
Borders & ShadowsBorders, corner radius, shadows
AnimationsEntry, exit, hover effects
Responsive DesignDevice-specific styling

Where to Find Styling Options

Found in the Layout and Design tabs:

  • Popup position and size
  • Overlay appearance
  • Background styling
  • Close button design
  • Animation effects

Element-Level Styling

Found when selecting any element:

  • Typography settings
  • Spacing (margin/padding)
  • Background
  • Borders and shadows
  • Custom CSS

Styling Workflow

1. Start with Layout

Set the foundation:

  • Popup position on screen
  • Width and height
  • Content alignment

2. Apply Colors & Backgrounds

Establish visual identity:

  • Background color or image
  • Text colors
  • Brand colors

3. Add Typography

Set text styling:

  • Font families
  • Sizes and weights
  • Line heights

4. Refine with Details

Polish the design:

  • Borders and radius
  • Shadows and effects
  • Spacing adjustments

5. Add Motion

Bring it to life:

  • Entry animations
  • Hover effects
  • Transitions

6. Test Responsively

Verify on all devices:

  • Desktop preview
  • Tablet preview
  • Mobile preview

Design Tabs Overview

Layout Tab

Controls popup structure:

SettingFunction
PositionWhere popup appears
Width/HeightPopup dimensions
OffsetDistance from edges
OverlayBackground dimming
Close ButtonX button styling

Design Tab

Controls visual styling:

SettingFunction
BackgroundColor, gradient, image
BorderBorder styling
Border RadiusCorner roundness
ShadowBox shadow
AnimationEntry/exit effects

Element Styling

Each element has styling sections:

Content Section

  • Element-specific content
  • Text, images, links

Style Section

  • Typography
  • Colors
  • Spacing
  • Background
  • Border

Advanced Section

  • Custom CSS classes
  • HTML ID
  • Device visibility

Quick Styling Tips

Use Consistent Spacing

Stick to a spacing scale:

8px, 16px, 24px, 32px, 48px

Maintain Typography Hierarchy

H1: 32px, bold
H2: 24px, semi-bold
Body: 16px, regular
Small: 14px, regular

Color Best Practices

  • Use 2-3 main colors
  • Ensure contrast ratios
  • Test dark/light modes

Border Radius

Common values:

Sharp: 0px
Subtle: 4px
Rounded: 8px
More rounded: 16px
Pill: 9999px

Responsive Considerations

Every style setting can have device-specific values:

DeviceAdjustments
DesktopFull design
TabletSlightly reduced
MobileOptimized for small screens

Common responsive changes:

  • Smaller font sizes on mobile
  • Reduced padding
  • Full-width buttons
  • Simplified layouts

Inheritance

Style inheritance works as follows:

Popup Settings
└── Section Settings
└── Column Settings
└── Element Settings

Child elements can inherit or override parent styles.

Best Practices

Consistency

  1. Use design system values
  2. Reuse color palette
  3. Consistent spacing
  4. Matching typography

Performance

  1. Optimize images
  2. Use system fonts when possible
  3. Minimal shadows on mobile
  4. Efficient animations

Accessibility

  1. Sufficient color contrast
  2. Readable font sizes
  3. Clear focus states
  4. Touch-friendly targets

Maintainability

  1. Use CSS classes for repeated styles
  2. Document custom CSS
  3. Keep styling simple
  4. Test thoroughly

Next Steps

Deep dive into each styling area: