Flash message

Displays a floating flash message on the screen.

Display onload

<p data-control="flash-message" data-interval="5" class="success">
    This message is created from a static element. It will go away in 5 seconds.

This message is created from a static element. It will go away in 5 seconds.


    <a href="#" class="btn btn-primary" onclick="$.wn.flashMsg({text: 'The record has been successfully saved. This message will go away in 1 second.', 'class': 'success', 'interval': 1}); return false;">
        Show Success

    <a href="javascript:;" class="btn btn-danger" onclick="$.wn.flashMsg({text: 'Babam!', 'class': 'error'}); return false;">
        Show Error

    <a href="javascript:;" class="btn btn-warning" onclick="$.wn.flashMsg({text: 'Warning! Winter is too good for this world!', 'class': 'warning'}); return false;">
        Show Warning

Display static

A flash message can be rendered as a static element by attaching the static class. The data-control attribute is not needed.

<p class="flash-message static success">
    Import completed successfully (success)

<p class="flash-message static info">
    Informative info box is informational (info)

<p class="flash-message static warning">
    Phasers have been set to stun (warning)

<p class="flash-message static error">
    We couldn't help you with that (error)

Data attributes

  • data-control="flash-message" - enables the flash message plugin
  • data-interval="2" - the interval to display the message in seconds, optional. Default: 2

JavaScript API

    'text': 'Record saved.',
    'class': 'success',
    'interval': 3

Keep informed

Sign up to our newsletter to receive updates on Winter CMS releases, new features in the works, and much more.
We'll never spam or give this address away.

Latest blog post

The Winter CMS Web Installer is now available!

Published June 17, 2021
We are super excited to announce that our new Web-based Installer is finally available for download, to make it super easy to get your next Winter CMS project started!

View this post Read all posts

Latest Winter CMS release


Released April 26, 2021
3 UX/UI Improvements, 19 API Changes, 23 Bug Fixes, 3 Security Improvements, 4 Translation Improvements, 1 Community Improvement, 2 Dependencies

View details View all releases