---
title: "Display conditions, MailKaro Docs"
description: "Display conditions in MailKaro: show or hide a block based on the recipient, segment one email for everyone."
---

# Display conditions

Personalization

# Display conditions

Show or hide a block based on the recipient, segment one email for everyone.

Every block carries a `visible_if` expression, evaluated at render time against the same context as your [merge tags](https://docs.mailkaro.com/merge-tags). When it's false, the block is dropped from the output.

json

```
{
 "type": "button", "visible_if": "plan == 'premium'", "values": { "label": "Upgrade perks", "href": "https://…" }
}
```

Responsive visibility is separate and always available: `hide_mobile` / `hide_desktop` per block, plus `mobile_styles` and `dark_mode_styles` overrides.

## Expression syntax

A bare name, or `{{name}}`, reads a merge tag value. Strings take single or double quotes, and numbers, `true`, `false` and `null` are literals. The operators are `==`, `!=`, `===`, `!==`, ``, `=`, `&&`, `||`, `!`, `+`, `-` and parentheses. A tag with no value counts as an empty string.

text

```
plan == 'premium' && orders > 3
```

## When it is checked

The expression is checked only when you render with merge data (`mergeTags` on `renderDesign`, or `merge_tags` on `POST /v3/render`). A plain export with no data keeps every block. An expression that cannot be parsed, such as one with a dotted name like `user.plan`, also keeps the block.

## Row conditions for your sending tool

Pass `displayConditions` (Unlayer's shape: `type`, `label`, `description`, `before`, `after`) and the row settings get a condition picker. On an export with no merge data, the chosen condition's `before` and `after` text is written around the row, for example `{% if plan == "pro" %}` and `{% endif %}`.

Source: https://docs.mailkaro.com/display-conditions
