$ npm install @sonicgarden/bs-tooltip-element
import '@sonicgarden/bs-tooltip-element'
<bs-tooltip content="Default tooltip">
<button type="button">Tooltip</button>
</bs-tooltip>
<bs-tooltip content="Default tooltip" manual show>
<button type="button">Tooltip</button>
</bs-tooltip>
<bs-tooltip content="Default tooltip" disabled>
<button type="button">Tooltip</button>
</bs-tooltip>
<bs-tooltip>
<button type="button">Tooltip</button>
<template>
This is a <strong>tooltip.</strong><br>
This is a <strong>tooltip.</strong>
</template>
</bs-tooltip>
<bs-tooltip content="Bottom tooltip" placement="bottom">
<button type="button">Tooltip</button>
</bs-tooltip>
Browsers without native custom element support require a polyfill.
- Chrome
- Firefox
- Safari
- Microsoft Edge
pnpm i
pnpm dev
Distributed under the MIT license. See LICENSE for details.