1.0.0 • Published 1 year ago

sveltejs-show v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

SvelteJS-Show

SvelteJS-Show is the equivalent of v-show in VueJS will hide the element without adding any div block or destroying the component.

Installation

npm install sveltejs-show

Usage

<script>
  import show from 'sveltejs-show'
  let isShow = false
</script>

<button on:click={()=>{isShow=!isShow}}>{isShow}</button>
<h1 use:show={isShow}>Hello world!</h1>