Skip to main content

Component <Tooltip />

Props

PropsTypeMeaningPossible values
colorstringChange tootlip background colorwhite / dark
positionstringChange tootlip position around the elemettop-left / top / top-right / right-top / right / right-bottom / bottom-left / bottom / bottom-right / left-top / left / left-bottom
tooltipTextstringSet tootlip text statusstring
widthstring / numberSet max width of the popupfrom 0 to any number or string with units



Colors

const TooltipColor = ({ color }) => (
<Tooltip tooltipText="Hint is here" color={color}>
Open {color.replace('-', ' ')}
</Tooltip>
)
Open white
Open dark

Positions

const TooltipPos = ({ position }) => (
<Tooltip tooltipText="Hint is here" position={position}>
Open {position.replace('-', ' ')}
</Tooltip>
)
Open top left
Open top
Open top right
Open right top
Open right
Open right bottom
Open bottom left
Open bottom
Open bottom right
Open left top
Open left
Open left bottom



Width

const TooltipWidth = ({ width }) => (
<Tooltip
tooltipText="Lorem Ipsum is simply dummy text of the printing and typesetting industry"
width={width}
>
Hover here
</Tooltip>
)
Hover here
Hover here