Category Archives: Semantic UI
Semantic UI Header
Semantic UI Header– Header is basically used to represent the short summary of the content. There are various types of headers available in Semantic UI Framework- Such as Page Headers, Content Headers, Icon Headers and Sub Headers. Here in this tutorial, we are going to explain the headers one by one. You can use our online editor to edit and run the code online.
Semantic UI Header Tutorial
Let us go one by one to understand the Headers available in semantic UI.
- Types
- Content
- States
- Variations
Types
Following types of headers are available-
- 1. Page Headers
- 2. Content Headers
- 3. Icon Headers
- 4. Sub Headers
Page Headers
To create page header add class ui header to heading(h1, h2, h3, h4, h5, h6) element. –
If you run the above example it will produce the output something like this-
Content Headers
You can add header in content container using predefined classes. There are various size classes available such as – huge, large, medium which can be used to create different size of headers.
Example:
|
Output of above example-
In the above output you can see the different size of content header, to change the size of header you just need to add the size modifier class to heading element.
Icon Headers
We can create icon headers using the icon class along with header class.
To add icon in header first add class icon to header, then add icon using semantic icons. In the above example we have added users icon using class users icon”>.
Output of above example-
Sub Headers
Class sub is used to create sub header.
Add class sub to heading along with class ui header then add span to add the label text.
Output of above example-
Content
You can create following content headers.
- 1. Image
- 2. Icon
- 3. Subheader
Image
You can add image to header using image class image.
Output of above example-
Icon
You can add icon to header using icon class simply as below.
You can get complete icon list from here – Semantic UI Icons List
Output of above example-
Subheader
You can add subheader of any header. Add class sub to the child header.
In the above example we have added class sub along with class header. On the same way you can add other subheader.
If you run the above example it will generate output something like this-
States
Following State is available for headers-
- Disabled Header– Add class disabled to create disabled header.
Output of above example-
Learn More
Don’t Stop, Keep Learning!
Variations
Following variations are available for headers.
- 1. Dividing
- 2. Block
- 3. Attached
- 4. Floating
- 5. Text Alignment
- 6. Colored
- 7. Inverted
Dividing
You can add divider to the bottom of header using class dividing. Here is an example of header divider.
Adding class dividing to heading will add divider below to the header.
Output of above example-
Block
You can add class block to make block level header.
After adding class block it will add a light border of 1px with padding. Block headers can also be used to display messages like- Notice, Warning, Error or Success.
Output of above example-
Attached
Like segment headers can also be attached to content.
Example:
|
Add class top attached to create top attached header. Add class bottom attached to create bottom attached header. Add class attached to create simple attached header.
If you run the above example it will produce output something like this-
Floating
You can use floating class left floated or right floated to make it float left or right.
Output of above example will look something like this-
Text Alignment
You can use text alignment classes to make header text left aligned, center aligned or right aligned or justified.
Output of above example-
Colored
You can use color classes to change the header text color. You just need to add the color class to header. Here is an example of colored header text.
On the same way you can change the text color of header. If you want to add custom color add custom color class to header.
Output of above example-
Inverted Color
If you want inverted color add class inverted to header.
If you run the above example it will produce output something like this-
Semantic UI Divider
Semantic UI divider– A divider is basically used to separate the content into different-different parts.
Semantic UI divider Example
Class ui divider is used to create standard divider.
Ouput of above example-
Vertical Divider
Class ui vertical divider is used to create vertical dividers.
Example:
|
Horizontal Divider
Class ui horizontal divider is used to create horizontal divider in semantic ui.
Example:
|
Ouput of above example-
Semantic UI Container
Semantic UI Container– Container is basically an element which contains all elements of page. Containers are responsive and designed to adjust on all screens. Here in this tutorial, we are going to explain how to
Semantic UI Container Tutorial
Class container along with class ui is used to create standard container in Semantic UI.
Ouput of above example-
Text Container
Class ui text container is used to create text container.
Ouput of above example-
Fluid Container
Fluid container have no maximum width limit. Class ui fluid container is used to create fluid container in semantic ui.
Text Align
You can use following alignment classes to align the text in container.
- left– This class is used to left align the text.
- right– This class is used to right align the text.
- center– This class is used to align center the text.
- justified– This adds the justified alignment.
Ouput of above example-
Semantic UI Buttons
Semantic UI Buttons– Class ui button is used to create buttons in semantic ui framework. There are different types of buttons available in Semantic UI. Here in this article we are going to explain how you can create Beautiful buttons in Semantic UI framework. You can also use our online editor to edit and run the code online.
Semantic UI Buttons Tutorial
Let us create first simple button, Add class ui button to button element-
If you run the above example it will produce output something like this-
Following types of buttons are available in semantic UI.
Basic Button
To create basic button add class basic to button.
Output of above example-
You can change the style of basic button to any of the following-
- 1. Primary Button
- 2. Secondary Button
- 3. Positive Button(Success)
- 4. Negative Button(Warning)
Example
Ouput of above example-
Change Basic Button Color
If you want to change the color of basic button you can apply color class simply as below-
Ouput of above example-
Standard Button
To create standard button add class ui button.
- 1. Primary Button
- 2. Secondary Button
- 3. Positive Button(Success)
- 4. Negative Button(Warning)
Here is an example of standard buttons.
Ouput of above example-
Change Standard Button Color
You can change standard button color using color class simply as below-
Ouput of above example-
Inverted Button
To create inverted buttons first create div wrapper with class – ui inverted segment and then add button with inverted class. Here is an example of inverted Button.
Ouput of above example-
Add Icon to Button
You can create button with icon using icon and label class.
Ouput of above example-
Button Groups
You can create button groups simply as below-
Ouput of above example-
Semantic UI Installation
Semantic UI Installation– You can easily install Semantic UI either locally or you can use hosted CDN Url to use Semantic UI framework. Here in this tutorial, we are going to explain how to install Semantic UI.
Semantic UI Installation Steps | CDN URL | Download Locally
There are following ways to install Semantic UI Framework –
Using Hosted CDN
You can use hosted CDN to install the UIkit css. You can include the UIkit JS and CSS from CDN url simply as below-
Install Semantic UI Using CDN URL:
|
Install Locally
You can download the CSS and JS from Download Semantic UI and include the CSS and JS files.
Semantic UI Tutorial
Semantic UI Tutorial – Semantic UI is modern CSSframework which enables us to create beautiful web pages with ready made classes. It has more ready made components than other CSS framework.
Semantic UI Tutorial Step By Step
Semantic UI is basically framework which enables us to create beautiful web pages using simple & friendly HTML.
- Responsive– It is developed with the mobile-first approach. It is fully responsive across all devices.
- Customization– It is very simple to customize the Semantic UI theme.
- Components– It provides rich ready made beautiful components with smooth transition.
- Compatible With React, Angular, Meteor, Ember & Other– It is compatible with modern frameworks like- React, Angular, Metor etc.
- Open Source– It is open source which you can use free of cost.
Audience
This tutorial is designed for the professionals to help them in learning the basic concept of Semantic UI CSS.
What You Should Know?
Before starting to Learn Semantic UI you should be aware of basic concept of HTML, CSS and JavaScript.