![]() |
VOOZH | about |
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 make your website look more amazing. It uses a class to add CSS to the elements.
Forms provide us with a way to take input from the user. We can group a set of input fields of different types such as text, password, number, etc in a form. Let's have a look at various Form States.
Semantic UI Form States:
Syntax:
<div class="ui Loading-State Success-State Error-State Warning-State form"> <div class="Field-Error-State Disabled-Field-State"> ... </div> ... </div>
Note: Use the above syntax according to the need by using a combination of the above-mentioned classes. Refer to the examples below for a better understanding of the classes.
Example 1: In the below example, we have created a loading form.
Output:
Example 2: In the below example, we have created a success form.
Output:
Example 3: In the below example, we have created an error form.
Output:
Example 4: In the below example, we have created a warning form.
Output:
Example 5: In the below example, we have created a form with a field error.
Output:
Example 6: In the below example, we have created a form with a disabled field.
Output:
Example 7: In the below example, we have created a form with a read-only field.
Output: