Open In App

Javascript MDBootstrap Interactions Utilities

Last Updated : 12 Apr, 2025
Comments
Improve
Suggest changes
Like Article
Like
Report

MDBootstrap is a Material Design and bootstrap-based Javascript UI library that is used to make attractive webpages with its seamless and easy-to-use component. It is free for both personal & commercial use. In this article, we will know how to use Interactions Utilities in Javascript MDBootstap.

MDBootstrap Interactions Utilities allows a user to interact with the contents of a website.

MDBootstrap Javascript Interactions Utility Classes:

  • user-select-all: It allows to select of the entire paragraph when clicked by the user.
  • user-select-auto: It is a default paragraph selector.
  • user-select-none: It doesn't allow or is disabled to select the paragraph when clicked by the user.

Syntax:

<h2 class="user-select-all">GeeksforGeeks</h2>

Approach:

  • Download Javascript MDBootstrap from the official site.
  • Extract the files to the current working directory.
  • In the Index.html file, specify the downloaded file path in the <head> tag.

<link rel="icon" href="img/mdb-favicon.ico" type="image/x-icon" />
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.15.2/css/all.css" />
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700;900&display=swap"/>
<link rel="stylesheet" href="css/mdb.min.css" />
<script type="text/javascript"></script>

Example 1: This example illustrates the MDBootstrap Javascript Interactions Utilities where the specific class decides the interactivity.

HTML
<!DOCTYPE html >
<html lang="en">

<head>
    <title>Javascript MDBootstrap Interactions Utilities</title>
    <meta charset="UTF-8" />
    <meta name="viewport" 
          content="width=device-width, 
                   initial-scale=1, 
                   shrink-to-fit=no" />
    <link rel="icon" 
          href="img/mdb-favicon.ico" 
          type="image/x-icon" />
    <link rel="stylesheet"
          href=
"https://use.fontawesome.com/releases/v5.15.2/css/all.css" />
    <link rel="stylesheet"
          href=
"https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700;900&display=swap" />
    <link rel="stylesheet"
          href="css/mdb.min.css" />
    <script type="text/javascript" 
            src="js/mdb.min.js">
    </script>
</head>

<body>
    <div style="margin-left: 50px;">
        <h2 style="margin-top: 50px;">
            GeeksforGeeks
        </h2>
        <h4>
            MDBootstrap Javascript Interactions Utilities
        </h4>
        <br>
        <p class='user-select-all'>
            
            MDBootstrap is a Material Design and 
            bootstrap-based Javascript UI library
            that is used to make good looking webpages
            with its seamless and easy-to-use component.
        </p>

        <p class='user-select-auto'>
            
            MDBootstrap is a Material Design and 
            bootstrap-based Javascript UI library
            that is used to make good looking webpages 
            with its seamless and easy-to-use component.
        </p>

        <p class='user-select-none'>
            
            MDBootstrap is a Material Design and 
            bootstrap-based Javascript UI library
            that is used to make good looking webpages 
            with its seamless and easy-to-use component.
        </p>

    </div>
</body>

</html>

Output:

Javascript MDBootstrap Interactions Utilities
Javascript MDBootstrap Interactions Utilities



Next Article

Similar Reads