Hinode logo
  • About 
  • Docs 
  • Components 
  • Guides 
  • Releases 
  •  
  •    Toggle theme
    •   Light
    •   Dark
    •   Auto
  •  
    •   Light
    •   Dark
    •   Auto
Docs
    • Introduction
    • Commands
    • Hosting and deployment
    • Upgrading
    • Contribute
    • Troubleshooting
    • Content management
    • Content organization
    • Typography
    • Links and cross-references
    • Images and figures
    • Tables
    • Icons
    • Layout
    • Colors
    • Color modes
    • Fonts
    • Languages
    • Navigation
    • Documentation
    • Analytics
    • Modules
    • Abbr
    • Accordion
    • Alert
    • Animation
    • Badge
    • Breadcrumb
    • Button
    • Button group
    • Card
    • Card group
    • Carousel
    • Collapse
    • Command prompt
    • Docs
    • Example
    • File
    • Icon
    • Image
    • Kbd
    • Link
    • Map
    • Mark
    • Navbar
    • Navs and tabs
    • Release
    • Spinner
    • Spinner
    • Sub
    • Sup
    • Timeline
    • Toast
    • Tooltip
    • Overview
    • Styles
    • Scripts
    • Icons
    • Module development
    • Server headers
    • Server-side redirection
    • Credits
    • License
    • Introduction
    • Commands
    • Hosting and deployment
    • Upgrading
    • Contribute
    • Troubleshooting
    • Content management
    • Content organization
    • Typography
    • Links and cross-references
    • Images and figures
    • Tables
    • Icons
    • Layout
    • Colors
    • Color modes
    • Fonts
    • Languages
    • Navigation
    • Documentation
    • Analytics
    • Modules
    • Abbr
    • Accordion
    • Alert
    • Animation
    • Badge
    • Breadcrumb
    • Button
    • Button group
    • Card
    • Card group
    • Carousel
    • Collapse
    • Command prompt
    • Docs
    • Example
    • File
    • Icon
    • Image
    • Kbd
    • Link
    • Map
    • Mark
    • Navbar
    • Navs and tabs
    • Release
    • Spinner
    • Spinner
    • Sub
    • Sup
    • Timeline
    • Toast
    • Tooltip
    • Overview
    • Styles
    • Scripts
    • Icons
    • Module development
    • Server headers
    • Server-side redirection
    • Credits
    • License

Toast

Share via
Hinode
Link copied to clipboard

Use the toast shortcode to display a dismissable message in the bottom-right corner of the screen.

On this page
 

  • Overview
  • Arguments
  • Configuration

Overview  

New in v0.14.3 - To support multiple toast messages on the same page, each toast message is now explicitly linked to a button using the parameter id. Hinode wraps the individual toast messages in a container to stack them automatically.

Use the toast shortcode to display a dismissable message in the bottom-right corner of the screen. Give the toast a unique id and assign this value to the toast argument of a button. As an example, the following shortcode displays two buttons that, when clicked, trigger a toast message. The messages are stacked when both buttons are clicked in a short timeframe.

Show toast 1
 
Show toast 2
 
First title
This is the first toast message.
Second title
This is the second toast message.
markdown
{{< button toast="toast-example-1" >}}
    Show toast 1
{{< /button >}}

{{< button toast="toast-example-2" >}}
    Show toast 2
{{< /button >}}

{{< toast id="toast-example-1" header="First title" >}}
    This is the first toast message.
{{< /toast >}}

{{< toast id="toast-example-2" header="Second title" >}}
    This is the second toast message.
{{< /toast >}}

Arguments  

The shortcode supports the following arguments:

ArgumentRequiredDescription
idNoOptional id of the toast message, defaults to toast-message-n with sequence n.
headerNoOptional header of the toast message. Uses the site title by default.
classNoOptional class attribute of the toast element.

Configuration  

See the message section of the layout configuration to modify the placement of the toast messages.

Last updated: September 2, 2023 • Convert to markdown only (19ba9d2)
On this page
  • Overview
  • Arguments
  • Configuration
Toast
Toast
Hinode is a clean documentation and blog theme for your Hugo site based on Bootstrap 5.
Code licensed MIT, docs CC BY-NC 4.0
Currently v0.21.8
 
Links
Home 
About 
Docs 
Components 
Releases 
Guides
Getting started 
Developing modules 
Optimization 
Versioning 
Community
Issues  
Discussions  
Contribute 
Hinode
Code copied to clipboard