Tooltip

Install and import

yarn add @welcome-ui/tooltip @xstyled/styled-components @xstyled/system prop-types react react-dom styled-components
import { Tooltip } from '@welcome-ui/tooltip'

Example

The tooltip follows the cursor.

Maybe you don't want the tooltip to follow the cursor…

With a long text and a custom placement

Set a max-width for long text

With long text

Properties

NameType(s)DefaultRequired
children
func | node
content
union
fixed
bool
false
placement
auto-start
auto
auto-end
top-start
top
top-end
right-start
right
right-end
bottom-end
bottom
bottom-start
left-end
left
left-start
fixed ? top : bottom-start

Dependencies

Peer dependencies