---
title: Parameters and Modifications
description: Map Pixmato template layers to safe API modifications.
icon: sliders-horizontal
---

Parameters define what can change at render time.

## Naming

Use short, stable names:

```txt
headline
subtitle
photo
price
accent
button
```

Avoid names that describe a temporary layout position, such as `left_box_2`, if the layer represents a business field like `price`.

## Text

```json
{
  "headline": "New collection"
}
```

## Images

```json
{
  "photo": "https://cdn.example.com/photo.jpg"
}
```

## QR codes

QR code layers expose their encoded value as a text parameter. Use a plain key for the common case.

```json
{
  "check_in_url": "https://example.com/check-in/ticket_123"
}
```

Use QR layers for tickets, certificates, coupons, menus, passes, and verification links. Keep QR values as short as possible. Long URLs create denser codes that can scan more slowly.

## Style controls

```json
{
  "accent.color": "#1f9f8a",
  "accent.opacity": 0.92
}
```

## Gradient fills

In the editor, canvas backgrounds and shape fills support **Solid**, **Linear**, and **Radial** modes. Gradient stops support transparency, so a shape can provide a fade over a photo.

For an exposed shape fill named `accent`, send the same CSS gradient string through the modifications API:

```json
{
  "accent.fill": "linear-gradient(135deg, #244cfa 0%, #8b5cf6 100%)"
}
```

A plain `accent` key also works when its parameter is bound to the shape fill. Gradients are saved with the template and preserved in PNG, JPEG, WebP, and PDF renders. Text colors, strokes, and QR colors remain solid colors.

Supported gradients use sRGB colors and percentage stops. Conic gradients, repeating gradients, and multiple background layers are not supported.

## Text direction and alignment

Text fields accept a reading direction and an alignment. Use them for Arabic and Hebrew.

```json
{
  "headline": "خصم 25%",
  "headline.direction": "rtl"
}
```

Sending `rtl` for a left-aligned field also aligns it to the right. Send `headline.text_align` to choose the alignment yourself. See [Languages and right-to-left text](/docs/templates/languages).

## Visibility

```json
{
  "badge.visible": false
}
```

## Useful dot properties

| Property              | Use                                                            |
| --------------------- | -------------------------------------------------------------- |
| `.text` or `.content` | Replace text content.                                          |
| `.src` or `.imageUrl` | Replace an image source.                                       |
| `.qr` or `.value`     | Replace a QR code value when the parameter targets a QR layer. |
| `.foregroundColor`    | Change a QR code foreground color.                             |
| `.backgroundColor`    | Change a QR code background color.                             |
| `.errorCorrection`    | Set QR recovery to `low`, `medium`, `quartile`, or `high`.     |
| `.margin`             | Set QR quiet-zone padding from `0` to `8`.                     |
| `.direction`          | Set a text field to `ltr` or `rtl`.                            |
| `.text_align`         | Align a text field `left`, `center`, `right`, or `justify`.    |
| `.font_family`        | Change a text field's font, for example `Noto Sans TC`.        |
| `.visible`            | Show or hide a layer.                                          |
