Is there a way to set the duration for custom Toast messages in LWC? I know, in Aura we do it using Duration attribute, but looks like in case of LWC there is no 'Duration' attribute defined. Also, looks like Custom Toast messages are still in BETA version in LWC so I can't deploy it to PROD right? Any idea when would it be GA?

2 Answers 2


There's no option for a duration, the only options are to provide a close button, wait three seconds, or do both. "Beta" components are those that are "production quality, but with known limitations." You can use beta components in production, but you need to be aware of limitations (in this case, there's no duration you can set!).

  • Got it.. Thanks for your help..!!
    – sfdc07
    Jul 6, 2020 at 6:16

I was able to use mode : 'sticky', parameter. This made toast message to stay there until user clicks the close (X) and clears it. This worked for me as some of my messages are very long that can't be ready within 3 seconds. toast parameters

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.