Skip to content

feat(tooltip): add alignment utility classes (start, center, end)#4363

Open
pdanpdan wants to merge 2 commits intosaadeghi:masterfrom
pdanpdan:feat/tooltip-position
Open

feat(tooltip): add alignment utility classes (start, center, end)#4363
pdanpdan wants to merge 2 commits intosaadeghi:masterfrom
pdanpdan:feat/tooltip-position

Conversation

@pdanpdan
Copy link
Contributor

  • apply to all positions (top, bottom, left, right)
  • add a new variable --tt-tail-off to set offset of the tail for start and end alignment

example: https://play.tailwindcss.com/Qt8vZTMlSe?file=css

close #4229

- apply to all positions (top, bottom, left, right)
- add a new variable --tt-tail-off to set offset of the tail for start and end alignment

example:  https://play.tailwindcss.com/Qt8vZTMlSe?file=css

close saadeghi#4229
@saadeghi saadeghi self-assigned this Jan 7, 2026
@saadeghi saadeghi added the 5.6 label Feb 28, 2026
Copy link
Owner

@saadeghi saadeghi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR @pdanpdan
There's a concern about the new class names.
The existing class names for left and right were bad ideas, because ideally tooltip should adapt the LTR/RTL direction and in result a left tooltip will go right on a RTL layout.
So I think at some point we should rename left and right to start and end, so the name won't be confusing for the opposite direction.
Or to avoid a breaking change we can add start and end as aliases for left and right.

As a result, these new class names should use some name other than start or end. Maybe tooltip-tail-start or something. Let me know if you have any suggestions.

@pdanpdan
Copy link
Contributor Author

pdanpdan commented Mar 8, 2026

Maybe tooltip-align-start?

@saadeghi
Copy link
Owner

saadeghi commented Mar 8, 2026

I think tooltip-tail-start would be more understandable than tooltip-align-start.

It may not be clear what is align especially when the other class names are already changing the alignment from top, bottom, etc.

But tail is more clear. If we want the tail to be at the start, we would use tooltip-tail-start.

@pdanpdan
Copy link
Contributor Author

pdanpdan commented Mar 8, 2026

Are you changing the names or should I go with the rename?

@saadeghi
Copy link
Owner

saadeghi commented Mar 8, 2026

I will rename after merging to v5.6 branch 👍
I'm also adding start and end as aliases for left and right

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants