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
    • Args
    • 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
    • Persona
    • Release
    • Spinner
    • Sub
    • Sup
    • Timeline
    • Toast
    • Tooltip
    • YouTube
    • Overview
    • Styles
    • Scripts
    • Icons
    • Partial development
    • 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
    • Args
    • 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
    • Persona
    • Release
    • Spinner
    • Sub
    • Sup
    • Timeline
    • Toast
    • Tooltip
    • YouTube
    • Overview
    • Styles
    • Scripts
    • Icons
    • Partial development
    • Module development
    • Server headers
    • Server-side redirection
    • Credits
    • License

Alert

Share via
Hinode
Link copied to clipboard

Use the alert shortcode to display a contextual feedback message.

On this page
 

  • Overview
  • Arguments
  • Examples
    • Colored alert
    • Dismissible alert
    • Alert with icon
    • Alert of specific type

Overview  

Use the alert shortcode to display a contextual feedback message. The inner content is used as alert text.

A simple danger alert—check it out!
markdown
{{< alert color="danger" >}}
    A simple danger alert—check it out!
{{< /alert >}}

Arguments  

The shortcode supports the following arguments:

Name Type Required Default Comment
class string Class attribute of the alert element.
color select danger Theme color of the alert. Supported values: [primary, secondary, success, danger, warning, info, light, dark, white, black].
dismissible bool false Flag to indicate the alert is dismissible.
icon string Font Awesome icon to include.
type select Type of the alert, generates an alert with related color and icon. Supported values: [danger, info].

Examples  

Change the style of your accordion with arguments.

Colored alert  

As an example, the following shortcodes displays a simple alert for each theme color.

A simple primary alert—check it out!
A simple secondary alert—check it out!
A simple success alert—check it out!
A simple danger alert—check it out!
A simple warning alert-check it out!
A simple info alert—check it out!
A simple light alert—check it out!
A simple dark alert—check it out!
markdown
{{< alert color="primary" >}}
    A simple primary alert—check it out!
{{< /alert >}}

{{< alert color="secondary" >}}
    A simple secondary alert—check it out!
{{< /alert >}}

{{< alert color="success" >}}
    A simple success alert—check it out!
{{< /alert >}}

{{< alert color="danger" >}}
    A simple danger alert—check it out!
{{< /alert >}}

{{< alert color="warning" >}}
    A simple warning alert-check it out!
{{< /alert >}}

{{< alert color="info" >}}
    A simple info alert—check it out!
{{< /alert >}}

{{< alert color="light" >}}
    A simple light alert—check it out!
{{< /alert >}}

{{< alert color="dark" >}}
    A simple dark alert—check it out!
{{< /alert >}}

Dismissible alert  

As an example, the following shortcode displays a dismissible alert.

A dismissible alert—check it out!
markdown
{{< alert color="danger" dismissible="true" >}}
    A dismissible alert—check it out!
{{< /alert >}}

Alert with icon  

As an example, the following shortcode displays an alert with an icon. The icon is resized to size 2x and pulled to the left by default.

 
An illustrated alert—check it out!
markdown
{{< alert color="danger" icon="fas triangle-exclamation" >}}
    An illustrated alert—check it out!
{{< /alert >}}

Alert of specific type  

As an example, the following shortcode displays an informative alert with an icon.

 
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
markdown
{{< alert type="info" >}}
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt
ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation
ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in
reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur
sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id
est laborum.
{{< /alert >}}

As an example, the following shortcode displays a warning with an icon.

 
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
markdown
{{< alert type="danger" >}}
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt
ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation
ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in
reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur
sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id
est laborum.
{{< /alert >}}
Last updated: December 29, 2023 • Move arguments to data structure (b5bcd4c)
On this page
  • Overview
  • Arguments
  • Examples
    • Colored alert
    • Dismissible alert
    • Alert with icon
    • Alert of specific type
Alert
Alert
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.22.0-beta8
 
Links
Home 
About 
Docs 
Components 
Releases 
Guides
Getting started 
Developing modules 
Optimization 
Versioning 
Community
Issues   
Discussions   
Contribute 
Hinode
Code copied to clipboard