Tooltip

Display a brief helper text to your user

<template>
    <section>
        <b-tooltip label="Tooltip right"
            position="is-right">
            <button class="button is-dark">
                Right
            </button>
        </b-tooltip>

        <b-tooltip label="Tooltip top">
            <button class="button is-dark">
                Top (default)
            </button>
        </b-tooltip>

        <b-tooltip label="Tooltip bottom"
            position="is-bottom">
            <button class="button is-dark">
                Bottom
            </button>
        </b-tooltip>

        <b-tooltip label="Tooltip left"
            position="is-left">
            <button class="button is-dark">
                Left
            </button>
        </b-tooltip>

        <b-tooltip label="delayed by 1000ms"
            :delay="1000">
            <button class="button is-primary">
                Delayed
            </button>
        </b-tooltip>
    </section>
</template>

# Styles

Simple text
<template>
    <section>
        <b-tooltip label="Text is dashed" dashed>
            Simple text
        </b-tooltip>

        <b-tooltip label="Maybe you like a little animation"
            position="is-bottom"
            animated>
            <button class="button">Animated</button>
        </b-tooltip>

        <b-tooltip label="You prefer dark?"
            type="is-dark"
            position="is-bottom">
            <button class="button">Dark</button>
        </b-tooltip>

        <b-tooltip label="Or light?"
            type="is-light"
            position="is-bottom">
            <button class="button">Light</button>
        </b-tooltip>

        <b-tooltip label="I'm never closing" always>
            <button class="button">Always</button>
        </b-tooltip>

        <b-tooltip label="I'm square"
            position="is-bottom"
            square>
            <button class="button">Square</button>
        </b-tooltip>
    </section>
</template>

# Multilined

Well, it's not always that brief.

<template>
    <section>
        <b-tooltip
            label="Tooltip multilined, probably because it's too long for a casual tooltip"
            multilined>
            <button class="button is-dark">
                Multiline (default)
            </button>
        </b-tooltip>

        <b-tooltip
            label="It's not briefy, but also not long enough"
            size="is-small"
            multilined>
            <button class="button is-dark">
                Multiline (small)
            </button>
        </b-tooltip>

        <b-tooltip
            label="Tooltip large multilined, because it's really long to be on a medium size. Did I tell you it's really long? Yes, it is — I asure you!"
            position="is-bottom"
            size="is-large"
            multilined>
            <button class="button is-dark">
                Multiline (large)
            </button>
        </b-tooltip>
    </section>
</template>

# Toggle


<template>
    <section>
        <button class="button is-primary"
            @click="active = !active">
            Toggle
        </button>
        <hr>

        <b-tooltip label="I'm never closing"
            :active="active"
            always>
            <button class="button">
                Always
            </button>
        </b-tooltip>

        <b-tooltip label="Tooltip right"
            position="is-right"
            :active="active">
            <button class="button is-dark">
                Right
            </button>
        </b-tooltip>
    </section>
</template>

<script>
    export default {
        data() {
            return {
                active: true
            }
        }
    }
</script>

# API

Name
Description
Type
Values
Default
typeType (color) of the tooltip String is-white, is-black, is-light, is-dark, is-primary, is-info, is-success, is-warning, is-danger, and any other colors you've set in the $colors list on Sassis-primary
activeWhether tooltip is active or not Boolean true
labelTooltip text String
positionTooltip position in relation to the element String is-top, is-bottom, is-left, is-rightis-top
alwaysTooltip will be always active Boolean false
animatedTooltip will have a little fade animation Boolean false
squareTooltip will be square (not rounded corners) Boolean false
dashedTooltip slot will have a dashed underline Boolean false
multilinedTooltip will be multilined Boolean false
sizeTooltip multiline size (only works for multilined tooltips) String is-small, is-medium, is-largeis-medium
delayTooltip delay before it appears (number in ms) Number 0

# Variables

You can use these variables to customize this component.

Name
Default
$tooltip-arrow-size5px
$tooltip-arrow-margin2px
$tooltip-multiline-sizes ( small: 180px, medium: 240px, large: 300px )

This page is open source. Noticed a typo or something's unclear?

Improve this page on GitHub