All Projects → silvio-r → Spop

silvio-r / Spop

Licence: mit
A lightweight small pop up widget with no dependencies, create notifications easily with this javascript plugin.

Labels

Projects that are alternatives of or similar to Spop

Jalert
jQuery alert/modal/lightbox plugin
Stars: ✭ 73 (-41.13%)
Mutual labels:  popup
Xam.plugin.simplebottomdrawer
Just a nice and simple BottomDrawer for your Xamarin Forms project
Stars: ✭ 92 (-25.81%)
Mutual labels:  popup
Zhpopupcontroller
Help you pop up custom views easily. and support pop-up animation, layout position, mask effect and gesture interaction etc.
Stars: ✭ 1,481 (+1094.35%)
Mutual labels:  popup
React Poppop
A mobile support and multi-directional modal for ReactJS
Stars: ✭ 78 (-37.1%)
Mutual labels:  popup
Tingle
⚡ 2kB vanilla modal plugin, no dependencies and easy-to-use
Stars: ✭ 1,287 (+937.9%)
Mutual labels:  popup
Vueup
Simple, lightweight and super fast global notification popup for Vue.js
Stars: ✭ 104 (-16.13%)
Mutual labels:  popup
Electron Tray Window
🖼️ Generates custom tray windows with Electron.js
Stars: ✭ 71 (-42.74%)
Mutual labels:  popup
Jxpopupview
一个轻量级的自定义视图弹出框架
Stars: ✭ 117 (-5.65%)
Mutual labels:  popup
Mbpopup
macOS status bar popups done right 😎
Stars: ✭ 89 (-28.23%)
Mutual labels:  popup
React Native Push Notification Popup
A <NotificationPopup/> component for presenting your own push notification in react-native app
Stars: ✭ 111 (-10.48%)
Mutual labels:  popup
Alertjs
Dialog Builder allows you to create fully customisable dialogs and popups in Dynamics 365.
Stars: ✭ 80 (-35.48%)
Mutual labels:  popup
Tcpickerview
Picker view popup with multiply rows selection written in Swift
Stars: ✭ 84 (-32.26%)
Mutual labels:  popup
Cascade
Nested popup menus with smooth height animations
Stars: ✭ 1,493 (+1104.03%)
Mutual labels:  popup
Tippyjs
Tooltip, popover, dropdown, and menu library
Stars: ✭ 9,433 (+7507.26%)
Mutual labels:  popup
Hwpopcontroller
pop up your ViewController with custom size, position and animations
Stars: ✭ 113 (-8.87%)
Mutual labels:  popup
Fwpopupviewoc
信手拈来的OC弹窗库:1、继承 FWPopupBaseView 即可轻松实现各种位置、动画类型的弹窗;2、新功能引导弹窗。更多弹窗场景等你来挑战,总之,想怎么弹就怎么弹!!!
Stars: ✭ 70 (-43.55%)
Mutual labels:  popup
Customalertviewdialogue
Custom AlertView Dialogue is the world's most advanced alert view library. Custom AlertView Dialogue includes simple message popups, confirmation alerts, selector popups, action sheet bottom menus, and input/feedback contact forms.
Stars: ✭ 100 (-19.35%)
Mutual labels:  popup
Zoid
Cross domain components
Stars: ✭ 1,672 (+1248.39%)
Mutual labels:  popup
Angular Chrome Extension
angular chrome extension scaffold
Stars: ✭ 113 (-8.87%)
Mutual labels:  popup
Panels
Panels is a framework to easily add sliding panels to your application
Stars: ✭ 1,457 (+1075%)
Mutual labels:  popup

SmallPop

A lightweight small pop up widget with no dependencies, create notifications easily with this javascript plugin.
Playground in Codepen.

Basic

Include spop.js and spop.css in your page.

<link href="spop.css" rel="stylesheet">
<!-- Even better, SamallPop is made with scss, @import to your style.scss -->
<script src="spop.js"></script>

and call it:

spop('Default SmallPop');

spop('<h4 class="spop-title">Success</h4>I´m a success SmallPop', 'success');

spop('<strong>Warning pop</strong>', 'warning');

spop('<strong>Error Here!</strong>', 'error');

Position

SmallPox has six differents positions: top-left, top-center, top-right, bottom-left, bottom-center and bottom-right

// top left example
spop({
	template: 'Position top left',
	position  : 'top-left',
	style: 'success'
});

In mobile (max-width:30em), all go down.

Autoclose

Autoclose, to... close... automatically...

spop({
	template: '3 seconds autoclose',
	autoclose: 3000
});

Groups

There can only be one SmallPop visible from each group.

spop({
	template: 'All fields are required!',
	group: 'submit-satus',
	style: 'error'
});

spop({
	template: 'Your information has been submitted',
	group: 'submit-satus',
	style: 'success'
	autoclose: 2000
});

Callbacks

Do what you need onOpen and onClose

spop({
	template: 'Please, close me.',
	onOpen: function () {
		document.body.style.background = "#fff";
	},
	onClose: function() {
		document.body.style.background = "";
		spop({
			template: 'Thank you!',
			style: 'success',
			autoclose: 2000
		});
	}
});

Event

In your template you can call the close event, just add data-spop="close".

spop('Got to <a  data-spop="close">defaults</a>');

Options

spop({
	template  : null,// string required. Without it nothing happens!
	style     : 'info',// success, warning or error
	autoclose : false,// miliseconds
	position  : 'top-right',// top-left top-center bottom-left bottom-center bottom-right
	icon      : true,// or false
	group     : false,// string, add a id reference
	onOpen    : function() { },
	onClose   : function() { }
});

Browser support

Chrome, Firefox, IE 11-10-9 (9 no animations), Android Browser, Chrome for Android, Safari, iOS Safari

License

MIT License


Created by Sílvio Rosa • Follow me on twitter for updates.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].