Switch

A form of conditional visibility that allows for contextual variations delivered, ideally at SSR.

  • Browser variations

  • Country code variations

  • Device variations

    • e.g. Screen width

  • Current datetime rules

Implementation

  • Switch wrapper component

  • Case slotted components

  • Case slots whatever content you want

Case Rules

Ordering matters.

Hit and accept the first match. The last case should be default as fallback, if you want one, no rules on that one.

Described as;

  • Bindable props

  • A rule string to access them?

Last updated