https://github.com/react-sandbox/tooltip
💬 Lightweight text tooltip
https://github.com/react-sandbox/tooltip
component react react-tooltip tooltip typescript
Last synced: 4 months ago
JSON representation
💬 Lightweight text tooltip
- Host: GitHub
- URL: https://github.com/react-sandbox/tooltip
- Owner: react-sandbox
- License: mit
- Created: 2023-05-28T04:19:15.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2024-01-15T22:03:14.000Z (about 2 years ago)
- Last Synced: 2025-10-25T07:32:00.446Z (5 months ago)
- Topics: component, react, react-tooltip, tooltip, typescript
- Language: TypeScript
- Homepage:
- Size: 1.18 MB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
@react-sandbox/tooltip
💬 Lightweight, customizable tooltip component.
## Usage
### Install
Install the `@react-sandbox/tooltip` package:
```
npm install @react-sandbox/tooltip
```
### Import
Import the `Tooltip` component:
```tsx
import React from 'react'
import Tooltip from '@react-sandbox/tooltip'
function App() {
return (
Save
)
}
```
### Props
| 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 |
## Development
### Local
```
yarn
yarn dev
```
### Storybook
```
yarn storybook
```
### Tests
```
yarn test
```
## License
MIT