---
url: https://plugin.stripo.email/extensions/reference/types/DisplayCondition.md
---
# DisplayCondition

Configuration interface for conditional element visibility.

```typescript
interface DisplayCondition
```

## Description

`DisplayCondition` defines the configuration for controlling when an HTML element should be displayed based on dynamic conditions. This is used for personalization, A/B testing, and responsive content delivery in email templates.

## Import

```typescript
import { DisplayCondition } from '@stripoinc/ui-editor-extensions';
```

## Properties

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `id` | `number` | Yes | Unique identifier for the condition |
| `name` | `string` | Yes | Human-readable name for the condition |
| `description` | `string` | Yes | Detailed description of what the condition does |
| `beforeScript` | `string` | Yes | JavaScript code executed before condition evaluation |
| `afterScript` | `string` | Yes | JavaScript code executed after condition evaluation |
| `extraData` | `string` | No | Optional additional data in string format |
| `conditionsCount` | `number` | No | Optional number of individual conditions represented by this display condition |
