Tooltip

Pack name: seed-tooltip

Tooltip component pack for Seed

Contents

Install

npm install seed-tooltip --save

Dependencies


Bootstrap

Javascript

This component’s interactions are powered by Bootstrap. Refer to their tooltip documentation for Javascript usage.

CSS

This component does not require any of Bootstrap’s CSS for style. In fact, it is recommended that Bootstrap’s CSS are omitted for seed-tooltip to be styled properly.

Class names

In the markup examples (below), you will that class names don’t follow the ITCSS naming scheme. This is because Boostrap requires specific class names for their tooltip components.


Example

Four options are available: top, right, bottom, and left aligned.

<button type="button" class="c-button" data-toggle="tooltip" data-placement="left" title="Tooltip on left">Tooltip on left</button>

<button type="button" class="c-button" data-toggle="tooltip" data-placement="top" title="Tooltip on top">Tooltip on top</button>

<button type="button" class="c-button" data-toggle="tooltip" data-placement="bottom" title="Tooltip on bottom">Tooltip on bottom</button>

<button type="button" class="c-button" data-toggle="tooltip" data-placement="right" title="Tooltip on right">Tooltip on right</button>