Warning Text
About
What does it do?
- Help users identify and understand warning content on the page, even if they do not read the whole page.
When to use it?
Use the warning for information that:
- is time critical - addresses a common or significant misconception of mistake - has legal consequences of an action, or lack of action, that the user might takeWhen not to use it?
- If the information is not important
- If the information has no consequence
How it works
- Use the icon that represents the severity of the warning
Warning Text with exclamation mark icon - triangle
Lorem ipsum dolar sit...
HTML markup
<div class="wmnds-warning-text ">
<svg class="wmnds-warning-text__icon">
<use xlink:href="#wmnds-general-warning-triangle" href="#wmnds-general-warning-triangle"></use>
</svg>
Lorem <a href='#' title='lorem' target='_blank'>ipsum</a> dolar sit...
</div>
Nunjucks markup
{% from "wmnds/components/warning-text/_warning-text.njk" import wmndsWarningText %}
{{
wmndsWarningText({
contentText: null,
contentHTML: "Lorem <a href='#' title='lorem' target='_blank'>ipsum</a> dolar sit...",
classes: null,
icon: null
})
}}
Nunjucks properties
Name | Type | Description |
---|---|---|
contentText | string | Required. Specifies the content that will be part of the warning text component. If contentHTML is supplied, this is ignored. |
contentHTML | string | Required. Uses HTML to specifies what content will be part of warning text component. |
classes | string | Specifies what class modifiers to apply to warning text component. |
icon | string | Name of the icon, which will be used to import icon and place it on the left side of the warning text, before text. By default it uses the general-warning-triangle icon. Icon names can be found on the icons page. |
Warning text with exclamation mark icon - round
Lorem ipsum dolar sit...
HTML markup
<div class="wmnds-warning-text ">
<svg class="wmnds-warning-text__icon">
<use xlink:href="#wmnds-general-warning-circle" href="#wmnds-general-warning-circle"></use>
</svg>
Lorem ipsum dolar sit...
</div>
Nunjucks markup
{% from "wmnds/components/warning-text/_warning-text.njk" import wmndsWarningText %}
{{
wmndsWarningText({
contentText: null,
contentHTML: "Lorem <a href='#' title='lorem' target='_blank'>ipsum</a> dolar sit...",
classes: null,
icon: null
})
}}
Nunjucks properties
Name | Type | Description |
---|---|---|
contentText | string | Required. Specifies the content that will be part of the warning text component. If contentHTML is supplied, this is ignored. |
contentHTML | string | Required. Uses HTML to specifies what content will be part of warning text component. |
classes | string | Specifies what class modifiers to apply to warning text component. |
icon | string | Name of the icon, which will be used to import icon and place it on the left side of the warning text, before text. By default it uses the general-warning-triangle icon. Icon names can be found on the icons page. |
Warning text with info icon - round
Lorem ipsum dolar sit...
HTML markup
<div class="wmnds-warning-text ">
<svg class="wmnds-warning-text__icon">
<use xlink:href="#wmnds-general-info" href="#wmnds-general-info"></use>
</svg>
Lorem ipsum dolar sit...
</div>
Nunjucks markup
{% from "wmnds/components/warning-text/_warning-text.njk" import wmndsWarningText %}
{{
wmndsWarningText({
contentText: null,
contentHTML: "Lorem <a href='#' title='lorem' target='_blank'>ipsum</a> dolar sit...",
classes: null,
icon: null
})
}}
Nunjucks properties
Name | Type | Description |
---|---|---|
contentText | string | Required. Specifies the content that will be part of the warning text component. If contentHTML is supplied, this is ignored. |
contentHTML | string | Required. Uses HTML to specifies what content will be part of warning text component. |
classes | string | Specifies what class modifiers to apply to warning text component. |
icon | string | Name of the icon, which will be used to import icon and place it on the left side of the warning text, before text. By default it uses the general-warning-triangle icon. Icon names can be found on the icons page. |
Warning text with success icon - round
Lorem ipsum dolar sit...
HTML markup
<div class="wmnds-warning-text ">
<svg class="wmnds-warning-text__icon">
<use xlink:href="#wmnds-general-success" href="#wmnds-general-success"></use>
</svg>
Lorem ipsum dolar sit...
</div>
Nunjucks markup
{% from "wmnds/components/warning-text/_warning-text.njk" import wmndsWarningText %}
{{
wmndsWarningText({
contentText: null,
contentHTML: "Lorem <a href='#' title='lorem' target='_blank'>ipsum</a> dolar sit...",
classes: null,
icon: null
})
}}
Nunjucks properties
Name | Type | Description |
---|---|---|
contentText | string | Required. Specifies the content that will be part of the warning text component. If contentHTML is supplied, this is ignored. |
contentHTML | string | Required. Uses HTML to specifies what content will be part of warning text component. |
classes | string | Specifies what class modifiers to apply to warning text component. |
icon | string | Name of the icon, which will be used to import icon and place it on the left side of the warning text, before text. By default it uses the general-warning-triangle icon. Icon names can be found on the icons page. |