---
source: https://carbone.io/documentation/design/conditions/conditional-blocks.html
title: "How to hide or show a part of your document?"
description: "How to hide or show a part of your document?"
generated_at: "2026-07-24"
---

# Conditional blocks

How to hide or show a part of your document?  
COMMUNITY FEATURE Available for:  
✓ Carbone Cloud  
✓ Carbone On-premise  
✓ Embedded Carbone JS   v2.0+ 

## :showBegin / :showEnd

Show a text block between showBegin and showEnd if a condition is true.  
It is recommended to only use break-lines (`shift` + `enter`) between `showBegin` and `showEnd` ([learn more](https://help.carbone.io/en-us/article/why-conditional-formatters-are-adding-empty-lines-showbeginhidebegin-1y56nmc/)).

**NEW**: Use the [drop/keep](/documentation/design/conditions/smart-conditions.md) formatter if you are hiding a paragraph, table row, image, chart or shape.

```cdata
{
  "toBuy" : true
}
```

```ctemplate
Banana{d.toBuy:ifEQ(true):showBegin}
Apple
Pineapple
{d.toBuy:showEnd}Grapes
```

```cresult
Banana
Apple
Pineapple
Grapes
```

Get inspired by one of our real-life examples: [Mission Report](/examples/mission-report/index.md)

## :hideBegin / :hideEnd

Hide text block between hideBegin and hideEnd if a condition is true.  
It is recommended to only use break-lines (`shift` + `enter`) between `hideBegin` and `hideEnd` ([learn more](https://help.carbone.io/en-us/article/why-conditional-formatters-are-adding-empty-lines-showbeginhidebegin-1y56nmc/)).

**NEW**: Use the [drop/keep](/documentation/design/conditions/smart-conditions.md) formatter if you are removing a paragraph, table row, image, chart or shape.

```cdata
{
  "toBuy" : true
}
```

```ctemplate
Banana{d.toBuy:ifEQ(true):hideBegin}
Apple
Pineapple
{d.toBuy:hideEnd}Grapes
```

```cresult
Banana
Grapes
```

## Related topics

- [Smart conditional blocks](/documentation/design/conditions/smart-conditions.md)
- [Conditions](/documentation/design/conditions/overview.md)
- [Inline Conditions](/documentation/design/conditions/inline-conditions.md)
