Open In App

Foundation CSS Kitchen Sink Responsive Toggle

Foundation CSS is an open-source and responsive front-end framework built by ZURB foundation in September 2011, that makes it easy to layout stunning responsive websites, apps, and emails that appear amazing and can be accessible to any device. In this article, we will discuss the Kitchen Sink Responsive Toggle Classes in Foundation CSS.

Kitchen Sink has the foundation elements to work well in our websites and applications. The Kitchen Sink Responsive Toggle is used to add the responsive top bar with a toggle button that triggers on mobile.



Foundation CSS Kitchen Sink Responsive Toggle Classes:

Syntax:



<div class="title-bar" 
     data-responsive-toggle="gfg-menu" 
     data-hide-for="large">
      <button class="menu-icon" 
          type="button" data-toggle>
          ...
      </button>
      
      <div class="title-bar-title">
          ...
      </div>
</div>

Example 1: Below is the example that illustrates the use of Kitchen Sink Responsive Toggle. 




<!DOCTYPE html>
<html lang="en">
  
<head>
    <title>Foundation CSS Kitchen Sink Responsive toggle</title>
      <link rel="stylesheet"
          href=
          crossorigin="anonymous">
    <link rel="stylesheet" 
          href=
          crossorigin="anonymous">
    <link rel="stylesheet"
          href=
          crossorigin="anonymous">
    <script src=
    </script>
    <script crossorigin="anonymous" 
            src=
    </script>
</head>
  
<body>
  <center>
    <h1 style="color:green;">
      GeeksforGeeks
    </h1>
  
    <h3>Foundation CSS Kitchen Sink Responsive toggle</h3>
  
    <div class="title-bar" data-responsive-toggle="gfg-menu" 
       data-hide-for="large">
      <button class="menu-icon" type="button" 
         data-toggle>
      </button>
  
      <div class="title-bar-title">
        GfG-Menu
      </div>
    </div>
      
    <div class="top-bar" id="gfg-menu">
      <div class="top-bar-left">
        <ul class="dropdown menu" data-dropdown-menu>
          <li class="menu-text">
            GeeksforGeeks
          </li>
  
          <li class="has-submenu">
            <a href="#">Courses</a>
            <ul class="submenu menu vertical" data-submenu>
              <li><a href="#">DSA</a></li>
              <li><a href="#">OOP's</a></li>
              <li><a href="#">DBMS</a></li>
              <li><a href="#">OS</a></li>
            </ul>
          </li>
          <li><a href="#0">
            Interview Preparation
          </a></li>
  
          <li><a href="#0">
            Test Series
          </a></li>
        </ul>
      </div>
    </div>
  </center>
  
  <script>
    $(document).ready(function () {
      $(document).foundation();
    })
  </script>
</body>
  
</html>

Output:

Foundation CSS Kitchen Sink Responsive toggle

Example 2: Below is another example that illustrates the use of Kitchen Sink Responsive Toggle. 




<!DOCTYPE html>
<html lang="en">
<head>
  <title>Foundation CSS Kitchen Sink Responsive toggle</title>
  
      <link rel="stylesheet"
          href=
          crossorigin="anonymous">
    <link rel="stylesheet" 
          href=
          crossorigin="anonymous">
    <link rel="stylesheet"
          href=
          crossorigin="anonymous">
    <script src=
    </script>
    <script crossorigin="anonymous" 
            src=
    </script>
</head>
  
<body>
  <center>
    <h1 style="color:green;">
      GeeksforGeeks
    </h1>
  
    <h3>Foundation CSS Kitchen Sink Responsive toggle</h3>
  
    <div class="title-bar"
         data-responsive-toggle="gfg-menu" 
         data-hide-for="large">
      <button class="menu-icon" 
              type="button" 
        data-toggle>
      </button>
  
      <div class="title-bar-title">
        GfG-Menu
      </div>
    </div>
  
    <div class="top-bar" id="gfg-menu">
      <div class="top-bar-left">
        <ul class="menu">
          <li><input type="search" 
                     class="rounded bordered shadow" 
                     placeholder="Search any Course">
          </li>
  
          <li>
            <button type="button" 
                    class="button rounded shadow success">
              SEARCH
            </button>
          </li>
        </ul>
      </div>
    </div>
  </center>
  
  <script>
    $(document).ready(function () {
      $(document).foundation();
    })
  </script>
</body>
  
</html>

Output:

Foundation CSS Kitchen Sink Responsive toggle

Reference: https://get.foundation/sites/docs/kitchen-sink.html#responsive-toggle


Article Tags :