Skip to content

Clarify required placement of Toast close button and consider allowing it within ToastContent #8679

@emilmuller

Description

@emilmuller

🙋 Documentation Request

The documentation for Toast isn't clear on whether the <Button slot="close"> must be a sibling of <ToastContent>. All examples show this pattern, but it's never explicitly stated as a requirement.

  1. Documentation request:
    Please clarify in the docs if this structure is mandatory for accessibility and focus management?

  2. API suggestion:
    If the structure is mandatory, I suggest re-evaluating this approach. The current design makes it difficult to implement common UI patterns, like placing the close button in a header next to the title, without using CSS workarounds (e.g., position: absolute).

🧢 Your Company/Team

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions