Create a disappearing section on your Retool canvas

This is a technique whereby we make a section disappear and the page shrinks to take up the space. It simulates an expanding section. This only works for components that are the full width of the page.

Create a Temporary State var, stateShipVisible for this example and set its Initial Value to true/false whether you want the component visible or not initially.

Create a toggle js query with one line:

// jsToggleProductsVisible
stateProductsVisible.setValue(!stateProductsVisible.value)

Set the Hide when true property of the target component to:

{{!stateShipVisible.value}}

Create a button or some other event to trigger the js query you created. This way you can trigger / change the state from multiple places instead of having to work all of those triggers into the hidden component settings.

(from @bradlymathews)

1 Like