Features/Interactions

Named states

Set named states like menu-open or tab=2 that CSS, other interactions and conditions can read.

A state is a named value for the page, such as menu: open or tab: pricing. The State action sets, toggles or clears it, and the On State event and the Only If State condition react to it. The state appears on the page as a data-state-<name> attribute, so classes can style it, and it can be kept for the session. States make menus, tabs, accordions and modals coordinate without code.

How it works

  • State action: type set, toggle or clear; state name (small letters, digits and -); value (up to 200 characters); persist none or session.
  • A kept state comes back after a reload: data-state-* is set again and the On State event runs once marked as restored, with interactions jumping to their end state.
  • On State event: filter by state name and an equals value.
  • Interaction condition 'if' (Only If State): equals or not equal to a value; it holds on every event.
  • Accessible presets built on states (MCP): accordion and tabs presets are exposed; modal, mega-menu, tabs-keyboard, reveal, parallax and hover-lift presets exist but are not exposed yet.

When to use it

  • One menu-open state shared by the burger button, the overlay and the body scroll lock
  • Tabs where buttons and panels follow a tab state
  • Remember a dismissed banner for the session

Limitations

  • Persistence is session only (no long-term storage option).

Availability

  • Works in Designer and MCP.
  • Included in every plan.

How to use it.

  1. Add a State action that sets a name and value.
  2. Add an interaction on On State, or use Only If State in Scope, to react.

Questions.

Can CSS react to a state?

Related features.

No card needed

Build it today.Pay when it goes live.

Every feature is unmetered while you build. Checkout opens the first time you publish.