# Switch ❺🧪

Current;

* Display elements conditionally depending on a switch/case eval expression
* Work with collections lists&#x20;
* Works inside of components &#x20;

{% hint style="danger" %}
This feature is not yet available to the public.&#x20;
{% endhint %}

## Use Cases

Hide or show elements conditionally.

Show one of several elements, depending on the SWITCH input value.&#x20;

{% hint style="success" %}
This supports CMS-driven use cases also. Both the switch input for evaluation, and the case values themselves, can be stored in the CMS and attribute-bound.&#x20;
{% endhint %}

## 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.&#x20;

#### `wfu-logic-switch-case` = ( value )

Place this on the descendent elements that you want to conditionally hide / show.&#x20;


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://attr.sygnal.com/sa5-logic/switch.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
