Skip to content

Show and Hide

Show and Hide are components that make a decision on whether to display it's child based on a condition. Show is used to display it's child when a condition is true. Hide does the opposite. It hides when a condition is true.

<Show when={isPublished} >
"Content"
</Show>

These are the acceptable props.

namedescription
whenIf this prop is true the child will be rendered.
childrenAn HTML Element or string to be rendered
namedescription
cloakA prop that is used to set the element that is not meant to be shown to display:none instead of it not being rendered.
<Hide when={!isPublished} >
"Content"
</Hide>
namedescription
whenIf this prop is true the child won't be rendered.
childrenAn HTML Element or string to be rendered
namedescription
cloakA prop that is used to set the element that is not meant to be shown to display:none instead of it not being rendered.