SUR-221 - Tooltip component - update documentation #41
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.
Description
Tooltip Component Documentation
Description
The
Tooltips
are small, interactive pop-up boxes that provide brief, informative messages when users hover over, focus on, or tap an element. They are typically used to offer additional context or explanation for a specific component, such as buttons, icons, or links, without cluttering the interface.Props
variant
string
"light"
"light"
"dark"
placement
string
"top"
"top"
"top-start"
"top-end"
"right"
"right-start"
"right-end"
"bottom"
"bottom-start"
"bottom-end"
"left"
"left-start"
"left-end"
title
string
content
HTML content
arrow
boolean
"false"
"false"
"true"
open
boolean
setOpen
function
boundary
HTMLElement
clippingAncestors
boundary={document.getElementById('boundary')}
strategy
string
"fixed"
"absolute"
"fixed"
"fixed"
strategy is recommended for most use cases.offset
number
|object
tooltipPortalRoot
HTMLElement | null
null
tooltipPortalId
string
""
triggers
string[]
["hover", "focus"]
"hover"
"focus"
"click"
interactive
boolean
false
children
ReactNode
className
string
Usage
Basic Example
Screenshots
Types of changes
How has this been tested?
Checklist: