Skip to content

Creating Templates

Templates are the foundation of Spectra. They define how your visuals look and behave.

A Spectra template is a standard HTML file with CSS styling:

<!DOCTYPE html>
<html>
<head>
<style>
.container {
width: 1290px;
height: 2796px;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 80px;
}
.device-frame {
/* Your device mockup styles */
}
.headline {
font-size: 72px;
font-weight: 700;
color: white;
text-align: center;
margin-top: 60px;
}
</style>
</head>
<body>
<div class="container">
<div class="device-frame">
<img src="{{screenshot}}" alt="App Screenshot" />
</div>
<h1 class="headline">{{headline}}</h1>
</div>
</body>
</html>

Use double curly braces for dynamic content:

  • {{headline}} - Text content
  • {{screenshot}} - Image URLs
  • {{locale}} - Current locale code

Spectra includes built-in device dimensions:

DeviceWidthHeight
iPhone 15 Pro12902796
iPhone 15 Pro Max13202868
iPad Pro 12.9”20482732
  1. Use system fonts - Ensures consistent rendering
  2. Avoid external resources - Bundle all assets
  3. Test at multiple sizes - Verify responsive behavior