A full migration of gux-action-toast
upgrades the design to the latest UX standards and allows for easier design changes through css tokens
<gux-action-toast aria-live="polite">
<gux-icon slot="icon" icon-name="user-add" decorative></gux-icon>
<div slot="title">Title</div>
<div slot="message">This is the message</div>
<gux-button slot="positive-button" accent="primary">Accept</gux-button>
<gux-button slot="negative-button">Reject</gux-button>
</gux-action-toast>
Steps:
- Replace the
gux-action-toast
tag withgux-action-toast-legacy
tag
- <gux-action-toast aria-live="polite">
+ <gux-action-toast-legacy aria-live="polite">
...
- </gux-action-toast>
+ </gux-action-toast-legacy>
Completed V3 Basic Migration:
<gux-action-toast-legacy aria-live="polite">
<gux-icon slot="icon" icon-name="user-add" decorative></gux-icon>
<div slot="title">Title</div>
<div slot="message">This is the message</div>
<gux-button slot="positive-button" accent="primary">Accept</gux-button>
<gux-button slot="negative-button">Reject</gux-button>
</gux-action-toast-legacy>
Steps:
- Replace the
gux-action-toast
tag name withgux-toast
. Set thetoast-type
property toaction
- <gux-action-toast aria-live="polite">
+ <gux-toast toast-type="action" aria-live="polite">
...
- </gux-action-toast>
+ </gux-toast>
- Replace
gux-button
slotted tag names with regularbutton
- Replace
positive-button
andnegative-button
named slots withprimary-button
andsecondary-button
accent
property is no longer needed
- <gux-button slot="positive-button" accent="primary">...</gux-button>
- <gux-button slot="negative-button">...</gux-button>
+ <button slot="primary-button">...</button>
+ <button slot="secondary-button">...</button>
Completed V4 Full Migration to gux-toast
:
<gux-toast toast-type="action" aria-live="polite">
<gux-icon slot="icon" icon-name="fa/diamond-regular" decorative></gux-icon>
<div slot="title">2 Actions</div>
<div slot="message">This is an example message</div>
<button slot="primary-button" type="button" onclick="notify(event)">
Action 1
</button>
<button slot="secondary-button" type="button" onclick="notify(event)">
Action 2
</button>
</gux-toast>
- gux-toast
- properties
- toast-type
- events
- guxdismiss
- properties
Note: title
and secondary-button
named slots are optional
Note: aria-live
property is required for accessibility