sveltejs/svelte-transitions-fade

Name: svelte-transitions-fade

Owner: Svelte

Description: Fade transition plugin for Svelte

Created: 2017-05-07 03:18:15.0

Updated: 2018-05-06 21:44:49.0

Pushed: 2018-05-06 21:44:48.0

Homepage: null

Size: 4

Language: JavaScript

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

svelte-transitions-fade

Fade transition plugin for Svelte. Demo

fade-hello

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:

install --save svelte-transitions-fade

Then add the plugin to your Svelte component's exported definition:

el>
nput type='checkbox' bind:checked='visible'> visible
bel>

 visible}
-- use `in`, `out`, or `transition` (bidirectional) -->
iv transition:fade>hello!</div>
}

ipt>
port fade from 'svelte-transitions-fade';

port default {
transitions: { fade }

ript>
Parameters

You can specify delay and duration parameters, which default to 0 and 400 respectively:

 in:fade='{delay: 250, duration: 1000}'>
des in slowly after a short delay
v>
License

MIT


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.