svelte-show-action

Svelte `svelte-show-action` is the equivalent of `v-show` in `vuejs`, or `ng-show` in `angularjs`. `svelte-show-action` will hide the element without adding any div block or destroying the component. ## Usage


Keywords
svelte, svelte show, svelte-show, svelte show action, svelte-show-action, svelte hide
License
MIT
Install
npm install svelte-show-action@0.0.4

Documentation

svelte-show-action

Svelte svelte-show-action is the equivalent of v-show in vuejs, or ng-show in angularjs. svelte-show-action will hide the element without adding any div block or destroying the component.

Usage

<script>
  import show from "svelte-show-action";
  let display = true;
  $: text = display ? 'Hide' : 'Show';
</script>
<button on:click={() => (display = !display)}>
	{text}
</button>
<div use:show={display}>
	Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut
	labore et dolore magna aliqua.
</div>