Skip to main content

Conditional Placeholders (Pro)

Placeholders are used to represent a place where a user can place a step. They are visible by default. By some reason you may want to hide them. You may hide all placeholders or only some of them.

A the beginning you need to create a function that determines if a placeholder should be rendered or not. The function has two parameters:

  • sequence - the sequence where the placeholder is located,
  • index - the index of the placeholder in the sequence.
function canCreatePlaceholder(sequence: Sequence, index: number): boolean {
return index % 2 === 0;
Pro Only

This part of the article is available only for subscribers of the pro package. Buy the pro package to get an access to this part.

If you have already subscription please log in.