react-radix-tooltip 0.0.1 → 1.0.1

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.
Files changed (2) hide show
  1. package/README.md +19 -8
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -46,15 +46,26 @@ const MyComponent = () => (
46
46
 
47
47
  ## Props
48
48
 
49
+ More Details on [Radix-UI Documentation](https://www.radix-ui.com/primitives/docs/components/tooltip)
50
+
49
51
  | Prop | Type | Default | Description |
50
- |---|---|---|---|
51
- | title | ReactNode | Required | The content to display inside the tooltip. |
52
- | children | ReactElement | Required | The element that triggers the tooltip. |
53
- | placement | top | bottom | left | right | top | Preferred position of the tooltip. |
54
- | sideOffset | number | 4 | Distance between the trigger and the tooltip. |
55
- | arrow | boolean | false | Whether to display the optional arrow component. |
56
- | delayDuration | number | 700 | Delay in ms before tooltip opens. |
57
- | tooltipClassName | string | - | CSS class for the tooltip content. | |
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. |
58
69
 
59
70
  ---
60
71
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "react-radix-tooltip",
3
- "version": "0.0.1",
4
- "description": "ReactRadixTooltip is a lightweight wrapper built on top of @radix-ui/react-tooltip. It simplifies the implementation of accessible tooltips by consolidating Radix's modular structure into a single, prop-driven component, making it easier to manage positioning, styling, and arrow configurations.",
3
+ "version": "1.0.1",
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",
7
7
  "types": "dist/index.d.ts",