Open In App

Primer CSS Kitchen Sink Forms

Improve
Improve
Like Article
Like
Save
Share
Report

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:

  • btn: This class is used to create the default button.
  • form-control: This class is used to create the form input field.

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.

HTML




<!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.

HTML




<!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



Last Updated : 24 Apr, 2022
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads