Skip to content
Related Articles

Related Articles

Semantic-UI Placeholder Variations

View Discussion
Improve Article
Save Article
  • Last Updated : 22 Apr, 2022
View Discussion
Improve Article
Save Article

Semantic UI is an open-source framework that uses CSS and jQuery to build great user interfaces. It is the same as a bootstrap for use and has great different elements to use to make your website look more amazing. In this article, we are going to learn about Placeholder Variations.

It is equipped with pre-built semantic components that help create responsive layouts using user-friendly HTML, and it uses predefined CSS and jQuery to incorporate different frameworks.

A placeholder is used to reserve space for content that soon will appear in a layout and the three types of variation in the placeholder are:

Syntax:

<div class="ui placeholder">
    ...
</div>

1. Line Length: In this type of variation we can specify how long its contents should appear.

Example:

HTML




<!DOCTYPE html>
<html>
  <head>
    <link href=
      rel="stylesheet" />
  </head>
  <body>
    <center>
      <h1 class="ui header green">GeeksForGeeks</h1>
      <h2>Semantic UI Placeholder Line Length Variations</h2>
    </center>
 
    <div class="ui placeholder">
      <div class="full line"></div>
      <div class="very long line"></div>
      <div class="long line"></div>
      <div class="medium line"></div>
      <div class="short line"></div>
      <div class="very short line"></div>
      <div class="full line"></div>
      <div class="very long line"></div>
      <div class="long line"></div>
    </div>
  </body>
</html>


Output:

2. Fluid: In this type of variation we can take up the width of its container.

Example:

HTML




<!DOCTYPE html>
<html>
  <head>
    <link href=
      rel="stylesheet" />
  </head>
  <body>
    <center>
      <h1 class="ui header green">GeeksforGeeks</h1>
      <h2>Semantic UI Placeholder Fluid Length Variations</h2>
    </center>
 
    <div class="ui fluid placeholder">
      <div class="image header">
        <div class="line"></div>
        <div class="line"></div>
      </div>
      <div class="paragraph">
        <div class="line"></div>
        <div class="line"></div>
        <div class="line"></div>
      </div>
    </div>
  </body>
</html>


Output:

3. Inverted: In this type of variation we can have its colors inverted.

Example:

HTML




<!DOCTYPE html>
<html>
  <head>
    <link href=
      rel="stylesheet" />
  </head>
  <body>
    <center>
      <h1 class="ui header green">GeeksforGeeks</h1>
      <h2>Semantic UI Placeholder Inverted Variations</h2>
    </center>
 
    <div class="ui inverted segment">
      <div class="ui active inverted placeholder">
        <div class="image header">
          <div class="line"></div>
          <div class="line"></div>
        </div>
        <div class="paragraph">
          <div class="line"></div>
          <div class="line"></div>
          <div class="line"></div>
        </div>
      </div>
    </div>
  </body>
</html>


Output:

Reference: https://semantic-ui.com/elements/placeholder.html


My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!