react-radix-tooltip 1.0.0 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +17 -17
- package/package.json +6 -2
- package/rollup.config.js +4 -1
package/README.md
CHANGED
|
@@ -49,23 +49,23 @@ const MyComponent = () => (
|
|
|
49
49
|
More Details on [Radix-UI Documentation](https://www.radix-ui.com/primitives/docs/components/tooltip)
|
|
50
50
|
|
|
51
51
|
| Prop | Type | Default | Description |
|
|
52
|
-
|
|
53
|
-
| title | React.ReactNode |
|
|
54
|
-
| children | React.ReactElement |
|
|
55
|
-
| container | HTMLDivElement
|
|
56
|
-
| placement | 'top' \| 'bottom' \| 'left' \| 'right' | 'top' |
|
|
57
|
-
| sideOffset | number |
|
|
58
|
-
| arrow | boolean |
|
|
59
|
-
| arrowWidth | number |
|
|
60
|
-
| arrowHeight | number |
|
|
61
|
-
| arrowPadding | number |
|
|
62
|
-
| delayDuration | number |
|
|
63
|
-
| skipDelayDuration | number | 300 |
|
|
64
|
-
| defaultOpen | boolean | false |
|
|
65
|
-
| onOpenChange | (open: boolean) => void |
|
|
66
|
-
| style | React.CSSProperties |
|
|
67
|
-
| tooltipClassName | string |
|
|
68
|
-
| tooltipArrowClassName | string |
|
|
52
|
+
|-----|------|---------|-------------|
|
|
53
|
+
| `title` | `React.ReactNode` | **Required** | Content to be displayed inside the tooltip. |
|
|
54
|
+
| `children` | `React.ReactElement` | **Required** | The element that triggers the tooltip when hovered or focused. |
|
|
55
|
+
| `container` | `HTMLDivElement \| null \| undefined` | `document.body` | Optional container where the tooltip portal will be rendered. |
|
|
56
|
+
| `placement` | `'top' \| 'bottom' \| 'left' \| 'right'` | `'top'` | Position of the tooltip relative to the trigger element. |
|
|
57
|
+
| `sideOffset` | `number` | `5` | Distance (in pixels) between the tooltip and the trigger element. |
|
|
58
|
+
| `arrow` | `boolean` | `true` | Whether to display the tooltip arrow. |
|
|
59
|
+
| `arrowWidth` | `number` | `10` | Width of the tooltip arrow in pixels. |
|
|
60
|
+
| `arrowHeight` | `number` | `5` | Height of the tooltip arrow in pixels. |
|
|
61
|
+
| `arrowPadding` | `number` | `2` | Padding between the arrow and the edge of the tooltip. |
|
|
62
|
+
| `delayDuration` | `number` | `200` | Delay (in milliseconds) before the tooltip appears. |
|
|
63
|
+
| `skipDelayDuration` | `number` | `300` | Time window where subsequent tooltips appear instantly without delay. |
|
|
64
|
+
| `defaultOpen` | `boolean` | `false` | Whether the tooltip should be open by default. |
|
|
65
|
+
| `onOpenChange` | `(open: boolean) => void` | `undefined` | Callback fired when the tooltip open state changes. |
|
|
66
|
+
| `style` | `React.CSSProperties` | `{}` | Inline styles applied to the tooltip container. |
|
|
67
|
+
| `tooltipClassName` | `string` | `""` | Custom CSS class for styling the tooltip container. |
|
|
68
|
+
| `tooltipArrowClassName` | `string` | `""` | Custom CSS class for styling the tooltip arrow. |
|
|
69
69
|
|
|
70
70
|
---
|
|
71
71
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-radix-tooltip",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "A streamlined, developer-friendly wrapper for [@radix-ui/react-tooltip](https://www.radix-ui.com). This component simplifies the Radix Tooltip implementation by allowing you to trigger tooltips using a single component and a simplified prop interface.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -24,7 +24,8 @@
|
|
|
24
24
|
"peerDependencies": {
|
|
25
25
|
"@radix-ui/react-tooltip": "^1.2.8",
|
|
26
26
|
"react": ">=16.8.0",
|
|
27
|
-
"react-dom": ">=16.8.0"
|
|
27
|
+
"react-dom": ">=16.8.0",
|
|
28
|
+
"tailwindcss": ">=3.0.0"
|
|
28
29
|
},
|
|
29
30
|
"devDependencies": {
|
|
30
31
|
"@rollup/plugin-commonjs": "^29.0.0",
|
|
@@ -34,10 +35,13 @@
|
|
|
34
35
|
"@types/node": "^25.2.3",
|
|
35
36
|
"@types/react": "^19.2.13",
|
|
36
37
|
"@types/react-dom": "^19.2.3",
|
|
38
|
+
"autoprefixer": "^10.4.27",
|
|
39
|
+
"postcss": "^8.5.8",
|
|
37
40
|
"react": "^19.2.4",
|
|
38
41
|
"rollup-plugin-dts": "^6.3.0",
|
|
39
42
|
"rollup-plugin-peer-deps-external": "^2.2.4",
|
|
40
43
|
"rollup-plugin-postcss": "^4.0.2",
|
|
44
|
+
"tailwindcss": "^4.2.1",
|
|
41
45
|
"tslib": "^2.8.1",
|
|
42
46
|
"typescript": "^5.9.3",
|
|
43
47
|
"vite": "^7.3.1"
|