1.0.0 • Published 1 year ago
sveltejs-show v1.0.0
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>
1.0.0
1 year ago