A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/danieldiekmeier/vue-slide-up-down below:

danieldiekmeier/vue-slide-up-down: Like jQuery's slideUp/slideDown/slideToggle, but for Vue!

Like jQuery's slideUp / slideDown / slideToggle, but for Vue!

Demo: https://codepen.io/danieldiekmeier/pen/YapGWq

import { createApp } from 'vue'
import SlideUpDown from 'vue-slide-up-down'

const app = createApp({ ... })
app.component('slide-up-down', SlideUpDown)

Note

Version 3 of this package is only compatible with Vue 3. If you're still on Vue 2, install the previous version with npm i vue-slide-up-down@2

<div class="MyContent">
  <h1>Always show this</h1>

  <slide-up-down :active="active" :duration="1000">
    Only show this if "active” is true
  </slide-up-down>
</div>

The component takes four props:

The component emits four events:

<slide-up-down @close-end="console.log('done closing!')" />
Custom transition-timing-function

If you want to use a different timing function, add some CSS for your <slide-up-down> element. (See demo/index.html for a full example.)

<style>
  .wobbly-accordion {
    transition-timing-function: cubic-bezier(0.195, 1.65, 0.435, -0.6);
  }
</style>

<slide-up-down class="wobbly-accordion">
  Lorem ipsum dolor sit amet, consectetur adipisicing elit. Soluta omnis velit
  ab culpa, officia, unde nesciunt temporibus cum reiciendis distinctio.
</slide-up-down>

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4