yesod-alerts: Alert messages for the Yesod framework

[ bsd3, library, web ] [ Propose Tags ]

Use the "alerts" package with the Yesod framework

[Skip to Readme]


Maintainer's Corner

For package maintainers and hackage trustees


Versions [RSS],,,
Dependencies alerts (>= && <, base (>=4.7 && <5), blaze-html, blaze-markup, safe (>=0.3.14 && <0.4), text (>=0.11 && <2.0), yesod-core (>=1.4.32) [details]
License BSD-3-Clause
Copyright 2017 Daniel Campoverde
Author Daniel Campoverde
Category Web
Home page
Source repo head: git clone
Uploaded by alx741 at 2019-06-28T18:17:30Z
Distributions LTSHaskell:, NixOS:
Downloads 2222 total (13 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2019-06-28 [all 1 reports]

Readme for yesod-alerts-

[back to package description]


Alert messages for the Yesod framework


Modify your definition of defaultLayout in Foundation.hs:

defaultLayout widget = do
    alerts  <- getAlerts

Then Include a renderer in default-layout.hamlet

#{renderAlertsBootstrap3 alerts}


Set alerts from your handlers

getHomeR :: Handler Html
getHomeR = do
    setAlert (Alert Error "oops")
    setSuccessAlert "Yay!"
    defautlLayout $ do
        $(widgetFile "homepage")


  • Bootstrap v3
  • Bootstrap v4
  • Foundation v5