v0.20.230 - 8.8 / 6

<Switch .../>

Renders the first <Match/> child whose when is truthy. If none match, renders fallback — or, if no explicit fallback prop is set, a nested <Match/> with no when acts as the default branch.

If the child of the matching <Match/> is a function, it receives a signal carrying the current when value — the same callback pattern as Show.

# Switch Attributes

nametypedescription
fallbackanywhen all the conditions of the Match are falsy, render fallback

# Match Attributes

nametypedescription
whenanyonce when becomes truthy, it will show its children

# Snippet

# Switch/Match testing