💬 Lightweight, customizable tooltip component.
Install the @react-sandbox/tooltip
package:
npm install @react-sandbox/tooltip
Import the Tooltip
component:
import React from 'react'
import Tooltip from '@react-sandbox/tooltip'
function App() {
return (
<Tooltip title="Download ✅">
<button>Save</button>
</Tooltip>
)
}
Prop | Type | Default | Description |
---|---|---|---|
title |
string |
required | Text content |
position |
'top' | 'bottom' | 'left' | 'right' |
'top' |
Position of tooltip |
delay |
0 | 100 | 200 | 300 | 400 | 500 | 750 | 1000 |
200 |
Initial transition delay |
disabled |
boolean |
false |
Visible or not |
className |
string |
- |
CSS classes |
style |
React.CSSProperties |
- |
CSS styles |
yarn
yarn dev
yarn storybook
yarn test
MIT