[@mantine/core] Button: Native tooltip for button#9024
Open
WojakGra wants to merge 3 commits into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces a new demo showcasing how to implement a native CSS tooltip for a button using modern CSS Anchor Positioning features. The new example is integrated into the documentation, complete with both TypeScript and CSS code, and is now available in the Button component demos. This provides users with an alternative to JavaScript-based tooltips, while also explaining browser support caveats.
New Native CSS Tooltip Demo:
Button.demo.nativeTooltip.tsx, which demonstrates a tooltip positioned with CSS Anchor Positioning and includes both the React and CSS code needed for the example.Button.demo.nativeTooltipStyles.module.css, defining the tooltip's positioning, appearance, and show/hide behavior on hover using anchor positioning properties.Documentation and Integration:
button.mdx) to include a new section explaining the native CSS tooltip approach, its limitations, and when to use the built-in Tooltip component instead.