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

# Cancellation template components

> Reference for the managed controls in Customer Portal cancellation templates.

Cancellation templates provide managed controls for collecting a reason and completing the configured follow-up action. Keep these tags in the corresponding templates so the cancellation flow can continue. Every step includes a direct way to cancel, so customers can always reach the cancellation confirmation.

## `{% cancellation_reasons %}`

Renders the project’s active cancellation reasons and the form for selecting one.

Used in: Cancellation reasons and Cancellation follow-up

```liquid theme={null}
{% cancellation_reasons %}
```

Set `show_context: false` when the template also renders `{% cancellation_summary %}`:

```liquid theme={null}
{% cancellation_reasons show_context: false %}
```

## `{% cancellation_follow_up %}`

Renders the follow-up action for the selected cancellation reason, such as cancellation, pausing, skipping an order, or accepting an offer.

Used in: Cancellation follow-up

```liquid theme={null}
{% cancellation_follow_up %}
```

This tag also accepts `show_context: false` when the template renders `{% cancellation_summary %}`.

## `{% cancellation_summary %}`

Renders a summary of the customer’s subscription: product images and names, the next delivery date and the date the customer became a subscriber. Facts without data are left out. When a cancellation template doesn’t include this tag, each step shows a compact product header instead.

Used in: Cancellation reasons and Cancellation follow-up

```liquid theme={null}
{% cancellation_summary %}
```

## Styling

Style the cancellation controls with Tailwind classes, like other Customer Portal components. Each class argument replaces the default classes for that part of the step, so include every class the part needs.

`{% cancellation_reasons %}` and `{% cancellation_follow_up %}` accept:

| Argument | Type | Default |
| - | - | - |
| `show_context` | Boolean | `true`. Set `false` when the template renders `{% cancellation_summary %}` |
| `card_classes` | String | Default step card classes |
| `choice_classes` | String | Default option classes, including the `has-checked:` state |
| `primary_button_classes` | String | Default primary button classes |
| `secondary_button_classes` | String | Default "No thanks" button classes |
| `link_classes` | String | Default "Keep my subscription" and "Cancel subscription" link classes |

`{% cancellation_summary %}` accepts `card_classes`.

```liquid theme={null}
{% cancellation_summary card_classes: "rounded-none border-0 bg-transparent p-0" %}
{% cancellation_reasons
  show_context: false
  card_classes: "rounded-none border border-stone-200 bg-white p-8"
  choice_classes: "flex cursor-pointer items-center gap-3 rounded-none border border-stone-300 px-4 py-3 has-checked:border-[#7c4a2d] has-checked:bg-[#7c4a2d]/5"
  primary_button_classes: "inline-flex min-h-12 items-center justify-center rounded-none bg-[#7c4a2d] px-6 font-semibold text-white hover:bg-[#6a3e25]"
%}
```

The text inside these controls is Customer Portal text. Change it per language with the template’s translations instead of replacing the controls.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.