@@ -12,6 +12,10 @@ yarn add -D @svelte-plugins/tooltips
1212# or with NPM
1313
1414npm i -D @svelte-plugins/tooltips
15+
16+ # or with PNPM
17+
18+ pnpm i -D @svelte-plugins/tooltips
1519```
1620
1721## Using the Tooltip component
@@ -40,25 +44,26 @@ Checkout out my <u use:tooltip={{ content: 'Hello World!' }}>tooltip</u>
4044## API
4145
4246### 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: ``) |
5661
5762#### 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 ` ) |
6267
6368
6469``` svelte
0 commit comments