Skip to content

[Feature]: Add close button to toasts for accessibility and easier dismissal #1832

Description

@noxire-dev

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I am describing a concrete problem or use case, not just a vague idea.

Area

apps/web

Problem or use case

Toasts can currently only be dismissed by swiping (or waiting for auto-dismiss). There is no visible close button.

This would be a small, additive change to apps/web/src/components/ui/toast.tsx with no impact on the existing swipe behavior or auto-dismiss logic.

Proposed solution

Add a <Toast.Close> button (the primitive already exists in @base-ui/react) to the toast content area. A small X icon in the top-right corner, styled consistently with the existing CopyErrorButton — low-opacity by default, full opacity on hover.

Why this matters

Accessibility: Keyboard and screen reader users have no way to manually dismiss a toast.
Discoverability: Desktop mouse users typically expect an X button on dismissable notifications. Swipe-to-dismiss is a mobile pattern that isn't obvious on desktop.
Convenience: Having to click-drag across the toast to dismiss feels heavier than clicking a small button.

Smallest useful scope

Aligns with WCAG 2.1 dismissable content guidance
Standard UX convention for toast/notification components
The building block (Toast.Close) is already available in the UI library — no new dependencies
Happy to submit a PR if this sounds reasonable.

Alternatives considered

No response

Risks or tradeoffs

No response

Examples or references

No response

Contribution

  • I would be open to helping implement this.

Activity

  1. added
    enhancementRequested improvement or new capability.
    needs-triageIssue needs maintainer review and initial categorization.
    on Apr 8, 2026
  2. mwolson commented on Apr 11, 2026

    @mwolson
    Contributor

    While I'm not part of the team (or vouched) I'd also like to see a PR for this.

  3. aashishsingla567 commented on Apr 16, 2026

    @aashishsingla567

    Yes, this is very annoying please add a close button for these, and maybe move somewhere less blocking.

    Image
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

    enhancementRequested improvement or new capability.needs-triageIssue needs maintainer review and initial categorization.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions