@gitlab/ui 114.1.0 → 114.1.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.
Files changed (141) hide show
  1. package/dist/components/base/breadcrumb/breadcrumb.js +4 -16
  2. package/dist/index.css +1 -1
  3. package/dist/index.css.map +1 -1
  4. package/package.json +7 -26
  5. package/src/components/base/breadcrumb/breadcrumb.scss +18 -2
  6. package/src/components/base/breadcrumb/breadcrumb.vue +4 -17
  7. package/CHANGELOG.md +0 -13139
  8. package/src/vendor/bootstrap/LICENSE +0 -11
  9. package/src/vendor/bootstrap-vue/LICENSE +0 -11
  10. package/src/vendor/bootstrap-vue/package.json +0 -144
  11. package/src/vendor/bootstrap-vue/src/components/button/MODIFICATIONS.md +0 -16
  12. package/src/vendor/bootstrap-vue/src/components/button/README.md +0 -240
  13. package/src/vendor/bootstrap-vue/src/components/button/button-close.spec.js +0 -210
  14. package/src/vendor/bootstrap-vue/src/components/button/button.spec.js +0 -349
  15. package/src/vendor/bootstrap-vue/src/components/button/package.json +0 -105
  16. package/src/vendor/bootstrap-vue/src/components/dropdown/README.md +0 -730
  17. package/src/vendor/bootstrap-vue/src/components/dropdown/dropdown-divider.spec.js +0 -58
  18. package/src/vendor/bootstrap-vue/src/components/dropdown/dropdown-form.spec.js +0 -110
  19. package/src/vendor/bootstrap-vue/src/components/dropdown/dropdown-group.spec.js +0 -94
  20. package/src/vendor/bootstrap-vue/src/components/dropdown/dropdown-header.spec.js +0 -73
  21. package/src/vendor/bootstrap-vue/src/components/dropdown/dropdown-item-button.spec.js +0 -117
  22. package/src/vendor/bootstrap-vue/src/components/dropdown/dropdown-item.spec.js +0 -147
  23. package/src/vendor/bootstrap-vue/src/components/dropdown/dropdown-text.spec.js +0 -59
  24. package/src/vendor/bootstrap-vue/src/components/dropdown/dropdown.spec.js +0 -1121
  25. package/src/vendor/bootstrap-vue/src/components/dropdown/package.json +0 -368
  26. package/src/vendor/bootstrap-vue/src/components/form/README.md +0 -365
  27. package/src/vendor/bootstrap-vue/src/components/form/form-invalid-feedback.spec.js +0 -170
  28. package/src/vendor/bootstrap-vue/src/components/form/form-text.spec.js +0 -93
  29. package/src/vendor/bootstrap-vue/src/components/form/form-valid-feedback.spec.js +0 -157
  30. package/src/vendor/bootstrap-vue/src/components/form/form.spec.js +0 -97
  31. package/src/vendor/bootstrap-vue/src/components/form/package.json +0 -112
  32. package/src/vendor/bootstrap-vue/src/components/form-checkbox/README.md +0 -691
  33. package/src/vendor/bootstrap-vue/src/components/form-checkbox/form-checkbox-group.spec.js +0 -525
  34. package/src/vendor/bootstrap-vue/src/components/form-checkbox/form-checkbox.spec.js +0 -922
  35. package/src/vendor/bootstrap-vue/src/components/form-checkbox/package.json +0 -172
  36. package/src/vendor/bootstrap-vue/src/components/form-group/README.md +0 -339
  37. package/src/vendor/bootstrap-vue/src/components/form-group/form-group.spec.js +0 -477
  38. package/src/vendor/bootstrap-vue/src/components/form-group/package.json +0 -183
  39. package/src/vendor/bootstrap-vue/src/components/form-radio/README.md +0 -437
  40. package/src/vendor/bootstrap-vue/src/components/form-radio/form-radio-group.spec.js +0 -357
  41. package/src/vendor/bootstrap-vue/src/components/form-radio/form-radio.spec.js +0 -587
  42. package/src/vendor/bootstrap-vue/src/components/form-radio/package.json +0 -162
  43. package/src/vendor/bootstrap-vue/src/components/form-select/README.md +0 -504
  44. package/src/vendor/bootstrap-vue/src/components/form-select/form-select-option-group.spec.js +0 -138
  45. package/src/vendor/bootstrap-vue/src/components/form-select/form-select-option.spec.js +0 -75
  46. package/src/vendor/bootstrap-vue/src/components/form-select/form-select.spec.js +0 -723
  47. package/src/vendor/bootstrap-vue/src/components/form-select/package.json +0 -132
  48. package/src/vendor/bootstrap-vue/src/components/form-textarea/README.md +0 -453
  49. package/src/vendor/bootstrap-vue/src/components/form-textarea/form-textarea.spec.js +0 -1000
  50. package/src/vendor/bootstrap-vue/src/components/form-textarea/package.json +0 -122
  51. package/src/vendor/bootstrap-vue/src/components/layout/README.md +0 -791
  52. package/src/vendor/bootstrap-vue/src/components/layout/col.spec.js +0 -192
  53. package/src/vendor/bootstrap-vue/src/components/layout/form-row.spec.js +0 -45
  54. package/src/vendor/bootstrap-vue/src/components/layout/package.json +0 -99
  55. package/src/vendor/bootstrap-vue/src/components/link/README.md +0 -76
  56. package/src/vendor/bootstrap-vue/src/components/link/link.spec.js +0 -434
  57. package/src/vendor/bootstrap-vue/src/components/link/package.json +0 -57
  58. package/src/vendor/bootstrap-vue/src/components/modal/MODIFICATIONS.md +0 -30
  59. package/src/vendor/bootstrap-vue/src/components/modal/README.md +0 -1067
  60. package/src/vendor/bootstrap-vue/src/components/modal/helpers/bv-modal-event.class.spec.js +0 -82
  61. package/src/vendor/bootstrap-vue/src/components/modal/modal.spec.js +0 -1418
  62. package/src/vendor/bootstrap-vue/src/components/modal/package.json +0 -544
  63. package/src/vendor/bootstrap-vue/src/components/nav/README.md +0 -362
  64. package/src/vendor/bootstrap-vue/src/components/nav/nav-item.spec.js +0 -127
  65. package/src/vendor/bootstrap-vue/src/components/nav/nav.spec.js +0 -177
  66. package/src/vendor/bootstrap-vue/src/components/nav/package.json +0 -73
  67. package/src/vendor/bootstrap-vue/src/components/popover/README.md +0 -919
  68. package/src/vendor/bootstrap-vue/src/components/popover/package.json +0 -261
  69. package/src/vendor/bootstrap-vue/src/components/popover/popover.spec.js +0 -198
  70. package/src/vendor/bootstrap-vue/src/components/table/README.md +0 -3157
  71. package/src/vendor/bootstrap-vue/src/components/table/helpers/default-sort-compare.spec.js +0 -112
  72. package/src/vendor/bootstrap-vue/src/components/table/helpers/normalize-fields.spec.js +0 -93
  73. package/src/vendor/bootstrap-vue/src/components/table/package.json +0 -1763
  74. package/src/vendor/bootstrap-vue/src/components/table/table-busy.spec.js +0 -150
  75. package/src/vendor/bootstrap-vue/src/components/table/table-caption.spec.js +0 -176
  76. package/src/vendor/bootstrap-vue/src/components/table/table-colgroup.spec.js +0 -81
  77. package/src/vendor/bootstrap-vue/src/components/table/table-filtering.spec.js +0 -409
  78. package/src/vendor/bootstrap-vue/src/components/table/table-item-formatter.spec.js +0 -56
  79. package/src/vendor/bootstrap-vue/src/components/table/table-lite.spec.js +0 -682
  80. package/src/vendor/bootstrap-vue/src/components/table/table-pagination.spec.js +0 -133
  81. package/src/vendor/bootstrap-vue/src/components/table/table-primarykey.spec.js +0 -83
  82. package/src/vendor/bootstrap-vue/src/components/table/table-provider.spec.js +0 -411
  83. package/src/vendor/bootstrap-vue/src/components/table/table-row-details.spec.js +0 -459
  84. package/src/vendor/bootstrap-vue/src/components/table/table-selectable.spec.js +0 -1182
  85. package/src/vendor/bootstrap-vue/src/components/table/table-simple.spec.js +0 -206
  86. package/src/vendor/bootstrap-vue/src/components/table/table-sorting.spec.js +0 -858
  87. package/src/vendor/bootstrap-vue/src/components/table/table-sticky-column.spec.js +0 -377
  88. package/src/vendor/bootstrap-vue/src/components/table/table-tbody-bottom-row.spec.js +0 -94
  89. package/src/vendor/bootstrap-vue/src/components/table/table-tbody-row-events.spec.js +0 -529
  90. package/src/vendor/bootstrap-vue/src/components/table/table-tbody-top-row.spec.js +0 -88
  91. package/src/vendor/bootstrap-vue/src/components/table/table-tbody-transition.spec.js +0 -83
  92. package/src/vendor/bootstrap-vue/src/components/table/table-tfoot-custom.spec.js +0 -91
  93. package/src/vendor/bootstrap-vue/src/components/table/table-tfoot-events.spec.js +0 -137
  94. package/src/vendor/bootstrap-vue/src/components/table/table-thead-events.spec.js +0 -155
  95. package/src/vendor/bootstrap-vue/src/components/table/table-thead-top.spec.js +0 -96
  96. package/src/vendor/bootstrap-vue/src/components/table/table.spec.js +0 -692
  97. package/src/vendor/bootstrap-vue/src/components/tabs/README.md +0 -433
  98. package/src/vendor/bootstrap-vue/src/components/tabs/package.json +0 -205
  99. package/src/vendor/bootstrap-vue/src/components/tabs/tab.spec.js +0 -330
  100. package/src/vendor/bootstrap-vue/src/components/tabs/tabs.spec.js +0 -778
  101. package/src/vendor/bootstrap-vue/src/components/toast/README.md +0 -655
  102. package/src/vendor/bootstrap-vue/src/components/toast/helpers/bv-toast.spec.js +0 -117
  103. package/src/vendor/bootstrap-vue/src/components/toast/package.json +0 -184
  104. package/src/vendor/bootstrap-vue/src/components/toast/toast.spec.js +0 -294
  105. package/src/vendor/bootstrap-vue/src/components/toast/toaster.spec.js +0 -77
  106. package/src/vendor/bootstrap-vue/src/components/tooltip/README.md +0 -559
  107. package/src/vendor/bootstrap-vue/src/components/tooltip/package.json +0 -258
  108. package/src/vendor/bootstrap-vue/src/components/tooltip/tooltip.spec.js +0 -1240
  109. package/src/vendor/bootstrap-vue/src/components/transition/package.json +0 -5
  110. package/src/vendor/bootstrap-vue/src/components/transporter/package.json +0 -5
  111. package/src/vendor/bootstrap-vue/src/components/transporter/transporter.spec.js +0 -85
  112. package/src/vendor/bootstrap-vue/src/directives/modal/modal.spec.js +0 -191
  113. package/src/vendor/bootstrap-vue/src/directives/tooltip/README.md +0 -521
  114. package/src/vendor/bootstrap-vue/src/directives/tooltip/package.json +0 -131
  115. package/src/vendor/bootstrap-vue/src/directives/tooltip/tooltip.spec.js +0 -190
  116. package/src/vendor/bootstrap-vue/src/directives/visible/README.md +0 -244
  117. package/src/vendor/bootstrap-vue/src/directives/visible/package.json +0 -24
  118. package/src/vendor/bootstrap-vue/src/mixins/attrs.spec.js +0 -194
  119. package/src/vendor/bootstrap-vue/src/mixins/click-out.spec.js +0 -52
  120. package/src/vendor/bootstrap-vue/src/mixins/focus-in.spec.js +0 -53
  121. package/src/vendor/bootstrap-vue/src/mixins/listen-on-document.spec.js +0 -117
  122. package/src/vendor/bootstrap-vue/src/mixins/listen-on-root.spec.js +0 -77
  123. package/src/vendor/bootstrap-vue/src/mixins/listen-on-window.spec.js +0 -115
  124. package/src/vendor/bootstrap-vue/src/mixins/listeners.spec.js +0 -245
  125. package/src/vendor/bootstrap-vue/src/utils/bv-event.class.spec.js +0 -66
  126. package/src/vendor/bootstrap-vue/src/utils/clone-deep.spec.js +0 -70
  127. package/src/vendor/bootstrap-vue/src/utils/config.spec.js +0 -169
  128. package/src/vendor/bootstrap-vue/src/utils/css-escape.spec.js +0 -82
  129. package/src/vendor/bootstrap-vue/src/utils/dom.spec.js +0 -291
  130. package/src/vendor/bootstrap-vue/src/utils/events.spec.js +0 -41
  131. package/src/vendor/bootstrap-vue/src/utils/get.spec.js +0 -109
  132. package/src/vendor/bootstrap-vue/src/utils/inspect.spec.js +0 -251
  133. package/src/vendor/bootstrap-vue/src/utils/loose-equal.spec.js +0 -203
  134. package/src/vendor/bootstrap-vue/src/utils/normalize-slot.spec.js +0 -63
  135. package/src/vendor/bootstrap-vue/src/utils/number.spec.js +0 -72
  136. package/src/vendor/bootstrap-vue/src/utils/object.spec.js +0 -61
  137. package/src/vendor/bootstrap-vue/src/utils/props.spec.js +0 -112
  138. package/src/vendor/bootstrap-vue/src/utils/router.spec.js +0 -248
  139. package/src/vendor/bootstrap-vue/src/utils/string.spec.js +0 -65
  140. package/src/vendor/bootstrap-vue/src/utils/stringify-object-values.spec.js +0 -47
  141. package/src/vendor/bootstrap-vue/src/utils/warn.spec.js +0 -54
@@ -1,559 +0,0 @@
1
- # Tooltip
2
-
3
- > Easily add tooltips to elements or components via the `<b-tooltip>` component or
4
- > [`v-b-tooltip`](/docs/directives/tooltip) directive (preferred method).
5
-
6
- ```html
7
- <div class="text-center my-3">
8
- <b-button v-b-tooltip.hover title="Tooltip directive content">
9
- Hover Me
10
- </b-button>
11
-
12
- <b-button id="tooltip-target-1">
13
- Hover Me
14
- </b-button>
15
- <b-tooltip target="tooltip-target-1" triggers="hover">
16
- I am tooltip <b>component</b> content!
17
- </b-tooltip>
18
- </div>
19
-
20
- <!-- b-tooltip.vue -->
21
- ```
22
-
23
- ## Overview
24
-
25
- Things to know when using tooltip component:
26
-
27
- - Tooltips rely on the 3rd party library [Popper.js](https://popper.js.org/) for positioning.
28
- - Tooltips require BootstrapVue's custom SCSS/CSS in order to function correctly, and for variants.
29
- - Triggering tooltips on hidden elements will not work.
30
- - Specify `container` as `null` (default, appends to `<body>`) to avoid rendering problems in more
31
- complex components (like input groups, button groups, etc.). You can use container to optionally
32
- specify a different element to append the rendered tooltip to.
33
- - Tooltips for `disabled` elements must be triggered on a wrapper element.
34
- - When triggered from hyperlinks that span multiple lines, tooltips will be centered. Use
35
- white-space: nowrap; on your `<a>`s, `<b-link>`s and `<router-link>`s to avoid this behavior.
36
-
37
- ## Target
38
-
39
- The target is the _trigger_ element (or component) that will trigger the tooltip. The target is
40
- specified via the `target` prop, and can be any of the following:
41
-
42
- - A string identifying the ID of the trigger element (or ID of the root element of a component)
43
- - A reference (ref) to an `HTMLElement` or an `SVGElement` (e.g. `this.$refs.refName`)
44
- - A reference (ref) to a component that has either an `HTMLElement` or `SVGElement` as its root
45
- element (e.g. `this.$refs.refName`)
46
- - A function (callback) that returns a reference to an `HTMLElement` or `SVGElement`
47
-
48
- For more information on references, see the official
49
- [Vue documentation](https://vuejs.org/v2/api/#vm-refs).
50
-
51
- **Note:**
52
-
53
- The target element **must** exist in the document before `<b-tooltip>` is mounted. If the target
54
- element is not found during mount, the tooltip will never open. Always place your `<b-tooltip>`
55
- component lower in the DOM than your target element. This rule also applies if a callback function
56
- is used as target element, since that callback is called only once on mount.
57
-
58
- `HTMLElement` refers to standard HTML elements such as `<div>`, `<button>`, etc, while `SVGElement`
59
- refers to `<svg>` or supported child elements of SVGs.
60
-
61
- ## Positioning
62
-
63
- Twelve options are available for positioning: `top`, `topleft`, `topright`, `right`, `righttop`,
64
- `rightbottom`, `bottom`, `bottomleft`, `bottomright`, `left`, `lefttop`, and `leftbottom` aligned.
65
- The default position is `top`. Positioning is relative to the trigger element.
66
-
67
- <section class="bd-example bd-example-tooltip-static">
68
- <div class="tooltip b-tooltip bs-tooltip-top bs-tooltip-top-docs" role="tooltip">
69
- <div class="arrow" style="left: calc(50% - 6px)"></div>
70
- <div class="tooltip-inner">Tooltip on the top</div>
71
- </div>
72
- <div class="tooltip b-tooltip bs-tooltip-top bs-tooltip-top-docs" role="tooltip">
73
- <div class="arrow" style="right: 0px"></div>
74
- <div class="tooltip-inner">Tooltip on the topleft</div>
75
- </div>
76
- <div class="tooltip b-tooltip bs-tooltip-top bs-tooltip-top-docs" role="tooltip">
77
- <div class="arrow" style="left: 0px"></div>
78
- <div class="tooltip-inner">Tooltip on the topright</div>
79
- </div>
80
- <div class="tooltip b-tooltip bs-tooltip-right bs-tooltip-right-docs" role="tooltip">
81
- <div class="arrow" style="top: 5px"></div>
82
- <div class="tooltip-inner">Tooltip on the right</div>
83
- </div>
84
- <div class="tooltip b-tooltip bs-tooltip-right bs-tooltip-right-docs" role="tooltip">
85
- <div class="arrow" style="bottom: 0px"></div>
86
- <div class="tooltip-inner">Tooltip on the righttop</div>
87
- </div>
88
- <div class="tooltip b-tooltip bs-tooltip-right bs-tooltip-right-docs" role="tooltip">
89
- <div class="arrow" style="top: 0px"></div>
90
- <div class="tooltip-inner">Tooltip on the rightbottom</div>
91
- </div>
92
- <div class="tooltip b-tooltip bs-tooltip-bottom bs-tooltip-bottom-docs" role="tooltip">
93
- <div class="arrow" style="left: calc(50% - 6px)"></div>
94
- <div class="tooltip-inner">Tooltip on the bottom</div>
95
- </div>
96
- <div class="tooltip b-tooltip bs-tooltip-bottom bs-tooltip-bottom-docs" role="tooltip">
97
- <div class="arrow" style="right: 0px"></div>
98
- <div class="tooltip-inner">Tooltip on the bottomleft</div>
99
- </div>
100
- <div class="tooltip b-tooltip bs-tooltip-bottom bs-tooltip-bottom-docs" role="tooltip">
101
- <div class="arrow" style="left: 0px"></div>
102
- <div class="tooltip-inner">Tooltip on the bottomright</div>
103
- </div>
104
- <div class="tooltip b-tooltip bs-tooltip-left bs-tooltip-left-docs" role="tooltip">
105
- <div class="arrow" style="top: 5px"></div>
106
- <div class="tooltip-inner">Tooltip on the left</div>
107
- </div>
108
- <div class="tooltip b-tooltip bs-tooltip-left bs-tooltip-left-docs" role="tooltip">
109
- <div class="arrow" style="bottom: 0px"></div>
110
- <div class="tooltip-inner">Tooltip on the lefttop</div>
111
- </div>
112
- <div class="tooltip b-tooltip bs-tooltip-left bs-tooltip-left-docs" role="tooltip">
113
- <div class="arrow" style="top: 0px"></div>
114
- <div class="tooltip-inner">Tooltip on the leftbottom</div>
115
- </div>
116
- </section>
117
-
118
- Refer to the [Tooltip directive](/docs/directives/tooltip/#positioning) documentation for live
119
- examples of positioning.
120
-
121
- ## Triggers
122
-
123
- Tooltips can be triggered (opened/closed) via any combination of `click`, `hover` and `focus`. The
124
- default trigger is `hover focus`. Or a trigger of `manual` can be specified, where the popover can
125
- only be opened or closed [programmatically](#programmatically-disabling-tooltip).
126
-
127
- If a tooltip has more than one trigger, then all triggers must be cleared before the tooltip will
128
- close. I.e. if a tooltip has the trigger `focus click`, and it was opened by `focus`, and the user
129
- then clicks the trigger element, they must click it again **and** move focus to close the tooltip.
130
-
131
- ### Caveats with `focus` trigger on `<button>` elements
132
-
133
- For proper cross-browser and cross-platform behavior when using only the `focus` trigger, you must
134
- use an element that renders the `<a>` tag, not the `<button>` tag, and you also must include a
135
- `tabindex="0"` attribute.
136
-
137
- The following will generate an `<a>` that looks like a button:
138
-
139
- ```html
140
- <b-button
141
- href="#"
142
- tabindex="0"
143
- v-b-tooltip.focus
144
- title="Tooltip title"
145
- >
146
- Link button with tooltip directive
147
- </b-button>
148
-
149
- <b-button id="link-button" href="#" tabindex="0">
150
- Link button with tooltip component
151
- </b-button>
152
- <b-tooltip target="link-button" title="Tooltip title" triggers="focus">
153
- Tooltip title
154
- </b-tooltip>
155
- ```
156
-
157
- ### Making tooltips work for keyboard and assistive technology users
158
-
159
- You should only add tooltips to HTML elements that are traditionally keyboard-focusable and
160
- interactive (such as links, buttons, or form controls). Although arbitrary HTML elements (such as
161
- `<span>`s) can be made focusable by adding the `tabindex="0"` attribute, this will add potentially
162
- annoying and confusing tab stops on non-interactive elements for keyboard users. In addition, most
163
- assistive technologies currently do not announce the tooltip in this situation.
164
-
165
- Additionally, do not rely solely on `hover` as the trigger for your tooltip, as this will make your
166
- tooltips _impossible to trigger for keyboard-only users_.
167
-
168
- ### Disabled elements
169
-
170
- Elements with the `disabled` attribute aren’t interactive, meaning users cannot focus, hover, or
171
- click them to trigger a tooltip (or popover). As a workaround, you’ll want to trigger the tooltip
172
- from a wrapper `<div>` or `<span>`, ideally made keyboard-focusable using `tabindex="0"`, and
173
- override the `pointer-events` on the disabled element.
174
-
175
- ```html
176
- <div>
177
- <span id="disabled-wrapper" class="d-inline-block" tabindex="0">
178
- <b-button variant="primary" style="pointer-events: none;" disabled>Disabled button</b-button>
179
- </span>
180
- <b-tooltip target="disabled-wrapper">Disabled tooltip</b-tooltip>
181
- </div>
182
-
183
- <!-- disabled-trigger-element.vue -->
184
- ```
185
-
186
- ## `<b-tooltip>` component usage
187
-
188
- ```html
189
- <b-container fluid>
190
- <b-row>
191
- <b-col md="4" class="py-4">
192
- <b-button id="button-1" variant="outline-success">Live chat</b-button>
193
- </b-col>
194
- <b-col md="4" class="py-4">
195
- <b-button id="button-2" variant="outline-success">Html chat</b-button>
196
- </b-col>
197
- <b-col md="4" class="py-4">
198
- <b-button ref="button-3" variant="outline-success">Alternative chat</b-button>
199
- </b-col>
200
- </b-row>
201
-
202
- <!-- Tooltip title specified via prop title -->
203
- <b-tooltip target="button-1" title="Online!"></b-tooltip>
204
-
205
- <!-- HTML title specified via default slot -->
206
- <b-tooltip target="button-2" placement="bottom">
207
- Hello <strong>World!</strong>
208
- </b-tooltip>
209
-
210
- <!-- Tooltip for an element identified by ref -->
211
- <b-tooltip :target="() => $refs['button-3']" title="Alternative!"></b-tooltip>
212
- </b-container>
213
-
214
- <!-- b-tooltip-component.vue -->
215
- ```
216
-
217
- ### Component options
218
-
219
- | Prop | Default | Description | Supported values |
220
- | -------------------- | ---------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ |
221
- | `target` | `null` | Element String ID, or a reference to an element or component, or a function returning either of them, that you want to trigger the tooltip **Required** | Any valid, in-document unique element ID, element reference or component reference or a function returning any such ID / reference |
222
- | `title` | `null` | Tooltip content (text only, no HTML). if HTML is required, place it in the default slot | Plain text |
223
- | `placement` | `'top'` | Tooltip position, relative to the trigger element | `top`, `bottom`, `left`, `right`, `auto`, `topleft`, `topright`, `bottomleft`, `bottomright`, `lefttop`, `leftbottom`, `righttop`, `rightbottom` |
224
- | `fallback-placement` | `'flip'` | Auto-flip placement behaviour of the tooltip, relative to the trigger element | `flip`, `clockwise`, `counterclockwise`, or an array of valid placements evaluated from left to right |
225
- | `triggers` | `'hover focus'` | Space separated list of event(s), which will trigger open/close of tooltip | `hover`, `focus`, `click`. Note `blur` is a special use case to close tooltip on next click, usually used in conjunction with `click`. |
226
- | `no-fade` | `false` | Disable fade animation when set to `true` | `true` or `false` |
227
- | `delay` | `50` | Delay showing and hiding of tooltip by specified number of milliseconds. Can also be specified as an object in the form of `{ show: 100, hide: 400 }` allowing different show and hide delays | `0` and up, integers only. |
228
- | `offset` | `0` | Shift the center of the tooltip by specified number of pixels | Any negative or positive integer |
229
- | `container` | `null` | Element string ID to append rendered tooltip into. If `null` or element not found, tooltip is appended to `<body>` (default) | Any valid in-document unique element ID. |
230
- | `boundary` | `'scrollParent'` | The container that the tooltip will be constrained visually. The default should suffice in most cases, but you may need to change this if your target element is in a small container with overflow scroll | `'scrollParent'` (default), `'viewport'`, `'window'`, or a reference to an HTML element. |
231
- | `boundary-padding` | `5` | Amount of pixel used to define a minimum distance between the boundaries and the tooltip. This makes sure the tooltip always has a little padding between the edges of its container | Any positive number |
232
- | `noninteractive` | `false` | Whether the tooltip should not be user-interactive | `true` or `false` |
233
- | `variant` | `null` | Contextual color variant for the tooltip | Any contextual theme color variant name |
234
- | `custom-class` | `null` | A custom classname to apply to the tooltip outer wrapper element | A string |
235
- | `id` | `null` | An ID to use on the tooltip root element. If none is provided, one will automatically be generated. If you do provide an ID, it _must_ be guaranteed to be unique on the rendered page | A valid unique element ID string |
236
-
237
- ### Noninteractive tooltips
238
-
239
- BootstrapVue's tooltips are user-interactive by default for accessibility reasons. To restore
240
- Bootstraps default behavior apply the `noninteractive` prop:
241
-
242
- ```html
243
- <div class="text-center">
244
- <div>
245
- <b-button id="tooltip-button-interactive">My tooltip is interactive</b-button>
246
- <b-tooltip target="tooltip-button-interactive">I will stay open when hovered</b-tooltip>
247
- </div>
248
-
249
- <div class="mt-3">
250
- <b-button id="tooltip-button-not-interactive">Mine is not...</b-button>
251
- <b-tooltip target="tooltip-button-not-interactive" noninteractive>Catch me if you can!</b-tooltip>
252
- </div>
253
- </div>
254
-
255
- <!-- b-tooltip-interactive.vue -->
256
- ```
257
-
258
- ### Variants and custom class
259
-
260
- BootstrapVue's tooltips support contextual color variants via our custom CSS, via the `variant`
261
- prop:
262
-
263
- ```html
264
- <div class="text-center">
265
- <b-button id="tooltip-button-variant">Button</b-button>
266
- <b-tooltip target="tooltip-button-variant" variant="danger">Danger variant tooltip</b-tooltip>
267
- </div>
268
-
269
- <!-- b-tooltip-variant.vue -->
270
- ```
271
-
272
- Bootstrap default theme variants are: `danger`, `warning`, `success`, `primary`, `secondary`,
273
- `info`, `light`, and `dark`. You can change or add additional variants via Bootstrap
274
- [SCSS variables](/docs/reference/theming)
275
-
276
- A custom class can be applied to the tooltip outer wrapper `<div>` by using the `custom-class` prop:
277
-
278
- ```html
279
- <div class="text-center">
280
- <b-button id="my-button">Button</b-button>
281
- <b-tooltip target="my-button" custom-class="my-tooltip-class">Tooltip Title</b-tooltip>
282
- </div>
283
- ```
284
-
285
- `variant` and `custom-class` are reactive and can be changed while the tooltip is open.
286
-
287
- Refer to the [tooltip directive](/docs/directives/tooltip) docs on applying variants and custom
288
- class to the directive version.
289
-
290
- ### Programmatically show and hide tooltip
291
-
292
- You can manually control the visibility of a tooltip via the syncable Boolean `show` prop. Setting
293
- it to `true` will show the tooltip, while setting it to `false` will hide the tooltip.
294
-
295
- ```html
296
- <template>
297
- <div class="text-center">
298
- <div>
299
- <b-button id="tooltip-button-1" variant="primary">I have a tooltip</b-button>
300
- </div>
301
-
302
- <div class="mt-3">
303
- <b-button @click="show = !show">Toggle Tooltip</b-button>
304
- </div>
305
-
306
- <b-tooltip :show.sync="show" target="tooltip-button-1" placement="top">
307
- Hello <strong>World!</strong>
308
- </b-tooltip>
309
- </div>
310
- </template>
311
- <script>
312
- export default {
313
- data: {
314
- show: true
315
- }
316
- }
317
- </script>
318
-
319
- <!-- b-tooltip-show-sync.vue -->
320
- ```
321
-
322
- To make the tooltip shown on initial render, simply add the `show` prop on `<b-tooltip>`:
323
-
324
- ```html
325
- <div class="text-center">
326
- <b-button id="tooltip-button-2" variant="primary">Button</b-button>
327
- <b-tooltip show target="tooltip-button-2">I start open</b-tooltip>
328
- </div>
329
-
330
- <!-- b-tooltip-show-open.vue -->
331
- ```
332
-
333
- Programmatic control can also be affected by submitting `'open'` and `'close'` events to the tooltip
334
- by reference.
335
-
336
- ```html
337
- <template>
338
- <div class="d-flex flex-column text-md-center">
339
- <div class="p-2">
340
- <b-button id="tooltip-button-show-event" variant="primary">I have a tooltip</b-button>
341
- </div>
342
-
343
- <div class="p-2">
344
- <b-button class="px-1" @click="onOpen">Open</b-button>
345
- <b-button class="px-1" @click="onClose">Close</b-button>
346
- </div>
347
-
348
- <b-tooltip ref="tooltip" target="tooltip-button-show-event">
349
- Hello <strong>World!</strong>
350
- </b-tooltip>
351
- </div>
352
- </template>
353
-
354
- <script>
355
- export default {
356
- methods: {
357
- onOpen() {
358
- this.$refs.tooltip.$emit('open')
359
- },
360
- onClose() {
361
- this.$refs.tooltip.$emit('close')
362
- }
363
- }
364
- }
365
- </script>
366
-
367
- <!-- b-tooltip-show-ref-event.vue -->
368
- ```
369
-
370
- You can also use `$root` events to trigger the showing and hiding of tooltip(s). See the **Hiding
371
- and showing tooltips via \$root events** section below for details.
372
-
373
- ### Programmatically disabling tooltip
374
-
375
- You can disable tooltip via the syncable Boolean prop `disabled` (default is `false`) Setting it to
376
- `true` will disable the tooltip. If the tooltip is currently visible when disabled is set to
377
- `false`, the tooltip will remain visible until it is enabled or programmatically closed. If the
378
- tooltip is disabled/enabled via \$root events (see below), your `disabled` value will be updated as
379
- long as you have provided the `.sync` prop modifier.
380
-
381
- ```html
382
- <template>
383
- <div class="d-flex flex-column text-md-center">
384
- <div class="p-2">
385
- <b-button id="tooltip-button-disable" variant="primary">I have a tooltip</b-button>
386
- </div>
387
-
388
- <div class="p-2">
389
- <b-button @click="disabled = !disabled">
390
- {{ disabled ? 'Enable' : 'Disable' }} Tooltip by prop
391
- </b-button>
392
- <b-button @click="disableByRef">
393
- {{ disabled ? 'Enable' : 'Disable' }} Tooltip by $ref event
394
- </b-button>
395
-
396
- <b-tooltip :disabled.sync="disabled" ref="tooltip" target="tooltip-button-disable">
397
- Hello <strong>World!</strong>
398
- </b-tooltip>
399
- </div>
400
- </div>
401
- </template>
402
-
403
- <script>
404
- export default {
405
- data() {
406
- return {
407
- disabled: false
408
- }
409
- },
410
- methods: {
411
- disableByRef() {
412
- if (this.disabled) {
413
- this.$refs.tooltip.$emit('enable')
414
- } else {
415
- this.$refs.tooltip.$emit('disable')
416
- }
417
- }
418
- }
419
- }
420
- </script>
421
-
422
- <!-- b-tooltip-disable.vue -->
423
- ```
424
-
425
- **Note:** _In the above example, since we are using the default tooltip triggers of `focus hover`,
426
- the tooltip will close before it is disabled due to losing focus (and hover) to the toggle button._
427
-
428
- You can also emit `$root` events to trigger disabling and enabling of tooltip(s). See the
429
- **Disabling and enabling tooltips via \$root events** section below for details.
430
-
431
- You can also emit `$root` events to trigger disabling and enabling of popover(s). See the
432
- **Disabling and enabling tooltips via \$root events** section below for details.
433
-
434
- ## `v-b-tooltip` directive usage
435
-
436
- The `v-b-tooltip` directive makes adding tooltips even easier, without additional placeholder
437
- markup:
438
-
439
- ```html
440
- <b-container fluid>
441
- <b-row>
442
- <b-col md="6" class="py-4">
443
- <b-button v-b-tooltip title="Online!" variant="outline-success">Live chat</b-button>
444
- </b-col>
445
-
446
- <b-col md="6" class="py-4">
447
- <b-button
448
- v-b-tooltip.html
449
- title="Hello <strong>World!</strong>"
450
- variant="outline-success"
451
- >
452
- Html chat
453
- </b-button>
454
- </b-col>
455
- </b-row>
456
- </b-container>
457
-
458
- <!-- b-tooltip-directive.vue -->
459
- ```
460
-
461
- Refer to the [`v-b-tooltip` documentation](/docs/directives/tooltip) for more information and
462
- features of the directive format.
463
-
464
- ## 'Global' \$root instance events
465
-
466
- Using `$root` instance it is possible to emit and listen events somewhere out of a component, where
467
- `<b-collapse>` is used. In short, `$root` behaves like a global event emitters and listener. Details
468
- about `$root` instance can be found in
469
- [the official Vue docs](https://vuejs.org/v2/guide/components-edge-cases.html#Accessing-the-Root-Instance).
470
-
471
- ### Hiding and showing tooltips via \$root events
472
-
473
- You can close (hide) **all open tooltips** by emitting the `bv::hide::tooltip` event on \$root:
474
-
475
- ```js
476
- this.$root.$emit('bv::hide::tooltip')
477
- ```
478
-
479
- To close a **specific tooltip**, pass the trigger element's `id`, or the `id` of the tooltip (if one
480
- was provided via the `id` prop), as the argument:
481
-
482
- ```js
483
- this.$root.$emit('bv::hide::tooltip', 'my-trigger-button-id')
484
- ```
485
-
486
- To open a **specific tooltip**, pass the trigger element's `id`, or the `id` of the tooltip (if one
487
- was provided via the `id` prop), as the argument when emitting the `bv::show::tooltip` \$root event:
488
-
489
- ```js
490
- this.$root.$emit('bv::show::tooltip', 'my-trigger-button-id')
491
- ```
492
-
493
- To open all tooltips simultaneously, omit the `id` argument when emitting the `bv::show::tooltip`
494
- event.
495
-
496
- These events work for both the component **and** directive versions of tooltip.
497
-
498
- **Note:** _the **trigger element** must exist in the DOM and be in a visible state in order for the
499
- tooltip to show._
500
-
501
- ### Disabling and enabling tooltips via \$root events
502
-
503
- You can disable **all open tooltips** by emitting the `bv::disable::tooltip` event on \$root:
504
-
505
- ```js
506
- this.$root.$emit('bv::disable::tooltip')
507
- ```
508
-
509
- To disable a **specific tooltip**, pass the trigger element's `id`, or the `id` of the tooltip (if
510
- one was provided via the `id` prop), as the argument:
511
-
512
- ```js
513
- this.$root.$emit('bv::disable::tooltip', 'my-trigger-button-id')
514
- ```
515
-
516
- To enable a **specific tooltip**, pass the trigger element's `id`, or the `id` of the tooltip (if
517
- one was provided via the `id` prop), as the argument when emitting the `bv::enable::tooltip` \$root
518
- event:
519
-
520
- ```js
521
- this.$root.$emit('bv::enable::tooltip', 'my-trigger-button-id')
522
- ```
523
-
524
- To enable all tooltips simultaneously, omit the `id` argument when emitting the
525
- `bv::enable::tooltip` event.
526
-
527
- These events work for both the component **and** directive versions of tooltip.
528
-
529
- **Note:** _The **trigger element** must exist in the DOM in order for the tooltip to be enabled or
530
- disabled._
531
-
532
- ### Listening to tooltip changes via \$root events
533
-
534
- To listen to any tooltip opening, use:
535
-
536
- ```js
537
- export default {
538
- mounted() {
539
- this.$root.$on('bv::tooltip::show', bvEvent => {
540
- console.log('bvEvent:', bvEvent)
541
- })
542
- }
543
- }
544
- ```
545
-
546
- Refer to the [Events](/docs/components/tooltip#component-reference) section of documentation for the
547
- full list of events.
548
-
549
- ## Accessibility
550
-
551
- The trigger element, when the tooltip is showing, will have the attribute `aria-describedby` set
552
- with the auto generated ID of the tooltip.
553
-
554
- **Note:** The animation effect of this component is dependent on the `prefers-reduced-motion` media
555
- query. See the
556
- [reduced motion section of our accessibility documentation](?path=/docs/base-tooltip--docs#accessibility)
557
- for additional details.
558
-
559
- <!-- Component reference added automatically from component package.json -->