Show
Mount content while a condition is truthy. Use it for expanded details, signed-in content and optional panels.
Toggle a details panel
import { Button, Show, Text, VStack, signal } from 'kuito';
export default function Details() {
const open = signal(false);
return (
<VStack padding={16} gap={8}>
<Button onPress={() => (open.value = !open.value)}>Details</Button>
<Show when={open.value}>
<Text>Recorded live in 2019.</Text>
</Show>
</VStack>
);
}Behavior
fallback displays when the condition is false. A callback child receives the truthy value. Changing branches disposes the previous branch, including its state and lifecycle work.
Continue
Read Control flow for a complete workflow. See the complete prop reference for types and documented defaults.
Reference
Signatures
<T>(props: ShowProps<T>): KuitoElementType parameters
| Name | Constraint | Default |
|---|---|---|
T | — | — |
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
props | ShowProps<T> | Yes | — |
Returns
Props: ShowProps<T>
Props (including inherited props) 4
| Name | Type | Required | Description |
|---|---|---|---|
when | When<T> | Yes | — |
fallback | KuitoNode | No | — |
children | BranchChildren<T> | No | — |
key | string | number | No | — |
Generated from the public TypeScript declarations: signatures, props and defaults come from the checked source, descriptions from its JSDoc. No defaults are invented.