Open In App

Primer CSS Kitchen Sink Forms

Primer CSS is a free open-source CSS framework that is built upon systems that create the foundation of the basic style elements such as spacing, typography, and color. This systematic method makes sure our patterns are steady and interoperable with every other. Its approach to CSS is influenced by Object-Oriented CSS principles, functional CSS, and BEM architecture. It is highly reusable and flexible. It is created with GitHub’s design system.

Primer CSS Kitchen Sink Forms are used to create the form with all the inputs and buttons side by side for size testing and alignment of input elements. In this article, we will discuss Primer CSS Kitchen Sink Forms.



Primer CSS Kitchen Sink Forms Classes:

Syntax:



<p>
  <button class="btn" type="button">
      ...
  </button>
  <input class="form-control" type="text" />
    ...
</p>

Example 1: The following example demonstrates the Primer CSS Kitchen Sink Forms.




<!DOCTYPE html>
<html>
    
<head>
    <title> Primer CSS Kitchen Sink Forms </title>
    <link rel="stylesheet" href=
"https://unpkg.com/@primer/css@^18.0.0/dist/primer.css"/>
</head>
  
<body>
    <div class="text-center">
        <h1 class="color-fg-success"> GeeksforGeeks </h1>
        <h3> Primer CSS Kitchen Sink Forms </h3> <br>
  
        <p>
            <button class="btn" type="button">
                GeeksforGeeks
            </button>
            <button class="btn" type="button">
                Button 
                <span class="dropdown-caret"></span>
            </button>
            <input class="form-control" type="text"
                   placeholder="Enter your name" />
        </p>
    </div>
</body>
  
</html>

Output:

Primer CSS Kitchen Sink Forms

Example 2: The following example demonstrates the Primer CSS Kitchen Sink Forms.




<!DOCTYPE html>
<html>
    
<head>
    <title> Primer CSS Kitchen Sink Forms </title>
    <link rel="stylesheet" href=
"https://unpkg.com/@primer/css@^18.0.0/dist/primer.css"/>
</head>
  
<body>
    <div class="text-center">
        <h1 class="color-fg-success"> GeeksforGeeks </h1>
        <h3> Primer CSS Kitchen Sink Forms </h3> <br>
  
        <p>
            <button class="btn" type="button">
                GeeksforGeeks
            </button>
            <button class="btn" type="button">
                Button 
                <span class="dropdown-caret"></span>
            </button>
            <input class="form-control" type="text"
                   placeholder="Enter your name" />
        </p>
  
        <p>
            <button class="btn btn-primary" type="button">
                Coding
            </button>
            <button class="btn btn-danger" type="button">
                GFG 
                <span class="dropdown-caret"></span>
            </button>
            <select class="form-select" >
                <option> Select any value </option>
                <option value="java"> Java </option>
                <option value="c++"> C++ </option>
                <option value="python"> Python </option>
            </select>
        </p>
    </div>
</body>
  
</html>

Output:

Primer CSS Kitchen Sink Forms

Reference: https://primer.style/css/components/forms#kitchen-sink


Article Tags :