function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Matt Eck 15Matt Eck 15 

LWC - showToastEvent for less than 3 seconds?

Hey All,
Is it possible to display a toast message using ShowToastEvent in LWC for less than 3 seconds? Three seconds seems too long, but it looks like the only options may be dismissable, pester, and sticky. Thank you for the help in advance!
Raj VakatiRaj Vakati

No, i think .. it's clear in the document. 

The toast remains visible for 3 seconds or until the user presss the close button, denoted by the X in the top right corner, which is also the default. 

https://developer.salesforce.com/docs/component-library/bundle/lightning-platform-show-toast-event/documentation



Determines how persistent the toast is. Valid values are: dismissable (default), remains visible until you press the close button or 3 seconds has elapsed, whichever comes first; pester, remains visible until the close button is clicked; sticky, remains visible for 3 seconds.