Skip to content
Related Articles

Related Articles

Materialize CSS | Tooltips
  • Last Updated : 31 Jul, 2020

Tooltips are small, textual but interactive hints that are used mainly for the graphical purpose. It helps the icons or buttons to give clarification of its function. To use this, tooltipped class is added along with its position such as: top, bottom, left or right. Syntax is as follow:

 <a class="btn tooltipped" data-position="bottom" data-tooltip="I am a tooltip">Hover me!</a>

Example:

filter_none

edit
close

play_arrow

link
brightness_4
code

<!DOCTYPE html>
<html>
    <head>
        <meta
            name="viewport"
            content="width = device-width,
                       initial-scale = 1"
        />
        <link rel="stylesheet"
              href=
        <link rel="stylesheet" 
              href=
        <script type="text/javascript"
                src=
      </script>
        <script src=
      </script>
    </head>
  
    <body class="container">
        <div class="fixed-action-btn toolbar">
            <strong>Toolbar</strong>
            <a class="btn-floating btn-large red">
                <i class="large material-icons">
                  border_color</i>
            </a>
            <ul>
                <li class="waves-effect waves-light">
                    <a href="#!">
                      <i class="material-icons">
                        insert_chart</i></a>
                </li>
                <li class="waves-effect waves-light">
                    <a href="#!">
                      <i class="material-icons">
                        format_quote</i></a>
                </li>
                <li class="waves-effect waves-light">
                    <a href="#!">
                      <i class="material-icons">
                        publish</i></a>
                </li>
                <li class="waves-effect waves-light">
                    <a href="#!">
                      <i class="material-icons">
                        attach_file</i></a>
                </li>
            </ul>
        </div>
        <h2>Tooltips</h2>
        <div class="row">
            <div class="col s6">
                <a class="btn tooltipped green" 
                   data-position="bottom" 
                   data-delay="50" 
                   data-tooltip="Additinal Information">
                  Hover me!
              </a>
            </div>
            <div class="col s6">
                <a class="btn tooltipped green" 
                   data-position="top" 
                   data-delay="50" 
                   data-tooltip="Additinal Information">
                  Hover me!
              </a>
            </div>
        </div>
        <div class="row">
            <div class="col s6">
                <a class="btn tooltipped green"
                   data-position="left" 
                   data-delay="50" 
                   data-tooltip="Additinal Information">
                  Hover me!
              </a>
            </div>
            <div class="col s6">
                <a class="btn tooltipped green" 
                   data-position="top" 
                   data-delay="50" 
                   data-tooltip="Additinal Information">
                  Hover me!
              </a>
            </div>
        </div>
    </body>
</html>

chevron_right


Output:




My Personal Notes arrow_drop_up
Recommended Articles
Page :