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

# Visibility rules

> Show building blocks and steps only when data meets one or more conditions.

# Visibility rules

A visibility rule determines whether a building block or a step is shown. Content without a rule is always shown when it belongs to the active step.

## Add a rule to a building block

1. Select the building block.
2. Find **Visibility** in the right-hand panel.
3. Choose **Only when...**.
4. Choose a field, a comparison, and a value.

The value can be fixed or come from another field. At the bottom, Card Studio explains the rule in a readable sentence.

## Comparisons

| Option                        | Use when                                   |
| ----------------------------- | ------------------------------------------ |
| is / is not                   | values must be equal or different          |
| is greater than / is at least | numbers or dates must be above a threshold |
| is less than / is at most     | numbers or dates must be below a threshold |
| contains                      | a text or list must contain a value        |
| is empty / is not empty       | the presence of a value is enough          |

"Does not contain" is represented internally as a reversed "contains" rule and can be shown via the advanced rule builder.

## Multiple rules

Choose whether **all** rules must be true, or whether **at least one** is enough. The advanced view can build:

* a single comparison;
* an AND group;
* an OR group;
* a NOT rule that reverses the result.

A group can contain up to 20 sub-rules. Keep rules small and name the fields involved clearly, so others can follow the logic.

## Data sources in rules

The left and right side can use record fields, association counts, external data, form answers, the selected associated record, step info, and card info. Row fields can be used on blocks inside a repeater.

Watch out for types. The text `10` and the number `10` can come from different systems, and an empty value is not the same as the number 0.

## Conditional steps

Each step can have its own visibility rule. A hidden step is skipped. The first visible step becomes the starting step, and navigation only works with visible steps.

If all steps are hidden, the flow has no active step. Make sure there is at least one unconditional fallback step, or rules that cover every case between them.

## Conditional actions

The **Conditional branch** action type uses the same rule model, but controls which actions run in the "true" and "otherwise" branches. See [Actions](/building/actions).

## Good patterns

* Combine an **Alert** with a rule, for example when a date has passed.
* Show an **Empty state** when a list or a count is empty/0.
* Use a form answer to reveal follow-up fields on the same step.
* Prefer one readable rule over several overlapping rules on neighboring blocks.
