Skip to content
Go to file

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

Toast for Framework7

A plugin for Framwork7 to show little black toasts iOS-style

F7 Compatibility

  • V1: Yes
  • V2: No (Toast already included in F7 v2 core components)


Confirmbox screenshot


Live demo

How to use

1. Add the script to your project (after Framework7 script!) and also add CSS reference:

<link rel="stylesheet" href="toast.css">
<script src="toast.js"></script>

2. Create a new toast

You can create a new toast with a icon:

var app = new Framework7();
var options = {};
var toast = app.toast('Marked star', '<div>☆</div>', options);

As first parameter you set the message which gets displayed at the bottom of the toast. As 2nd parameter you have to set the icon. You can use free HTML here so set what ever you want (ASCii, Font-Icon, Images, SVG...). Third is reserved for options.

If you just want to show a message, let 2nd parameter empty:

var app = new Framework7();
var options = {};
var toast = app.toast('A long long message', '', options);

3. Now you can show or hide the box:

// show;

// hide

Note: In older versions of this plugin these methods were and but these were replaced by and toast.hide() which is a little more convenient. You might have to change this in your code though if you upgrade from an older version.

You can also change what message is displayed after initialization:"message");

4. Options & Callbacks

You can set the following options:

var app = new Framework7();
var options = {
  // Callback gets called when toast is hidden
  onHide: function () {
  duration: 2000 // Hide toast after 2 seconds
var toast = app.toast('Marked star', '<div>☆</div>', options);

You're done :D

Made with <3 by


MIT - Do what ever you want ;-)

You can’t perform that action at this time.