Skip to content

Toast: Add ability to to override max displayed toasts (toaster.maxDisplayedToasts) #5047

@joshsedl

Description

@joshsedl

Package

v4.x

Description

Currently there is no way to override the max displayed toast count. It is hard coded to 5:

The useToast composable uses Nuxt's useState to manage the toast state, ensuring reactivity across your application. A maximum of 5 toasts are displayed at a time. When adding a new toast that would exceed this limit, the oldest toast is automatically removed.

I would be really nice if we could override this value by introducing a "toaster.maxDisplayedToasts" property.

Additionally to maxDisplayedToasts, it would be nice to also add a toast limit: "toaster.toastLimit". This way we could display a set amount of toasts via "maxDisplayedToasts" and once removing a toast an older toast reaappears at the top until the "toastLimit" is reached.

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestp2-mediumNotable issue or useful enhancementv4#4488

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions