Coder Social home page Coder Social logo

marcodpt / vue-over-body Goto Github PK

View Code? Open in Web Editor NEW
39.0 3.0 9.0 1.39 MB

Create modals, sidebars, notifications, pop ups with css transitions!

Home Page: https://marcodpt.github.io/vue-over-body/

License: MIT License

JavaScript 98.66% HTML 0.72% Vue 0.61%
modal vue vuejs2 sidebar notifications component css-transitions

vue-over-body's Introduction

vue-over-body

Create modals, sidebars, notifications, pop ups with css transitions!

Demo

Live Demo with bulma css framework, but we do not impose any css framework

Install

npm install --save vue-over-body

Usage

  import Vue from 'vue'
  import overBody from 'vue-over-body'

  new Vue({
    components: {
      'vue-over-body': overBody
    },
    data: function () {
      return {
        open: 1
      }
    }
  }).$mount('#app')
  <vue-over-body :dim="false" :open="open" before="before" after="after" :transition="0.3">
    <div>
      <button @click="open = 0">&times;</button>
      <p>A little alert message!</p> 
      <p>For the users of your app!</p> 
    </div>
  </vue-over-body>
  .before {
    top: 50px;
    right: -300px;
    width: 300px;
    background-color:yellow;
    position:absolute;
  }

  .after {
    right: 50px;
  }

Props

  • open
    • type: Number
    • default: 0
    • description: 0 means hide, other number means z-index of the component
  • before
    • type: String
    • default: ""
    • description: css class aplied to slot parent, always active
  • after
    • type: String
    • default: ""
    • description: css class aplied to slot parent, active after the transition
  • transition
    • type: Number
    • default: 0.3
    • description: time of transition in seconds
  • dim
    • type: Boolean
    • default: true
    • description: make the background darker?
  • dialogStyle
    • type: Object
    • default: {}
    • description: style to be applied on dialog container

Contribute

We need help! Our goals are:

  • CSS Transitions
  • Add tests
  • More usage examples and better home page
  • Add support to most browsers

What is outside of the scope of this project:

  • Create any kind of layout like buttons, headers, pre build alerts!

vue-over-body's People

Contributors

marcodpt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.