Skip to content

feat: add closeButtonPosition prop to customize close button placement#751

Open
Alex-Huaracha wants to merge 1 commit intoemilkowalski:mainfrom
Alex-Huaracha:feat/close-button-position
Open

feat: add closeButtonPosition prop to customize close button placement#751
Alex-Huaracha wants to merge 1 commit intoemilkowalski:mainfrom
Alex-Huaracha:feat/close-button-position

Conversation

@Alex-Huaracha
Copy link
Copy Markdown

Summary

Adds a closeButtonPosition prop to allow customizing the position of the close button on toasts.

  • Adds new CloseButtonPosition type ('left' | 'right')
  • Configurable at both Toaster level (global) and individual toast level
  • Default position remains 'left' to maintain backward compatibility
  • Includes RTL support

Usage

// Global - all toasts with close button on the right
<Toaster closeButton closeButtonPosition="right" />
// Per-toast override
toast('Message', { 
  closeButton: true, 
  closeButtonPosition: 'right' 
})
Closes #747

@vercel
Copy link
Copy Markdown

vercel bot commented Mar 16, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
sonner Error Error Mar 16, 2026 9:39pm

Request Review

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant