When we work on UI part of our application, we need to do a lot of styling for it to look good and easy to navigate.
We generally use CSS for this purpose. But sometimes it very tedious and time consuming for a big application.
For ReactJS, we can use Semantic.
- Semantic UI: It is a development framework that helps create beautiful, responsive layouts using human-friendly HTML.
- Semantic UI React: Semantic UI React is the official React integration for Semantic UI.
Semantic UI
This is a CSS file and can be used in any HTML file. We can just include a CDN in the header of the file.
Semantic UI usage
Below are the steps on how we can use Semantic UI in our ReactJS application.
- First we need to get the CDN link. A CDN (Content Delivery Network) refers to a geographically distributed group of servers which work together to provide delivery of Internet content like HTML pages, javascript files, stylesheets, images etc.
- Below is the CDN link for Semantic UI that I will be using in my examples
https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.4.1/semantic.min.css
- Include this file in index.html of your application under Heading tag.
Now you can use the CSS classes where ever you want in your application.
You can find a lot of information about Semantic UI classes in the Semantic UI site.

- Click on any element that you want to create on the left hand menu.
- You can see its details and the various types of that element.
- By clicking on <> across a type, you can see the code and related CSS classes for that element.
- You can copy the code from here as well or use the classes the way you want in your code.
Below is a sample code for creating Breadcrumb in you application using Semantic UI
import React from 'react';
import ReactDOM from 'react-dom';
const App = function () {
return (
<div class="ui breadcrumb">
<a class="section">Home</a>
<div class="divider"> / </div>
<a class="section" href="https://tutorials4sharepoint.wordpress.com/">Women Clothing</a>
<div class="divider"> / </div>
<div class="active section">Wedding Wears</div>
</div>
);
};
ReactDOM.render(<App />, document.getElementById('root'));
Below is the output of above code

Semantic UI React
Semantic UI React is the official React integration of Semantic UI. It is a JavaScript file. We can install it using NodeJS Command prompt. Below is the CDN link for this as well.
https://cdnjs.cloudflare.com/ajax/libs/semantic-ui-react/0.84.0/semantic-ui-react.min.js
Select the element that you want to include your application from Semantic UI React site. You can see the code and use it in your application.

I will be installing the JavaScript file first.
npm install --save semantic-ui-react
Use Shift + Alt + F to format the code in Visual Studio Code.
Now, you can simply import the element you want to use, using import statement.
Below is a sample code on how can you use a Breadcrumb using Semantic UI React
import React from 'react';
import ReactDOM from 'react-dom';
import { Breadcrumb } from 'semantic-ui-react';
const App = function () {
return (
<div>
<Breadcrumb>
<Breadcrumb.Section link>Home</Breadcrumb.Section>
<Breadcrumb.Divider />
<Breadcrumb.Section link><a href="https://tutorials4sharepoint.wordpress.com/">Women Clothing</a></Breadcrumb.Section>
<Breadcrumb.Divider />
<Breadcrumb.Section active>Wedding Wears</Breadcrumb.Section>
</Breadcrumb>
</div>
);
};
ReactDOM.render(<App />, document.getElementById('root'));
Below is the output of above code

If you click on Women Clothing, you will be navigated to a link (for sample, I have used my site as the link).







