Switch ❺🧪

Dynamically show and hide elements on your page based on a switch/case eval

Current;

  • Display elements conditionally depending on a switch/case eval expression

  • Work with collections lists

  • Works inside of components

Use Cases

Hide or show elements conditionally.

Show one of several elements, depending on the SWITCH input value.

Usage Notes

Define your dynamic elements

To the elements you want to dynamically show and hide, add these attributes;

wfu-logic-switch = ( value )

Place this on the outer element that contains your elements to be evaluated for conditional display.

The value is typically bound to the value you want to use as the switch.

wfu-logic-switch-case = ( value )

Place this on the descendent elements that you want to conditionally hide / show.

Last updated

Was this helpful?