Skip to content

Add Per-Toast Position Configuration #31

Description

@sudhucodes

Is your feature request related to a problem? Please describe.

Currently, toast notifications only appear in the default position. In applications with different layouts, developers may need to display notifications in specific areas of the screen (e.g., bottom-right, top-left, center, etc.) to avoid overlapping important UI elements.

Describe the solution you'd like

Add support for configuring the position of individual toast notifications.

Example:

toast.success('Message Sent!', {
  position: 'bottom-right'
})

Supported positions could include:

  • top-left
  • top-center
  • top-right
  • bottom-left
  • bottom-center
  • bottom-right

This would allow developers to customize notification placement on a per-toast basis instead of relying on a global configuration.

Describe alternatives you've considered

Currently, positioning can only be controlled globally or by creating custom implementations/workarounds. These approaches are less flexible when different notifications need to appear in different locations.

Additional context

This feature would improve flexibility and make the API more consistent with other toast notification libraries that support per-toast positioning.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions