## What are Templates?

Templates define zones (labeled regions) on a board's canvas. When you create a board with a template, objects are automatically organized into the zone they're placed in. This is useful for frameworks like Business Model Canvas, SWOT Analysis, and custom layouts.

## Built-in Templates

Yando includes three built-in templates:

### Business Model Canvas (BMC)
Nine zones covering: Key Partners, Key Activities, Key Resources, Value Propositions, Customer Relationships, Channels, Customer Segments, Cost Structure, and Revenue Streams.

### SWOT Analysis
Four quadrants: Strengths, Weaknesses, Opportunities, and Threats.

### Matrix 2x2
A simple four-quadrant grid for any two-axis comparison.

## Browsing Templates

Navigate to **Templates** from the top navigation. You'll see:

- **Built-in templates** - Pre-configured, available to everyone
- **Your templates** - Custom templates you've created
- **Public templates** - Templates shared by other users

Click any template card to see its detail page with a full-size canvas preview.

## Creating Custom Templates

1. Go to **Templates** and click **New Template**
2. Fill in the form:
   - **Name** (required)
   - **Description** (optional)
   - **Canvas Width/Height** - Dimensions in pixels
   - **Public** - Whether other users can see and use this template
3. Use the **Visual Zone Editor** to add zones

### Visual Zone Editor

The zone editor is a WYSIWYG canvas where you drag and resize zones:

- Click **Add Zone** to create a new zone
- Drag zones to reposition them
- Drag zone edges to resize
- Set zone properties in the sidebar:
  - **Name** - Label shown on the canvas
  - **Shape** - Rectangle, circle, or pie slice
  - **Color** - Choose from 10 curated colors per theme

### Zone Shapes

- **Rectangle** - Standard rectangular zones (most common)
- **Circle** - Circular zones, useful for hub-and-spoke layouts
- **Pie Slice** - Subdivide a circle into 2-6 wedge segments with precise angular boundaries

### Curated Color Palettes

Each theme (light/dark) has 10 matched colors. When you switch themes, zone colors automatically adapt. The palette uses:

- **Light mode**: Pastel backgrounds with dark text
- **Dark mode**: Deep backgrounds with white text

### Canvas Resize Tools

- **Fit to Zones** - One-click resize to fit all zones with padding
- **Edge Drag Handles** - 8 handles for direct canvas edge manipulation
- **Content Bounds Indicator** - Amber dashed rectangle showing zone bounding box

## Customizing Templates ("Use as Starting Point")

You can clone any accessible template to create your own version:

1. On a template's card or detail page, click **Customize**
2. The form is pre-populated with "Copy of [name]", description, and all zones
3. Modify the name, zones, or canvas dimensions as needed
4. Click **Save**

The cloned template is always owned by you and set to private.

## Template Switching on Existing Boards

When editing a board, you can change its template:

1. Open the board edit form
2. Select a new template from the dropdown
3. Confirm the change

Objects are remapped using:

1. **Zone name matching** (case-insensitive) - Objects stay in zones with the same name
2. **Position-based fallback** - Remaining objects are assigned by their canvas position

A success message shows remapping statistics (e.g., "5 by name, 3 by position, 2 scaled").
