@@ -12,6 +12,10 @@ yarn add -D @svelte-plugins/tooltips
12
12
# or with NPM
13
13
14
14
npm i -D @svelte-plugins/tooltips
15
+
16
+ # or with PNPM
17
+
18
+ pnpm i -D @svelte-plugins/tooltips
15
19
```
16
20
17
21
## Using the Tooltip component
@@ -40,25 +44,26 @@ Checkout out my <u use:tooltip={{ content: 'Hello World!' }}>tooltip</u>
40
44
## API
41
45
42
46
### Props
43
- | Prop | Description | Value |
44
- | :----------- | :------------------------------------------------------------------ | :---------------------------------------------- |
45
- | action | The action that triggers the tooltip (hover | click | prop) | ` string ` (default: ` hover ` ) |
46
- | animation | The animation to apply to the tooltip | ` string ` (default: ``) |
47
- | delay | The animation delay in milliseconds to apply to the tooltip | ` number ` (default: ` 200 ` ) |
48
- | arrow | If ` false ` , the tooltip arrow will not be shown. | ` boolean ` (default: ` true ` ) |
49
- | autoPosition | Adjust tooltip position if viewport clipping occurs | ` string ` (default: ` false ` ) |
50
- | content | The string or object containing componentref and props | ` string ` | ` object ` component (default: ``) |
51
- | maxWidth | The max allowable width of the tooltip content | ` number ` (default: ` 200 ` ) |
52
- | position | The position where the tooltip should appear relative to its parent | ` string ` (default: ` top ` ) |
53
- | theme | The CSS theme class name | ` string ` (default: ``) |
54
- | show | Allows you to manually control the tooltip visibility | ` boolean ` (default: ` false ` ) |
55
- | style | The object containing theme variable overrides | ` object ` (default: ` null ` ) |
47
+ | Prop | Description | Value |
48
+ | :----------------- | :------------------------------------------------------------------ | :---------------------------------------------- |
49
+ | action | The action that triggers the tooltip (hover | click | prop) | ` string ` (default: ` hover ` ) |
50
+ | animation | The animation to apply to the tooltip | ` string ` (default: ``) |
51
+ | arrow | If ` false ` , the tooltip arrow will not be shown. | ` boolean ` (default: ` true ` ) |
52
+ | autoPosition | Adjust tooltip position if viewport clipping occurs | ` boolean ` (default: ` false ` ) |
53
+ | content | The string or object containing componentref and props | ` string ` | ` object ` component (default: ``) |
54
+ | delay | The animation delay in milliseconds to apply to the tooltip | ` number ` (default: ` 200 ` ) |
55
+ | hideOnOutsideClick | Hides a tooltip when an outside click occurs | ` boolean ` (default: ` false ` ) |
56
+ | maxWidth | The max allowable width of the tooltip content | ` number ` (default: ` 200 ` ) |
57
+ | position | The position where the tooltip should appear relative to its parent | ` string ` (default: ` top ` ) |
58
+ | show | Allows you to manually control the tooltip visibility | ` boolean ` (default: ` false ` ) |
59
+ | style | The object containing theme variable overrides | ` object ` (default: ` null ` ) |
60
+ | theme | The CSS theme class name | ` string ` (default: ``) |
56
61
57
62
#### Using components as content
58
- | Prop | Description | Value |
59
- | :-----------------| :------------------------------------------------------------- | :---------------------------------- |
60
- | content.component | Svelte component | ` component ` (default: ` null ` ) |
61
- | content.props | Any component propeties | ` object ` (default: ` null ` ) |
63
+ | Prop | Description | Value |
64
+ | :-----------------| :------------------------------------------------------------------- | :------------ ---------------------------------- |
65
+ | content.component | Svelte component | ` component ` (default: ` null ` ) |
66
+ | content.props | Any component propeties | ` object ` (default: ` null ` ) |
62
67
63
68
64
69
``` svelte
0 commit comments