Element states
Interactive flow elements change their look based on user actions: a tapped quiz option becomes Selected, a focused input becomes Active. Style each state separately to give users visual feedback without app code.
Some states depend on a condition that you set up, such as the value of a variable or the state of another element:
- Disabled: users can’t interact with the element.
- Custom states: you name the state, set its condition, and style the element for it. No action switches an element to a custom state. Instead, change a custom variable on tap, and base the condition of the state on that variable.
An element is only in one state at a time.
Available states by element kind
| Element kind | Built-in states | Addable states |
|---|---|---|
| Selectable elements | Default, Selected | Disabled, custom states (except on tab headers) |
| Inputs | Default, Active, Invalid | Disabled, custom states (except on pickers) |
| Any element with a tap interaction — buttons, images, containers, and so on (except text elements and icons) | Default | Disabled, custom states (except on bottom sheets) |
| Progress indicator steps | Completed, Current, Upcoming | — |
Addable states don’t appear on an element until you add them. Each one depends on a condition that you set up.
The conditions of other elements can also evaluate element states. For example, you can explain why a button is disabled.
Style a state

-
Select an element. The States section in the right panel shows a tab for each state that the element has.
-
In the States section, activate the target state. If the section has no tab for the state, add the state.
-
Change any property — fill, border, typography, and so on. The change is scoped to that state.
Nested elements become stateful alongside the parent. Any change to a child is scoped to the parent’s active state.
-
The Adapty SDK applies the matching style at runtime.
Selectable element states
Selectable elements — quiz options, products, tabs, toggles and checkboxes, and any custom selectable element — have two states out of the box:
- Default: The element’s resting appearance.
- Selected: Applies when the user taps the element. The element returns to Default when the user de-selects it.
In a single-choice group, selecting one element de-selects the others. Multi-choice groups let several be Selected at the same time. Toggles are independent — selecting a toggle has no effect on its siblings. See group types.
To reuse state-specific styles, add them to one element, such as a product card. Then ask the AI Editor to apply them to the other elements. State-specific styles don’t carry over between siblings on their own.
Input states
- Default: The input’s resting appearance.
- Active: Applies while the input is focused.
- Invalid: Applies when the input’s content fails validation, for example, when an email field doesn’t contain
@. See Input validation. - Disabled: The input is not interactive. Add this state manually.
Style each state the same way as a selectable element: activate the target state, change properties.
Step states for progress indicators
Main article: Progress indicators
Progress indicators show users how much of an onboarding flow they have completed. Each step has three states:
- Completed: Steps the user has passed.
- Current: The user’s current step.
- Upcoming: Steps the user hasn’t reached yet.
When several states apply to one element
Several states can apply to one element at once. For example:
- Users submit an invalid address in an email field, then tap the field again to fix it. The field has focus, so Active applies. The address is still invalid, so Invalid applies too.
- Users turn on a trial toggle, so Selected applies. Then they pick a plan without a trial. The toggle has a Disabled condition for that plan, so Disabled applies too.
An element is only in one state at a time. When several states apply, the element is in the state that comes last in this list:
- Selected
- Invalid
- Active
- Disabled
- Custom states, in the order you added them
In the examples, the email field is Active, and the trial toggle is Disabled. The element looks the way you styled that state. A condition that evaluates the state of the element only matches that state. When no state in the list applies, the element is Default.
A custom state only changes the look. If Disabled applies too, the element is in the custom state, but users can’t interact with it.
Add a state
Add the Disabled state

To stop users from interacting with an element, add the Disabled state:
- Select the target element.
- If the States section has no Disabled tab, click Add state, and select Disabled. If the element already has states other than Default, click Settings before Add state.
- Hover over Disabled, and click Set conditions.
- Add a condition. If you want to disable the submit button unless the input passes validation, compare the input’s
isValidvariable tofalse. For the Disabled state to apply, fill in every Value field. - Style the Disabled state to visually communicate the restriction (for example, lower the opacity).
The Adapty SDK evaluates the condition at runtime and applies the Disabled state when appropriate — no app code needed.
A Disabled condition can also evaluate the state of another element. For example, you can disable two elements together.
Add a custom state
For a look that the built-in states don’t cover, add a custom state: it can depend on an answer, a tap, or the state of another element. For example:
- Emphasize an annual plan card while a trial toggle is on.
- Change the color of a Remind me button after users tap it. To set this up, switch the button to a custom state on tap.
A custom state only changes the look. To stop users from interacting with an element, add the Disabled state.

These elements can have custom states:
- Buttons, images, containers, videos, timers, and carousels: They need a tap action. If you delete the tap action, users stop seeing their custom states.
- Selectable elements: They need a group or a tap action.
- Inputs: Text, email, password, number, and phone inputs.
These elements can’t have custom states:
- Tab headers and tab content
- Pickers
- Bottom sheets
- Progress indicator steps
An element can have up to 5 custom states. At 5, the Custom state option is off, with the caption “Up to 5 custom states”. A config from the Adapty CLI or an AI tool can have more, and you can still edit them.
-
Select the target element.
-
In the States section, click Add state, and select Custom state. If the element already has states other than Default, click Settings before Add state.
-
In the Name field, enter a name for the state, such as Locked. While the name breaks one of these rules, an error shows under the field, and Save stays off:
- Name is required: The name can’t be empty.
- Max 30 characters: The name can’t be longer than 30 characters.
- This name is reserved: The name can’t be Default,
focused, or the name of a built-in state: Selected, Active, Invalid, Disabled, Completed, Current, or Upcoming. - A state with this name already exists: Each custom state of the element needs its own name. Letter case doesn’t make names different.
-
Add a condition, such as
plan=free. To add more rows, click Add Condition. If one true row is enough, click all to switch it to any. For the state to apply, fill in every Value field. -
Click Save.
-
To style the state, activate its tab in the States section, and change the properties of the element. On a text field, a custom state only changes the fill, border, and corner radius.
The builder doesn’t warn about an empty Value field. If a row has a value but no variable, you can’t publish the flow: the Can’t publish yet dialog lists the row under Broken references. The Adapty CLI and the API return the Invalid State Condition error for such a row.
On a video or a carousel, a state change can restart the video or return the carousel to its first slide.
The condition of a custom state can also evaluate the state of another element, such as whether a toggle is Selected.
Switch an element to a custom state on tap
No action switches an element to a custom state. Instead, change a custom variable on tap, and base the condition of the state on that variable.
- Create a custom variable of type Boolean, with the initial value
false. - Select the element that users tap. On the Interactions tab, add a Set variable action to its On Tap trigger, and set the variable to
true. - Add a custom state to the element that switches. In the condition, pick the variable on the Custom tab of the Variable field. Set the Value field to
true.
Edit or delete a custom state

To rename a custom state or change its condition, select the element. In the States section of the right panel, hover over the tab of the state, and click Edit state. Alternatively, click Settings in that section, and click the name of the state. The state keeps its styles, and the conditions that evaluate it show the new name.
To delete a custom state, select the element. In the States section of the right panel, click Settings , and click the trash icon in the row of the state. If conditions use the state, a dialog lists them first. After you click Delete, these conditions break, and you can’t publish the flow until you fix them. To bring the state back with its styles, undo the deletion.
