H1 RailsH1 Rails
H1 Rails
Base Styles
Better Select
Demos
Code
H1 Rails
Base Styles
Better Select
Demos
Code
  • Intro

    • About H1 Rails
    • Libraries
    • Setup
    • Structure
  • Elements

    • Icons
    • Toasts
    • Modals
    • Dropdowns
    • Native HTML Date Picker

Toasts

Diet Rails uses Rails` Flash message functionality to send toasts from the backend to the frontend.

flash.now[:toasts] = [
  { title: 'Post Created', message: 'Your post has been successfully created.', style: "success" }
]

Info

  • Toast styling comes from base-styles.
  • The html responsible for toasts lives in /views/shared/_partial_containers.html.erb and /views/shared/_toast.html.erb.
Last Updated:
Contributors: Tony Ennis
Prev
Icons
Next
Modals

On This Page

  • Info