Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Close button isn't easily discoverable on hover #224

Closed
andrewbarnesweb opened this issue Nov 13, 2023 · 6 comments
Closed

Close button isn't easily discoverable on hover #224

andrewbarnesweb opened this issue Nov 13, 2023 · 6 comments

Comments

@andrewbarnesweb
Copy link
Contributor

The close button is only visible on hover, which isn't easily discoverable for users. They may well not know the functionality exists if they never hover over the component.

Further to this, on touch devices, there is no obvious way to trigger the functionality - I thought it was a bug when trying on an iPhone - as there's no icon to hit.

andrewbarnesweb added a commit to andrewbarnesweb/sonner that referenced this issue Nov 13, 2023
@choeqq
Copy link
Contributor

choeqq commented Nov 13, 2023

I can resolve that issue if it wasnt assigned yet, I will add that as custom option for toast 😉

andrewbarnesweb added a commit to andrewbarnesweb/sonner that referenced this issue Nov 14, 2023
@emilkowalski
Copy link
Owner

Nice! Let's make it optional and disabled by default @andrewbarnesweb.

@andrewbarnesweb
Copy link
Contributor Author

Nice! Let's make it optional and disabled by default @andrewbarnesweb.

Not sure I follow 🙂. The close button is already optional? Just when it's passed in you can't see it, unless you hover - so I raised a PR for having the close button visible if passed.

Let me know what your expectation is here and I'll update the PR 👍🏻

@cindyeme
Copy link

cindyeme commented Nov 27, 2023

@andrewbarnesweb @emilkowalski is it possible to change the position of the closeButton?
I would love to justify it to the right after the text and it should be discoverable without the hover effect.

@schulzf
Copy link

schulzf commented Jan 14, 2024

@emilkowalski is there any way to change the position of the close button without having to make a full blown custom toast?

@emilkowalski emilkowalski reopened this Jan 14, 2024
@emilkowalski
Copy link
Owner

The close button is discoverable without the hover effect now. To change its position you can target data-close-button="true" element in tailwind or css and change the top/bottom/right/left values.

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

No branches or pull requests

5 participants