Editor X: Using Multi-State Boxes
Multi-state boxes let you show different content for different situations in the same container box, displaying one state at a time. Choose the amount of states your box should have, design them completely and give them IDs that you will later use in your code.Your code defines when each state should be displayed. You can create conditions for each state to appear automatically, or let visitors navigate on their own. Before you begin:
As this feature requires some code, make sure to turn on Dev Mode (Velo by Wix). Multi-state boxes are currently in beta mode in Editor X. This means we're still working on adding new features and making general improvements to this feature. Step 1 | Add a multi-state boxThe first step is adding a multi-state box to your site directly from the Add panel. Drag the box to the desired location on your page. Show me how
Click Add Elements  at the top of Editor X.  Click Layout Tools. Click Multi-State Boxes. Drag a multi-state box to the relevant location on your page. Use multi-state boxes inside repeaters:Once you add a multi-state box to a repeater item, it's automatically added to the rest of the items with the exact same design. This is useful for lists with repeating items like FAQs or product galleries.Step 2 | Add and design the statesOnce you've added the box, design the states that it displays. You can customize these states however you choose: Use them for small badges like product availability (e.g., "New", "Out of Stock"), or create a completely different design for each state. Click below to learn how to: Select and design a stateThe states that you create are the child elements of the multi-state box. You can see and customize each one individually directly from the Manage States panel.To select and design a state:
Select the multi-state box. Click Manage States.  Click a state to select it.  Add elements and design the state as you wish.Tip: While designing the states, Dev Mode is not required. This means everyone can customize them – not just developers. Add a stateYou can add as many states as you need to your multi-state box.To add a new state:
Select the multi-state box. Click Manage States.  Click Add New State. Add an ID for the state:
    
Hover over the new state and click the More Actions icon . Click Edit ID.  Enter a new ID for this state. Click Done.   Rename a stateEnter a unique ID for each of your states. While writing the code that defines when the states appear, this is the IDs you'll need to use.To rename a state:
Select the multi-state box. Click Manage States.  Click the More Actions icon  next to the current state's name.  Click Edit ID. Enter the new ID in the text box and click Done. Remove a state
Select the multi-state box. Click Manage States.  Click the More Actions icon  next to the current state's name.  Click Delete.Reorder statesFor your convenience, you can move states in the Manage States panel by dragging and dropping them.
Select the multi-state box. Click Manage States. Click and drag the Reorder icon  up or down to change the order of the states. Design tip:The states can have different height properties, which allow you to reveal additional info for example. However, the width of your states always stays the same.Step 3 | Add code in Dev ModeThe last step to make the multi-state box functional is adding code that controls when each state appears. Using the functions and events available in the Velo API for multi-state boxes, you can define and implement rules for displaying and navigating your states.Important:While adding the relevant code, make sure you wrote the state IDs correctly, with the exact same spelling and capitalization. Next:Learn more about working with your multi-state box and code.