Seamless, reactive template-based modals for Materialize.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib
tests
.gitignore
.versions
README.md
package.js

README.md

Modalize

Seamless, reactive and template-based modals for Materialize.

Live Demo

This is a radically modified fork of the very useful meteorstuff:materialize-modal package, started by @pfafman. If you don't want (or need) the full Meteoric event maps or fine-tuned modal control this package offers, you should check it out!

This package seeks to provide the following solutions:

  • Simple execution: Just pass template names, and let Materialize handle the rendering!
  • Full extensibility: Write full, detailed Meteoric event maps to fully control your modals behaviour! No messy callbacks.
  • Convenient configuration: Provides easy-to-use modal body & footer helpers that make it easy to implement great-looking full screen and fixed footer style modals.
  • Robust events: Modal templates have access to all the events contained in the modal, including custom events such as dismissed, which is fired when the user exits a modal by clicking away from it.
  • Natural Materialize integration: Modalize is directly accessible from the Materialize object: Materialize.modalize.display(), Materialize.modalize.close(), etc.

Install

meteor add msolters:modalize

Usage

	Materialize.modalize.display( options={} ); // display a modal
	Materialize.modalize.close();	// dismiss current modal

Options

  • template - The template to be rendered as a modal. (Required)
  • title - Modal title. Can have HTML markup. (Optional)
  • dismiss - (bool) false if you want to override the default modal dismissal behaviour. (Optional)
  • fixedFooter - (bool) true if you want to use a fixed footer. Recommended for fullScreen & bottomSheet modals. (Optional)
  • bottomSheet - (bool) If you want a bottom sheet modal. (Optional)
  • fullScreen - (bool) Modal takes up all the full screen. (Optional)

Examples

For examples and interactive previews, check out the demo site!

Notes

This package depends on and automatically includes the materialize:materialize package.

License

MIT