Tuesday, March 7, 2017

Materialize - Chips

The Materialize provides a special component called Chip which can be used to represent small set of information for example, a contact, tags etc.
S.N.Class Name & Description
1chip
Set the div container as chip.

Example

The following example showcases the use of chip class to showcase creating various types of tags.
materialize_chips.htm
<!DOCTYPE html>
<html>
   <head>
      <title>The Materialize Chips Example</title>
   <meta name="viewport" content="width=device-width, initial-scale=1">      
   <link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
   <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.3/css/materialize.min.css">
      <script type="text/javascript" src="https://code.jquery.com/jquery-2.1.1.min.js"></script>           
      <script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.3/js/materialize.min.js"></script> 
   </head>
   <body class="container">       
         <div class="chip">           
            <img alt="HTML5" src="html5-mini-logo.jpg">HTML 5            
         </div>
         <div class="chip">           
            HTML 5<i class="material-icons">close</i>
         </div>   
   </body>   
</html>

Result

Verify the result.

No comments:

Post a Comment