Skip to main content
Conditional fields are fields within a Component that are shown or hidden based on the value of a trigger field (such as a checkbox or dropdown). When a conditional field is hidden in the dashboard, it is omitted entirely from the API response — your frontend only needs to handle the data that is present. For a full explanation of how to configure conditional fields in the dashboard, see Conditional Fields in Components.

API response example

When a conditional field is hidden in the dashboard, it will not be present in the API response.

React Component example

Frontend conditional logic

Conditional display by user role

Conditional display by location

Conditional display by date/time

Conditional display by device

Building a visibility Component

Visibility control schema

Use a small component to centralize visibility rules:

Frontend implementation

Best practices

Performance

  1. Avoid deeply nested conditional trees in your UI.
  2. Cache content responses when rules do not change often.

Analytics

  1. Track which variants are shown to users.
  2. Log conditional decisions to debug content issues.