This version of this component hasn't been branded yet.

Please check the latest version, 3.2.3, as branding is a relatively new addition to our components.

o-tooltip

A tooltip for annotating or drawing attention to other bits of UI

active

Demo

Basic demo

<div class="o-colors-page-background">
	<div class="demo-tooltip-container" id="box-tooltip">

		<button class="o-buttons o-buttons--big demo-tooltip-target" id="demo-tooltip-target">
			Share
		</button>

		<div data-o-component="o-tooltip" data-o-tooltip-position="above" data-o-tooltip-target="demo-tooltip-target" data-o-tooltip-show-on-construction="true">
			<div class="o-tooltip-content">
				supercalifragilisticexpialidocious
			</div>
		</div>
	</div>
</div>

Hover

Display on hover demo

<div class="o-colors-page-background">
	<div class="demo-tooltip-container" id="box-tooltip">

		<button class="o-buttons o-buttons--big demo-tooltip-target" id="demo-tooltip-target">
			Share
		</button>

		<div data-o-component="o-tooltip" data-o-tooltip-position="right" data-o-tooltip-target="demo-tooltip-target" data-o-tooltip-show-on-hover="true">
			<div class="o-tooltip-content">
				Share this article via email
			</div>
		</div>
	</div>
</div>

Click

Display on click demo

<div class="o-colors-page-background">
	<div class="demo-tooltip-container" id="box-tooltip">

		<button class="o-buttons o-buttons--big demo-tooltip-target" id="demo-tooltip-target">
			Share
		</button>

		<div data-o-component="o-tooltip" data-o-tooltip-position="right" data-o-tooltip-target="demo-tooltip-target" data-o-tooltip-show-on-click="true">
			<div class="o-tooltip-content">
				Share this article via email
			</div>
		</div>
	</div>
</div>

Toggle

Toggle on click demo

<div class="o-colors-page-background">
    <div class="demo-tooltip-container" id="box-tooltip">

        <button class="o-buttons o-buttons--big demo-tooltip-target" id="demo-tooltip-target">
            Share
        </button>

        <div data-o-component="o-tooltip" data-o-tooltip-position="right" data-o-tooltip-target="demo-tooltip-target" data-o-tooltip-toggle-on-click="true" data-o-tooltip-close-after="3" data-o-tooltip-show-on-construction="true">
            <div class="o-tooltip-content">
                Share this article via email
            </div>
        </div>
    </div>
</div>

Timeout

Show/Hide Tooltip after timeout demo

<div class="o-colors-page-background">
    <div class="demo-tooltip-container" id="box-tooltip">
        <p>This tooltip will close after 3 seconds</p>
        <button class="o-buttons o-buttons--big demo-tooltip-target" id="demo-tooltip-target">
            Share
        </button>

        <div data-o-component="o-tooltip" data-o-tooltip-position="right" data-o-tooltip-target="demo-tooltip-target" data-o-tooltip-show-on-construction="true" data-o-tooltip-close-after="3">
            <div class="o-tooltip-content">
                Share this article via email
            </div>
        </div>
        <p>This tooltip will show after 3 seconds</p>
        <button class="o-buttons o-buttons--big demo-tooltip-target" id="demo-tooltip-target-2">
            Share
        </button>

        <div data-o-component="o-tooltip" data-o-tooltip-position="right" data-o-tooltip-target="demo-tooltip-target-2" data-o-tooltip-show-after="3">
            <div class="o-tooltip-content">
                Share this article via email
            </div>
        </div>
    </div>
</div>

No Markup

Tooltip declared in js, with no markup

<div class="demo-scrollable-container">
	<div class="o-colors-page-background">
		<div class="demo-tooltip-container" id="box-tooltip">
			<button class="o-buttons o-buttons--big imperative-tooltip-target">
				Hover
			</button>
		</div>
	</div>
</div>

Responsive Positioning

Responsive positioning

<div class="o-colors-page-background">
	<div class="demo-tooltip-container" id="box-tooltip" style="margin-top:200px;margin-left:20%">

		<button class="o-buttons o-buttons--big demo-tooltip-target" id="demo-tooltip-target">
			Share
		</button>

		<div data-o-component="o-tooltip" data-o-tooltip-position="above" data-o-tooltip-position-s="right" data-o-tooltip-position-m="below" data-o-tooltip-position-l="left" data-o-tooltip-position-xl="above" data-o-tooltip-target="demo-tooltip-target" data-o-tooltip-show-on-construction="true">
			<div class="o-tooltip-content">
				Spin me right round..
			</div>
		</div>
	</div>
</div>
Bower Dependencies
ftdomdelegate ^2.1.0
o-normalise ^1.2.1
o-overlay ^2.0.0
o-viewport ^3.1.2
o-visual-effects ^2.0.0
o-grid ^4.3.6
GitHub Repository

Quickstart

Build Service

Add the following to your <script> and <link> tags.

o-tooltip@^3.2.0

How do I do that?

For more information see the Origami build service.

Manual Build Process

Run the following command in the root directory of your project, to add this dependency to your bower.json file:

bower install --save "o-tooltip"@"^3.2.0"

For more information see the Origami build process.