Tooltip
A tooltip is a element used in conjunction with the cursor or mouse pointer to display information about an item without needing to click on it.
Usage
Code EditorCopyimport { Tooltip } from '@erudilabs/alma'
Types
Code EditorCopyimport type { TooltipPlacementProps } from '@erudilabs/alma'
TooltipPlacementProps = 'top' | 'right' | 'bottom' | 'left' | 'top-start' | 'top-end' | 'right-start' | 'right-end' | 'bottom-start' | 'bottom-end' | 'left-start' | 'left-end'
Component
Here preview and detail explain of Tooltip
component
Default
Code EditorCopy<Tooltip content="ErudiFi is a financial technology."> <Button>Hover me!</Button> </Tooltip>
Placement
Refers to the position or location where a tooltip appears in relation to its associated element or target,
PS: The component will be detect possible possition when window resize
Top
Code EditorCopy<Tooltip content="ErudiFi is a financial technology." placement="top"> <Button>Hover me!</Button> </Tooltip>
Top start
Code EditorCopy<Tooltip content="ErudiFi is a financial technology." placement="top-start"> <Button>Hover me!</Button> </Tooltip>
Top end
Code EditorCopy<Tooltip content="ErudiFi is a financial technology." placement="top-end"> <Button>Hover me!</Button> </Tooltip>
Right
Code EditorCopy<Tooltip content="A tooltip is a element used in conjunction with the cursor or mouse pointer to display information about an item without needing to click on it." placement="right"> <Button>Hover me!</Button> </Tooltip>
Right start
Code EditorCopy<Tooltip content="A tooltip is a element used in conjunction with the cursor or mouse pointer to display information about an item without needing to click on it." placement="right-start"> <Button>Hover me!</Button> </Tooltip>
Right end
Code EditorCopy<Tooltip content="A tooltip is a element used in conjunction with the cursor or mouse pointer to display information about an item without needing to click on it." placement="right-end"> <Button>Hover me!</Button> </Tooltip>
Bottom
Code EditorCopy<Tooltip content="ErudiFi is a financial technology." placement="bottom"> <Button>Hover me!</Button> </Tooltip>
Bottom start
Code EditorCopy<Tooltip content="ErudiFi is a financial technology." placement="bottom-start"> <Button>Hover me!</Button> </Tooltip>
Bottom end
Code EditorCopy<Tooltip content="ErudiFi is a financial technology." placement="bottom-end"> <Button>Hover me!</Button> </Tooltip>
Left
Code EditorCopy<Tooltip content="A tooltip is a element used in conjunction with the cursor or mouse pointer to display information about an item without needing to click on it." placement="left"> <Button>Hover me!</Button> </Tooltip>
Left start
Code EditorCopy<Tooltip content="A tooltip is a element used in conjunction with the cursor or mouse pointer to display information about an item without needing to click on it." placement="left-start"> <Button>Hover me!</Button> </Tooltip>
Left end
Code EditorCopy<Tooltip content="A tooltip is a element used in conjunction with the cursor or mouse pointer to display information about an item without needing to click on it." placement="left-end"> <Button>Hover me!</Button> </Tooltip>
Props Reference
Prop
Type
Default
placemnet?
TooltipPlacementProps
top
testId?
string
-
className?
string
-
content
string
-