A simple modal UI component.
$ component install segmentio/modal
var modal = require('modal');
modal(el).show();
To use it, pass in the el
you want to "modal-ize".
<div class="Modal">
{ Your element gets injected here. }
</div>
A segmentio/overlay
element (with an .Overlay
class) is used to create the mask above the screen, so if you've already themed it you've got no more work to do.
Create a new Modal
instance with the given el
.
Show the modal, emitting show
, optionally calling fn
.
Hide the modal, emitting hide
, optionally calling fn
.
Make the modal closeable.
Shows an overlay with the modal.
See the effect name. Comes bundled with toggle
, slide-in-bottom
, sticky-up
and fade-and-scale
.
Add a class name
to the .Modal
Remove a class name
from the .Modal
.
MIT