@zeix/ui-element
Version:
UIElement - a HTML-first library for reactive Web Components
43 lines (22 loc) • 915 B
Markdown
[**/ui-element**](../README.md)
***
[/ui-element](../globals.md) / show
# Function: show()
> **show**\<`P`, `E`\>(`reactive`): [`Effect`](../type-aliases/Effect.md)\<`P`, `E`\>
Defined in: [src/lib/effects.ts:426](https://github.com/zeixcom/ui-element/blob/297c0e8e040b3880ad85a2bc873523a8086f09a3/src/lib/effects.ts#L426)
Effect for controlling element visibility by setting the 'hidden' property.
When the reactive value is true, the element is shown; when false, it's hidden.
## Type Parameters
### P
`P` *extends* [`ComponentProps`](../type-aliases/ComponentProps.md)
### E
`E` *extends* `HTMLElement` = `HTMLElement`
## Parameters
### reactive
[`Reactive`](../type-aliases/Reactive.md)\<`boolean`, `P`, `E`\>
Reactive value bound to the visibility state
## Returns
[`Effect`](../type-aliases/Effect.md)\<`P`, `E`\>
Effect function that controls element visibility
## Since
0.13.1