Skip to content
This plugin is new and currently in beta. For the stable version, please use the previous version of the plugin.

PreviewDeviceMode

Enumeration defining the available device preview modes in the Stripo Email Editor.

typescript
enum PreviewDeviceMode {
    DESKTOP = 'DESKTOP',
    MOBILE = 'MOBILE'
}

Description

The PreviewDeviceMode enum represents the two primary device viewing modes available in the Stripo editor. It allows extensions to identify and respond to the current preview context, enabling responsive behavior and device-specific optimizations in email templates.

Import

typescript
import { PreviewDeviceMode } from '@stripoinc/ui-editor-extensions';

Enum Values

ValueDescription
DESKTOPDesktop view mode (typically 600px+ width)
MOBILEMobile view mode (typically 320px-480px width)

Detailed Value Descriptions

DESKTOP

typescript
PreviewDeviceMode.DESKTOP = 'DESKTOP'

Represents the desktop preview mode:

  • Full-width email template view
  • Default editing mode for most users
  • Shows how emails appear on desktop email clients
  • Typically renders at 600px or wider

Use Cases

  • Default layout and styling
  • Multi-column structures
  • Larger images and typography
  • Desktop-optimized interactive elements

MOBILE

typescript
PreviewDeviceMode.MOBILE = 'MOBILE'

Represents the mobile preview mode:

  • Narrow viewport email template view
  • Shows responsive behavior and mobile optimizations
  • Simulates mobile email client rendering
  • Typically renders at 320px to 480px width

Use Cases

  • Single-column layouts
  • Touch-optimized button sizes
  • Simplified navigation menus
  • Mobile-specific content hiding/showing