Opens in a new tab

The marker-class contract

Components & animation2 minutes readUpdated 1 Oct 2026

The animated templates find what to animate by class, never by position. That is a deliberate design decision and it is what lets you edit the structure without the motion falling apart.

The rule#

Every animated element is found with a class lookup, and the sequence is derived from how many were found. A component with four steps spaces its timeline in quarters. Add a fifth and it re-spaces into fifths, and the scroll distance grows to match. No file mentions "step 3" anywhere.

The practical consequence:

  • Duplicate a card, a slide or a step and it animates like the others.
  • Delete one and the rest re-space.
  • Reorder them and the sequence follows the new order.

The root marker#

Each component's root element carries a class of the form bxc-<name> — bxc-hero-assemble, bxc-wipe, bxc-circ. That class does two jobs: the script uses it to find the component, and the companion plugin uses it to decide whether this page needs that component's CSS and JavaScript at all.

Remove it and the component stops animating and loses its styling. It is the one class that is not safe to tidy away.

The per-element markers#

These vary by template, and each template's own page lists its full set. The pattern is consistent:

Kind of classWhat it marks
__step, __card, __slideOne member of a repeating sequence. Count-driven — add or remove freely.
__rise, __reveal, __fadeAn element that animates in on its own, in DOM order.
__stage, __ring, __framesStructural: a container the script measures or transforms. Not repeatable.

Overriding the order#

Some components let you override what the DOM order implies:

  • data-bx-step="2" puts an element at a specific slot in the sequence instead of the one its position gives it.
  • data-bx-from="right" or "bottom" sets the direction an element arrives from.

Both are optional. Without them, position decides, which is why an element you duplicate needs no attributes at all to behave correctly.

Tuning the motion#

Timings live on data- attributes on the stage element, so you change them in the Bricks panel under Attributes rather than by editing a script. Each template's page lists the attributes it reads, with defaults. They are all optional — leave one out and the built-in default applies.