svelte-transitions-fade
v1.0.0
Published
Fade transition plugin for Svelte
Downloads
1,158
Maintainers
Readme
svelte-transitions-fade
Fade transition plugin for Svelte.
Usage
Recommended usage is via svelte-transitions, but you can use this module directly if you prefer. Note that it assumes an ES module or CommonJS environment.
Install with npm or yarn:
npm install --save svelte-transitions-fade
Then add the plugin to your Svelte component's exported definition:
<label>
<input type='checkbox' bind:checked='visible'> visible
</label>
{{#if visible}}
<div transition:fade>hello!</div>
{{/if}}
<script>
import fade from 'svelte-transitions-fade';
export default {
transitions: { fade }
};
</script>