Using Page Templates
Build maintainable prototypes by creating page-level components that handle multiple states through properties. Reduce duplication and simplify updates across complex user flows.
Overview
When prototyping application interfaces, managing multiple pages for different states of the same screen creates maintenance challenges. Traditional approaches duplicate entire pages for each variation—empty forms, filled forms, error states, success screens—resulting in repetitive updates and inconsistencies.
Page templates solve this by treating the page itself as a component. Instead of duplicating pages, create one page component with properties that control visibility and state. Change a label once, and all states update automatically. This approach reduces file bloat, guarantees consistency, and accelerates iteration.
The Traditional Problem
Duplicating pages for each state creates several issues:
Registration flow without page templates:
- Page 1: Empty form
- Page 2: Name field filled
- Page 3: Email field filled
- Page 4: All fields filled
- Page 5: Email error
- Page 6: Password error
- Page 7: Submitting
- Page 8: Network error
- Page 9: Success
Maintenance impact:
- Removing a field: Edit 9 pages manually
- Changing a label: Update across all pages
- Adding validation: Apply to multiple error states
- Updating button style: Modify every page
The Page Template Solution
Create one component with properties controlling all states:
Registration Page Template:
- Boolean properties: Name filled, Email filled, Password filled, Show errors, Submitting
- Instance swap: Error message type
- Text properties: Error message content
Maintenance impact:
- Removing a field: Edit component once
- Changing a label: Update propagates automatically
- Adding validation: Configure in one place
- Updating button style: Affects all instances
Benefits:
- ✅ Single source of truth for all states
- ✅ Guaranteed consistency across prototype
- ✅ Faster updates and iteration
- ✅ Cleaner file organization
- ✅ Easier collaboration and handoff
When to Use Page Templates
Page templates work best for state-heavy screens and repeated patterns. Understanding when to use them saves time and avoids over-engineering.
Good Use Cases
✅ Multi-step forms and wizards: Registration, checkout, onboarding flows with 3+ steps
✅ State-heavy interfaces: Dashboards, search results, data tables with multiple loading/error states
✅ Content with loading states: Feeds, lists, galleries that show skeleton screens
✅ Error and empty states: Screens with 3+ different feedback messages
✅ User-dependent content: Logged in vs. out, different role views, personalized sections
✅ Repeated page patterns: Profile pages, product details, article layouts used across 5+ items
When Not to Use
❌ Simple static pages: Marketing pages with minimal variation or one-off designs
❌ Early exploration: Initial concepting where you're still discovering requirements
❌ Highly diverse content: Pages that differ significantly between instances (over 50% different)
❌ Quick mockups: Fast ideation work without production requirements
❌ Single-use screens: Unique screens that won't be reused elsewhere
Decision Framework
Create a page template when:
- You've duplicated the same page 3+ times with minor variations
- You anticipate needing 5+ different states of the same screen
- Changes to one element need to propagate to multiple pages
- You're building flows that will be maintained long-term
Stick with separate pages when:
- Each page is significantly different (less than 50% similar)
- You're in early exploration and requirements are fluid
- The screens are one-time use only
- Setup time exceeds maintenance time saved
:::tip[Time Investment] Creating your first page template takes 2-3× longer than duplicating pages. Break even happens around the 4th instance or 2nd round of updates. For complex flows with 10+ states, templates save 80%+ maintenance time. :::
Building Page Templates
Creating page templates requires planning all states upfront, then building a flexible component structure that accommodates every variation through properties.
Planning States
Before building, map out every state your page needs to display.
- List all variations: Empty, filled, loading, success, error states
- Identify differences: What changes between states—visibility, content, styling
- Find commonalities: What stays the same across all states
- Choose control method: Boolean properties, variants, instance swaps, or text overrides
- Plan component hierarchy: Which components need to be swappable
Example—Product page states:
- In stock vs. out of stock
- User logged in vs. logged out
- Item in cart vs. not in cart
- Reviews loaded vs. loading vs. empty
- Related products shown vs. hidden
Quick audit: List all variations (empty, filled, loading, error), identify what changes between states (visibility, content), and choose control methods (boolean, variants, instance swaps).
Creating the Component
Build the page component at its most complex state, then add properties to control variations.
- Design the complete page layout with all possible elements visible
- Select the entire page frame and convert to component (Cmd/Ctrl + Option + K)
- Name it descriptively: "[Screen Name] Page Template"
- Apply auto-layout to flexible sections for responsive behavior
:::note[Design at Maximum Complexity] Start with everything visible—you can hide elements with properties. It's harder to add missing elements later than to hide unnecessary ones. :::
Adding Component Properties
Configure properties that control state variations.
Boolean properties (show/hide elements):
- Select the component
- Click the "+" in the Component Properties section
- Choose "Boolean" type
- Name it clearly: "Show validation error", "Show loading state", "Is logged in"
- Link to layers: Select layers → Set visibility: "Show if [property name] is true"
Instance swap properties (interchange components):
- Add an "Instance swap" property
- Name it: "Alert type", "Empty state illustration", "Button variant"
- Select the component instance to swap
- Link it to the property
Text properties (dynamic content):
- Add a "Text" property
- Name it: "User name", "Error message", "Product title"
- Select text layers and bind to the property
Variants (major state changes):
- Use variants for fundamentally different layouts
- Keep most state control in properties when possible
- Variants are best for: mobile vs. desktop modes, completely different page types
Property Naming Conventions
Use consistent prefixes: Show [element], Is [state], Has [content] for booleans. Name instance swaps as [Element] variant. Keep text properties descriptive: [Element] text or [Data] value.
Configuring Visibility
Control which layers appear in different states.
- Select layers that should be conditional (error messages, success banners, loading spinners)
- In the Layer panel, click the eye icon dropdown
- Choose "Set conditional visibility"
- Link to a boolean property: "Show if [property] is true/false"
Common visibility patterns:
- Error states: Show if "Show error" is true
- Empty states: Show if "Has content" is false
- Loading states: Show if "Is loading" is true
- Success messages: Show if "Show success" is true
Testing the Component
Verify all property combinations work correctly.
- Create test frames with instances of your page template
- Configure each instance with different property values
- Check that all states display correctly
- Test edge cases: all properties true, all false, mixed states
- Verify nested components respond appropriately
- Ensure text doesn't overflow in different states
Performance & Limitations
Keep components manageable:
- 15-20 properties maximum per component
- 4-5 nested component levels
- 10-12 boolean properties (avoid exponential complexity: 10 booleans = 1,024 states)
Warning signs: Sluggish editing, 2+ second property changes, rendering lag.
Solutions: Split large components, flatten hierarchy, use variants instead of multiple booleans, optimize assets.
:::caution[Performance Impact] If property changes take over 1 second, your template is too complex. Split it or reduce properties. :::
Creating Prototypes
Use page template instances to build interactive prototypes with proper state transitions.
Setting Up Frames
Create a frame for each step or state in your user flow.
- Create frames for major steps: "Step 1 - Empty", "Step 2 - Filling", "Step 3 - Error", "Step 4 - Success"
- Insert an instance of your page template in each frame
- Configure properties to show the appropriate state:
- Step 1: All booleans false (empty state)
- Step 2: "Name filled" true, rest false
- Step 3: All fields filled, "Show error" true
- Step 4: "Show success" true
Adding Interactions
Connect frames with prototype interactions.
- Select interactive elements (buttons, form fields)
- Click the prototype handle (circle on the right)
- Drag to the target frame
- Configure interaction: On click → Navigate to → Target frame
- Add animations: Instant, dissolve, slide, etc.
- Set up back navigation if needed
Complex Interactions
Multi-path flows: Create separate instances for different navigation paths (success vs. error). Match property configurations between linked frames to preserve state.
Animation tips: Use Instant for minor changes, Dissolve for loading states, Smart Animate for moving elements, Slide for step progression.
:::tip[Prototype Performance] Shared component structure means faster loading. Keep interactions simple for smooth playback. :::
Best Practices
Do these things:
- ✅ Plan all states before building the component
- ✅ Use clear, descriptive property names
- ✅ Group related properties logically
- ✅ Add property descriptions for team members
- ✅ Test all property combinations
- ✅ Document configuration examples
- ✅ Keep components modular with nested instances
Avoid these mistakes:
- ❌ Don't over-engineer simple pages
- ❌ Don't create too many property combinations
- ❌ Don't forget to test edge cases
- ❌ Don't hardcode content that should be dynamic
- ❌ Don't break auto-layout with absolute positioning
- ❌ Don't skip documentation
- ❌ Don't use too many nested levels (impacts performance)
Real-World Example
E-commerce Product Page
States to handle: Product availability (in stock, out of stock, limited quantity), user status (logged in/out), cart status, wishlist status, reviews (loading, populated, empty), related products.
Component properties:
In stock: BooleanStock level: Text ("Only 3 left!", "Back in 5 days")User logged in: BooleanIn cart: BooleanIn wishlist: BooleanReviews state: Variant (loading | populated | empty)Review count: TextPrice,Product title: Text
Result: 2 × 2 × 2 × 2 × 3 × 2 = 96 possible states from one component.
Common configurations:
- New visitor:
In stock: true,User logged in: false,Reviews: populated - Returning user:
In stock: true,User logged in: true,In cart: true - Out of stock:
In stock: false,Stock level: "Back in stock: March 15" - First product:
Reviews state: empty, shows "Be the first to review"
Development handoff: Map boolean properties to API values, bind text properties to data sources, match instance swaps to component library variants
Advanced Techniques
Responsive Variants
Add device variants when desktop and mobile layouts differ significantly (50%+ structural changes).
Setup:
- Create base component for desktop
- Add
Devicevariant: Desktop | Tablet | Mobile - Design mobile: Stack columns, larger touch targets, simplified navigation
- Maintain same properties across all device variants
- Configure auto-layout with min/max width constraints
Tips: Boolean properties work identically across devices. Instance swaps should have mobile-optimized versions. Test at actual breakpoint values.
Theme Integration
Bind all colors to semantic variables (--cx-bg-main, --cx-text-primary). Use switch variables for theme-specific content:
Logo Group
├── Light Logo → Visibility: figma/switch/theme/light
└── Dark Logo → Visibility: figma/switch/theme/darkTest both themes: Verify colors, contrast, and theme-specific images. Document variable mappings for development handoff.
Team Collaboration
Sharing Templates
Publish to team library with:
- Dedicated "📄 Page Templates" page organized by category
- Component descriptions listing all properties and effects
- 3-4 example configurations with labels
- Usage guide and related components
Naming Conventions
- Components:
[Screen Type] Page Template(e.g., "Registration Page Template") - Properties: Action-oriented (e.g., "Show validation error")
- Instances:
[Screen] - [State](e.g., "Registration - Email Error")
Maintenance
Updating Templates
Changes to the main component propagate automatically. Test with existing instances before publishing. For major changes, duplicate the component and version it ("v2"), then migrate gradually.
Common Issues
Property changes don't update: Local overrides on instance. Fix: Right-click → Reset all changes.
Layout breaks: Use conditional visibility instead of absolute positioning. Test all realistic property combinations.
Performance lag: Too many nested components or properties. Flatten hierarchy or reduce property count.
Text overflow: Set text layers to auto-height or clip content. Test with longest expected copy.
Theme switching fails: Reapply color variables to all layers. Avoid detached styles.
Next Steps
- Theme Switching - Apply Chassis themes to page templates
- Component Documentation - Explore Chassis components for building templates
- Variables & Styles - Understand design tokens and variables
- Updating Libraries - Manage component updates and versions
Resources
- Figma Components: help.figma.com/components
- Component Properties: help.figma.com/component-properties
- Variants: help.figma.com/variants
- Auto-layout: help.figma.com/auto-layout
:::note[Future Development] Chassis will provide pre-built page template components in future releases. This guide focuses on the design approach and techniques you can use today to create your own maintainable page templates. :::