Giter Club home page Giter Club logo

bulma-modal-fx's Introduction

Bulma Modal FX

A set of modal window effects with CSS transitions and animations for Bulma. Very inspired by this Codrops resource/article https://github.com/codrops/ModalWindowEffects

Demo: https://postare.github.io/bulma-modal-fx Bulma docs: https://bulma.io/documentation

Effects

class modal-fx- + effect example: modal-fx-newsPaper

  • normal
  • fadeInScale
  • slideRight
  • slideLeft
  • slideTop
  • slideBottom
  • fall
  • slideFall
  • newsPaper
  • 3dFlipVertical
  • 3dFlipHorizontal
  • 3dSign
  • 3dSignDown
  • superScaled
  • 3dSlit
  • 3dRotateFromBottom
  • 3dRotateFromLeft

Examples

https://postare.github.io/bulma-modal-fx/

INSTALL

npm i bulma-modal-fx

or simply download latest release: https://github.com/postare/bulma-modal-fx/releases/

GETTING STARTED

Include the plugin css file:

<link  rel="stylesheet" href="dist/css/modal-fx.min.css" />

(optional) Include the plugin just before body closing tag:

<script type="text/javascript" src="dist/js/modal-fx.min.js"></script>

Or use a CDN

<link  rel="stylesheet" href="https://unpkg.com/bulma-modal-fx/dist/css/modal-fx.min.css" />
<script type="text/javascript" src="https://unpkg.com/bulma-modal-fx/dist/js/modal-fx.min.js"></script>

HTML MARKUP

<!-- trigger button -->
<span class="button modal-button" data-target="modal-id">Open modal</span> 

<!-- related modal with fx class "modal-fx-fadeInScale" --> 
<div id="modal-id" class="modal modal-fx-fadeInScale">  
	<div class="modal-background"></div>  
	<div class="modal-content">  
	<!-- Any other Bulma elements you want -->  
	</div>  
	<button class="modal-close is-large" aria-label="close"></button>  
</div> 

<!-- To activate the modal, just add the is-active modifier on the .modal container -->
<div id="modal-id" class="modal modal-fx-fadeInScale is-active"></div>[...]

Bulma documentation on modal

MODIFIERS

Class modifiers for .modal:

  • .modal-pos-top: modal positioned on top
  • .modal-pos-bottom: modal positioned on bottom

Class modifiers for .modal-content:

  • .is-huge: 100% width modal
  • .is-tiny: 400px width modal
  • .is-image: if the content is an image

SASS VARIABLES

// Modal minimal setup
$transition-duration: .3s;
$transition-duration-newsPaper: .7s;
$transition-duration-3dslit: .5s;
$modal-perspective: 1300px;
$modal-bg-color: rgba($black,.86);

bulma-modal-fx's People

Contributors

andrewbird2 avatar diomed avatar inerba avatar

Watchers

 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.