diff --git a/.changeset/strong-rice-warn.md b/.changeset/strong-rice-warn.md index a18a41633d..c4fc28180b 100644 --- a/.changeset/strong-rice-warn.md +++ b/.changeset/strong-rice-warn.md @@ -18,3 +18,18 @@ Added option to allow the `AlertMessage` to be self-closing. This is done with a ``` The above example will set the transient timeout to 2500ms from the default of 5000ms + +Here's a rough example of how to trigger an alert using the new `transient` boolean: + +```ts +import { alertApiRef, useApi } from '@backstage/core-plugin-api'; + +const exampleTransient = () => { + const alertApi = useApi(alertApiRef); + alertApi.post({ + message: 'Example of Transient Alert', + severity: 'success', + transient: true, + }); +}; +```