Giter Site home page Giter Site logo

kevin-wise / paper-tooltip Goto Github PK

View Code? Open in Web Editor NEW

This project forked from polymerelements/paper-tooltip

0.0 2.0 0.0 111 KB

A Material Design tooltip

Home Page: https://elements.polymer-project.org/elements/paper-tooltip?view=demo:demo/index.html

HTML 100.00%

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's People

Contributors

notwaldorf avatar ebidel avatar tedium-bot avatar dfreedm avatar danbeam avatar rictic avatar sulume avatar kevinpschaaf avatar garlicnation avatar abdonrd avatar fredj avatar ortham avatar sorvell avatar eterna2 avatar

Watchers

James Cloos avatar Kevin Wise 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.