Open In App

ReactJS Semantic UI Label Element

Semantic UI is a modern framework used in developing seamless designs for the website, It gives the user a lightweight experience with its components. It uses the predefined CSS, JQuery language to incorporate in different frameworks.

In this article we will know how to use label elements in ReactJS Semantic UI. Label element is used to display content classification



Properties:

Syntax:



<label enabled/>

 

Creating React Application And Installing Module:

Project Structure: It will look like the following.

Step to Run Application: Run the application from the root directory of the project, using the following command.

npm start

Example 1: In this example we will be going to use label and icon elements to display basic label by using ReactJS Semantic UI Label element.




import React from 'react'
import {Icon,Label} from 'semantic-ui-react'
  
const styleLink = document.createElement("link");
styleLink.rel = "stylesheet";
styleLink.href = 
document.head.appendChild(styleLink);
  
const Btt = () =>( 
<Label>
    <br/>
    <Icon enabled name='angle double left' size='big' />
    <Icon enabled name='angle left' size='big' />
    <Icon enabled name='circle' size='big' />
    <Icon enabled name='angle right' size='big' />
    <Icon enabled name='angle double right' size='big' />
</Label>
)
  
export default Btt    

Output: 

Example 2: In this example we will be going to use label and icon elements to display disabled label by using ReactJS Semantic UI Label element.




import React from 'react'
import {Icon,Label} from 'semantic-ui-react'
  
const styleLink = document.createElement("link");
styleLink.rel = "stylesheet";
styleLink.href = 
document.head.appendChild(styleLink);
  
const Btt = () =>( 
<Label>
    <br/>
    <Icon disabled name='angle double left' size='big' />
    <Icon disabled name='angle left' size='big' />
    <Icon disabled name='circle' size='big' />
    <Icon disabled name='angle right' size='big' />
    <Icon disabled name='angle double right' size='big' />
</Label>
)
  
export default Btt    

Output:

Reference: https://react.semantic-ui.com/elements/label


Article Tags :