Semantic UI is an open-source framework that uses CSS and jQuery to build great user interfaces. It is same as a bootstrap for use and has great different elements to use to make your website look more amazing. It uses a class to add CSS to the elements. Semantic-UI classes can be applied to the Input field to modify and design them as needed.
Example 1: Simple Input Field
HTML
<!DOCTYPE html> <html> <head> <title>Semantic UI</title> <link href= rel="stylesheet" /> </head> <body> <div class="ui container"> <h2>Simple Text Input Field</h2> <div class="ui input"> <input type="text" placeholder="Enter Name"> </div> </div> <script src= </script> </body> </html> |
Output:

Example 2: Input Field showing data Loading
HTML
<!DOCTYPE html> <html> <head> <title>Semantic UI</title> <link href= rel="stylesheet" /> </head> <body> <div class="ui container"> <h2>Text Field with Loading Icon</h2> <div class="ui icon input loading"> <input type="text" placeholder="Enter School"> <i class="search icon"></i> </div> </div> <script src= </script> </body> </html> |
Output:

And you can add class ‘ui left icon input loading’ to show that loading icon in the left.
Example 3: Action Input Field
HTML
<!DOCTYPE html> <html> <head> <title>Semantic UI</title> <link href= rel="stylesheet" /> </head> <body> <div class="ui container"> <h2>Text Field With Button</h2> <div class="ui action input"> <input type="text" placeholder="Search"> <button class="ui button">Search</button> </div> </div> <br> <div class="ui container"> <h2>Text field with dropdown list and Button</h2> <div class="ui action input"> <input type="text" placeholder="Search..."> <select class="ui compact selection dropdown"> <option value="web">Web</option> <option selected="" value="images">Images</option> <option value="videos">Videos</option> </select> <div class="ui button">Search</div> </div> </div> <script src= </script> </body> </html> |
Output:

Example 4: Labelled Input File
HTML
<!DOCTYPE html> <html> <head> <title>Semantic UI</title> <link href= rel="stylesheet" /> </head> <body> <div class="ui container"> <h2>Labelled in front.</h2> <div class="ui labeled input"> <div class="ui label"> </div> <input type="text" placeholder="geeksforgeeks.com"> </div> </div> <br> <div class="ui container"> <h2>Labelled in the end.</h2> <div class="ui right labeled input"> <input type="text" placeholder="Find domain"> <div class="ui dropdown label"> <div class="text">.com</div> </div> </div> </div> <script src= </script> </body> </html> |
Output:

Recommended Posts:
- How to validate if input date (end date) in input field must be after a given date (start date) using express-validator ?
- How to validate if input in input field exactly equals to some other value using express-validator ?
- How to validate if input in input field has alphanumeric characters only using express-validator ?
- How to validate if input in input field has base64 encoded string using express-validator ?
- How to validate if input in input field has boolean value using express-validator ?
- How to validate if input in input field has ASCII characters using express-validator ?
- How to validate if input in input field has base 32 encoded string using express-validator ?
- How to validate if input in input field has alphabets only using express-validator ?
- How to validate if input in input field has BIC or Swift code only using express-validator ?
- How to validate if input in input field has integer number only using express-validator ?
- How to validate if input date (start date) in input field must be before a given date (end date) using express-validator ?
- How to validate if input in input field has decimal number only using express-validator ?
- How to validate if input in input field is a valid date using express-validator ?
- How to validate if input in input field has lowercase letters only using express-validator ?
- How to validate if input in input field is divisible by or multiple of a number using express-validator ?
- How to validate if input in input field is a valid credit card number using express-validator ?
- How to validate if input in input field has uppercase letters only using express-validator?
- How to validate if input in input field has float number only using express-validator ?
- How to validate if input in input field must contains a seed word using express-validator ?
- How to validate if input in input field has full width string only using express-validator ?
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.

