> ## Documentation Index
> Fetch the complete documentation index at: https://docs.passlet.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Templates

> Design reusable passes for Apple Wallet and Google Wallet — fields, variables, versions, and publishing.

Templates define the look of every pass you issue — colors, logos, layout. You design a template once, publish it, and issue any number of passes from it.

## Creating a template

From **Templates**, use the create button — there are three starting points:

* **Start blank** — design from scratch.
* **Duplicate existing** — clone one of your templates.
* **Browse Gallery** — curated starting points by Passlet.

In the create dialog, pick a **name** and the **wallets** the template supports:

* **Apple Wallet** — native Apple pass with images, web-service updates, and push refresh.
* **Google Wallet** — native Google class/object publishing and Save to Wallet links.

At least one wallet is required; you can support both from one template.

## The template editor

The editor is a full-screen designer with a live preview per wallet (switch with the **Apple / Google** tabs in the top bar).

* **Fields** — header, primary, secondary, auxiliary, and back fields (Apple) or rows and
  modules (Google), with text styling and per-field bindings.
* **Colors & images** — background/foreground/label colors, logos and artwork with cropping
  and retina uploads.
* **Barcode** — the scannable payload. By default it encodes a Passlet-generated value; bind
  the reserved `barcodeMessage` variable to control it per pass.
* **Localizations** — translated field values (Apple).
* **Expiration** — an optional template-wide expiry for issued passes.
* **Redemption** — when and how often passes can be scanned; see
  [Redemption & scanning](/guides/redemption-and-scanning).

The top bar shows save state ("Unsaved changes" / "Saving…" / "Saved"), an **Issues** popover listing anything that blocks publishing, and provider setup status.

### Variables and bindings

**Variables** are named placeholders filled in per pass at issue time. Define them in the editor with a type — text, integer, date/time, single choice (enum), or multiple choice — plus an optional default and a preview value.

Bind variables into pass fields (or the barcode) and every issued pass renders its own values. A typical event ticket defines `attendeeName`, `ticketType`, and `seat`, binds them to the front fields, and lets the barcode encode the check-in payload.

## Draft vs. published

A template's status is derived from its versions:

* **Draft** — no published version yet, or unpublished edits on top of one. Drafts can't issue
  passes.
* **Published** — has a published version. **Publish** in the editor creates a new immutable
  version (v1, v2, …).

Issued passes stay pinned to the version they were issued from. Publishing a new version never changes existing passes — you upgrade them explicitly; see [Updating passes](/guides/updating-passes).

## Organizing templates

* The **Templates** library supports search, sort, a project filter, status chips
  (All / Published / Draft), and a table or gallery view.
* **Move** a template to a [project](/guides/projects) — its passes move with it.
* **Duplicate** to iterate on a design without touching the original.
* **Delete** moves the template to **Trash** (`Templates → Trash`), from which it can be
  restored.
