Git Product home page Git Product logo

paper-tooltip's Introduction

Build status

Demo and API docs

<paper-tooltip>

Material design: Tooltips

<paper-tooltip> is a label that appears on hover and focus when the user hovers over an element with the cursor or with the keyboard. It will be centered to an anchor element specified in the for attribute, or, if that doesn't exist, centered to the parent node containing it.

Example:

<div style="display:inline-block">
  <button>Click me!</button>
  <paper-tooltip>Tooltip text</paper-tooltip>
</div>

<div>
  <button id="btn">Click me!</button>
  <paper-tooltip for="btn">Tooltip text</paper-tooltip>
</div>

The tooltip can be positioned on the top|bottom|left|right of the anchor using the position attribute. The default position is bottom.

<paper-tooltip for="btn" position="left">Tooltip text</paper-tooltip>
<paper-tooltip for="btn" position="top">Tooltip text</paper-tooltip>

Styling

The following custom properties and mixins are available for styling:

Custom property Description Default
--paper-tooltip-background The background color of the tooltip #616161
--paper-tooltip-opacity The opacity of the tooltip 0.9
--paper-tooltip-text-color The text color of the tooltip white
--paper-tooltip Mixin applied to the tooltip {}
--paper-tooltip-delay-in Delay before tooltip starts to fade in 500
--paper-tooltip-delay-out Delay before tooltip starts to fade out 0
--paper-tooltip-duration-in Timing for Animation when showing tooltip 500
--paper-tooltip-duration-out Timining for Animation when hiding tooltip 0
--paper-tooltip-animation Mixin applied to the tooltip animation {}

paper-tooltip's People

Contributors

notwaldorf avatar tedium-bot avatar ebidel avatar dfreedm avatar danbeam avatar rictic avatar e111077 avatar sulume avatar aomarks avatar homerjonathan avatar kevinpschaaf avatar brogers4 avatar garlicnation avatar abdonrd avatar fredj avatar 43081j avatar liviosoares avatar scriptreiter avatar ortham avatar sorvell avatar tomk avatar eterna2 avatar

Watchers

James Cloos avatar Max Waterman avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.