# @i-is-as-i-does/vue-3-slide-fade

> Added optional fade in / fade out support to Craig Riley's vue3-slide-up-down

Latest version **1.0.0** (published 2022-01-17) · MIT license · 0 weekly downloads

## Install

```sh
npm install @i-is-as-i-does/vue-3-slide-fade
pnpm add @i-is-as-i-does/vue-3-slide-fade
yarn add @i-is-as-i-does/vue-3-slide-fade
bun add @i-is-as-i-does/vue-3-slide-fade
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2022-01-17 |
| First published | 2022-01-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 9.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | i-is-as-i-does |
| Maintainers | i-is-as-i-does |
| Keywords | vue, transition, slideup, slidedown, fadein, fadeout, easein, easeout |

## Links

- npm: https://www.npmjs.com/package/@i-is-as-i-does/vue-3-slide-fade
- Repository: https://github.com/I-is-as-I-does/Vue-3-slide-fade
- Homepage: https://github.com/I-is-as-I-does/Vue-3-slide-fade#readme
- Issues: https://github.com/I-is-as-I-does/Vue-3-slide-fade/issues
- npm.io page: https://npm.io/package/@i-is-as-i-does/vue-3-slide-fade

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 1.0.0 (latest) — 2022-01-17

## README

# Vue 3 Slide Fade

Quick and dirty fork of Craig Riley's [`vue3-slide-up-down`](https://github.com/craigrileyuk/vue3-slide-up-down.git)  
Added optional fade in / fade out support

Regarding transitions, you might also take a look at ['Vâlvă'](https://github.com/I-is-as-I-does/Valva)  
You'll find a Vue 3 component in ['src/vue'](https://github.com/I-is-as-I-does/Valva/tree/main/src/vue)

## Usage

The component takes 8 props:  

| name           | type    | required | description                                        | default       |
| -------------- | ------- | -------- | -------------------------------------------------- | ------------- |
| v-model*       | boolean | yes      | Whether to show the component or not               | N/A           |
| fade           | boolean | no       | Animate opacity or not                             | false         |
| duration       | number  | no       | How long the animation will be in ms               | 400           |
| slideTiming    | string  | no       | CSS transition-timing-function applied to height   | "ease-in-out" |
| fadeTiming     | string  | no       | CSS transition-timing-function applied to opacity  | "ease-in-out" |
| tag            | string  | no       | The HTML tag to use for the wrapper element        | "div"         |
| responsive     | boolean | no       | Animate height when contents are changed           | false         |


* or `modelValue` if a method is required

```html
<div class="MyContent">
  <h1>Always show this</h1>
  <ul>
<li v-for="(item, index) in list" :key="index">
  <slide-fade :modelValue="isActive(index)" :fade="true">
    Only show this if "isActive(index)" returns true
  </slide-fade>
<li>
  </ul>
</div>
```

The component emits five Vue events:

- `open-start`
- `open-end`
- `close-start`
- `close-end`
- `layout-shift`

```html
<slide-fade @close-end="() => console.log('done closing!')" />
```

---
_Source: https://npm.io/package/@i-is-as-i-does/vue-3-slide-fade · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
