* Docs: missing aria-hidden on some decorative SVGs * Docs: missing aria-hidden on check mark on docs version dropdown in docs' header * Docs: missing aria-hidden on check mark on theme toggler dropdown in docs' header * Docs: missing aria-hidden on position utility example * Docs: missing aria-hidden on features examples * Docs: missing aria-hidden * Docs: missing label on link * Build(deps-dev): Bump rollup from 4.20.0 to 4.21.1 (#40775) Bumps [rollup](https://github.com/rollup/rollup) from 4.20.0 to 4.21.1. - [Release notes](https://github.com/rollup/rollup/releases) - [Changelog](https://github.com/rollup/rollup/blob/master/CHANGELOG.md) - [Commits](https://github.com/rollup/rollup/compare/v4.20.0...v4.21.1) --- updated-dependencies: - dependency-name: rollup dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Build(deps-dev): Bump @babel/preset-env from 7.25.3 to 7.25.4 (#40773) Bumps [@babel/preset-env](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-env) from 7.25.3 to 7.25.4. - [Release notes](https://github.com/babel/babel/releases) - [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md) - [Commits](https://github.com/babel/babel/commits/v7.25.4/packages/babel-preset-env) --- updated-dependencies: - dependency-name: "@babel/preset-env" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Build(deps-dev): Bump hugo-bin from 0.129.1 to 0.130.1 (#40774) Bumps [hugo-bin](https://github.com/fenneclab/hugo-bin) from 0.129.1 to 0.130.1. - [Release notes](https://github.com/fenneclab/hugo-bin/releases) - [Commits](https://github.com/fenneclab/hugo-bin/compare/v0.129.1...v0.130.1) --- updated-dependencies: - dependency-name: hugo-bin dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * npm audit fix * Build(deps-dev): Bump stylelint-config-twbs-bootstrap (#40786) Bumps [stylelint-config-twbs-bootstrap](https://github.com/twbs/stylelint-config-twbs-bootstrap) from 14.2.0 to 15.0.0. - [Release notes](https://github.com/twbs/stylelint-config-twbs-bootstrap/releases) - [Commits](https://github.com/twbs/stylelint-config-twbs-bootstrap/compare/v14.2.0...v15.0.0) --- updated-dependencies: - dependency-name: stylelint-config-twbs-bootstrap dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Build(deps-dev): Bump rollup from 4.21.1 to 4.21.2 (#40785) Bumps [rollup](https://github.com/rollup/rollup) from 4.21.1 to 4.21.2. - [Release notes](https://github.com/rollup/rollup/releases) - [Changelog](https://github.com/rollup/rollup/blob/master/CHANGELOG.md) - [Commits](https://github.com/rollup/rollup/compare/v4.21.1...v4.21.2) --- updated-dependencies: - dependency-name: rollup dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Build(deps-dev): Bump eslint-plugin-import from 2.29.1 to 2.30.0 (#40783) Bumps [eslint-plugin-import](https://github.com/import-js/eslint-plugin-import) from 2.29.1 to 2.30.0. - [Release notes](https://github.com/import-js/eslint-plugin-import/releases) - [Changelog](https://github.com/import-js/eslint-plugin-import/blob/main/CHANGELOG.md) - [Commits](https://github.com/import-js/eslint-plugin-import/compare/v2.29.1...v2.30.0) --- updated-dependencies: - dependency-name: eslint-plugin-import dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Build(deps-dev): Bump rtlcss from 4.2.0 to 4.3.0 (#40782) Bumps [rtlcss](https://github.com/MohammadYounes/rtlcss) from 4.2.0 to 4.3.0. - [Release notes](https://github.com/MohammadYounes/rtlcss/releases) - [Changelog](https://github.com/MohammadYounes/rtlcss/blob/master/CHANGELOG.md) - [Commits](https://github.com/MohammadYounes/rtlcss/compare/v4.2.0...v4.3.0) --- updated-dependencies: - dependency-name: rtlcss dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Build(deps-dev): Bump @babel/cli from 7.24.8 to 7.25.6 (#40788) Bumps [@babel/cli](https://github.com/babel/babel/tree/HEAD/packages/babel-cli) from 7.24.8 to 7.25.6. - [Release notes](https://github.com/babel/babel/releases) - [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md) - [Commits](https://github.com/babel/babel/commits/v7.25.6/packages/babel-cli) --- updated-dependencies: - dependency-name: "@babel/cli" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Docs: clarify the title on the 'About > Overview' page (#40762) * Build(deps-dev): Bump postcss from 8.4.41 to 8.4.44 (#40784) Bumps [postcss](https://github.com/postcss/postcss) from 8.4.41 to 8.4.44. - [Release notes](https://github.com/postcss/postcss/releases) - [Changelog](https://github.com/postcss/postcss/blob/main/CHANGELOG.md) - [Commits](https://github.com/postcss/postcss/compare/8.4.41...8.4.44) --- updated-dependencies: - dependency-name: postcss dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: XhmikosR <xhmikosr@gmail.com> * Docs: add missing `$enable-css-grid` in 'Customize > Options' (#40797) Co-authored-by: Julien Déramond <juderamond@gmail.com> * Remove aria-label from this PR * Rollback unwanted modif * Build(deps-dev): Bump postcss from 8.4.44 to 8.4.45 (#40806) Bumps [postcss](https://github.com/postcss/postcss) from 8.4.44 to 8.4.45. - [Release notes](https://github.com/postcss/postcss/releases) - [Changelog](https://github.com/postcss/postcss/blob/main/CHANGELOG.md) - [Commits](https://github.com/postcss/postcss/compare/8.4.44...8.4.45) --- updated-dependencies: - dependency-name: postcss dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Fix popover remaining open when toggled after being shown (#40803) Co-authored-by: Dmitry Sergienko <dmitry.sergienko@codefirst.net> Co-authored-by: Julien Déramond <juderamond@gmail.com> * Docs: update notice on Safari flexbox gap support in 'Helpers > Stacks' (#40844) * Add missing aria-hidden to decorative `<svg>` and `aria-label` and `role="img"` to informative ones in examples until dropdowns * . * Add missing aria-hidden to decorative `<svg>` and `aria-label` and `role="img"` to informative ones in examples until modals * rollback * rollback * Docs: update `min-height` inline style for modal with long content (#40870) * Add missing svgs * Build(deps): Bump body-parser in the npm_and_yarn group (#40862) Bumps the npm_and_yarn group with 1 update: [body-parser](https://github.com/expressjs/body-parser). Updates `body-parser` from 1.20.2 to 1.20.3 - [Release notes](https://github.com/expressjs/body-parser/releases) - [Changelog](https://github.com/expressjs/body-parser/blob/master/HISTORY.md) - [Commits](https://github.com/expressjs/body-parser/compare/1.20.2...1.20.3) --- updated-dependencies: - dependency-name: body-parser dependency-type: indirect dependency-group: npm_and_yarn ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Build(deps-dev): Bump rollup in the npm_and_yarn group (#40886) Bumps the npm_and_yarn group with 1 update: [rollup](https://github.com/rollup/rollup). Updates `rollup` from 4.21.2 to 4.23.0 - [Release notes](https://github.com/rollup/rollup/releases) - [Changelog](https://github.com/rollup/rollup/blob/master/CHANGELOG.md) - [Commits](https://github.com/rollup/rollup/compare/v4.21.2...v4.23.0) --- updated-dependencies: - dependency-name: rollup dependency-type: direct:development dependency-group: npm_and_yarn ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Build(deps-dev): Bump eslint from 8.57.0 to 8.57.1 (#40843) Bumps [eslint](https://github.com/eslint/eslint) from 8.57.0 to 8.57.1. - [Release notes](https://github.com/eslint/eslint/releases) - [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md) - [Commits](https://github.com/eslint/eslint/compare/v8.57.0...v8.57.1) --- updated-dependencies: - dependency-name: eslint dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Build(deps-dev): Bump hugo-bin from 0.130.1 to 0.132.0 (#40882) Bumps [hugo-bin](https://github.com/fenneclab/hugo-bin) from 0.130.1 to 0.132.0. - [Release notes](https://github.com/fenneclab/hugo-bin/releases) - [Commits](https://github.com/fenneclab/hugo-bin/compare/v0.130.1...v0.132.0) --- updated-dependencies: - dependency-name: hugo-bin dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Build(deps-dev): Bump npm-run-all2 from 6.2.2 to 6.2.3 (#40842) Bumps [npm-run-all2](https://github.com/bcomnes/npm-run-all2) from 6.2.2 to 6.2.3. - [Release notes](https://github.com/bcomnes/npm-run-all2/releases) - [Changelog](https://github.com/bcomnes/npm-run-all2/blob/master/CHANGELOG.md) - [Commits](https://github.com/bcomnes/npm-run-all2/compare/v6.2.2...v6.2.3) --- updated-dependencies: - dependency-name: npm-run-all2 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Dependabot: switch to grouped updates (#40888) * Build(deps-dev): Bump terser from 5.31.6 to 5.34.1 (#40883) Bumps [terser](https://github.com/terser/terser) from 5.31.6 to 5.34.1. - [Changelog](https://github.com/terser/terser/blob/master/CHANGELOG.md) - [Commits](https://github.com/terser/terser/compare/v5.31.6...v5.34.1) --- updated-dependencies: - dependency-name: terser dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Build(deps-dev): Bump the development-dependencies group across 1 directory with 9 updates (#40895) * Build(deps-dev): Bump the development-dependencies group across 1 directory with 9 updates Bumps the development-dependencies group with 9 updates in the / directory: | Package | From | To | | --- | --- | --- | | [@docsearch/js](https://github.com/algolia/docsearch) | `3.6.1` | `3.6.2` | | [@rollup/plugin-commonjs](https://github.com/rollup/plugins/tree/HEAD/packages/commonjs) | `26.0.1` | `28.0.0` | | [@rollup/plugin-node-resolve](https://github.com/rollup/plugins/tree/HEAD/packages/node-resolve) | `15.2.3` | `15.3.0` | | [@rollup/plugin-replace](https://github.com/rollup/plugins/tree/HEAD/packages/replace) | `5.0.7` | `6.0.1` | | [eslint-plugin-html](https://github.com/BenoitZugmeyer/eslint-plugin-html) | `8.1.1` | `8.1.2` | | [nodemon](https://github.com/remy/nodemon) | `3.1.4` | `3.1.7` | | [postcss](https://github.com/postcss/postcss) | `8.4.45` | `8.4.47` | | [sass](https://github.com/sass/dart-sass) | `1.77.8` | `1.78.0` | | [stylelint-config-twbs-bootstrap](https://github.com/twbs/stylelint-config-twbs-bootstrap) | `15.0.0` | `15.1.0` | Updates `@docsearch/js` from 3.6.1 to 3.6.2 - [Release notes](https://github.com/algolia/docsearch/releases) - [Changelog](https://github.com/algolia/docsearch/blob/main/CHANGELOG.md) - [Commits](https://github.com/algolia/docsearch/compare/v3.6.1...v3.6.2) Updates `@rollup/plugin-commonjs` from 26.0.1 to 28.0.0 - [Changelog](https://github.com/rollup/plugins/blob/master/packages/commonjs/CHANGELOG.md) - [Commits](https://github.com/rollup/plugins/commits/commonjs-v28.0.0/packages/commonjs) Updates `@rollup/plugin-node-resolve` from 15.2.3 to 15.3.0 - [Changelog](https://github.com/rollup/plugins/blob/master/packages/node-resolve/CHANGELOG.md) - [Commits](https://github.com/rollup/plugins/commits/node-resolve-v15.3.0/packages/node-resolve) Updates `@rollup/plugin-replace` from 5.0.7 to 6.0.1 - [Changelog](https://github.com/rollup/plugins/blob/master/packages/replace/CHANGELOG.md) - [Commits](https://github.com/rollup/plugins/commits/json-v6.0.1/packages/replace) Updates `eslint-plugin-html` from 8.1.1 to 8.1.2 - [Changelog](https://github.com/BenoitZugmeyer/eslint-plugin-html/blob/main/CHANGELOG.md) - [Commits](https://github.com/BenoitZugmeyer/eslint-plugin-html/compare/v8.1.1...v8.1.2) Updates `nodemon` from 3.1.4 to 3.1.7 - [Release notes](https://github.com/remy/nodemon/releases) - [Commits](https://github.com/remy/nodemon/compare/v3.1.4...v3.1.7) Updates `postcss` from 8.4.45 to 8.4.47 - [Release notes](https://github.com/postcss/postcss/releases) - [Changelog](https://github.com/postcss/postcss/blob/main/CHANGELOG.md) - [Commits](https://github.com/postcss/postcss/compare/8.4.45...8.4.47) Updates `sass` from 1.77.8 to 1.78.0 - [Release notes](https://github.com/sass/dart-sass/releases) - [Changelog](https://github.com/sass/dart-sass/blob/main/CHANGELOG.md) - [Commits](https://github.com/sass/dart-sass/compare/1.77.8...1.78.0) Updates `stylelint-config-twbs-bootstrap` from 15.0.0 to 15.1.0 - [Release notes](https://github.com/twbs/stylelint-config-twbs-bootstrap/releases) - [Commits](https://github.com/twbs/stylelint-config-twbs-bootstrap/compare/v15.0.0...v15.1.0) --- updated-dependencies: - dependency-name: "@docsearch/js" dependency-type: direct:development update-type: version-update:semver-patch dependency-group: development-dependencies - dependency-name: "@rollup/plugin-commonjs" dependency-type: direct:development update-type: version-update:semver-major dependency-group: development-dependencies - dependency-name: "@rollup/plugin-node-resolve" dependency-type: direct:development update-type: version-update:semver-minor dependency-group: development-dependencies - dependency-name: "@rollup/plugin-replace" dependency-type: direct:development update-type: version-update:semver-major dependency-group: development-dependencies - dependency-name: eslint-plugin-html dependency-type: direct:development update-type: version-update:semver-patch dependency-group: development-dependencies - dependency-name: nodemon dependency-type: direct:development update-type: version-update:semver-patch dependency-group: development-dependencies - dependency-name: postcss dependency-type: direct:development update-type: version-update:semver-patch dependency-group: development-dependencies - dependency-name: sass dependency-type: direct:development update-type: version-update:semver-minor dependency-group: development-dependencies - dependency-name: stylelint-config-twbs-bootstrap dependency-type: direct:development update-type: version-update:semver-minor dependency-group: development-dependencies ... Signed-off-by: dependabot[bot] <support@github.com> * Fix new stylelint-config-recess-order issues (#40887) * Pin sass to 1.78 If the issues are fixed, it should be updated again along with the caret operator. --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: XhmikosR <xhmikosr@gmail.com> * Update devDependencies * jasmine ^5.2.0 → ^5.3.0 * stylelint ^16.8.1 → ^16.9.0 * Remove unneeded flexbug workaround (#40876) This was only needed for Internet Explorer. Removing it saves a couple of bytes. :-) REF: https://github.com/philipwalton/flexbugs#flexbug-4 * package.json: ignore more deps * Docs: fix `$enable-css-grid` → `$enable-cssgrid` in 'Customize > Options' (#40818) * Docs: Indicate links in foreign language in Translations page (#40767) Co-authored-by: Julien Déramond <juderamond@gmail.com> Co-authored-by: Patrick H. Lauke <redux@splintered.co.uk> * Docs: Make "Edit in Stackblitz" links explicit in 'Examples' page (#40766) Co-authored-by: Julien Déramond <juderamond@gmail.com> * Docs: remove unused class in the homepage (#40900) Co-authored-by: Julien Déramond <juderamond@gmail.com> * Docs: drop useless `.justify-content-start` class in homepage (#40914) * Examples: fix Cheatsheet examples horizontal scrolling (#40799) * Docs: precise how to add new `.order-*` classes in 'Layout > Columns' (#40821) Co-authored-by: Tobi <TobiGr@users.noreply.github.com> Co-authored-by: Louis-Maxime Piton <louismaxime.piton@orange.com> * Docs: replace `.grid` by `.d-grid` in 'Utilities > Spacing' gap section (#40790) Co-authored-by: Julien Déramond <juderamond@gmail.com> * Build(deps-dev): Bump the development-dependencies group across 1 directory with 6 updates (#40920) Bumps the development-dependencies group with 6 updates in the / directory: | Package | From | To | | --- | --- | --- | | [@babel/cli](https://github.com/babel/babel/tree/HEAD/packages/babel-cli) | `7.25.6` | `7.25.7` | | [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) | `7.25.2` | `7.25.7` | | [@babel/preset-env](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-env) | `7.25.4` | `7.25.7` | | [eslint-plugin-import](https://github.com/import-js/eslint-plugin-import) | `2.30.0` | `2.31.0` | | [rollup](https://github.com/rollup/rollup) | `4.23.0` | `4.24.0` | | [sass-true](https://github.com/oddbird/true) | `8.0.0` | `8.1.0` | Updates `@babel/cli` from 7.25.6 to 7.25.7 - [Release notes](https://github.com/babel/babel/releases) - [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md) - [Commits](https://github.com/babel/babel/commits/v7.25.7/packages/babel-cli) Updates `@babel/core` from 7.25.2 to 7.25.7 - [Release notes](https://github.com/babel/babel/releases) - [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md) - [Commits](https://github.com/babel/babel/commits/v7.25.7/packages/babel-core) Updates `@babel/preset-env` from 7.25.4 to 7.25.7 - [Release notes](https://github.com/babel/babel/releases) - [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md) - [Commits](https://github.com/babel/babel/commits/v7.25.7/packages/babel-preset-env) Updates `eslint-plugin-import` from 2.30.0 to 2.31.0 - [Release notes](https://github.com/import-js/eslint-plugin-import/releases) - [Changelog](https://github.com/import-js/eslint-plugin-import/blob/main/CHANGELOG.md) - [Commits](https://github.com/import-js/eslint-plugin-import/compare/v2.30.0...v2.31.0) Updates `rollup` from 4.23.0 to 4.24.0 - [Release notes](https://github.com/rollup/rollup/releases) - [Changelog](https://github.com/rollup/rollup/blob/master/CHANGELOG.md) - [Commits](https://github.com/rollup/rollup/compare/v4.23.0...v4.24.0) Updates `sass-true` from 8.0.0 to 8.1.0 - [Release notes](https://github.com/oddbird/true/releases) - [Changelog](https://github.com/oddbird/true/blob/main/CHANGELOG.md) - [Commits](https://github.com/oddbird/true/compare/v8.0.0...v8.1.0) --- updated-dependencies: - dependency-name: "@babel/cli" dependency-type: direct:development update-type: version-update:semver-patch dependency-group: development-dependencies - dependency-name: "@babel/core" dependency-type: direct:development update-type: version-update:semver-patch dependency-group: development-dependencies - dependency-name: "@babel/preset-env" dependency-type: direct:development update-type: version-update:semver-patch dependency-group: development-dependencies - dependency-name: eslint-plugin-import dependency-type: direct:development update-type: version-update:semver-minor dependency-group: development-dependencies - dependency-name: rollup dependency-type: direct:development update-type: version-update:semver-minor dependency-group: development-dependencies - dependency-name: sass-true dependency-type: direct:development update-type: version-update:semver-minor dependency-group: development-dependencies ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Build(deps): Bump the npm_and_yarn group with 2 updates (#40929) Bumps the npm_and_yarn group with 2 updates: [cookie](https://github.com/jshttp/cookie) and [socket.io](https://github.com/socketio/socket.io). Updates `cookie` from 0.4.2 to 0.7.2 - [Release notes](https://github.com/jshttp/cookie/releases) - [Commits](https://github.com/jshttp/cookie/compare/v0.4.2...v0.7.2) Updates `socket.io` from 4.7.5 to 4.8.0 - [Release notes](https://github.com/socketio/socket.io/releases) - [Changelog](https://github.com/socketio/socket.io/blob/main/CHANGELOG.md) - [Commits](https://github.com/socketio/socket.io/compare/socket.io@4.7.5...socket.io@4.8.0) --- updated-dependencies: - dependency-name: cookie dependency-type: indirect dependency-group: npm_and_yarn - dependency-name: socket.io dependency-type: indirect dependency-group: npm_and_yarn ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Docs: fix `background-blend-mode` CSS value (#40931) * Docs: fix example hiding element except on medium and large devices in 'Utilities > Display > Hiding elements' (#40951) * Build(deps-dev): Bump the development-dependencies group across 1 directory with 6 updates (#40953) Bumps the development-dependencies group with 6 updates in the / directory: | Package | From | To | | --- | --- | --- | | [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) | `7.25.7` | `7.25.8` | | [@babel/preset-env](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-env) | `7.25.7` | `7.25.8` | | [@rollup/plugin-commonjs](https://github.com/rollup/plugins/tree/HEAD/packages/commonjs) | `28.0.0` | `28.0.1` | | [hugo-bin](https://github.com/fenneclab/hugo-bin) | `0.132.0` | `0.133.1` | | [stylelint](https://github.com/stylelint/stylelint) | `16.9.0` | `16.10.0` | | [terser](https://github.com/terser/terser) | `5.34.1` | `5.36.0` | Updates `@babel/core` from 7.25.7 to 7.25.8 - [Release notes](https://github.com/babel/babel/releases) - [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md) - [Commits](https://github.com/babel/babel/commits/v7.25.8/packages/babel-core) Updates `@babel/preset-env` from 7.25.7 to 7.25.8 - [Release notes](https://github.com/babel/babel/releases) - [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md) - [Commits](https://github.com/babel/babel/commits/v7.25.8/packages/babel-preset-env) Updates `@rollup/plugin-commonjs` from 28.0.0 to 28.0.1 - [Changelog](https://github.com/rollup/plugins/blob/master/packages/commonjs/CHANGELOG.md) - [Commits](https://github.com/rollup/plugins/commits/commonjs-v28.0.1/packages/commonjs) Updates `hugo-bin` from 0.132.0 to 0.133.1 - [Release notes](https://github.com/fenneclab/hugo-bin/releases) - [Commits](https://github.com/fenneclab/hugo-bin/compare/v0.132.0...v0.133.1) Updates `stylelint` from 16.9.0 to 16.10.0 - [Release notes](https://github.com/stylelint/stylelint/releases) - [Changelog](https://github.com/stylelint/stylelint/blob/main/CHANGELOG.md) - [Commits](https://github.com/stylelint/stylelint/compare/16.9.0...16.10.0) Updates `terser` from 5.34.1 to 5.36.0 - [Changelog](https://github.com/terser/terser/blob/master/CHANGELOG.md) - [Commits](https://github.com/terser/terser/compare/v5.34.1...v5.36.0) --- updated-dependencies: - dependency-name: "@babel/core" dependency-type: direct:development update-type: version-update:semver-patch dependency-group: development-dependencies - dependency-name: "@babel/preset-env" dependency-type: direct:development update-type: version-update:semver-patch dependency-group: development-dependencies - dependency-name: "@rollup/plugin-commonjs" dependency-type: direct:development update-type: version-update:semver-patch dependency-group: development-dependencies - dependency-name: hugo-bin dependency-type: direct:development update-type: version-update:semver-minor dependency-group: development-dependencies - dependency-name: stylelint dependency-type: direct:development update-type: version-update:semver-minor dependency-group: development-dependencies - dependency-name: terser dependency-type: direct:development update-type: version-update:semver-minor dependency-group: development-dependencies ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Docs: add ngx-bootstrap to JavaScript frameworks list (#40932) * Docs: fix transparent navbar in Windows high contrast mode (#40911) Co-authored-by: Julien Déramond <juderamond@gmail.com> * Docs: correct example formatting in 'Utilities > API' for linting compliance (#40973) * Build(deps-dev): Bump the development-dependencies group across 1 directory with 6 updates (#40978) Bumps the development-dependencies group with 6 updates in the / directory: | Package | From | To | | --- | --- | --- | | [@babel/cli](https://github.com/babel/babel/tree/HEAD/packages/babel-cli) | `7.25.7` | `7.25.9` | | [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) | `7.25.8` | `7.25.9` | | [@babel/preset-env](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-env) | `7.25.8` | `7.25.9` | | [hugo-bin](https://github.com/fenneclab/hugo-bin) | `0.133.1` | `0.133.5` | | [npm-run-all2](https://github.com/bcomnes/npm-run-all2) | `6.2.3` | `7.0.1` | | [vnu-jar](https://github.com/validator/validator) | `23.4.11` | `24.10.17` | Updates `@babel/cli` from 7.25.7 to 7.25.9 - [Release notes](https://github.com/babel/babel/releases) - [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md) - [Commits](https://github.com/babel/babel/commits/v7.25.9/packages/babel-cli) Updates `@babel/core` from 7.25.8 to 7.25.9 - [Release notes](https://github.com/babel/babel/releases) - [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md) - [Commits](https://github.com/babel/babel/commits/v7.25.9/packages/babel-core) Updates `@babel/preset-env` from 7.25.8 to 7.25.9 - [Release notes](https://github.com/babel/babel/releases) - [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md) - [Commits](https://github.com/babel/babel/commits/v7.25.9/packages/babel-preset-env) Updates `hugo-bin` from 0.133.1 to 0.133.5 - [Release notes](https://github.com/fenneclab/hugo-bin/releases) - [Commits](https://github.com/fenneclab/hugo-bin/compare/v0.133.1...v0.133.5) Updates `npm-run-all2` from 6.2.3 to 7.0.1 - [Release notes](https://github.com/bcomnes/npm-run-all2/releases) - [Changelog](https://github.com/bcomnes/npm-run-all2/blob/master/CHANGELOG.md) - [Commits](https://github.com/bcomnes/npm-run-all2/compare/v6.2.3...v7.0.1) Updates `vnu-jar` from 23.4.11 to 24.10.17 - [Release notes](https://github.com/validator/validator/releases) - [Changelog](https://github.com/validator/validator/blob/main/CHANGELOG.md) - [Commits](https://github.com/validator/validator/commits) --- updated-dependencies: - dependency-name: "@babel/cli" dependency-type: direct:development update-type: version-update:semver-patch dependency-group: development-dependencies - dependency-name: "@babel/core" dependency-type: direct:development update-type: version-update:semver-patch dependency-group: development-dependencies - dependency-name: "@babel/preset-env" dependency-type: direct:development update-type: version-update:semver-patch dependency-group: development-dependencies - dependency-name: hugo-bin dependency-type: direct:development update-type: version-update:semver-patch dependency-group: development-dependencies - dependency-name: npm-run-all2 dependency-type: direct:development update-type: version-update:semver-major dependency-group: development-dependencies - dependency-name: vnu-jar dependency-type: direct:development update-type: version-update:semver-major dependency-group: development-dependencies ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Build(deps-dev): Bump the development-dependencies group across 1 directory with 5 updates (#41010) Bumps the development-dependencies group with 5 updates in the / directory: | Package | From | To | | --- | --- | --- | | [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) | `7.25.9` | `7.26.0` | | [@babel/preset-env](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-env) | `7.25.9` | `7.26.0` | | [@docsearch/js](https://github.com/algolia/docsearch) | `3.6.2` | `3.7.0` | | [hugo-bin](https://github.com/fenneclab/hugo-bin) | `0.133.5` | `0.134.1` | | [rollup](https://github.com/rollup/rollup) | `4.24.0` | `4.24.4` | Updates `@babel/core` from 7.25.9 to 7.26.0 - [Release notes](https://github.com/babel/babel/releases) - [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md) - [Commits](https://github.com/babel/babel/commits/v7.26.0/packages/babel-core) Updates `@babel/preset-env` from 7.25.9 to 7.26.0 - [Release notes](https://github.com/babel/babel/releases) - [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md) - [Commits](https://github.com/babel/babel/commits/v7.26.0/packages/babel-preset-env) Updates `@docsearch/js` from 3.6.2 to 3.7.0 - [Release notes](https://github.com/algolia/docsearch/releases) - [Changelog](https://github.com/algolia/docsearch/blob/main/CHANGELOG.md) - [Commits](https://github.com/algolia/docsearch/compare/v3.6.2...v3.7.0) Updates `hugo-bin` from 0.133.5 to 0.134.1 - [Release notes](https://github.com/fenneclab/hugo-bin/releases) - [Commits](https://github.com/fenneclab/hugo-bin/compare/v0.133.5...v0.134.1) Updates `rollup` from 4.24.0 to 4.24.4 - [Release notes](https://github.com/rollup/rollup/releases) - [Changelog](https://github.com/rollup/rollup/blob/master/CHANGELOG.md) - [Commits](https://github.com/rollup/rollup/compare/v4.24.0...v4.24.4) --- updated-dependencies: - dependency-name: "@babel/core" dependency-type: direct:development update-type: version-update:semver-minor dependency-group: development-dependencies - dependency-name: "@babel/preset-env" dependency-type: direct:development update-type: version-update:semver-minor dependency-group: development-dependencies - dependency-name: "@docsearch/js" dependency-type: direct:development update-type: version-update:semver-minor dependency-group: development-dependencies - dependency-name: hugo-bin dependency-type: direct:development update-type: version-update:semver-minor dependency-group: development-dependencies - dependency-name: rollup dependency-type: direct:development update-type: version-update:semver-patch dependency-group: development-dependencies ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Docs: fix `.order` values in the migration guide (#41030) * Fix left alignment of floating labels with `.form-select` size variants (#41013) Co-authored-by: Patrick Kroog <pk@kroog.com> Co-authored-by: Christian Oliff <christianoliff@pm.me> Co-authored-by: Julien Déramond <juderamond@gmail.com> Co-authored-by: Louis-Maxime Piton <louismaxime.piton@orange.com> * Docs: Fix broken link in dropdowns documentation (#41052) * Docs: add warning callout for Yarn Berry for Bootstrap examples compat (#41036) * Build(deps-dev): Bump the development-dependencies group across 1 directory with 7 updates (#41082) Bumps the development-dependencies group with 7 updates in the / directory: | Package | From | To | | --- | --- | --- | | [@babel/cli](https://github.com/babel/babel/tree/HEAD/packages/babel-cli) | `7.25.9` | `7.26.4` | | [@docsearch/js](https://github.com/algolia/docsearch) | `3.7.0` | `3.8.0` | | [hugo-bin](https://github.com/fenneclab/hugo-bin) | `0.134.1` | `0.136.3` | | [postcss](https://github.com/postcss/postcss) | `8.4.47` | `8.4.49` | | [rollup](https://github.com/rollup/rollup) | `4.24.4` | `4.28.1` | | [stylelint](https://github.com/stylelint/stylelint) | `16.10.0` | `16.11.0` | | [terser](https://github.com/terser/terser) | `5.36.0` | `5.37.0` | Updates `@babel/cli` from 7.25.9 to 7.26.4 - [Release notes](https://github.com/babel/babel/releases) - [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md) - [Commits](https://github.com/babel/babel/commits/v7.26.4/packages/babel-cli) Updates `@docsearch/js` from 3.7.0 to 3.8.0 - [Release notes](https://github.com/algolia/docsearch/releases) - [Changelog](https://github.com/algolia/docsearch/blob/main/CHANGELOG.md) - [Commits](https://github.com/algolia/docsearch/compare/v3.7.0...v3.8.0) Updates `hugo-bin` from 0.134.1 to 0.136.3 - [Release notes](https://github.com/fenneclab/hugo-bin/releases) - [Commits](https://github.com/fenneclab/hugo-bin/compare/v0.134.1...v0.136.3) Updates `postcss` from 8.4.47 to 8.4.49 - [Release notes](https://github.com/postcss/postcss/releases) - [Changelog](https://github.com/postcss/postcss/blob/main/CHANGELOG.md) - [Commits](https://github.com/postcss/postcss/compare/8.4.47...8.4.49) Updates `rollup` from 4.24.4 to 4.28.1 - [Release notes](https://github.com/rollup/rollup/releases) - [Changelog](https://github.com/rollup/rollup/blob/master/CHANGELOG.md) - [Commits](https://github.com/rollup/rollup/compare/v4.24.4...v4.28.1) Updates `stylelint` from 16.10.0 to 16.11.0 - [Release notes](https://github.com/stylelint/stylelint/releases) - [Changelog](https://github.com/stylelint/stylelint/blob/main/CHANGELOG.md) - [Commits](https://github.com/stylelint/stylelint/compare/16.10.0...16.11.0) Updates `terser` from 5.36.0 to 5.37.0 - [Changelog](https://github.com/terser/terser/blob/master/CHANGELOG.md) - [Commits](https://github.com/terser/terser/compare/v5.36.0...v5.37.0) --- updated-dependencies: - dependency-name: "@babel/cli" dependency-type: direct:development update-type: version-update:semver-minor dependency-group: development-dependencies - dependency-name: "@docsearch/js" dependency-type: direct:development update-type: version-update:semver-minor dependency-group: development-dependencies - dependency-name: hugo-bin dependency-type: direct:development update-type: version-update:semver-minor dependency-group: development-dependencies - dependency-name: postcss dependency-type: direct:development update-type: version-update:semver-patch dependency-group: development-dependencies - dependency-name: rollup dependency-type: direct:development update-type: version-update:semver-minor dependency-group: development-dependencies - dependency-name: stylelint dependency-type: direct:development update-type: version-update:semver-minor dependency-group: development-dependencies - dependency-name: terser dependency-type: direct:development update-type: version-update:semver-minor dependency-group: development-dependencies ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Update devDependencies and regenerate package-lock.json * Move aria-label to wrapping links avoids unnecessary "link, graphic, blah" announcement in screen readers --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: XhmikosR <xhmikosr@gmail.com> Co-authored-by: Louis-Maxime Piton <louismaxime.piton@orange.com> Co-authored-by: Julien Déramond <juderamond@gmail.com> Co-authored-by: Dmitry <dmitrysergienko2000@gmail.com> Co-authored-by: Dmitry Sergienko <dmitry.sergienko@codefirst.net> Co-authored-by: Christian Oliff <christianoliff@pm.me> Co-authored-by: Patrick H. Lauke <redux@splintered.co.uk> Co-authored-by: Mohamad Salman <139472418+MohamadSalman11@users.noreply.github.com> Co-authored-by: Tobi <TobiGr@users.noreply.github.com> Co-authored-by: Patrick (Casus Belli) <pkroog@kroog.org> Co-authored-by: Patrick Kroog <pk@kroog.com> Co-authored-by: Vincent Prothais <vincent.prothais@orange.com>
18 KiB
layout | title | description | group | toc |
---|---|---|---|---|
docs | Tooltips | Documentation and examples for adding custom Bootstrap tooltips with CSS and JavaScript using CSS3 for animations and data-bs-attributes for local title storage. | components | true |
Overview
Things to know when using the tooltip plugin:
- Tooltips rely on the third party library Popper for positioning. You must include [popper.min.js]({{< param "cdn.popper" >}}) before
bootstrap.js
, or use onebootstrap.bundle.min.js
which contains Popper. - Tooltips are opt-in for performance reasons, so you must initialize them yourself.
- Tooltips with zero-length titles are never displayed.
- Specify
container: 'body'
to avoid rendering problems in more complex components (like our input groups, button groups, etc). - Triggering tooltips on hidden elements will not work.
- Tooltips for
.disabled
ordisabled
elements must be triggered on a wrapper element. - When triggered from hyperlinks that span multiple lines, tooltips will be centered. Use
white-space: nowrap;
on your<a>
s to avoid this behavior. - Tooltips must be hidden before their corresponding elements have been removed from the DOM.
- Tooltips can be triggered thanks to an element inside a shadow DOM.
Got all that? Great, let's see how they work with some examples.
{{< callout info >}} {{< partial "callouts/info-sanitizer.md" >}} {{< /callout >}}
{{< callout info >}} {{< partial "callouts/info-prefersreducedmotion.md" >}} {{< /callout >}}
Examples
Enable tooltips
As mentioned above, you must initialize tooltips before they can be used. One way to initialize all tooltips on a page would be to select them by their data-bs-toggle
attribute, like so:
const tooltipTriggerList = document.querySelectorAll('[data-bs-toggle="tooltip"]')
const tooltipList = [...tooltipTriggerList].map(tooltipTriggerEl => new bootstrap.Tooltip(tooltipTriggerEl))
Tooltips on links
Hover over the links below to see tooltips:
{{< example class="tooltip-demo" stackblitz_add_js="true" >}}
Placeholder text to demonstrate some inline links with tooltips. This is now just filler, no killer. Content placed here just to mimic the presence of real text. And all that just to give you an idea of how tooltips would look when used in real-world situations. So hopefully you've now seen how these tooltips on links can work in practice, once you use them on your own site or project.
{{< /example >}}{{< callout warning >}} {{< partial "callouts/warning-data-bs-title-vs-title.md" >}} {{< /callout >}}
Custom tooltips
{{< added-in "5.2.0" >}}
You can customize the appearance of tooltips using CSS variables. We set a custom class with data-bs-custom-class="custom-tooltip"
to scope our custom appearance and use it to override a local CSS variable.
{{< scss-docs name="custom-tooltip" file="site/assets/scss/_component-examples.scss" >}}
{{< example class="tooltip-demo" stackblitz_add_js="true" >}} Custom tooltip {{< /example >}}
Directions
Hover over the buttons below to see the four tooltips directions: top, right, bottom, and left. Directions are mirrored when using Bootstrap in RTL.
<button type="button" class="btn btn-secondary" data-bs-toggle="tooltip" data-bs-placement="top" data-bs-title="Tooltip on top">
Tooltip on top
</button>
<button type="button" class="btn btn-secondary" data-bs-toggle="tooltip" data-bs-placement="right" data-bs-title="Tooltip on right">
Tooltip on right
</button>
<button type="button" class="btn btn-secondary" data-bs-toggle="tooltip" data-bs-placement="bottom" data-bs-title="Tooltip on bottom">
Tooltip on bottom
</button>
<button type="button" class="btn btn-secondary" data-bs-toggle="tooltip" data-bs-placement="left" data-bs-title="Tooltip on left">
Tooltip on left
</button>
And with custom HTML added:
<button type="button" class="btn btn-secondary" data-bs-toggle="tooltip" data-bs-html="true" data-bs-title="<em>Tooltip</em> <u>with</u> <b>HTML</b>">
Tooltip with HTML
</button>
With an SVG:
CSS
Variables
{{< added-in "5.2.0" >}}
As part of Bootstrap’s evolving CSS variables approach, tooltips now use local CSS variables on .tooltip
for enhanced real-time customization. Values for the CSS variables are set via Sass, so Sass customization is still supported, too.
{{< scss-docs name="tooltip-css-vars" file="scss/_tooltip.scss" >}}
Sass variables
{{< scss-docs name="tooltip-variables" file="scss/_variables.scss" >}}
Usage
The tooltip plugin generates content and markup on demand, and by default places tooltips after their trigger element. Trigger the tooltip via JavaScript:
const exampleEl = document.getElementById('example')
const tooltip = new bootstrap.Tooltip(exampleEl, options)
{{< callout warning >}}
Tooltips automatically attempt to change positions when a parent container has overflow: auto
or overflow: scroll
, but still keeps the original placement's positioning. Set the boundary
option (for the flip modifier using the popperConfig
option) to any HTMLElement to override the default value, 'clippingParents'
, such as document.body
:
const tooltip = new bootstrap.Tooltip('#example', {
boundary: document.body // or document.querySelector('#boundary')
})
{{< /callout >}}
Markup
The required markup for a tooltip is only a data
attribute and title
on the HTML element you wish to have a tooltip. The generated markup of a tooltip is rather simple, though it does require a position (by default, set to top
by the plugin).
{{< callout warning >}}
Keep tooltips accessible to keyboard and assistive technology users by only adding them to HTML elements that are traditionally keyboard-focusable and interactive (such as links or form controls). While other HTML elements can be made focusable by adding tabindex="0"
, this can create annoying and confusing tab stops on non-interactive elements for keyboard users, and most assistive technologies currently do not announce tooltips in this situation. Additionally, do not rely solely on hover
as the trigger for your tooltips as this will make them impossible to trigger for keyboard users.
{{< /callout >}}
<!-- HTML to write -->
<a href="#" data-bs-toggle="tooltip" data-bs-title="Some tooltip text!">Hover over me</a>
<!-- Generated markup by the plugin -->
<div class="tooltip bs-tooltip-auto" role="tooltip">
<div class="tooltip-arrow"></div>
<div class="tooltip-inner">
Some tooltip text!
</div>
</div>
Disabled elements
Elements with the disabled
attribute aren't interactive, meaning users cannot focus, hover, or click them to trigger a tooltip (or popover). As a workaround, you'll want to trigger the tooltip from a wrapper <div>
or <span>
, ideally made keyboard-focusable using tabindex="0"
.
{{< example class="tooltip-demo" stackblitz_add_js="true" >}} Disabled button {{< /example >}}
Options
{{< markdown >}} {{< partial "js-data-attributes.md" >}} {{< /markdown >}}
{{< callout warning >}}
Note that for security reasons the sanitize
, sanitizeFn
, and allowList
options cannot be supplied using data attributes.
{{< /callout >}}
{{< bs-table "table" >}}
Name | Type | Default | Description |
---|---|---|---|
allowList |
object | [Default value]({{< docsref "/getting-started/javascript#sanitizer" >}}) | Object which contains allowed attributes and tags. |
animation |
boolean | true |
Apply a CSS fade transition to the tooltip. |
boundary |
string, element | 'clippingParents' |
Overflow constraint boundary of the tooltip (applies only to Popper's preventOverflow modifier). By default, it's 'clippingParents' and can accept an HTMLElement reference (via JavaScript only). For more information refer to Popper's detectOverflow docs. |
container |
string, element, false | false |
Appends the tooltip to a specific element. Example: container: 'body' . This option is particularly useful in that it allows you to position the tooltip in the flow of the document near the triggering element - which will prevent the tooltip from floating away from the triggering element during a window resize. |
customClass |
string, function | '' |
Add classes to the tooltip when it is shown. Note that these classes will be added in addition to any classes specified in the template. To add multiple classes, separate them with spaces: 'class-1 class-2' . You can also pass a function that should return a single string containing additional class names. |
delay |
number, object | 0 |
Delay showing and hiding the tooltip (ms)—doesn't apply to manual trigger type. If a number is supplied, delay is applied to both hide/show. Object structure is: delay: { "show": 500, "hide": 100 } . |
fallbackPlacements |
array | ['top', 'right', 'bottom', 'left'] |
Define fallback placements by providing a list of placements in array (in order of preference). For more information refer to Popper's behavior docs. |
html |
boolean | false |
Allow HTML in the tooltip. If true, HTML tags in the tooltip's title will be rendered in the tooltip. If false, innerText property will be used to insert content into the DOM. Use text if you're worried about XSS attacks. |
offset |
array, string, function | [0, 6] |
Offset of the tooltip relative to its target. You can pass a string in data attributes with comma separated values like: data-bs-offset="10,20" . When a function is used to determine the offset, it is called with an object containing the popper placement, the reference, and popper rects as its first argument. The triggering element DOM node is passed as the second argument. The function must return an array with two numbers: skidding, distance. For more information refer to Popper's offset docs. |
placement |
string, function | 'top' |
How to position the tooltip: auto, top, bottom, left, right. When auto is specified, it will dynamically reorient the tooltip. When a function is used to determine the placement, it is called with the tooltip DOM node as its first argument and the triggering element DOM node as its second. The this context is set to the tooltip instance. |
popperConfig |
null, object, function | null |
To change Bootstrap's default Popper config, see Popper's configuration. When a function is used to create the Popper configuration, it's called with an object that contains the Bootstrap's default Popper configuration. It helps you use and merge the default with your own configuration. The function must return a configuration object for Popper. |
sanitize |
boolean | true |
Enable or disable the sanitization. If activated 'template' , 'content' and 'title' options will be sanitized. |
sanitizeFn |
null, function | null |
Here you can supply your own sanitize function. This can be useful if you prefer to use a dedicated library to perform sanitization. |
selector |
string, false | false |
If a selector is provided, tooltip objects will be delegated to the specified targets. In practice, this is used to also apply tooltips to dynamically added DOM elements (jQuery.on support). See [this issue]({{< param repo >}}/issues/4215) and an informative example. Note: title attribute must not be used as a selector. |
template |
string | '<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>' |
Base HTML to use when creating the tooltip. The tooltip's title will be injected into the .tooltip-inner . .tooltip-arrow will become the tooltip's arrow. The outermost wrapper element should have the .tooltip class and role="tooltip" . |
title |
string, element, function | '' |
The tooltip title. If a function is given, it will be called with its this reference set to the element that the popover is attached to. |
trigger |
string | 'hover focus' |
How tooltip is triggered: click, hover, focus, manual. You may pass multiple triggers; separate them with a space. 'manual' indicates that the tooltip will be triggered programmatically via the .tooltip('show') , .tooltip('hide') and .tooltip('toggle') methods; this value cannot be combined with any other trigger. 'hover' on its own will result in tooltips that cannot be triggered via the keyboard, and should only be used if alternative methods for conveying the same information for keyboard users is present. |
{{< /bs-table >}} |
{{< callout info >}}
Data attributes for individual tooltips
Options for individual tooltips can alternatively be specified through the use of data attributes, as explained above. {{< /callout >}}
Using function with popperConfig
const tooltip = new bootstrap.Tooltip(element, {
popperConfig(defaultBsPopperConfig) {
// const newPopperConfig = {...}
// use defaultBsPopperConfig if needed...
// return newPopperConfig
}
})
Methods
{{< callout danger >}} {{< partial "callouts/danger-async-methods.md" >}} {{< /callout >}}
{{< bs-table "table" >}}
Method | Description |
---|---|
disable |
Removes the ability for an element's tooltip to be shown. The tooltip will only be able to be shown if it is re-enabled. |
dispose |
Hides and destroys an element's tooltip (Removes stored data on the DOM element). Tooltips that use delegation (which are created using the selector option) cannot be individually destroyed on descendant trigger elements. |
enable |
Gives an element's tooltip the ability to be shown. Tooltips are enabled by default. |
getInstance |
Static method which allows you to get the tooltip instance associated with a DOM element, or create a new one in case it wasn't initialized. |
getOrCreateInstance |
Static method which allows you to get the tooltip instance associated with a DOM element, or create a new one in case it wasn't initialized. |
hide |
Hides an element's tooltip. Returns to the caller before the tooltip has actually been hidden (i.e. before the hidden.bs.tooltip event occurs). This is considered a "manual" triggering of the tooltip. |
setContent |
Gives a way to change the tooltip's content after its initialization. |
show |
Reveals an element's tooltip. Returns to the caller before the tooltip has actually been shown (i.e. before the shown.bs.tooltip event occurs). This is considered a "manual" triggering of the tooltip. Tooltips with zero-length titles are never displayed. |
toggle |
Toggles an element's tooltip. Returns to the caller before the tooltip has actually been shown or hidden (i.e. before the shown.bs.tooltip or hidden.bs.tooltip event occurs). This is considered a "manual" triggering of the tooltip. |
toggleEnabled |
Toggles the ability for an element's tooltip to be shown or hidden. |
update |
Updates the position of an element's tooltip. |
{{< /bs-table >}} |
const tooltip = bootstrap.Tooltip.getInstance('#example') // Returns a Bootstrap tooltip instance
// setContent example
tooltip.setContent({ '.tooltip-inner': 'another title' })
{{< callout info >}}
The setContent
method accepts an object
argument, where each property-key is a valid string
selector within the tooltip template, and each related property-value can be string
| element
| function
| null
{{< /callout >}}
Events
{{< bs-table >}}
Event | Description |
---|---|
hide.bs.tooltip |
This event is fired immediately when the hide instance method has been called. |
hidden.bs.tooltip |
This event is fired when the tooltip has finished being hidden from the user (will wait for CSS transitions to complete). |
inserted.bs.tooltip |
This event is fired after the show.bs.tooltip event when the tooltip template has been added to the DOM. |
show.bs.tooltip |
This event fires immediately when the show instance method is called. |
shown.bs.tooltip |
This event is fired when the tooltip has been made visible to the user (will wait for CSS transitions to complete). |
{{< /bs-table >}} |
const myTooltipEl = document.getElementById('myTooltip')
const tooltip = bootstrap.Tooltip.getOrCreateInstance(myTooltipEl)
myTooltipEl.addEventListener('hidden.bs.tooltip', () => {
// do something...
})
tooltip.hide()